From 1c0c8e806575bd765efd27ceca61cd483d6ee46e Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 25 Oct 2017 01:16:00 +0000 Subject: [PATCH] mainentance xbindkeys --- tasks/mainentance.yml | 6 ++++++ templates/mainentance-xsession.sh.j2 | 1 + templates/mainentance.xbindkeys.j2 | 6 ++++++ 3 files changed, 13 insertions(+) create mode 100644 templates/mainentance.xbindkeys.j2 diff --git a/tasks/mainentance.yml b/tasks/mainentance.yml index 5c5a01f..2ef3e67 100644 --- a/tasks/mainentance.yml +++ b/tasks/mainentance.yml @@ -26,3 +26,9 @@ dest: /usr/local/share/mainentance/xsession mode: u=rwx,g=rx,o=rx notify: restart lightdm + +- name: mainentance xbindkeys + template: + src: mainentance.xbindkeys.j2 + dest: /usr/local/share/mainentance/xbindkeys + notify: restart lightdm diff --git a/templates/mainentance-xsession.sh.j2 b/templates/mainentance-xsession.sh.j2 index e548848..a11904c 100644 --- a/templates/mainentance-xsession.sh.j2 +++ b/templates/mainentance-xsession.sh.j2 @@ -2,4 +2,5 @@ {{ ansible_managed | comment }} xset -dpms xset s off +xbindkeys -f /usr/local/share/mainentance/xbindkeys & exec yad --no-buttons --no-escape --image-on-top --center --borders 50 --image="{{display_manager_mainentance_icon}}" --text="{{display_manager_mainentance_text}}" diff --git a/templates/mainentance.xbindkeys.j2 b/templates/mainentance.xbindkeys.j2 new file mode 100644 index 0000000..c1d01db --- /dev/null +++ b/templates/mainentance.xbindkeys.j2 @@ -0,0 +1,6 @@ +"dm-tool switch-to-greeter" + Mod4 + Escape +"systemctl reboot" + Mod4 + r +"systemctl poweroff" + Mod4 + p