EXWM: Avoid going to suspend twice too often.

master
Pierre Neidhardt 2019-06-24 10:07:25 +02:00
parent 17d19f9853
commit 31df902f4f
1 changed files with 6 additions and 1 deletions

View File

@ -165,7 +165,12 @@
(defun ambrevar/suspend-to-sleep ()
(interactive)
(call-process "loginctl" nil nil nil "suspend"))
(recentf-save-list)
(call-process "dbus-send" nil nil nil
"--system" "--print-reply" "--dest=org.freedesktop.login1"
"/org/freedesktop/login1"
"org.freedesktop.login1.Manager.Suspend"
"boolean:true"))
(exwm-input-set-key (kbd "s-Z") #'ambrevar/suspend-to-sleep)
;;; Volume control