aboutsummaryrefslogtreecommitdiff
path: root/rofi-task-names
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-02-17 16:20:40 +0100
committerLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-02-17 16:20:40 +0100
commitc74163f1ecbd809c83bb465ee89fa04369a89972 (patch)
treec1a52692a47566652d7f2a9a8eceb9f1839991b7 /rofi-task-names
parent70e6d80c2d367480478eacf46363ee88a0e994ff (diff)
downloadbin-c74163f1ecbd809c83bb465ee89fa04369a89972.tar.gz
bin-c74163f1ecbd809c83bb465ee89fa04369a89972.zip
cleaned up names and dir
Diffstat (limited to 'rofi-task-names')
-rwxr-xr-xrofi-task-names26
1 files changed, 26 insertions, 0 deletions
diff --git a/rofi-task-names b/rofi-task-names
new file mode 100755
index 0000000..965bb93
--- /dev/null
+++ b/rofi-task-names
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -eu
+
+DB="$HOME/.local/share/cheat-sheets/task-tags.tsv"
+
+[ -f "$DB" ] || exit 1
+
+choice="$(
+ cat "$DB" |
+ rofi -dmenu -i -p 'Naming conventions ›'
+)"
+
+[ -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
+