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
|
#!/bin/bash
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
hc() {
|
hc() {
|
||||||
# t="$EPOCHREALTIME"
|
# t="$EPOCHREALTIME"
|
||||||
|
@ -117,7 +118,7 @@ hc --idle | {
|
||||||
### center
|
### center
|
||||||
#echo -n "%{c}%{U${colors[bright_orange]}}${windowtitle:0:150}%{U-}"
|
#echo -n "%{c}%{U${colors[bright_orange]}}${windowtitle:0:150}%{U-}"
|
||||||
### print the right
|
### 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"
|
#echo -en "%{r}$right $separator %{U#f2f229}$charge%{U-} $separator"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -183,6 +184,7 @@ hc --idle | {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
playing="$play_sym$play_line"
|
playing="$play_sym$play_line"
|
||||||
|
[[ -n "$playing" ]] && playing+=" $separator"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# [[ "${player_status[${cmd[1]}]}" != "${cmd[2]}" ]] &&
|
# [[ "${player_status[${cmd[1]}]}" != "${cmd[2]}" ]] &&
|
||||||
|
@ -251,24 +253,24 @@ hc --idle | {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
temperature)
|
temperature)
|
||||||
temperature=" ${cmd[1]}°C"
|
temperature=" ${cmd[1]}°C $separator"
|
||||||
;;
|
;;
|
||||||
wifi)
|
wifi)
|
||||||
_wifi_net="${cmd[1]}"
|
_wifi_net="${cmd[1]}"
|
||||||
if [[ -n "$_wifi_net" ]]
|
if [[ -n "$_wifi_net" ]]
|
||||||
then
|
then
|
||||||
_wifi_sym=直
|
_wifi_sym=
|
||||||
else
|
else
|
||||||
_wifi_sym=睊
|
_wifi_sym=
|
||||||
fi
|
fi
|
||||||
wifi="$(xargs <<<"$_wifi_sym $_wifi_net")"
|
wifi="$(xargs <<<"$_wifi_sym $_wifi_net $separator")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
network)
|
network)
|
||||||
_net_status="${cmd[1]}"
|
_net_status="${cmd[1]}"
|
||||||
if [[ "$_net_status" == 'UP' ]]
|
if [[ "$_net_status" == 'UP' ]]
|
||||||
then
|
then
|
||||||
network="$(xargs <<<"ﯱ ${cmd[2]}")"
|
network="$(xargs <<<" ${cmd[2]}")"
|
||||||
else
|
else
|
||||||
network=
|
network=
|
||||||
fi
|
fi
|
||||||
|
@ -281,9 +283,9 @@ hc --idle | {
|
||||||
|
|
||||||
if [[ "$mute" == yes ]]
|
if [[ "$mute" == yes ]]
|
||||||
then
|
then
|
||||||
volume=""
|
volume=" $separator"
|
||||||
else
|
else
|
||||||
volume=" ${cmd[1]}"
|
volume=" ${cmd[1]} $separator"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Reference in a new issue