QoL improvements

This commit is contained in:
David Holland 2021-03-29 11:08:51 +02:00
parent d866e12404
commit a112d5fdfd
Signed by: DustVoice
GPG key ID: 47068995A14EDCA9
2 changed files with 25 additions and 33 deletions

View file

@ -1,26 +1,20 @@
#!/usr/bin/env bash #!/usr/bin/env bash
command -v sxhkd >/dev/null 2>&1 if [ -x "$(command -v sxhkd)" ]; then
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 & sxhkd &
return_val=$? return_val=$?
if [ $return_val -ne 0 ]; then if [ $return_val -ne 0 ]; then
echo >&2 "Couldn't fire up sxhkd: $return_val. Exiting!" echo >&2 "Couldn't fire up sxhkd: $return_val. Exiting!"
bspc quit && exit 1 bspc quit && exit 1
fi fi
else
echo >&2 "Can't seem to find the sxhkd executable. Exiting!"
bspc quit && exit 1
fi fi
command -v alacritty >/dev/null 2>&1 if [ ! -x "$(command -v alacritty)" ]; then
return_val=$? if [ ! -x "$(command -v st)" ]; then
if [ $return_val -ne 0 ]; then echo >&2 "Can't seem to find neither the st nor the alacritty executable. Exiting!"
command -v st >/dev/null 2>&1
return_val=$?
if [ $return_val -ne 0 ]; then
echo >&2 "Can't seem to find either the st or the alacritty executable. Exiting!"
bspc quit && exit 1 bspc quit && exit 1
fi fi
fi fi
@ -55,37 +49,36 @@ bspc config presel_feedback_color "#6272a4"
bspc rule -a Screenkey manage=off bspc rule -a Screenkey manage=off
bspc rule -a Zathura state=tiled manage=on bspc rule -a Zathura state=tiled manage=on
command -v nitrogen >/dev/null 2>&1 if [ -x "$(command -v feh)" ]; then
return_val=$? feh --bg-fill "$HOME/Wallpapers/arch_dracula.png"
if [ $return_val -ne 0 ]; then
echo >&2 "Can't seem to find the nitrogen executable"
else else
nitrogen --restore & if [ -x "$(command -v nitrogen)" ]; then
return_val=$? nitrogen --restore &
if [ $return_val -ne 0 ]; then return_val=$?
echo >&2 "Couldn't fire up nitrogen: $return_val" if [ $return_val -ne 0 ]; then
echo >&2 "Couldn't fire up nitrogen: $return_val"
fi
else
echo >&2 "Can't seem to find neither the feh nor the nitrogen executable"
fi fi
fi fi
command -v /usr/lib/xfce-polkit/xfce-polkit >/dev/null 2>&1 if [ -x "$(command -v /usr/lib/xfce-polkit/xfce-polkit)" ]; then
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 & /usr/lib/xfce-polkit/xfce-polkit &
return_val=$? return_val=$?
if [ $return_val -ne 0 ]; then if [ $return_val -ne 0 ]; then
echo >&2 "Couldn't fire up xfce-polkit: $return_val" echo >&2 "Couldn't fire up xfce-polkit: $return_val"
fi fi
else
echo >&2 "Can't seem to find the /usr/lib/xfce-polkit/xfce-polkit executable"
fi fi
command -v polybar >/dev/null 2>&1 if [ -x "$(command -v polybar)" ]; then
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 $HOME/.config/polybar/launch
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo >&2 "Couldn't fire up polybar: $?" echo >&2 "Couldn't fire up polybar: $?"
fi fi
else
echo >&2 "Can't seem to find the polybar executable. Starting barless!"
bspc config top_padding 0
fi fi

3
.zshrc
View file

@ -58,7 +58,6 @@ else
%(!.#.$) ' %(!.#.$) '
fi fi
command -v zoxide >/dev/null 2>&1 if [ -x "$(command -v zoxide)" ]; then
if [ $? -eq 0 ]; then
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
fi fi