From 897ffe7b3ba43fee0c4418148a185d1cbb7d6425 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Tue, 30 Dec 2025 01:17:10 +0900 Subject: QoL small changes --- public/.local/bin/dmenu-openbook.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'public/.local/bin/dmenu-openbook.sh') diff --git a/public/.local/bin/dmenu-openbook.sh b/public/.local/bin/dmenu-openbook.sh index 6a257c7..e5766d5 100755 --- a/public/.local/bin/dmenu-openbook.sh +++ b/public/.local/bin/dmenu-openbook.sh @@ -1,5 +1,10 @@ #!/bin/bash # xdg-open a file selected through dmenu +# TODO: merge dmenu-open* into dmenu-open.sh, call it with 1 argument: +# `dmenu-open.sh books|spreadsheet` +# `dmenu-open.sh` with no arguments opens a preliminary dmenu to select +# the category (base directory) from a list. Each category is defined by +# a path and white-listed file extensions. path="$HOME/docs/books" @@ -13,6 +18,6 @@ cd $path files=$(find . -type f \( -iname "*.pdf" -o -iname "*.epub" \)) selected=$(echo "$files" | dmenu -i -l 20 -p "Select book:") if [ -n "$selected" ]; then - xdg-open "$selected" + xdg-open "$selected" & notify fi -- cgit v1.2.3