25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

screensaver-settings.sh.j2 792B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # https://www.reddit.com/r/i3wm/comments/6gznzp/lock_screensaver_and_power_saving_how_to_trigger/
  3. xset s on
  4. xset +dpms
  5. # xset s <n1> <n2>
  6. # n1: is the time it takes to launch the first signal that the screen will be
  7. # shutdown. Here we generally dim the screen a bit.
  8. # n2: is the time after n1 that we launch the second signal.
  9. # Here we lock the screen.
  10. # With n1 = 60 and n2 = 30 the screen will be dimmed 60 seconds after the last
  11. # time pc was not idle and 30 seconds later (90 seconds from last non-idle
  12. # state) the screen will be locked.
  13. xset s {{ screensaver_sleeptime | int * 60 }} {{ screensaver_locktime | int * 60 }}
  14. # xset dpms <n>
  15. # n: is the time from last non-idle state after which the screen will be shutdown.
  16. xset dpms {{ screensaver_sleeptime | int * 60 }}