#!/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 clipmenud run_if_exists lxqt-policykit-agent 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 fi run_if_exists "$HOME/.local/autostart"