Home > ubuntu > How to add patches to dwm

How to add patches to dwm

October 12Hits:5
Advertisement

I do not understand how to add patches to dwm, I am running Ubuntu and I do have git installed. Am I just supposed to copy/paste the .diff file into a new file in the directory and do git apply pertag.diff ? Please be very explicit as it is I am hopelessly lost.

Answers

Yes, that's pretty much it. Suckless.org provides instructions on applying patches to DWM, and the procedure is pretty simple. I'll add a few more details, though. I'm assuming that you're building dwm from source, since you'll need to do this in order to install patches.

  1. Save the patch somewhere in your source directory, and run git apply pertag.diff.
  2. If the patch added any new files, run git add <name of new file> to add them to the repository. If no new files were added, ignore that. Once you've added any new files, run git commit -a to commit the changes.
  3. Rebuild dwm. If you're building dwm as root, run make clean install from the top folder of dwm's source tree (e.g., if you downloaded the source into /build/dwm, run the command in that folder). It's the folder with the makefile. If you are building/installing dwm as a non-root user, just run make from the source folder.
  4. If you already have your system set up to use dwm, either through installing it as root or building it as a normal user and pointing to your user's copy, you shouldn't have to redo any configuration. Just restart dwm and the patch should be working.


A few more details. Technically, you don't need to commit any changes to the git repository, but I always do this because I maintain my copy of dwm in it's own repository, and pull in patches, developers' changes, etc. into it and merge them when necessary.

Some useful tips:

  1. If you want to see what the patch does before applying it, download it and run git apply --stat pertag.diff. This will show you what files the patch will change.
  2. If you want to test out the patch, apply it using git apply as I described above but don't commit the changes. Test out the changes (restart/rebuild dwm, use the new feature, etc.), then, if you want to roll back the changes, run git apply -R pertag.diff.
Tags:ubuntu, git, patch, dwm

Related Articles

  • How to add patches to dwmOctober 12

    I do not understand how to add patches to dwm, I am running Ubuntu and I do have git installed. Am I just supposed to copy/paste the .diff file into a new file in the directory and do git apply pertag.diff ? Please be very explicit as it is I am hope

  • How to add D-link dwm-156 to usb switch mode for automatic eject of driver CD / switch to modem mode?June 23

    I am running Ubuntu 13.10, 32-bit. I had every time need to go terminal to "eject" the windows driver CD,nor gone to disk & eject windows driver CD to make the d-link dwm-156 gsm modem functioning through network manager. It seems that usb m

  • Patching a file (in this case dwm) and failed hunksDecember 12

    I'm trying to add the transparency patch to dwm. I downloaded the .diff file and in my dwm directory ran this: [email protected]:~/misc/dwm/dwm-5.9> patch < dwm-transparency.diff patching file config.def.h patching file dwm.c Hunk #1 FAILED at 58. Hunk

  • Dwm - pertag patch - save state between restartsMarch 5

    I'm using Pertag patch As a Gentoo user I apply dwm patches using Portage. Basically there's a directory where user can put a patch for sourcecode and Portage will apply it during the compilation process (if patching procedure goes wrong whole compil

  • Dwm patches not workingApril 21

    im trying to install this dwm patch but i keep getting this error ps im running a vanilla dwm-6.0 with only minor edits to config.h to change the tags can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text

  • Unicode characters in uxterm and dwm statusbar

    Unicode characters in uxterm and dwm statusbarMay 13

    I would like to display Chinese characters in dwm's status bar. More specifically I would like the symbols to represent the different tags in dwm. Using an online converter, I found that the unicode representation for the symbols I want is: 憤怒 unicod

  • Is is possible to get a patch included in the current release? If so, how?

    Is is possible to get a patch included in the current release? If so, how?June 10

    So a while back I reported a bug in Compiz's Place Window plugin. It's a fairly major regression for people affected by it: mainly those using Gnome-Fallback, judging by the reports. A patch surfaced a short time later. I created a PPA for testing an

  • Ubuntu published OS patch/packageNovember 12

    I am very new to this community and Ubuntu OS. I am currently on a project to create a mirror repository server. However our patching policy is very restricted. Before we add patch to the mirror server, we need to know details of the fix and we only

  • Coloring the output of conky-cli in dwmApril 22

    I've recently installed conky-cli and got it running on the upper bar in dwm with this simple command: conky | while read -r; do xsetroot -name "$REPLY"; done & And I wanted to get colored output with conky, thought this could be done with s

  • How To Install D-Link DWM-156 3G Modem Ubuntu 13.04 June 21

    This question already has an answer here: How to add D-link dwm-156 to usb switch mode for automatic eject of driver CD / switch to modem mode? 1 answer I bought a new D-Link 3G modem and it said it supports Linux. But after I installed it, I still c

  • Using Dlink DWM 156 with Ubuntu 12.04.2 October 6

    This question already has an answer here: How to add D-link dwm-156 to usb switch mode for automatic eject of driver CD / switch to modem mode? 1 answer I have recently a new USB modem, named DLink DWM-156. But I am not able to connect internet via t

  • KVM Through Patch PanelsJune 30

    I'm planning to add patch panels to our data center. We have around 30 machines connected directly to our switch today, and it's getting messy. The original installation was based on broadcast infrastructures where patch panels aren't used (I have no

  • Problem with Installing Patch Analyst 5

    Problem with Installing Patch Analyst 5October 23

    When I try to install patch analyst 5, I get this message: The installation wizard shows that the installation was successful. However, when I go to add patch analyst to the tool bar, nothing happens. I try to the software from the folder but I am to

  • Grey Screen Of Death at console loginJuly 14

    I have a Windows SBS 2003 R2 server that has a strange problem. If the server is left running for approximately 4 days, I cannot get the login screen to appear at the console - all that displays is a blank grey screen. Weirdly I have no problem loggi

  • Building a synthesizer with no prior experienceNovember 2

    I've got an extensive music background and have been infatuated with synthesizers since I was young. I had dreamed of going into an EE program to make my dream a reality, but I couldn't afford school (long story). Basically, I'd like to build a 3 osc

  • Reboot to clean state daily, on WindowsMarch 1

    I already know that this can be done on Linux, One can boot to a flash drive that is write protected. Live modify folders can be symlinked to to a swap partition, and this prevents viruses from being stored between reboots. All file storage would be

  • Unable to install VMWare Workstation v8March 27

    Installing VMware 8.0.2 64bit Ubuntu 12.04LTS 64bit BETA My Kernel version is: 3.2.0-20-generic [email protected]:~$ sudo sh VMware-Workstation-Full-8.0.2- 591240.x86_64.bundle Installs ok When I launch I am asked to install modules which a

  • tiling WM with resizable stack windows?

    tiling WM with resizable stack windows?April 21

    Right now I'm using dwm and for the most part loving it. It does almost everything I want, which is great, but there is one more thing I'd like that I'm not sure what WM can or can't do, or if there's a patch for dwm to make it possible. I'll regular

  • Unable To Install VMware WorkStation 8 on ubuntu 12.04August 3

    Installing VMware 8.0.2 32bit Ubuntu 12.04LTS 32bit BETA My Kernel version is: 3.2.0-20-generic [email protected]:~$ sudo sh VMware-Workstation-Full-8.0.2-591240.i386.bundle Installs ok When I launch I am asked to install modules wh

  • Trojan in Ubuntu? DigiNotar

    Trojan in Ubuntu? DigiNotarAugust 25

    On Wednesday, I installed an old copy of Ubuntu 10.04LTS onto a pristine desktop PC that I built w/ brand new hardware--DSL modem, too--except for the CPU. Then, I downloaded Ubuntu 12.04 from Ubuntu.com, and compared hash values before erasing v10.0

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 1.155 s.