aboutsummaryrefslogtreecommitdiff
path: root/rofi-notmuch
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-01-24 22:39:49 +0100
committerLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-01-24 22:39:49 +0100
commit646bb0d8df0e720c966dc2992dcf7fe1154d17cf (patch)
tree533da1cc583d3bb0ee6b620f7851ba1c93948e9f /rofi-notmuch
parent97f968a30e7dc28f6d99bfbaae8a4aeefb6ad525 (diff)
downloadbin-646bb0d8df0e720c966dc2992dcf7fe1154d17cf.tar.gz
bin-646bb0d8df0e720c966dc2992dcf7fe1154d17cf.zip
added fix-sanctum.sh to fix wg on host, added rofi-notmuch to give cheatsheet
Diffstat (limited to 'rofi-notmuch')
-rwxr-xr-xrofi-notmuch26
1 files changed, 26 insertions, 0 deletions
diff --git a/rofi-notmuch b/rofi-notmuch
new file mode 100755
index 0000000..8fa5097
--- /dev/null
+++ b/rofi-notmuch
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -eu
+
+DB="$HOME/.local/share/cheat-sheets/notmuch.tsv"
+
+[ -f "$DB" ] || exit 1
+
+choice="$(
+ cat "$DB" |
+ rofi -dmenu -i -p 'Notmuch ›'
+)"
+
+[ -n "${choice:-}" ] || exit 0
+
+# First column = keystrokes
+keys="$(printf '%s' "$choice" | cut -f1)"
+
+# Clipboard (Wayland/X11)
+if command -v wl-copy >/dev/null 2>&1; then
+ printf '%s' "$keys" | wl-copy
+elif command -v xclip >/dev/null 2>&1; then
+ printf '%s' "$keys" | xclip -selection clipboard
+else
+ printf '%s\n' "$keys"
+fi
+