You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
924 B

  1. #!/bin/sh
  2. # start waybar and programs with tray icons after pause
  3. waybar_loop() {
  4. # restart waybar on crash (after suspend mode)
  5. WAYBAR_RESTARTS=0
  6. while [ $WAYBAR_RESTARTS != 6 ]; do # limited to 5 restars
  7. pgrep Hyprland || break # exit if Hyprland is not running
  8. waybar
  9. let WAYBAR_RESTARTS++
  10. notify-send -a "start-in-tray.sh" "Waybar crashed!"
  11. sleep 1
  12. done
  13. }
  14. # wait for xdg-desktop-portal-hyprland to start
  15. until pgrep -f 'xdg-desktop-portal-hyprland'; do echo 'test' && sleep 2; done
  16. # override monitor for workspace 2 and 4 with eDP-2
  17. # hyprctl monitors | grep eDP-2 && \
  18. # hyprctl --batch "keyword workspace 2,monitor:eDP-2 ; keyword workspace 4,monitor:eDP-2"
  19. waybar_loop &
  20. sleep 1 # wait for waybar
  21. nm-applet --indicator &
  22. # crow &
  23. # syncthingtray --wait &
  24. XDG_CURRENT_DESKTOP=gnome telegram-desktop &
  25. # blueman-applet &
  26. hyprctl dispatch workspace 1
  27. # hyprctl dispatch moveworkspacetomonitor 2 0