Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

50 lines
1.1 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
  1. #!/bin/bash
  2. pkill -f clipmenud
  3. pkill -9 devmon
  4. pkill -f "bash /sbin/clipmenud"
  5. pkill -f "/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh"
  6. pkill -f devmon
  7. cat << EOF > "$XDG_CACHE_HOME/dbus_settings"
  8. export DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS
  9. export DBUS_SESSION_BUS_PID=$DBUS_SESSION_BUS_PID
  10. export DBUS_SESSION_BUS_WINDOWID=$DBUS_SESSION_BUS_WINDOWID
  11. EOF
  12. chmod +x "$XDG_CACHE_HOME/dbus_settings"
  13. rm -rf $XDG_RUNTIME_DIR/day_cache
  14. export XSESSION_PID="$$"
  15. source ~/.config/config.env
  16. if ! xdpyinfo | grep -q VNC ; then
  17. pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga x11-bell
  18. pactl load-module module-x11-bell sample=x11-bell display=$DISPLAY
  19. fi
  20. xset b 100
  21. if ! xdpyinfo | grep -q VNC ; then
  22. xset s 600 600
  23. else
  24. echo "Running in VNC, disable screensaver"
  25. xset s off
  26. fi
  27. xrdb ~/.config/X11/Xresources &
  28. restarted=0
  29. while true;
  30. do
  31. if [ $restarted = 0 ]; then
  32. restarted=1
  33. else
  34. echo "Restarting DWM"
  35. notify-send -a " Desktop Manager" "Dwm Restarted"
  36. fi
  37. dwm > $XDG_RUNTIME_DIR/dwm.log 2> $XDG_RUNTIME_DIR/dwm.err
  38. sleep 0.5
  39. done