aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/system/start-scripts/autostart.sh
blob: b17876a746734560d2713a9c545d6b8db8587ba0 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/sh
cd "$(dirname "$0")" || exit

sleep 0.1
xset s 0
nitrogen --restore &

if [ "$WAYLAND_DISPLAY" ]; then
    PID=$(pidof swaybg)
    swaybg -o HDMI-A-1 -i "/home/iceyrazor/stuff/media/wallpapers/neotheta2.png" -m fill -o DP-1 -i "/home/iceyrazor/stuff/media/wallpapers/neotheta2.png" -m fill & disown
    sleep 0.4s
    kill "$PID"
fi

xrdb -merge /home/iceyrazor/.Xresources &

if [ -z "$WAYLAND_DISPLAY" ]; then
    picom &
    setxkbmap -option caps:swapescape
fi

#     if [ -z $(pgrep -f stbar.sh) ]; then
#         # ~/stuff/scripts/system/stbar/stbar.sh &
#     fi

sleep 0.5s

if [ -z "$(pgrep dunst)" ]; then
    dunst & disown
fi

if [ "$WAYLAND_DISPLAY" ] && [ -z "$(pgrep -f waybar)" ]; then
    waybar & disown
fi

if [ -z "$(pgrep -f newsboat-fetch.sh)" ]; then
    ./newsboat-fetch.sh & 
fi
if [ -z "$(pgrep -f lessons-loop.sh)" ]; then
    ./lessons-loop.sh & 
fi

pactl load-module module-null-sink sink_name=audio-share

if [ -z "$(pgrep wezterm)" ]; then
    sleep 2
    wezterm -e ~/.local/bin/system/task.sh &
fi

if [ "$(cat /etc/hostname)" = "Kasino" ]; then
    if [ -z "$(pgrep vesktop)" ]; then
        vesktop %U & disown
    fi

    if [ -z "$(pgrep keepassxc)" ]; then
        keepassxc & disown
    fi

    if [ -z "$(pgrep steam)" ]; then
        steam -silent & disown
    fi

    if [ -z "$(pgrep mumble)" ]; then
        QT_QPA_PLATFORMTHEME="" mumble & disown
    fi

    if [ -z "$(pgrep dino)" ]; then
        dino & disown
    fi

    if [ -z "$(pgrep mpd)" ]; then
        mpd & disown
        sleep 0.5s
        nohup mpd-mpris -host localhost > /dev/null 2> /dev/null < /dev/null & disown
    fi
fi

[ -f "./autostart-priv.sh" ] && ./autostart-priv.sh