My Suckless Build Using dwm + dwmblocks + st + xcompmgr
aka. my "moderately" patched Suckless Tools
Picture of four st instances separately running cmatrix, htop, ncmpcpp, cava, and an active gif background
Arch Linux
Install automatically:
run this absolute killer script written by me hehe
git clone https://github.com/ronylee11/dotfiles.git
cd dotfiles
chmod +x ./installer.sh
./installer.sh
Install Manually:
Dependencies
sudo pacman -S xorg-server xorg-xinit libx11 libxinerama libxft webkit2gtk
sudo pacman -S base-devel
Optional
sudo pacman -S xcompmgr fcitx5 feh dunst rnnoise oneko
Now install this repository
git clone https://github.com/ronylee11/dotfiles.git
cd dotfiles
Go in each suckless directory individually, for / dwm, dwmblocks, dmenu, slock, scroll, surf, tabbed, st /
and separately run sudo make clean install
Checkout the rest of the directories to install some other tools, a custom README file is written for guidance
How to use my setup?
DWM keybindings:
I have set my Modkey to Windows Key! If you do prefer Alt Key, set Mod4Mask to Mod1Mask in dwm/config.def.h!
Here are the default keybindings that I have customized to my likings:
Switching tags:
Modkey+1 - switch to tag 1
Modkey+2 - switch to tag 2
Modkey+3 - switch to tag 3
Modkey+4 - switch to tag 4
Modkey+5 - switch to tag 5
Modkey+F1 - switch to tag 6
Modkey+F2 - switch to tag 7
Modkey+F3 - switch to tag 8
Modkey+F4 - switch to tag 9
Modkey+F5 - switch to tag 10
Switch Focus between apps:
Modkey+K - next app
Modkey+J - previous app
Modkey+Enter - move currently focus app to main stack(switching app order)
Moving app between tags:
focus on the app that u want to move,
ModKey+Shift+1-F5 - move app to tag 1-10
Launching app:
Modkey+P - runs rofi launchpad, choose with arrow keys and enter to launch
Launching terminal(st):
Modkey+Shift+Enter - launch st terminal, u can change ur default terminal in dwm/config.def.h to kitty if you prefer!
(one instance of empty st takes 4-6MB of RAM, one instance of empty kitty takes 40~60MB of RAM)
fish shell config:
Buttons:
(TAB) - autocompletion
(Right Arrow Key) - autocompletion by one character
Aliases:
c - alias set to clear
cmatrix - alias set to unimatrix with customization parameters
btp - bluetoothctl power on
btf - bluetoothctl power off
bts - bluetoothctl scan on
btc - bluetoothctl connect AC:12:12:12 (in this case my personal device, u can change it)
icat - kitty +kitten icat
yt - youtube-dl -o '$HOME/Downloads/%(title)s-%(id)s.%(ext)s' -f bestaudio (to install youtube music with best audio to Downloads/ directory)
Abbr:
p - sudo pacman
y - yay
Autostart:
startx on tty1 upon login
auto use fishbone omf theme on st & tty fish shell
specifically only on vscode terminal, use agnoster omf theme on fish shell
(Do feel free to change and modify them to your own likings!)
-
What is config.def.h and config.h?
config.def.h is the default configuration file that all the patches and manual tweaks go to.
config.h is the actual configuration file that is automatically generated whensudo make install
is executed.
Continuous Patching results in repeated lines in config.def.h.
Repeated lines are removed in config.h whensudo make install
is executed.
Note: config.h has to be removed to be automatically generated.
@@
Workflow of making changes in suckless programs
Copy config.h and replace it to config.def.h > Edit config.def.h > Remove config.h > Runsudo make install
-
What is Patching?
Patching usespatch
command and .diff files.
The .diff files contains insertions and deletions of lines in multiple files, just like git.
patch
take account of the insertions and deletions and try to merge them into subsequent files.
The added lines and removed lines are reflected in config.def.h
Just like how git works, when there is conflicts, we have to manually look through the conflicted lines and add/remove them.
@@
Workflow of patchingpatch -p1 < dwm-20-4-2069.diff
If it throws errors, subsequent files ended in .rej will be generated.
Read through .rej files and manually add/remove lines.
@@
Reverse patchingpatch -R < dwm-20-4-2069.diff
If we don't like the patch being applied, we can reverse them.
Same as above, if it throws errors, .rej files will be generated and we have to manually edit them again.
Luckily, it should be easier this time as all the extra lines are manually added ourselves. -
Whats the difference between
make install
andmake clean install
?make clean install
is equivalent to runningmake make install make clean
make
builds the complete program using source code
clean
removes all the compiled resources in the source folder
install
installs the complete program on the system
The major difference is clean helps regain space
Good practice is to runmake clean install
on fresh installation, andmake install
when u configure it -
How to disable instant shutdown when power button is pressed? In /etc/systemd/login.conf, add HandlePowerKey=ignore
-
How to change console font size? Change the font!
In /etc make a new file named vconsole.conf, add in FONT=ter-132n, or any other fonts u find in /usr/share/kbd/consolefonts/ Now restart! -
How to make VirtualBox start in dark theme? (QT Config) VirtualBox is a qt5 application
In order to change theme for all qt applications, useqt5ct
And download a qt theme that has dark variant, such asbreeze
oradwaita-qt
sudo pacman -S qt5ct yay -S adwaita-qt
In the terminal, run qt5ct, and change the theme in Appearance tab
In /etc/environment, add a new lineQT_QPA_PLATFORMTHEME=qt5ct
and save
Restart and see the magic happens! -
How to make Discord tray icon's right click menu change to dark theme? ( GTK config ) Discord is a gtk3 application
In order to change theme for all gtk applications, uselxappearance-gtk3
Launchlxappearance
from terminal, edit and save! -
How to apply VsCode white top bar to dark theme? In VsCode settings search
window.titlebar
and changeTitle Bar Style
to custom -
How to make VsCode terminal show icons? In VsCode settings search
terminal.integrated.font
and underFont Family
typeHack Nerd Font Mono
dwm - alwayscenter, fullgaps, bar-height, pertag, statuscmd, systray, systray-iconsize
dwmblocks - statuscmd
st - alpha, scrollback
slock - capscolor, colormessage, foreground-and-background
surf - bookmarking, playexternal, download, searchengines
- suckless.org - https://suckless.org/
- dwmblocks - https://gitlab.com/zagyarakushi/mydwmblocks
- surf - https://github.com/LukeSmithxyz/surf
- rofi (dmenu alternative) - https://github.com/davatorium/rofi
- rofi theme - https://github.com/dctxmei/rofi-themes
- oneko - https://aur.archlinux.org/packages/oneko
- xcompmgr - https://wiki.archlinux.org/title/xcompmgr
- mouse & touchpad - https://wiki.archlinux.org/title/Mouse_acceleration
- fcitx5 (multi-language keyboard layouts) - https://wiki.archlinux.org/title/Fcitx5
- fcitx5 Nord theme - https://github.com/tonyfettes/fcitx5-nord
- feh (background image & image viewer) - https://wiki.archlinux.org/title/Feh
- bluetoothctl commands (bluetooth cli solution) - https://linuxcommandlibrary.com/man/bluetoothctl
- screendimmer (dimmer screen) - https://github.com/Lawrence-Chiappelli/screendimmer
- youtube-dl (youtube videos downloader) - https://wiki.archlinux.org/title/Youtube-dl
- spotdl - https://github.com/spotDL/spotify-downloader
- ncmpcpp (frontend for local music player) - https://wiki.archlinux.org/title/ncmpcpp
- mpd (backend for local music player) - https://wiki.archlinux.org/title/Music_Player_Daemon