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-opentable.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'public/.local/bin/dmenu-opentable.sh') 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" -- cgit v1.2.3