diff options
| author | Mitsuo Tokumori <mitsuo@tokumori.xyz> | 2025-12-30 01:17:10 +0900 |
|---|---|---|
| committer | Mitsuo Tokumori <mitsuo@tokumori.xyz> | 2025-12-30 01:17:10 +0900 |
| commit | 897ffe7b3ba43fee0c4418148a185d1cbb7d6425 (patch) | |
| tree | 9d5fca789746ebb9b8a99902b7aa66b0f6bde2c5 /public/.local/bin/dmenu-openbook.sh | |
| parent | d0a3fa2ddd2843a55cce25d29fe61daf27ef1d38 (diff) | |
QoL small changes
Diffstat (limited to 'public/.local/bin/dmenu-openbook.sh')
| -rwxr-xr-x | public/.local/bin/dmenu-openbook.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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 |
