sway status improvements
This commit is contained in:
parent
a380a72d14
commit
051e05e02a
|
@ -1,17 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
c_dark="#181825"
|
c_dark="#181825"
|
||||||
c_sep="#313244"
|
c_sep="#45475a"
|
||||||
c_bar="#89b4fa"
|
c_bar="#cba6f7"
|
||||||
c_on="#a6e3a1"
|
c_on="#a6e3a1"
|
||||||
c_off="#f38ba8"
|
c_off="#f38ba8"
|
||||||
c_icon="#6c7086"
|
c_icon="#89b4fa"
|
||||||
separator="<span foreground='$c_sep'> </span>"
|
separator="<span foreground='$c_sep'></span>"
|
||||||
|
|
||||||
print_stat() {
|
print_stat() {
|
||||||
icon=$1
|
icon=$1
|
||||||
content=$2
|
content=$2
|
||||||
if [ "$icon" = "░" ]; then
|
if [ "$icon" = "░" ]; then
|
||||||
icon=' '
|
icon='▁'
|
||||||
fi
|
fi
|
||||||
echo -n "<span background='$c_dark' foreground='$c_bar'>$icon</span>"
|
echo -n "<span background='$c_dark' foreground='$c_bar'>$icon</span>"
|
||||||
printf "%3d%%" "$content"
|
printf "%3d%%" "$content"
|
||||||
|
@ -40,21 +40,20 @@ fi
|
||||||
clock=$(date +'%a %b %d %H:%M')
|
clock=$(date +'%a %b %d %H:%M')
|
||||||
|
|
||||||
status=$(
|
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_icon ""
|
||||||
print_stat "${cpu[0]}" "${cpu[1]}"
|
print_stat "${cpu[0]}" "${cpu[1]}"
|
||||||
echo -n " $separator "
|
echo -n " $separator "
|
||||||
print_icon ""
|
print_icon ""
|
||||||
print_stat "${ram[0]}" "${ram[1]}"
|
print_stat "${ram[0]}" "${ram[1]}"
|
||||||
echo -n " $separator "
|
echo -n " $separator "
|
||||||
print_icon ""
|
print_icon ""
|
||||||
print_stat "${disk1[0]}" "${disk1[1]}"
|
print_stat "${disk1[0]}" "${disk1[1]}"
|
||||||
echo -n ' '
|
echo -n ' '
|
||||||
print_stat "${disk2[0]}" "${disk2[1]}"
|
print_stat "${disk2[0]}" "${disk2[1]}"
|
||||||
echo -n " $separator "
|
echo -n " $separator <span foreground='$c_icon'></span> $clock $separator"
|
||||||
print_icon ""
|
|
||||||
echo -n "$timew"
|
|
||||||
echo -n " $separator <span foreground='$c_icon'></span> $clock"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "$status"
|
echo "$status"
|
||||||
|
|
Loading…
Reference in New Issue