update scripts
This commit is contained in:
parent
dd5cfd84fa
commit
db2199c05b
18
.local/scripts/status/.0183_0_backlight
Executable file
18
.local/scripts/status/.0183_0_backlight
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DEVICE="amdgpu_bl0"
|
||||||
|
|
||||||
|
COLOR1="#FFF400"
|
||||||
|
COLOR2="#A39C00"
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -f "$FILE" ]
|
||||||
|
then
|
||||||
|
DEVICE="$(ls /sys/class/backlight/ -1 -t | head -1)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curr="$(cat /sys/class/backlight/$DEVICE/brightness)"
|
||||||
|
max="$(cat /sys/class/backlight/$DEVICE/max_brightness)"
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ $curr/$max ^d^"
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DEVICE=wlan0
|
DEVICE=wlp2s0
|
||||||
COLOR1="#FF9B00"
|
COLOR1="#FF9B00"
|
||||||
COLOR2="#A16200"
|
COLOR2="#A16200"
|
||||||
|
|
||||||
@ -16,8 +16,7 @@ done
|
|||||||
|
|
||||||
if [ $good -eq 0 ]
|
if [ $good -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Change DEVICE in ~/.local/scripts/0010_1_network"
|
echo "0010"
|
||||||
grep ":" /proc/net/dev | awk -F: '{print $1}' | sed s@\ @@g
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -47,25 +46,8 @@ TXNET_BIT=`echo $line | awk '{print $9}'`
|
|||||||
echo $RXNET_BIT > $HOME/.local/tmp/.tmp_RXNET_BIT
|
echo $RXNET_BIT > $HOME/.local/tmp/.tmp_RXNET_BIT
|
||||||
echo $TXNET_BIT > $HOME/.local/tmp/.tmp_TXNET_BIT
|
echo $TXNET_BIT > $HOME/.local/tmp/.tmp_TXNET_BIT
|
||||||
|
|
||||||
if [ $inbound -gt $((1024*1024)) ]
|
inb=$(printf "%.0f MB/s" $(echo "scale=2; $inbound / 1024 / 1024" | bc))
|
||||||
then
|
|
||||||
inb=$(printf "%.2f MB/s" $(echo "scale=2; $inbound / 1024 / 1024" | bc))
|
|
||||||
elif [ $inbound -gt 1024 ]
|
|
||||||
then
|
|
||||||
inb=$(printf "%.2f KB/s" $(echo "scale=2; $inbound / 1024" | bc))
|
|
||||||
else
|
|
||||||
inb=$(printf "%i B/s" $inbound)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $outbound -gt $((1024*1024)) ]
|
outb=$(printf "%.0f MB/s" $(echo "scale=2; $outbound / 1024 / 1024" | bc))
|
||||||
then
|
|
||||||
outb=$(printf "%.2f MB/s" $(echo "scale=2; $outbound / 1024 / 1024" | bc))
|
|
||||||
elif [ $outbound -gt 1024 ]
|
|
||||||
then
|
|
||||||
outb=$(printf "%.2f KB/s" $(echo "scale=2; $outbound / 1024" | bc))
|
|
||||||
else
|
|
||||||
outb=$(printf "%i B/s" $outbound)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
echo "^c$COLOR1^^b$COLOR2^ $inb ^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ $outb ^d^"
|
||||||
echo "^c$COLOR1^^b$COLOR2^ In: $inb ^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ Out: $outb ^d^"
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
COLOR1="#990057"
|
COLOR1="#990057"
|
||||||
COLOR2="#FF00B2"
|
COLOR2="#FF00B2"
|
||||||
|
|
||||||
usage=$(cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' | cut -d'.' -f1)"%"
|
load1="$(grep 'cpu ' /proc/stat)"
|
||||||
|
load2="$(sleep 1 && grep 'cpu ' /proc/stat)"
|
||||||
|
usage=$(echo "$load1 \n $load2" | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' | cut -d'.' -f1)"%"
|
||||||
|
|
||||||
echo "^c$COLOR1^^b$COLOR2^ ^b$COLOR1^^c$COLOR2^ $usage ^d^"
|
echo "^c$COLOR1^^b$COLOR2^ ^b$COLOR1^^c$COLOR2^ $usage ^d^"
|
||||||
|
24
.local/scripts/status/0035_1_cputemp
Executable file
24
.local/scripts/status/0035_1_cputemp
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AE8BF9"
|
||||||
|
COLOR2="#773DF5"
|
||||||
|
|
||||||
|
cputemp=$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))
|
||||||
|
|
||||||
|
if [ $cputemp -ge 90 ]
|
||||||
|
then
|
||||||
|
tempicon=""
|
||||||
|
elif [ $cputemp -ge 75 ]
|
||||||
|
then
|
||||||
|
tempicon=""
|
||||||
|
elif [ $cputemp -ge 60 ]
|
||||||
|
then
|
||||||
|
tempicon=""
|
||||||
|
elif [ $cputemp -ge 45 ]
|
||||||
|
then
|
||||||
|
tempicon=""
|
||||||
|
else
|
||||||
|
tempicon=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ $tempicon ^c$COLOR1^^b$COLOR2^ $cputemp ^d^"
|
@ -6,7 +6,7 @@ COLOR2="#005083"
|
|||||||
power=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f8)
|
power=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f8)
|
||||||
name=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f14)
|
name=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f14)
|
||||||
|
|
||||||
if [[ ! $name ]]
|
if [ ! $name ]
|
||||||
then
|
then
|
||||||
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ ^d^"
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ ^d^"
|
||||||
else
|
else
|
||||||
|
@ -1,40 +1,41 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DEVICE="BAT1"
|
DEVICE="BAT0"
|
||||||
|
|
||||||
COLOR1="#FF00F4"
|
COLOR1="#FF00F4"
|
||||||
COLOR2="#83007D"
|
COLOR2="#83007D"
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f "$FILE" ]
|
if [ ! -f "/sys/class/power_supply/$DEVICE/capacity" ]
|
||||||
then
|
then
|
||||||
DEVICE="$(ls /sys/class/power_supply/ -1 -t | head -1)"
|
echo "0185"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
batpercent="$(cat /sys/class/power_supply/$DEVICE/capacity)"
|
batpercent="$(cat /sys/class/power_supply/$DEVICE/capacity)"
|
||||||
|
|
||||||
if [[ $((batpercent + 0)) -ge 80 ]]
|
if [ $batpercent -ge 80 ]
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
elif [[ $((batpercent + 0)) -ge 60 ]]
|
elif [ $batpercent -ge 60 ]
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
elif [[ $((batpercent + 0)) -ge 40 ]]
|
elif [ $batpercent -ge 40 ]
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
elif [[ $((batpercent + 0)) -ge 20 ]]
|
elif [ $batpercent -ge 20 ]
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
else
|
else
|
||||||
icon=""
|
icon=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chrg=$(cat /sys/class/power_supply/$DEVICE/status)
|
chrg="$(cat /sys/class/power_supply/$DEVICE/status)"
|
||||||
|
|
||||||
if [[ "$chrg" == "Charging" ]]
|
if [ "$chrg" = "Charging" ]
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
elif [[ "$chrg" == "Full" ]]
|
elif [ "$chrg" = "Full" ]
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user