You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
50 lines
1.5 KiB
#! /bin/sh
|
|
#
|
|
# Example panel for LemonBoy's bar
|
|
|
|
while read -r line ; do
|
|
case $line in
|
|
S*)
|
|
sys_infos="%{r}%{F-}${line#?}%{F-}"
|
|
;;
|
|
T*)
|
|
title="%{F-} ${line#?}"
|
|
# title=""
|
|
;;
|
|
W*)
|
|
wm_infos="%{c}"
|
|
IFS=':'
|
|
set -- ${line#?}
|
|
while [ $# -gt 0 ] ; do
|
|
item=$1
|
|
name=${item#?}
|
|
case $item in
|
|
[OFU]*)
|
|
# active desktop
|
|
wm_infos="$wm_infos%{F#FAE7BF} ● %{F-}%{B-}"
|
|
;;
|
|
o*)
|
|
# inactive but occupied desktop
|
|
wm_infos="$wm_infos%{F-} ● %{F-}"
|
|
;;
|
|
f*)
|
|
# inactive desktop
|
|
wm_infos="$wm_infos%{F-} ○ %{F-}"
|
|
;;
|
|
u*)
|
|
# urgent desktop
|
|
wm_infos="$wm_infos%{F-} ● %{F-}"
|
|
;;
|
|
L*)
|
|
# layout
|
|
# layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/')
|
|
layout=""
|
|
wm_infos="$wm_infos %{B-}%{F-}$layout%{B-}%{F-}"
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
;;
|
|
esac
|
|
printf "%s\n" "%{S+}$title $wm_infos $sys_infos ⏻ "
|
|
done
|