Minor changes to configs, fix polybar issue in bspwm

This commit is contained in:
natemaia 2017-12-22 18:57:27 -08:00
parent 34019d115d
commit 165a03dba3
6 changed files with 5 additions and 78 deletions

View File

@ -80,8 +80,7 @@ exec_always --no-startup-id al-polybar-session
exec_always --no-startup-id numlockx on
exec_always --no-startup-id nitrogen --restore
exec_always --no-startup-id xrdb -load ~/.Xresources
exec_always --no-startup-id pkill trayer; trayer --edge bottom --align left --heighttype pixel \
--height 18 --widthtype request --SetDockType false --expand true --transparent true --alpha 255
exec_always --no-startup-id pkill trayer; trayer --edge bottom --align left --heighttype pixel --height 18 --widthtype request --SetDockType false --expand true --transparent true --alpha 255
# run once
exec --no-startup-id xfsettingsd

View File

@ -65,7 +65,7 @@ modules-right = pkg memory temperature coreuse network volume
; Bspwm Bars
;=====================================================
[bar/bsp-bar]
[bar/bspwm-bar]
inherit = bar/master
; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1

View File

@ -1,7 +1,7 @@
al-compositor --restart
pkill dunst
xrdb ~/.Xresources
start-polybar --reload
al-polybar-session
i3-msg restart
sleep 0.5

View File

@ -1,7 +1,7 @@
al-compositor --restart
pkill dunst
xrdb ~/.Xresources
start-polybar --reload
al-polybar-session
i3-msg restart
sleep 0.5

View File

@ -1,65 +0,0 @@
#!/usr/bin/env bash
# Polybar launcher script written by Nathaniel Maia for use in ArchLabs
# Will launch bars depending on WM
# Can also be used to reload openbox session with [--reload] or [-r]
# I reccomend using al-polyzen to set up a session for each wm
# then ditching this script and adding the following line to your autostart
# sleep 1; al-polybar-session &
# Enter your bar names here (seperated by spaces) eg. BARS=(bar1 bar2...)
# This will be combined with window manager from WMS below eg. openbox-bar1, openbox-bar2...
# by default it is set up in WM-BAR naming format eg. i3-bar, openbox-bar, bspwm-bar....
BARS=(bar)
CONFIG=$HOME/.config/polybar/config
WMS=(bspwm i3 openbox xfce awesome)
############################################################################################
HELP="\nUSAGE:\n\tstart-polybar [OPTIONS]
\nOPTIONS:\n\t--reload, -r\tIf running in openbox, will reload the session
\t--help, -h\tPrint this usage message and exit
\n\tWith no options the script will stop and reload polybar"
# determine WM
for i in ${WMS[@]}; do
if [[ "$(wmctrl -m | grep -i name | awk '{print tolower($2)}')" == "$i" ]]; then
WM=$i && break
elif [[ "$(xprop -root -notype | grep "WM_NAME =" | tr -d '"' | awk '{print tolower($3)}')" == "$i" ]]; then
WM=$i && break
elif [[ "$(awk '{print tolower($0)}' <<< $XDG_CURRENT_DESKTOP)" == "$i" ]]; then
WM=$i && break
fi
done
# check if passed options
case "$@" in
*help|-h)
echo -e $HELP && exit 0
;;
*reload|-r)
if [[ "$WM" == "openbox" ]]; then
openbox --restart
al-compositor --restart && al-tint2restart
fi
;;
esac
# kill running bars
while [ "$(pidof polybar)" ]; do
pkill polybar && sleep 0.5
done
# launch bars
for bar in "${BARS[@]}"; do
polybar -r --config=$CONFIG ${WM}-$bar &
done
if [ "$(pidof polybar)" ]; then
echo "Bars launched..."
else
echo "Bars Failed to Launch"
fi

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
# will stop any running polybar instances
while [ "$(pidof polybar)" ]; do
pkill polybar && sleep 0.5
echo "Bars stopped..."
done