stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show modeline when super key is pressed


From: Lillia
Subject: Re: Show modeline when super key is pressed
Date: Tue, 31 Dec 2024 19:17:33 +0000

> Interesting, I'll mess with it ASAP. Thanks!

Some additional code to allow holding super to display the mode line:

``` lisp
(defun custom-press-handler (code state)
  (declare (ignore state))
  (let ((super-keycodes (nth-value 6 (xlib:modifier-mapping *display*))))
    (when (member code super-keycodes :test #'=)
      (toggle-mode-line (current-screen) (current-head))
      t)))

(define-stump-event-handler :key-release (code state)
  (declare (ignore state))
  (let ((super-keycodes (nth-value 6 (xlib:modifier-mapping *display*))))
    (when (member code super-keycodes :test #'=)
      (toggle-mode-line (current-screen) (current-head))
      t)))

(setf *custom-key-event-handler* 'custom-press-handler)
```



reply via email to

[Prev in Thread] Current Thread [Next in Thread]