From 6f45972265b532365421658f1370742bb82b757b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 9 Feb 2022 19:50:38 +0100 Subject: Changed default notification system to herbe --- Makefile | 1 - brightness | 9 +++++++-- dmenu-unmount | 4 ++-- dunst-toggle | 14 -------------- mail-checknow | 5 +++-- notify-battery | 8 +++++++- notify-time | 8 ++++++-- old/dunst-toggle | 14 ++++++++++++++ togglemute | 8 ++++++-- volume | 9 ++++++--- xwallpaper-random-notify | 7 +++++-- 11 files changed, 56 insertions(+), 31 deletions(-) delete mode 100755 dunst-toggle create mode 100755 old/dunst-toggle diff --git a/Makefile b/Makefile index 0e62fa4..dc6edfc 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ SCRIPTS = addressgrep \ dmenu-unmount \ dmenu-urlselect \ dmenu-websearch \ - dunst-toggle \ mail-checknow \ mail-compose \ notify-battery \ diff --git a/brightness b/brightness index 46fd0a8..b2ff43a 100755 --- a/brightness +++ b/brightness @@ -1,7 +1,12 @@ #!/bin/sh # Increase / decrease brightness, and pops up a notification -# Requires: xbacklight, notify-send +# Requires: xbacklight, a notification program such as herbe or notify-send # Usage: brightness {inc|dec} n -xbacklight -$1 $2 && notify-send "Brightness: $(xbacklight | sed 's/\..*$//')%" +#notify="notify-send" +notify="herbe" + +pkill herbe # comment this too if not using herbe + +xbacklight -$1 $2 && $notify "Brightness: $(xbacklight | sed 's/\..*$//')%" diff --git a/dmenu-unmount b/dmenu-unmount index c0b387a..2c59ec4 100755 --- a/dmenu-unmount +++ b/dmenu-unmount @@ -1,10 +1,10 @@ #!/bin/sh # Prompts selection for mounted devices and unmounts the selected one -# Requires: udevil, dmenu (or similar), notify-send (optional) +# Requires: udevil, dmenu (or similar), notify-send or similar (optional) menu=${MENU:-dmenu} -writeout="notify-send" # Change this to whatever you want, e.g. echo +writeout=herbe # Change this to whatever you want, e.g. echo or notify-send listdev=$(grep "media" /proc/mounts | sed 's/\/media.*\///g' | \ awk '{print $1" ("$2")"}') diff --git a/dunst-toggle b/dunst-toggle deleted file mode 100755 index 2de2343..0000000 --- a/dunst-toggle +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Toggle "do not disturbe" mode with dunst -# Requires: dunst, notify-send - -if [ "$(dunstctl is-paused)" = "false" ]; then - notify-send -t 3000 "Notifications: OFF" "Notifications will be hidden" - sleep 3 - dunstctl set-paused true -else - dunstctl set-paused false - notify-send -t 3000 "Notifications: ON" "Notifications reactivated" -fi - diff --git a/mail-checknow b/mail-checknow index 3363173..188042b 100755 --- a/mail-checknow +++ b/mail-checknow @@ -1,10 +1,11 @@ #!/bin/sh # Check for new email, save result to file. -# Requires: mpop, notify-send +# Requires: mpop, notify-send or similar file="$XDG_DATA_HOME/newmail" -notify="notify-send" +#notify="notify-send" +notify=herbe l=$(cat "$file") n=$(mpop -s | awk '/new*./{print $2}') diff --git a/notify-battery b/notify-battery index 0d26ef4..0294b70 100755 --- a/notify-battery +++ b/notify-battery @@ -1,4 +1,10 @@ #!/bin/sh # Popup battery notification, based on the script battery-status -notify-send "Battery" "$(battery-status)" + +# Requires: notify-send or similar + +#notify=notify-send +notify=herbe + +$notify "Battery" "$(battery-status)" diff --git a/notify-time b/notify-time index 1173bf0..39bc805 100755 --- a/notify-time +++ b/notify-time @@ -1,9 +1,13 @@ #!/bin/sh # Little notification to show time and date -# Requirements: notify-send + +# Requires: notify-send or similar + +#notify=notify-send +notify=herbe t=$(date +"%H:%M:%S") d=$(date +"%d\ %B\ %Y,\ %A") -notify-send "$t" "$d" +$notify "$t" "$d" diff --git a/old/dunst-toggle b/old/dunst-toggle new file mode 100755 index 0000000..2de2343 --- /dev/null +++ b/old/dunst-toggle @@ -0,0 +1,14 @@ +#!/bin/sh + +# Toggle "do not disturbe" mode with dunst +# Requires: dunst, notify-send + +if [ "$(dunstctl is-paused)" = "false" ]; then + notify-send -t 3000 "Notifications: OFF" "Notifications will be hidden" + sleep 3 + dunstctl set-paused true +else + dunstctl set-paused false + notify-send -t 3000 "Notifications: ON" "Notifications reactivated" +fi + diff --git a/togglemute b/togglemute index d952676..b799b02 100755 --- a/togglemute +++ b/togglemute @@ -1,7 +1,10 @@ #!/bin/sh # Toggle mute state and notify -# Requires: pulsemixer, notify-send +# Requires: pulsemixer, notify-send or similar + +#notify=notify-send +notify=herbe ismute=$(pulsemixer --toggle-mute --get-mute) @@ -11,4 +14,5 @@ else m="unmuted" fi -notify-send "Audio $m" +pkill herbe # comment this line too if not using herbe +$notify "Audio $m" diff --git a/volume b/volume index 6852577..8dcd36a 100755 --- a/volume +++ b/volume @@ -2,9 +2,12 @@ # Change volume and notify # Usage: volume {+n|-n} -# Requires: pulsemixer, notify-send +# Requires: pulsemixer, notify-send or similar -#TODO: use this to replace myvolumeup/myvolumedown +#notify=notify-send +notify=herbe newvol=$(pulsemixer --change-volume "$1" --get-volume | awk '{print $1}') -notify-send "Volume" "$newvol%" + +pkill herbe # comment this line too if not using herbe +$notify "Volume" "$newvol%" diff --git a/xwallpaper-random-notify b/xwallpaper-random-notify index d0d1fbe..ac1898d 100755 --- a/xwallpaper-random-notify +++ b/xwallpaper-random-notify @@ -1,7 +1,10 @@ #!/bin/sh # Set a random background from the wallpapers folder and notify about it -# Requires: xwallpaper (or feh), notify-send (optional) +# Requires: xwallpaper (or feh), notify-send or similar (optional) + +#notify=notify-send +notify=herbe folder=~/Pictures/wallpapers pic=$(ls $folder | sort -R | head -1) @@ -10,4 +13,4 @@ pic=$(ls $folder | sort -R | head -1) #feh --bg-fill --no-fehbg $folder/$pic xwallpaper --zoom $folder/$pic -notify-send "Background of the day" $pic +$notify "Background of the day" $pic -- cgit v1.3