Skip to content

Instantly share code, notes, and snippets.

@antlis
Last active September 12, 2026 21:29
Show Gist options
  • Select an option

  • Save antlis/d3d5e46e52cee4ac7c23e2ad0bc89725 to your computer and use it in GitHub Desktop.

Select an option

Save antlis/d3d5e46e52cee4ac7c23e2ad0bc89725 to your computer and use it in GitHub Desktop.
rofi-keybindings — picker that opens a keybinding cheatsheet (i3 / AyuGram). See https://antlis.is-a.dev/blog/rofi-cheatsheets
#!/usr/bin/env bash
# Universal keybindings cheatsheet launcher
# Select which keybindings to view, then browse & optionally execute them.
#
# Mirrored as a public gist (embedded in the write-up) — if you edit this file,
# update the gist too: https://gist.github.com/antlis/d3d5e46e52cee4ac7c23e2ad0bc89725
# Article: https://antlis.is-a.dev/blog/rofi-cheatsheets
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
labels=(
"i3"
"AyuGram"
"mpv"
"Discord"
)
selected=$(printf '%s\n' "${labels[@]}" | rofi \
-dmenu -i -p 'Keybindings' \
-mesg 'Select a cheatsheet to view')
[[ -z "$selected" ]] && exit 0
case "$selected" in
i3) exec "${SCRIPT_DIR}/rofi-i3-cheatsheet" ;;
AyuGram) exec "${SCRIPT_DIR}/rofi-ayugram-keybindings" ;;
mpv) exec "${SCRIPT_DIR}/rofi-mpv-keybindings" ;;
Discord) exec "${SCRIPT_DIR}/rofi-discord-keybindings" ;;
*) notify-send "keybindings" "Unknown: $selected"; exit 1 ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment