Skip to content

Latest commit

 

History

History
327 lines (245 loc) · 11.1 KB

README.md

File metadata and controls

327 lines (245 loc) · 11.1 KB

Matteo Salonia's dwm

This is my personalised build of dwm 6.5.

I applied several quality-of-life patches, as well as some fixes here and there. Note that some of these patches may not apply correctly for a new dwm build, and may need to patch them yourself.

NOTE: to apply the statuscmd patch, I had to modify dwm.c, in particular the drawbar() function: since the patch does not account for the systray, I had to make space for it, otherwhise dwmblocks would draw under it.

Donate

Support this project: salonia.it/donate

Screenshots

1 2 3

Getting started

To get started, compile dwm:

cd dwm
make
sudo make install

It will be available under /usr/local/bin/dwm.

dwmblocks

This repo also contains my build of dwmblocks.

To obtain the scripts, you can:

  • Get them from my dotfiles repo, under scripts/.local/bin
  • Pull the dotfiles submodule, which links to the repo above.

The other scripts (scripts/.config/scripts) are launched by dwm, not dwmblocks.

slock

This repo also contains my build of slock.

The following patches have been applied:

  • slock-capscolor-20220921-35633d4.diff
  • slock-colormessage-20200210-35633d4.diff
  • slock-dpms-20231017-4f04554.diff
  • slock-git-20161012-control-clear.diff

These patches make slock more user-friendly, allowing us to show a message, as well as updating the bg color whenever a key is pressed, showing whether it's the caps-lock, shift, or any other.

In addition, the monitor is automatically blanked after 30 seconds.

libXft-bgra & fonts

Glyph support in libXft was finally fixed in 2022, after two and a half years. Better late than never?

It is not necessary anymore to manually patch libXft. Yay!

Fonts

We need to set fallback fonts, otherwise things will get ugly.

Make sure you have at least one of the following fonts.

  • Serif & Sans-serif: IBM Plex, Iosevka
  • Emojis: JoyPixels, Noto Color Emoji

You can choose whichever you like most.. or choose all of them!

Modify .config/fontconfig/fonts.conf, and add the following:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <alias>
  <family>serif</family>
  <prefer>
   <family>IBM Plex Serif</family>
   <family>Iosevka</family>
   <family>JoyPixels</family>
   <family>Noto Color Emoji</family>
  </prefer>
 </alias>
 <alias>
  <family>sans-serif</family>
  <prefer>
   <family>IBM Plex Sans</family>
   <family>Iosevka</family>
   <family>JoyPixels</family>
   <family>Noto Color Emoji</family>
  </prefer>
 </alias>
 <alias>
  <family>sans</family>
  <prefer>
   <family>IBM Plex Sans</family>
   <family>Iosevka</family>
   <family>JoyPixels</family>
   <family>Noto Color Emoji</family>
  </prefer>
 </alias>
 <alias>
  <family>monospace</family>
  <prefer>
   <family>IBM Plex Mono</family>
   <family>Iosevka Term</family>
  </prefer>
 </alias>
 <dir>~/.fonts</dir>
</fontconfig>

This will set the following font preferences:

  • Serif: IBM Plex Serif, Iosevka, JoyPixels, Noto Color Emoji
  • Sans Serif: IBM Plex Sans, Iosevka, JoyPixels, Noto Color Emoji
  • Sans: IBM Plex Sans, Iosevka, JoyPixels, Noto Color Emoji
  • Monospace: IBM Plex Mono, Iosevka Term

Keybindings

The default action key is the ALT key.

The Shift key will be referred to as S.

The Super key (also known as "windows" key) will be referred to as WIN.

Actions

  • Toggle statusbar: ALTb
  • Make window fullscreen: ALTf
  • Kill client: ALTSc
  • Restart dwm: ALTSr
  • Quit dwm: ALTSq

Layouts

  • Tile layout: ALTt
  • Monocle layout: ALTSt
  • Spiral layout: ALTy
  • Dwindle layout: ALTSy
  • Deck layout: ALTu
  • Bstack layout: ALTSu
  • Bstack-horiz layout: ALTi
  • Grid layout: ALTSi
  • Nrowgrid layout: ALTo
  • Horizontal grid layout: ALTSo
  • Gapless grid layout: ALTp
  • Centeredmaster layout: ALTSp
  • Make window floating: ALTSSPACE

Gaps

  • Toggle gaps: ALTWIN0
  • Reset gaps: ALTWINS0
  • Increase gaps: ALTWIN1
  • Decrease gaps: ALTWINS1

All the other keybindings can be found in config.h.

Window actions

  • Move window left: ALTSh
  • Move window down: ALTSj
  • Move window up: ALTSk
  • Move window right: ALTSl
  • Decrease window width: ALTh
  • Increase window width: ALTl
  • Focus window down/anti-clockwise: ALTj
  • Focus window up/clockwise: ALTk

All the other keybindings can be found in config.h.

Tags

  • Toggle scratchpad: ALT0
  • Go to last tag: ALTTAB.
  • Go to tag x: ALTx (x is a value between 1 and 9)
  • Move selected window to tag x: ALTSx.

Programs

  • Terminal (/usr/local/bin/st): ALTENTER
  • Terminal in scratchpad: ALTSENTER
  • Rofi: ALTd
  • Dmenu: ALTSd
  • File manager (dolphin): ALTSf
  • Web browser (librewolf-bin): ALTSW

Others

The "Print screen" key is referred to as PrntScr.

  • Take a screenshot: PrntScr
  • Select area to screenshot: ALTPrntScr

The screenshot will be taken using scrot, saving it under $HOME/Pictures.

Some XF86 action keys are already mapped, so your keyboard's audio & brightness controls should work without any issues. Audio controls use pactl, while brightness controls use xbacklight.

NOTE: on Gentoo, the XF86keysym.h header (required for XF86 keys to work) is provided by the package xorg-proto.

Scripts

NOTE: to launch these scripts, or even add your own, make sure you setup the correct directory! In config.h, look for S_PATH, which is set to .config/scripts by default. Change it only if the path to the scripts is different! You do not need to specify your home directory.

If you have any doubts, just inspect the scripts yourself.

NOTE 2: TERMCMD (which is /usr/local/bin/st by default) will be used to launch these scripts. Change it if your path is different, or you want to use a different terminal! (Example: urxvt)

To use the set-fan script, you need a ThinkPad. Even then, you need to configure thinkpad_acpi to allow writing custom fan speeds to /proc/acpi/ibm/fan. This is well explained here. Use your own script/program if you don't.

To use the screenlock script, you need slock.

To use the screenrecord script, you need ffmpeg. No, OBS is not used.

To use the toggletouchpad script, make sure you have a synaptics file in /etc/X11/xorg.conf.d! If you don't, you can copy one from your distro's defaults:

cp /usr/share/X11/xorg.conf.d/*0-synaptics.conf /etc/X11/xorg.conf.d/

To use the randomwall-now script, you need hsetroot. Wallpapers will be loaded from ~/wallpapers.

The randomwall script, which is included but not ran by dwm, will set a random wallpaper immediately, and change it every 3 minutes. This script will run indefinitely.

  • Detect and select displays: WINd
  • Set fan speed: WINf
  • Move mouse automatically, periodically: WINi
  • Lock the screen: WINl
  • Mount drives: WINm
  • Record the screen: WINr
  • Toggle touchpad: WINt
  • Unmount drives: WINu
  • Set random wallpaper: WINw
  • Safe mode: WINSb
  • Emoji chooser: WINSe
  • Script launcher: WINSl
  • Set a reminder: WINSr
  • See disk usage: WINSu
  • Downloader: XF86Search ("Search" icon on your keyboard)

Patches

Here the patches are explained in more detail.

The following patches are applied:

  • dwm-alpha-systray-6.3_full
  • dwm-centeredsizehints-6.5
  • dwm-cfacts-vanitygaps-6.5_full
  • dwm-dragmfact-6.5
  • dwm-focusfollowmouse-6.5
  • dwm-inplacerotate-6.2
  • dwm-netclientliststacking-6.5
  • dwm-placemouse-6.5
  • dwm-r1615-selfrestart
  • dwm-resizecorners-6.3.diff
  • dwm-scratchpad-20240321-061e9fe.diff
  • dwm-sortscreens-6.5
  • dwm-statuscmd-20210405-67d76bd
  • dwm-swallow-6.5
  • dwm-togglefullscreen-6.5
  • dwm-xresources-6.2

dwm-alpha-systray-6.3_full

Add translucent bars to dwm, while also adding a system tray (systray).

Patch downloaded from bakkeby

dwm-centeredsizehints-6.5

Center clients based on size hints.

Patch downloaded from bakkeby

dwm-cfacts-vanitygaps-6.5_full

Make windows resizeable (cfacts), and add inner & outer gaps (vanitygaps).

Patch downloaded from bakkeby

dwm-dragmfact-6.5

Resize windows with the mouse.

Patch downloaded from bakkeby

dwm-focusfollowmouse-6.5

Focus follows the mouse

Patch downloaded from bakkeby

dwm-inplacerotate-6.2

Move windows up/down the stack

Patch downloaded from suckless

dwm-netclientliststacking-6.5

Add the _NET_CLIENT_LIST_STACKING property which may be needed by some applications, for example "zoom" for screen sharing

Patch downloaded from bakkeby

dwm-placemouse-6.5

Move window onto another window's location, effectively "swapping" their position and sizes.

Patch downloaded from bakkeby

dwm-r1615-selfrestart

Restart dwm in place.

Patch downloaded from suckless

dwm-resizecorners-6.3

Resize window from the nearest corner, instead of warping the mouse to the bottom-right corner of the window. (NOTE: this was chosen instead of resizepoint because of several patching issues)

Patch downloaded from suckless

dwm-scratchpad-20240321-061e9fe

Spawn a terminal in the scratchpad, and toggle the scratchpad.

Patch downloaded from suckless

dwm-sortscreens-6.5

Multi-monitor fixes

Patch downloaded from bakkeby

dwm-statuscmd-20210405-67d76bd

Signaling for dwmblocks, also fixes weird [] shapes

Patch downloaded from suckless

dwm-swallow-6.5

Swallow terminal windows

Patch downloaded from bakkeby

dwm-togglefullscreen-6.5

Toggle fullscreen

Patch downloaded from bakkeby