From 2587f3f30c1757fc6609b9ab9294e12700c195b6 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Sat, 19 Dec 2020 20:57:17 -0700 Subject: Finally have a working bspwm + sxhkd + lemonbar, still WIP¿ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local/bin/statusbar/statusbar | 12 ++++++++---- .local/bin/statusbar/statusbar_bar1 | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to '.local/bin/statusbar') diff --git a/.local/bin/statusbar/statusbar b/.local/bin/statusbar/statusbar index c5ee748..7c2b0be 100755 --- a/.local/bin/statusbar/statusbar +++ b/.local/bin/statusbar/statusbar @@ -1,11 +1,15 @@ #!/bin/sh PANEL_FIFO=/tmp/panel-fifo -PANEL_HEIGHT=24 -# PANEL_FONT="-*-fixed-*-*-*-*-10-*-*-*-*-*-*-*" +PANEL_HEIGHT=20 +PANEL_FONT="Noto Sans Mono:size=10" +PANEL_EMOJI_FONT0="Noto Color Emoji" +PANEL_EMOJI_FONT1="Font Awesome 5 Free" +PANEL_EMOJI_FONT2="Font Awesome 5 Brands" +PANEL_EMOJI_FONT3="Font Awesome 5 Free Solid" PANEL_WM_NAME=bspwm_statusbar if xdo id -a "$PANEL_WM_NAME" > /dev/null ; then - printf "%s\n" "The status bar is already running." >&2 + printf "%s\n" "The status bar is already running. Try pkill -x statusbar." >&2 exit 1 fi @@ -20,7 +24,7 @@ bspc subscribe report > "$PANEL_FIFO" & . statusbar_colors -statusbar_bar1 < "$PANEL_FIFO" | lemonbar -a 32 -u 2 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" & +statusbar_bar1 < "$PANEL_FIFO" | lemonbar -a 32 -u 2 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -f "$PANEL_EMOJI_FONT0" -f "$PANEL_EMOJI_FONT1" -f "$PANEL_EMOJI_FONT2" -f "$PANEL_EMOJI_FONT3" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" | sh & # This only really works for one monitor. # wid=$(xdo id -m -a "$PANEL_WM_NAME") diff --git a/.local/bin/statusbar/statusbar_bar1 b/.local/bin/statusbar/statusbar_bar1 index 1aff3a9..16297ef 100755 --- a/.local/bin/statusbar/statusbar_bar1 +++ b/.local/bin/statusbar/statusbar_bar1 @@ -29,7 +29,7 @@ while read -r line ; do # monitor FG=$COLOR_MONITOR_FG BG=$COLOR_MONITOR_BG - on_focused_monitor= + on_focused_monitor=0 ;; M*) # focused monitor @@ -39,7 +39,7 @@ while read -r line ; do ;; esac [ $num_mon -lt 2 ] && shift && continue - wm="${wm}%{F${FG}}%{B${BG}}%{A:bspc monitor -f ${name}:} ${name} %{A}%{B-}%{F-}" + wm="%{S${on_focused_monitor}}${wm}%{F${FG}}%{B${BG}}%{A:bspc monitor -f ${name}:} ${name} %{A}%{B-}%{F-}" ;; [fFoOuU]*) case $item in -- cgit v1.2.3-70-g09d2