Change stuff to make it work on more systems (error/exception handling in bspwm startup etc.)

master
David Holland 2020-05-01 19:52:06 +02:00
parent a5df098e56
commit d23d459fb9
Signed by: DustVoice
GPG Key ID: 47068995A14EDCA9
5 changed files with 58 additions and 6 deletions

View File

@ -1,6 +1,25 @@
#!/usr/bin/env bash
sxhkd &
command -v sxhkd >/dev/null 2>&1
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Can't seem to find the sxhkd executable. Exiting!"
bspc quit && exit 1
else
sxhkd &
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Couldn't fire up sxhkd: $return_val. Exiting!"
bspc quit && exit 1
fi
fi
command -v alacritty >/dev/null 2>&1
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Can't seem to find the alacritty executable. Exiting!"
bspc quit && exit 1
fi
for monitor in $(bspc query -M); do
bspc monitor $monitor -d \~
@ -32,7 +51,37 @@ bspc config presel_feedback_color "#6272a4"
bspc rule -a Screenkey manage=off
bspc rule -a Zathura state=tiled manage=on
nitrogen --restore &
/usr/lib/xfce-polkit/xfce-polkit &
command -v nitrogen >/dev/null 2>&1
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Can't seem to find the nitrogen executable"
else
nitrogen --restore &
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Couldn't fire up nitrogen: $return_val"
fi
fi
$HOME/.config/polybar/launch.sh
command -v /usr/lib/xfce-polkit/xfce-polkit >/dev/null 2>&1
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Can't seem to find the /usr/lib/xfce-polkit/xfce-polkit executable"
else
/usr/lib/xfce-polkit/xfce-polkit &
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Couldn't fire up xfce-polkit: $return_val"
fi
fi
command -v polybar >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo >&2 "Can't seem to find the polybar executable. Starting barless!"
bspc config top_padding 0
else
$HOME/.config/polybar/launch
if [ $? -ne 0 ]; then
echo >&2 "Couldn't fire up polybar: $?"
fi
fi

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
killall -q polybar

1
.gitignore vendored
View File

@ -13,6 +13,7 @@
!/.xinitrc
!/.Xmodmap.example
!/.Xresources
!/.xsession
!/.zshenv
!/.zshpath.example
!/.zshrc

View File

@ -10,4 +10,5 @@ fi
setxkbmap "us,us" ",intl" "grp:shifts_toggle"
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
exec bspwm
mkdir -p $HOME/.local/share/bspwm
exec bspwm >$HOME/.local/share/bspwm/output.log 2>$HOME/.local/share/bspwm/error.log

1
.xsession Executable file
View File

@ -0,0 +1 @@
bspwm