all repos — dotfiles-extra @ e7b4874516df8a3f5886c29fff1d1ae88e86607a

extra configs that may be extraneous and/or may be platform specific

.config/sway/config.d/99-autostart-applications.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
# enable idle mode
exec $idle

# autostart background applications
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec $notifications

# if-exists autostarts
#
exec {
    '[ -x "$(command -v dex)" ] && gdbus wait --session org.kde.StatusNotifierWatcher && dex --autostart'
    #'[ -x "$(command -v flashfocus)" ] && flashfocus'
    '[ -x "$(command -v wlsunset)" ] && /usr/share/sway/scripts/sunset.sh "on"'
    #'[ -x "$(command -v autotiling)" ] && autotiling'
    #'[ -x "$(command -v foot)" ] && /usr/share/sway/scripts/foot.sh --server'
    #'[ -x "$(command -v nwg-wrapper)" ] && [ -f $HOME/.config/nwg-wrapper/help.sh ] && /usr/share/sway/scripts/help.sh'  # annoying help overlay
    '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch cliphist store'
    '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch pkill -RTMIN+9 waybar'
}
exec_always {
    '[ -x "$(command -v waybar)" ] && (pkill waybar || exit 0) && systemctl --now --user enable waybar && (systemctl --user start waybar || /home/x1phosura/.config/sway/scripts/waybar.sh)'

    #'[ -x "$(command -v spice-vdagent)" ] && spice-vdagent'
    # restart kanshi https://github.com/emersion/kanshi/issues/43#issuecomment-531679213
    #'[ -x "$(command -v kanshi)" ] && pkill kanshi; exec kanshi'
    #'[ -x "$(command -v sworkstyle)" ] && pkill sworkstyle; sworkstyle &> /tmp/sworkstyle.log'
    '[ -x "$(command -v playerctl)" ] && pkill playerctl; playerctl -a metadata --format \'{{status}} {{title}}\' --follow | while read line; do pkill -RTMIN+5 waybar; done'
    '[ -x "$(command -v poweralertd)" ] && pkill poweralertd; poweralertd -s -i "line power" &'
}

# https://github.com/Alexays/Waybar/issues/1093#issuecomment-841846291
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
    dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK