mirror of https://github.com/tiyn/dotfiles
parent
256be15c0f
commit
0c6942bb7d
@ -1,7 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
icon="^b#282828^^c#dfdfdf^ ^d^ "
|
||||
|
||||
if [ "$1" = "amd" ]; then
|
||||
sensors | awk '/Tctl/ {print "^b#282828^^c#dfdfdf^ ^d^ " $2}'
|
||||
temp=$(sensors | awk '/Tctl/ {print $2}')
|
||||
elif [ "$1" = "intel" ]; then
|
||||
sensors | awk '/Core 0/ {print "^b#282828^^c#dfdfdf^ ^d^ " $3}'
|
||||
temp=$(sensors | awk '/Tctl/ {print $3}')
|
||||
fi
|
||||
|
||||
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
|
||||
echo "$icon$temp°C"
|
||||
|
@ -1,8 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^ -%"
|
||||
wifipercent=" ___"
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "^c#dfdfdf^ ^d^", int($3 * 100 / 70) "%" }')
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^"
|
||||
|
||||
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#ff0000^ /;s/up/^b#282828^^c#dfdfdf^ /")" "$wifiicon"
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon="^c#dfdfdf^ ^d^" && wifipercent=$(grep "^\s*w" /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
|
||||
|
||||
wifipercent=$(printf %3s $wifipercent | tr ' ' ' ')
|
||||
echo "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#ff0000^ /;s/up/^b#282828^^c#dfdfdf^ /")" "$wifiicon" "$wifipercent%"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
free -h | awk '/^Mem:/ {print "^b#282828^^c#dfdfdf^ ^d^ " $3 "/" $2}'
|
||||
icon="^b#282828^^c#dfdfdf^ ^d^ "
|
||||
total=$(free -h | awk '/^Mem:/ {print $3/$2}')
|
||||
echo "$icon$(printf %3s $(echo ${total##*0.} | cut -c1-2) | tr ' ' ' ')%"
|
||||
|
Loading…
Reference in new issue