bar
This commit is contained in:
parent
76d4d5c21e
commit
ee2d2fb015
1 changed files with 11 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
shopt -s extglob
|
||||
|
||||
hc() {
|
||||
# t="$EPOCHREALTIME"
|
||||
|
@ -94,7 +95,7 @@ hc --idle | {
|
|||
done
|
||||
|
||||
#bordercolor="#26221C"
|
||||
separator="%{B-}%{F-}|"
|
||||
separator="%{B-}%{F-}| "
|
||||
#separator="%{B$selbg} %{B-}%{F-}"
|
||||
#right=
|
||||
#for st in playing volume wifi temperature load date
|
||||
|
@ -117,7 +118,7 @@ hc --idle | {
|
|||
### center
|
||||
#echo -n "%{c}%{U${colors[bright_orange]}}${windowtitle:0:150}%{U-}"
|
||||
### print the right
|
||||
res+="%{r}$memory $df $playing $separator $volume $separator $wifi $separator $network $separator $temperature $separator $load $separator $date $separator %{U#f2f229}$charge%{U-} $separator"
|
||||
res+="%{r}$memory$df$playing$volume$wifi$network$temperature$load$separator$date$separator%{U#f2f229}$charge%{U-}$separator"
|
||||
#echo -en "%{r}$right $separator %{U#f2f229}$charge%{U-} $separator"
|
||||
done
|
||||
|
||||
|
@ -183,6 +184,7 @@ hc --idle | {
|
|||
;;
|
||||
esac
|
||||
playing="$play_sym$play_line"
|
||||
[[ -n "$playing" ]] && playing+=" $separator"
|
||||
fi
|
||||
|
||||
# [[ "${player_status[${cmd[1]}]}" != "${cmd[2]}" ]] &&
|
||||
|
@ -251,24 +253,24 @@ hc --idle | {
|
|||
fi
|
||||
;;
|
||||
temperature)
|
||||
temperature=" ${cmd[1]}°C"
|
||||
temperature=" ${cmd[1]}°C $separator"
|
||||
;;
|
||||
wifi)
|
||||
_wifi_net="${cmd[1]}"
|
||||
if [[ -n "$_wifi_net" ]]
|
||||
then
|
||||
_wifi_sym=直
|
||||
_wifi_sym=
|
||||
else
|
||||
_wifi_sym=睊
|
||||
_wifi_sym=
|
||||
fi
|
||||
wifi="$(xargs <<<"$_wifi_sym $_wifi_net")"
|
||||
wifi="$(xargs <<<"$_wifi_sym $_wifi_net $separator")"
|
||||
;;
|
||||
|
||||
network)
|
||||
_net_status="${cmd[1]}"
|
||||
if [[ "$_net_status" == 'UP' ]]
|
||||
then
|
||||
network="$(xargs <<<"ﯱ ${cmd[2]}")"
|
||||
network="$(xargs <<<" ${cmd[2]}")"
|
||||
else
|
||||
network=
|
||||
fi
|
||||
|
@ -281,9 +283,9 @@ hc --idle | {
|
|||
|
||||
if [[ "$mute" == yes ]]
|
||||
then
|
||||
volume=""
|
||||
volume=" $separator"
|
||||
else
|
||||
volume=" ${cmd[1]}"
|
||||
volume=" ${cmd[1]} $separator"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Reference in a new issue