panel waybar

This commit is contained in:
2023-07-26 19:52:39 +07:00
parent cb08eb1194
commit f3e2b5c264
5 changed files with 429 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
CPUTEMP=$(cat /sys/class/hwmon/hwmon3/temp1_input)
CRITEMP=70
let "REZ=$CPUTEMP / 1000"
if [ $REZ -ge $CRITEMP ]; then
JSON_FMT='{"text":"%s","class":"%s","tooltip": "cpu"}\n'
printf "$JSON_FMT" "$REZ" "crit"
else
JSON_FMT='{"text":"%s","tooltip": "cpu"}\n'
printf "$JSON_FMT" "$REZ"
fi
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
GPUTEMP=$(cat /sys/class/hwmon/hwmon2/temp2_input)
CRITEMP=80
let "REZ=$GPUTEMP / 1000"
if [ $REZ -ge $CRITEMP ]; then
JSON_FMT='{"text":"%s","class":"%s","tooltip":"gpu"}\n'
printf "$JSON_FMT" "$REZ" "crit"
else
JSON_FMT='{"text":"%s","tooltip":"gpu"}\n'
printf "$JSON_FMT" "$REZ"
fi
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
WGIFACE=kz.totmin.ru
WGON(){
echo "VPN"
WGS='true'
}
WGOFF(){
# echo "Off"
WGS='false'
}
ifconfig $WGIFACE &>/dev/null && WGON ||WGOFF
if [ "$1" = '-toggle' ]; then
if [ "$WGS" = 'true' ]; then
sudo wg-quick down $WGIFACE &>/dev/null
else
sudo wg-quick up $WGIFACE &>/dev/null
fi
fi
exit 0