From 865140ace638c58ec4407e375ba953ba76258d7a Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 3 Jun 2026 06:18:46 -0500 Subject: [PATCH] added cheat sheet script. Updated password script to have a title. Updated readme. --- README.md | 4 ++++ cheat-sheet.sh | 14 ++++++++++++++ pass-menu.sh | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 cheat-sheet.sh diff --git a/README.md b/README.md index 96bef95..cefce2b 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,7 @@ to be saved as environment variables. Pipe the password store entries into wofi to create a selectable menu. Depends on wofi, pass, and wl-clipboard. Kilpper was fighing me when clearing the clipboard so the dbus6 line was added. + +## cheat-sheet.sh +Added a script for displaying commands that I want to remember in wofi. +Selecting an entry will copy it to the clipboard if wl-clipboard is installed. diff --git a/cheat-sheet.sh b/cheat-sheet.sh new file mode 100755 index 0000000..f2add61 --- /dev/null +++ b/cheat-sheet.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +commandList="tea +git +hcloud" + +if ! command -v wofi >/dev/null 2>&1; then + echo "wofi is not installed" + exit 1 +fi +selection=$(echo "$commandList" | wofi --prompt "Cheat Sheet" --dmenu) + +[ -z "$selection" ] && echo "nothing selected" +exit 1 diff --git a/pass-menu.sh b/pass-menu.sh index ac0b624..604dab6 100755 --- a/pass-menu.sh +++ b/pass-menu.sh @@ -13,7 +13,7 @@ store="${PASSWORD_STORE_DIR:-$HOME/.password-store}" passwords="$(find "$store" -name "*.gpg" | sed -e 's|\.gpg$||' | sed -e "s|$store/||")" -selection=$(echo "$passwords" | wofi --dmenu) +selection=$(echo "$passwords" | wofi --prompt "Passwords" --dmenu) [ -z "$selection" ] && exit 0