LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2020, 07:42 PM   #1
mr_bones
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Rep: Reputation: Disabled
[SOLVED] How do I apply a patch?


I'm using dwm in 18.04, and I have a simple xsetroot loop in my .xinitrc that gets weather from wttr.in that sends a unicode color emoji. "fonts-noto-color-emoji" doesn't work in dwm, but I found a patch for libxft that fixes it: https://gitlab.freedesktop.org/xorg/...rge_requests/1

I've downloaded the libxft sources with:
Code:
apt-get source libxft-dev
I know about the "patch" command, but I don't know exactly what to download or how to apply it. Any help would be greatly appreciated. TIA

btw, here's my .xinitrc if anyone is interested
Code:
while xsetroot -name "`iostat -c | awk '(NR == 4) {print $1}'`% | `free -h | awk '(NR == 2) {print $3}'` / `free -h | awk '(NR == 2) {print $2}'` | `cat /sys/class/power_supply/BAT0/capacity`% `cat /sys/class/power_supply/BAT0/status` | `curl -s wttr.in/Denver?format=1` | `date`"
do
  sleep 1
done &
exec dwm

Last edited by mr_bones; 03-28-2020 at 04:22 PM.
 
Old 03-20-2020, 06:39 PM   #2
mr_bones
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
OK, i found the raw diff here since I submitted this thread for approval: https://gitlab.freedesktop.org/xorg/...8d9ec47fc.diff

It patches 4 files. Not sure if I feed it to "patch" as-is, but I see an option in the man page for a dry run, so I will give it a try later when I am not drinking.
 
Old 03-20-2020, 07:36 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Sorry, I didn't really have an idea other than the instructions at github.
 
Old 03-21-2020, 11:31 AM   #4
mr_bones
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Cool

Quote:
Originally Posted by jefro View Post
Sorry, I didn't really have an idea other than the instructions at github.
No worries. Thanks for letting me ask here (although I'm a bit embarrassed to do so - I've done this before, I swear :P). I'm just finishing up the bottle I started last night, so I will get back to this later, but I will post up the complete procedure when I'm done. This is too much work just to get color icons on my status bar, though. I'm hoping that maybe a few other people here will test out this patch and we can KINDLY get the attention of the xft devs so they consider merging it. I have zero connections to whomever wrote the patch, btw.
 
Old 03-28-2020, 04:21 PM   #5
mr_bones
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up

OK, I finally got back around to this, and it was easy enough to apply the patch:
Code:
patch -p1 < 7808631e7a9a605d5fe7a1077129c658d9ec47fc.diff
I don't have dwm working with color emoji yet, but that's a different story. Thanks!

Last edited by mr_bones; 03-28-2020 at 04:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Patch not apply and tell me "file to Patch" :( hack3rcon Linux - Software 2 06-08-2015 07:35 AM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM
How do I apply a patch for the new version of xchat? Womandrake Linux - Software 2 04-24-2003 06:46 PM
How To Apply Patch To Kernel WILLIAMATHOMAS Linux - Software 2 02-12-2003 12:57 PM
help a newbie apply php 4.2.2 patch! bobotron Linux - Software 1 08-01-2002 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration