diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-11-08 14:29:30 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-11-08 14:29:30 +0530 |
commit | b4a904bfd4d41bf591181d95166cb8270ca661bc (patch) | |
tree | dddd142cf8bee8be278f551c05533884f9329649 | |
parent | f9b768d95b526c730018f4f4d3635e779faedbf7 (diff) |
added scripts to pause and unpause popup notifications
-rwxr-xr-x | scripts/brightness_indicator_deadd | 14 | ||||
-rwxr-xr-x | scripts/dnd-off | 4 | ||||
-rwxr-xr-x | scripts/dnd-on | 4 | ||||
-rwxr-xr-x | scripts/launch-lemonbar | 4 | ||||
-rwxr-xr-x | scripts/volume_indicator_deadd | 35 |
5 files changed, 59 insertions, 2 deletions
diff --git a/scripts/brightness_indicator_deadd b/scripts/brightness_indicator_deadd new file mode 100755 index 00000000..9ee4fb2d --- /dev/null +++ b/scripts/brightness_indicator_deadd @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ "$1" == "inc" ]; then + xbacklight -inc 5 +fi + +if [ "$1" == "dec" ]; then + xbacklight -lower 5 +fi + +BRIGHTNESS=$(xbacklight -get) +NOTI_ID=$(notify-send.py "Bildschirmhelligkeit" "$BRIGHTNESS/100" \ + --hint string:image-path:video-display boolean:transient:true \ + --replaces-process "brightness-popup") diff --git a/scripts/dnd-off b/scripts/dnd-off new file mode 100755 index 00000000..5844f391 --- /dev/null +++ b/scripts/dnd-off @@ -0,0 +1,4 @@ +#!/bin/zsh + +notify-send.py a --hint boolean:deadd-notification-center:true \ + string:type:unpausePopups diff --git a/scripts/dnd-on b/scripts/dnd-on new file mode 100755 index 00000000..0a125013 --- /dev/null +++ b/scripts/dnd-on @@ -0,0 +1,4 @@ +#!/bin/zsh + +notify-send.py a --hint boolean:deadd-notification-center:true \ + string:type:pausePopups diff --git a/scripts/launch-lemonbar b/scripts/launch-lemonbar index 19488304..3ee28cbe 100755 --- a/scripts/launch-lemonbar +++ b/scripts/launch-lemonbar @@ -8,8 +8,8 @@ cd /home/zt/.config/lemonbar -./mainbar | lemonbar -g 1366x21 -B '#171520' -p -F '#ffffff' -f "Source Han Sans JP:size=10" -o -3 -f "RobotoMono Nerd Font:style=Regular:size=15" -f -n "mainbar" -o 0 | ./button-actions +./ws_bar | lemonbar -g 1366x21 -b -B '#171520' -p -F '#ffffff' -f "Source Han Sans JP:size=10" -o -3 -f "RobotoMono Nerd Font:style=Regular:size=15" -f -n "mainbar" -o 0 | ./ws_button_actions -echo "lemonbar launched" +notify-send "Lemonbar" "Bar(s) crashed/killed" exit diff --git a/scripts/volume_indicator_deadd b/scripts/volume_indicator_deadd new file mode 100755 index 00000000..3f23df24 --- /dev/null +++ b/scripts/volume_indicator_deadd @@ -0,0 +1,35 @@ +#!/bin/bash + +if [ "$1" == "inc" ]; then + amixer -q sset Master 5%+ +fi + +if [ "$1" == "dec" ]; then + amixer -q sset Master 5%- +fi + +if [ "$1" == "mute" ]; then + amixer -q sset Master toggle +fi + + +AMIXER=$(amixer sget Master) +VOLUME=$(echo $AMIXER | grep 'Right:' | awk -F'[][]' '{ print $2 }' | tr -d "%") +MUTE=$(echo $AMIXER | grep -o '\[off\]' | tail -n 1) +if [ "$VOLUME" -le 20 ]; then + ICON=audio-volume-low +else if [ "$VOLUME" -le 60 ]; then + ICON=audio-volume-medium + else + ICON=audio-volume-high + fi +fi +if [ "$MUTE" == "[off]" ]; then + ICON=audio-volume-muted +fi + + + +NOTI_ID=$(notify-send.py "Lautstärke" "$VOLUME/100" \ + --hint string:image-path:$ICON boolean:transient:true \ + --replaces-process "volume-popup") |