Username77177

SaveMyEyes(Linux_Script)

Feb 2nd, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2. while :
  3. do
  4.     notify-send "Display will turn off in 30 minutes" -u critical
  5.     sleep 1680
  6.     notify-send "Display will turn off in 2 minutes for 5 minutes" -u critical
  7.     sleep 120
  8.     # an half hour
  9.  
  10.     xset -display :0.0 dpms force off
  11.     # turn off display
  12.     sleep 300
  13.     # 5 minutes
  14.     xset -display :0.0 dpms force on
  15.     # turn on display
  16.  
  17. done
Advertisement
Add Comment
Please, Sign In to add comment