Use read detection, not file, add wallpaper setters

This commit is contained in:
Salt 2019-06-21 17:39:49 -05:00
parent 2a3ecca2dc
commit ab0382553d

View File

@ -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