home · contact · privacy
Add hotkeys to w530 config.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 16 Apr 2017 05:00:35 +0000 (07:00 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 16 Apr 2017 05:00:35 +0000 (07:00 +0200)
ansible/config.yml
ansible/files/apt-mark/hotkeys [new file with mode: 0644]
ansible/files/dirs
ansible/files/system/___etc___acpi___events___plom-brightness-down [new file with mode: 0644]
ansible/files/system/___etc___acpi___events___plom-brightness-up [new file with mode: 0644]
ansible/files/system/___etc___acpi___events___plom-micmute [new file with mode: 0644]
ansible/files/system/___etc___acpi___events___plom-mute [new file with mode: 0644]
ansible/files/system/___etc___acpi___events___plom-volume-down [new file with mode: 0644]
ansible/files/system/___etc___acpi___events___plom-volume-up [new file with mode: 0644]

index fa4fadf32b5f48d742b3cabdfeffd85d5ed452d9..cdfec12c2669efda0abf6d7795cd3ca1329098d2 100644 (file)
     apt: name={{item}} state=present
     with_lines: cat ~/config/ansible/files/apt-mark/multimedia | sed -e 's/ *#.*$//'
 
+  # Ensure hotkeys.
+  #
+  # For some reason, the brightness hotkeys still won't be available unless acpid is restarted (yes, after reboot).
+  - name: ensure hotkeys 
+    apt: name={{item}} state=present
+    with_lines: cat ~/config/ansible/files/apt-mark/hotkeys | sed -e 's/ *#.*$//'
+
   # Remove undesired packages
   - name: collect desired packages
     shell: cat files/apt-mark/*  | sed -e 's/ *#.*$//' > /tmp/white_list_unsorted && sort /tmp/white_list_unsorted > /tmp/white_list_sorted
diff --git a/ansible/files/apt-mark/hotkeys b/ansible/files/apt-mark/hotkeys
new file mode 100644 (file)
index 0000000..f11bdfa
--- /dev/null
@@ -0,0 +1 @@
+acpid  # captures hotkey presses and triggers respective /etc/acpi/events/*
index 0739bb878c8b717dde4fa511f2fa0ace920b4262..269b746720a452f7425af6a31a966ae337b5cae8 100644 (file)
@@ -1 +1,2 @@
 /etc/wicd
+/etc/acpi/events
diff --git a/ansible/files/system/___etc___acpi___events___plom-brightness-down b/ansible/files/system/___etc___acpi___events___plom-brightness-down
new file mode 100644 (file)
index 0000000..8d718d2
--- /dev/null
@@ -0,0 +1,2 @@
+event=video/brightnessdown
+action=/root/config/bin/w530_backlight.sh -
diff --git a/ansible/files/system/___etc___acpi___events___plom-brightness-up b/ansible/files/system/___etc___acpi___events___plom-brightness-up
new file mode 100644 (file)
index 0000000..864ce5f
--- /dev/null
@@ -0,0 +1,2 @@
+event=video/brightnessup
+action=/root/config/bin/w530_backlight.sh +
diff --git a/ansible/files/system/___etc___acpi___events___plom-micmute b/ansible/files/system/___etc___acpi___events___plom-micmute
new file mode 100644 (file)
index 0000000..2aab48e
--- /dev/null
@@ -0,0 +1,2 @@
+event=button/f20
+action=amixer set Mic toggle
diff --git a/ansible/files/system/___etc___acpi___events___plom-mute b/ansible/files/system/___etc___acpi___events___plom-mute
new file mode 100644 (file)
index 0000000..3c40988
--- /dev/null
@@ -0,0 +1,2 @@
+event=button/mute
+action=amixer set Master toggle
diff --git a/ansible/files/system/___etc___acpi___events___plom-volume-down b/ansible/files/system/___etc___acpi___events___plom-volume-down
new file mode 100644 (file)
index 0000000..7658b1c
--- /dev/null
@@ -0,0 +1,2 @@
+event=button/volumedown
+action=amixer set Master 10-
diff --git a/ansible/files/system/___etc___acpi___events___plom-volume-up b/ansible/files/system/___etc___acpi___events___plom-volume-up
new file mode 100644 (file)
index 0000000..9ba779f
--- /dev/null
@@ -0,0 +1,2 @@
+event=button/volumeup
+action=amixer set Master 10+