From 01a33ab0913d439150065ac23644c4f140ff8917 Mon Sep 17 00:00:00 2001 From: Casper Date: Mon, 23 Dec 2024 17:13:45 -0700 Subject: added qmenu! --- qmenu/qmenu_vm/f_notes | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 qmenu/qmenu_vm/f_notes (limited to 'qmenu/qmenu_vm/f_notes') diff --git a/qmenu/qmenu_vm/f_notes b/qmenu/qmenu_vm/f_notes new file mode 100644 index 0000000..ef93abd --- /dev/null +++ b/qmenu/qmenu_vm/f_notes @@ -0,0 +1,23 @@ +if [ "$(qvm-prefs "$qube" klass)" = DispVM ]; then + + notes=/tmp/."$qube".dispnotes +else + mkdir -p "$HOME"/.local/share/qubes-notes + notes="$HOME/.local/share/qubes-notes/$qube" +fi + +touch "$notes" + +note=$(dmenu-unlinked -l 25 -p "$qube:" < "$notes") + +while [ -n "$note" ]; do + + if grep -q "^$note\$" "$notes"; then + + sed -i "/^$note$/d" "$notes" + else + echo "$(date +%Y-%m-%d\ %H:%M) $note" >> "$notes" + fi + + note=$(dmenu-unlinked -l 25 -p "$qube:" < "$notes") +done -- cgit v1.2.3