mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Activated lid switch, optimized zsh and more
This commit is contained in:
@@ -1,9 +1,39 @@
|
||||
---
|
||||
- name: Set HandleLidSwitch to hibernate in /etc/systemd/logind.conf
|
||||
- name: install setup-hibernate
|
||||
command:
|
||||
cmd: "pkgmgr install setup-hibernate --clone-mode https"
|
||||
become: true
|
||||
|
||||
- name: Setup hibernate
|
||||
command: setup-hibernate --non-interactive
|
||||
become: true
|
||||
|
||||
- name: Configure systemd lid switch behavior to hibernate on lid close (battery), lock on AC and docked
|
||||
become: yes
|
||||
lineinfile:
|
||||
path: /etc/systemd/logind.conf
|
||||
regexp: '^#?HandleLidSwitch='
|
||||
line: 'HandleLidSwitch=hibernate'
|
||||
backup: yes
|
||||
notify: Restart systemd-logind
|
||||
notify: Restart systemd-logind
|
||||
become: true
|
||||
|
||||
- name: Configure systemd to lock session when lid is closed on external power
|
||||
become: yes
|
||||
lineinfile:
|
||||
path: /etc/systemd/logind.conf
|
||||
regexp: '^#?HandleLidSwitchExternalPower='
|
||||
line: 'HandleLidSwitchExternalPower=lock'
|
||||
backup: yes
|
||||
notify: Restart systemd-logind
|
||||
become: true
|
||||
|
||||
- name: Configure systemd to lock session when lid is closed while docked
|
||||
become: yes
|
||||
lineinfile:
|
||||
path: /etc/systemd/logind.conf
|
||||
regexp: '^#?HandleLidSwitchDocked='
|
||||
line: 'HandleLidSwitchDocked=lock'
|
||||
backup: yes
|
||||
notify: Restart systemd-logind
|
||||
become: true
|
Reference in New Issue
Block a user