α›Ÿ Sorzitos Lair

↩ Go back to Rice

Config Scrapyard

Muh dotfiles


dwm keybinds

Quick Cheatsheet

This cheatseet covers the most important main stuff.

Super (Windows key) + F1 opens sysact.

Super (Windows key) + W opens LibreWolf.

Super (Windows key) + SHIFT + W opens Tor.

Super (Windows key) + R opens Nicotine+.

Super (Windows key) + SHIFT + R runs the multi-tool.

Super (Windows key) + D opens dmenu.

Super (Windows key) + SHIFT + D runs the dmenu emoji picker.

Super (Windows key) + \ opens qalc.

Super (Windows key) + SHIFT + \ opens tremc.

Super (Windows key) + Z opens alsamixer.

Super (Windows key) + SHIFT + Z opens nmtui.

Super (Windows key) + X opens cmus.

Super (Windows key) + SHIFT + X opens htop.

Super (Windows key) + C runs the media selector.

Super (Windows key) + SHIFT + C runs the book selector.

Super (Windows key) + V opens Newsraft.

Super (Windows key) + SHIFT + V opens Neomutt.

Super (Windows key) + Enter opens an empty st terminal window.

Super (Windows key) + SHIFT + Enter runs the history search.


Search file to edit in Neovim

Super (Windows key) + SHIFT + E opens a terminal window with a fzf menu that lets you select between files from the home directory and its subdirectories.

{ MODKEY|ShiftMask,             XK_e,              spawn,                 SHCMD("st -t \"Select file to edit in Neovim\" sh -c 'sfl(){ fl=\"$(cat ~/stuff/doc/files | fzf)\"; cd \"${fl%/*}\" 2>/dev/null; case \"$fl\" in \"πŸ”„ Reload\") { echo \"πŸ”„ Reload\" > ~/stuff/doc/files; find ~ -type f >> ~/stuff/doc/files; sfl; }; ;; *) nvim \"$fl\";; esac; }; sfl; printf \"\033]0;st\007\"; clear; exec $SHELL'") },
Old version

The same but with on-demand file search instead of using the 'files' file.

{ MODKEY|ShiftMask,             XK_e,              spawn,                 SHCMD("st -t \"Select file to edit in Neovim\" sh -c 'fl=$(find ~ -type f | fzf); cd \"${fl%/*}\"; nvim \"$fl\"; exec $SHELL'") },

Directory Search

Super (Windows key) + E opens a terminal window with a fzf menu for selecting between folders from the home directory and its subdirectories.

{ MODKEY,                       XK_e,              spawn,                 SHCMD("st -t \"Directory search\" sh -c 'cdir(){ dir=\"$(cat ~/stuff/doc/dirs | fzf)\"; cd \"$dir\" 2>/dev/null || { echo \"πŸ”„ Reload\" > ~/stuff/doc/dirs; find ~ -type d >> ~/stuff/doc/dirs; cdir; }; }; cdir; printf \"\033]0;st\007\"; clear; exec $SHELL'") },
Old version

The same but with on-demand directory search instead of using the 'dirs' file.

{ MODKEY,                       XK_e,              spawn,                 SHCMD("st -t \"Directory search\" sh -c 'cd \"$(find ~ -type d | fzf)\"; printf \"\033]0;st\007\"; exec $SHELL'") },

History Search

Super (Windows key) + SHIFT + Return (Enter) opens a terminal window with a fzf menu, allowing you to select a command from '~/.cache/zsh/history' to run.

{ MODKEY|ShiftMask,             XK_Return,         spawn,                 SHCMD("st -t \"History search\" sh -c 'setxkbmap br; clip=\"$(xclip -selection clipboard -o 2>/dev/null)\"; tac ~/.cache/zsh/history | fzf --no-sort -e | tr -d \"\n\" | xclip -selection clipboard; xdotool key ALT+V; clear; printf \"%s\" \"$clip\" | xclip -selection clipboard; printf \"\033]0;st\007\"; exec $SHELL'") },
Old version

File Search + Multi-tool

Super (Windows key) + R does basically what the neovim keybinding does except it uses different programs for different file-types.

{ MODKEY|ShiftMask,             XK_r,              spawn,                 SHCMD("st -t \"Multi-tool\" sh -c 'msl(){ fl=\"$(cat ~/stuff/doc/files | fzf)\"; cd \"${fl%/*}\" 2>/dev/null; case \"$fl\" in *.png|*.jpg|*.jpeg|*.webp) nsxiv \"$fl\" \"${fl%/*}\";; *.gif) nsxiv -a \"$fl\" \"${fl%/*}\";; *.mp3|*.flac|*.ogg|*.wav) mpv --no-vid --loop \"$fl\";; *.mp4|*.webm|*.mkv|*.avi) mpv \"$fl\";; *.html) ${BROWSER:-xdg-open} \"$fl\";; *.pdf|*.epub) zathura \"$fl\";; *.exe|*.sh) \"$fl\";; \"πŸ”„ Reload\") { echo \"πŸ”„ Reload\" > ~/stuff/doc/files; find ~ -type f >> ~/stuff/doc/files; msl; }; ;; *.wad|*.pk3) uzdoom \"$fl\" ;; *.swf) lightspark \"$fl\" ;; *) nvim \"$fl\";; esac; }; msl; printf \"\033]0;st\007\"; clear; exec $SHELL'") },
Old version

The same but with on-demand file search instead of using the 'files' file.

{ MODKEY|ShiftMask,             XK_r,              spawn,                 SHCMD("st -t \"Multi-tool\" sh -c 'fl=$(find ~ -type f | fzf); cd \"${fl%/*}\"; case \"$fl\" in *.png|*.jpg|*.jpeg|*.webp) nsxiv \"$fl\" \"${fl%/*}\";; *.gif) mpv --loop \"$fl\";; *.mp3|*.flac|*.ogg|*.wav) mpv --no-vid --loop \"$fl\";; *.mp4|*.webm|*.mkv|*.avi) mpv \"$fl\";; *.html) ${BROWSER:-xdg-open} \"$fl\";; *.pdf|*.epub) zathura \"$fl\";; *.exe|*.sh) \"$fl\";; *) nvim \"$fl\";; esac; exec $SHELL'") },
Image previews variant Using ueberzogen instead of vanilla fzf enables image previews with ueberzug, which look cool, as shown in the top screenshot in the rice page.
{ MODKEY|ShiftMask,             XK_z,              spawn,                 SHCMD("st -t \"Multi-tool\" sh -c 'fl=$(echo ~/$(ueberzogen)); cd \"${fl%/*}\"; case \"$fl\" in *.png|*.jpg|*.jpeg|*.webp) nsxiv \"$fl\" \"${fl%/*}\";; *.gif) mpv --loop \"$fl\";; *.mp3|*.flac|*.wav) mpv --no-vid --loop \"$fl\";; *.mp4|*.webm|*.mkv|*.avi) mpv \"$fl\";; *.html) ${BROWSER:-xdg-open} \"$fl\";; *.pdf|*.epub) zathura \"$fl\";; *.exe|*.sh) \"$fl\";; *) nvim \"$fl\";; esac; exec $SHELL'") },

dmenu Emoji Keyboard

Super (Windows key) + SHIFT + D opens a dmenu menu for selecting between emojis on '~/stuff/doc/emojis.txt' to copy to clipboard, based on their names.

{ MODKEY|ShiftMask,             XK_d,              spawn,                 SHCMD("emoji=$(cat ~/stuff/doc/emojis.txt | dmenu -p \"Select emoji to copy:\" -i) && [ -n \"$emoji\" ] && echo \"$emoji\" | awk '{print $1}' | tr -d '/\n' | xclip -selection clipboard") },

nsxiv wallpaper selector

Super (Windows key) + SHIFT + Insert opens a nsxiv window for selecting between wallpaper images on '~/stuff/img/wal'.

{ MODKEY|ShiftMask,             XK_Insert,         spawn,                 SHCMD("nsxiv -tob ~/stuff/img/wal/* | xargs -I {} sh -c 'xwallpaper --zoom \"{}\"; notify-send \"Wallpaper set to:\" \"${1##*wal}\"' _ {}") },

dmenu Bookmarks

Super (Windows key) + Insert opens a dmenu menu for selecting between links on '~/stuff/doc/bookmarks' and other files to copy to clipboard.

{ MODKEY,                       XK_Insert,         spawn,                 SHCMD("link=\"$( { cat ~/stuff/pc/html/new/links ~/stuff/pc/html/new/rice | grep -oP 'href=\"\\K[^\"]+' | sed 's#^//#https://#g'; cat ~/stuff/doc/bookmarks; } | dmenu -i -l 10)\" && [ -n \"$link\" ] && { printf \"%s\" \"$link\" | xclip -selection clipboard && notify-send \"Copied '$(echo $link | sed -e 's#https://##g' -e 's#http://##g')' to clipboard.\"; }") },

Consooming Media

Super (Windows key) + C opens a terminal window with a fzf menu for selecting between media stored at '~/stuff/media/tv'. It simply lists what's in the directory and lets you select what to play on mpv from the fzf menu.

{ MODKEY,                       XK_c,              spawn,                 SHCMD("st -t \"Select media to play\" sh -c 'cd ~/stuff/media/tv; mpv --fs --save-position-on-quit --no-pause \"$(ls | fzf)\"'") },

Reading Books

Super (Windows key) + SHIFT + C does about the same as the media keybinding but with zathura for files at '~/stuff/media/pdf'.


{ MODKEY|ShiftMask,             XK_c,              spawn,                 SHCMD("st -t \"Select book to read\" sh -c 'cd ~/stuff/media/predf; zathura \"$(ls | fzf)\"'") },


Full config.h

Some things need dwm patches to work.

dwm/config.h


slstatus config


Cmus music status

Displays the current song playing on cmus (if running) in the format: "Artist - Song Title ▢️ 0:00-0:00"

{ run_command, "%4s  ", "pgrep -x cmus > /dev/null && (cmus-remote -C status | grep -q 'tag artist' && echo \"$(cmus-remote -C status | grep -oP '(?<=tag artist ).*') - $(cmus-remote -C status | grep -oP '(?<=tag title ).*')  $(cmus-remote -Q | grep 'status ' | awk '{print $2}' | grep -q 'paused' && echo \"II \" || echo \"▢️\") $(cmus-remote -Q | awk '/preosition/ {pos=$2} /duration/ {dur=$2} END {printf \"%d:%02d-%d:%02d\\n\", pos/60, pos%60, dur/60, dur%60}')\" || echo \"$(cmus-remote -C status | grep -oP '(?<=file ).*' | sed 's|.*/||; s|\\.[^.]*$||')  $(cmus-remote -Q | grep 'status ' | awk '{print $2}' | grep -q 'paused' && echo \"II \" || echo \"▢️\") $(cmus-remote -Q | awk '/preosition/ {pos=$2} /duration/ {dur=$2} END {printf \"%d:%02d-%d:%02d\\n\", pos/60, pos%60, dur/60, dur%60}')\")" }
Old version

Uses a seperator instead of the playback status and time.

{ run_command, "%4s  ", "pgrep -x cmus > /dev/null && (cmus-remote -C status | grep -q 'tag artist' && echo \"$(cmus-remote -C status | grep -oP '(?<=tag artist ).*') - $(cmus-remote -C status | grep -oP '(?<=tag title ).*')  |\" || echo \"$(cmus-remote -C status | grep -oP '(?<=file ).*' | sed 's|.*/||; s|\\.[^.]*$||')  |\")" },

Network status from Network Manager

Displays network status as:

{ run_command, "%4s  ", "nmcli general status | grep -q -w \"connected\" && echo Online || (nmcli general status | grep -q \"connecting\" && echo ... || echo Offline)" },

Sound volume with Amixer
{ run_command, "Vol: %4s  ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },

Pacman package count
{ run_command, "Pkg:%4s  " , "pacman -Qq | wc -l"},


Full config.h

Default commented-out reference examples redacted.

slstatus/config.h

Wallpapers

I've set a randomizer on /etc/xprofile so that when I boot up Xorg, I get a randomly selected wallpaper out of this bunch. Images are hotlinked to avoid DMCA gentoomen.


Gallery

More tile-anon's tiles - Comfy tiling wallpapers. They can be applied using xwallpaper --tile.
Ratakor - The Crypt - World Playground Deceit - More wallpapers

Boomer Bing wallpapers
curl "https://www.bing.com$(curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US" | grep -oP '"url":"\K[^"]+' | sed 's/\\//g')" -o bing.png && xwallpaper --zoom bing.png && rm bing.png

Mobile Wallpapers

Termux Widget Shortcuts

Multi-Tool

~/.shortcuts/Multi-Tool
#!/bin/sh

sfl(){ fl="$(cat /storage/emulated/0/stuff/doc/files | fzf)"; { [ -z "$fl" ] && exit; }; cd "${fl%/*}" 2>/dev/null; echo "$fl"; case "$fl" in "πŸ”„ Reload") { echo "πŸ”„ Reload" > /storage/emulated/0/stuff/doc/files; find ~ /storage/emulated/0 -type f 2>/dev/null >> /storage/emulated/0/stuff/doc/files; sfl; }; ;; *.opus|*.m4a|*.webm|*.mkv|*.mp3|*.mp4|*.flac|*.ogg|*.wav) mpv --save-position-on-quit --volume-max=200 --loop --volume=130 "$fl" ;; *.png|*.jpg|*.jpeg|*.webp) termux-open "$fl" ;; *) nvim "$fl" ;; esac; }; sfl;

Directory Search

~/.shortcuts/Directory Search
#!/bin/sh

cdir(){ dir="$(cat /storage/emulated/0/stuff/doc/dirs | fzf)"; { [ -z "$dir" ] && exit; }; cd "$dir" 2>/dev/null || { echo "πŸ”„ Reload" > /storage/emulated/0/stuff/doc/dirs; find ~ /storage/emulated/0 -type d 2>/dev/null >> /storage/emulated/0/stuff/doc/dirs; cdir;} }; cdir; exec zsh

History Search
~/.shortcuts/History Search
#!/bin/sh

his=$(tac ~/.cache/zsh/history | fzf --no-sort -e | tr -d '\n'); { [ -z "$his" ] && exit; }; echo "$his" | termux-clipboard-set; exec zsh

termux-open
~/.shortcuts/termux-open
#!/bin/sh

sfl(){ fl="$(cat /storage/emulated/0/stuff/doc/files | fzf)"; { [ -z "$fl" ] && exit; }; case "$fl" in "πŸ”„ Reload") { echo "πŸ”„ Reload" > /storage/emulated/0/stuff/doc/files; find ~ /storage/emulated/0 -type f 2>/dev/null >> /storage/emulated/0/stuff/doc/files; sfl; }; ;; *) termux-open "$fl" ;; esac; }; sfl;"

Calendar
~/.shortcuts/Calendar
#!/bin/sh

cal -y
printf '%*s\n' "$(tput cols)" '' | tr ' ' '-'
cal -3
exec zsh

Quick Shortcuts

Shortcuts to programs rather than scripts.

cmus

htop

zsh



Termux config

The only thing I changed was that I uncommented this line so I could use the volume keys to change the volume while on termux.

volume-keys = volume

zsh config

The same as the desktop one shown on the rice page, except for a few directory changes and termux-clipboard-set replacing xdotool.

~/.config/zsh/.zshrc



Termux colorscheme

A port of the st colorscheme. I didn't have it when I took the screenshot on the rice page, so that's why it has the default colors there.

~/.termux/colors.properties