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-opentable.sh | |
| parent | d0a3fa2ddd2843a55cce25d29fe61daf27ef1d38 (diff) | |
QoL small changes
Diffstat (limited to 'public/.local/bin/dmenu-opentable.sh')
| -rwxr-xr-x | public/.local/bin/dmenu-opentable.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/public/.local/bin/dmenu-opentable.sh b/public/.local/bin/dmenu-opentable.sh index 69786bb..229efff 100755 --- a/public/.local/bin/dmenu-opentable.sh +++ b/public/.local/bin/dmenu-opentable.sh @@ -1,7 +1,14 @@ #!/bin/bash # xdg-open a file selected through dmenu +notify() { + mimetype=$(xdg-mime query filetype "$DIR/$FILE") + defaultprogram=$(xdg-mime query default "$mimetype") + notify-send "Opening $FILE ($mimetype) with $defaultprogram" +} + DIR="$HOME/docs/spreadsheet" FILE=$(ls "$DIR" | dmenu -i -l 10 -p "Select spreadsheet:") [ -z "$FILE" ] && exit 1 +notify xdg-open "$DIR/$FILE" |
