diff options
author | Guangxiong Lin <[email protected]> | 2022-12-17 09:34:36 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-12-17 09:34:36 +0800 |
commit | 885cbb18b6c9df2b0c4f77a7b7956125c4f08473 (patch) | |
tree | da5243f872e2ec2e5cf85693416917c4083d9b21 /bin/autostart | |
parent | 449208367563b5b7e9e06cffc719e2500731ce7c (diff) | |
download | dotfiles-885cbb18b6c9df2b0c4f77a7b7956125c4f08473.tar.gz dotfiles-885cbb18b6c9df2b0c4f77a7b7956125c4f08473.tar.bz2 dotfiles-885cbb18b6c9df2b0c4f77a7b7956125c4f08473.zip |
Update swaywm start config
Diffstat (limited to 'bin/autostart')
-rwxr-xr-x | bin/autostart | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/autostart b/bin/autostart index ac4bc3a..6fb5da2 100755 --- a/bin/autostart +++ b/bin/autostart @@ -1,11 +1,23 @@ #!/usr/bin/env bash [ -f /usr/bin/fcitx5 ] && fcitx5 -d -[ -f ~/.fehbg ] && ~/.fehbg & [ -f /usr/bin/dunst ] && dunst & -[ -f /usr/bin/udiskie ] && udiskie -a -n -s & +[ -f /usr/bin/udiskie ] && udiskie -a -n -s --appindicator & [ -f /usr/bin/clipmenud ] && clipmenud & +if [ "$XDG_SESSION_TYPE" = x11 ]; then + [ -f ~/.fehbg ] && ~/.fehbg & +fi + +if [ "$XDG_SESSION_TYPE" = wayland ]; then + command -v gammastep > /dev/null && \ + command -v awk > /dev/null && \ + command -v tr > /dev/null && \ + gammastep \ + -l $(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" | awk 'OFS=":" {print $3,$5}' | tr -d ',}') \ + -m wayland +fi + [ -x "$HOME/.local/autostart" ] && "$HOME/.local/autostart" |