1 ## Personal build of dwm window manager 2 3 Dwm is a dynamic window manager (dwm) from suckless that dynamically tiles windows based off a master-slave orientation. Vanilla dwm is very bland and doesn't come with very much, so I added some patches for functionality and style. 4 5 To install my build of dwm, run 6 ``` 7 git clone https://github.com/simonxiang1/dwm 8 cd dwm 9 ``` 10 (Optional) Now my build of dwm autostarts compton pointing to my specific configuration file, so of course you'll need to edit this to fit your system. Simply type `vim config.def.h` and search for the word "autostart". Once you find the autostart array, replace my path with the correct path to your compton configuration file (or delete the line altogether). 11 12 Also, dwm saves screenshots to a custom directory on my system. To change this, while in the `config.def.h` file search for "scrot" and change the file path, or just delete the command and replace it with `scrot` if you just want to save screenshots to the home directory. 13 14 One more thing: you may want to install [polybar-dwm-module](https://github.com/mihirlad55/polybar-dwm-module), since my build of dwm is set up to work with polybar. (You can skip the dwm-specific install instructions, I took care of that for you! But you still need to follow the polybar related ones, or just look in my [dotfiles](https://github.com/simonxiang1/dotfiles/tree/master/.config/polybar).) If you want to use the native bar, set the variable `usealtbar` to 0 in `config.def.h`. 15 16 After you've made your changes, run 17 ``` 18 cp config.def.h config.h 19 ``` 20 (Not optional) Finally, compile dwm by running 21 ``` 22 sudo make install clean 23 ``` 24 Soft dependencies include st, dmenu, mpc, alsa, xbacklight, scrot, polybar, and picom. However, you can easily subsitute these for whatever you like in the config.h file. Make sure to append 'exec dwm' or some variant to your .xinitrc file. 25 26 ## Features: 27 28 - Custom keybindings! 29 - Alt-Super-j/Alt-Super-k to decrease/increase gaps 30 - Alt-Super-0 to reset gaps and Alt-Super-Shift-0 to toggle gaps 31 - Alt-q to close a window 32 - Alt-Enter for a new terminal 33 - Alt-Shift-Enter to toggle a window in the master area 34 - Alt-Tab to view the next tab (workspace), Alt-Shift-Tab to view previous tag 35 - Alt-u for centered master, Alt-o for centered floating master 36 - F1 to play/pause music (mpd) 37 - F2/F3 to decrease/increase volume by 3% 38 - F4/F5 to decrease/increase brightness by 2.5% 39 - Alt-comma/Alt-period to skip to previous/next song 40 - (Think of this as ncmpcpp binds: comma maps to <, period maps to >) 41 - Alt-Shift-comma/Alt-Shift-period to seek forward/backward 3 seconds in a song 42 - Print screen key (prt sc, XK_Print) to screenshot (saves to custom folder) 43 - Control-Alt-Delete to quit dwm and log out 44 - All other binds are dwm default (see man dwm) 45 - Patches applied: 46 - ~~Swallow- floating windows spawned by a terminal consume the useless terminal to save screen real estate~~ goodbye swallow, sane people use dmenu to open things anyway 47 - Pertag- each tag saves information about bar status, window type (floating, monocle, etc) to make tags function more like workspaces 48 - Shiftview- allows cycling between tags 49 - Autostart- will autostart compton and st by default in this build 50 - EWMH- doesn't entirely work but should provide support for things like polybar 51 - Centered Master- new window layouts 52 - Attach Direction- choose where new windows are spawned, by default in this build new windows will spawn from the top in the slave stack 53 - ~~The bar displays Shulk's Monado Arts (斬, 疾, 翔, 盾, 撃) instead of the boring "1 2 3 4 5"~~ Now displays black dots 54 - !NEW! dwm-anybar and dwm-ipc (see [here](https://github.com/mihirlad55/dwm-anybar) and [here](https://github.com/mihirlad55/dwm-ipc) respectively) have been patched in! This means we have very functional polybar support, provided you use [polybar-dwm-module](https://github.com/mihirlad55/polybar-dwm-module) 55 56 #### Notes: 57 - There are ~~lots of~~ _no_ issues regarding the bar in my build of dwm 58 - ~~Notably, polybar doesn't start properly~~ yay 59 - ~~The dwm bar doesn't display any information on the right with xsetroot~~ fixed with polybar 60 - ~~I would like for it to display the time, battery level, and maybe weather~~ fixed with polybar 61 - ~~Considering patching dwm-ipc and polybar-dwm-module~~ done 62 - ~~Xresources compatibility means recompiling dwm on each color scheme switch~~ fixed with polybar 63 - ~~To make this work like intended, I would have to find a way to have dwm recompile without logging out~~ fixed with polybar 64 - ~~Then I would have to run this each time I run "newtheme", which is a pain~~ fixed with polybar 65 66 Pull requests welcome!