diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2022-02-09 19:50:38 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2022-02-09 19:50:38 +0100 |
| commit | 6f45972265b532365421658f1370742bb82b757b (patch) | |
| tree | c293262456ba35ae5c1b778684527ed5c70c7ad1 | |
| parent | 547311be5f6d90f36022a6e5e6fdbfb26862fd75 (diff) | |
| download | scripts-6f45972265b532365421658f1370742bb82b757b.tar.gz scripts-6f45972265b532365421658f1370742bb82b757b.zip | |
Changed default notification system to herbe
| -rw-r--r-- | Makefile | 1 | ||||
| -rwxr-xr-x | brightness | 9 | ||||
| -rwxr-xr-x | dmenu-unmount | 4 | ||||
| -rwxr-xr-x | mail-checknow | 5 | ||||
| -rwxr-xr-x | notify-battery | 8 | ||||
| -rwxr-xr-x | notify-time | 8 | ||||
| -rwxr-xr-x | old/dunst-toggle (renamed from dunst-toggle) | 0 | ||||
| -rwxr-xr-x | togglemute | 8 | ||||
| -rwxr-xr-x | volume | 9 | ||||
| -rwxr-xr-x | xwallpaper-random-notify | 7 |
10 files changed, 42 insertions, 17 deletions
| @@ -12,7 +12,6 @@ SCRIPTS = addressgrep \ | |||
| 12 | dmenu-unmount \ | 12 | dmenu-unmount \ |
| 13 | dmenu-urlselect \ | 13 | dmenu-urlselect \ |
| 14 | dmenu-websearch \ | 14 | dmenu-websearch \ |
| 15 | dunst-toggle \ | ||
| 16 | mail-checknow \ | 15 | mail-checknow \ |
| 17 | mail-compose \ | 16 | mail-compose \ |
| 18 | notify-battery \ | 17 | notify-battery \ |
| @@ -1,7 +1,12 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Increase / decrease brightness, and pops up a notification | 3 | # Increase / decrease brightness, and pops up a notification |
| 4 | # Requires: xbacklight, notify-send | 4 | # Requires: xbacklight, a notification program such as herbe or notify-send |
| 5 | # Usage: brightness {inc|dec} n | 5 | # Usage: brightness {inc|dec} n |
| 6 | 6 | ||
| 7 | xbacklight -$1 $2 && notify-send "Brightness: $(xbacklight | sed 's/\..*$//')%" | 7 | #notify="notify-send" |
| 8 | notify="herbe" | ||
| 9 | |||
| 10 | pkill herbe # comment this too if not using herbe | ||
| 11 | |||
| 12 | 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 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Prompts selection for mounted devices and unmounts the selected one | 3 | # Prompts selection for mounted devices and unmounts the selected one |
| 4 | # Requires: udevil, dmenu (or similar), notify-send (optional) | 4 | # Requires: udevil, dmenu (or similar), notify-send or similar (optional) |
| 5 | 5 | ||
| 6 | menu=${MENU:-dmenu} | 6 | menu=${MENU:-dmenu} |
| 7 | writeout="notify-send" # Change this to whatever you want, e.g. echo | 7 | writeout=herbe # Change this to whatever you want, e.g. echo or notify-send |
| 8 | 8 | ||
| 9 | listdev=$(grep "media" /proc/mounts | sed 's/\/media.*\///g' | \ | 9 | listdev=$(grep "media" /proc/mounts | sed 's/\/media.*\///g' | \ |
| 10 | awk '{print $1" ("$2")"}') | 10 | awk '{print $1" ("$2")"}') |
diff --git a/mail-checknow b/mail-checknow index 3363173..188042b 100755 --- a/mail-checknow +++ b/mail-checknow | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Check for new email, save result to file. | 3 | # Check for new email, save result to file. |
| 4 | # Requires: mpop, notify-send | 4 | # Requires: mpop, notify-send or similar |
| 5 | 5 | ||
| 6 | file="$XDG_DATA_HOME/newmail" | 6 | file="$XDG_DATA_HOME/newmail" |
| 7 | notify="notify-send" | 7 | #notify="notify-send" |
| 8 | notify=herbe | ||
| 8 | 9 | ||
| 9 | l=$(cat "$file") | 10 | l=$(cat "$file") |
| 10 | n=$(mpop -s | awk '/new*./{print $2}') | 11 | 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 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Popup battery notification, based on the script battery-status | 3 | # Popup battery notification, based on the script battery-status |
| 4 | notify-send "Battery" "$(battery-status)" | 4 | |
| 5 | # Requires: notify-send or similar | ||
| 6 | |||
| 7 | #notify=notify-send | ||
| 8 | notify=herbe | ||
| 9 | |||
| 10 | $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 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Little notification to show time and date | 3 | # Little notification to show time and date |
| 4 | # Requirements: notify-send | 4 | |
| 5 | # Requires: notify-send or similar | ||
| 6 | |||
| 7 | #notify=notify-send | ||
| 8 | notify=herbe | ||
| 5 | 9 | ||
| 6 | t=$(date +"%H:%M:%S") | 10 | t=$(date +"%H:%M:%S") |
| 7 | d=$(date +"%d\ %B\ %Y,\ %A") | 11 | d=$(date +"%d\ %B\ %Y,\ %A") |
| 8 | 12 | ||
| 9 | notify-send "$t" "$d" | 13 | $notify "$t" "$d" |
diff --git a/dunst-toggle b/old/dunst-toggle index 2de2343..2de2343 100755 --- a/dunst-toggle +++ b/old/dunst-toggle | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Toggle mute state and notify | 3 | # Toggle mute state and notify |
| 4 | # Requires: pulsemixer, notify-send | 4 | # Requires: pulsemixer, notify-send or similar |
| 5 | |||
| 6 | #notify=notify-send | ||
| 7 | notify=herbe | ||
| 5 | 8 | ||
| 6 | ismute=$(pulsemixer --toggle-mute --get-mute) | 9 | ismute=$(pulsemixer --toggle-mute --get-mute) |
| 7 | 10 | ||
| @@ -11,4 +14,5 @@ else | |||
| 11 | m="unmuted" | 14 | m="unmuted" |
| 12 | fi | 15 | fi |
| 13 | 16 | ||
| 14 | notify-send "Audio $m" | 17 | pkill herbe # comment this line too if not using herbe |
| 18 | $notify "Audio $m" | ||
| @@ -2,9 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | # Change volume and notify | 3 | # Change volume and notify |
| 4 | # Usage: volume {+n|-n} | 4 | # Usage: volume {+n|-n} |
| 5 | # Requires: pulsemixer, notify-send | 5 | # Requires: pulsemixer, notify-send or similar |
| 6 | 6 | ||
| 7 | #TODO: use this to replace myvolumeup/myvolumedown | 7 | #notify=notify-send |
| 8 | notify=herbe | ||
| 8 | 9 | ||
| 9 | newvol=$(pulsemixer --change-volume "$1" --get-volume | awk '{print $1}') | 10 | newvol=$(pulsemixer --change-volume "$1" --get-volume | awk '{print $1}') |
| 10 | notify-send "Volume" "$newvol%" | 11 | |
| 12 | pkill herbe # comment this line too if not using herbe | ||
| 13 | $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 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Set a random background from the wallpapers folder and notify about it | 3 | # Set a random background from the wallpapers folder and notify about it |
| 4 | # Requires: xwallpaper (or feh), notify-send (optional) | 4 | # Requires: xwallpaper (or feh), notify-send or similar (optional) |
| 5 | |||
| 6 | #notify=notify-send | ||
| 7 | notify=herbe | ||
| 5 | 8 | ||
| 6 | folder=~/Pictures/wallpapers | 9 | folder=~/Pictures/wallpapers |
| 7 | pic=$(ls $folder | sort -R | head -1) | 10 | pic=$(ls $folder | sort -R | head -1) |
| @@ -10,4 +13,4 @@ pic=$(ls $folder | sort -R | head -1) | |||
| 10 | #feh --bg-fill --no-fehbg $folder/$pic | 13 | #feh --bg-fill --no-fehbg $folder/$pic |
| 11 | xwallpaper --zoom $folder/$pic | 14 | xwallpaper --zoom $folder/$pic |
| 12 | 15 | ||
| 13 | notify-send "Background of the day" $pic | 16 | $notify "Background of the day" $pic |
