Browse Source

Updated panel scripts to fix fonts and allow restarting.

master
Daniel Sissom 5 years ago
parent
commit
fa21901b96
Signed by untrusted user who does not match committer: djsissom GPG Key ID: 2C30FFB796852389
5 changed files with 25 additions and 30 deletions
  1. + 2
    - 7
      bspwm/bspwmrc
  2. + 9
    - 20
      bspwm/panel/panel
  3. + 7
    - 0
      bspwm/panel/panel.conf
  4. + 1
    - 1
      bspwm/panel/panel_bar
  5. + 6
    - 2
      sxhkd/sxhkdrc

+ 2
- 7
bspwm/bspwmrc

@ -1,12 +1,6 @@
#! /bin/sh #! /bin/sh
export PANEL_FIFO="/tmp/djsissom-panel-fifo" export PANEL_FIFO="/tmp/djsissom-panel-fifo"
export PANEL_HEIGHT=18
#export PANEL_FONT="-*-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
export PANEL_FONT='Ubuntu:style=L:size=11:antialias=false'
export PANEL_FONT2='Symbola:size=10:antialias=true'
export PANEL_FONT3='Hack:style=Regular:size=10:antialias=false'
export PANEL_WM_NAME=bspwm_panel
export XDG_CURRENT_DESKTOP="KDE" export XDG_CURRENT_DESKTOP="KDE"
#export QT_QPA_PLATFORMTHEME="qt5ct" #export QT_QPA_PLATFORMTHEME="qt5ct"
export SAL_USE_VCLPLUGIN="kde4" export SAL_USE_VCLPLUGIN="kde4"
@ -129,4 +123,5 @@ done
#bspc rule -a feh floating=on manage=off #bspc rule -a feh floating=on manage=off
# #
/home/djsissom/.config/bspwm/panel/panel &
[ -e "$PANEL_FIFO" ] && bspc subscribe report > "$PANEL_FIFO" &
pgrep -x panel > /dev/null || bspwm-panel &

+ 9
- 20
bspwm/panel/panel

@ -1,37 +1,26 @@
#! /bin/sh #! /bin/sh
if [ $(pgrep -cx panel) -gt 1 ] ; then
. ~/.config/bspwm/panel/panel.conf
if xdo id -a "$PANEL_WM_NAME" > /dev/null; then
printf "%s\n" "The panel is already running." >&2 printf "%s\n" "The panel is already running." >&2
exit 1 exit 1
fi fi
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
flavor=${1:-bar}
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO" [ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO" mkfifo "$PANEL_FIFO"
bspc config top_padding $PANEL_HEIGHT bspc config top_padding $PANEL_HEIGHT
#bspc control --subscribe > "$PANEL_FIFO" &
bspc subscribe report > "$PANEL_FIFO" &
xtitle -sf 'T%s\n' | sed -u 's/^\(.................................................\).*\(..........................\)/\1...\2/' > "$PANEL_FIFO" & xtitle -sf 'T%s\n' | sed -u 's/^\(.................................................\).*\(..........................\)/\1...\2/' > "$PANEL_FIFO" &
bspc subscribe report > "$PANEL_FIFO" &
tick > "$PANEL_FIFO" & tick > "$PANEL_FIFO" &
#clock -s -i 1 -f 'S%a %F %r' > "$PANEL_FIFO" &
#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
echo "$PANEL_FONT"
case "$flavor" in
bar)
cat "$PANEL_FIFO" | /home/djsissom/.config/bspwm/panel/panel_bar | lemonbar -g "x$PANEL_HEIGHT" -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" &
;;
dzen2)
. panel_colors
FONT_FAMILY='DejaVu Sans'
FONT_SIZE=11
cat "$PANEL_FIFO" | panel_dzen2 -f "$FONT_FAMILY" -s "$FONT_SIZE" | dzen2 -h $PANEL_HEIGHT -dock -ta l -title-name panel -fn "${FONT_FAMILY}:pixelsize=${FONT_SIZE}" -fg "$COLOR_FOREGROUND" -bg "$COLOR_BACKGROUND" &
;;
esac
~/.config/bspwm/panel/panel_bar < "$PANEL_FIFO" | lemonbar -n "$PANEL_WM_NAME" -g "x$PANEL_HEIGHT" -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" | sh &
wid=$(xdo id -m -a "$PANEL_WM_NAME")
xdo above -t $(xdo id -N Bspwm -n root | sort | head -n 1) $wid
wait wait

+ 7
- 0
bspwm/panel/panel.conf

@ -0,0 +1,7 @@
#!/usr/bin/env sh
export PANEL_HEIGHT=18
export PANEL_FONT='Ubuntu:style=L:size=11:antialias=false'
export PANEL_FONT2='Symbola:size=10:antialias=true'
export PANEL_FONT3='Ubuntu Nerd Font:style=Regular:size=10:antialias=true'
export PANEL_WM_NAME=bspwm_panel

+ 1
- 1
bspwm/panel/panel_bar

@ -46,5 +46,5 @@ while read -r line ; do
done done
;; ;;
esac esac
printf "%s\n" "%{S+}$title $wm_infos $sys_infos ⏻ "
printf "%s\n" "%{S+}$title $wm_infos $sys_infos ⏻ "
done done

+ 6
- 2
sxhkd/sxhkdrc

@ -37,8 +37,12 @@ alt + ctrl + shift + w
# toggle panel # toggle panel
alt + super + p alt + super + p
{ pkill panel; pkill cat; bspc config top_padding 0 ,\
/home/djsissom/.config/bspwm/panel/panel & }
pgrep -x bspwm-panel > /dev/null && running=yes || running=no; \
if [[ "$running" == yes ]]; then; \
pkill -x panel; bspc config top_padding 0; \
elif [[ "$running" == no ]]; then; \
bspwm-panel &; \
fi

Loading…
Cancel
Save