##run_once is a script in /usr/bin that prevents running script if it is running already
##

## Load appearance settings
xsetroot -cursor_name left_ptr &
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" &
xrdb merge .Xresources &
## Wallpaper. Nitrogen just draws wallpaper, 
sh ~/.fehbg &
## Reduces flicker. Disabling saves resources.
compton -b &
## enable local fonts in .fonts directory
xset +fp /usr/share/fonts/local &
xset +fp /usr/share/fonts/misc &
xset +fp ~/.fonts &
xset fp rehash &
fc-cache -fv &
## powersaving options
xset s off &
xset s noblank &
xset s noexpose &
xset c on &
xset -dpms &
## Make monitor settings persist between reboots
eval $(awk -F'=' '/Exec=/ {print $2}' ~/.config/autostart/lxrandr-autostart.desktop) &
## Map super key to trigger rofi when used alone
xcape -e 'Super_L=Super_L|Shift_L|space' &
## Polkit agent
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
## Gnome keyring
gnome-keyring-daemon &
thunar --daemon &
/usr/lib/mate-notification-daemon/mate-notification-daemon &


$HOME/.config/polybar/launch.sh
