Skip to content

Instantly share code, notes, and snippets.

@kesor
Created November 10, 2024 14:39
Show Gist options
  • Save kesor/2298744226bae573f7e08bb807b0aa85 to your computer and use it in GitHub Desktop.
Save kesor/2298744226bae573f7e08bb807b0aa85 to your computer and use it in GitHub Desktop.
dwm keyboard cheat sheet
# Window Navigation
Mod j / k : Focus next / prev window
Mod Enter : Move to master
Mod Tab : Prev tag
# Window Management
Mod h / l : Shrink / Grow master
Mod Shift c : Close window
Mod Shift Space : Toggle float
Mod Shift f : Fullscreen
# Application Launchers
Mod p : dmenu
Mod Shift p : rofi
Mod Enter : Terminal
Mod Ctrl Enter : Calculator
Mod grave : Toggle scratch term
Mod Shift grave : Remove scratch term
Mod Ctrl grave : Set scratch term
# Layout Management
Mod t : Tiling layout
Mod f : Floating layout
Mod m : Monocle layout
Mod Space : Cycle layout
# Master Area Adjustment
Mod i / d : Add / Remove master clients
# Tag Navigation
Mod 1-9 : Switch tag
Mod Ctrl 1-9 : Toggle tag view
Mod Shift 1-9 : Move to tag
Mod Shift Ctrl 1-9 : Toggle on tag
# Monitor Focus
Alt , / . : Focus prev / next monitor
Alt Shift , / . : Move tag to monitor
# Bar Toggle
Mod b : Toggle bar
# Gap and Border Adjustments
Mod - / = : Gap - / +
Mod Shift - / = : Gap reset / toggle
Alt - / = : Border - / +
Alt Shift = : No border
#!/bin/bash
KEYBINDINGS_FILE="$(dirname "$(realpath "${0}")")"/keybindings.txt
# Check if the keybindings file exists
if [ ! -f "$KEYBINDINGS_FILE" ]; then
zenity --error --text="Keybindings file not found at $KEYBINDINGS_FILE"
exit 1
fi
export FONT_NAME="JetBrains Mono 14"
zenity --text-info \
--title="dwm keybindings" \
--filename=<(pr -o 1 -t -w 110 -2 "${KEYBINDINGS_FILE}") \
--font="$FONT_NAME" \
--width=1220 \
--height=820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment