mirror of https://github.com/tiyn/dotfiles
parent
9e6cf6dc6f
commit
b6d83978a7
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="S"
|
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
|
||||||
|
|
||||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "W", int($3 * 100 / 70) "%" }')
|
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
|
||||||
|
|
||||||
printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/X/;s/up/L/")"
|
printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ "$(pulsemixer --get-mute)" = "1" ] && printf "M\\n" && exit
|
[ "$(pulsemixer --get-mute)" = "1" ] && printf "🔇\\n" && exit
|
||||||
|
|
||||||
vol=$(pulsemixer --get-volume | awk '{print $1}')
|
vol=$(pulsemixer --get-volume | awk '{print $1}')
|
||||||
|
|
||||||
printf "%s %%\\n" "$vol"
|
if [ "$vol" -gt "70" ]; then
|
||||||
|
icon="🔊"
|
||||||
|
elif [ "$vol" -lt "30" ]; then
|
||||||
|
icon="🔈"
|
||||||
|
else
|
||||||
|
icon="🔉"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "%s %s%%\\n" "$icon" "$vol"
|
||||||
|
Loading…
Reference in new issue