From ab0382553de0b25cecafb337230ee408d83ffe16 Mon Sep 17 00:00:00 2001 From: Salt Date: Fri, 21 Jun 2019 17:39:49 -0500 Subject: [PATCH] Use read detection, not file, add wallpaper setters --- firestarter | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/firestarter b/firestarter index e455f6e..2beda31 100755 --- a/firestarter +++ b/firestarter @@ -68,7 +68,7 @@ EOF cat << EOF > "$_configdir/bar" command -v tint2 tint2 -command -v polybar && [ -f "$HOME/.config/polybar/launch.sh" ] +command -v polybar && [ -r "$HOME/.config/polybar/launch.sh" ] "$HOME/.config/polybar/launch.sh" command -v lxpanel lxpanel @@ -162,8 +162,17 @@ EOF cat << EOF > "$_configdir/stat-glances" [ -z "\$DISPLAY" ] : -command -v conky && [ -f "\${XDG_CONFIG_HOME:-$HOME/.config}/conky/conky.conf" ] +command -v conky && [ -r "\${XDG_CONFIG_HOME:-$HOME/.config}/conky/conky.conf" ] conky +EOF + # Wallpaper setters + cat << EOF > "$_configdir/wallpaper" +[ -z "\$DISPLAY" ] +: +command -v feh && [ -r "$HOME/.fehbg" ] +~/.fehbg +command -v nitrogen +nitrogen --restore EOF # Window managers cat << EOF > "$_configdir/wm" @@ -324,7 +333,7 @@ step_preexecute() { fi # xresources - if [ -n "$DISPLAY" ] && command -v xrdb && [ -f "$HOME/.Xresources" ]; then + if [ -n "$DISPLAY" ] && command -v xrdb && [ -r "$HOME/.Xresources" ]; then if xrdb "$HOME/.Xresources" > /dev/null 2>&1; then log "Loaded in .Xresources" else