commit 6f45972265b532365421658f1370742bb82b757b
parent 547311be5f6d90f36022a6e5e6fdbfb26862fd75
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date: Wed, 9 Feb 2022 19:50:38 +0100
Changed default notification system to herbe
Diffstat:
10 files changed, 42 insertions(+), 17 deletions(-)
diff --git 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
@@ -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
@@ -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/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
@@ -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
@@ -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/dunst-toggle b/old/dunst-toggle
diff --git 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
@@ -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
@@ -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