This repository has been archived on 2025-01-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
.concession
.config
bspwm
concession
conky
dsk
run
compton
conky
dropbox
dunst
i3wm
kded5
kdeinit5
nitrogen
polkit-kde
polybar
pulseaudio
redshift
syncthing
xrdbupdate
xset
dskrc
dunst
htop
i3
i3status
liferea
nitrogen
plasma-workspace
polybar
rofi
sxhkd
xob
xrdb
zim
compton.conf
kglobalshortcutsrc
konsolerc
kscreenlockerrc
ksplashrc
redshift.conf
startupconfig
.dsk
.local
.ssh
.themes
.vim
.functions
.gitconfig
.gitmodules
.inputrc
.profile
.vimrc
.xinitrc
home/.config/dsk/run/polybar
2018-11-13 21:24:07 -06:00

32 lines
918 B
Plaintext
Executable File

# Make sure we have our xrdb stuff going
if $(which xrdbupdate) > /dev/null 2>&1; then
xrdbupdate > /dev/null 2>&1
fi
# Set some variables, if necessary
if [[ "$PB_BAR_BORDER_SIZE" == "" ]] && pgrep -U "$UID" bspwm > /dev/null 2>&1; then
if ! [[ "$BSPWM_WINDOW_GAP" == "" ]]; then
echo "Inferring bar size from BSPWM_WINDOW_GAP"
export PB_BAR_BORDER_SIZE="$BSPWM_WINDOW_GAP"
fi
fi
if pgrep -U "$UID" i3 > /dev/null 2>&1; then
export PB_WM_RESTACK="i3"
fi
# Spawn bars on the primary monitor
export PB_MONITOR=$(xrandr -q | awk '/primary/{print $1}')
polybar -r primary &
polybar -r primary-2 &
# Spawn more for each secondary
export secondary_monitors=$(xrandr -q | grep ' connected' | grep -v 'primary' | awk '{print $1}')
if [[ "$secondary_monitors" == "" ]]; then
return 0
fi
for monitor in $secondary_monitors; do
PB_MONITOR=$monitor
polybar -r secondary &
polybar -r secondary-2 &
done
return 0
wait