sway status improvements

This commit is contained in:
Rudis Muiznieks 2024-06-18 16:22:32 -05:00
parent a380a72d14
commit 051e05e02a
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 12 additions and 13 deletions

View File

@ -1,17 +1,17 @@
#!/usr/bin/env bash
c_dark="#181825"
c_sep="#313244"
c_bar="#89b4fa"
c_sep="#45475a"
c_bar="#cba6f7"
c_on="#a6e3a1"
c_off="#f38ba8"
c_icon="#6c7086"
separator="<span foreground='$c_sep'>󰄾 </span>"
c_icon="#89b4fa"
separator="<span foreground='$c_sep'></span>"
print_stat() {
icon=$1
content=$2
if [ "$icon" = "░" ]; then
icon=' '
icon=''
fi
echo -n "<span background='$c_dark' foreground='$c_bar'>$icon</span>"
printf "%3d%%" "$content"
@ -19,7 +19,7 @@ print_stat() {
print_icon() {
icon=$1
echo -n "<span foreground='$c_icon'>$icon </span>"
echo -n "<span foreground='$c_icon'>$icon</span> "
}
read -r -d '' -a cpu < <(sicli -i cpu -p0)
@ -40,21 +40,20 @@ fi
clock=$(date +'%a %b %d %H:%M')
status=$(
#echo -n "$blue $cpu $separator $blue󰘚 $ram $separator $blue $disk1 $blue$disk2 $separator "
print_icon "󰔠"
echo -n "$timew"
echo -n " $separator "
print_icon ""
print_stat "${cpu[0]}" "${cpu[1]}"
echo -n " $separator "
print_icon "󰘚"
print_icon ""
print_stat "${ram[0]}" "${ram[1]}"
echo -n " $separator "
print_icon "󰉉"
print_icon ""
print_stat "${disk1[0]}" "${disk1[1]}"
echo -n ' '
print_stat "${disk2[0]}" "${disk2[1]}"
echo -n " $separator "
print_icon "󱎫"
echo -n "$timew"
echo -n " $separator <span foreground='$c_icon'>󰥔</span> $clock"
echo -n " $separator <span foreground='$c_icon'></span> $clock $separator"
)
echo "$status"