helm/base/arch-desktop/xprofile

44 lines
1,008 B
Bash

#!/bin/bash
DOTS=~/.dotfiles
source $DOTS/env
# A tidy $HOME is a tidy mind
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
[[ -e ~/.Xauthority ]] && mv -f ~/.Xauthority "$XAUTHORITY"
#
ARCH=$DOTS/base/arch-desktop
[[ -f $ARCH/Xresources ]] && xrdb $ARCH/Xresources
[[ -f $ARCH/Xmodmap ]] && xmodmap $ARCH/Xmodmap
# set wallpaper
[[ -e ~/wallpaper ]] && feh --no-fehbg --image-bg black --bg-center ~/wallpaper
# Let me know
$DOTS/bin/ding startup
# autostart programs
{
run() {
if _is_callable "$1" && ! _is_running "$1"; then
"$@"
fi
}
# essentials
run sxhkd & # keyboard daemon
run dunst & # notifications
# non-essentials
{
sleep 2
run mpd & # music server
run redshift & # screen temperature based on time-of-day
run rslsync & # resilio sync
run compton & # perdy effects + transparency
# If sxhkd isn't running by now, something is wrong
_is_running sxhkd || urxvt &
} &
} 2>&1 >$XDG_DATA_HOME/xsession-errors.log