diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 59d4a07..b7df840 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -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 diff --git a/.config/polybar/launch.sh b/.config/polybar/launch similarity index 92% rename from .config/polybar/launch.sh rename to .config/polybar/launch index 4524314..36257f0 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash killall -q polybar diff --git a/.gitignore b/.gitignore index e3098a9..0062f52 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ !/.xinitrc !/.Xmodmap.example !/.Xresources +!/.xsession !/.zshenv !/.zshpath.example !/.zshrc diff --git a/.xinitrc b/.xinitrc index 6b963b8..d93703c 100644 --- a/.xinitrc +++ b/.xinitrc @@ -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 diff --git a/.xsession b/.xsession new file mode 100755 index 0000000..3f67162 --- /dev/null +++ b/.xsession @@ -0,0 +1 @@ +bspwm