diff options
| author | Lukasz Kasprzak <lukasz.kasprzak@pm.me> | 2026-01-24 22:39:49 +0100 |
|---|---|---|
| committer | Lukasz Kasprzak <lukasz.kasprzak@pm.me> | 2026-01-24 22:39:49 +0100 |
| commit | 646bb0d8df0e720c966dc2992dcf7fe1154d17cf (patch) | |
| tree | 533da1cc583d3bb0ee6b620f7851ba1c93948e9f /rofi-notmuch | |
| parent | 97f968a30e7dc28f6d99bfbaae8a4aeefb6ad525 (diff) | |
| download | bin-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-x | rofi-notmuch | 26 |
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 + |
