From aee94489315c63bf9341ca07668ef9449f87a90f Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Sat, 13 Aug 2022 18:43:04 +0530 Subject: dunst notif icon update --- .scripts/battery | 2 +- .scripts/pidkill | 2 +- .scripts/pidkillall | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to '.scripts') diff --git a/.scripts/battery b/.scripts/battery index 1f308a5..626c517 100755 --- a/.scripts/battery +++ b/.scripts/battery @@ -31,7 +31,7 @@ for battery in /sys/class/power_supply/BAT?*; do esac capacity="$(cat "$battery/capacity" 2>&1)" # Will make a warn variable if discharging and low - [ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗" + [ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗" && dunstify "Critical Battery" "Charge Immediately" -u critical -i battery-quarter # Prints the info printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn done && printf "\\n" diff --git a/.scripts/pidkill b/.scripts/pidkill index 754a610..b44dd84 100755 --- a/.scripts/pidkill +++ b/.scripts/pidkill @@ -5,5 +5,5 @@ pid=$(echo $prok | awk '{print $1}') pname=$(echo $prok | awk '{print $4}') kill -15 $pid 2>/dev/null && -[ -n $pname ] && dunstify "Terminated process Successfully" "$pname was killed" +[ -n $pname ] && dunstify "Terminated process Successfully" "$pname was killed" -i skull diff --git a/.scripts/pidkillall b/.scripts/pidkillall index 86fad3c..afbf007 100755 --- a/.scripts/pidkillall +++ b/.scripts/pidkillall @@ -4,6 +4,6 @@ psout=$(ps -u $USER -o pid,%cpu,%mem,comm | sed -n '1!p' | sort -b -k2 -r| cut - //uniq without piping into sort before with the help of awk killall $psout 2>/dev/null && -[ -n $psout ] && dunstify "Terminated all processes Successfully" "$psout was killed" +[ -n $psout ] && dunstify "Terminated all processes Successfully" "$psout was killed" -i skull -- cgit v1.2.3