diff options
author | Joe <rrbo@proton.me> | 2023-02-03 11:33:47 +0100 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-02-03 11:33:47 +0100 |
commit | 01ac7bd119be1bee4f325a4e3aab6a0ce203252c (patch) | |
tree | 05bc6ca0f983e07f837b14d0b48be0ce2efda551 /.config/openbox/autostart | |
parent | up (diff) | |
download | dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.gz dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.bz2 dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.xz dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.zst dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.zip |
up
Diffstat (limited to '.config/openbox/autostart')
-rwxr-xr-x | .config/openbox/autostart | 66 |
1 files changed, 32 insertions, 34 deletions
diff --git a/.config/openbox/autostart b/.config/openbox/autostart index acb0dfc..065acfa 100755 --- a/.config/openbox/autostart +++ b/.config/openbox/autostart @@ -17,55 +17,53 @@ #xfce-mcs-manager & # select OS -# 1: Artix -# 2: Pop OS -# 3: FreeBSD os="$(uname)" -if [ "$os" = "Linux" ]; then - grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2 -elif [ "$os" = "FreeBSD" ]; then - os=3 -else - echo "unknown OS" - exit 1 -fi +case $os in + "Linux") grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2 ;; + "FreeBSD") os=3 ;; +esac +case $os in + 1) + icon=" " + mpd="mpd" + xscr="xscreensaver --no-splash" + ;; + 2) + icon=" " + mpd="mpd" + xscr="xscreensaver" + ;; + 3) + icon=" " + mpd="musicpd" + xscr="xscreensaver --no-splash" + ;; +esac startif() { pgrep "$(basename "$1")" >/dev/null || "$@" >/dev/null 2>&1 & } -delay_desktop() { - sleep 5 - startif conky -d -c "$HOME"/.config/conkyrc - startif tint2 - startif plank -} - export LANG='en_US.UTF-8' -case $os in - 1) icon=" " ;; - 2) icon=" " ;; - 3) icon=" " ;; -esac - startif dunst startif picom startif mpd-notification -# startif xscreensaver +pgrep $mpd >/dev/null || $mpd >/dev/null 2>&1 +startif $xscr "$HOME"/.local/bin/setwp "$HOME"/pics/wp.jpg "$HOME"/.local/bin/kb xset s off xset -dpms -if xrandr | grep -F 'DisplayPort-0 connected' >/dev/null 2>&1; then - "$HOME"/.local/bin/scr -else - "$HOME"/.local/bin/dscr -fi -delay_desktop & +# if xrandr | grep -F 'DisplayPort-0 connected' >/dev/null 2>&1; then +# "$HOME"/.local/bin/scr +# else +# "$HOME"/.local/bin/dscr +# fi +startif conky -d -c "$HOME"/.config/conkyrc +startif tint2 +startif plank cd "$HOME" xrdb "$HOME"/.config/x11/xresources - -notify-send -u normal 'Welcome' " Welcome back, partner\!" -# dbus-launch openbox +notify-send -u normal 'Welcome' "$icon Welcome back, partner!" |