diff options
author | Casper <me@skylarcloud.xyz> | 2024-12-23 17:13:45 -0700 |
---|---|---|
committer | Casper <me@skylarcloud.xyz> | 2024-12-23 17:13:45 -0700 |
commit | 01a33ab0913d439150065ac23644c4f140ff8917 (patch) | |
tree | 9ad71bd7e6f5a5aad2c2cdbff4bb75de12565998 /qmenu/qmenu_vm/f_notes | |
parent | 7b5a0e9e88f015cb68a46bb657661f4663e287af (diff) |
added qmenu!
Diffstat (limited to 'qmenu/qmenu_vm/f_notes')
-rw-r--r-- | qmenu/qmenu_vm/f_notes | 23 |
1 files changed, 23 insertions, 0 deletions
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 |