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.

52 lines
1.2 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. dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
  14. rm -rf $XDG_RUNTIME_DIR/day_cache
  15. export XSESSION_PID="$$"
  16. source ~/.config/config.env
  17. if ! xdpyinfo | grep -q VNC ; then
  18. pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga x11-bell
  19. pactl load-module module-x11-bell sample=x11-bell display=$DISPLAY
  20. fi
  21. xset b 100
  22. if ! xdpyinfo | grep -q VNC ; then
  23. xset s 600 600
  24. else
  25. echo "Running in VNC, disable screensaver"
  26. xset s off
  27. fi
  28. xrdb ~/.config/X11/Xresources &
  29. restarted=0
  30. while true;
  31. do
  32. if [ $restarted = 0 ]; then
  33. restarted=1
  34. else
  35. echo "Restarting DWM"
  36. notify-send -a " Desktop Manager" "Dwm Restarted"
  37. fi
  38. dwm > $XDG_RUNTIME_DIR/dwm.log 2> $XDG_RUNTIME_DIR/dwm.err
  39. sleep 0.5
  40. done