summaryrefslogtreecommitdiff
path: root/autostart.sh
blob: d892e27e7b5a9635bb54f3e7626b4c28a910e337 (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
#!/bin/sh
runifnot () {
  if type $1 >/dev/null; then
    echo $1
    if [ -z "$(pgrep -f $1)" ]; then
      $@ &
    fi
  fi
}

runifnot `crcparse snd`
if type mpd >/dev/null; then
  runifnot mpd
elif type musicpd >/dev/null; then
  runifnot musicpd
fi
pkill pipewire ; pkill pipewire-pulse ; pkill wireplumber ; snd.sh &
runifnot mpd-mpris -network unix
runifnot mpd-notification
runifnot transmission-daemon
#runifnot dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus
runifnot openrazer-daemon
razer-cli -e static
#runifnot nextcloud
if [ -z "$WAYLAND_DISPLAY" ]; then
  runifnot xss-lock -n notify-send slockd
  #if pgrep -x swhkd; then
  #  doas killall swhkd && pkexec swhkd
  #fi
  #pkexec swhkd &
  #runifnot swhks
  runifnot sxhkd
  runifnot dunst
  runifnot caffeine-ng
  if [ "$(crcparse WM)" = "$(which xmonad)" ]; then
    runifnot stalonetray
  fi
  xwallpaper --zoom ~/background.jpg
  setxkbmap -option "caps:escape"
else
  toggle swaybg -i ~/background.jpg
  gsettings set org.gnome.desktop.interface gtk-theme Sweet-Dark-v40
  gsettings set org.gnome.desktop.interface icon-theme Paper-Mono-Dark
  runifnot swayidle -w
  hotkeys.sh
  runifnot mako
  if [ "$(crcparse WC)" != "$(which qtile)" ]; then
    runifnot waybar
  fi
fi