Nicer usage of dunst

This commit is contained in:
Phuntsok Drak-pa 2019-10-08 17:28:34 +02:00
parent b81ed80698
commit 6bc42fb451
3 changed files with 10 additions and 10 deletions

View File

@ -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.

View File

@ -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"

View File

@ -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'