#!/usr/bin/env bash run_if_exists () { local prog="$1" if command -v "$prog" > /dev/null; then "$@" & fi } run_if_exists fcitx5 -d run_if_exists dunst run_if_exists udiskie -a -n -s --appindicator run_if_exists lxqt-policykit-agent run_if_exists /usr/lib/kdeconnectd run_if_exists kdeconnect-indicator run_if_exists /usr/lib/geoclue-2.0/demos/agent run_if_exists thunar --daemon if [ "$XDG_SESSION_TYPE" = x11 ]; then run_if_exists "$HOME/.fehbg" fi if [ "$XDG_SESSION_TYPE" = wayland ]; then run_if_exists gammastep \ -l $(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" | awk 'OFS=":" {print $3,$5}' | tr -d ',}') \ -m wayland if command -v wl-paste > /dev/null && \ command -v clipman > /dev/null; then wl-paste -t text --watch clipman store & fi fi run_if_exists "$HOME/.local/autostart"