Kaynağa Gözat

activation of screenserver for eralitex

master
ebeveyn
işleme
70c44ccf4d
3 değiştirilmiş dosya ile 44 ekleme ve 0 silme
  1. +16
    -0
      tasks/main.yaml
  2. +20
    -0
      templates/screensaver-settings.sh.j2
  3. +8
    -0
      templates/screensaver-start.sh.j2

+ 16
- 0
tasks/main.yaml Dosyayı Görüntüle

@@ -14,6 +14,10 @@
- xscreensaver-gl
- python3
- mate-power-manager
- xautolock
- xss-lock
- xbacklight
- i3lock

- name: gdmflexiserver dummy script
copy:
@@ -29,6 +33,18 @@
dest: /usr/local/bin/mate-screensaver-helper-inhibition
mode: 0755

- name: screensaver settings script
template:
src: screensaver-settings.sh.j2
dest: /usr/local/bin/screensaver-settings
mode: 0755

- name: screensaver start script
template:
src: screensaver-start.sh.j2
dest: /usr/local/bin/screensaver-start
mode: 0755

- import_role:
name: dconf-lock
vars:


+ 20
- 0
templates/screensaver-settings.sh.j2 Dosyayı Görüntüle

@@ -0,0 +1,20 @@
#!/bin/sh

# https://www.reddit.com/r/i3wm/comments/6gznzp/lock_screensaver_and_power_saving_how_to_trigger/

xset s on
xset +dpms

# xset s <n1> <n2>
# n1: is the time it takes to launch the first signal that the screen will be
# shutdown. Here we generally dim the screen a bit.
# n2: is the time after n1 that we launch the second signal.
# Here we lock the screen.
# With n1 = 60 and n2 = 30 the screen will be dimmed 60 seconds after the last
# time pc was not idle and 30 seconds later (90 seconds from last non-idle
# state) the screen will be locked.
xset s {{ screensaver_sleeptime | int * 60 }} {{ screensaver_locktime | int * 60 }}

# xset dpms <n>
# n: is the time from last non-idle state after which the screen will be shutdown.
xset dpms {{ screensaver_sleeptime | int * 60 }}

+ 8
- 0
templates/screensaver-start.sh.j2 Dosyayı Görüntüle

@@ -0,0 +1,8 @@
#!/bin/sh

/usr/local/bin/screensaver-settings

#exec xss-lock -- i3lock -c ff00ff
xss-lock -- mate-screensaver-command -l &

exec mate-screensaver