From: Christian Heller Date: Sun, 16 Apr 2017 05:00:35 +0000 (+0200) Subject: Add hotkeys to w530 config. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/do_todos?a=commitdiff_plain;h=77e7c55b878b35a41aace3d688ac9082f1795266;p=config Add hotkeys to w530 config. --- diff --git a/ansible/config.yml b/ansible/config.yml index fa4fadf..cdfec12 100644 --- a/ansible/config.yml +++ b/ansible/config.yml @@ -93,6 +93,13 @@ 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 index 0000000..f11bdfa --- /dev/null +++ b/ansible/files/apt-mark/hotkeys @@ -0,0 +1 @@ +acpid # captures hotkey presses and triggers respective /etc/acpi/events/* diff --git a/ansible/files/dirs b/ansible/files/dirs index 0739bb8..269b746 100644 --- a/ansible/files/dirs +++ b/ansible/files/dirs @@ -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 index 0000000..8d718d2 --- /dev/null +++ b/ansible/files/system/___etc___acpi___events___plom-brightness-down @@ -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 index 0000000..864ce5f --- /dev/null +++ b/ansible/files/system/___etc___acpi___events___plom-brightness-up @@ -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 index 0000000..2aab48e --- /dev/null +++ b/ansible/files/system/___etc___acpi___events___plom-micmute @@ -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 index 0000000..3c40988 --- /dev/null +++ b/ansible/files/system/___etc___acpi___events___plom-mute @@ -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 index 0000000..7658b1c --- /dev/null +++ b/ansible/files/system/___etc___acpi___events___plom-volume-down @@ -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 index 0000000..9ba779f --- /dev/null +++ b/ansible/files/system/___etc___acpi___events___plom-volume-up @@ -0,0 +1,2 @@ +event=button/volumeup +action=amixer set Master 10+