# {{@@ header() @@}}
#  _____      ____ _ _   _
# / __\ \ /\ / / _` | | | |
# \__ \\ V  V / (_| | |_| |
# |___/ \_/\_/ \__,_|\__, |
#                    |___/

###############################################################
# User Programs
###############################################################

# kde connect
exec /usr/lib/kdeconnectd
exec kdeconnect-indicator
# Telegram
exec telegram-desktop-bin || telegram-desktop
# Music Player Daemon
exec_always pidof mpd || mpd --no-daemon
exec_always pidof -x mpDris2 || sleep 5s &&  mpDris2
# Syncthing, sync folders between stuff
exec pidof syncthing || syncthing -no-browser
# Unlock gpg-agent
exec_always _gpg-unlock


###############################################################
# System Daemons
###############################################################

# start dbusd just in case
exec _start_dbus-daemon
exec_always pidof gsd-xsettings || /usr/lib/gsd-xsettings

# pipewire and desktop-portal for screen sharing
exec_always pidof pipewire || pipewire
exec_always pidof pipewire-media-session || pipewire-media-session
exec_always pidof xdg-desktop-portal || /usr/lib/xdg-desktop-portal

# Wake up pulseaudio
exec_always pactl set-sink-volume @DEFAULT_SINK@ +0%

#Notification Daemon
exec_always pidof mako || mako

# Block device Mounter to /run/media/<username>
exec udiskie

# gesture daemon
exec_always pidof -x fusuma || fusuma

# Blue light filter
# exec /usr/lib/geoclue-2.0/demos/agent
exec_always pidof gammastep || gammastep -l -30:-50

# Screen manager
exec_always _sway_displays
# Set minimum brightness to 1 instead of 0
# not exactly a daemon
exec light -N 1

###############################################################
# Idle
###############################################################

# Idle daemon
exec_always _sway_idle

# vim: ft=i3
