1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-20 00:37:44 +02:00

Compare commits

..

No commits in common. "3c19fddd904dc3f5e3b63f71cf3ad05e27c3f58d" and "9dd7bc87dcf0b70dcb53b7a2459d26290907bb62" have entirely different histories.

6 changed files with 18 additions and 27 deletions

View File

@ -3,7 +3,8 @@
capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
status=$(cat /sys/class/power_supply/"$1"/status)
icon=$(echo "$status" | sed -e "s/,//;s/Discharging/^b#282828^^c#dfdfdf^  ^d^/;s/Not charging/^b#282828^^c#dfdfdf^  ^d^/;s/Charging/^b#282828^^c#dfdfdf^  ^d^/;s/Unknown/^b#282828^^c#dfdfdf^  ^d^/;s/Full/^b#282828^^c#dfdfdf^ ⚡ ^d^/;s/ 0*/ /g;s/ :/ /g")
capacity=$(echo "$capacity" | sed -e 's/$//' )
capacity=$(printf %3s $capacity | tr ' ' ' ')
echo "$icon $capacity%"
[ -z $warn ] && warn=" "
[ "$status" = "Charging" ]
printf "%s%s" "$(echo "$status" | sed -e "s/,//;s/Discharging/^b#282828^^c#dfdfdf^  ^d^/;s/Not charging/^b#282828^^c#dfdfdf^  ^d^/;s/Charging/^b#282828^^c#dfdfdf^  ^d^/;s/Unknown/^b#282828^^c#dfdfdf^  ^d^/;s/Full/^b#282828^^c#dfdfdf^ ⚡ ^d^/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/' ) "

View File

@ -1,12 +1,7 @@
#!/bin/sh
icon="^b#282828^^c#dfdfdf^  ^d^ "
if [ "$1" = "amd" ]; then
temp=$(sensors | awk '/Tctl/ {print $2}')
sensors | awk '/Tctl/ {print "^b#282828^^c#dfdfdf^  ^d^ " $2}'
elif [ "$1" = "intel" ]; then
temp=$(sensors | awk '/Package id 0/ {print $4}')
sensors | awk '/Core 0/ {print "^b#282828^^c#dfdfdf^  ^d^ " $3}'
fi
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
echo "$icon$temp°C"

View File

@ -8,4 +8,4 @@ disk="/"
icon="$disk"
printf "^b#282828^^c#dfdfdf^ 󰗮 ^d^ %s\n" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"
printf "^b#282828^^c#dfdfdf^ 󰗮 ^d^ %s %s\n" "$icon" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"

View File

@ -1,10 +1,8 @@
#!/usr/bin/env sh
#
wifipercent=" ___"
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^ -%"
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^"
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "^c#dfdfdf^ ^d^", int($3 * 100 / 70) "%" }')
[ ! -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%"
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#ff0000^  /;s/up/^b#282828^^c#dfdfdf^ 󰈀 /")" "$wifiicon"

View File

@ -1,5 +1,3 @@
#!/bin/sh
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 ' ' ' ')%"
free -h | awk '/^Mem:/ {print "^b#282828^^c#dfdfdf^  ^d^ " $3 "/" $2}'

View File

@ -3,14 +3,14 @@
vol="$(pulsemixer --get-volume | awk '{print $1}')"
if [ "$vol" -eq "0" ]; then
vol_info="^c#dfdfdf^ ^d^"
vol_info="^c#ff0000^ ^d^ $vol%"
elif [ "$vol" -gt "70" ]; then
vol_info="^c#dfdfdf^ ^d^"
vol_info="^c#dfdfdf^ ^d^ $vol%"
else
vol_info="^c#dfdfdf^ ^d^"
vol_info="^c#dfdfdf^ ^d^ $vol%"
fi
[ "$(pulsemixer --get-mute)" = "1" ] && vol_info="^c#ff0000^ ^d^"
[ "$(pulsemixer --get-mute)" = "1" ] && vol_info="^c#ff0000^ ^d^ -%"
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
mic="^b#282828^^c#dfdfdf^  "
@ -18,5 +18,4 @@ else
mic="^b#282828^^c#ff0000^  "
fi
vol=$(printf %3s $vol | tr ' ' ' ')
printf "%s %s %s %s\\n" "$mic" "$vol_info" "$vol%"
printf "%s %s %s\\n" "$mic" "$vol_info"