From 6bc42fb451df0ae5634b38841186444dbee08b50 Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Tue, 8 Oct 2019 17:28:34 +0200 Subject: [PATCH] Nicer usage of dunst --- .config/dunst/dunstrc | 6 +++--- .local/bin/dmount | 6 +++--- .local/bin/dumount | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 27d4005..ccfc14b 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -236,9 +236,9 @@ # invoke it. If there are multiple and no default, open the context menu. # * close_current: Close current notification. # * close_all: Close all notifications. - mouse_left_click = close_current - mouse_middle_click = do_action - mouse_right_click = close_all + mouse_left_click = do_current + mouse_middle_click = close_all + mouse_right_click = close_current # Experimental features that may or may not work correctly. Do not expect them # to have a consistent behaviour across releases. diff --git a/.local/bin/dmount b/.local/bin/dmount index 525f7b0..a259b88 100755 --- a/.local/bin/dmount +++ b/.local/bin/dmount @@ -66,13 +66,13 @@ function mountandroid -d "Mount an Android device" echo $newchosen sudo -A umount $mp jmtpfs -device=$newchosen $mp - notify-send "🤖 Android Mounting" "Android device mounted to $mp." + notify-send -a "dmount" "🤖 Android Mounting" "Android device mounted to $mp." end function mountcd set chosen (echo $cddrives) getmount "$HOME -maxdepth 3 -type d" - sudo -A mount $chosen $mp && notify-send "💿 CD mounting" "$chosen mounted." && exit 0 + sudo -A mount $chosen $mp && notify-send -a "dmount" "💿 CD mounting" "$chosen mounted." && exit 0 end function asktype @@ -89,7 +89,7 @@ end switch (wc -l < /tmp/drives) case 0 - notify-send "No USB drive or Android device or CD detected" + notify-send "No USB drive or Android device or CD detected" -a "dmount" case 1 switch (cat /tmp/drives) case "USB" diff --git a/.local/bin/dumount b/.local/bin/dumount index 3a30b43..4a09d41 100755 --- a/.local/bin/dumount +++ b/.local/bin/dumount @@ -20,19 +20,19 @@ function unmountusb test -z "$drives" && rm $undrivefile && return 0 set chosen (echo $drives | rofi -dmenu -i -p "Unmount which drive?" | awk '{print $1}') test -z "$chosen" && rm $undrivefile && return 0 - sudo -A umount $chosen && notify-send "💻 USB unmounting" "$chosen unmounted." + sudo -A umount $chosen && notify-send "💻 USB unmounting" "$chosen unmounted." -a "dumount" end function unmountandroid set chosen (echo $androids | rofi -dmenu -i -p "Unmount which device?") test -z "$chosen" && rm $undrivefile && return 0 - sudo -A umount -l $chosen && notify-send "🤖 Android unmounting" "$chosen unmounted." + sudo -A umount -l $chosen && notify-send "🤖 Android unmounting" "$chosen unmounted." -a "dumount" end function unmountcd set chosen (echo "$cds" | rofi -dmenu -i -p "Unmount which CD?") test -z "$chosen" && rm $undrivefile && return 0 - sudo -A umount -l $chosen && notify-send "💿 CD unmounting" "$chosen unmounted." + sudo -A umount -l $chosen && notify-send "💿 CD unmounting" "$chosen unmounted." -a "dumount" end function asktype @@ -48,7 +48,7 @@ end switch (wc -l < $undrivefile) case 0 - notify-send "No USB drive or Android device or CD to unmount" + notify-send "No USB drive or Android device or CD to unmount" -a "dumount" case 1 switch (cat $undrivefile) case 'USB'