Update configs for bspwmrc and friends
This commit is contained in:
parent
d77432d398
commit
9066c338de
4 changed files with 68 additions and 82 deletions
|
|
@ -13,9 +13,6 @@ bspc config initial_polarity second_child
|
||||||
|
|
||||||
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
|
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
|
||||||
|
|
||||||
echo 'xss-lock'
|
|
||||||
xss-lock -- i3lock -e -i ~/images/lockscreen.png &
|
xss-lock -- i3lock -e -i ~/images/lockscreen.png &
|
||||||
echo 'nitrogen'
|
|
||||||
nitrogen --restore &
|
nitrogen --restore &
|
||||||
echo 'panel'
|
|
||||||
$PANEL_CONFIG_DIR/panel &
|
$PANEL_CONFIG_DIR/panel &
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,9 @@ trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
|
||||||
mkfifo "$PANEL_FIFO"
|
mkfifo "$PANEL_FIFO"
|
||||||
|
|
||||||
bspc config bottom_padding $PANEL_HEIGHT
|
bspc config bottom_padding $PANEL_HEIGHT
|
||||||
bspc control --subscribe > "$PANEL_FIFO" &
|
|
||||||
sleep 0.3s
|
|
||||||
clock 'C' '+%a %H:%M:%S' > "$PANEL_FIFO" &
|
|
||||||
sleep 0.3s
|
|
||||||
battery 'B' '%' > "$PANEL_FIFO" &
|
|
||||||
sleep 0.3s
|
|
||||||
volume 'V' '%' > "$PANEL_FIFO" &
|
|
||||||
|
|
||||||
source panel_colors
|
source panel_colors
|
||||||
|
|
||||||
cat "$PANEL_FIFO" | panel_bar | lemonbar -g x$PANEL_HEIGHT -f "$PANEL_FONT_FAMILY" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" -b &
|
panel_bar | lemonbar -g x$PANEL_HEIGHT -f "$PANEL_FONT_FAMILY" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" -b &
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
|
||||||
136
panel/panel_bar
136
panel/panel_bar
|
|
@ -2,79 +2,75 @@
|
||||||
#
|
#
|
||||||
# Example panel for LemonBoy's bar
|
# Example panel for LemonBoy's bar
|
||||||
|
|
||||||
source "$PANEL_CONFIG_DIR/panel_colors"
|
PATH=$PATH:"$PANEL_CONFIG_DIR"
|
||||||
|
|
||||||
|
source panel_colors
|
||||||
|
|
||||||
num_mon=$(bspc query -M | wc -l)
|
num_mon=$(bspc query -M | wc -l)
|
||||||
|
|
||||||
divider=' | '
|
divider=' | '
|
||||||
|
|
||||||
while read -r line ; do
|
while sleep 1; do
|
||||||
case $line in
|
# bspwm internal state
|
||||||
C*)
|
wm_info=""
|
||||||
# clock output
|
IFS=':'
|
||||||
sys_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}"
|
read -r -a wm_data <<< "$(bspc control --get-status)"
|
||||||
;;
|
for item in "${wm_data[@]}"; do
|
||||||
W*)
|
name=${item#?}
|
||||||
# bspwm internal state
|
case $item in
|
||||||
wm_infos=""
|
M*)
|
||||||
IFS=':'
|
# active monitor
|
||||||
set -- ${line#?}
|
if [ $num_mon -gt 1 ] ; then
|
||||||
while [ $# -gt 0 ] ; do
|
wm_info="$wm_info %{F$COLOR_ACTIVE_MONITOR_FG}%{B$COLOR_ACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
|
||||||
item=$1
|
fi
|
||||||
name=${item#?}
|
;;
|
||||||
case $item in
|
m*)
|
||||||
M*)
|
# inactive monitor
|
||||||
# active monitor
|
if [ $num_mon -gt 1 ] ; then
|
||||||
if [ $num_mon -gt 1 ] ; then
|
wm_info="$wm_info %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
|
||||||
wm_infos="$wm_infos %{F$COLOR_ACTIVE_MONITOR_FG}%{B$COLOR_ACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
|
fi
|
||||||
fi
|
;;
|
||||||
;;
|
O*)
|
||||||
m*)
|
# focused occupied desktop
|
||||||
# inactive monitor
|
wm_info="${wm_info}%{F$COLOR_FOCUSED_OCCUPIED_FG}%{B$COLOR_FOCUSED_OCCUPIED_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
|
||||||
if [ $num_mon -gt 1 ] ; then
|
;;
|
||||||
wm_infos="$wm_infos %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
|
F*)
|
||||||
fi
|
# focused free desktop
|
||||||
;;
|
wm_info="${wm_info}%{F$COLOR_FOCUSED_FREE_FG}%{B$COLOR_FOCUSED_FREE_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
|
||||||
O*)
|
;;
|
||||||
# focused occupied desktop
|
U*)
|
||||||
wm_infos="${wm_infos}%{F$COLOR_FOCUSED_OCCUPIED_FG}%{B$COLOR_FOCUSED_OCCUPIED_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
|
# focused urgent desktop
|
||||||
;;
|
wm_info="${wm_info}%{F$COLOR_FOCUSED_URGENT_FG}%{B$COLOR_FOCUSED_URGENT_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
|
||||||
F*)
|
;;
|
||||||
# focused free desktop
|
o*)
|
||||||
wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FREE_FG}%{B$COLOR_FOCUSED_FREE_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
|
# occupied desktop
|
||||||
;;
|
wm_info="${wm_info}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG} ${name} %{B-}%{F-}"
|
||||||
U*)
|
;;
|
||||||
# focused urgent desktop
|
f*)
|
||||||
wm_infos="${wm_infos}%{F$COLOR_FOCUSED_URGENT_FG}%{B$COLOR_FOCUSED_URGENT_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
|
# free desktop
|
||||||
;;
|
# wm_info="${wm_info}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG} ${name} %{B-}%{F-}"
|
||||||
o*)
|
;;
|
||||||
# occupied desktop
|
u*)
|
||||||
wm_infos="${wm_infos}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG} ${name} %{B-}%{F-}"
|
# urgent desktop
|
||||||
;;
|
wm_info="${wm_info}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}"
|
||||||
f*)
|
;;
|
||||||
# free desktop
|
L*)
|
||||||
# wm_infos="${wm_infos}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG} ${name} %{B-}%{F-}"
|
# layout
|
||||||
;;
|
# wm_info="$wm_info %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}"
|
||||||
u*)
|
;;
|
||||||
# urgent desktop
|
esac
|
||||||
wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}"
|
done
|
||||||
;;
|
|
||||||
L*)
|
pa_status=$(pulseaudio-ctl full-status)
|
||||||
# layout
|
volume=$(echo $pa_status | cut -d' ' -f1)
|
||||||
# wm_infos="$wm_infos %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}"
|
muted=$(echo $pa_status | cut -d' ' -f2 | sed -e 's/yes/-/' -e 's/no/%%/')
|
||||||
;;
|
|
||||||
esac
|
battery=$(acpi --battery | cut -d, -f2 | tr -d ' ')'%'
|
||||||
shift
|
clock=$(date '+%a %d %b %H:%M:%S')
|
||||||
done
|
|
||||||
;;
|
battery_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${battery} %{B-}%{F-}"
|
||||||
B*)
|
volume_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${volume}${muted} %{B-}%{F-}"
|
||||||
# battery output
|
clock_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${clock} %{B-}%{F-}"
|
||||||
battery_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}"
|
|
||||||
;;
|
printf "%s\n" "%{l}${wm_info}%{c}${title}%{r}${battery_info}${divider}${volume_info}${divider}${clock_info}"
|
||||||
V*)
|
|
||||||
# volume output
|
|
||||||
volume_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
printf "%s\n" "%{l}${wm_infos}%{c}${title}%{r}${battery_infos}${divider}${volume_infos}${divider}${sys_infos}"
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ super + Return
|
||||||
urxvt
|
urxvt
|
||||||
|
|
||||||
super + space
|
super + space
|
||||||
dmenu_run
|
xboomx
|
||||||
|
|
||||||
# make sxhkd reload its configuration files:
|
# make sxhkd reload its configuration files:
|
||||||
super + Escape
|
super + Escape
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue