id
int64 0
45.1k
| file_name
stringlengths 4
68
| file_path
stringlengths 14
193
| content
stringlengths 32
9.62M
| size
int64 32
9.62M
| language
stringclasses 1
value | extension
stringclasses 6
values | total_lines
int64 1
136k
| avg_line_length
float64 3
903k
| max_line_length
int64 3
4.51M
| alphanum_fraction
float64 0
1
| repo_name
stringclasses 779
values | repo_stars
int64 0
882
| repo_forks
int64 0
108
| repo_open_issues
int64 0
90
| repo_license
stringclasses 8
values | repo_extraction_date
stringclasses 146
values | sha
stringlengths 64
64
| __index_level_0__
int64 0
45.1k
| exdup_ids_cmlisp_stkv2
listlengths 1
47
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,466 | clfswm-nw-hooks.lisp | LdBeth_CLFSWM/src/clfswm-nw-hooks.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: New window Hooks
;;;
;;; Those hooks can be set for each frame to manage new window when they are
;;; mapped.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;;; CONFIG - New window menu
;;;
;;; To add a new window hook (nw-hook):
;;; 1- define your own nw-hook
;;; 2- Define a seter function for your new hook
;;; 3- Register your new hook with register-nw-hook.
(defparameter *nw-hook-current-key* (char-code #\a))
(defparameter *permanent-nw-hook-frames* nil)
(defun set-nw-hook (hook)
"Set the hook of the current child"
(let ((frame (if (xlib:window-p (current-child))
(find-parent-frame (current-child))
(current-child))))
(unless (or (child-member frame *permanent-nw-hook-frames*)
(child-original-root-p frame))
(setf (frame-nw-hook frame) hook)
(leave-second-mode))))
(defun register-nw-hook (hook)
(add-menu-key 'frame-nw-hook-menu (code-char *nw-hook-current-key*) hook)
(incf *nw-hook-current-key*))
(defun default-window-placement (frame window)
(if (managed-window-p window frame)
(adapt-child-to-parent window frame)
(place-window-from-hints window)))
(defun leave-if-not-frame (child)
"Leave the child if it's not a frame"
(unless (frame-p child)
(leave-frame)
(select-previous-level)))
(defun clear-nw-hook (frame)
"Clear the frame new window hook"
(unless (child-member frame *permanent-nw-hook-frames*)
(setf (frame-nw-hook frame) nil)))
(defun clear-all-nw-hooks ()
"Clear all new window hooks for all frames"
(with-all-frames (*root-frame* frame)
(clear-nw-hook frame)))
(defun make-permanent-nw-hook-frame (frame)
"Prevent to add or delete a new window hook for this frame"
(when (frame-p frame)
(push frame *permanent-nw-hook-frames*)))
;;; Default frame new window hook
(defun default-frame-nw-hook (frame window)
"Open the next window in the current frame"
(declare (ignore frame))
(leave-if-not-frame (current-child))
(when (frame-p (current-child))
(pushnew window (frame-child (current-child))))
(default-window-placement (current-child) window)
t)
(defun set-default-frame-nw-hook ()
"Open the next window in the current frame"
(set-nw-hook #'default-frame-nw-hook))
(register-nw-hook 'set-default-frame-nw-hook)
;;; Open new window in current root hook
(defun open-in-current-root-nw-hook (frame window)
"Open the next window in the current root"
(clear-nw-hook frame)
(leave-if-not-frame (find-current-root))
(let ((root (find-current-root)))
(pushnew window (frame-child root))
(setf (current-child) (frame-selected-child root))
(default-window-placement root window))
t)
(defun set-open-in-current-root-nw-hook ()
"Open the next window in the current root"
(set-nw-hook #'open-in-current-root-nw-hook))
(register-nw-hook 'set-open-in-current-root-nw-hook)
;;; Open new window in a new frame in the current root hook
(defun open-in-new-frame-in-current-root-nw-hook (frame window)
"Open the next window in a new frame in the current root"
(clear-nw-hook frame)
(leave-if-not-frame (find-current-root))
(let ((new-frame (create-frame))
(root (find-current-root)))
(pushnew new-frame (frame-child root))
(pushnew window (frame-child new-frame))
(setf (current-child) new-frame)
(default-window-placement new-frame window))
t)
(defun set-open-in-new-frame-in-current-root-nw-hook ()
"Open the next window in a new frame in the current root"
(set-nw-hook #'open-in-new-frame-in-current-root-nw-hook))
(register-nw-hook 'set-open-in-new-frame-in-current-root-nw-hook)
;;; Open new window in a new frame in the root frame hook
(defun open-in-new-frame-in-root-frame-nw-hook (frame window)
"Open the next window in a new frame in the root frame"
(clear-nw-hook frame)
(let ((new-frame (create-frame))
(root (find-current-root)))
(pushnew new-frame (frame-child root))
(pushnew window (frame-child new-frame))
(switch-to-root-frame :show-later t)
(setf (current-child) root)
(set-layout-once #'tile-space-layout)
(setf (current-child) new-frame)
(default-window-placement new-frame window))
t)
(defun set-open-in-new-frame-in-root-frame-nw-hook ()
"Open the next window in a new frame in the root frame"
(set-nw-hook #'open-in-new-frame-in-root-frame-nw-hook))
(register-nw-hook 'set-open-in-new-frame-in-root-frame-nw-hook)
;;; Open new window in a new frame in the parent frame hook
(defun open-in-new-frame-in-parent-frame-nw-hook (frame window)
"Open the next window in a new frame in the parent frame"
(clear-nw-hook frame)
(let ((new-frame (create-frame))
(parent (find-parent-frame frame)))
(when parent
(pushnew new-frame (frame-child parent))
(pushnew window (frame-child new-frame))
(change-root (find-root parent) parent)
(setf (current-child) parent)
(set-layout-once #'tile-space-layout)
(setf (current-child) new-frame)
(default-window-placement new-frame window)
(show-all-children t)
t)))
(defun set-open-in-new-frame-in-parent-frame-nw-hook ()
"Open the next window in a new frame in the parent frame"
(set-nw-hook #'open-in-new-frame-in-parent-frame-nw-hook))
(register-nw-hook 'set-open-in-new-frame-in-parent-frame-nw-hook)
;;; Open a new window but leave the focus on the current child
(defun leave-focus-frame-nw-hook (frame window)
"Open the next window in the current frame and leave the focus on the current child"
(clear-nw-hook frame)
(leave-if-not-frame (current-child))
(when (frame-p (current-child))
(with-slots (child) (current-child)
(pushnew window child)
(setf child (rotate-list child))))
(default-window-placement (current-child) window)
t)
(defun set-leave-focus-frame-nw-hook ()
"Open the next window in the current frame and leave the focus on the current child"
(set-nw-hook #'leave-focus-frame-nw-hook))
(register-nw-hook 'set-leave-focus-frame-nw-hook)
(defun nw-hook-open-in-frame (window frame)
(when (frame-p frame)
(pushnew window (frame-child frame))
(unless (find-child-in-all-root frame)
(change-root (find-root frame) frame))
(setf (current-child) frame)
(focus-all-children window frame)
(default-window-placement frame window)
(show-all-children t)
t))
;;; Open a new window in a named frame
(defun named-frame-nw-hook (frame window)
(clear-nw-hook frame)
(let* ((frame-name (ask-frame-name "Open the next window in frame named:"))
(new-frame (find-frame-by-name frame-name)))
(nw-hook-open-in-frame window new-frame))
t)
(defun set-named-frame-nw-hook ()
"Open the next window in a named frame"
(set-nw-hook #'named-frame-nw-hook))
(register-nw-hook 'set-named-frame-nw-hook)
;;; Open a new window in a numbered frame
(defun numbered-frame-nw-hook (frame window)
(clear-nw-hook frame)
(let ((new-frame (find-frame-by-number (query-number "Open a new frame in the group numbered:"))))
(nw-hook-open-in-frame window new-frame))
t)
(defun set-numbered-frame-nw-hook ()
"Open the next window in a numbered frame"
(set-nw-hook #'numbered-frame-nw-hook))
(register-nw-hook 'set-numbered-frame-nw-hook)
;;; Absorb window.
;;; The frame absorb the new window if it match the nw-absorb-test
;;; frame data slot.
(defun absorb-window-nw-hook (frame window)
(let ((absorb-nw-test (frame-data-slot frame :nw-absorb-test)))
(when (and absorb-nw-test
(funcall absorb-nw-test window))
(pushnew window (frame-child frame))
(unless *in-process-existing-windows*
(unless (find-child-in-all-root frame)
(change-root (find-root frame) frame))
(setf (current-child) frame)
(focus-all-children window frame)
(default-window-placement frame window)
(show-all-children t))
(throw 'nw-hook-loop t)))
nil)
(defun set-absorb-window-nw-hook ()
"Open the window in this frame if it match nw-absorb-test"
(set-nw-hook #'absorb-window-nw-hook))
(register-nw-hook 'set-absorb-window-nw-hook)
(defun nw-absorb-test-class (class-string)
(lambda (c)
(and (xlib:window-p c)
(string-equal (xlib:get-wm-class c) class-string))))
| 9,351 | Common Lisp | .lisp | 221 | 38.959276 | 100 | 0.6871 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 11f9de75cdbe73d90d7879f2fb574dbca2d0e6321721c1efeafac4331e2aa2e9 | 6,466 | [
-1
] |
6,467 | clfswm-expose-mode.lisp | LdBeth_CLFSWM/src/clfswm-expose-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Expose functions - An expose like.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defparameter *expose-font* nil)
(defparameter *expose-selected-child* nil)
(defstruct expose-child number child key window gc string)
(defun leave-expose-mode ()
"Leave the expose mode"
(throw 'exit-expose-loop nil))
(defun valid-expose-mode ()
"Valid the expose mode"
(throw 'exit-expose-loop t))
(defun mouse-leave-expose-mode (window root-x root-y)
"Leave the expose mode"
(declare (ignore window root-x root-y))
(throw 'exit-expose-loop nil))
(defun mouse-valid-expose-mode (window root-x root-y)
"Valid the expose mode"
(declare (ignore window root-x root-y))
(throw 'exit-expose-loop t))
(defun expose-associate-keys ()
(let* ((all nil)
(new nil)
(all-numbers (loop for ec in *expose-child-list*
collect (expose-child-number ec))))
(with-all-children-reversed (*root-frame* child)
(unless (child-equal-p child *root-frame*)
(push child all)
(unless (member child *expose-child-list* :test #'child-equal-p :key #'expose-child-child)
(let ((number (find-free-number all-numbers)))
(push (make-expose-child :child child :number number :key (number->letter number)) new)
(push number all-numbers)))))
(append (remove-if-not (lambda (x) (member x all :test #'child-equal-p)) *expose-child-list*
:key #'expose-child-child)
(nreverse new))))
(defun expose-draw-letter ()
(dolist (ex-child *expose-child-list*)
(let ((window (expose-child-window ex-child))
(gc (expose-child-gc ex-child)))
(when (and window gc)
(clear-pixmap-buffer window gc)
(xlib:with-gcontext (gc :foreground (get-color (if (substring-equal *query-string* (expose-child-key ex-child))
*expose-foreground-letter*
*expose-foreground-letter-nok*))
:background (get-color (if (string-equal *query-string* (expose-child-key ex-child))
*expose-background-letter-match*
*expose-background*)))
(xlib:draw-image-glyphs *pixmap-buffer* gc
(xlib:max-char-width *expose-font*)
(+ (xlib:font-ascent *expose-font*) (xlib:font-descent *expose-font*))
(expose-child-key ex-child)))
(xlib:draw-glyphs *pixmap-buffer* gc
(xlib:max-char-width *expose-font*)
(+ (* 2 (xlib:font-ascent *expose-font*)) (xlib:font-descent *expose-font*) 1)
(expose-child-string ex-child))
(copy-pixmap-buffer window gc)))))
(defun expose-create-window (ex-child)
(let ((child (expose-child-child ex-child)))
(with-current-child (child)
(let* ((string (format nil "~A"
(if *expose-show-window-title*
(ensure-printable (child-fullname child))
"")))
(width (if *expose-show-window-title*
(min (* (xlib:max-char-width *expose-font*) (+ (length string) 2))
(- (child-width child) 4))
(* (xlib:max-char-width *expose-font*) 3)))
(height (* (xlib:font-ascent *expose-font*) 3)))
(with-placement (*expose-mode-placement* x y width height)
(let* ((window (xlib:create-window :parent *root*
:x x :y y
:width width :height height
:background (get-color *expose-background*)
:border-width *border-size*
:border (get-color *expose-border*)
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure :key-press)))
(gc (xlib:create-gcontext :drawable window
:foreground (get-color *expose-foreground*)
:background (get-color *expose-background*)
:font *expose-font*
:line-style :solid)))
(setf (window-transparency window) *expose-transparency*)
(map-window window)
(setf (expose-child-window ex-child) window
(expose-child-gc ex-child) gc
(expose-child-string ex-child) string)))))))
(defun expose-query-key-press-hook (code state)
(declare (ignore code state))
(expose-draw-letter)
(let ((two-letters-key (dolist (child *expose-child-list*)
(when (> (length (expose-child-key child)) 1)
(return t)))))
(when (and *expose-direct-select* (not two-letters-key))
(leave-query-mode :return))))
(defun expose-query-button-press-hook (code state x y)
(declare (ignore state))
(when (= code 1)
(setf *expose-selected-child*
(find (find-child-under-mouse x y) *expose-child-list* :test #'child-equal-p :key #'expose-child-child)))
(leave-query-mode :click))
(defun expose-init ()
(setf *expose-font* (xlib:open-font *display* *expose-font-string*)
*expose-child-list* (expose-associate-keys)
*expose-selected-child* nil
*query-string* "")
(xlib:warp-pointer *root* (truncate (/ (screen-width) 2))
(truncate (/ (screen-height) 2)))
(add-hook *query-key-press-hook* 'expose-query-key-press-hook)
(add-hook *query-button-press-hook* 'expose-query-button-press-hook))
(defun expose-present-windows ()
(dolist (ex-child *expose-child-list*)
(let ((child (expose-child-child ex-child)))
(when (frame-p child)
(setf (frame-data-slot child :old-layout) (frame-layout child)
(frame-layout child) #'tile-space-layout))))
(show-all-children t))
(defun expose-unpresent-windows ()
(dolist (ex-child *expose-child-list*)
(let ((child (expose-child-child ex-child)))
(when (frame-p child)
(setf (frame-layout child) (frame-data-slot child :old-layout)
(frame-data-slot child :old-layout) nil)))))
(defun expose-mode-display-accel-windows ()
(let ((all-hidden-windows (get-hidden-windows)))
(with-all-root-child (root)
(with-all-children-reversed (root child)
(let ((ex-child (find child *expose-child-list* :test #'child-equal-p :key #'expose-child-child)))
(when ex-child
(if (or (frame-p (expose-child-child ex-child))
(managed-window-p (expose-child-child ex-child)
(find-parent-frame (expose-child-child ex-child) *root-frame*)))
(unless (child-member (expose-child-child ex-child) all-hidden-windows)
(expose-create-window ex-child))
(hide-child (expose-child-child ex-child)))))))
(expose-draw-letter)))
(defun expose-find-child-from-letters (letters)
(find letters *expose-child-list* :test #'string-equal :key #'expose-child-key))
(defun expose-select-child ()
(let ((*query-mode-placement* *expose-query-placement*))
(multiple-value-bind (letters return)
(query-string "Which child ?")
(let ((ex-child (case return
(:return (expose-find-child-from-letters letters))
(:click *expose-selected-child*))))
(when ex-child
(expose-child-child ex-child))))))
(defun expose-restore-windows (&optional (present-window t))
(remove-hook *query-key-press-hook* 'expose-query-key-press-hook)
(remove-hook *query-button-press-hook* 'expose-query-button-press-hook)
(dolist (ex-child *expose-child-list*)
(awhen (expose-child-gc ex-child)
(xlib:free-gcontext it))
(awhen (expose-child-window ex-child)
(xlib:destroy-window it))
(setf (expose-child-gc ex-child) nil
(expose-child-window ex-child) nil))
(when *expose-font*
(xlib:close-font *expose-font*))
(when present-window
(expose-unpresent-windows)))
(defun expose-focus-child (child)
(let ((parent (typecase child
(xlib:window (find-parent-frame child))
(frame child))))
(when (and child parent)
(change-root (find-root parent) parent)
(setf (current-child) child)
(focus-all-children child parent t))))
(defun expose-do-main (&optional (present-window t))
(stop-button-event)
(expose-init)
(when present-window
(expose-present-windows))
(expose-mode-display-accel-windows)
(let ((child (expose-select-child)))
(expose-restore-windows present-window)
child))
(defun expose-windows-mode ()
"Present all windows in currents roots (An expose like)"
(awhen (expose-do-main)
(expose-focus-child it))
(show-all-children)
t)
(defun expose-all-windows-mode ()
"Present all windows in all frames (An expose like)"
(let ((child nil))
(with-saved-root-list ()
(dolist (root (get-root-list))
(change-root root (root-original root)))
(setf child (expose-do-main)))
(when child
(expose-focus-child child)))
(show-all-children)
t)
(defun expose-current-child-mode ()
"Present all windows in currents roots (An expose like)"
(with-saved-root-list ()
(awhen (expose-do-main nil)
(expose-focus-child it)))
(show-all-children)
t)
| 10,748 | Common Lisp | .lisp | 224 | 38.334821 | 119 | 0.586306 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 4e29ef6600138430617648625f5890a5920bd78bc5e01409f7e0830adb190235 | 6,467 | [
-1
] |
6,468 | bindings-second-mode.lisp | LdBeth_CLFSWM/src/bindings-second-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Bindings keys and mouse for second mode
;;;
;;; Note: Mod-1 is the Alt or Meta key, Mod-2 is the Numlock key.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;;;,-----
;;;| Second keys
;;;|
;;;| CONFIG - Second mode bindings
;;;`-----
(add-hook *binding-hook* 'init-*second-keys* 'init-*second-mouse*)
(defun open-frame-menu ()
"Open the frame menu"
(open-menu (find-menu 'frame-menu)))
(defun open-window-menu ()
"Open the window menu"
(open-menu (find-menu 'window-menu)))
(defun open-action-by-name-menu ()
"Open the action by name menu"
(open-menu (find-menu 'action-by-name-menu)))
(defun open-action-by-number-menu ()
"Open the action by number menu"
(open-menu (find-menu 'action-by-number-menu)))
(defun open-frame-movement-menu ()
"Open the frame movement menu (pack/fill/resize)"
(open-menu (find-menu 'frame-movement-menu)))
(defun open-root-menu ()
"Open the root menu"
(open-menu (find-menu 'root-menu)))
(defun open-child-menu ()
"Open the child menu"
(open-menu (find-menu 'child-menu)))
(defun tile-current-frame ()
"Tile the current frame"
(set-layout-once #'tile-layout)
(leave-second-mode))
(defun stop-all-pending-actions ()
"Stop all pending actions"
(clear-all-nw-hooks)
(leave-second-mode))
;;; default shell programs
(defmacro define-shell (key name docstring cmd)
"Define a second key to start a shell command"
`(define-second-key ,key
(defun ,name ()
,docstring
(setf *second-mode-leave-function* (let ((cmd ,cmd))
(lambda ()
(do-shell cmd))))
(leave-second-mode))))
(defvar *xterm-cmd* "xterm")
(defvar *emacs-cmd* "emacs")
(defun set-default-second-keys ()
(define-second-key ("F1" :alt) 'help-on-clfswm)
(define-second-key ("m") 'open-menu)
(define-second-key ("less") 'open-menu)
(define-second-key ("less" :control) 'open-menu)
(define-second-key ("f") 'open-frame-menu)
(define-second-key ("w") 'open-window-menu)
(define-second-key ("n") 'open-action-by-name-menu)
(define-second-key ("u") 'open-action-by-number-menu)
(define-second-key ("p") 'open-frame-movement-menu)
(define-second-key ("r") 'open-root-menu)
(define-second-key ("c") 'open-child-menu)
(define-second-key ("x") 'update-layout-managed-children-position)
(define-second-key ("g" :control) 'stop-all-pending-actions)
(define-second-key ("q") 'sm-delete-focus-window)
(define-second-key ("k") 'sm-ask-close/kill-current-window)
(define-second-key ("i") 'identify-key)
(define-second-key ("colon") 'eval-from-query-string)
(define-second-key ("exclam") 'run-program-from-query-string)
(define-second-key ("Return") 'leave-second-mode)
(define-second-key ("Escape") 'leave-second-mode)
(define-second-key ("t" :shift) 'tile-current-frame)
(define-second-key ("Home" :prefix :control :shift) 'exit-clfswm)
(define-second-key ("Right" :prefix) 'select-next-brother)
(define-second-key ("Left" :prefix) 'select-previous-brother)
(define-second-key ("Right" :prefix :shift) 'select-next-brother-take-current)
(define-second-key ("Left" :prefix :shift) 'select-previous-brother-take-current)
(define-second-key ("Down" :prefix) 'select-previous-level)
(define-second-key ("Up" :prefix) 'select-next-level)
(define-second-key ("Left" :control :prefix) 'select-brother-spatial-move-left)
(define-second-key ("Right" :control :prefix) 'select-brother-spatial-move-right)
(define-second-key ("Up" :control :prefix) 'select-brother-spatial-move-up)
(define-second-key ("Down" :control :prefix) 'select-brother-spatial-move-down)
(define-second-key ("Left" :control :prefix :shift) 'select-brother-spatial-move-left-take-current)
(define-second-key ("Right" :control :prefix :shift) 'select-brother-spatial-move-right-take-current)
(define-second-key ("Up" :control :prefix :shift) 'select-brother-spatial-move-up-take-current)
(define-second-key ("Down" :control :prefix :shift) 'select-brother-spatial-move-down-take-current)
(define-second-key ("j") 'swap-frame-geometry)
(define-second-key ("h") 'rotate-frame-geometry)
(define-second-key ("h" :shift) 'anti-rotate-frame-geometry)
(define-second-key ("Page_Up") 'select-next-root)
(define-second-key ("Page_Down") 'select-previous-root)
(define-second-key ("Page_Up" :control) 'rotate-root-geometry-next)
(define-second-key ("Page_Down" :control) 'rotate-root-geometry-previous)
(define-second-key ("Right") 'speed-mouse-right)
(define-second-key ("Left") 'speed-mouse-left)
(define-second-key ("Down") 'speed-mouse-down)
(define-second-key ("Up") 'speed-mouse-up)
(define-second-key ("Left" :control) 'speed-mouse-undo)
(define-second-key ("Up" :control) 'speed-mouse-first-history)
(define-second-key ("Down" :control) 'speed-mouse-reset)
(define-second-key ("Tab" :prefix) 'select-next-child)
(define-second-key ("Tab" :prefix :shift) 'select-previous-child)
(define-second-key ("Tab" :prefix :control) 'select-next-subchild)
(define-second-key ("Tab") 'switch-to-last-child)
(define-second-key ("Return" :prefix) 'enter-frame)
(define-second-key ("Return" :prefix :shift) 'leave-frame)
(define-second-key ("Return" :prefix :control) 'frame-toggle-maximize)
(define-second-key ("Return" :mod-5) 'frame-toggle-maximize)
(define-second-key ("Page_Up" :prefix) 'frame-lower-child)
(define-second-key ("Page_Down" :prefix) 'frame-raise-child)
(define-second-key ("Home" :prefix) 'switch-to-root-frame)
(define-second-key ("Home" :prefix :shift) 'switch-and-select-root-frame)
(define-second-key ("Menu") 'toggle-show-root-frame)
(define-second-key ("F4") 'toggle-show-root-frame)
(define-second-key ("b" :prefix) 'banish-pointer)
(define-second-key ("o") 'set-open-in-new-frame-in-parent-frame-nw-hook)
(define-second-key ("o" :control) 'set-open-in-new-frame-in-root-frame-nw-hook)
(define-second-key ("a") 'add-default-frame)
(define-second-key ("a" :control) 'add-frame-in-parent-frame)
(define-second-key ("plus") 'inc-tile-layout-size)
(define-second-key ("minus") 'dec-tile-layout-size)
(define-second-key ("plus" :control) 'inc-slow-tile-layout-size)
(define-second-key ("minus" :control) 'dec-slow-tile-layout-size)
;; Escape
(define-second-key ("Escape" :control) 'ask-close/kill-current-window)
;; Selection
(define-second-key ("x" :control) 'cut-current-child)
(define-second-key ("x" :control :prefix) 'clear-selection)
(define-second-key ("c" :control) 'copy-current-child)
(define-second-key ("v" :control) 'paste-selection)
(define-second-key ("v" :control :shift) 'paste-selection-no-clear)
(define-second-key ("Delete" :control) 'remove-current-child)
(define-second-key ("Delete") 'delete-current-child)
(define-shell ("t") b-start-xterm
"start an xterm" (concat "cd $HOME && exec " *xterm-cmd*))
(define-shell ("e") b-start-emacs
"start emacs" (concat "cd $HOME && exec " *emacs-cmd*))
;;(define-shell ("e" :control) b-start-emacsremote
;; "start an emacs for another user"
;; "exec xterm -e emacsremote")
(define-second-key ("F10" :alt) 'fast-layout-switch)
(define-second-key ("F10" :shift :control) 'toggle-show-root-frame)
(define-second-key ("F10") 'expose-windows-mode)
(define-second-key ("F10" :control) 'expose-all-windows-mode)
(define-second-key ("F12" :shift) 'show-all-frames-info-key)
(define-second-key ("F12" :shift :prefix) 'show-all-frames-info)
;; Bind or jump functions
(define-second-key ("1" :prefix) 'bind-or-jump 1)
(define-second-key ("2" :prefix) 'bind-or-jump 2)
(define-second-key ("3" :prefix) 'bind-or-jump 3)
(define-second-key ("4" :prefix) 'bind-or-jump 4)
(define-second-key ("5" :prefix) 'bind-or-jump 5)
(define-second-key ("6" :prefix) 'bind-or-jump 6)
(define-second-key ("7" :prefix) 'bind-or-jump 7)
(define-second-key ("8" :prefix) 'bind-or-jump 8)
(define-second-key ("9" :prefix) 'bind-or-jump 9)
(define-second-key ("0" :prefix) 'bind-or-jump 10)
;;; Transparency
(define-second-key ("t" :control :shift) 'key-inc-transparency)
(define-second-key ("t" :control) 'key-dec-transparency))
(add-hook *binding-hook* 'set-default-second-keys)
;;; Mouse action
(defun sm-mouse-click-to-focus-and-move (window root-x root-y)
"Move and focus the current child - Create a new frame on the root window.
Or do corners actions"
(declare (ignore window))
(or (do-corner-action root-x root-y *corner-second-mode-left-button*)
(mouse-focus-move/resize-generic root-x root-y #'move-frame nil)))
(defun sm-mouse-click-to-focus-and-resize (window root-x root-y)
"Resize and focus the current child - Create a new frame on the root window.
Or do corners actions"
(declare (ignore window))
(or (do-corner-action root-x root-y *corner-second-mode-right-button*)
(mouse-focus-move/resize-generic root-x root-y #'resize-frame nil)))
(defun sm-mouse-middle-click (window root-x root-y)
"Do actions on corners"
(declare (ignore window))
(or (do-corner-action root-x root-y *corner-second-mode-middle-button*)
(replay-button-event)))
(defun sm-mouse-select-next-level (window root-x root-y)
"Select the next level in frame"
(declare (ignore window root-x root-y))
(select-next-level))
(defun sm-mouse-select-previous-level (window root-x root-y)
"Select the previous level in frame"
(declare (ignore window root-x root-y))
(select-previous-level))
(defun sm-mouse-enter-frame (window root-x root-y)
"Enter in the selected frame - ie make it the root frame"
(declare (ignore window root-x root-y))
(enter-frame))
(defun sm-mouse-leave-frame (window root-x root-y)
"Leave the selected frame - ie make its parent the root frame"
(declare (ignore window root-x root-y))
(leave-frame))
(defun sm-mouse-click-to-focus-and-move-window (window root-x root-y)
"Move and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(mouse-focus-move/resize-generic root-x root-y #'move-frame t))
(defun sm-mouse-click-to-focus-and-resize-window (window root-x root-y)
"Resize and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(mouse-focus-move/resize-generic root-x root-y #'resize-frame t))
(defun sm-mouse-click-to-focus-and-move-window-constrained (window root-x root-y)
"Move (constrained by other frames) and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(mouse-focus-move/resize-generic root-x root-y #'move-frame-constrained t))
(defun sm-mouse-click-to-focus-and-resize-window-constrained (window root-x root-y)
"Resize (constrained by other frames) and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(mouse-focus-move/resize-generic root-x root-y #'resize-frame-constrained t))
(defun set-default-second-mouse ()
(define-second-mouse (1) 'sm-mouse-click-to-focus-and-move)
(define-second-mouse (2) 'sm-mouse-middle-click)
(define-second-mouse (3) 'sm-mouse-click-to-focus-and-resize)
(define-second-mouse (1 :prefix) 'sm-mouse-click-to-focus-and-move-window)
(define-second-mouse (3 :prefix) 'sm-mouse-click-to-focus-and-resize-window)
(define-second-mouse (1 :prefix :shift) 'sm-mouse-click-to-focus-and-move-window-constrained)
(define-second-mouse (3 :prefix :shift) 'sm-mouse-click-to-focus-and-resize-window-constrained)
(define-second-mouse (1 :control :prefix) 'mouse-move-child-over-frame)
(define-second-mouse (4) 'sm-mouse-select-next-level)
(define-second-mouse (5) 'sm-mouse-select-previous-level)
(define-second-mouse (4 :prefix) 'sm-mouse-enter-frame)
(define-second-mouse (5 :prefix) 'sm-mouse-leave-frame))
(add-hook *binding-hook* 'set-default-second-mouse)
| 12,936 | Common Lisp | .lisp | 250 | 48.876 | 108 | 0.69547 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | c128b5cd6db1093b64d61a9eafbd207c17ef730aa0e7f331a8686632380ea2f2 | 6,468 | [
-1
] |
6,469 | clfswm-info.lisp | LdBeth_CLFSWM/src/clfswm-info.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Info function (see the end of this file for user definition
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defstruct info window gc font list ilw ilh x y max-x max-y)
(defparameter *info-selected-item* nil)
(defun leave-info-mode (info)
"Leave the info mode"
(declare (ignore info))
(setf *info-selected-item* nil)
(throw 'exit-info-loop nil))
(defun leave-info-mode-and-valid (info)
"Leave the info mode and valid the selected item"
(declare (ignore info))
(throw 'exit-info-loop nil))
(defun mouse-leave-info-mode (window root-x root-y info)
"Leave the info mode"
(declare (ignore window root-x root-y info))
(setf *info-selected-item* nil)
(throw 'exit-info-loop nil))
(defun find-info-item-from-mouse (root-x root-y info)
(if (< (x-drawable-x (info-window info)) root-x
(+ (x-drawable-x (info-window info))
(x-drawable-width (info-window info))))
(truncate (/ (- (+ (- root-y (x-drawable-y (info-window info)))
(xlib:max-char-ascent (info-font info))
(info-y info)) (info-ilh info)) (info-ilh info)))
nil))
(defun set-info-item-form-mouse (root-x root-y info)
(setf *info-selected-item* (find-info-item-from-mouse root-x root-y info)))
(defun info-y-display-coords (info posy)
(- (+ (* (info-ilh info) posy) (info-ilh info)) (info-y info)))
(defun incf-info-selected-item (info n)
(setf *info-selected-item*
(min (if *info-selected-item*
(+ *info-selected-item* n)
0)
(1- (or (length (info-list info)) 1)))))
(defun decf-info-selected-item (info n)
(declare (ignore info))
(setf *info-selected-item*
(max (if *info-selected-item*
(- *info-selected-item* n)
0)
0)))
(defun draw-info-window (info)
(labels ((print-line (line posx posy &optional (color *info-foreground*))
(xlib:with-gcontext ((info-gc info) :foreground (get-color color)
:background (if (equal posy *info-selected-item*)
(get-color *info-selected-background*)
(get-color *info-background*)))
(funcall (if (equal posy *info-selected-item*)
#'xlib:draw-image-glyphs
#'xlib:draw-glyphs)
*pixmap-buffer* (info-gc info)
(- (+ (info-ilw info) (* posx (info-ilw info))) (info-x info))
(info-y-display-coords info posy)
(ensure-printable (format nil "~A" line))))
(+ posx (length line))))
(clear-pixmap-buffer (info-window info) (info-gc info))
(loop for line in (info-list info)
for y from 0
do (typecase line
(cons (typecase (first line)
(cons (let ((posx 0))
(dolist (l line)
(typecase l
(cons (setf posx (print-line (first l) posx y (second l))))
(t (setf posx (print-line l posx y)))))))
(t (print-line (first line) 0 y (second line)))))
(t (print-line line 0 y))))
(copy-pixmap-buffer (info-window info) (info-gc info))))
;;;,-----
;;;| Key binding
;;;`-----
(add-hook *binding-hook* 'init-*info-keys* 'init-*info-mouse*)
(defun set-default-info-keys ()
(define-info-key (#\q) 'leave-info-mode)
(define-info-key ("Return") 'leave-info-mode-and-valid)
(define-info-key ("KP_Enter" :mod-2) 'leave-info-mode-and-valid)
(define-info-key ("space") 'leave-info-mode-and-valid)
(define-info-key ("Escape") 'leave-info-mode)
(define-info-key ("g" :control) 'leave-info-mode)
(define-info-key ("twosuperior")
(defun info-banish-pointer (info)
"Move the pointer to the lower right corner of the screen"
(declare (ignore info))
(banish-pointer)))
(define-info-key ("Down")
(defun info-next-line (info)
"Move one line down"
(incf-info-selected-item info 1)
(when (> (info-y-display-coords info *info-selected-item*)
(+ (x-drawable-y (info-window info))
(x-drawable-height (info-window info))))
(setf (info-y info) (min (+ (info-y info) (info-ilh info)) (info-max-y info))))
(draw-info-window info)))
(define-info-key ("Up")
(defun info-previous-line (info)
"Move one line up"
(decf-info-selected-item info 1)
(when (< (info-y-display-coords info *info-selected-item*)
(+ (x-drawable-y (info-window info))
(info-ilh info)))
(setf (info-y info) (max (- (info-y info) (info-ilh info)) 0)))
(draw-info-window info)))
(define-info-key ("Left")
(defun info-previous-char (info)
"Move one char left"
(setf (info-x info) (max (- (info-x info) (info-ilw info)) 0))
(draw-info-window info)))
(define-info-key ("Right")
(defun info-next-char (info)
"Move one char right"
(setf (info-x info) (min (+ (info-x info) (info-ilw info)) (info-max-x info)))
(draw-info-window info)))
(define-info-key ("Home")
(defun info-first-line (info)
"Move to first line"
(setf (info-x info) 0
(info-y info) 0)
(setf *info-selected-item* 0)
(draw-info-window info)))
(define-info-key ("End")
(defun info-end-line (info)
"Move to last line"
(setf (info-x info) 0
(info-y info) (- (* (length (info-list info)) (info-ilh info)) (x-drawable-height (info-window info))))
(setf *info-selected-item* (1- (or (length (info-list info)) 1)))
(draw-info-window info)))
(define-info-key ("Page_Down")
(defun info-next-ten-lines (info)
"Move ten lines down"
(incf-info-selected-item info 10)
(when (> (info-y-display-coords info *info-selected-item*)
(+ (x-drawable-y (info-window info))
(x-drawable-height (info-window info))))
(setf (info-y info) (min (+ (info-y info) (* (info-ilh info) 10)) (info-max-y info))))
(draw-info-window info)))
(define-info-key ("Page_Up")
(defun info-previous-ten-lines (info)
"Move ten lines up"
(decf-info-selected-item info 10)
(when (< (info-y-display-coords info *info-selected-item*)
(+ (x-drawable-y (info-window info))
(info-ilh info)))
(setf (info-y info) (max (- (info-y info) (* (info-ilh info) 10)) 0)))
(draw-info-window info))))
(add-hook *binding-hook* 'set-default-info-keys)
(defparameter *info-start-grab-x* nil)
(defparameter *info-start-grab-y* nil)
(defun info-begin-grab (window root-x root-y info)
"Begin grab text"
(declare (ignore window))
(setf *info-start-grab-x* (min (max (+ root-x (info-x info)) 0) (info-max-x info))
*info-start-grab-y* (min (max (+ root-y (info-y info)) 0) (info-max-y info)))
(draw-info-window info))
(defun info-end-grab (window root-x root-y info)
"End grab"
(declare (ignore window))
(setf (info-x info) (min (max (- *info-start-grab-x* root-x) 0) (info-max-x info))
(info-y info) (min (max (- *info-start-grab-y* root-y) 0) (info-max-y info))
*info-start-grab-x* nil
*info-start-grab-y* nil)
(draw-info-window info))
(defun info-mouse-next-line (window root-x root-y info)
"Move one line down"
(declare (ignore window))
(setf (info-y info) (min (+ (info-y info) (info-ilh info)) (info-max-y info)))
(set-info-item-form-mouse root-x root-y info)
(draw-info-window info))
(defun info-mouse-previous-line (window root-x root-y info)
"Move one line up"
(declare (ignore window))
(setf (info-y info) (max (- (info-y info) (info-ilh info)) 0))
(set-info-item-form-mouse root-x root-y info)
(draw-info-window info))
(defun info-mouse-motion-drag (window root-x root-y info)
"Grab text"
(declare (ignore window))
(when (and *info-start-grab-x* *info-start-grab-y*)
(setf (info-x info) (min (max (- *info-start-grab-x* root-x) 0) (info-max-x info))
(info-y info) (min (max (- *info-start-grab-y* root-y) 0) (info-max-y info)))
(draw-info-window info)))
(defun info-mouse-select-item (window root-x root-y info)
(declare (ignore window))
(set-info-item-form-mouse root-x root-y info)
(leave-info-mode-and-valid info))
(defun info-mouse-motion-click (window root-x root-y info)
(declare (ignore window))
(let ((last *info-selected-item*))
(set-info-item-form-mouse root-x root-y info)
(unless (equal last *info-selected-item*)
(draw-info-window info))))
(defun set-default-info-mouse ()
(if *info-click-to-select*
(define-info-mouse (1) nil 'info-mouse-select-item)
(define-info-mouse (1) 'info-begin-grab 'info-end-grab))
(define-info-mouse (2) 'mouse-leave-info-mode)
(define-info-mouse (3) 'mouse-leave-info-mode)
(define-info-mouse (4) 'info-mouse-previous-line)
(define-info-mouse (5) 'info-mouse-next-line)
(if *info-click-to-select*
(define-info-mouse ('motion) 'info-mouse-motion-click nil)
(define-info-mouse ('motion) 'info-mouse-motion-drag nil)))
(add-hook *binding-hook* 'set-default-info-mouse)
(let (info)
(define-handler info-mode :key-press (code state)
(funcall-key-from-code *info-keys* code state info))
(define-handler info-mode :motion-notify (window root-x root-y)
(unless (compress-motion-notify)
(funcall-button-from-code *info-mouse* 'motion (modifiers->state *default-modifiers*)
window root-x root-y *fun-press* (list info))))
(define-handler info-mode :button-press (window root-x root-y code state)
(funcall-button-from-code *info-mouse* code state window root-x root-y *fun-press* (list info)))
(define-handler info-mode :button-release (window root-x root-y code state)
(funcall-button-from-code *info-mouse* code state window root-x root-y *fun-release* (list info)))
(defun info-mode (info-list &key (width nil) (height nil))
"Open the info mode. Info-list is a list of info: One string per line
Or for colored output: a list (line_string color)
Or ((1_word color) (2_word color) 3_word (4_word color)...)"
(when info-list
(setf *info-selected-item* 0)
(labels ((compute-size (line)
(typecase line
(cons (typecase (first line)
(cons (let ((val 0))
(dolist (l line val)
(incf val (typecase l
(cons (length (first l)))
(t (length l)))))))
(t (length (first line)))))
(t (length line)))))
(let* ((font (xlib:open-font *display* *info-font-string*))
(ilw (xlib:max-char-width font))
(ilh (+ (xlib:max-char-ascent font) (xlib:max-char-descent font) 1))
(width (or width
(min (* (+ (loop for l in info-list maximize (compute-size l)) 2) ilw)
(screen-width))))
(height (or height
(min (round (+ (* (length info-list) ilh) (/ ilh 2)))
(screen-height)))))
(with-placement (*info-mode-placement* x y width height)
(let* ((window (xlib:create-window :parent *root*
:x x :y y
:width width
:height height
:background (get-color *info-background*)
:colormap (xlib:screen-default-colormap *screen*)
:border-width *border-size*
:border (get-color *info-border*)
:event-mask '(:exposure)))
(gc (xlib:create-gcontext :drawable window
:foreground (get-color *info-foreground*)
:background (get-color *info-background*)
:font font
:line-style :solid)))
(setf info (make-info :window window :gc gc :x 0 :y 0 :list info-list
:font font :ilw ilw :ilh ilh
:max-x (* (loop for l in info-list maximize (compute-size l)) ilw)
:max-y (* (length info-list) ilh)))
(setf (window-transparency window) *info-transparency*)
(map-window window)
(draw-info-window info)
(wait-no-key-or-button-press)
(with-grab-keyboard-and-pointer (68 69 66 67)
(generic-mode 'info-mode 'exit-info-loop
:original-mode '(main-mode)))
(xlib:free-gcontext gc)
(xlib:destroy-window window)
(xlib:close-font font)
(xlib:display-finish-output *display*)
(display-all-frame-info)
(wait-no-key-or-button-press)
*info-selected-item*)))))))
(defun info-mode-menu (item-list &key (width nil) (height nil))
"Open an info help menu.
Item-list is: '((key function) separator (key function))
or with explicit docstring: '((key function \"documentation 1\") (key function \"bla bla\") (key function))
key is a character, a keycode or a keysym
Separator is a string or a symbol (all but a list)
Function can be a function or a list (function color) for colored output"
(let ((info-list nil)
(action nil)
(old-info-keys (copy-hash-table *info-keys*)))
(labels ((define-key (key function)
(define-info-key-fun (list key)
(lambda (&optional args)
(declare (ignore args))
(setf action function)
(leave-info-mode nil)))))
(dolist (item item-list)
(typecase item
(cons (destructuring-bind (key function explicit-doc) (ensure-n-elems item 3)
(typecase function
(cons (push (list (list (format nil "~A" key) *menu-color-menu-key*)
(list (format nil ": ~A" (or explicit-doc (documentation (first function) 'function)))
(second function)))
info-list)
(define-key key (first function)))
(t (push (list (list (format nil "~A" key) *menu-color-key*)
(format nil ": ~A" (or explicit-doc (documentation function 'function))))
info-list)
(define-key key function)))))
(t (push (list (format nil "-=- ~A -=-" item) *menu-color-comment*) info-list))))
(let ((selected-item (info-mode (nreverse info-list) :width width :height height)))
(setf *info-keys* old-info-keys)
(when selected-item
(awhen (nth selected-item item-list)
(when (consp it)
(destructuring-bind (key function explicit-doc) (ensure-n-elems it 3)
(declare (ignore key explicit-doc))
(typecase function
(cons (setf action (first function)))
(t (setf action function)))))))
(typecase action
(function (funcall action))
(symbol (when (fboundp action)
(funcall action))))))))
(defun keys-from-list (list)
"Produce a key menu based on list item"
(loop for l in list
for i from 0
collect (list (number->char i) l)))
;;;,-----
;;;| CONFIG - Info mode functions
;;;`-----
(defun key-binding-colorize-line (list); FIXME: Use a parameter instead of hard code
(loop :for line :in list
:collect (cond ((search "* CLFSWM Keys *" line) (list line *info-color-title*))
((search "---" line) (list line *info-color-underline*))
((begin-with-2-spaces line)
(list (list (subseq line 0 22) *info-color-second*)
(list (subseq line 22 44) *info-color-first*)
(subseq line 44)))
(t line))))
(defun show-key-binding (&rest hash-table-key)
"Show the binding of each hash-table-key.
Pass the :no-producing-doc symbol to remove the producing doc"
(info-mode (key-binding-colorize-line
(split-string (append-newline-space
(with-output-to-string (stream)
(produce-doc (remove :no-producing-doc hash-table-key)
stream
(not (member :no-producing-doc hash-table-key)))))
#\Newline))))
(defun show-global-key-binding ()
"Show all key binding"
(show-key-binding *main-keys* *main-mouse* *second-keys* *second-mouse*
*info-keys* *info-mouse*))
(defun show-main-mode-key-binding ()
"Show the main mode binding"
(show-key-binding *main-keys* *main-mouse*))
(defun show-second-mode-key-binding ()
"Show the second mode key binding"
(show-key-binding *second-keys* *second-mouse*))
(defun show-circulate-mode-key-binding ()
"Show the circulate mode key binding"
(show-key-binding *circulate-keys*))
(defun show-expose-window-mode-key-binding ()
"Show the expose window mode key binding"
(show-key-binding *expose-keys* *expose-mouse*))
(defun show-first-aid-kit ()
"Show the first aid kit key binding"
(labels ((add-key (hash symbol &optional (hashkey *main-keys*))
(multiple-value-bind (k v)
(find-in-hash symbol hashkey)
(setf (gethash k hash) v))))
(let ((hash (make-hash-table :test #'equal))
(hash-second (make-hash-table :test #'equal)))
(setf (gethash 'name hash) "First aid kit - Main mode key binding"
(gethash 'name hash-second) "First aid kit - Second mode key binding")
(add-key hash 'select-next-child)
(add-key hash 'select-previous-child)
(add-key hash 'select-next-brother)
(add-key hash 'select-previous-brother)
(add-key hash 'select-previous-level)
(add-key hash 'select-next-level)
(add-key hash 'enter-frame)
(add-key hash 'leave-frame)
(add-key hash 'second-key-mode)
(add-key hash 'expose-windows-mode)
(add-key hash 'expose-all-windows-mode)
(add-key hash 'present-clfswm-terminal)
(add-key hash-second 'leave-second-mode *second-keys*)
(add-key hash-second 'open-menu *second-keys*)
(add-key hash-second 'run-program-from-query-string *second-keys*)
(add-key hash-second 'eval-from-query-string *second-keys*)
(add-key hash-second 'set-open-in-new-frame-in-parent-frame-nw-hook *second-keys*)
(add-key hash-second 'b-start-xterm *second-keys*)
(add-key hash-second 'b-start-emacs *second-keys*)
(show-key-binding hash hash-second :no-producing-doc))))
(defun corner-help-colorize-line (list)
(loop :for line :in list
:collect (cond ((search "CLFSWM:" line) (list line *info-color-title*))
((search "*:" line) (list line *info-color-underline*))
((begin-with-2-spaces line)
(let ((pos (position #\: line)))
(if pos
(list (list (subseq line 0 (1+ pos)) *info-color-first*)
(subseq line (1+ pos)))
line)))
(t line))))
(defun show-corner-help ()
"Help on clfswm corner"
(info-mode (corner-help-colorize-line
(split-string (append-newline-space
(with-output-to-string (stream)
(produce-corner-doc stream)))
#\Newline))))
(defun configuration-variable-colorize-line (list)
(loop :for line :in list
:collect (cond ((search "CLFSWM " line) (list line *info-color-title*))
((search "* =" line)
(let ((pos (position #\= line)))
(list (list (subseq line 0 (1+ pos)) *info-color-first*)
(list (subseq line (1+ pos)) *info-color-second*))))
((search "<=" line) (list line *info-color-underline*))
(t line))))
(defun show-config-variable ()
"Show all configurable variables"
(let ((result nil))
(labels ((rec ()
(setf result nil)
(info-mode-menu (loop :for group :in (config-all-groups)
:for i :from 0
:collect (list (number->char i)
(let ((group group))
(lambda ()
(setf result group)))
(config-group->string group))))
(when result
(info-mode (configuration-variable-colorize-line
(split-string (append-newline-space
(with-output-to-string (stream)
(produce-conf-var-doc stream result t nil)))
#\Newline)))
(rec))))
(rec))))
(defun show-date ()
"Show the current time and date"
(info-mode (list (list `("Current date:" ,*menu-color-comment*) (date-string)))))
(defun info-on-shell (msg program)
(let ((lines (do-shell program nil t)))
(info-mode (append (list (list msg *menu-color-comment*))
(loop for line = (read-line lines nil nil)
while line
collect (ensure-printable line))))))
(defun show-cpu-proc ()
"Show current processes sorted by CPU usage"
(info-on-shell "Current processes sorted by CPU usage:"
"ps --cols=1000 --sort='-%cpu,uid,pgid,ppid,pid' -e -o user,pid,stime,pcpu,pmem,args"))
(defun show-mem-proc ()
"Show current processes sorted by memory usage"
(info-on-shell "Current processes sorted by MEMORY usage:"
"ps --cols=1000 --sort='-vsz,uid,pgid,ppid,pid' -e -o user,pid,stime,pcpu,pmem,args"))
(defun show-cd-info ()
"Show the current CD track"
(info-on-shell "Current CD track:" "pcd i"))
(defun show-cd-playlist ()
"Show the current CD playlist"
(info-on-shell "Current CD playlist:" "pcd mi"))
(defun show-version ()
"Show the current CLFSWM version"
(info-mode (list *version*)))
| 21,100 | Common Lisp | .lisp | 486 | 38.166667 | 110 | 0.639311 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 92f42358e39cb592026a6e55c7a98ce736e1e1d64c911addf7ba1e41bd224cff | 6,469 | [
-1
] |
6,470 | bindings.lisp | LdBeth_CLFSWM/src/bindings.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Bindings keys and mouse
;;;
;;; Note: prefix is the Alt or Meta key, Mod-2 is the Numlock key.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;;;,-----
;;;| CONFIG - Bindings main mode
;;;`-----
(add-hook *binding-hook* 'init-*main-keys* 'init-*main-mouse*)
(defun help-on-clfswm ()
"Open the help and info window"
(open-menu (find-menu 'help-menu)))
(defun set-default-main-keys ()
(define-main-key ("F1" :alt) 'help-on-clfswm)
(define-main-key ("Home" :prefix :control :shift) 'exit-clfswm)
(define-main-key ("Right" :prefix) 'select-next-brother)
(define-main-key ("Left" :prefix) 'select-previous-brother)
(define-main-key ("Down" :prefix) 'select-previous-level)
(define-main-key ("Up" :prefix) 'select-next-level)
(define-main-key ("Right" :prefix :shift) 'select-next-brother-take-current)
(define-main-key ("Left" :prefix :shift) 'select-previous-brother-take-current)
(define-main-key ("Left" :control :prefix) 'select-brother-spatial-move-left)
(define-main-key ("Right" :control :prefix) 'select-brother-spatial-move-right)
(define-main-key ("Up" :control :prefix) 'select-brother-spatial-move-up)
(define-main-key ("Down" :control :prefix) 'select-brother-spatial-move-down)
(define-main-key ("Left" :control :prefix :shift) 'select-brother-spatial-move-left-take-current)
(define-main-key ("Right" :control :prefix :shift) 'select-brother-spatial-move-right-take-current)
(define-main-key ("Up" :control :prefix :shift) 'select-brother-spatial-move-up-take-current)
(define-main-key ("Down" :control :prefix :shift) 'select-brother-spatial-move-down-take-current)
(define-main-key ("Tab" :prefix) 'select-next-child)
(define-main-key ("Tab" :prefix :shift) 'select-previous-child)
(define-main-key ("Tab" :prefix :control) 'select-next-subchild)
(define-main-key ("Return" :prefix) 'enter-frame)
(define-main-key ("Return" :prefix :shift) 'leave-frame)
(define-main-key ("Return" :prefix :control) 'frame-toggle-maximize)
(define-main-key ("Return" :mod-5) 'frame-toggle-maximize)
(define-main-key ("Page_Up" :prefix) 'frame-select-previous-child)
(define-main-key ("Page_Down" :prefix) 'frame-select-next-child)
(define-main-key ("Page_Up" :prefix :control) 'frame-lower-child)
(define-main-key ("Page_Down" :prefix :control) 'frame-raise-child)
(define-main-key ("Home" :prefix) 'switch-to-root-frame)
(define-main-key ("Home" :prefix :shift) 'switch-and-select-root-frame)
(define-main-key ("Menu") 'fastswitch-mode)
(define-main-key ("F4") 'fastswitch-mode)
(define-main-key ("Menu" :control) 'fastswitch-move-mode)
(define-main-key ("Menu" :mod-5) 'expose-current-child-mode)
(define-main-key ("F10" :alt) 'fast-layout-switch)
(define-main-key ("F10" :shift :control) 'toggle-show-root-frame)
(define-main-key ("F10") 'expose-windows-mode)
(define-main-key ("F10" :control) 'expose-all-windows-mode)
(define-main-key ("F12" :control) 'present-clfswm-terminal)
(define-main-key ("F12" :shift) 'show-all-frames-info-key)
(define-main-key ("F12" :shift :prefix) 'show-all-frames-info)
(define-main-key ("b" :prefix) 'banish-pointer)
;; Escape
(define-main-key ("Escape" :control) 'ask-close/kill-current-window)
;; Second mode
(define-main-key (#\t :prefix) 'second-key-mode)
(define-main-key ("less" :control) 'second-key-mode)
;; Bind or jump functions
(define-main-key ("1" :prefix) 'bind-or-jump 1)
(define-main-key ("2" :prefix) 'bind-or-jump 2)
(define-main-key ("3" :prefix) 'bind-or-jump 3)
(define-main-key ("4" :prefix) 'bind-or-jump 4)
(define-main-key ("5" :prefix) 'bind-or-jump 5)
(define-main-key ("6" :prefix) 'bind-or-jump 6)
(define-main-key ("7" :prefix) 'bind-or-jump 7)
(define-main-key ("8" :prefix) 'bind-or-jump 8)
(define-main-key ("9" :prefix) 'bind-or-jump 9)
(define-main-key ("0" :prefix) 'bind-or-jump 10))
(add-hook *binding-hook* 'set-default-main-keys)
;;; Mouse actions
(defun mouse-click-to-focus-and-move-window (window root-x root-y)
"Move and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(stop-button-event)
(mouse-focus-move/resize-generic root-x root-y #'move-frame t))
(defun mouse-click-to-focus-and-resize-window (window root-x root-y)
"Resize and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(stop-button-event)
(mouse-focus-move/resize-generic root-x root-y #'resize-frame t))
(defun mouse-click-to-focus-and-move-window-constrained (window root-x root-y)
"Move (constrained by other frames) and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(stop-button-event)
(mouse-focus-move/resize-generic root-x root-y #'move-frame-constrained t))
(defun mouse-click-to-focus-and-resize-window-constrained (window root-x root-y)
"Resize (constrained by other frames) and focus the current child - Create a new frame on the root window"
(declare (ignore window))
(stop-button-event)
(mouse-focus-move/resize-generic root-x root-y #'resize-frame-constrained t))
(defun set-default-main-mouse ()
(define-main-mouse (1) 'mouse-click-to-focus-and-move)
(define-main-mouse (2) 'mouse-middle-click)
(define-main-mouse (3) 'mouse-click-to-focus-and-resize)
(define-main-mouse (1 :prefix) 'mouse-click-to-focus-and-move-window)
(define-main-mouse (3 :prefix) 'mouse-click-to-focus-and-resize-window)
(define-main-mouse (1 :prefix :shift) 'mouse-click-to-focus-and-move-window-constrained)
(define-main-mouse (3 :prefix :shift) 'mouse-click-to-focus-and-resize-window-constrained)
(define-main-mouse (1 :control :prefix) 'mouse-move-child-over-frame)
(define-main-mouse (4) 'mouse-select-next-level)
(define-main-mouse (5) 'mouse-select-previous-level)
(define-main-mouse (4 :prefix) 'mouse-enter-frame)
(define-main-mouse (5 :prefix) 'mouse-leave-frame)
(define-main-mouse (4 :prefix :control) 'dec-transparency)
(define-main-mouse (5 :prefix :control) 'inc-transparency)
(define-main-mouse (4 :prefix :control :shift) 'dec-transparency-slow)
(define-main-mouse (5 :prefix :control :shift) 'inc-transparency-slow))
(add-hook *binding-hook* 'set-default-main-mouse)
| 7,408 | Common Lisp | .lisp | 132 | 53.530303 | 108 | 0.686672 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | b3cdbed9dd27df44b52c320b3e5257c26f673f164ba868a8b7622f9136781378 | 6,470 | [
-1
] |
6,471 | menu-def.lisp | LdBeth_CLFSWM/src/menu-def.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Menu definitions
;;;
;;; Note: Mod-1 is the Alt or Meta key, Mod-2 is the Numlock key.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Updating menus...")
(force-output)
(init-menu)
;;; Here is a small example of menu manipulation:
;;(add-menu-key 'main "a" 'help-on-second-mode)
;;(add-menu-key 'main "c" 'help-on-clfswm)
;;
;;(add-sub-menu 'main "p" 'plop "A sub menu")
;;
;;(add-menu-key 'plop "a" 'help-on-clfswm)
;;(add-menu-key 'plop "b" 'help-on-second-mode)
;;(add-menu-key 'plop "d" 'help-on-second-mode)
;;(del-menu-key 'main "p")
;;(del-menu-value 'plop 'help-on-main-mode)
;;(del-sub-menu 'main 'plop)
;;(define-second-key ("a") 'open-menu)
(add-sub-menu 'main "F1" 'help-menu "Help menu")
(add-sub-menu 'main "d" 'standard-menu "Standard menu")
(add-sub-menu 'main "c" 'child-menu "Child menu")
(add-sub-menu 'main "r" 'root-menu "Root menu")
(add-sub-menu 'main "f" 'frame-menu "Frame menu")
(add-sub-menu 'main "w" 'window-menu "Window menu")
(add-sub-menu 'main "s" 'selection-menu "Selection menu")
(add-sub-menu 'main "n" 'action-by-name-menu "Action by name menu")
(add-sub-menu 'main "u" 'action-by-number-menu "Action by number menu")
(add-sub-menu 'main "y" 'utility-menu "Utility menu")
(add-sub-menu 'main "o" 'configuration-menu "Configuration menu")
(add-sub-menu 'main "m" 'clfswm-menu "CLFSWM menu")
(update-menus (find-menu 'standard-menu))
(add-menu-key 'help-menu "a" 'show-first-aid-kit)
(add-menu-key 'help-menu "h" 'show-global-key-binding)
(add-menu-key 'help-menu "b" 'show-main-mode-key-binding)
(add-menu-key 'help-menu "s" 'show-second-mode-key-binding)
(add-menu-key 'help-menu "r" 'show-circulate-mode-key-binding)
(add-menu-key 'help-menu "e" 'show-expose-window-mode-key-binding)
(add-menu-key 'help-menu "c" 'show-corner-help)
(add-menu-key 'help-menu "g" 'show-config-variable)
(add-menu-key 'help-menu "d" 'show-date)
(add-menu-key 'help-menu "p" 'show-cpu-proc)
(add-menu-key 'help-menu "m" 'show-mem-proc)
(add-menu-key 'help-menu "v" 'show-version)
(add-menu-key 'child-menu "r" 'rename-current-child)
(add-menu-key 'child-menu "b" 'bury-current-child)
(add-menu-key 'child-menu "f" 'bury-first-child)
(add-menu-key 'child-menu "t" 'set-current-child-transparency)
(add-menu-key 'child-menu "o" 'set-current-child-border-size)
(add-menu-key 'child-menu "e" 'ensure-unique-name)
(add-menu-key 'child-menu "n" 'ensure-unique-number)
(add-menu-key 'child-menu "Delete" 'delete-current-child)
(add-menu-key 'child-menu "X" 'remove-current-child)
(add-menu-key 'child-menu "R" 'retrieve-existing-window)
(add-menu-key 'child-menu "h" 'hide-current-child)
(add-menu-key 'child-menu "u" 'unhide-a-child)
(add-menu-key 'child-menu "F" 'unhide-a-child-from-all-frames)
(add-menu-key 'child-menu "a" 'unhide-all-children)
(add-menu-key 'child-menu "Page_Up" 'frame-lower-child)
(add-menu-key 'child-menu "Page_Down" 'frame-raise-child)
(add-menu-key 'root-menu "n" 'select-next-root-restart-menu)
(add-menu-key 'root-menu "p" 'select-previous-root-restart-menu)
(add-menu-key 'root-menu "g" 'rotate-root-geometry-next-restart-menu)
(add-menu-key 'root-menu "f" 'rotate-root-geometry-previous-restart-menu)
(add-menu-key 'root-menu "x" 'exchange-root-geometry-with-mouse)
(add-menu-key 'root-menu "r" 'change-current-root-geometry)
(add-sub-menu 'frame-menu "a" 'frame-adding-menu "Adding frame menu")
(add-sub-menu 'frame-menu "l" 'frame-layout-menu "Frame layout menu")
(add-sub-menu 'frame-menu "n" 'frame-nw-hook-menu "Frame new window hook menu")
(add-sub-menu 'frame-menu "m" 'frame-movement-menu "Frame movement menu")
(add-sub-menu 'frame-menu "f" 'frame-focus-policy "Frame focus policy menu")
(add-sub-menu 'frame-menu "w" 'frame-managed-window-menu "Managed window type menu")
(add-sub-menu 'frame-menu "u" 'frame-unmanaged-window-menu "Unmanaged window behaviour")
(add-sub-menu 'frame-menu "s" 'frame-miscellaneous-menu "Frame miscallenous menu")
(add-menu-key 'frame-menu "x" 'frame-toggle-maximize)
(add-menu-key 'frame-adding-menu "a" 'add-default-frame)
(add-menu-key 'frame-adding-menu "p" 'add-placed-frame)
(add-sub-menu 'frame-movement-menu "p" 'frame-pack-menu "Frame pack menu")
(add-sub-menu 'frame-movement-menu "f" 'frame-fill-menu "Frame fill menu")
(add-sub-menu 'frame-movement-menu "r" 'frame-resize-menu "Frame resize menu")
(add-menu-key 'frame-movement-menu "c" 'center-current-frame)
(add-menu-key 'frame-movement-menu "R" 'with-movement-select-next-brother)
(add-menu-key 'frame-movement-menu "L" 'with-movement-select-previous-brother)
(add-menu-key 'frame-movement-menu "U" 'with-movement-select-next-level)
(add-menu-key 'frame-movement-menu "D" 'with-movement-select-previous-level)
(add-menu-key 'frame-movement-menu "T" 'with-movement-select-next-child)
(add-menu-key 'frame-pack-menu "u" 'current-frame-pack-up)
(add-menu-key 'frame-pack-menu "d" 'current-frame-pack-down)
(add-menu-key 'frame-pack-menu "l" 'current-frame-pack-left)
(add-menu-key 'frame-pack-menu "r" 'current-frame-pack-right)
(add-menu-key 'frame-fill-menu "u" 'current-frame-fill-up)
(add-menu-key 'frame-fill-menu "d" 'current-frame-fill-down)
(add-menu-key 'frame-fill-menu "l" 'current-frame-fill-left)
(add-menu-key 'frame-fill-menu "r" 'current-frame-fill-right)
(add-menu-key 'frame-fill-menu "a" 'current-frame-fill-all-dir)
(add-menu-key 'frame-fill-menu "v" 'current-frame-fill-vertical)
(add-menu-key 'frame-fill-menu "h" 'current-frame-fill-horizontal)
(add-menu-key 'frame-resize-menu "u" 'current-frame-resize-up)
(add-menu-key 'frame-resize-menu "d" 'current-frame-resize-down)
(add-menu-key 'frame-resize-menu "l" 'current-frame-resize-left)
(add-menu-key 'frame-resize-menu "r" 'current-frame-resize-right)
(add-menu-key 'frame-resize-menu "a" 'current-frame-resize-all-dir)
(add-menu-key 'frame-resize-menu "m" 'current-frame-resize-all-dir-minimal)
(add-menu-comment 'frame-focus-policy "-=- For the current frame -=-")
(add-menu-key 'frame-focus-policy "a" 'current-frame-set-click-focus-policy)
(add-menu-key 'frame-focus-policy "b" 'current-frame-set-sloppy-focus-policy)
(add-menu-key 'frame-focus-policy "c" 'current-frame-set-sloppy-strict-focus-policy)
(add-menu-key 'frame-focus-policy "d" 'current-frame-set-sloppy-select-policy)
(add-menu-key 'frame-focus-policy "e" 'current-frame-set-sloppy-select-window-policy)
(add-menu-comment 'frame-focus-policy "-=- For all frames -=-")
(add-menu-key 'frame-focus-policy "f" 'all-frames-set-click-focus-policy)
(add-menu-key 'frame-focus-policy "g" 'all-frames-set-sloppy-focus-policy)
(add-menu-key 'frame-focus-policy "h" 'all-frames-set-sloppy-strict-focus-policy)
(add-menu-key 'frame-focus-policy "i" 'all-frames-set-sloppy-select-policy)
(add-menu-key 'frame-focus-policy "j" 'all-frames-set-sloppy-select-window-policy)
(add-menu-key 'frame-managed-window-menu "m" 'current-frame-manage-window-type)
(add-menu-key 'frame-managed-window-menu "a" 'current-frame-manage-all-window-type)
(add-menu-key 'frame-managed-window-menu "n" 'current-frame-manage-only-normal-window-type)
(add-menu-key 'frame-managed-window-menu "u" 'current-frame-manage-no-window-type)
(add-menu-key 'frame-unmanaged-window-menu "s" 'set-show-unmanaged-window)
(add-menu-key 'frame-unmanaged-window-menu "h" 'set-hide-unmanaged-window)
(add-menu-key 'frame-unmanaged-window-menu "d" 'set-default-hide-unmanaged-window)
(add-menu-key 'frame-unmanaged-window-menu "w" 'set-globally-show-unmanaged-window)
(add-menu-key 'frame-unmanaged-window-menu "i" 'set-globally-hide-unmanaged-window)
(add-menu-key 'frame-miscellaneous-menu "s" 'show-all-frames-info)
(add-menu-key 'frame-miscellaneous-menu "a" 'hide-all-frames-info)
(add-menu-key 'frame-miscellaneous-menu "h" 'hide-current-frame-window)
(add-menu-key 'frame-miscellaneous-menu "w" 'show-current-frame-window)
(add-menu-key 'frame-miscellaneous-menu "u" 'renumber-current-frame)
(add-menu-key 'frame-miscellaneous-menu "x" 'explode-current-frame)
(add-menu-key 'frame-miscellaneous-menu "i" 'implode-current-frame)
(add-menu-key 'window-menu "i" 'display-current-window-info)
(add-menu-key 'window-menu "t" 'set-current-window-transparency)
(add-menu-key 'window-menu "f" 'force-window-in-frame)
(add-menu-key 'window-menu "c" 'force-window-center-in-frame)
(add-menu-key 'window-menu "m" 'manage-current-window)
(add-menu-key 'window-menu "u" 'unmanage-current-window)
(add-menu-key 'window-menu "a" 'adapt-current-frame-to-window-hints)
(add-menu-key 'window-menu "w" 'adapt-current-frame-to-window-width-hint)
(add-menu-key 'window-menu "h" 'adapt-current-frame-to-window-height-hint)
(add-menu-key 'selection-menu "x" 'cut-current-child)
(add-menu-key 'selection-menu "c" 'copy-current-child)
(add-menu-key 'selection-menu "v" 'paste-selection)
(add-menu-key 'selection-menu "p" 'paste-selection-no-clear)
(add-menu-key 'selection-menu "Delete" 'remove-current-child)
(add-menu-key 'selection-menu "z" 'clear-selection)
(add-menu-key 'action-by-name-menu "f" 'focus-frame-by-name)
(add-menu-key 'action-by-name-menu "o" 'open-frame-by-name)
(add-menu-key 'action-by-name-menu "d" 'delete-frame-by-name)
(add-menu-key 'action-by-name-menu "m" 'move-current-child-by-name)
(add-menu-key 'action-by-name-menu "c" 'copy-current-child-by-name)
(add-menu-key 'action-by-number-menu "f" 'focus-frame-by-number)
(add-menu-key 'action-by-number-menu "o" 'open-frame-by-number)
(add-menu-key 'action-by-number-menu "d" 'delete-frame-by-number)
(add-menu-key 'action-by-number-menu "m" 'move-current-child-by-number)
(add-menu-key 'action-by-number-menu "c" 'copy-current-child-by-number)
(add-menu-key 'utility-menu "i" 'identify-key)
(add-menu-key 'utility-menu "colon" 'eval-from-query-string)
(add-menu-key 'utility-menu "exclam" 'run-program-from-query-string)
(add-sub-menu 'utility-menu "o" 'other-window-manager-menu "Other window manager menu")
(add-menu-key 'other-window-manager-menu "x" 'run-xterm)
(add-menu-key 'other-window-manager-menu "t" 'run-twm)
(add-menu-key 'other-window-manager-menu "i" 'run-icewm)
(add-menu-key 'other-window-manager-menu "g" 'run-gnome-session)
(add-menu-key 'other-window-manager-menu "k" 'run-startkde)
(add-menu-key 'other-window-manager-menu "c" 'run-xfce4-session)
(add-menu-key 'other-window-manager-menu "l" 'run-lxde)
(add-menu-key 'other-window-manager-menu "p" 'run-prompt-wm)
(add-menu-key 'clfswm-menu "r" 'reset-clfswm)
(add-menu-key 'clfswm-menu "l" 'reload-clfswm)
(add-menu-key 'clfswm-menu "x" 'exit-clfswm)
(format t " Done.~%")
(force-output)
| 11,670 | Common Lisp | .lisp | 197 | 57.979695 | 91 | 0.717125 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | ade5a897c452d1709aa84881240044c3eb797f6d542b4aec83190fcf80f1f292 | 6,471 | [
-1
] |
6,472 | clfswm-circulate-mode.lisp | LdBeth_CLFSWM/src/clfswm-circulate-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defparameter *circulate-window* nil)
(defparameter *circulate-font* nil)
(defparameter *circulate-gc* nil)
(defparameter *circulate-hit* 0)
(defparameter *circulate-orig* nil)
(defparameter *circulate-parent* nil)
(defun draw-circulate-mode-window ()
(raise-window *circulate-window*)
(clear-pixmap-buffer *circulate-window* *circulate-gc*)
(let* ((text (format nil "~A [~A]"
(limit-length (ensure-printable (child-name (xlib:input-focus *display*)))
*circulate-text-limite*)
(limit-length (ensure-printable (child-name (current-child)))
*circulate-text-limite*)))
(len (length text)))
(xlib:draw-glyphs *pixmap-buffer* *circulate-gc*
(truncate (/ (- *circulate-width* (* (xlib:max-char-width *circulate-font*) len)) 2))
(truncate (/ (+ *circulate-height* (- (xlib:font-ascent *circulate-font*)
(xlib:font-descent *circulate-font*))) 2))
text))
(copy-pixmap-buffer *circulate-window* *circulate-gc*))
(defun leave-circulate-mode ()
"Leave the circulate mode"
(throw 'exit-circulate-loop nil))
(defun reset-circulate-child ()
(setf *circulate-hit* 0
*circulate-parent* nil
*circulate-orig* (frame-child (current-child))))
(defun reset-circulate-brother ()
(setf *circulate-parent* (find-parent-frame (current-child))
*circulate-hit* 0)
(when (frame-p *circulate-parent*)
(setf *circulate-orig* (frame-child *circulate-parent*))))
(defun reorder-child (direction)
(no-focus)
(with-slots (child selected-pos) (current-child)
(unless *circulate-orig*
(reset-circulate-child))
(let ((len (length *circulate-orig*)))
(when (plusp len)
(let ((elem (nth (mod (incf *circulate-hit* direction) len) *circulate-orig*)))
(setf child (cons elem (child-remove elem *circulate-orig*))
selected-pos 0)))
(show-all-children)
(draw-circulate-mode-window))))
(defun reorder-brother (direction)
(no-focus)
(let ((old-child (current-child)))
(select-current-frame nil)
(unless (and *circulate-orig* *circulate-parent*)
(reset-circulate-brother))
(let ((len (length *circulate-orig*)))
(when (plusp len)
(when (frame-p *circulate-parent*)
(let ((elem (nth (mod (incf *circulate-hit* direction) len) *circulate-orig*)))
(setf (frame-child *circulate-parent*) (cons elem (child-remove elem *circulate-orig*))
(frame-selected-pos *circulate-parent*) 0
(current-child) (frame-selected-child *circulate-parent*))))
(when (and (not (child-root-p (current-child)))
(child-root-p old-child))
(change-root (find-root old-child) (current-child)))))
(show-all-children t)
(draw-circulate-mode-window)))
(defun reorder-subchild (direction)
(declare (ignore direction))
(when (frame-p (current-child))
(let ((selected-child (frame-selected-child (current-child))))
(when (frame-p selected-child)
(no-focus)
(with-slots (child selected-pos) selected-child
(let ((elem (first (last child))))
(when elem
(setf child (cons elem (child-remove elem child))
selected-pos 0))
(show-all-children)
(draw-circulate-mode-window)))))))
(defun circulate-select-next-child ()
"Select the next child"
(when (frame-p (current-child))
(when *circulate-parent*
(reset-circulate-child))
(reorder-child +1)))
(defun circulate-select-previous-child ()
"Select the previous child"
(when (frame-p (current-child))
(when *circulate-parent*
(reset-circulate-child))
(reorder-child -1)))
(defun circulate-select-next-brother ()
"Select the next brother"
(unless *circulate-parent*
(reset-circulate-brother))
(reorder-brother +1))
(defun circulate-select-previous-brother ()
"Select the previous borther"
(unless *circulate-parent*
(reset-circulate-brother))
(reorder-brother -1))
(defun circulate-select-next-subchild ()
"Select the next subchild"
(reorder-subchild +1))
(add-hook *binding-hook* 'set-default-circulate-keys)
(defun set-default-circulate-keys ()
(define-circulate-key ("Escape") 'leave-circulate-mode)
(define-circulate-key ("g" :control) 'leave-circulate-mode)
(define-circulate-key ("Escape" :alt) 'leave-circulate-mode)
(define-circulate-key ("g" :control :alt) 'leave-circulate-mode)
(define-circulate-key ("Tab" :prefix) 'circulate-select-next-child)
(define-circulate-key ("Tab" :prefix :control) 'circulate-select-next-subchild)
(define-circulate-key ("Tab" :prefix :shift) 'circulate-select-previous-child)
(define-circulate-key ("Iso_Left_Tab" :prefix :shift) 'circulate-select-previous-child)
(define-circulate-key ("Right" :prefix) 'circulate-select-next-brother)
(define-circulate-key ("Left" :prefix) 'circulate-select-previous-brother)
(define-circulate-release-key ("Alt_L" :alt) 'leave-circulate-mode)
(define-circulate-release-key ("Alt_L") 'leave-circulate-mode))
(defun circulate-leave-function ()
(when *circulate-gc*
(xlib:free-gcontext *circulate-gc*))
(when *circulate-window*
(xlib:destroy-window *circulate-window*))
(when *circulate-font*
(xlib:close-font *circulate-font*))
(setf *circulate-window* nil
*circulate-gc* nil
*circulate-font* nil)
(xlib:display-finish-output *display*))
(defun circulate-loop-function ()
(unless (is-a-key-pressed-p)
(leave-circulate-mode)))
(define-handler circulate-mode :key-press (code state)
(unless (funcall-key-from-code *circulate-keys* code state)
(setf *circulate-hit* 0
*circulate-orig* nil
*circulate-parent* nil)
(funcall-key-from-code *main-keys* code state)))
(define-handler circulate-mode :key-release (code state)
(funcall-key-from-code *circulate-keys-release* code state))
(defun circulate-mode (&key child-direction brother-direction subchild-direction)
(setf *circulate-hit* 0)
(with-placement (*circulate-mode-placement* x y *circulate-width* *circulate-height*)
(setf *circulate-font* (xlib:open-font *display* *circulate-font-string*)
*circulate-window* (xlib:create-window :parent *root*
:x x
:y y
:width *circulate-width*
:height *circulate-height*
:background (get-color *circulate-background*)
:border-width *border-size*
:border (get-color *circulate-border*)
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure :key-press))
*circulate-gc* (xlib:create-gcontext :drawable *circulate-window*
:foreground (get-color *circulate-foreground*)
:background (get-color *circulate-background*)
:font *circulate-font*
:line-style :solid))
(setf (window-transparency *circulate-window*) *circulate-transparency*)
(map-window *circulate-window*)
(draw-circulate-mode-window)
(when child-direction
(reorder-child child-direction))
(when brother-direction
(reorder-brother brother-direction))
(when subchild-direction
(reorder-subchild subchild-direction))
(with-grab-keyboard-and-pointer (92 93 66 67 t)
(generic-mode 'circulate-mode 'exit-circulate-loop
:loop-function #'circulate-loop-function
:leave-function #'circulate-leave-function
:original-mode '(main-mode))
(circulate-leave-function))))
(defun select-next-child ()
"Select the next child"
(when (frame-p (current-child))
(setf *circulate-orig* (frame-child (current-child))
*circulate-parent* nil)
(circulate-mode :child-direction +1)))
(defun select-previous-child ()
"Select the previous child"
(when (frame-p (current-child))
(setf *circulate-orig* (frame-child (current-child))
*circulate-parent* nil)
(circulate-mode :child-direction -1)))
(defun select-next-brother ()
"Select the next brother"
(setf *circulate-parent* (find-parent-frame (current-child)))
(when (frame-p *circulate-parent*)
(setf *circulate-orig* (frame-child *circulate-parent*)))
(circulate-mode :brother-direction +1))
(defun select-previous-brother ()
"Select the previous brother"
(setf *circulate-parent* (find-parent-frame (current-child)))
(when (frame-p *circulate-parent*)
(setf *circulate-orig* (frame-child *circulate-parent*)))
(circulate-mode :brother-direction -1))
(defmacro with-move-current-focused-window (() &body body)
`(with-current-window
,@body
(move-child-to window (if (frame-p (current-child))
(current-child)
(find-parent-frame (current-child) (find-current-root))))))
(defun select-next-brother-take-current ()
"Select the next brother and move the current focused child in it"
(with-move-current-focused-window ()
(select-next-brother)))
(defun select-previous-brother-take-current ()
"Select the previous brother and move the current focused child in it"
(with-move-current-focused-window ()
(select-previous-brother)))
(defun select-next-subchild ()
"Select the next subchild"
(when (and (frame-p (current-child))
(frame-p (frame-selected-child (current-child))))
(setf *circulate-orig* (frame-child (current-child))
*circulate-parent* nil)
(circulate-mode :subchild-direction +1)))
(defun select-previous-subchild ()
"Select the previous subchild"
(when (and (frame-p (current-child))
(frame-p (frame-selected-child (current-child))))
(setf *circulate-orig* (frame-child (current-child))
*circulate-parent* nil)
(circulate-mode :subchild-direction -1)))
(defun select-next-child-simple ()
"Select the next child (do not enter in circulate mode)"
(when (frame-p (current-child))
(with-slots (child) (current-child)
(setf child (rotate-list child)))
(show-all-children)))
(defun select-previous-child-simple ()
"Select the previous child (do not enter circulate mode)"
(when (frame-p (current-child))
(with-slots (child) (current-child)
(setf child (anti-rotate-list child)))
(show-all-children)))
(defun reorder-brother-simple (reorder-fun)
(let ((is-root (child-root-p (current-child))))
(no-focus)
(select-current-frame nil)
(when is-root
(let ((root (find-root (current-child))))
(unless (or (child-equal-p (root-child root) *root-frame*)
(child-original-root-p (root-child root)))
(awhen (and root (find-parent-frame (root-child root)))
(when (frame-p it)
(change-root root it))))))
(let ((parent-frame (find-parent-frame (current-child))))
(when (frame-p parent-frame)
(with-slots (child) parent-frame
(setf child (funcall reorder-fun child)
(current-child) (frame-selected-child parent-frame)))))
(when is-root
(change-root (find-root (current-child)) (current-child)))
(show-all-children (not is-root))))
(defun select-next-brother-simple ()
"Select the next brother frame (do not enter in circulate mode)"
(reorder-brother-simple #'rotate-list))
(defun select-previous-brother-simple ()
"Select the previous brother frame (do not enter in circulate mode)"
(reorder-brother-simple #'anti-rotate-list))
;;; Spatial move functions
(defun select-brother-generic-spatial-move (fun-found)
"Select the nearest brother of the current child based on the fun-found function"
(let ((is-root-p (child-root-p (current-child))))
(when is-root-p
(leave-frame)
(sleep *spatial-move-delay-before*))
(no-focus)
(select-current-frame nil)
(let ((parent-frame (find-parent-frame (current-child))))
(when (frame-p parent-frame)
(with-slots (child selected-pos) parent-frame
(let ((found nil)
(found-dist nil))
(dolist (c child)
(let ((dist (funcall fun-found (current-child) c)))
(when (and dist
(not (child-equal-p (current-child) c))
(or (not found)
(and found-dist (< dist found-dist))))
(setf found c
found-dist dist))))
(when found
(setf (current-child) found
selected-pos 0
child (cons found (child-remove found child)))))))
(show-all-children t)
(when is-root-p
(sleep *spatial-move-delay-after*)
(enter-frame)))))
(defun select-brother-spatial-move-right ()
"Select spatially the nearest brother of the current child in the right direction"
(select-brother-generic-spatial-move #'(lambda (current child)
(when (> (child-x2 child) (child-x2 current))
(distance (child-x2 current) (middle-child-y current)
(child-x child) (middle-child-y child))))))
(defun select-brother-spatial-move-left ()
"Select spatially the nearest brother of the current child in the left direction"
(select-brother-generic-spatial-move #'(lambda (current child)
(when (< (child-x child) (child-x current))
(distance (child-x current) (middle-child-y current)
(child-x2 child) (middle-child-y child))))))
(defun select-brother-spatial-move-down ()
"Select spatially the nearest brother of the current child in the down direction"
(select-brother-generic-spatial-move #'(lambda (current child)
(when (> (child-y2 child) (child-y2 current))
(distance (middle-child-x current) (child-y2 current)
(middle-child-x child) (child-y child))))))
(defun select-brother-spatial-move-up ()
"Select spatially the nearest brother of the current child in the up direction"
(select-brother-generic-spatial-move #'(lambda (current child)
(when (< (child-y child) (child-y current))
(distance (middle-child-x current) (child-y current)
(middle-child-x child) (child-y2 child))))))
(defun select-brother-spatial-move-right-take-current ()
"Select spatially the nearest brother of the current child in the right direction - move current focused child"
(with-move-current-focused-window ()
(select-brother-spatial-move-right)))
(defun select-brother-spatial-move-left-take-current ()
"Select spatially the nearest brother of the current child in the left direction - move current focused child"
(with-move-current-focused-window ()
(select-brother-spatial-move-left)))
(defun select-brother-spatial-move-down-take-current ()
"Select spatially the nearest brother of the current child in the down direction - move current focused child"
(with-move-current-focused-window ()
(select-brother-spatial-move-down)))
(defun select-brother-spatial-move-up-take-current ()
"Select spatially the nearest brother of the current child in the up direction - move current focused child"
(with-move-current-focused-window ()
(select-brother-spatial-move-up)))
| 16,642 | Common Lisp | .lisp | 355 | 39.921127 | 113 | 0.650025 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | c57c086e35757839ff9c74d6073d68976009c422712cab8a06c3d4373477e991 | 6,472 | [
-1
] |
6,473 | version.lisp | LdBeth_CLFSWM/src/version.lisp | ;; Copyright (C) 2005-2015 Xavier Maillard <[email protected]>
;; Copyright (C) 2005-2015 Martin Bishop
;;
;; Borrowed from Stumpwm
;; This file is part of clfswm.
;;
;; clfswm is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; clfswm is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this software; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;; Boston, MA 02111-1307 USA
;; Commentary:
;;
;; This file contains version information.
;;
;; Code:
(in-package :common-lisp-user)
(defpackage version
(:use :common-lisp :tools)
(:export *version*))
(in-package :version)
(defparameter *version* #.(concatenate 'string "Version: 13?? built " (date-string)))
| 1,162 | Common Lisp | .lisp | 29 | 38.655172 | 87 | 0.746892 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 436687df9d43d1c1cb414dfc11b5163cf8467285b0f9d934941a333e9bb38d11 | 6,473 | [
-1
] |
6,474 | config.lisp | LdBeth_CLFSWM/src/config.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Configuration file
;;;
;;; Change this file to your own needs or update some of this variables in
;;; your ~/.clfswmrc
;;; Some simple hack can be done in the code begining with the word CONFIG
;;; (you can do a 'grep CONFIG *.lisp' to see what you can configure)
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;;; CONFIG - WM Name
(defconfig *wm-name* "clfswm"
nil "Set to \"LG3D\" for making Java GUI programs work.")
;;; CONFIG - Default modifiers
(defconfig *default-modifiers* '()
nil "Default modifiers list to append to explicit modifiers
Example: :mod-2 for num_lock, :lock for Caps_lock...")
;;; Standard menu entry based on the XDG specifications
(defconfig *xdg-section-list* (append
'(TextEditor FileManager WebBrowser)
'(AudioVideo Audio Video Development Education Game Graphics Network
Office Settings System Utility)
'(TerminalEmulator Screensaver))
'Menu "Standard menu sections")
(defun-equal-wm-class equal-wm-class-rox-pinboard "ROX-Pinboard")
(defun-equal-wm-class equal-wm-class-xvkbd "xvkbd")
;;; CONFIG - Never managed window list
(defconfig *never-managed-window-list*
(list (list 'equal-wm-class-rox-pinboard nil)
(list 'equal-wm-class-xvkbd 'raise-window)
(list 'equal-clfswm-terminal 'raise-and-focus-window))
nil "CLFSWM will never manage windows of this type.
A list of (list match-function handle-function)")
(defconfig *steal-focus* t
nil "Allow to steal the focus on configure request")
(defconfig *hide-unmanaged-window* t
nil "Hide or not unmanaged windows when a child is deselected.")
(defconfig *snap-size* 5
nil "Snap size (in % of parent size) when move or resize frame is constrained")
(defconfig *spatial-move-delay-before* 0.2
nil "Delay to display the current child before doing a spatial move")
(defconfig *spatial-move-delay-after* 0.5
nil "Delay to display the new child after doing a spatial move")
(defconfig *corner-size* 3
'Corner "The size of the corner square")
;;; CONFIG: Corner actions - See in clfswm-corner.lisp for
;;; allowed functions
(defconfig *corner-main-mode-left-button*
'((:top-left open-menu)
(:top-right present-virtual-keyboard)
(:bottom-right expose-windows-mode)
(:bottom-left nil))
'Corner "Actions on corners in the main mode with the left mouse button")
(defconfig *corner-main-mode-middle-button*
'((:top-left help-on-clfswm)
(:top-right ask-close/kill-current-window)
(:bottom-right nil)
(:bottom-left nil))
'Corner "Actions on corners in the main mode with the middle mouse button")
(defconfig *corner-main-mode-right-button*
'((:top-left present-clfswm-terminal)
(:top-right ask-close/kill-current-window)
(:bottom-right expose-all-windows-mode)
(:bottom-left nil))
'Corner "Actions on corners in the main mode with the right mouse button")
(defconfig *corner-second-mode-left-button*
'((:top-left nil)
(:top-right nil)
(:bottom-right expose-windows-mode)
(:bottom-left nil))
'Corner "Actions on corners in the second mode with the left mouse button")
(defconfig *corner-second-mode-middle-button*
'((:top-left help-on-clfswm)
(:top-right nil)
(:bottom-right nil)
(:bottom-left nil))
'Corner "Actions on corners in the second mode with the middle mouse button")
(defconfig *corner-second-mode-right-button*
'((:top-left nil)
(:top-right nil)
(:bottom-right expose-all-windows-mode)
(:bottom-left nil))
'Corner "Actions on corners in the second mode with the right mouse button")
(defconfig *virtual-keyboard-cmd* "xvkbd"
'Corner "The command to display the virtual keybaord
Here is an ~/.Xresources example for xvkbd:
xvkbd.windowGeometry: 300x100-0-0
xvkbd*Font: 6x12
xvkbd.modalKeytop: true
xvkbd.customization: -french
xvkbd.keypad: false
And make it always on top")
(defconfig *clfswm-terminal-name* "clfswm-terminal"
'Corner "The clfswm terminal name")
;;(defparameter *clfswm-terminal-cmd* (format nil "xterm -T ~A -e /bin/bash --noprofile --norc" *clfswm-terminal-name*)
;;(defparameter *clfswm-terminal-cmd* (format nil "urxvt -name ~A" *clfswm-terminal-name*)
(defconfig *clfswm-terminal-cmd* (format nil "xterm -T ~A" *clfswm-terminal-name*)
'Corner "The clfswm terminal command.
This command must set the window title to *clfswm-terminal-name*")
(defconfig *corner-error-message-color* "red"
'Corner "Error message color")
(defconfig *corner-error-message-delay* 5
'Corner "Time to display the error message on commad error")
(defconfig *corner-command-try-delay* 0.2
'Corner "Time to wait before checking window in query tree")
(defconfig *corner-command-try-number* 10
'Corner "Number of try to wait the window in query tree")
;;; Hook definitions
;;;
;;; A hook is a function, a symbol or a list of functions with a rest
;;; arguments.
;;;
;;; This hooks are set in clfswm.lisp, you can overwrite them or extend
;;; them with a hook list.
;;;
;;; See clfswm.lisp for hooks examples.
(defconfig *init-hook* '(default-init-hook display-hello-window)
'Hook "Init hook. This hook is run just after the first root frame is created")
(defconfig *close-hook* '(close-notify-window close-clfswm-terminal close-virtual-keyboard)
'Hook "Close hook. This hook is run just before closing the display")
(defconfig *default-nw-hook* 'default-frame-nw-hook
'Hook "Default action to do on newly created windows")
(defconfig *query-key-press-hook* nil
'Hook "Query hook. Hook called on each key press event in query loop")
(defconfig *query-button-press-hook* nil
'Hook "Query hook. Hook called on each button press event in query loop")
;;; CONFIG: Root
(defconfig *create-frame-on-root* nil
'Root "Create frame on root.
Set this variable to true if you want to allow to create a new frame
on the root window in the main mode with the mouse")
(defconfig *have-to-show-current-root* t
'Root "Show the current root if true")
(defconfig *show-current-root-delay* 1
'Root "Delay to show the current root")
(defconfig *show-current-root-placement* 'middle-middle-root-placement
'Root "Current root notify window placement")
(defconfig *show-current-root-message* "Current root"
'Root "Current root notify window message")
;;; CONFIG: Main mode colors
(defconfig *color-selected* "Red"
'Main-mode "Color of selected window")
(defconfig *color-unselected* "Blue"
'Main-mode "Color of unselected color")
(defconfig *color-maybe-selected* "Yellow"
'Main-mode "Color of maybe selected windows")
;;; CONFIG: Frame colors
(defconfig *frame-background* "Black"
'Frame-colors "Frame background")
(defconfig *frame-foreground* "Green"
'Frame-colors "Frame foreground")
(defconfig *frame-foreground-root* "Red"
'Frame-colors "Frame foreground when the frame is the root frame")
(defconfig *frame-foreground-hidden* "Darkgreen"
'Frame-colors "Frame foreground for hidden windows")
(defconfig *frame-transparency* 0.6
'Frame-colors "Frame background transparency")
;;; CONFIG: Default window size
(defconfig *default-window-width* 400
nil "Default window width")
(defconfig *default-window-height* 300
nil "Default window height")
;;; CONFIG: Second mode colors and fonts
(defconfig *sm-border-color* "Green"
'Second-mode "Second mode window border color")
(defconfig *sm-background-color* "Black"
'Second-mode "Second mode window background color")
(defconfig *sm-foreground-color* "Red"
'Second-mode "Second mode window foreground color")
(defconfig *sm-font-string* "genera-cptfontbi"
'Second-mode "Second mode window font string")
(defconfig *sm-width* 300
'Second-mode "Second mode window width")
(defconfig *sm-height* 25
'Second-mode "Second mode window height")
(defconfig *sm-transparency* *default-transparency*
'Second-mode "Second mode background transparency")
;;; CONFIG - Identify key colors
(defconfig *identify-font-string* "genera-hl10"
'Identify-key "Identify window font string")
(defconfig *identify-background* "black"
'Identify-key "Identify window background color")
(defconfig *identify-foreground* "green"
'Identify-key "Identify window foreground color")
(defconfig *identify-border* "red"
'Identify-key "Identify window border color")
(defconfig *identify-transparency* *default-transparency*
'Identify-key "Identify window background transparency")
;;; CONFIG - Query string colors
(defconfig *query-font-string* *default-font-string*
'Query-string "Query string window font string")
(defconfig *query-background* "black"
'Query-string "Query string window background color")
(defconfig *query-message-color* "yellow"
'Query-string "Query string window message color")
(defconfig *query-foreground* "green"
'Query-string "Query string window foreground color")
(defconfig *query-cursor-color* "white"
'Query-string "Query string window foreground cursor color")
(defconfig *query-parent-color* "blue"
'Query-string "Query string window parenthesis color")
(defconfig *query-parent-error-color* "red"
'Query-string "Query string window parenthesis color when no match")
(defconfig *query-border* "red"
'Query-string "Query string window border color")
(defconfig *query-transparency* *default-transparency*
'Query-string "Query string window background transparency")
(defconfig *query-max-complet-length* 100
'Query-string "Query maximum length of completion list")
(defconfig *query-min-complet-char* 2
'Query-string "Query minimum input length for completion")
;;; CONFIG - Info mode
(defconfig *info-background* "black"
'Info-mode "Info window background color")
(defconfig *info-foreground* "green"
'Info-mode "Info window foreground color")
(defconfig *info-border* "red"
'Info-mode "Info window border color")
(defconfig *info-line-cursor* "white"
'Info-mode "Info window line cursor color color")
(defconfig *info-selected-background* "blue"
'Info-mode "Info selected item background color")
(defconfig *info-font-string* "genera-cptfontcc"
'Info-mode "Info window font string")
(defconfig *info-transparency* *default-transparency*
'Info-mode "Info window background transparency")
(defconfig *info-click-to-select* t
'Info-mode "If true, click on info window select item. Otherwise, click to drag the menu")
;;; CONFIG - Circulate string colors
(defconfig *circulate-font-string* "genera-cptfonti"
'Circulate-mode "Circulate string window font string")
(defconfig *circulate-background* "black"
'Circulate-mode "Circulate string window background color")
(defconfig *circulate-foreground* "green"
'Circulate-mode "Circulate string window foreground color")
(defconfig *circulate-border* "red"
'Circulate-mode "Circulate string window border color")
(defconfig *circulate-width* 400
'Circulate-mode "Circulate mode window width")
(defconfig *circulate-height* 15
'Circulate-mode "Circulate mode window height")
(defconfig *circulate-transparency* *default-transparency*
'Circulate-mode "Circulate window background transparency")
(defconfig *circulate-text-limite* 30
'Circulate-mode "Maximum text limite in the circulate window")
;;; CONFIG - Expose string colors
(defconfig *expose-font-string* *default-font-string*
'Expose-mode "Expose string window font string")
(defconfig *expose-background* "grey10"
'Expose-mode "Expose string window background color")
(defconfig *expose-foreground* "grey50"
'Expose-mode "Expose string window foreground color")
(defconfig *expose-foreground-letter* "red"
'Expose-mode "Expose string window foreground color for letters")
(defconfig *expose-foreground-letter-nok* "grey30"
'Expose-mode "Expose string window foreground color for letter not selected")
(defconfig *expose-background-letter-match* "green"
'Expose-mode "Expose string window background color for matching letters")
(defconfig *expose-border* "grey20"
'Expose-mode "Expose string window border color")
(defconfig *expose-valid-on-key* t
'Expose-mode "Valid expose mode when an accel key is pressed")
(defconfig *expose-show-window-title* t
'Expose-mode "Show the window title on accel window")
(defconfig *expose-transparency* 0.9
'Expose-mode "Expose string window background transparency")
(defconfig *expose-direct-select* t
'Expose-mode "Immediately select child if they can be directly accessed")
;;; CONFIG - Fastswitch string colors
(defconfig *fastswitch-font-string* "genera-13fgb"
'Fastswitch-mode "Fastswitch string window font string")
(defconfig *fastswitch-background* "grey10"
'Fastswitch-mode "Fastswitch string window background color")
(defconfig *fastswitch-foreground* "grey50"
'Fastswitch-mode "Fastswitch string window foreground color")
(defconfig *fastswitch-foreground-letter* "red"
'Fastswitch-mode "Fastswitch string window foreground color for letters")
(defconfig *fastswitch-foreground-letter-second* "magenta"
'Fastswitch-mode "Fastswitch string window foreground color for letters")
(defconfig *fastswitch-foreground-letter-second-frame* "yellow"
'Fastswitch-mode "Fastswitch string window foreground color for letters for frames")
(defconfig *fastswitch-foreground-childname* "grey70"
'Fastswitch-mode "Fastswitch string window foreground color for childname")
(defconfig *fastswitch-border* "grey20"
'Fastswitch-mode "Fastswitch string window border color")
(defconfig *fastswitch-transparency* 0.9
'Fastswitch-mode "Fastswitch string window background transparency")
(defconfig *fastswitch-show-frame-p* t
'Fastswitch-mode "Fastswitch show frame in mini window")
(defconfig *fastswitch-adjust-window-p* t
'Fastswitch-mode "Fastswitch adjust window to show all children names")
(defconfig *fastswitch-display-mode* 'Tree
'Fastswitch-mode "Fastswitch display mode (one of LINE or TREE)")
;;; CONFIG - Show key binding colors
(defconfig *info-color-title* "Magenta"
'Info-mode "Colored info title color")
(defconfig *info-color-underline* "Yellow"
'Info-mode "Colored info underline color")
(defconfig *info-color-first* "Cyan"
'Info-mode "Colored info first color")
(defconfig *info-color-second* "lightblue"
'Info-mode "Colored info second color")
;;; CONFIG - Menu colors
;;; Set *info-foreground* to change the default menu foreground
(defconfig *menu-color-submenu* "Cyan"
'Menu "Submenu color in menu")
(defconfig *menu-color-comment* "Yellow"
'Menu "Comment color in menu")
(defconfig *menu-color-key* "Magenta"
'Menu "Key color in menu")
(defconfig *menu-color-menu-key* (->color #xFF9AFF)
'Menu "Menu key color in menu")
(defconfig *menu-key-bound-color* "gray50"
'Menu "Key bound min menu color")
;;; CONFIG - Notify window string colors
(defconfig *notify-window-font-string* "genera-sail12"
'Notify-Window "Notify window font string")
(defconfig *notify-window-background* "black"
'Notify-Window "Notify Window background color")
(defconfig *notify-window-foreground* "green"
'Notify-Window "Notify Window foreground color")
(defconfig *notify-window-border* "red"
'Notify-Window "Notify Window border color")
(defconfig *notify-window-delay* 10
'Notify-Window "Notify Window display delay")
(defconfig *notify-window-transparency* *default-transparency*
'Notify-window "Notify window background transparency")
| 16,525 | Common Lisp | .lisp | 347 | 44.867435 | 119 | 0.74049 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 306cd700d5fe569ee5111bc8319d7f6cffc3ef01b1b9d4362143cbf47d9c64a7 | 6,474 | [
-1
] |
6,475 | xlib-util.lisp | LdBeth_CLFSWM/src/xlib-util.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Utility functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;; Window states
(defconstant +withdrawn-state+ 0)
(defconstant +normal-state+ 1)
(defconstant +iconic-state+ 3)
(defparameter *window-events* '(:structure-notify
:property-change
:colormap-change
:focus-change
:enter-window
:leave-window
:pointer-motion
:exposure)
"The events to listen for on managed windows.")
(defparameter +netwm-supported+
'(:_NET_SUPPORTING_WM_CHECK
:_NET_NUMBER_OF_DESKTOPS
:_NET_DESKTOP_GEOMETRY
:_NET_DESKTOP_VIEWPORT
:_NET_CURRENT_DESKTOP
:_NET_WM_WINDOW_TYPE
:_NET_CLIENT_LIST)
"Supported NETWM properties.
Window types are in +WINDOW-TYPES+.")
(defparameter +netwm-window-types+
'((:_NET_WM_WINDOW_TYPE_DESKTOP . :desktop)
(:_NET_WM_WINDOW_TYPE_DOCK . :dock)
(:_NET_WM_WINDOW_TYPE_TOOLBAR . :toolbar)
(:_NET_WM_WINDOW_TYPE_MENU . :menu)
(:_NET_WM_WINDOW_TYPE_UTILITY . :utility)
(:_NET_WM_WINDOW_TYPE_SPLASH . :splash)
(:_NET_WM_WINDOW_TYPE_DIALOG . :dialog)
(:_NET_WM_WINDOW_TYPE_NORMAL . :normal))
"Alist mapping NETWM window types to keywords.")
(defparameter *x-error-count* 0)
(defparameter *max-x-error-count* 10000)
(defparameter *clfswm-x-error-filename* "/tmp/clfswm-backtrace.error")
(defmacro with-xlib-protect ((&optional name tag) &body body)
"Ignore Xlib errors in body."
`(handler-case
(with-simple-restart (top-level "Return to clfswm's top level")
,@body)
(xlib::x-error (c)
(incf *x-error-count*)
(when (> *x-error-count* *max-x-error-count*)
(format t "Xlib error: ~A ~A: ~A~%" ,name (if ,tag ,tag ',body) c)
(force-output)
(write-backtrace *clfswm-x-error-filename*
(format nil "~%------- Additional information ---------
Xlib error: ~A ~A: ~A
Body: ~A
Features: ~A"
,name ,tag c ',body
*features*))
(error "Too many X errors: ~A (logged in ~A)" c *clfswm-x-error-filename*))
#+:xlib-debug
(progn
(format t "Xlib error: ~A ~A: ~A~%" ,name (if ,tag ,tag ',body) c)
(force-output)))))
;;(defmacro with-xlib-protect ((&optional name tag) &body body)
;; `(progn
;; ,@body))
(declaim (inline screen-width screen-height))
(defun screen-width ()
;;(xlib:screen-width *screen*))
(x-drawable-width *root*))
(defun screen-height ()
;;(xlib:screen-height *screen*))
(x-drawable-height *root*))
(defmacro with-x-pointer (&body body)
"Bind (x y) to mouse pointer positions"
`(multiple-value-bind (x y)
(xlib:query-pointer *root*)
,@body))
(declaim (inline window-x2 window-y2))
(defun window-x2 (window)
(+ (x-drawable-x window) (x-drawable-width window)))
(defun window-y2 (window)
(+ (x-drawable-y window) (x-drawable-height window)))
;;;
;;; Events management functions.
;;;
(defparameter *unhandled-events* nil)
(defparameter *current-event-mode* nil)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun keyword->handle-event (mode keyword)
(create-symbol 'handle-event-fun "-" mode "-" keyword)))
(defun handle-event->keyword (symbol)
(let* ((name (string-downcase (symbol-name symbol)))
(pos (search "handle-event-fun-" name)))
(when (and pos (zerop pos))
(let ((pos-mod (search "mode" name)))
(when pos-mod
(intern (string-upcase (subseq name (+ pos-mod 5))) :keyword))))))
;; (values (intern (string-upcase (subseq name (+ pos-mod 5))) :keyword)
;; (subseq name (length "handle-event-fun-") (1- pos-mod))))))))
(defparameter *handle-event-fun-symbols* nil)
(defun fill-handle-event-fun-symbols ()
(with-all-internal-symbols (symbol :clfswm)
(let ((pos (symbol-search "handle-event-fun-" symbol)))
(when (and pos (zerop pos))
(pushnew symbol *handle-event-fun-symbols*)))))
(defmacro with-handle-event-symbol ((mode) &body body)
"Bind symbol to all handle event functions available in mode"
`(let ((pattern (format nil "handle-event-fun-~A" ,mode)))
(dolist (symbol *handle-event-fun-symbols*)
(let ((pos (symbol-search pattern symbol)))
(when (and pos (zerop pos))
,@body)))))
(defun find-handle-event-function (&optional (mode ""))
"Print all handle event functions available in mode"
(with-handle-event-symbol (mode)
(print symbol)))
(defun assoc-keyword-handle-event (mode)
"Associate all keywords in mode to their corresponding handle event functions.
For example: main-mode :key-press is bound to handle-event-fun-main-mode-key-press"
(setf *current-event-mode* mode)
(with-handle-event-symbol (mode)
(let ((keyword (handle-event->keyword symbol)))
(when (fboundp symbol)
#+:event-debug
(progn
(format t "~&Associating: ~S with ~S~%" symbol keyword)
(force-output))
(setf (symbol-function keyword) (symbol-function symbol))))))
(defun unassoc-keyword-handle-event (&optional (mode ""))
"Unbound all keywords from their corresponding handle event functions."
(setf *current-event-mode* nil)
(with-handle-event-symbol (mode)
(let ((keyword (handle-event->keyword symbol)))
(when (fboundp keyword)
#+:event-debug
(progn
(format t "~&Unassociating: ~S ~S~%" symbol keyword)
(force-output))
(fmakunbound keyword)))))
(defmacro define-handler (mode keyword args &body body)
"Like a defun but with a name expanded as handle-event-fun-'mode'-'keyword'
For example (define-handler main-mode :key-press (args) ...)
Expand in handle-event-fun-main-mode-key-press"
`(defun ,(keyword->handle-event mode keyword) (&rest event-slots &key #+:event-debug event-key ,@args &allow-other-keys)
(declare (ignorable event-slots))
#+:event-debug (print (list *current-event-mode* event-key))
,@body))
(defun event-hook-name (event-keyword)
(create-symbol-in-package :clfswm '*event- event-keyword '-hook*))
(let ((event-hook-list nil))
(defun get-event-hook-list ()
event-hook-list)
(defmacro use-event-hook (event-keyword)
(let ((symb (event-hook-name event-keyword)))
(pushnew symb event-hook-list)
`(defvar ,symb nil)))
(defun unuse-event-hook (event-keyword)
(let ((symb (event-hook-name event-keyword)))
(setf event-hook-list (remove symb event-hook-list))
(makunbound symb)))
(defmacro add-event-hook (name &rest value)
(let ((symb (event-hook-name name)))
`(add-hook ,symb ,@value)))
(defmacro remove-event-hook (name &rest value)
(let ((symb (event-hook-name name)))
`(remove-hook ,symb ,@value)))
(defun clear-event-hooks ()
(dolist (symb event-hook-list)
(makunbound symb)))
(defun optimize-event-hook ()
"Remove unused event hooks"
(dolist (symb event-hook-list)
(when (and (boundp symb)
(null (symbol-value symb)))
(makunbound symb)
(setf event-hook-list (remove symb event-hook-list))))))
(defmacro define-event-hook (event-keyword args &body body)
(let ((event-fun (gensym)))
`(let ((,event-fun (lambda (&rest event-slots &key #+:event-debug event-key ,@args &allow-other-keys)
(declare (ignorable event-slots))
#+:event-debug (print (list ,event-keyword event-key))
,@body)))
(add-event-hook ,event-keyword ,event-fun)
,event-fun)))
(defmacro event-defun (name args &body body)
`(defun ,name (&rest event-slots &key #+:event-debug event-key ,@args &allow-other-keys)
(declare (ignorable event-slots))
#+:event-debug (print (list ,event-keyword event-key))
,@body))
(defun exit-handle-event ()
(throw 'exit-handle-event nil))
(defun handle-event (&rest event-slots &key event-key &allow-other-keys)
(labels ((make-xlib-window (xobject)
"For some reason the clx xid cache screws up returns pixmaps when
they should be windows. So use this function to make a window out of them."
;; Workaround for pixmap error taken from STUMPWM - thanks:
;; XXX: In both the clisp and sbcl clx libraries, sometimes what
;; should be a window will be a pixmap instead. In this case, we
;; need to manually translate it to a window to avoid breakage
;; in stumpwm. So far the only slot that seems to be affected is
;; the :window slot for configure-request and reparent-notify
;; events. It appears as though the hash table of XIDs and clx
;; structures gets out of sync with X or perhaps X assigns a
;; duplicate ID for a pixmap and a window.
#+clisp (make-instance 'xlib:window :id (slot-value xobject 'xlib::id) :display *display*)
#+(or sbcl ecl openmcl) (xlib::make-window :id (slot-value xobject 'xlib::id) :display *display*)
#-(or sbcl clisp ecl openmcl)
(error 'not-implemented)))
(handler-case
(catch 'exit-handle-event
(let ((win (getf event-slots :window)))
(when (and win (not (xlib:window-p win)))
(dbg "Pixmap Workaround! Should be a window: " win)
(setf (getf event-slots :window) (make-xlib-window win))))
(let ((hook-symbol (event-hook-name event-key)))
(when (boundp hook-symbol)
(apply #'call-hook (symbol-value hook-symbol) event-slots)))
(if (fboundp event-key)
(apply event-key event-slots)
#+:event-debug (pushnew (list *current-event-mode* event-key) *unhandled-events* :test #'equal))
(xlib:display-finish-output *display*))
((or xlib:window-error xlib:drawable-error) (c)
#-xlib-debug (declare (ignore c))
#+xlib-debug (format t "Ignore Xlib synchronous error: ~a~%" c)))
t))
(defun parse-display-string (display)
"Parse an X11 DISPLAY string and return the host and display from it."
(let* ((colon (position #\: display))
(host (subseq display 0 colon))
(rest (subseq display (1+ colon)))
(dot (position #\. rest))
(num (parse-integer (subseq rest 0 dot))))
(values host num)))
;;; Transparency support
(let ((opaque #xFFFFFFFF))
(defun window-transparency (window)
"Return the window transparency"
(float (/ (or (first (xlib:get-property window :_NET_WM_WINDOW_OPACITY)) opaque) opaque)))
(defun set-window-transparency (window value)
"Set the window transparency"
(when (numberp value)
(xlib:change-property window :_NET_WM_WINDOW_OPACITY
(list (max (min (round (* opaque (if (equal *transparent-background* t) value 1)))
opaque)
0))
:cardinal 32)))
(defsetf window-transparency set-window-transparency))
(defun maxmin-size-equal-p (window)
(when (xlib:window-p window)
(let ((hints (xlib:wm-normal-hints window)))
(when hints
(let ((hint-x (xlib:wm-size-hints-x hints))
(hint-y (xlib:wm-size-hints-y hints))
(user-specified-position-p (xlib:wm-size-hints-user-specified-position-p hints))
(min-width (xlib:wm-size-hints-min-width hints))
(min-height (xlib:wm-size-hints-min-height hints))
(max-width (xlib:wm-size-hints-max-width hints))
(max-height (xlib:wm-size-hints-max-height hints)))
(and hint-x hint-y min-width max-width min-height max-height
user-specified-position-p
(= hint-x 0) (= hint-y 0)
(= min-width max-width)
(= min-height max-height)))))))
(defun maxmin-size-equal-window-in-tree ()
(dolist (win (xlib:query-tree *root*))
(when (maxmin-size-equal-p win)
(return win))))
(defun window-state (win)
"Get the state (iconic, normal, withdrawn) of a window."
(first (xlib:get-property win :WM_STATE)))
(defun set-window-state (win state)
"Set the state (iconic, normal, withdrawn) of a window."
(xlib:change-property win
:WM_STATE
(list state)
:WM_STATE
32))
(defsetf window-state set-window-state)
(defun window-hidden-p (window)
(eql (window-state window) +iconic-state+))
(defun window-transient-for (window)
(first (xlib:get-property window :WM_TRANSIENT_FOR)))
(defun window-leader (window)
(when (xlib:window-p window)
(or (first (xlib:get-property window :WM_CLIENT_LEADER))
(let ((id (window-transient-for window)))
(when id
(window-leader id))))))
(defun unhide-window (window)
(when window
(when (window-hidden-p window)
(xlib:map-window window)
(setf (window-state window) +normal-state+
(xlib:window-event-mask window) *window-events*))))
(defun map-window (window)
(when window
(xlib:map-window window)))
(defun delete-window (window)
(send-client-message window :WM_PROTOCOLS
(xlib:intern-atom *display* :WM_DELETE_WINDOW)))
(defun destroy-window (window)
(xlib:kill-client *display* (xlib:window-id window)))
;;(defconstant +exwm-atoms+
;; (list "_NET_SUPPORTED" "_NET_CLIENT_LIST"
;; "_NET_CLIENT_LIST_STACKING" "_NET_NUMBER_OF_DESKTOPS"
;; "_NET_CURRENT_DESKTOP" "_NET_DESKTOP_GEOMETRY"
;; "_NET_DESKTOP_VIEWPORT" "_NET_DESKTOP_NAMES"
;; "_NET_ACTIVE_WINDOW" "_NET_WORKAREA"
;; "_NET_SUPPORTING_WM_CHECK" "_NET_VIRTUAL_ROOTS"
;; "_NET_DESKTOP_LAYOUT"
;;
;; "_NET_RESTACK_WINDOW" "_NET_REQUEST_FRAME_EXTENTS"
;; "_NET_MOVERESIZE_WINDOW" "_NET_CLOSE_WINDOW"
;; "_NET_WM_MOVERESIZE"
;;
;; "_NET_WM_SYNC_REQUEST" "_NET_WM_PING"
;;
;; "_NET_WM_NAME" "_NET_WM_VISIBLE_NAME"
;; "_NET_WM_ICON_NAME" "_NET_WM_VISIBLE_ICON_NAME"
;; "_NET_WM_DESKTOP" "_NET_WM_WINDOW_TYPE"
;; "_NET_WM_STATE" "_NET_WM_STRUT"
;; "_NET_WM_ICON_GEOMETRY" "_NET_WM_ICON"
;; "_NET_WM_PID" "_NET_WM_HANDLED_ICONS"
;; "_NET_WM_USER_TIME" "_NET_FRAME_EXTENTS"
;; ;; "_NET_WM_MOVE_ACTIONS"
;;
;; "_NET_WM_WINDOW_TYPE_DESKTOP" "_NET_WM_STATE_MODAL"
;; "_NET_WM_WINDOW_TYPE_DOCK" "_NET_WM_STATE_STICKY"
;; "_NET_WM_WINDOW_TYPE_TOOLBAR" "_NET_WM_STATE_MAXIMIZED_VERT"
;; "_NET_WM_WINDOW_TYPE_MENU" "_NET_WM_STATE_MAXIMIZED_HORZ"
;; "_NET_WM_WINDOW_TYPE_UTILITY" "_NET_WM_STATE_SHADED"
;; "_NET_WM_WINDOW_TYPE_SPLASH" "_NET_WM_STATE_SKIP_TASKBAR"
;; "_NET_WM_WINDOW_TYPE_DIALOG" "_NET_WM_STATE_SKIP_PAGER"
;; "_NET_WM_WINDOW_TYPE_NORMAL" "_NET_WM_STATE_HIDDEN"
;; "_NET_WM_STATE_FULLSCREEN"
;; "_NET_WM_STATE_ABOVE"
;; "_NET_WM_STATE_BELOW"
;; "_NET_WM_STATE_DEMANDS_ATTENTION"
;;
;; "_NET_WM_ALLOWED_ACTIONS"
;; "_NET_WM_ACTION_MOVE"
;; "_NET_WM_ACTION_RESIZE"
;; "_NET_WM_ACTION_SHADE"
;; "_NET_WM_ACTION_STICK"
;; "_NET_WM_ACTION_MAXIMIZE_HORZ"
;; "_NET_WM_ACTION_MAXIMIZE_VERT"
;; "_NET_WM_ACTION_FULLSCREEN"
;; "_NET_WM_ACTION_CHANGE_DESKTOP"
;; "_NET_WM_ACTION_CLOSE"
;;
;; ))
;;
;;
;;(defun intern-atoms (display)
;; (declare (type xlib:display display))
;; (mapcar #'(lambda (atom-name) (xlib:intern-atom display atom-name))
;; +exwm-atoms+)
;; (values))
;;
;;
;;
;;(defun get-atoms-property (window property-atom atom-list-p)
;; "Returns a list of atom-name (if atom-list-p is t) otherwise returns
;; a list of atom-id."
;; (xlib:get-property window property-atom
;; :transform (when atom-list-p
;; (lambda (id)
;; (xlib:atom-name (xlib:drawable-display window) id)))))
;;
;;(defun set-atoms-property (window atoms property-atom &key (mode :replace))
;; "Sets the property designates by `property-atom'. ATOMS is a list of atom-id
;; or a list of keyword atom-names."
;; (xlib:change-property window property-atom atoms :ATOM 32
;; :mode mode
;; :transform (unless (integerp (car atoms))
;; (lambda (atom-key)
;; (xlib:find-atom (xlib:drawable-display window) atom-key)))))
;;
;;
;;
;;
;;(defun net-wm-state (window)
;; (get-atoms-property window :_NET_WM_STATE t))
;;
;;(defsetf net-wm-state (window &key (mode :replace)) (states)
;; `(set-atoms-property ,window ,states :_NET_WM_STATE :mode ,mode))
(defun hide-window (window)
(when window
(setf (window-state window) +iconic-state+
(xlib:window-event-mask window) (remove :structure-notify *window-events*))
(xlib:unmap-window window)
(setf (xlib:window-event-mask window) *window-events*)))
(defun window-type (window)
"Return one of :desktop, :dock, :toolbar, :utility, :splash,
:dialog, :transient, :maxsize and :normal."
(when (xlib:window-p window)
(or (and (let ((hints (xlib:wm-normal-hints window)))
(and hints (or (and (xlib:wm-size-hints-max-width hints)
(< (xlib:wm-size-hints-max-width hints) (x-drawable-width *root*)))
(and (xlib:wm-size-hints-max-height hints)
(< (xlib:wm-size-hints-max-height hints) (x-drawable-height *root*)))
(xlib:wm-size-hints-min-aspect hints)
(xlib:wm-size-hints-max-aspect hints))))
:maxsize)
(let ((net-wm-window-type (xlib:get-property window :_NET_WM_WINDOW_TYPE)))
(when net-wm-window-type
(dolist (type-atom net-wm-window-type)
(when (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+)
(return (cdr (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+)))))))
(and (xlib:get-property window :WM_TRANSIENT_FOR)
:transient)
:normal)))
;;; Stolen from Eclipse
(defun send-configuration-notify (window x y w h bw)
"Send a synthetic configure notify event to the given window (ICCCM 4.1.5)"
(xlib:send-event window :configure-notify (xlib:make-event-mask :structure-notify)
:event-window window
:window window
:x x :y y
:width w
:height h
:border-width bw
:propagate-p nil))
(defun send-client-message (window type &rest data)
"Send a client message to a client's window."
(xlib:send-event window
:client-message nil
:window window
:type type
:format 32
:data data))
(defun raise-window (window)
"Map the window if needed and bring it to the top of the stack. Does not affect focus."
(when (xlib:window-p window)
(when (window-hidden-p window)
(unhide-window window))
(setf (xlib:window-priority window) :above)))
(let ((focused-window nil))
(defun no-focus ()
"don't focus any window but still read keyboard events."
(xlib:set-input-focus *display* *no-focus-window* :pointer-root)
(setf focused-window nil))
(defun focus-window (window)
"Give the window focus."
(no-focus)
(when (xlib:window-p window)
(xlib:set-input-focus *display* window :parent)
(setf focused-window window)))
(defun focused-window ()
focused-window))
(defun raise-and-focus-window (window)
"Raise and focus."
(raise-window window)
(focus-window window))
(defun lower-window (window sibling)
"Map the window if needed and bring it just above sibling. Does not affect focus."
(when (xlib:window-p window)
(when (window-hidden-p window)
(unhide-window window))
(setf (xlib:window-priority window sibling) :below)))
(let ((cursor-font nil)
(cursor nil)
(pointer-grabbed nil))
(defun free-grab-pointer ()
(when cursor
(xlib:free-cursor cursor)
(setf cursor nil))
(when cursor-font
(xlib:close-font cursor-font)
(setf cursor-font nil)))
(defun xgrab-init-pointer ()
(setf pointer-grabbed nil))
(defun xgrab-pointer-p ()
pointer-grabbed)
(defun xgrab-pointer (root cursor-char cursor-mask-char
&optional (pointer-mask '(:enter-window :pointer-motion
:button-press :button-release)) owner-p)
"Grab the pointer and set the pointer shape."
(when pointer-grabbed
(xungrab-pointer))
(setf pointer-grabbed t)
(let* ((white (xlib:make-color :red 1.0 :green 1.0 :blue 1.0))
(black (xlib:make-color :red 0.0 :green 0.0 :blue 0.0)))
(cond (cursor-char
(setf cursor-font (xlib:open-font *display* "cursor")
cursor (xlib:create-glyph-cursor :source-font cursor-font
:source-char (or cursor-char 68)
:mask-font cursor-font
:mask-char (or cursor-mask-char 69)
:foreground black
:background white))
(xlib:grab-pointer root pointer-mask
:owner-p owner-p :sync-keyboard-p nil :sync-pointer-p nil :cursor cursor))
(t
(xlib:grab-pointer root pointer-mask
:owner-p owner-p :sync-keyboard-p nil :sync-pointer-p nil)))))
(defun xungrab-pointer ()
"Remove the grab on the cursor and restore the cursor shape."
(setf pointer-grabbed nil)
(xlib:ungrab-pointer *display*)
(xlib:display-finish-output *display*)
(free-grab-pointer)))
(let ((keyboard-grabbed nil))
(defun xgrab-init-keyboard ()
(setf keyboard-grabbed nil))
(defun xgrab-keyboard-p ()
keyboard-grabbed)
(defun xgrab-keyboard (root)
(setf keyboard-grabbed t)
(xlib:grab-keyboard root :owner-p nil :sync-keyboard-p nil :sync-pointer-p nil))
(defun xungrab-keyboard ()
(setf keyboard-grabbed nil)
(xlib:ungrab-keyboard *display*)))
(defun ungrab-all-buttons (window)
(xlib:ungrab-button window :any :modifiers :any))
(defun grab-all-buttons (window)
(ungrab-all-buttons window)
(xlib:grab-button window :any '(:button-press :button-release :pointer-motion)
:modifiers :any
:owner-p nil
:sync-pointer-p t
:sync-keyboard-p nil))
(defun ungrab-all-keys (window)
(xlib:ungrab-key window :any :modifiers :any))
(defmacro with-grab-keyboard-and-pointer ((cursor mask old-cursor old-mask &optional ungrab-main) &body body)
`(let ((pointer-grabbed (xgrab-pointer-p))
(keyboard-grabbed (xgrab-keyboard-p)))
(xgrab-pointer *root* ,cursor ,mask)
(unless keyboard-grabbed
(when ,ungrab-main
(ungrab-main-keys))
(xgrab-keyboard *root*))
(unwind-protect
(progn
,@body)
(progn
(if pointer-grabbed
(xgrab-pointer *root* ,old-cursor ,old-mask)
(xungrab-pointer))
(unless keyboard-grabbed
(when ,ungrab-main
(grab-main-keys))
(xungrab-keyboard))))))
(defmacro with-grab-pointer ((&optional cursor-char cursor-mask-char) &body body)
`(let ((pointer-grabbed-p (xgrab-pointer-p)))
(unless pointer-grabbed-p
(xgrab-pointer *root* ,cursor-char ,cursor-mask-char))
(unwind-protect
(progn
,@body)
(unless pointer-grabbed-p
(xungrab-pointer)))))
(defun stop-button-event ()
(xlib:allow-events *display* :sync-pointer))
(defun replay-button-event ()
(xlib:allow-events *display* :replay-pointer))
;;; Mouse action on window
(let (add-fn add-arg dx dy window)
(define-handler move-window-mode :motion-notify (root-x root-y)
(unless (compress-motion-notify)
(if add-fn
(multiple-value-bind (move-x move-y)
(apply add-fn add-arg)
(when move-x
(setf (x-drawable-x window) (+ root-x dx)))
(when move-y
(setf (x-drawable-y window) (+ root-y dy))))
(setf (x-drawable-x window) (+ root-x dx)
(x-drawable-y window) (+ root-y dy)))))
(define-handler move-window-mode :key-release ()
(throw 'exit-move-window-mode nil))
(define-handler move-window-mode :button-release ()
(throw 'exit-move-window-mode nil))
(defun move-window (orig-window orig-x orig-y &optional additional-fn additional-arg)
(setf window orig-window
add-fn additional-fn
add-arg additional-arg
dx (- (x-drawable-x window) orig-x)
dy (- (x-drawable-y window) orig-y)
(xlib:window-border window) (get-color *color-move-window*))
(raise-window window)
(with-grab-pointer ()
(when additional-fn
(apply additional-fn additional-arg))
(generic-mode 'move-window-mode 'exit-move-window-mode
:original-mode '(main-mode)))))
(let (add-fn add-arg window
o-x o-y
orig-width orig-height
min-width max-width
min-height max-height)
(define-handler resize-window-mode :motion-notify (root-x root-y)
(unless (compress-motion-notify)
(if add-fn
(multiple-value-bind (resize-w resize-h)
(apply add-fn add-arg)
(when resize-w
(setf (x-drawable-width window) (min (max (+ orig-width (- root-x o-x)) 10 min-width) max-width)))
(when resize-h
(setf (x-drawable-height window) (min (max (+ orig-height (- root-y o-y)) 10 min-height) max-height))))
(setf (x-drawable-width window) (min (max (+ orig-width (- root-x o-x)) 10 min-width) max-width)
(x-drawable-height window) (min (max (+ orig-height (- root-y o-y)) 10 min-height) max-height)))))
(define-handler resize-window-mode :key-release ()
(throw 'exit-resize-window-mode nil))
(define-handler resize-window-mode :button-release ()
(throw 'exit-resize-window-mode nil))
(defun resize-window (orig-window orig-x orig-y &optional additional-fn additional-arg)
(let* ((hints (xlib:wm-normal-hints orig-window)))
(setf window orig-window
add-fn additional-fn
add-arg additional-arg
o-x orig-x
o-y orig-y
orig-width (x-drawable-width window)
orig-height (x-drawable-height window)
min-width (or (and hints (xlib:wm-size-hints-min-width hints)) 0)
min-height (or (and hints (xlib:wm-size-hints-min-height hints)) 0)
max-width (or (and hints (xlib:wm-size-hints-max-width hints)) most-positive-fixnum)
max-height (or (and hints (xlib:wm-size-hints-max-height hints)) most-positive-fixnum)
(xlib:window-border window) (get-color *color-move-window*))
(raise-window window)
(with-grab-pointer ()
(when additional-fn
(apply additional-fn additional-arg))
(generic-mode 'resize-window-mode 'exit-resize-window-mode
:original-mode '(main-mode))))))
(define-handler wait-mouse-button-release-mode :button-release ()
(throw 'exit-wait-mouse-button-release-mode nil))
(defun wait-mouse-button-release (&optional cursor-char cursor-mask-char)
(with-grab-pointer (cursor-char cursor-mask-char)
(generic-mode 'wait-mouse-button-release 'exit-wait-mouse-button-release-mode)))
(let ((color-hash (make-hash-table :test 'equal)))
(defun get-color (color)
(multiple-value-bind (val foundp)
(gethash color color-hash)
(if foundp
val
(setf (gethash color color-hash)
(xlib:alloc-color (xlib:screen-default-colormap *screen*) color))))))
(defgeneric ->color (color))
(defmethod ->color ((color-name string))
color-name)
(defmethod ->color ((color integer))
(labels ((hex->float (color)
(/ (logand color #xFF) 256.0)))
(xlib:make-color :blue (hex->float color)
:green (hex->float (ash color -8))
:red (hex->float (ash color -16)))))
(defmethod ->color ((color list))
(destructuring-bind (red green blue) color
(xlib:make-color :blue red :green green :red blue)))
(defmethod ->color ((color xlib:color))
color)
(defmethod ->color (color)
(format t "Wrong color type: ~A~%" color)
"White")
(defun color->rgb (color)
(multiple-value-bind (r g b)
(xlib:color-rgb color)
(+ (ash (round (* 256 r)) +16)
(ash (round (* 256 g)) +8)
(round (* 256 b)))))
(defmacro my-character->keysyms (ch)
"Convert a char to a keysym"
;; XLIB:CHARACTER->KEYSYMS should probably be implemented in NEW-CLX
;; some day. Or just copied from MIT-CLX or some other CLX
;; implementation (see translate.lisp and keysyms.lisp). For now,
;; we do like this. It suffices for modifiers and ASCII symbols.
(if (fboundp 'xlib:character->keysyms)
`(xlib:character->keysyms ,ch)
`(list
(case ,ch
(:character-set-switch #xFF7E)
(:left-shift #xFFE1)
(:right-shift #xFFE2)
(:left-control #xFFE3)
(:right-control #xFFE4)
(:caps-lock #xFFE5)
(:shift-lock #xFFE6)
(:left-meta #xFFE7)
(:right-meta #xFFE8)
(:left-alt #xFFE9)
(:right-alt #xFFEA)
(:left-super #xFFEB)
(:right-super #xFFEC)
(:left-hyper #xFFED)
(:right-hyper #xFFEE)
(t
(etypecase ,ch
(character
;; Latin-1 characters have their own value as keysym
(if (< 31 (char-code ,ch) 256)
(char-code ,ch)
(error "Don't know how to get keysym from ~A" ,ch)))))))))
(defun char->keycode (char)
"Convert a character to a keycode"
(xlib:keysym->keycodes *display* (first (my-character->keysyms char))))
(defun keycode->char (code state)
(xlib:keysym->character *display* (xlib:keycode->keysym *display* code 0) state))
(defun modifiers->state (modifier-list)
(apply #'xlib:make-state-mask modifier-list))
(defun state->modifiers (state)
(xlib:make-state-keys state))
(defun keycode->keysym (code modifiers)
(xlib:keycode->keysym *display* code (cond ((member :shift modifiers) 1)
((member :mod-5 modifiers) 4)
(t 0))))
(let ((modifier-list nil))
(defun init-modifier-list ()
(dolist (name '("Shift_L" "Shift_R" "Control_L" "Control_R"
"Alt_L" "Alt_R" "Meta_L" "Meta_R" "Hyper_L" "Hyper_R"
"Mode_switch" "script_switch" "ISO_Level3_Shift"
"Caps_Lock" "Scroll_Lock" "Num_Lock"))
(awhen (xlib:keysym->keycodes *display* (keysym-name->keysym name))
(push it modifier-list))))
(defun modifier-p (code)
(member code modifier-list)))
(defun wait-no-key-or-button-press ()
(with-grab-keyboard-and-pointer (66 67 66 67)
(loop
(let ((key (loop for k across (xlib:query-keymap *display*)
for code from 0
when (and (plusp k) (not (modifier-p code)))
return t))
(button (loop for b in (xlib:make-state-keys (nth-value 4 (xlib:query-pointer *root*)))
when (member b '(:button-1 :button-2 :button-3 :button-4 :button-5))
return t)))
(when (and (not key) (not button))
(loop while (xlib:event-case (*display* :discard-p t :peek-p nil :timeout 0)
(:motion-notify () t)
(:key-press () t)
(:key-release () t)
(:button-press () t)
(:button-release () t)
(t nil)))
(return))))))
(defun wait-a-key-or-button-press ()
(with-grab-keyboard-and-pointer (24 25 66 67)
(loop
(let ((key (loop for k across (xlib:query-keymap *display*)
unless (zerop k) return t))
(button (loop for b in (xlib:make-state-keys (nth-value 4 (xlib:query-pointer *root*)))
when (member b '(:button-1 :button-2 :button-3 :button-4 :button-5))
return t)))
(when (or key button)
(return))))))
(defun compress-motion-notify ()
(when *have-to-compress-notify*
(loop while (xlib:event-cond (*display* :timeout 0)
(:motion-notify () t)))))
(defun display-all-cursors (&optional (display-time 1))
"Display all X11 cursors for display-time seconds"
(loop for i from 0 to 152 by 2
do (xgrab-pointer *root* i (1+ i))
(dbg i)
(sleep display-time)
(xungrab-pointer)))
;;; Double buffering tools
(defun clear-pixmap-buffer (window gc)
(if (equal *transparent-background* :pseudo)
(xlib:copy-area *background-image* *background-gc*
(x-drawable-x window) (x-drawable-y window)
(x-drawable-width window) (x-drawable-height window)
*pixmap-buffer* 0 0)
(xlib:with-gcontext (gc :foreground (xlib:gcontext-background gc)
:background (xlib:gcontext-foreground gc))
(xlib:draw-rectangle *pixmap-buffer* gc
0 0 (x-drawable-width window) (x-drawable-height window)
t))))
(defun copy-pixmap-buffer (window gc)
(xlib:copy-area *pixmap-buffer* gc
0 0 (x-drawable-width window) (x-drawable-height window)
window 0 0))
(defun is-a-key-pressed-p ()
(loop for k across (xlib:query-keymap *display*)
when (plusp k)
return t))
;;; Windows wm class and name tests
(defmacro defun-equal-wm-class (symbol class)
`(defun ,symbol (window)
(when (xlib:window-p window)
(string-equal (xlib:get-wm-class window) ,class))))
(defmacro defun-equal-wm-name (symbol name)
`(defun ,symbol (window)
(when (xlib:window-p window)
(string-equal (xlib:wm-name window) ,name))))
| 34,049 | Common Lisp | .lisp | 807 | 36.214374 | 122 | 0.635587 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | dbb2e443ee22da0e057bc3f0271132bdadbd838b5e35d8d525aef4f5c0578c36 | 6,475 | [
-1
] |
6,476 | clfswm.lisp | LdBeth_CLFSWM/src/clfswm.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defparameter *clfswm-initializing* nil)
(define-handler main-mode :key-press (code state)
(funcall-key-from-code *main-keys* code state))
(define-handler main-mode :button-press (code state window root-x root-y)
(unless (funcall-button-from-code *main-mouse* code state window root-x root-y *fun-press*)
(replay-button-event)))
(define-handler main-mode :button-release (code state window root-x root-y)
(unless (funcall-button-from-code *main-mouse* code state window root-x root-y *fun-release*)
(replay-button-event)))
(define-handler main-mode :motion-notify (window root-x root-y)
(unless (compress-motion-notify)
(funcall-button-from-code *main-mouse* 'motion
(modifiers->state *default-modifiers*)
window root-x root-y *fun-press*)))
(define-handler main-mode :configure-request (stack-mode window x y width height border-width value-mask)
(let ((change nil))
(labels ((has-x (mask) (= 1 (logand mask 1)))
(has-y (mask) (= 2 (logand mask 2)))
(has-w (mask) (= 4 (logand mask 4)))
(has-h (mask) (= 8 (logand mask 8)))
(has-bw (mask) (= 16 (logand mask 16)))
(has-stackmode (mask) (= 64 (logand mask 64)))
(adjust-from-request ()
(when (has-x value-mask) (setf (x-drawable-x window) x
change :moved))
(when (has-y value-mask) (setf (x-drawable-y window) y
change :moved))
(when (has-h value-mask) (setf (x-drawable-height window) height
change :resized))
(when (has-w value-mask) (setf (x-drawable-width window) width
change :resized))))
(when window
(xlib:with-state (window)
(let ((current-root (find-current-root)))
(if (find-child window current-root)
(let ((parent (find-parent-frame window current-root)))
(if (and parent (managed-window-p window parent))
(setf change (adapt-child-to-parent window parent))
(adjust-from-request)))
(adjust-from-request)))
(when (has-bw value-mask)
(setf (x-drawable-border-width window) border-width
change :resized))
(when (has-stackmode value-mask)
(case stack-mode
(:above
(when (or (child-equal-p window (current-child))
(is-in-current-child-p window))
(setf change (or change :moved))
(when *steal-focus*
(focus-window window)
(when (focus-all-children window (find-parent-frame window (find-current-root)))
(show-all-children))))))))
(unless (eq change :resized)
;; To be ICCCM compliant, send a fake configuration notify event only when
;; the window has moved and not when it has been resized or the border width has changed.
(send-configuration-notify window (x-drawable-x window) (x-drawable-y window)
(x-drawable-width window) (x-drawable-height window)
(x-drawable-border-width window)))))))
(define-handler main-mode :map-request (window send-event-p)
(unless send-event-p
(unless (find-child window *root-frame*)
(unhide-window window)
(process-new-window window)
(map-window window)
(multiple-value-bind (never-managed raise)
(never-managed-window-p window)
(unless (and never-managed raise)
(show-all-children))))))
(define-handler main-mode :unmap-notify (send-event-p event-window window)
(unless (and (not send-event-p)
(not (xlib:window-equal window event-window)))
(when (find-child window *root-frame*)
(setf (window-state window) +withdrawn-state+)
(remove-child-in-all-frames window)
;;(xlib:unmap-window window)
(show-all-children))))
(define-handler main-mode :destroy-notify (send-event-p event-window window)
(unless (or send-event-p
(xlib:window-equal window event-window))
(when (find-child window *root-frame*)
(delete-child-in-all-frames window)
(xlib:destroy-window window)
(show-all-children))))
(define-handler main-mode :enter-notify (window root-x root-y)
(unless (and (> root-x (- (screen-width) 3))
(> root-y (- (screen-height) 3)))
(manage-focus window root-x root-y)))
(define-handler main-mode :focus-in (window)
(unless (child-equal-p window (focused-window))
(set-focus-to-current-child)))
(define-handler main-mode :exposure (window)
(awhen (find-frame-window window)
(display-frame-info it)))
(define-handler main-mode :configure-notify (window)
(when (child-equal-p window *root*)
(unless (eql (place-frames-from-xinerama-infos) :update)
(finish-configuring-root))
(show-all-children)
(call-hook *root-size-change-hook*)))
(defun error-handler (display error-key &rest key-vals &key asynchronous &allow-other-keys)
"Handle X errors"
(cond
;; ignore asynchronous window errors
((and asynchronous
(find error-key '(xlib:window-error xlib:drawable-error xlib:match-error)))
#+:xlib-debug (format t "~&Ignoring XLib asynchronous error: ~s~%" error-key))
((eq error-key 'xlib:access-error)
(if *clfswm-initializing*
(progn
(format t "~3&Another window manager is running. Exiting...~%")
(throw 'exit-clfswm nil))
#+:xlib-debug
(format t "~&Ignoring XLib asynchronous access error: ~s~%" error-key)))
;; all other asynchronous errors are printed.
(asynchronous
#+:xlib-debug (format t "~&Caught Asynchronous X Error: ~s ~s" error-key key-vals))
;;((find error-key '(xlib:window-error xlib:drawable-error xlib:match-error))
;; (format t "~&Ignoring Xlib error: ~S ~S~%" error-key key-vals))
(t
(apply 'error error-key :display display :error-key error-key key-vals))))
(defun main-loop ()
(loop
(with-xlib-protect (:main-loop nil)
(call-hook *loop-hook*)
(process-timers)
(when (xlib:event-listen *display* *loop-timeout*)
(xlib:process-event *display* :handler #'handle-event))
(xlib:display-finish-output *display*)
(setf *x-error-count* 0))))
(defun open-display (display-str protocol)
(multiple-value-bind (host display-num) (parse-display-string display-str)
(setf *display* (xlib:open-display host :display display-num :protocol protocol)
(xlib:display-error-handler *display*) 'error-handler
(getenv "DISPLAY") display-str)))
(defun default-init-hook ()
(place-frames-from-xinerama-infos)
(finish-configuring-root))
(defun init-display ()
(reset-root-list)
(reset-last-head-size)
(reset-bind-or-jump-slots)
(reset-open-menu)
(fill-handle-event-fun-symbols)
(assoc-keyword-handle-event 'main-mode)
(setf *screen* (first (xlib:display-roots *display*))
*root* (xlib:screen-root *screen*)
*no-focus-window* (xlib:create-window :parent *root* :x 0 :y 0 :width 1 :height 1)
*default-font* (xlib:open-font *display* *default-font-string*)
*pixmap-buffer* (xlib:create-pixmap :width (screen-width)
:height (screen-height)
:depth (xlib:screen-root-depth *screen*)
:drawable *root*)
*in-second-mode* nil
*x-error-count* 0
*expose-child-list* nil)
(store-root-background)
(init-modifier-list)
(xgrab-init-pointer)
(xgrab-init-keyboard)
(init-last-child)
(call-hook *binding-hook*)
(clear-timers)
(map-window *no-focus-window*)
(dbg *display*)
(setf (xlib:window-event-mask *root*) (xlib:make-event-mask :substructure-redirect
:substructure-notify
:structure-notify
:property-change
;;:resize-redirect
:exposure
:button-press
:button-release
:pointer-motion))
(xlib:display-finish-output *display*)
;;(intern-atoms *display*)
(netwm-set-properties)
(xlib:display-force-output *display*)
(setf *child-selection* nil)
(setf *root-frame* (create-frame :name "Root" :number 0)
(current-child) *root-frame*)
(call-hook *init-hook*)
(process-existing-windows *screen*)
(show-all-children)
(grab-main-keys)
(xlib:display-finish-output *display*)
(optimize-event-hook))
(defun read-conf-file ()
(let* ((conf (conf-file-name)))
(if conf
(handler-case (load conf)
(error (c)
(format t "~2%*** Error loading configuration file: ~A ***~&~A~%" conf c)
(values nil (format nil "~s" c) conf))
(:no-error (&rest args)
(declare (ignore args))
(values t nil conf)))
(values t nil nil))))
(defun exit-clfswm ()
"Exit clfswm"
(throw 'exit-clfswm nil))
(defun reset-clfswm ()
"Reset clfswm"
(throw 'exit-main-loop nil))
(defun main-unprotected (&key (display (or (getenv "DISPLAY") ":0")) protocol
(read-conf-file-p t) (alternate-conf nil)
error-msg)
(setf *clfswm-initializing* t)
(conf-file-name alternate-conf)
(when read-conf-file-p
(read-conf-file))
(create-configuration-menu :clear t)
(call-hook *main-entrance-hook*)
(handler-case
(open-display display protocol)
(xlib:access-error (c)
(format t "~&~A~&Maybe another window manager is running. [1]~%" c)
(force-output)
(exit-clfswm)))
(handler-case
(init-display)
(xlib:access-error (c)
(ungrab-main-keys)
(xlib:destroy-window *no-focus-window*)
(xlib:close-display *display*)
(format t "~&~A~&Maybe another window manager is running. [2]~%" c)
(force-output)
(exit-clfswm)))
(when error-msg
(info-mode error-msg))
(setf *clfswm-initializing* nil)
(catch 'exit-main-loop
(unwind-protect
(main-loop)
(progn
(ungrab-main-keys)
(xlib:destroy-window *no-focus-window*)
(xlib:free-pixmap *pixmap-buffer*)
(destroy-all-frames-window)
(call-hook *close-hook*)
(clear-event-hooks)
(xlib:close-display *display*)
#+:event-debug
(format t "~2&Unhandled events: ~A~%" *unhandled-events*)))))
(defun main (&key (display (or (getenv "DISPLAY") ":0")) protocol
(read-conf-file-p t)
(alternate-conf nil))
(let (error-msg)
(catch 'exit-clfswm
(loop
(handler-case
(if *other-window-manager*
(run-other-window-manager)
(main-unprotected :display display :protocol protocol
:read-conf-file-p read-conf-file-p
:alternate-conf alternate-conf
:error-msg error-msg))
(error (c)
(let ((msg (format nil "CLFSWM Error: ~A." c)))
(format t "~&~A~%Reinitializing...~%" msg)
(setf error-msg (list (list msg *info-color-title*)
"Reinitializing...")))))))))
| 12,369 | Common Lisp | .lisp | 287 | 35.45993 | 105 | 0.611009 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 58ffea566d116cf1e7730103b481b21370cf86119adb70c2a6a7e6b562c43ac2 | 6,476 | [
-1
] |
6,477 | clfswm-pack.lisp | LdBeth_CLFSWM/src/clfswm-pack.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Tile, pack and fill functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;;;,-----
;;;| Edges functions
;;;`-----
(defun frame-x2 (frame)
(+ (frame-x frame) (frame-w frame)))
(defun frame-y2 (frame)
(+ (frame-y frame) (frame-h frame)))
(defun find-edge-up (current-frame parent)
(let ((y-found 0))
(when parent
(dolist (frame (frame-child parent))
(when (and (frame-p frame)
(not (equal frame current-frame))
(<= (frame-y2 frame) (frame-y current-frame))
(>= (frame-x2 frame) (frame-x current-frame))
(<= (frame-x frame) (frame-x2 current-frame)))
(setf y-found (max y-found (frame-y2 frame))))))
y-found))
(defun find-edge-down (current-frame parent)
(let ((y-found 1))
(when parent
(dolist (frame (frame-child parent))
(when (and (frame-p frame)
(not (equal frame current-frame))
(>= (frame-y frame) (frame-y2 current-frame))
(>= (frame-x2 frame) (frame-x current-frame))
(<= (frame-x frame) (frame-x2 current-frame)))
(setf y-found (min y-found (frame-y frame))))))
y-found))
(defun find-edge-right (current-frame parent)
(let ((x-found 1))
(when parent
(dolist (frame (frame-child parent))
(when (and (frame-p frame)
(not (equal frame current-frame))
(>= (frame-x frame) (frame-x2 current-frame))
(>= (frame-y2 frame) (frame-y current-frame))
(<= (frame-y frame) (frame-y2 current-frame)))
(setf x-found (min x-found (frame-x frame))))))
x-found))
(defun find-edge-left (current-frame parent)
(let ((x-found 0))
(when parent
(dolist (frame (frame-child parent))
(when (and (frame-p frame)
(not (equal frame current-frame))
(<= (frame-x2 frame) (frame-x current-frame))
(>= (frame-y2 frame) (frame-y current-frame))
(<= (frame-y frame) (frame-y2 current-frame)))
(setf x-found (max x-found (frame-x2 frame))))))
x-found))
;;;,-----
;;;| Pack functions
;;;`-----
(defun pack-frame-up (frame parent &optional sp-y-found)
"Pack frame to up"
(let ((y-found (or sp-y-found (find-edge-up frame parent))))
(setf (frame-y frame) y-found)))
(defun pack-frame-down (frame parent &optional sp-y-found)
"Pack frame to down"
(let ((y-found (or sp-y-found (find-edge-down frame parent))))
(setf (frame-y frame) (- y-found (frame-h frame)))))
(defun pack-frame-right (frame parent &optional sp-x-found)
"Pack frame to right"
(let ((x-found (or sp-x-found (find-edge-right frame parent))))
(setf (frame-x frame) (- x-found (frame-w frame)))))
(defun pack-frame-left (frame parent &optional sp-x-found)
"Pack frame to left"
(let ((x-found (or sp-x-found (find-edge-left frame parent))))
(setf (frame-x frame) x-found)))
(defun center-frame (frame)
"Center frame"
(setf (frame-x frame) (/ (- 1 (frame-w frame)) 2)
(frame-y frame) (/ (- 1 (frame-h frame)) 2)))
;;;,-----
;;;| Fill functions
;;;`-----
(defun fill-frame-up (frame parent &optional sp-y-found)
"Fill a frame up"
(let* ((y-found (or sp-y-found (find-edge-up frame parent)))
(dy (- (frame-y frame) y-found)))
(setf (frame-y frame) y-found
(frame-h frame) (+ (frame-h frame) dy))))
(defun fill-frame-down (frame parent &optional sp-y-found)
"Fill a frame down"
(let* ((y-found (or sp-y-found (find-edge-down frame parent)))
(dy (- y-found (frame-y2 frame))))
(setf (frame-h frame) (+ (frame-h frame) dy))))
(defun fill-frame-left (frame parent &optional sp-x-found)
"Fill a frame left"
(let* ((x-found (or sp-x-found (find-edge-left frame parent)))
(dx (- (frame-x frame) x-found)))
(setf (frame-x frame) x-found
(frame-w frame) (+ (frame-w frame) dx))))
(defun fill-frame-right (frame parent &optional sp-x-found)
"Fill a frame rigth"
(let* ((x-found (or sp-x-found (find-edge-right frame parent)))
(dx (- x-found (frame-x2 frame))))
(setf (frame-w frame) (+ (frame-w frame) dx))))
;;;,-----
;;;| Lower functions
;;;`-----
(defun resize-frame-down (frame)
"Resize down a frame"
(when (> (frame-w frame) 0.1)
(setf (frame-x frame) (+ (frame-x frame) 0.01)
(frame-w frame) (max (- (frame-w frame) 0.02) 0.01)))
(when (> (frame-h frame) 0.1)
(setf (frame-y frame) (+ (frame-y frame) 0.01)
(frame-h frame) (max (- (frame-h frame) 0.02) 0.01))))
(defun resize-minimal-frame (frame)
"Resize down a frame to its minimal size"
(dotimes (i 100)
(resize-frame-down frame)))
(defun resize-half-width-left (frame)
(setf (frame-w frame)(/ (frame-w frame) 2)))
(defun resize-half-width-right (frame)
(let* ((new-size (/ (frame-w frame) 2))
(dx (- (frame-w frame) new-size)))
(setf (frame-w frame) new-size)
(incf (frame-x frame) (max dx 0))))
(defun resize-half-height-up (frame)
(setf (frame-h frame) (/ (frame-h frame) 2)))
(defun resize-half-height-down (frame)
(let* ((new-size (/ (frame-h frame) 2))
(dy (- (frame-h frame) new-size)))
(setf (frame-h frame) new-size)
(incf (frame-y frame) (max dy 0))))
;;;;;,-----
;;;;;| Explode/Implode functions
;;;;;`-----
(defun explode-frame (frame)
"Create a new frame for each window in frame"
(when (frame-p frame)
(let ((windows (loop :for child :in (frame-child frame)
:when (xlib:window-p child)
:collect child)))
(dolist (win windows)
(add-frame (create-frame :child (list win)) frame)
(remove-child-in-frame win frame)))))
(defun explode-current-frame ()
"Create a new frame for each window in frame"
(explode-frame (current-child))
(leave-second-mode))
(defun implode-frame (frame)
"Absorb all frames subchildren in frame (explode frame opposite)"
(when (frame-p frame)
(dolist (child (frame-child frame))
(when (frame-p child)
(dolist (subchild (frame-child child))
(setf (frame-child frame) (append (frame-child frame) (list subchild))))
(hide-child child)
(remove-child-in-frame child frame)))))
(defun implode-current-frame ()
"Absorb all frames subchildren in frame (explode frame opposite)"
(implode-frame (current-child))
(leave-second-mode))
;;;;;,-----
;;;;;| Constrained move/resize frames
;;;;;`-----
(labels ((redisplay (frame window)
(show-all-children)
(hide-all-children frame)
(setf (xlib:window-border window) (get-color *color-move-window*)))
(readjust-all-frames-fl-size (parent)
(dolist (child (frame-child parent))
(when (frame-p child)
(setf (frame-x child) (x-px->fl (x-drawable-x (frame-window child)) parent)
(frame-y child) (y-px->fl (x-drawable-y (frame-window child)) parent)
(frame-w child) (w-px->fl (anti-adj-border-wh (x-drawable-width (frame-window child)) child) parent)
(frame-h child) (h-px->fl (anti-adj-border-wh (x-drawable-height (frame-window child)) child)
parent))))))
(defun move-frame-constrained (frame parent orig-x orig-y)
(when (and (frame-p frame) parent (not (child-root-p frame)))
(hide-all-children frame)
(with-slots (window) frame
(let ((snap-size (/ *snap-size* 100.0))
(lx orig-x)
(ly orig-y)
(l-frame-x-r nil)
(l-frame-x-l nil)
(l-frame-y-u nil)
(l-frame-y-d nil))
(readjust-all-frames-fl-size parent)
(move-window window orig-x orig-y
(lambda ()
(let ((move-x t)
(move-y t))
(setf (frame-x frame) (x-px->fl (x-drawable-x window) parent)
(frame-y frame) (y-px->fl (x-drawable-y window) parent))
(multiple-value-bind (x y) (xlib:query-pointer *root*)
(when (> x lx)
(setf l-frame-x-l nil)
(let ((x-found (find-edge-right frame parent)))
(when (< (abs (- x-found (frame-x2 frame))) snap-size)
(pack-frame-right frame parent x-found)
(when (not (equal (frame-x frame) l-frame-x-r))
(redisplay frame window)
(setf l-frame-x-r (frame-x frame)))
(setf move-x nil))))
(when (< x lx)
(setf l-frame-x-r nil)
(let ((x-found (find-edge-left frame parent)))
(when (< (abs (- x-found (frame-x frame))) snap-size)
(pack-frame-left frame parent x-found)
(when (not (equal (frame-x frame) l-frame-x-l))
(redisplay frame window)
(setf l-frame-x-l (frame-x frame)))
(setf move-x nil))))
(when (> y ly)
(setf l-frame-y-u nil)
(let ((y-found (find-edge-down frame parent)))
(when (< (abs (- y-found (frame-y2 frame))) snap-size)
(pack-frame-down frame parent y-found)
(when (not (equal (frame-y frame) l-frame-y-d))
(redisplay frame window)
(setf l-frame-y-d (frame-y frame)))
(setf move-y nil))))
(when (< y ly)
(setf l-frame-y-d nil)
(let ((y-found (find-edge-up frame parent)))
(when (< (abs (- y-found (frame-y frame))) snap-size)
(pack-frame-up frame parent y-found)
(when (not (equal (frame-y frame) l-frame-y-u))
(redisplay frame window)
(setf l-frame-y-u (frame-y frame)))
(setf move-y nil))))
(display-frame-info frame)
(when move-x (setf lx x))
(when move-y (setf ly y))
(values move-x move-y)))))))
(show-all-children)))
(defun resize-frame-constrained (frame parent orig-x orig-y)
(when (and frame parent (not (child-root-p frame)))
(hide-all-children frame)
(with-slots (window) frame
(let ((snap-size (/ *snap-size* 100.0))
(lx orig-x)
(ly orig-y)
(l-frame-w nil)
(l-frame-h nil))
(readjust-all-frames-fl-size parent)
(resize-window window orig-x orig-y
(lambda ()
(let ((resize-w t)
(resize-h t))
(setf (frame-w frame) (w-px->fl (anti-adj-border-wh (x-drawable-width window) frame)
parent)
(frame-h frame) (h-px->fl (anti-adj-border-wh (x-drawable-height window) frame)
parent))
(multiple-value-bind (x y) (xlib:query-pointer *root*)
(when (> x lx)
(let ((x-found (find-edge-right frame parent)))
(when (< (abs (- x-found (frame-x2 frame))) snap-size)
(fill-frame-right frame parent x-found)
(when (not (equal (frame-w frame) l-frame-w))
(redisplay frame window)
(setf l-frame-w (frame-w frame)))
(setf resize-w nil))))
(when (< x lx)
(setf l-frame-w nil))
(when (> y ly)
(let ((y-found (find-edge-down frame parent)))
(when (< (abs (- y-found (frame-y2 frame))) snap-size)
(fill-frame-down frame parent y-found)
(when (or (null l-frame-h)
(and (numberp l-frame-h)
(/= (frame-h frame) l-frame-h)))
(redisplay frame window)
(setf l-frame-h (frame-h frame)))
(setf resize-h nil))))
(when (< y ly)
(setf l-frame-h nil))
(when resize-w (setf lx x))
(when resize-h (setf ly y))
(values resize-w resize-h)))))))
(show-all-children))))
| 14,681 | Common Lisp | .lisp | 302 | 34.847682 | 121 | 0.49253 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | cb684407048212e5d129b8555c803d40b12634febab201aadfbc6edc5a580af9 | 6,477 | [
-1
] |
6,478 | clfswm-menu.lisp | LdBeth_CLFSWM/src/clfswm-menu.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Menu functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defmacro with-all-menu ((menu item) &body body)
(let ((rec (gensym))
(subm (gensym)))
`(labels ((,rec (,item)
,@body
(when (menu-p ,item)
(dolist (,subm (menu-item ,item))
(,rec ,subm)))
(when (and (menu-item-p ,item) (menu-p (menu-item-value ,item)))
(,rec (menu-item-value ,item)))))
(,rec ,menu))))
(defun add-item (item &optional (menu *menu*))
(setf (menu-item menu) (nconc (menu-item menu) (list item))))
(defun del-item (item &optional (menu *menu*))
(setf (menu-item menu) (remove item (menu-item menu))))
;;; Finding functions
(defun find-menu (name &optional (root *menu*))
(with-all-menu (root item)
(when (and (menu-p item)
(equal name (menu-name item)))
(return-from find-menu item))))
(defun find-toplevel-menu (name &optional (root *menu*))
(when (menu-p root)
(dolist (item (menu-item root))
(when (and (menu-item-p item)
(menu-p (menu-item-value item)))
(when (equal name (menu-name (menu-item-value item)))
(return (menu-item-value item)))))))
(defun find-item-by-key (key &optional (root *menu*))
(with-all-menu (root item)
(when (and (menu-item-p item)
(equal (menu-item-key item) key))
(return-from find-item-by-key item))))
(defun find-item-by-value (value &optional (root *menu*))
(with-all-menu (root item)
(when (and (menu-item-p item)
(equal (menu-item-value item) value))
(return-from find-item-by-value item))))
(defun del-item-by-key (key &optional (menu *menu*))
(del-item (find-item-by-key key menu) menu))
(defun del-item-by-value (value &optional (menu *menu*))
(del-item (find-item-by-value value menu) menu))
;;; Convenient functions
(defun find-next-menu-key (key menu)
"key is :next for the next free key in menu or a string"
(if (eql key :next)
(string (number->char (length (menu-item menu))))
key))
(defun add-menu-key (menu-name key value &optional (root *menu*))
(let ((menu (find-menu menu-name root)))
(add-item (make-menu-item :key (find-next-menu-key key menu) :value value) (find-menu menu-name root))))
(defun add-sub-menu (menu-or-name key sub-menu-name &optional (doc "Sub menu") (root *menu*))
(let ((menu (if (or (stringp menu-or-name) (symbolp menu-or-name))
(find-menu menu-or-name root)
menu-or-name))
(submenu (make-menu :name sub-menu-name :doc doc)))
(add-item (make-menu-item :key (find-next-menu-key key menu) :value submenu) menu)
submenu))
(defun del-menu-key (menu-name key &optional (root *menu*))
(del-item-by-key key (find-menu menu-name root)))
(defun del-menu-value (menu-name value &optional (root *menu*))
(del-item-by-value value (find-menu menu-name root)))
(defun del-sub-menu (menu-name sub-menu-name &optional (root *menu*))
(del-item-by-value (find-menu sub-menu-name) (find-menu menu-name root)))
(defun clear-sub-menu (menu-name sub-menu-name &optional (root *menu*))
(setf (menu-item (find-menu sub-menu-name (find-menu menu-name root))) nil))
(defun add-menu-comment (menu-name &optional (comment "---") (root *menu*))
(add-item (make-menu-item :key nil :value comment) (find-menu menu-name root)))
(defun init-menu ()
(setf *menu* (make-menu :name 'main :doc "Main menu")))
;;; Display menu functions
(defun open-menu-do-action (action menu parent)
(typecase action
(menu (open-menu action (cons menu parent)))
(null (awhen (first parent)
(open-menu it (rest parent))))
(t (when (fboundp action)
(funcall action)))))
(let ((menu-oppened nil))
(defun reset-open-menu ()
(setf menu-oppened nil))
(defun open-menu (&optional (menu *menu*) (parent nil))
"Open the main menu"
(unless menu-oppened
(setf menu-oppened t)
(when menu
(let ((action nil)
(old-info-keys (copy-hash-table *info-keys*)))
(labels ((menu-entry (item value)
(list (list (format nil "~A" (menu-item-key item)) *menu-color-menu-key*)
(list (format nil ": < ~A >" (menu-doc value)) *menu-color-submenu*)
(list (format nil " ~A" (find-associated-key-bindings
(create-symbol 'open- (menu-name value))))
*menu-key-bound-color*)))
(menu-comment (item)
(list (list (format nil "~A" (menu-item-value item)) *menu-color-comment*)))
(menu-line (item value)
(list (list (format nil "~A" (menu-item-key item)) *menu-color-key*)
(format nil ": ~A" (documentation value 'function))
(list (format nil " ~A" (find-associated-key-bindings value))
*menu-key-bound-color*)))
(populate-menu ()
(let ((info-list nil))
(dolist (item (menu-item menu))
(let ((value (menu-item-value item)))
(push (typecase value
(menu (menu-entry item value))
(string (menu-comment item))
(t (menu-line item value)))
info-list)
(when (menu-item-key item)
(define-info-key-fun (list (menu-item-key item))
(lambda (&optional args)
(declare (ignore args))
(setf action value)
(leave-info-mode nil))))))
(nreverse info-list))))
(let ((selected-item (info-mode (populate-menu))))
(setf *info-keys* old-info-keys)
(when (and selected-item (>= selected-item 0))
(awhen (nth selected-item (menu-item menu))
(setf action (menu-item-value it)))))
(setf menu-oppened nil)
(open-menu-do-action action menu parent)))))))
| 7,321 | Common Lisp | .lisp | 149 | 40.167785 | 108 | 0.564821 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 43970b39ec2b9c878fd1a6517c6e946a93a2dd0bf5c33109abb6006dd8da526b | 6,478 | [
-1
] |
6,479 | clfswm-keys.lisp | LdBeth_CLFSWM/src/clfswm-keys.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Keys functions definition
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defparameter *fun-press* #'first)
(defparameter *fun-release* #'second)
(defun with-capslock ()
(pushnew :lock *default-modifiers*))
(defun without-capslock ()
(setf *default-modifiers* (remove :lock *default-modifiers*)))
(defun with-numlock ()
(pushnew :mod-2 *default-modifiers*))
(defun without-numlock ()
(setf *default-modifiers* (remove :mod-2 *default-modifiers*)))
;;; CONFIG - Key mode names
(defmacro define-init-hash-table-key (hash-table name)
(let ((init-name (create-symbol "init-" (format nil "~A" hash-table))))
`(progn
(defun ,init-name ()
(setf ,hash-table (make-hash-table :test 'equal))
(setf (gethash 'name ,hash-table) ,name))
(,init-name))))
(define-init-hash-table-key *main-keys* "Main mode keys")
(define-init-hash-table-key *main-mouse* "Mouse buttons actions in main mode")
(define-init-hash-table-key *second-keys* "Second mode keys")
(define-init-hash-table-key *second-mouse* "Mouse buttons actions in second mode")
(define-init-hash-table-key *info-keys* "Info mode keys")
(define-init-hash-table-key *info-mouse* "Mouse buttons actions in info mode")
(define-init-hash-table-key *query-keys* "Query mode keys")
(define-init-hash-table-key *circulate-keys* "Circulate mode keys")
(define-init-hash-table-key *circulate-keys-release* "Circulate mode release keys")
(define-init-hash-table-key *expose-keys* "Expose windows mode keys")
(define-init-hash-table-key *expose-mouse* "Mouse buttons actions in expose windows mode")
(defun unalias-modifiers (list)
(dolist (mod *modifier-alias*)
(setf list (substitute (second mod) (first mod) list)))
list)
(defun key->list (key)
(list (first key) (modifiers->state (append (unalias-modifiers (rest key))
(unalias-modifiers *default-modifiers*)))))
(defmacro define-define-key (name hashtable)
(let ((name-key-fun (create-symbol "define-" name "-key-fun"))
(name-key (create-symbol "define-" name "-key"))
(undefine-name-fun (create-symbol "undefine-" name "-key-fun"))
(undefine-name (create-symbol "undefine-" name "-key"))
(undefine-multi-name (create-symbol "undefine-" name "-multi-keys")))
`(progn
(defun ,name-key-fun (key function &rest args)
"Define a new key, a key is '(char modifier1 modifier2...))"
(setf (gethash (key->list key) ,hashtable) (list function args)))
(defmacro ,name-key ((key &rest modifiers) function &rest args)
`(,',name-key-fun (list ,key ,@modifiers) ,function ,@args))
(defun ,undefine-name-fun (key)
"Undefine a new key, a key is '(char modifier1 modifier2...))"
(remhash (key->list key) ,hashtable))
(defmacro ,undefine-name ((key &rest modifiers))
`(,',undefine-name-fun (list ,key ,@modifiers)))
(defmacro ,undefine-multi-name (&rest keys)
`(progn
,@(loop for k in keys
collect `(,',undefine-name ,k)))))))
(defmacro define-define-mouse (name hashtable)
(let ((name-mouse-fun (create-symbol "define-" name "-fun"))
(name-mouse (create-symbol "define-" name))
(undefine-name (create-symbol "undefine-" name)))
`(progn
(defun ,name-mouse-fun (button function-press &optional function-release &rest args)
"Define a new mouse button action, a button is '(button number '(modifier list))"
(setf (gethash (key->list button) ,hashtable) (list function-press function-release args)))
(defmacro ,name-mouse ((button &rest modifiers) function-press &optional function-release &rest args)
`(,',name-mouse-fun (list ,button ,@modifiers) ,function-press ,function-release ,@args))
(defmacro ,undefine-name ((key &rest modifiers))
`(remhash (list ,key ,@modifiers) ,',hashtable)))))
(define-define-key "main" *main-keys*)
(define-define-key "second" *second-keys*)
(define-define-key "info" *info-keys*)
(define-define-key "query" *query-keys*)
(define-define-key "circulate" *circulate-keys*)
(define-define-key "circulate-release" *circulate-keys-release*)
(define-define-key "expose" *expose-keys*)
(define-define-mouse "main-mouse" *main-mouse*)
(define-define-mouse "second-mouse" *second-mouse*)
(define-define-mouse "info-mouse" *info-mouse*)
(define-define-mouse "expose-mouse" *expose-mouse*)
(defun add-in-state (state modifier)
"Add a modifier in a state"
(modifiers->state (append (state->modifiers state) (list modifier))))
(defmacro define-ungrab/grab (name function hashtable)
`(defun ,name ()
(maphash #'(lambda (k v)
(declare (ignore v))
(when (consp k)
(handler-case
(let* ((key (first k))
(modifiers (second k))
(keycode (typecase key
(character (multiple-value-list (char->keycode key)))
(number key)
(string (let* ((keysym (keysym-name->keysym key))
(ret-keycode (multiple-value-list
(xlib:keysym->keycodes *display* keysym))))
(let ((found nil))
(dolist (kc ret-keycode)
(when (= keysym (xlib:keycode->keysym *display* kc 0))
(setf found t)))
(unless found
(setf modifiers (add-in-state modifiers :shift))))
ret-keycode)))))
(if keycode
(if (consp keycode)
(dolist (kc (remove-duplicates keycode))
(,function *root* kc :modifiers modifiers))
(,function *root* keycode :modifiers modifiers))
(format t "~&Grabbing error: Can't find key '~A'~%" key)))
(error (c)
;;(declare (ignore c))
(format t "~&Grabbing error: Can't grab key '~A' (~A)~%" k c)))
(force-output)))
,hashtable)))
(define-ungrab/grab grab-main-keys xlib:grab-key *main-keys*)
(define-ungrab/grab ungrab-main-keys xlib:ungrab-key *main-keys*)
(defun find-key-from-code (hash-table-key code state)
"Return the function associated to code/state"
(labels ((function-from (key &optional (new-state state))
(multiple-value-bind (function foundp)
(gethash (list key new-state) hash-table-key)
(when (and foundp (first function))
function)))
(from-code ()
(function-from code))
(from-char ()
(let ((char (keycode->char code state)))
(function-from char)))
(from-string ()
(let ((string (keysym->keysym-name (xlib:keycode->keysym *display* code 0))))
(function-from string)))
(from-string-shift ()
(let* ((modifiers (state->modifiers state))
(string (keysym->keysym-name (keycode->keysym code modifiers))))
(function-from string)))
(from-string-no-shift ()
(let* ((modifiers (state->modifiers state))
(string (keysym->keysym-name (keycode->keysym code modifiers))))
(function-from string (modifiers->state (remove :shift modifiers))))))
(or (from-code) (from-char) (from-string) (from-string-shift) (from-string-no-shift))))
(defun funcall-key-from-code (hash-table-key code state &rest args)
(let ((function (find-key-from-code hash-table-key code state)))
(when function
(apply (first function) (append args (second function)))
t)))
(defun funcall-button-from-code (hash-table-key code state window root-x root-y
&optional (action *fun-press*) args)
(let ((state (modifiers->state (set-difference (state->modifiers state)
'(:button-1 :button-2 :button-3 :button-4 :button-5)))))
(multiple-value-bind (function foundp)
(gethash (list code state) hash-table-key)
(if (and foundp (funcall action function))
(progn
(apply (funcall action function) `(,window ,root-x ,root-y ,@(append args (third function))))
t)
nil))))
(defun binding-substitute-modifier (to from &optional (hashtables (list *main-keys* *main-mouse*
*second-keys* *second-mouse*
*info-keys* *info-mouse*
*query-keys*
*circulate-keys* *circulate-keys-release*
*expose-keys* *expose-mouse*)))
"Utility to change modifiers after binding definition"
(labels ((change (&optional (hashtable *main-keys*) to from)
(maphash (lambda (k v)
(when (consp k)
(let ((state (modifiers->state (substitute to from (state->modifiers (second k))))))
(remhash k hashtable)
(setf (gethash (list (first k) state) hashtable) v))))
hashtable)))
(dolist (h hashtables)
(change h to from))))
(defmacro define-keys ((mode) &body keys)
(let ((symbol (create-symbol "DEFINE-" mode "-KEY")))
`(progn
,@(loop for k in keys collect `(,symbol ,@k)))))
(defun find-associated-key-bindings (function)
"Return keys in main and second mode bounds to function"
(labels ((key-string (hash)
(let ((binding (or (find-in-hash function hash)
(search-in-hash function hash))))
(when binding
(let ((key (first binding))
(modifier (and (second binding) (state->modifiers (second binding)))))
(with-output-to-string (str)
(when key
(dolist (mod modifier)
(format str "~A-" (cond
((string-equal mod "MOD-1") "M")
((string-equal mod "CONTROL") "C")
((string-equal mod "SHIFT") "S")
(t mod))))
(format str "~A" key))))))))
(let ((main-string (key-string *main-keys*))
(second-string (key-string *second-keys*)))
(if (or main-string second-string)
(if (string-equal main-string second-string)
(format nil "[~A]" main-string)
(format nil "[~A|~A]" (or main-string "-") (or second-string "-")))
""))))
| 11,046 | Common Lisp | .lisp | 226 | 42.013274 | 114 | 0.621946 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 10108ad20cbd1d3882897941720089856661fdb5cede6a8f476d7f6923520101 | 6,479 | [
-1
] |
6,480 | clfswm-generic-mode.lisp | LdBeth_CLFSWM/src/clfswm-generic-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defun generic-mode (mode exit-tag &key enter-function loop-function leave-function
(loop-hook *loop-hook*) original-mode)
"Enter in a generic mode"
(let ((last-mode *current-event-mode*))
(unwind-protect
(progn
(unassoc-keyword-handle-event)
(when original-mode
(dolist (add-mode (ensure-list original-mode))
(assoc-keyword-handle-event add-mode)))
(assoc-keyword-handle-event mode)
(with-xlib-protect ()
(nfuncall enter-function)
(catch exit-tag
(loop
(with-xlib-protect (:generic-mode exit-tag)
(call-hook loop-hook)
(process-timers)
(nfuncall loop-function)
(when (xlib:event-listen *display* *loop-timeout*)
(xlib:process-event *display* :handler #'handle-event))
(xlib:display-finish-output *display*))))))
(with-xlib-protect ()
(nfuncall leave-function))
(unassoc-keyword-handle-event)
(assoc-keyword-handle-event last-mode))))
| 2,371 | Common Lisp | .lisp | 51 | 39.235294 | 83 | 0.553063 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 8439a759eb834fee6a1972be726bc496136649b222d0d4981ed41c216f550dcc | 6,480 | [
-1
] |
6,481 | clfswm-placement.lisp | LdBeth_CLFSWM/src/clfswm-placement.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Placement functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defun get-placement-values (placement &optional (width 0) (height 0) (border-size *border-size*))
(typecase placement
(list (values-list placement))
(function (funcall placement width height border-size))
(symbol
(if (fboundp placement)
(funcall placement width height border-size)
(values 0 0 width height)))
(t (values 0 0 width height))))
(defmacro with-placement ((placement x y &optional (width 0) (height 0) border-size) &body body)
`(multiple-value-bind (,x ,y width height)
,(if border-size
`(get-placement-values ,placement ,width ,height ,border-size)
`(get-placement-values ,placement ,width ,height))
(declare (ignorable width height))
,@body))
;;;; Test functions
;;
;;(defun fun-placement (&optional width height)
;; (declare (ignore width height))
;; (values 30 40))
;;
;;(defparameter *placement-test* (list 10 20))
;;;;(defparameter *placement-test* #'fun-placement)
;;;;(defparameter *placement-test* 'fun-placement)
;;
;;(defun toto ()
;; (with-placement (*placement-test* x y)
;; (format t "X=~A Y=~A~%" x y)))
;;;
;;; Absolute placement
;;;
(defun root-screen-coord (border-size)
(values (- (screen-width) (* 2 border-size))
(- (screen-height) (* 2 border-size))))
(defmacro with-root-screen-coord ((border-size w h) &body body)
`(multiple-value-bind (,w ,h)
(root-screen-coord ,border-size)
(let ((width (min width ,w))
(height (min height ,h)))
,@body)))
(defun top-left-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values 0 0 width height)))
(defun top-middle-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values (truncate (/ (- w width) 2)) 0 width height)))
(defun top-right-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values (- w width) 0 width height)))
(defun middle-left-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values 0 (truncate (/ (- h height) 2)) width height)))
(defun middle-middle-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values (truncate (/ (- w width) 2)) (truncate (/ (- h height) 2)) width height)))
(defun middle-right-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values (- w width) (truncate (/ (- h height) 2)) width height)))
(defun bottom-left-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values 0 (- h height) width height)))
(defun bottom-middle-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values (truncate (/ (- w width) 2)) (- h height) width height)))
(defun bottom-right-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-root-screen-coord (border-size w h)
(values (- w width) (- h height) width height)))
;;;
;;; Here placement: Evaluates to current position of pointer.
;;;
(defun here-placement (&optional (width 0) (height 0) (border-size *border-size*))
(declare (ignore border-size))
(with-x-pointer
(values x y width height)))
;;;
;;; Current child placement
;;;
(defun current-child-coord (border-size)
(typecase (current-child)
(xlib:window (values (x-drawable-x (current-child))
(x-drawable-y (current-child))
(- (x-drawable-width (current-child)) (* 2 border-size))
(- (x-drawable-height (current-child)) (* 2 border-size))
(x-drawable-border-width (current-child))))
(frame (values (frame-rx (current-child))
(frame-ry (current-child))
(- (frame-rw (current-child)) (* 2 border-size))
(- (frame-rh (current-child)) (* 2 border-size))
(x-drawable-border-width (frame-window (current-child)))))
(t (values 0 0 10 10 1))))
(defmacro with-current-child-coord ((border-size x y w h bds) &body body)
"Bind x y w h bds to current child coordinates and border size"
`(multiple-value-bind (,x ,y ,w ,h ,bds)
(current-child-coord ,border-size)
(let ((width (min w width))
(height (min h height)))
,@body)))
(defun top-left-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x bds) (+ y bds) width height)))
(defun top-middle-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x (truncate (/ (- w width) 2)) bds) (+ y bds) width height)))
(defun top-right-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x (- w width) bds) (+ y bds) width height)))
(defun middle-left-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x bds) (+ y (truncate (/ (- h height) 2)) bds) width height)))
(defun middle-middle-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x (truncate (/ (- w width) 2)) bds) (+ y (truncate (/ (- h height) 2)) bds)
width height)))
(defun middle-right-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x (- w width) bds) (+ y (truncate (/ (- h height) 2)) bds)
width height)))
(defun bottom-left-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x bds) (+ y (- h height) bds) width height)))
(defun bottom-middle-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x (truncate (/ (- w width) 2)) bds) (+ y (- h height) bds) width height)))
(defun bottom-right-child-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-child-coord (border-size x y w h bds)
(values (+ x (- w width) bds) (+ y (- h height) bds) width height)))
;;;
;;; Current root placement
;;;
(defparameter *get-current-root-fun* (lambda ()
(find-root (current-child))))
(defun current-root-coord (border-size)
(let ((root (funcall *get-current-root-fun*)))
(values (root-x root) (root-y root)
(- (root-w root) (* 2 border-size))
(- (root-h root) (* 2 border-size)))))
(defmacro with-current-root-coord ((border-size x y w h) &body body)
`(multiple-value-bind (,x ,y ,w ,h)
(current-root-coord ,border-size)
(let ((width (min w width))
(height (min h height)))
,@body)))
(defun top-left-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values x y width height)))
(defun top-middle-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values (+ x (truncate (/ (- w width) 2))) y width height)))
(defun top-right-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values (+ x (- w width)) y width height)))
(defun middle-left-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values x (+ y (truncate (/ (- h height) 2))) width height)))
(defun middle-middle-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values (+ x (truncate (/ (- w width) 2))) (+ y (truncate (/ (- h height) 2))) width height)))
(defun middle-right-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values (+ x (- w width)) (+ y (truncate (/ (- h height) 2))) width height)))
(defun bottom-left-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values x (+ y (- h height)) width height)))
(defun bottom-middle-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values (+ x (truncate (/ (- w width) 2))) (+ y (- h height)) width height)))
(defun bottom-right-root-placement (&optional (width 0) (height 0) (border-size *border-size*))
(with-current-root-coord (border-size x y w h)
(values (+ x (- w width)) (+ y (- h height)) width height)))
;;; Some tests
(defun test-some-placement (placement)
(setf *second-mode-placement* placement
*query-mode-placement* placement))
| 10,430 | Common Lisp | .lisp | 199 | 48.407035 | 98 | 0.640912 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 7151febc99a0c17a0bcd731545c76f0f331785d9b429ec0f897ad4b765baad4c | 6,481 | [
-1
] |
6,482 | clfswm-configuration.lisp | LdBeth_CLFSWM/src/clfswm-configuration.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Configuration definitions and Menu generation
;;;
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defun find-configuration-variables ()
(let ((all-groups nil)
(all-variables nil))
(maphash (lambda (key val)
(pushnew (configvar-group val) all-groups :test #'string-equal)
(push (list key (configvar-group val)) all-variables))
*config-var-table*)
(values all-groups all-variables)))
(defun find-symbol-function (function)
(with-all-internal-symbols (symbol :clfswm)
(when (and (fboundp symbol) (equal (symbol-function symbol) function))
(return-from find-symbol-function symbol))))
(defun escape-conf-value (value)
(cond ((or (equal value t) (equal value nil))
(format nil "~S" value))
((consp value)
(format nil "(quote ~S)" value))
((symbolp value)
(format nil "'~S" value))
((functionp value)
(format nil "'~S" (find-symbol-function value)))
((xlib:color-p value)
(format nil "(->color #x~X)" (color->rgb value)))
(t (format nil "~S" value))))
(defun escape-conf-symbol-value (symbol)
(let ((value (symbol-value symbol)))
(escape-conf-value value)))
(defun get-config-value (value)
(ignore-errors (eval (read-from-string value))))
(defun reset-config-to-default-value (symbol)
(setf (symbol-value symbol) (config-default-value symbol)))
;;; Save configuration variables part
(defun temp-conf-file-name ()
(let ((name (conf-file-name)))
(make-pathname :directory (pathname-directory name)
:name (concatenate 'string (pathname-name name) "-tmp"))))
(defun copy-previous-conf-file-begin (stream-in stream-out)
(loop for line = (read-line stream-in nil nil)
while line
until (zerop (or (search ";;; ### Internal variables definitions" line) -1))
do (format stream-out "~A~%" line)))
(defun copy-previous-conf-file-end (stream-in stream-out)
(loop for line = (read-line stream-in nil nil)
while line
until (zerop (or (search ";;; ### End of internal variables definitions" line) -1)))
(loop for line = (read-line stream-in nil nil)
while line
do (format stream-out "~A~%" line)))
(defun save-variables-in-conf-file (stream)
(multiple-value-bind (all-groups all-variables)
(find-configuration-variables)
(format stream "~&;;; ### Internal variables definitions ### ;;;~%")
(format stream ";;; ### You can edit this part when clfswm is not running ### ;;;~%")
(format stream ";;; ### And you can remove this part to revert to the ### ;;;~%")
(format stream ";;; ### original configuration variables values. ### ;;;~%")
(format stream "(in-package :clfswm)~2%")
(format stream "(setf~%")
(dolist (group all-groups)
(format stream " ;; ~A:~%" (config-group->string group))
(dolist (var all-variables)
(unless (equal (escape-conf-symbol-value (first var))
(escape-conf-value (config-default-value (first var))))
(when (string-equal (second var) group)
(format stream " ~A ~A~%" (first var)
(escape-conf-symbol-value (first var))))))
(format stream "~%"))
(format stream ")~%")
(format stream ";;; ### End of internal variables definitions ### ;;;~%")))
(defun save-configuration-variables ()
"Save all configuration variables in clfswmrc"
(let ((conffile (conf-file-name))
(tempfile (temp-conf-file-name)))
(with-open-file (stream-in conffile :direction :input :if-does-not-exist :create)
(with-open-file (stream-out tempfile :direction :output :if-exists :supersede)
(copy-previous-conf-file-begin stream-in stream-out)
(save-variables-in-conf-file stream-out)
(copy-previous-conf-file-end stream-in stream-out)))
(delete-file conffile)
(rename-file tempfile conffile)
nil))
;;; Configuration menu definition
(defun group->menu (group)
(intern (string-upcase (format nil "conf-~A" group)) :clfswm))
(defun query-conf-value (var string original)
(labels ((warn-wrong-type (result original)
(if (equal (simple-type-of result) (simple-type-of original))
result
(if (query-yes-or-no "~A and ~A are not of the same type (~A and ~A). Do you really want to use this value?"
(escape-conf-value result) (escape-conf-value original)
(type-of result) (type-of original))
result
original)))
(ask-set-default-value (original-val)
(let ((default (config-default-value var)))
(if (query-yes-or-no "Reset ~A from ~A to ~A?" var original (escape-conf-value default))
default
original-val))))
(multiple-value-bind (result return)
(query-string (format nil "Configure ~A - ~A (blank=Default: ~A)" string
(documentation var 'variable)
(escape-conf-value (config-default-value var)))
original)
(let ((original-val (get-config-value original)))
(if (equal return :Return)
(if (string= result "")
(ask-set-default-value original-val)
(let ((result-val (get-config-value result)))
(warn-wrong-type result-val original-val)))
original-val)))))
(defun create-conf-function (var)
(let* ((string (remove #\* (format nil "~A" var)))
(symbol (intern (format nil "CONFIGURE-~A" string) :clfswm)))
(setf (symbol-function symbol) (lambda ()
(setf (symbol-value var) (query-conf-value var string (escape-conf-symbol-value var)))
(open-menu (find-menu 'configuration-menu)))
(documentation symbol 'function) (format nil "Configure ~A" string))
symbol))
(defun create-configuration-menu (&key clear)
"Configuration menu"
(when clear
(clear-sub-menu 'main 'configuration-menu))
(multiple-value-bind (all-groups all-variables)
(find-configuration-variables)
(loop for group in all-groups
for i from 0
do (let ((menu (group->menu group)))
(add-sub-menu 'configuration-menu (number->char i) menu (config-group->string group))
(loop for var in all-variables
with j = -1
do (when (equal (second var) group)
(add-menu-key menu (number->char (incf j))
(create-conf-function (first var))))))))
(add-menu-key 'configuration-menu "F2" 'save-configuration-variables)
(add-menu-key 'configuration-menu "F3" 'reset-all-config-variables))
(defun reset-all-config-variables ()
"Reset all configuration variables to their default values"
(when (query-yes-or-no "Do you really want to reset all values to their default?")
(maphash (lambda (key val)
(declare (ignore val))
(reset-config-to-default-value key))
*config-var-table*))
(open-menu (find-menu 'configuration-menu)))
| 7,960 | Common Lisp | .lisp | 168 | 41.880952 | 111 | 0.632006 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 8d7f7c295fcba4175e6c36b30c49f8f4c8e78450b837714196eaa53d2040bbbf | 6,482 | [
-1
] |
6,483 | clfswm-layout.lisp | LdBeth_CLFSWM/src/clfswm-layout.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Layout functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
;;; CONFIG - Layout menu
;;;
;;; To add a new layout:
;;; 1- define your own layout: a method returning the real size of the
;;; child in screen size (integer) as 4 values (rx, ry, rw, rh).
;;; This method can use the float size of the child (x, y ,w , h).
;;; It can be specialized for xlib:window or frame
;;; 2- Define a setter function for your layout
;;; 3- Register your new layout with register-layout or create
;;; a sub menu for it with register-layout-sub-menu.
(defparameter *layout-current-key* (1- (char-code #\a)))
;;; Generic functions
(defun set-layout (layout)
"Set the layout of the current child"
(when (frame-p (current-child))
(setf (frame-layout (current-child)) layout)
(leave-second-mode)))
(defun set-layout-dont-leave (layout)
"Set the layout of the current child"
(when (frame-p (current-child))
(setf (frame-layout (current-child)) layout)))
(defun set-layout-once (layout-name)
(set-layout-dont-leave layout-name)
(show-all-children)
(fixe-real-size-current-child)
(set-layout-dont-leave #'no-layout))
(defun set-layout-simple (layout)
"Set the layout of the current child"
(set-layout-dont-leave layout)
(show-all-children))
(defun get-managed-child (parent)
"Return only the windows that are managed for tiling"
(when (frame-p parent)
(remove-if #'(lambda (x)
(and (xlib:window-p x) (not (managed-window-p x parent))))
(frame-child parent))))
(defun next-layout-key ()
(code-char (incf *layout-current-key*)))
(defun register-layout (layout)
(add-menu-key 'frame-layout-menu (next-layout-key) layout))
(defun register-layout-sub-menu (name doc layout-list)
(add-sub-menu 'frame-layout-menu (next-layout-key) name doc)
(loop :for item :in layout-list
:for i :from 0
:do (typecase item
(cons (add-menu-key name (first item) (second item)))
(string (add-menu-comment name item))
(t (add-menu-key name (number->char i) item)))))
(defun layout-ask-size (msg slot &optional (min 80))
(when (frame-p (current-child))
(let ((new-size (/ (or (query-number msg (* (frame-data-slot (current-child) slot) 100)) min) 100)))
(setf (frame-data-slot (current-child) slot) (max (min new-size 0.99) 0.01)))))
(defun adjust-layout-size (slot inc)
(when (frame-p (current-child))
(setf (frame-data-slot (current-child) slot)
(max (min (+ (frame-data-slot (current-child) slot) inc) 0.99) 0.01))))
(defun inc-tile-layout-size ()
"Increase the tile layout size"
(adjust-layout-size :tile-size 0.05)
(show-all-children))
(defun dec-tile-layout-size ()
"Decrease the tile layout size"
(adjust-layout-size :tile-size -0.05)
(show-all-children))
(defun inc-slow-tile-layout-size ()
"Increase slowly the tile layout size"
(adjust-layout-size :tile-size 0.01)
(show-all-children))
(defun dec-slow-tile-layout-size ()
"Decrease slowly the tile layout size"
(adjust-layout-size :tile-size -0.01)
(show-all-children))
(defun fast-layout-switch ()
"Switch between two layouts"
(when (frame-p (current-child))
(with-slots (layout) (current-child)
(let* ((layout-list (frame-data-slot (current-child) :fast-layout))
(first-layout (ensure-function (first layout-list)))
(second-layout (ensure-function (second layout-list))))
(setf layout (if (eql layout first-layout)
second-layout
first-layout))
(leave-second-mode)))))
(defun push-in-fast-layout-list ()
"Push the current layout in the fast layout list"
(when (frame-p (current-child))
(setf (frame-data-slot (current-child) :fast-layout)
(list (frame-layout (current-child))
(first (frame-data-slot (current-child) :fast-layout))))
(leave-second-mode)))
(register-layout-sub-menu 'frame-fast-layout-menu "Frame fast layout menu"
'(("s" fast-layout-switch)
("p" push-in-fast-layout-list)))
;;; No layout
(defgeneric no-layout (child parent)
(:documentation "No layout: Maximize windows in their frame - Leave frames to their original size"))
(defmethod no-layout ((child xlib:window) parent)
(with-slots (rx ry rw rh) parent
(values (adj-border-xy rx parent)
(adj-border-xy ry parent)
(adj-border-wh rw child)
(adj-border-wh rh child))))
(defmethod no-layout ((child frame) parent)
(values (adj-border-xy (x-fl->px (frame-x child) parent) parent)
(adj-border-xy (y-fl->px (frame-y child) parent) parent)
(adj-border-wh (w-fl->px (frame-w child) parent) child)
(adj-border-wh (h-fl->px (frame-h child) parent) child)))
(defun set-no-layout ()
"No layout: Maximize windows in their frame - Leave frames to their original size"
(set-layout #'no-layout))
(register-layout 'set-no-layout)
;;; No layout remember size
(defun set-no-layout-remember-size ()
"No layout: Maximize windows in their frame - Leave frames to their actual size"
(fixe-real-size-current-child)
(set-no-layout))
(register-layout 'set-no-layout-remember-size)
;;; Maximize layout
(defgeneric maximize-layout (child parent)
(:documentation "Maximize layout: Maximize windows and frames in their parent frame"))
(defmethod maximize-layout (child parent)
(with-slots (rx ry rw rh) parent
(values (adj-border-xy rx parent)
(adj-border-xy ry parent)
(adj-border-wh rw child)
(adj-border-wh rh child))))
(defun set-maximize-layout ()
"Maximize layout: Maximize windows and frames in their parent frame"
(set-layout #'maximize-layout))
(register-layout 'set-maximize-layout)
;;; Tile layout
(defun tile-layout-ask-keep-position ()
(when (frame-p (current-child))
(if (query-yes-or-no "Keep frame children positions?")
(setf (frame-data-slot (current-child) :tile-layout-keep-position) :yes)
(remove-frame-data-slot (current-child) :tile-layout-keep-position))))
(labels ((set-managed ()
(setf (frame-data-slot (current-child) :layout-managed-children)
(copy-list (get-managed-child (current-child))))))
(defun set-layout-managed-children ()
(when (frame-p (current-child))
(set-managed)
(tile-layout-ask-keep-position)))
(defun update-layout-managed-children-position ()
"Update layout managed children position"
(when (frame-p (current-child))
(set-managed)
(leave-second-mode))))
(defun update-layout-managed-children-keep-position (child parent)
(declare (ignore child))
(let ((managed-children (frame-data-slot parent :layout-managed-children))
(managed-in-parent (get-managed-child parent)))
(dolist (ch managed-in-parent)
(unless (child-member ch managed-children)
(setf managed-children (append managed-children (list ch)))))
(setf managed-children (remove-if-not (lambda (x)
(child-member x managed-in-parent))
managed-children))
(setf (frame-data-slot parent :layout-managed-children) managed-children)
managed-children))
(defun update-layout-managed-children (child parent)
(if (eql (frame-data-slot parent :tile-layout-keep-position) :yes)
(update-layout-managed-children-keep-position child parent)
(get-managed-child parent)))
(defgeneric tile-layout (child parent)
(:documentation "Tile child in its frame (vertical)"))
(defmethod tile-layout (child parent)
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (length managed-children))
(nx (ceiling (sqrt len)))
(ny (ceiling (/ len nx)))
(dx (/ (frame-rw parent) nx))
(dy (/ (frame-rh parent) ny))
(dpos (- (* nx ny) len))
(width dx))
(when (plusp dpos)
(if (zerop pos)
(setf width (* dx (1+ dpos)))
(incf pos dpos)))
(values (round (adj-border-xy (+ (frame-rx parent) (truncate (* (mod pos nx) dx))) parent))
(round (adj-border-xy (+ (frame-ry parent) (truncate (* (truncate (/ pos nx)) dy))) parent))
(round (adj-border-wh width child))
(round (adj-border-wh dy child)))))
(defun set-tile-layout ()
"Tile child in its frame (vertical)"
(set-layout-managed-children)
(set-layout #'tile-layout))
;; Horizontal tiling layout
(defgeneric tile-horizontal-layout (child parent)
(:documentation "Tile child in its frame (horizontal)"))
(defmethod tile-horizontal-layout (child parent)
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (length managed-children))
(ny (ceiling (sqrt len)))
(nx (ceiling (/ len ny)))
(dx (/ (frame-rw parent) nx))
(dy (/ (frame-rh parent) ny))
(dpos (- (* nx ny) len))
(height dy))
(when (plusp dpos)
(if (zerop pos)
(setf height (* dy (1+ dpos)))
(incf pos dpos)))
(values (round (adj-border-xy (+ (frame-rx parent) (truncate (* (truncate (/ pos ny)) dx))) parent))
(round (adj-border-xy (+ (frame-ry parent) (truncate (* (mod pos ny) dy))) parent))
(round (adj-border-wh dx child))
(round (adj-border-wh height child)))))
(defun set-tile-horizontal-layout ()
"Tile child in its frame (horizontal)"
(set-layout-managed-children)
(set-layout #'tile-horizontal-layout))
;; Mix tile layout : automatic choose between vertical/horizontal
(defgeneric tile-layout-mix (child parent)
(:documentation "Tile child in its frame (mix: automatic choose between vertical/horizontal)"))
(defmethod tile-layout-mix (child parent)
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (length managed-children))
(d1 (ceiling (sqrt len)))
(d2 (ceiling (/ len d1)))
(nx (if (> (frame-rw parent) (frame-rh parent)) d1 d2))
(ny (if (> (frame-rw parent) (frame-rh parent)) d2 d1))
(dx (/ (frame-rw parent) nx))
(dy (/ (frame-rh parent) ny))
(dpos (- (* nx ny) len))
(width dx))
(when (plusp dpos)
(if (zerop pos)
(setf width (* dx (1+ dpos)))
(incf pos dpos)))
(values (round (adj-border-xy (+ (frame-rx parent)
(truncate (* (mod pos nx) dx))) parent))
(round (adj-border-xy (+ (frame-ry parent)
(truncate (* (truncate (/ pos nx)) dy))) parent))
(round (adj-border-wh width child))
(round (adj-border-wh dy child)))))
(defun set-tile-layout-mix ()
"Tile child in its frame (mix: automatic choose between vertical/horizontal)"
(set-layout-managed-children)
(set-layout #'tile-layout-mix))
;; One column layout
(defgeneric one-column-layout (child parent)
(:documentation "One column layout"))
(defmethod one-column-layout (child parent)
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (length managed-children))
(dy (/ (frame-rh parent) len)))
(values (round (adj-border-xy (frame-rx parent) parent))
(round (adj-border-xy (+ (frame-ry parent) (* pos dy)) parent))
(round (adj-border-wh (frame-rw parent) child))
(round (adj-border-wh dy child)))))
(defun set-one-column-layout ()
"One column layout"
(set-layout-managed-children)
(set-layout #'one-column-layout))
;; One line layout
(defgeneric one-line-layout (child parent)
(:documentation "One line layout"))
(defmethod one-line-layout (child parent)
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (length managed-children))
(dx (/ (frame-rw parent) len)))
(values (round (adj-border-xy (+ (frame-rx parent) (* pos dx)) parent))
(round (adj-border-xy (frame-ry parent) parent))
(round (adj-border-wh dx child))
(round (adj-border-wh (frame-rh parent) child)))))
(defun set-one-line-layout ()
"One line layout"
(set-layout-managed-children)
(set-layout #'one-line-layout))
;;; Space layout
(defun tile-space-layout (child parent)
"Tile Space: tile child in its frame leaving spaces between them"
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (length managed-children))
(d1 (ceiling (sqrt len)))
(d2 (ceiling (/ len d1)))
(cols (if (> rw rh) d1 d2))
(rows (if (> rw rh) d2 d1))
(col (mod pos cols))
(row (floor pos cols))
(space-percent (or (frame-data-slot parent :tile-space-size) 0.05))
(col-space-total (* rw space-percent))
(row-space-total (* rh space-percent))
(col-space (floor col-space-total (1+ cols)))
(row-space (floor row-space-total (1+ rows)))
(child-width (floor (- rw col-space-total) cols))
(child-height (floor (- rh row-space-total) rows))
)
(values (round (adj-border-xy (+ rx col-space (* (+ col-space child-width) col)) parent))
(round (adj-border-xy (+ ry row-space (* (+ row-space child-height) row)) parent))
(round (adj-border-wh child-width child))
(round (adj-border-wh child-height child))))))
(defun set-tile-space-layout ()
"Tile Space: tile child in its frame leaving spaces between them"
(layout-ask-size "Space size in percent (%)" :tile-space-size 0.01)
(set-layout-managed-children)
(set-layout #'tile-space-layout))
(defun three-columns-layout (child parent)
"Three Colums: main child in the middle, others on the two sides."
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (max (1- (length managed-children)) 1))
(dy (round (/ rh (max (truncate (/ (+ (if (oddp pos) 1 0) len) 2)) 1))))
(size (or (frame-data-slot parent :tile-size) 0.75))
(other-size (if (> len 1) (/ (- 1 size) 2) (- 1 size))))
(if (> (length managed-children) 1)
(if (= pos 0)
(values (adj-border-xy (if (> len 1)
(round (+ rx (* rw other-size)))
rx) parent)
(adj-border-xy ry parent)
(adj-border-wh (round (* rw size)) child)
(adj-border-wh rh child))
(values (adj-border-xy (if (oddp pos)
(round (+ rx (* rw (if (> len 1) (+ size other-size) size))))
rx) parent)
(adj-border-xy (round (+ ry (* dy (truncate (/ (1- pos) 2))))) parent)
(adj-border-wh (round (* rw other-size)) parent)
(adj-border-wh dy parent)))
(no-layout child parent)))))
(defun set-three-columns-layout ()
"Three Columns: main child in the middle, others on the two sides."
(layout-ask-size "Tile size in percent (%)" :tile-size)
(set-layout-managed-children)
(set-layout #'three-columns-layout))
(register-layout-sub-menu 'frame-tile-layout-menu "Frame tile layout menu"
'(("v" set-tile-layout)
("h" set-tile-horizontal-layout)
("m" set-tile-layout-mix)
("c" set-one-column-layout)
("l" set-one-line-layout)
("s" set-tile-space-layout)
("t" set-three-columns-layout)))
;;; Tile Left
(defun tile-left-layout (child parent)
"Tile Left: main child on left and others on right"
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (max (1- (length managed-children)) 1))
(dy (/ rh len))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (> (length managed-children) 1)
(if (= pos 0)
(values (adj-border-xy rx parent)
(adj-border-xy ry parent)
(adj-border-wh (round (* rw size)) child)
(adj-border-wh rh child))
(values (adj-border-xy (round (+ rx (* rw size))) parent)
(adj-border-xy (round (+ ry (* dy (1- pos)))) parent)
(adj-border-wh (round (* rw (- 1 size))) child)
(adj-border-wh (round dy) child)))
(no-layout child parent)))))
(defun set-tile-left-layout ()
"Tile Left: main child on left and others on right"
(layout-ask-size "Tile size in percent (%)" :tile-size)
(set-layout-managed-children)
(set-layout #'tile-left-layout))
;;; Tile right
(defun tile-right-layout (child parent)
"Tile Right: main child on right and others on left"
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (max (1- (length managed-children)) 1))
(dy (/ rh len))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (> (length managed-children) 1)
(if (= pos 0)
(values (adj-border-xy (round (+ rx (* rw (- 1 size)))) parent)
(adj-border-xy ry parent)
(adj-border-wh (round (* rw size)) child)
(adj-border-wh rh child))
(values (adj-border-xy rx parent)
(adj-border-xy (round (+ ry (* dy (1- pos)))) parent)
(adj-border-wh (round (* rw (- 1 size))) child)
(adj-border-wh (round dy) child)))
(no-layout child parent)))))
(defun set-tile-right-layout ()
"Tile Right: main child on right and others on left"
(layout-ask-size "Tile size in percent (%)" :tile-size)
(set-layout-managed-children)
(set-layout #'tile-right-layout))
;;; Tile Top
(defun tile-top-layout (child parent)
"Tile Top: main child on top and others on bottom"
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (max (1- (length managed-children)) 1))
(dx (/ rw len))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (> (length managed-children) 1)
(if (= pos 0)
(values (adj-border-xy rx parent)
(adj-border-xy ry parent)
(adj-border-wh rw child)
(adj-border-wh (round (* rh size)) child))
(values (adj-border-xy (round (+ rx (* dx (1- pos)))) parent)
(adj-border-xy (round (+ ry (* rh size))) parent)
(adj-border-wh (round dx) child)
(adj-border-wh (round (* rh (- 1 size))) child)))
(no-layout child parent)))))
(defun set-tile-top-layout ()
"Tile Top: main child on top and others on bottom"
(layout-ask-size "Tile size in percent (%)" :tile-size)
(set-layout-managed-children)
(set-layout #'tile-top-layout))
;;; Tile Bottom
(defun tile-bottom-layout (child parent)
"Tile Bottom: main child on bottom and others on top"
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (max (1- (length managed-children)) 1))
(dx (/ rw len))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (> (length managed-children) 1)
(if (= pos 0)
(values (adj-border-xy rx parent)
(adj-border-xy (round (+ ry (* rh (- 1 size)))) parent)
(adj-border-wh rw child)
(adj-border-wh (round (* rh size)) child))
(values (adj-border-xy (round (+ rx (* dx (1- pos)))) parent)
(adj-border-xy ry parent)
(adj-border-wh (round dx) child)
(adj-border-wh (round (* rh (- 1 size))) child)))
(no-layout child parent)))))
(defun set-tile-bottom-layout ()
"Tile Bottom: main child on bottom and others on top"
(layout-ask-size "Tile size in percent (%)" :tile-size)
(set-layout-managed-children)
(set-layout #'tile-bottom-layout))
(register-layout-sub-menu 'frame-tile-dir-layout-menu "Tile in one direction layout menu"
'(("l" set-tile-left-layout)
("r" set-tile-right-layout)
("t" set-tile-top-layout)
("b" set-tile-bottom-layout)))
;;; Left and space layout: like left layout but leave a space on the left
(defun layout-ask-space (msg slot &optional (default 100))
(when (frame-p (current-child))
(let ((new-space (or (query-number msg (or (frame-data-slot (current-child) slot) default)) default)))
(setf (frame-data-slot (current-child) slot) new-space))))
(defun tile-left-space-layout (child parent)
"Tile Left Space: main child on left and others on right. Leave some space (in pixels) on the left."
(with-slots (rx ry rw rh) parent
(let* ((managed-children (update-layout-managed-children child parent))
(pos (child-position child managed-children))
(len (max (1- (length managed-children)) 1))
(dy (/ rh len))
(size (or (frame-data-slot parent :tile-size) 0.8))
(space (or (frame-data-slot parent :tile-left-space) 100)))
(if (> (length managed-children) 1)
(if (= pos 0)
(values (adj-border-xy (+ rx space) parent)
(adj-border-xy ry parent)
(adj-border-wh (- (round (* rw size)) space) child)
(adj-border-wh rh child))
(values (adj-border-xy (round (+ rx (* rw size))) parent)
(adj-border-xy (round (+ ry (* dy (1- pos)))) parent)
(adj-border-wh (round (* rw (- 1 size))) child)
(adj-border-wh (round dy) child)))
(multiple-value-bind (rnx rny rnw rnh)
(no-layout child parent)
(values (+ rnx space)
rny
(- rnw space)
rnh))))))
(defun set-tile-left-space-layout ()
"Tile Left Space: main child on left and others on right. Leave some space on the left."
(layout-ask-size "Tile size in percent (%)" :tile-size)
(layout-ask-space "Tile space (in pixels)" :tile-left-space)
(set-layout-managed-children)
(set-layout #'tile-left-space-layout))
(register-layout-sub-menu 'frame-tile-space-layout-menu "Tile with some space on one side menu"
'(set-tile-left-space-layout))
;;; Main windows layout - A possible GIMP layout
;;; The windows in the main list are tiled on the frame
;;; others windows are on one side of the frame.
(defun main-window-right-layout (child parent)
"Main window right: Main windows on the right. Others on the left."
(with-slots (rx ry rw rh) parent
(let* ((main-windows (frame-data-slot parent :main-window-list))
(len (length main-windows))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (zerop len)
(no-layout child parent)
(if (child-member child main-windows)
(let* ((dy (/ rh len))
(pos (child-position child main-windows)))
(values (adj-border-xy (round (+ rx (* rw (- 1 size)))) parent)
(adj-border-xy (round (+ ry (* dy pos))) parent)
(adj-border-wh (round (* rw size)) child)
(adj-border-wh (round dy) child)))
(values (adj-border-xy rx parent)
(adj-border-xy ry parent)
(adj-border-wh (round (* rw (- 1 size))) child)
(adj-border-wh rh child)))))))
(defun set-main-window-right-layout ()
"Main window right: Main windows on the right. Others on the left."
(layout-ask-size "Split size in percent (%)" :tile-size)
(set-layout #'main-window-right-layout))
(defun main-window-left-layout (child parent)
"Main window left: Main windows on the left. Others on the right."
(with-slots (rx ry rw rh) parent
(let* ((main-windows (frame-data-slot parent :main-window-list))
(len (length main-windows))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (zerop len)
(no-layout child parent)
(if (child-member child main-windows)
(let* ((dy (/ rh len))
(pos (child-position child main-windows)))
(values (adj-border-xy rx parent)
(adj-border-xy (round (+ ry (* dy pos))) parent)
(adj-border-wh (round (* rw size)) child)
(adj-border-wh (round dy) child)))
(values (adj-border-xy (round (+ rx (* rw size))) parent)
(adj-border-xy ry parent)
(adj-border-wh (round (* rw (- 1 size))) child)
(adj-border-wh rh child)))))))
(defun set-main-window-left-layout ()
"Main window left: Main windows on the left. Others on the right."
(layout-ask-size "Split size in percent (%)" :tile-size)
(set-layout #'main-window-left-layout))
(defun main-window-top-layout (child parent)
"Main window top: Main windows on the top. Others on the bottom."
(with-slots (rx ry rw rh) parent
(let* ((main-windows (frame-data-slot parent :main-window-list))
(len (length main-windows))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (zerop len)
(no-layout child parent)
(if (child-member child main-windows)
(let* ((dx (/ rw len))
(pos (child-position child main-windows)))
(values (adj-border-xy (round (+ rx (* dx pos))) parent)
(adj-border-xy ry parent)
(adj-border-wh (round dx) child)
(adj-border-wh (round (* rh size)) child)))
(values (adj-border-xy rx parent)
(adj-border-xy (round (+ ry (* rh size))) parent)
(adj-border-wh rw child)
(adj-border-wh (round (* rh (- 1 size))) child)))))))
(defun set-main-window-top-layout ()
"Main window top: Main windows on the top. Others on the bottom."
(layout-ask-size "Split size in percent (%)" :tile-size)
(set-layout #'main-window-top-layout))
(defun main-window-bottom-layout (child parent)
"Main window bottom: Main windows on the bottom. Others on the top."
(with-slots (rx ry rw rh) parent
(let* ((main-windows (frame-data-slot parent :main-window-list))
(len (length main-windows))
(size (or (frame-data-slot parent :tile-size) 0.8)))
(if (zerop len)
(no-layout child parent)
(if (child-member child main-windows)
(let* ((dx (/ rw len))
(pos (child-position child main-windows)))
(values (adj-border-xy (round (+ rx (* dx pos))) parent)
(adj-border-xy (round (+ ry (* rh (- 1 size)))) parent)
(adj-border-wh (round dx) child)
(adj-border-wh (round (* rh size)) child)))
(values (adj-border-xy rx parent)
(adj-border-xy ry parent)
(adj-border-wh rw child)
(adj-border-wh (round (* rh (- 1 size))) child)))))))
(defun set-main-window-bottom-layout ()
"Main window bottom: Main windows on the bottom. Others on the top."
(layout-ask-size "Split size in percent (%)" :tile-size)
(set-layout #'main-window-bottom-layout))
(defun add-in-main-window-list ()
"Add the current window in the main window list"
(when (frame-p (current-child))
(with-current-window
(when (child-member window (get-managed-child (current-child)))
(pushnew window (frame-data-slot (current-child) :main-window-list)))))
(leave-second-mode))
(defun remove-in-main-window-list ()
"Remove the current window from the main window list"
(when (frame-p (current-child))
(with-current-window
(when (child-member window (get-managed-child (current-child)))
(setf (frame-data-slot (current-child) :main-window-list)
(child-remove window (frame-data-slot (current-child) :main-window-list))))))
(leave-second-mode))
(defun clear-main-window-list ()
"Clear the main window list"
(when (frame-p (current-child))
(setf (frame-data-slot (current-child) :main-window-list) nil))
(leave-second-mode))
(register-layout-sub-menu 'frame-main-window-layout-menu "Main window layout menu"
'(("r" set-main-window-right-layout)
("l" set-main-window-left-layout)
("t" set-main-window-top-layout)
("b" set-main-window-bottom-layout)
"-=- Actions on main windows list -=-"
("a" add-in-main-window-list)
("v" remove-in-main-window-list)
("c" clear-main-window-list)))
;;; GIMP layout specifics functions
;;;
(defconfig *gimp-layout-notify-window-delay* 30 'gimp-layout
"Time to display the GIMP layout notify window help")
(defun select-next/previous-child-no-main-window (fun-rotate)
"Select the next/previous child - Skip windows in main window list"
(when (frame-p (current-child))
(with-slots (child) (current-child)
(let* ((main-windows (frame-data-slot (current-child) :main-window-list))
(to-skip? (not (= (length main-windows)
(length child)))))
(labels ((rec ()
(setf child (funcall fun-rotate child))
(when (and to-skip?
(child-member (frame-selected-child (current-child)) main-windows))
(rec))))
(unselect-all-frames)
(rec)
(show-all-children))))))
(defun select-next-child-no-main-window ()
"Select the next child - Skip windows in main window list"
(select-next/previous-child-no-main-window #'rotate-list))
(defun select-previous-child-no-main-window ()
"Select the previous child - Skip windows in main window list"
(select-next/previous-child-no-main-window #'anti-rotate-list))
(defun mouse-click-to-focus-and-move-no-main-window (window root-x root-y)
"Move and focus the current frame or focus the current window parent.
Or do actions on corners - Skip windows in main window list"
(unless (do-corner-action root-x root-y *corner-main-mode-left-button*)
(if (and (frame-p (current-child))
(child-member window (frame-data-slot (current-child) :main-window-list)))
(replay-button-event)
(mouse-click-to-focus-generic window root-x root-y #'move-frame))))
(let ((help-text-list `(("-=- Help on The GIMP layout -=-" ,*info-color-title*)
""
"The GIMP layout is a main-window-layout with a sloppy focus policy."
"You can change the main windows direction with the layout menu."
""
"Press Alt+F8 to add a window to the main windows list."
"Press Alt+F9 to remove a window from the main windows list."
"Press Alt+F10 to clear the main windows list."
""
"You can select a main window with the right mouse button."
""
"Use the layout menu to restore the previous layout and keybinding.")))
(defun help-on-gimp-layout ()
"Help on the GIMP layout"
(info-mode help-text-list)
(leave-second-mode))
(defun set-gimp-layout ()
"The GIMP Layout"
(when (frame-p (current-child))
;; Note: There is no need to ungrab/grab keys because this
;; is done when leaving the second mode.
(define-main-key ("F8" :alt) 'add-in-main-window-list)
(define-main-key ("F9" :alt) 'remove-in-main-window-list)
(define-main-key ("F10" :alt) 'clear-main-window-list)
(define-main-key ("Tab" :prefix) 'select-next-child-no-main-window)
(define-main-key ("Tab" :prefix :shift) 'select-previous-child-no-main-window)
(define-main-mouse (1) 'mouse-click-to-focus-and-move-no-main-window)
(setf (frame-data-slot (current-child) :focus-policy-save)
(frame-focus-policy (current-child)))
(setf (frame-focus-policy (current-child)) :sloppy)
(setf (frame-data-slot (current-child) :layout-save)
(frame-layout (current-child)))
(open-notify-window help-text-list)
(add-timer *gimp-layout-notify-window-delay* #'close-notify-window)
;; Set the default layout and leave the second mode.
(set-main-window-right-layout))))
(defun set-previous-layout ()
"Restore the previous layout"
(undefine-main-key ("F8" :alt))
(undefine-main-key ("F9" :alt))
(undefine-main-key ("F10" :alt))
(define-main-key ("Tab" :prefix) 'select-next-child)
(define-main-key ("Tab" :prefix :shift) 'select-previous-child)
(define-main-mouse (1) 'mouse-click-to-focus-and-move)
(setf (frame-focus-policy (current-child))
(frame-data-slot (current-child) :focus-policy-save))
(setf (frame-layout (current-child))
(frame-data-slot (current-child) :layout-save))
(leave-second-mode))
(register-layout-sub-menu 'frame-gimp-layout-menu "The GIMP layout menu"
'(("g" set-gimp-layout)
("p" set-previous-layout)
("h" help-on-gimp-layout)
"-=- Main window layout -=-"
("r" set-main-window-right-layout)
("l" set-main-window-left-layout)
("t" set-main-window-top-layout)
("b" set-main-window-bottom-layout)
"-=- Actions on main windows list -=-"
("a" add-in-main-window-list)
("v" remove-in-main-window-list)
("c" clear-main-window-list)))
| 33,677 | Common Lisp | .lisp | 728 | 40.486264 | 106 | 0.643016 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 3e995496a42d8a650c9642d05acee3870385e4b4cdf9c1497cda730f550008c9 | 6,483 | [
-1
] |
6,484 | clfswm-fastswitch-mode.lisp | LdBeth_CLFSWM/src/clfswm-fastswitch-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Fast switch mode - Like expose mode but faster since
;;; children are not moved/resized. Shortcut key is associated to Xid for
;;; windows and to numbers for frames.
;;; A window or a frame will always have the same shortcut.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defparameter *fastswitch-window* nil)
(defparameter *fastswitch-gc* nil)
(defparameter *fastswitch-font* nil)
(defparameter *fastswitch-string* "")
(defparameter *fastswitch-match-child* nil)
(defparameter *fastswitch-msg* nil)
(defun leave-fastswitch-mode ()
"Leave the fastswitch mode"
(throw 'exit-fastswitch-loop nil))
(defun fastswitch-draw-child-name (posx posy ex-child)
(let ((placey (* posy (+ (xlib:font-ascent *fastswitch-font*)
(xlib:font-descent *fastswitch-font*) 1))))
(xlib:with-gcontext (*fastswitch-gc*
:foreground (get-color (if (frame-p (expose-child-child ex-child))
*fastswitch-foreground-letter-second-frame*
*fastswitch-foreground-letter-second*)))
(xlib:draw-glyphs *pixmap-buffer* *fastswitch-gc*
(* (xlib:max-char-width *fastswitch-font*) posx)
placey
(expose-child-key ex-child)))
(incf posx (length (expose-child-key ex-child)))
(xlib:draw-glyphs *pixmap-buffer* *fastswitch-gc*
(* (xlib:max-char-width *fastswitch-font*) posx)
placey
":")
(incf posx 1)
(xlib:with-gcontext (*fastswitch-gc* :foreground (get-color *fastswitch-foreground-childname*))
(xlib:draw-glyphs *pixmap-buffer* *fastswitch-gc*
(* (xlib:max-char-width *fastswitch-font*) posx)
placey
(ensure-printable (child-fullname (expose-child-child ex-child))))
(incf posx (1+ (length (child-fullname (expose-child-child ex-child))))))
posx))
(defun fastswitch-draw-window ()
(labels ((display-match-child ()
(let ((posx 1)
(posy 2))
(dolist (ex-child *fastswitch-match-child*)
(when (or *fastswitch-show-frame-p* (not (frame-p (expose-child-child ex-child))))
(setf posx (fastswitch-draw-child-name posx posy ex-child))
(when (> (* posx (xlib:max-char-width *fastswitch-font*))
(x-drawable-width *fastswitch-window*))
(if *fastswitch-adjust-window-p*
(setf posx 1
posy (1+ posy))
(return)))))))
(adjust-window ()
(setf (x-drawable-height *fastswitch-window*) (* (xlib:font-ascent *fastswitch-font*) 3))
(let ((posx 1)
(inc 0))
(dolist (ex-child *fastswitch-match-child*)
(when (or *fastswitch-show-frame-p* (not (frame-p (expose-child-child ex-child))))
(incf posx (length (expose-child-key ex-child)))
(incf posx)
(incf posx (1+ (length (child-fullname (expose-child-child ex-child)))))
(when (> (* posx (xlib:max-char-width *fastswitch-font*))
(x-drawable-width *fastswitch-window*))
(setf posx 1)
(incf inc (+ (xlib:font-ascent *fastswitch-font*)
(xlib:font-descent *fastswitch-font*) 1)))))
(incf (x-drawable-height *fastswitch-window*) inc))))
(when *fastswitch-adjust-window-p*
(adjust-window))
(clear-pixmap-buffer *fastswitch-window* *fastswitch-gc*)
(when *fastswitch-msg*
(xlib:draw-image-glyphs *pixmap-buffer* *fastswitch-gc*
(xlib:max-char-width *fastswitch-font*)
(+ (xlib:font-ascent *fastswitch-font*) (xlib:font-descent *fastswitch-font*))
*fastswitch-msg*))
(xlib:with-gcontext (*fastswitch-gc* :foreground (get-color *fastswitch-foreground-letter*)
:background (get-color *fastswitch-background*))
(xlib:draw-image-glyphs *pixmap-buffer* *fastswitch-gc*
(* (xlib:max-char-width *fastswitch-font*)
(if *fastswitch-msg*
(1+ (length *fastswitch-msg*))
1))
(+ (xlib:font-ascent *fastswitch-font*) (xlib:font-descent *fastswitch-font*))
*fastswitch-string*))
(display-match-child)
(copy-pixmap-buffer *fastswitch-window* *fastswitch-gc*)))
(defun fastswitch-draw-window-tree ()
(let ((posy 2))
(labels ((display-match-child (child space)
(let ((ex-child (find child *expose-child-list* :test #'child-equal-p :key #'expose-child-child)))
(when ex-child
(fastswitch-draw-child-name space posy ex-child)
(incf posy)))
(when (frame-p child)
(dolist (c (frame-child child))
(display-match-child c (+ space 2))))))
(setf (x-drawable-height *fastswitch-window*)
(+ (* (xlib:font-ascent *fastswitch-font*) 3)
(* (1- (length *expose-child-list*))
(+ (xlib:font-ascent *fastswitch-font*)
(xlib:font-descent *fastswitch-font*) 1))))
(clear-pixmap-buffer *fastswitch-window* *fastswitch-gc*)
(when *fastswitch-msg*
(xlib:draw-image-glyphs *pixmap-buffer* *fastswitch-gc*
(xlib:max-char-width *fastswitch-font*)
(+ (xlib:font-ascent *fastswitch-font*) (xlib:font-descent *fastswitch-font*))
*fastswitch-msg*))
(xlib:with-gcontext (*fastswitch-gc* :foreground (get-color *fastswitch-foreground-letter*)
:background (get-color *fastswitch-background*))
(xlib:draw-image-glyphs *pixmap-buffer* *fastswitch-gc*
(* (xlib:max-char-width *fastswitch-font*)
(if *fastswitch-msg*
(1+ (length *fastswitch-msg*))
1))
(+ (xlib:font-ascent *fastswitch-font*) (xlib:font-descent *fastswitch-font*))
*fastswitch-string*))
(display-match-child *root-frame* 0)
(copy-pixmap-buffer *fastswitch-window* *fastswitch-gc*))))
(defun fastswitch-draw-window-generic ()
(if (eq *fastswitch-display-mode* 'TREE)
(fastswitch-draw-window-tree)
(fastswitch-draw-window)))
(defun fastswitch-init ()
(setf *fastswitch-font* (xlib:open-font *display* *fastswitch-font-string*)
*fastswitch-string* ""
*fastswitch-match-child* (string-match *fastswitch-string* *expose-child-list* #'expose-child-key))
(let* ((width (- (screen-width) 2))
(height (* (xlib:font-ascent *fastswitch-font*) 3)))
(with-placement (*fastswitch-mode-placement* x y width height)
(setf *fastswitch-window* (xlib:create-window :parent *root*
:x x :y y
:width width :height height
:background (get-color *fastswitch-background*)
:border-width *border-size*
:border (get-color *fastswitch-border*)
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure :key-press))
*fastswitch-gc* (xlib:create-gcontext :drawable *fastswitch-window*
:foreground (get-color *fastswitch-foreground*)
:background (get-color *fastswitch-background*)
:font *fastswitch-font*
:line-style :solid))
(setf (window-transparency *fastswitch-window*) *fastswitch-transparency*)
(map-window *fastswitch-window*)))
(fastswitch-draw-window-generic))
(defun fastswitch-enter-function ()
(stop-button-event)
(fastswitch-init))
(defun fastswitch-leave-function ()
(when *fastswitch-gc*
(xlib:free-gcontext *fastswitch-gc*))
(when *fastswitch-window*
(xlib:destroy-window *fastswitch-window*))
(when *expose-font*
(xlib:close-font *expose-font*))
(setf *fastswitch-window* nil
*fastswitch-gc* nil
*fastswitch-font* nil)
(xlib:display-finish-output *display*))
(defun fastswitch-loop-function ()
(unless (is-a-key-pressed-p)
(leave-fastswitch-mode)))
(define-handler fastswitch-mode :key-press (code state)
(let ((char (keycode->char code state)))
(when char
(setf *fastswitch-string* (format nil "~A~A" *fastswitch-string* char)
*fastswitch-match-child* (string-match *fastswitch-string* *expose-child-list* #'expose-child-key))
(unless *fastswitch-match-child*
(setf *fastswitch-string* ""
*fastswitch-match-child* (string-match *fastswitch-string* *expose-child-list* #'expose-child-key)))
(fastswitch-draw-window-generic))))
(defun fastswitch-select-child ()
(with-grab-keyboard-and-pointer (92 93 66 67 t)
(generic-mode 'fastswitch-mode 'exit-fastswitch-loop
:enter-function #'fastswitch-enter-function
:loop-function #'fastswitch-loop-function
:leave-function #'fastswitch-leave-function
:original-mode '(main-mode))
(fastswitch-leave-function))
(expose-find-child-from-letters *fastswitch-string*))
(defun fastswitch-mode ()
"Switch between children with expose shortcut"
(setf *expose-child-list* (expose-associate-keys))
(setf *fastswitch-msg* "Select child: ")
(let ((ex-child (fastswitch-select-child)))
(when (and ex-child (expose-child-child ex-child))
(expose-focus-child (expose-child-child ex-child))))
(show-all-children)
t)
;;; Fastswitch move mode
(defun fastswitch-move-mode ()
"Move children with expose shortcut"
(let ((window nil))
(with-focus-window (win)
(setf window win))
(no-focus)
(setf *expose-child-list* (expose-associate-keys))
(setf *fastswitch-msg* (if window
(format nil "Move focused child [~A] with: "
(child-fullname window))
"No child to move... "))
(let ((ex-child (fastswitch-select-child)))
(when (and window ex-child (expose-child-child ex-child))
(let ((from (find-parent-frame window))
(to (typecase (expose-child-child ex-child)
(xlib:window (find-parent-frame (expose-child-child ex-child)))
(frame (expose-child-child ex-child)))))
(when (and (frame-p from) (frame-p to))
(remove-child-in-frame window from)
(pushnew window (frame-child to) :test #'child-equal-p)
(focus-all-children from from)))))
(show-all-children))
t)
| 12,737 | Common Lisp | .lisp | 235 | 40.361702 | 114 | 0.550701 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 8c4ed869f4b84c9e47436309b253d037a4439aee927b64f504086cee06467fe0 | 6,484 | [
-1
] |
6,485 | keysyms.lisp | LdBeth_CLFSWM/src/keysyms.lisp | ;; Copyright (C) 2006 Matthew Kennedy
;;
;; This file is part of stumpwm.
;;
;; stumpwm is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; stumpwm is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this software; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;; Boston, MA 02111-1307 USA
;; Commentary:
;;
;; Mapping a keysym to a name is a client side activity in X11. Some
;; of the code here was taken from the CMUCL Hemlocks code base. The
;; actual mappings were taken from Xorg's keysymdefs.h.
;;
;; Code:
(in-package :clfswm)
(defvar *keysym-name-translations* (make-hash-table))
(defvar *name-keysym-translations* (make-hash-table :test #'equal))
(defun cl-define-keysym (keysym name)
"Define a mapping from a keysym name to a keysym."
(setf (gethash keysym *keysym-name-translations*) name
(gethash name *name-keysym-translations*) keysym))
(defun keysym-name->keysym (name)
"Return the keysym corresponding to NAME."
(multiple-value-bind (value present-p)
(gethash name *name-keysym-translations*)
(declare (ignore present-p))
value))
(defun keysym->keysym-name (keysym)
"Return the name corresponding to KEYSYM."
(multiple-value-bind (value present-p)
(gethash keysym *keysym-name-translations*)
(declare (ignore present-p))
value))
(cl-define-keysym #xffffff "VoidSymbol") ;Void symbol
(cl-define-keysym #xff08 "BackSpace") ;Back space, back char
(cl-define-keysym #xff09 "Tab")
(cl-define-keysym #xff0a "Linefeed") ;Linefeed, LF
(cl-define-keysym #xff0b "Clear")
(cl-define-keysym #xff0d "Return") ;Return, enter
(cl-define-keysym #xff13 "Pause") ;Pause, hold
(cl-define-keysym #xff14 "Scroll_Lock")
(cl-define-keysym #xff15 "Sys_Req")
(cl-define-keysym #xff1b "Escape")
(cl-define-keysym #xffff "Delete") ;Delete, rubout
(cl-define-keysym #xff20 "Multi_key") ;Multi-key character compose
(cl-define-keysym #xff37 "Codeinput")
(cl-define-keysym #xff3c "SingleCandidate")
(cl-define-keysym #xff3d "MultipleCandidate")
(cl-define-keysym #xff3e "PreviousCandidate")
(cl-define-keysym #xff21 "Kanji") ;Kanji, Kanji convert
(cl-define-keysym #xff22 "Muhenkan") ;Cancel Conversion
(cl-define-keysym #xff23 "Henkan_Mode") ;Start/Stop Conversion
(cl-define-keysym #xff23 "Henkan") ;Alias for Henkan_Mode
(cl-define-keysym #xff24 "Romaji") ;to Romaji
(cl-define-keysym #xff25 "Hiragana") ;to Hiragana
(cl-define-keysym #xff26 "Katakana") ;to Katakana
(cl-define-keysym #xff27 "Hiragana_Katakana") ;Hiragana/Katakana toggle
(cl-define-keysym #xff28 "Zenkaku") ;to Zenkaku
(cl-define-keysym #xff29 "Hankaku") ;to Hankaku
(cl-define-keysym #xff2a "Zenkaku_Hankaku") ;Zenkaku/Hankaku toggle
(cl-define-keysym #xff2b "Touroku") ;Add to Dictionary
(cl-define-keysym #xff2c "Massyo") ;Delete from Dictionary
(cl-define-keysym #xff2d "Kana_Lock") ;Kana Lock
(cl-define-keysym #xff2e "Kana_Shift") ;Kana Shift
(cl-define-keysym #xff2f "Eisu_Shift") ;Alphanumeric Shift
(cl-define-keysym #xff30 "Eisu_toggle") ;Alphanumeric toggle
(cl-define-keysym #xff37 "Kanji_Bangou") ;Codeinput
(cl-define-keysym #xff3d "Zen_Koho") ;Multiple/All Candidate(s)
(cl-define-keysym #xff3e "Mae_Koho") ;Previous Candidate
(cl-define-keysym #xff50 "Home")
(cl-define-keysym #xff51 "Left") ;Move left, left arrow
(cl-define-keysym #xff52 "Up") ;Move up, up arrow
(cl-define-keysym #xff53 "Right") ;Move right, right arrow
(cl-define-keysym #xff54 "Down") ;Move down, down arrow
(cl-define-keysym #xff55 "Prior") ;Prior, previous
(cl-define-keysym #xff55 "Page_Up")
(cl-define-keysym #xff56 "Next") ;Next
(cl-define-keysym #xff56 "Page_Down")
(cl-define-keysym #xff57 "End") ;EOL
(cl-define-keysym #xff58 "Begin") ;BOL
(cl-define-keysym #xff60 "Select") ;Select, mark
(cl-define-keysym #xff61 "Print")
(cl-define-keysym #xff62 "Execute") ;Execute, run, do
(cl-define-keysym #xff63 "Insert") ;Insert, insert here
(cl-define-keysym #xff65 "Undo")
(cl-define-keysym #xff66 "Redo") ;Redo, again
(cl-define-keysym #xff67 "Menu")
(cl-define-keysym #xff68 "Find") ;Find, search
(cl-define-keysym #xff69 "Cancel") ;Cancel, stop, abort, exit
(cl-define-keysym #xff6a "Help") ;Help
(cl-define-keysym #xff6b "Break")
(cl-define-keysym #xff7e "Mode_switch") ;Character set switch
(cl-define-keysym #xff7e "script_switch") ;Alias for mode_switch
(cl-define-keysym #xff7f "Num_Lock")
(cl-define-keysym #xff80 "KP_Space") ;Space
(cl-define-keysym #xff89 "KP_Tab")
(cl-define-keysym #xff8d "KP_Enter") ;Enter
(cl-define-keysym #xff91 "KP_F1") ;PF1, KP_A, ...
(cl-define-keysym #xff92 "KP_F2")
(cl-define-keysym #xff93 "KP_F3")
(cl-define-keysym #xff94 "KP_F4")
(cl-define-keysym #xff95 "KP_Home")
(cl-define-keysym #xff96 "KP_Left")
(cl-define-keysym #xff97 "KP_Up")
(cl-define-keysym #xff98 "KP_Right")
(cl-define-keysym #xff99 "KP_Down")
(cl-define-keysym #xff9a "KP_Prior")
(cl-define-keysym #xff9a "KP_Page_Up")
(cl-define-keysym #xff9b "KP_Next")
(cl-define-keysym #xff9b "KP_Page_Down")
(cl-define-keysym #xff9c "KP_End")
(cl-define-keysym #xff9d "KP_Begin")
(cl-define-keysym #xff9e "KP_Insert")
(cl-define-keysym #xff9f "KP_Delete")
(cl-define-keysym #xffbd "KP_Equal") ;Equals
(cl-define-keysym #xffaa "KP_Multiply")
(cl-define-keysym #xffab "KP_Add")
(cl-define-keysym #xffac "KP_Separator") ;Separator, often comma
(cl-define-keysym #xffad "KP_Subtract")
(cl-define-keysym #xffae "KP_Decimal")
(cl-define-keysym #xffaf "KP_Divide")
(cl-define-keysym #xffb0 "KP_0")
(cl-define-keysym #xffb1 "KP_1")
(cl-define-keysym #xffb2 "KP_2")
(cl-define-keysym #xffb3 "KP_3")
(cl-define-keysym #xffb4 "KP_4")
(cl-define-keysym #xffb5 "KP_5")
(cl-define-keysym #xffb6 "KP_6")
(cl-define-keysym #xffb7 "KP_7")
(cl-define-keysym #xffb8 "KP_8")
(cl-define-keysym #xffb9 "KP_9")
(cl-define-keysym #xffbe "F1")
(cl-define-keysym #xffbf "F2")
(cl-define-keysym #xffc0 "F3")
(cl-define-keysym #xffc1 "F4")
(cl-define-keysym #xffc2 "F5")
(cl-define-keysym #xffc3 "F6")
(cl-define-keysym #xffc4 "F7")
(cl-define-keysym #xffc5 "F8")
(cl-define-keysym #xffc6 "F9")
(cl-define-keysym #xffc7 "F10")
(cl-define-keysym #xffc8 "F11")
(cl-define-keysym #xffc9 "F12")
(cl-define-keysym #xffca "F13")
(cl-define-keysym #xffcb "F14")
(cl-define-keysym #xffcc "F15")
(cl-define-keysym #xffcd "F16")
(cl-define-keysym #xffce "F17")
(cl-define-keysym #xffcf "F18")
(cl-define-keysym #xffd0 "F19")
(cl-define-keysym #xffd1 "F20")
(cl-define-keysym #xffd2 "F21")
(cl-define-keysym #xffd3 "F22")
(cl-define-keysym #xffd4 "F23")
(cl-define-keysym #xffd5 "F24")
(cl-define-keysym #xffd6 "F25")
(cl-define-keysym #xffd7 "F26")
(cl-define-keysym #xffd8 "F27")
(cl-define-keysym #xffd9 "F28")
(cl-define-keysym #xffda "F29")
(cl-define-keysym #xffdb "F30")
(cl-define-keysym #xffdc "F31")
(cl-define-keysym #xffdd "F32")
(cl-define-keysym #xffde "F33")
(cl-define-keysym #xffdf "F34")
(cl-define-keysym #xffe0 "F35")
(cl-define-keysym #xffe1 "Shift_L") ;Left shift
(cl-define-keysym #xffe2 "Shift_R") ;Right shift
(cl-define-keysym #xffe3 "Control_L") ;Left control
(cl-define-keysym #xffe4 "Control_R") ;Right control
(cl-define-keysym #xffe5 "Caps_Lock") ;Caps lock
(cl-define-keysym #xffe6 "Shift_Lock") ;Shift lock
(cl-define-keysym #xffe7 "Meta_L") ;Left meta
(cl-define-keysym #xffe8 "Meta_R") ;Right meta
(cl-define-keysym #xffe9 "Alt_L") ;Left alt
(cl-define-keysym #xffea "Alt_R") ;Right alt
(cl-define-keysym #xffeb "Super_L") ;Left super
(cl-define-keysym #xffec "Super_R") ;Right super
(cl-define-keysym #xffed "Hyper_L") ;Left hyper
(cl-define-keysym #xffee "Hyper_R") ;Right hyper
(cl-define-keysym #xfe01 "ISO_Lock")
(cl-define-keysym #xfe02 "ISO_Level2_Latch")
(cl-define-keysym #xfe03 "ISO_Level3_Shift")
(cl-define-keysym #xfe04 "ISO_Level3_Latch")
(cl-define-keysym #xfe05 "ISO_Level3_Lock")
(cl-define-keysym #xff7e "ISO_Group_Shift") ;Alias for mode_switch
(cl-define-keysym #xfe06 "ISO_Group_Latch")
(cl-define-keysym #xfe07 "ISO_Group_Lock")
(cl-define-keysym #xfe08 "ISO_Next_Group")
(cl-define-keysym #xfe09 "ISO_Next_Group_Lock")
(cl-define-keysym #xfe0a "ISO_Prev_Group")
(cl-define-keysym #xfe0b "ISO_Prev_Group_Lock")
(cl-define-keysym #xfe0c "ISO_First_Group")
(cl-define-keysym #xfe0d "ISO_First_Group_Lock")
(cl-define-keysym #xfe0e "ISO_Last_Group")
(cl-define-keysym #xfe0f "ISO_Last_Group_Lock")
(cl-define-keysym #xfe20 "ISO_Left_Tab")
(cl-define-keysym #xfe21 "ISO_Move_Line_Up")
(cl-define-keysym #xfe22 "ISO_Move_Line_Down")
(cl-define-keysym #xfe23 "ISO_Partial_Line_Up")
(cl-define-keysym #xfe24 "ISO_Partial_Line_Down")
(cl-define-keysym #xfe25 "ISO_Partial_Space_Left")
(cl-define-keysym #xfe26 "ISO_Partial_Space_Right")
(cl-define-keysym #xfe27 "ISO_Set_Margin_Left")
(cl-define-keysym #xfe28 "ISO_Set_Margin_Right")
(cl-define-keysym #xfe29 "ISO_Release_Margin_Left")
(cl-define-keysym #xfe2a "ISO_Release_Margin_Right")
(cl-define-keysym #xfe2b "ISO_Release_Both_Margins")
(cl-define-keysym #xfe2c "ISO_Fast_Cursor_Left")
(cl-define-keysym #xfe2d "ISO_Fast_Cursor_Right")
(cl-define-keysym #xfe2e "ISO_Fast_Cursor_Up")
(cl-define-keysym #xfe2f "ISO_Fast_Cursor_Down")
(cl-define-keysym #xfe30 "ISO_Continuous_Underline")
(cl-define-keysym #xfe31 "ISO_Discontinuous_Underline")
(cl-define-keysym #xfe32 "ISO_Emphasize")
(cl-define-keysym #xfe33 "ISO_Center_Object")
(cl-define-keysym #xfe34 "ISO_Enter")
(cl-define-keysym #xfe50 "dead_grave")
(cl-define-keysym #xfe51 "dead_acute")
(cl-define-keysym #xfe52 "dead_circumflex")
(cl-define-keysym #xfe53 "dead_tilde")
(cl-define-keysym #xfe54 "dead_macron")
(cl-define-keysym #xfe55 "dead_breve")
(cl-define-keysym #xfe56 "dead_abovedot")
(cl-define-keysym #xfe57 "dead_diaeresis")
(cl-define-keysym #xfe58 "dead_abovering")
(cl-define-keysym #xfe59 "dead_doubleacute")
(cl-define-keysym #xfe5a "dead_caron")
(cl-define-keysym #xfe5b "dead_cedilla")
(cl-define-keysym #xfe5c "dead_ogonek")
(cl-define-keysym #xfe5d "dead_iota")
(cl-define-keysym #xfe5e "dead_voiced_sound")
(cl-define-keysym #xfe5f "dead_semivoiced_sound")
(cl-define-keysym #xfe60 "dead_belowdot")
(cl-define-keysym #xfe61 "dead_hook")
(cl-define-keysym #xfe62 "dead_horn")
(cl-define-keysym #xfed0 "First_Virtual_Screen")
(cl-define-keysym #xfed1 "Prev_Virtual_Screen")
(cl-define-keysym #xfed2 "Next_Virtual_Screen")
(cl-define-keysym #xfed4 "Last_Virtual_Screen")
(cl-define-keysym #xfed5 "Terminate_Server")
(cl-define-keysym #xfe70 "AccessX_Enable")
(cl-define-keysym #xfe71 "AccessX_Feedback_Enable")
(cl-define-keysym #xfe72 "RepeatKeys_Enable")
(cl-define-keysym #xfe73 "SlowKeys_Enable")
(cl-define-keysym #xfe74 "BounceKeys_Enable")
(cl-define-keysym #xfe75 "StickyKeys_Enable")
(cl-define-keysym #xfe76 "MouseKeys_Enable")
(cl-define-keysym #xfe77 "MouseKeys_Accel_Enable")
(cl-define-keysym #xfe78 "Overlay1_Enable")
(cl-define-keysym #xfe79 "Overlay2_Enable")
(cl-define-keysym #xfe7a "AudibleBell_Enable")
(cl-define-keysym #xfee0 "Pointer_Left")
(cl-define-keysym #xfee1 "Pointer_Right")
(cl-define-keysym #xfee2 "Pointer_Up")
(cl-define-keysym #xfee3 "Pointer_Down")
(cl-define-keysym #xfee4 "Pointer_UpLeft")
(cl-define-keysym #xfee5 "Pointer_UpRight")
(cl-define-keysym #xfee6 "Pointer_DownLeft")
(cl-define-keysym #xfee7 "Pointer_DownRight")
(cl-define-keysym #xfee8 "Pointer_Button_Dflt")
(cl-define-keysym #xfee9 "Pointer_Button1")
(cl-define-keysym #xfeea "Pointer_Button2")
(cl-define-keysym #xfeeb "Pointer_Button3")
(cl-define-keysym #xfeec "Pointer_Button4")
(cl-define-keysym #xfeed "Pointer_Button5")
(cl-define-keysym #xfeee "Pointer_DblClick_Dflt")
(cl-define-keysym #xfeef "Pointer_DblClick1")
(cl-define-keysym #xfef0 "Pointer_DblClick2")
(cl-define-keysym #xfef1 "Pointer_DblClick3")
(cl-define-keysym #xfef2 "Pointer_DblClick4")
(cl-define-keysym #xfef3 "Pointer_DblClick5")
(cl-define-keysym #xfef4 "Pointer_Drag_Dflt")
(cl-define-keysym #xfef5 "Pointer_Drag1")
(cl-define-keysym #xfef6 "Pointer_Drag2")
(cl-define-keysym #xfef7 "Pointer_Drag3")
(cl-define-keysym #xfef8 "Pointer_Drag4")
(cl-define-keysym #xfefd "Pointer_Drag5")
(cl-define-keysym #xfef9 "Pointer_EnableKeys")
(cl-define-keysym #xfefa "Pointer_Accelerate")
(cl-define-keysym #xfefb "Pointer_DfltBtnNext")
(cl-define-keysym #xfefc "Pointer_DfltBtnPrev")
(cl-define-keysym #xfd01 "3270_Duplicate")
(cl-define-keysym #xfd02 "3270_FieldMark")
(cl-define-keysym #xfd03 "3270_Right2")
(cl-define-keysym #xfd04 "3270_Left2")
(cl-define-keysym #xfd05 "3270_BackTab")
(cl-define-keysym #xfd06 "3270_EraseEOF")
(cl-define-keysym #xfd07 "3270_EraseInput")
(cl-define-keysym #xfd08 "3270_Reset")
(cl-define-keysym #xfd09 "3270_Quit")
(cl-define-keysym #xfd0a "3270_PA1")
(cl-define-keysym #xfd0b "3270_PA2")
(cl-define-keysym #xfd0c "3270_PA3")
(cl-define-keysym #xfd0d "3270_Test")
(cl-define-keysym #xfd0e "3270_Attn")
(cl-define-keysym #xfd0f "3270_CursorBlink")
(cl-define-keysym #xfd10 "3270_AltCursor")
(cl-define-keysym #xfd11 "3270_KeyClick")
(cl-define-keysym #xfd12 "3270_Jump")
(cl-define-keysym #xfd13 "3270_Ident")
(cl-define-keysym #xfd14 "3270_Rule")
(cl-define-keysym #xfd15 "3270_Copy")
(cl-define-keysym #xfd16 "3270_Play")
(cl-define-keysym #xfd17 "3270_Setup")
(cl-define-keysym #xfd18 "3270_Record")
(cl-define-keysym #xfd19 "3270_ChangeScreen")
(cl-define-keysym #xfd1a "3270_DeleteWord")
(cl-define-keysym #xfd1b "3270_ExSelect")
(cl-define-keysym #xfd1c "3270_CursorSelect")
(cl-define-keysym #xfd1d "3270_PrintScreen")
(cl-define-keysym #xfd1e "3270_Enter")
(cl-define-keysym #x0020 "space") ;U+0020 SPACE
(cl-define-keysym #x0021 "exclam") ;U+0021 EXCLAMATION MARK
(cl-define-keysym #x0022 "quotedbl") ;U+0022 QUOTATION MARK
(cl-define-keysym #x0023 "numbersign") ;U+0023 NUMBER SIGN
(cl-define-keysym #x0024 "dollar") ;U+0024 DOLLAR SIGN
(cl-define-keysym #x0025 "percent") ;U+0025 PERCENT SIGN
(cl-define-keysym #x0026 "ampersand") ;U+0026 AMPERSAND
(cl-define-keysym #x0027 "apostrophe") ;U+0027 APOSTROPHE
(cl-define-keysym #x0027 "quoteright") ;deprecated
(cl-define-keysym #x0028 "parenleft") ;U+0028 LEFT PARENTHESIS
(cl-define-keysym #x0029 "parenright") ;U+0029 RIGHT PARENTHESIS
(cl-define-keysym #x002a "asterisk") ;U+002A ASTERISK
(cl-define-keysym #x002b "plus") ;U+002B PLUS SIGN
(cl-define-keysym #x002c "comma") ;U+002C COMMA
(cl-define-keysym #x002d "minus") ;U+002D HYPHEN-MINUS
(cl-define-keysym #x002e "period") ;U+002E FULL STOP
(cl-define-keysym #x002f "slash") ;U+002F SOLIDUS
(cl-define-keysym #x0030 "0") ;U+0030 DIGIT ZERO
(cl-define-keysym #x0031 "1") ;U+0031 DIGIT ONE
(cl-define-keysym #x0032 "2") ;U+0032 DIGIT TWO
(cl-define-keysym #x0033 "3") ;U+0033 DIGIT THREE
(cl-define-keysym #x0034 "4") ;U+0034 DIGIT FOUR
(cl-define-keysym #x0035 "5") ;U+0035 DIGIT FIVE
(cl-define-keysym #x0036 "6") ;U+0036 DIGIT SIX
(cl-define-keysym #x0037 "7") ;U+0037 DIGIT SEVEN
(cl-define-keysym #x0038 "8") ;U+0038 DIGIT EIGHT
(cl-define-keysym #x0039 "9") ;U+0039 DIGIT NINE
(cl-define-keysym #x003a "colon") ;U+003A COLON
(cl-define-keysym #x003b "semicolon") ;U+003B SEMICOLON
(cl-define-keysym #x003c "less") ;U+003C LESS-THAN SIGN
(cl-define-keysym #x003d "equal") ;U+003D EQUALS SIGN
(cl-define-keysym #x003e "greater") ;U+003E GREATER-THAN SIGN
(cl-define-keysym #x003f "question") ;U+003F QUESTION MARK
(cl-define-keysym #x0040 "at") ;U+0040 COMMERCIAL AT
(cl-define-keysym #x0041 "A") ;U+0041 LATIN CAPITAL LETTER A
(cl-define-keysym #x0042 "B") ;U+0042 LATIN CAPITAL LETTER B
(cl-define-keysym #x0043 "C") ;U+0043 LATIN CAPITAL LETTER C
(cl-define-keysym #x0044 "D") ;U+0044 LATIN CAPITAL LETTER D
(cl-define-keysym #x0045 "E") ;U+0045 LATIN CAPITAL LETTER E
(cl-define-keysym #x0046 "F") ;U+0046 LATIN CAPITAL LETTER F
(cl-define-keysym #x0047 "G") ;U+0047 LATIN CAPITAL LETTER G
(cl-define-keysym #x0048 "H") ;U+0048 LATIN CAPITAL LETTER H
(cl-define-keysym #x0049 "I") ;U+0049 LATIN CAPITAL LETTER I
(cl-define-keysym #x004a "J") ;U+004A LATIN CAPITAL LETTER J
(cl-define-keysym #x004b "K") ;U+004B LATIN CAPITAL LETTER K
(cl-define-keysym #x004c "L") ;U+004C LATIN CAPITAL LETTER L
(cl-define-keysym #x004d "M") ;U+004D LATIN CAPITAL LETTER M
(cl-define-keysym #x004e "N") ;U+004E LATIN CAPITAL LETTER N
(cl-define-keysym #x004f "O") ;U+004F LATIN CAPITAL LETTER O
(cl-define-keysym #x0050 "P") ;U+0050 LATIN CAPITAL LETTER P
(cl-define-keysym #x0051 "Q") ;U+0051 LATIN CAPITAL LETTER Q
(cl-define-keysym #x0052 "R") ;U+0052 LATIN CAPITAL LETTER R
(cl-define-keysym #x0053 "S") ;U+0053 LATIN CAPITAL LETTER S
(cl-define-keysym #x0054 "T") ;U+0054 LATIN CAPITAL LETTER T
(cl-define-keysym #x0055 "U") ;U+0055 LATIN CAPITAL LETTER U
(cl-define-keysym #x0056 "V") ;U+0056 LATIN CAPITAL LETTER V
(cl-define-keysym #x0057 "W") ;U+0057 LATIN CAPITAL LETTER W
(cl-define-keysym #x0058 "X") ;U+0058 LATIN CAPITAL LETTER X
(cl-define-keysym #x0059 "Y") ;U+0059 LATIN CAPITAL LETTER Y
(cl-define-keysym #x005a "Z") ;U+005A LATIN CAPITAL LETTER Z
(cl-define-keysym #x005b "bracketleft") ;U+005B LEFT SQUARE BRACKET
(cl-define-keysym #x005c "backslash") ;U+005C REVERSE SOLIDUS
(cl-define-keysym #x005d "bracketright") ;U+005D RIGHT SQUARE BRACKET
(cl-define-keysym #x005e "asciicircum") ;U+005E CIRCUMFLEX ACCENT
(cl-define-keysym #x005f "underscore") ;U+005F LOW LINE
(cl-define-keysym #x0060 "grave") ;U+0060 GRAVE ACCENT
(cl-define-keysym #x0060 "quoteleft") ;deprecated
(cl-define-keysym #x0061 "a") ;U+0061 LATIN SMALL LETTER A
(cl-define-keysym #x0062 "b") ;U+0062 LATIN SMALL LETTER B
(cl-define-keysym #x0063 "c") ;U+0063 LATIN SMALL LETTER C
(cl-define-keysym #x0064 "d") ;U+0064 LATIN SMALL LETTER D
(cl-define-keysym #x0065 "e") ;U+0065 LATIN SMALL LETTER E
(cl-define-keysym #x0066 "f") ;U+0066 LATIN SMALL LETTER F
(cl-define-keysym #x0067 "g") ;U+0067 LATIN SMALL LETTER G
(cl-define-keysym #x0068 "h") ;U+0068 LATIN SMALL LETTER H
(cl-define-keysym #x0069 "i") ;U+0069 LATIN SMALL LETTER I
(cl-define-keysym #x006a "j") ;U+006A LATIN SMALL LETTER J
(cl-define-keysym #x006b "k") ;U+006B LATIN SMALL LETTER K
(cl-define-keysym #x006c "l") ;U+006C LATIN SMALL LETTER L
(cl-define-keysym #x006d "m") ;U+006D LATIN SMALL LETTER M
(cl-define-keysym #x006e "n") ;U+006E LATIN SMALL LETTER N
(cl-define-keysym #x006f "o") ;U+006F LATIN SMALL LETTER O
(cl-define-keysym #x0070 "p") ;U+0070 LATIN SMALL LETTER P
(cl-define-keysym #x0071 "q") ;U+0071 LATIN SMALL LETTER Q
(cl-define-keysym #x0072 "r") ;U+0072 LATIN SMALL LETTER R
(cl-define-keysym #x0073 "s") ;U+0073 LATIN SMALL LETTER S
(cl-define-keysym #x0074 "t") ;U+0074 LATIN SMALL LETTER T
(cl-define-keysym #x0075 "u") ;U+0075 LATIN SMALL LETTER U
(cl-define-keysym #x0076 "v") ;U+0076 LATIN SMALL LETTER V
(cl-define-keysym #x0077 "w") ;U+0077 LATIN SMALL LETTER W
(cl-define-keysym #x0078 "x") ;U+0078 LATIN SMALL LETTER X
(cl-define-keysym #x0079 "y") ;U+0079 LATIN SMALL LETTER Y
(cl-define-keysym #x007a "z") ;U+007A LATIN SMALL LETTER Z
(cl-define-keysym #x007b "braceleft") ;U+007B LEFT CURLY BRACKET
(cl-define-keysym #x007c "bar") ;U+007C VERTICAL LINE
(cl-define-keysym #x007d "braceright") ;U+007D RIGHT CURLY BRACKET
(cl-define-keysym #x007e "asciitilde") ;U+007E TILDE
(cl-define-keysym #x00a0 "nobreakspace") ;U+00A0 NO-BREAK SPACE
(cl-define-keysym #x00a1 "exclamdown") ;U+00A1 INVERTED EXCLAMATION MARK
(cl-define-keysym #x00a2 "cent") ;U+00A2 CENT SIGN
(cl-define-keysym #x00a3 "sterling") ;U+00A3 POUND SIGN
(cl-define-keysym #x00a4 "currency") ;U+00A4 CURRENCY SIGN
(cl-define-keysym #x00a5 "yen") ;U+00A5 YEN SIGN
(cl-define-keysym #x00a6 "brokenbar") ;U+00A6 BROKEN BAR
(cl-define-keysym #x00a7 "section") ;U+00A7 SECTION SIGN
(cl-define-keysym #x00a8 "diaeresis") ;U+00A8 DIAERESIS
(cl-define-keysym #x00a9 "copyright") ;U+00A9 COPYRIGHT SIGN
(cl-define-keysym #x00aa "ordfeminine") ;U+00AA FEMININE ORDINAL INDICATOR
(cl-define-keysym #x00ab "guillemotleft") ;U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
(cl-define-keysym #x00ac "notsign") ;U+00AC NOT SIGN
(cl-define-keysym #x00ad "hyphen") ;U+00AD SOFT HYPHEN
(cl-define-keysym #x00ae "registered") ;U+00AE REGISTERED SIGN
(cl-define-keysym #x00af "macron") ;U+00AF MACRON
(cl-define-keysym #x00b0 "degree") ;U+00B0 DEGREE SIGN
(cl-define-keysym #x00b1 "plusminus") ;U+00B1 PLUS-MINUS SIGN
(cl-define-keysym #x00b2 "twosuperior") ;U+00B2 SUPERSCRIPT TWO
(cl-define-keysym #x00b3 "threesuperior") ;U+00B3 SUPERSCRIPT THREE
(cl-define-keysym #x00b4 "acute") ;U+00B4 ACUTE ACCENT
(cl-define-keysym #x00b5 "mu") ;U+00B5 MICRO SIGN
(cl-define-keysym #x00b6 "paragraph") ;U+00B6 PILCROW SIGN
(cl-define-keysym #x00b7 "periodcentered") ;U+00B7 MIDDLE DOT
(cl-define-keysym #x00b8 "cedilla") ;U+00B8 CEDILLA
(cl-define-keysym #x00b9 "onesuperior") ;U+00B9 SUPERSCRIPT ONE
(cl-define-keysym #x00ba "masculine") ;U+00BA MASCULINE ORDINAL INDICATOR
(cl-define-keysym #x00bb "guillemotright") ;U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
(cl-define-keysym #x00bc "onequarter") ;U+00BC VULGAR FRACTION ONE QUARTER
(cl-define-keysym #x00bd "onehalf") ;U+00BD VULGAR FRACTION ONE HALF
(cl-define-keysym #x00be "threequarters") ;U+00BE VULGAR FRACTION THREE QUARTERS
(cl-define-keysym #x00bf "questiondown") ;U+00BF INVERTED QUESTION MARK
(cl-define-keysym #x00c0 "Agrave") ;U+00C0 LATIN CAPITAL LETTER A WITH GRAVE
(cl-define-keysym #x00c1 "Aacute") ;U+00C1 LATIN CAPITAL LETTER A WITH ACUTE
(cl-define-keysym #x00c2 "Acircumflex") ;U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
(cl-define-keysym #x00c3 "Atilde") ;U+00C3 LATIN CAPITAL LETTER A WITH TILDE
(cl-define-keysym #x00c4 "Adiaeresis") ;U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS
(cl-define-keysym #x00c5 "Aring") ;U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE
(cl-define-keysym #x00c6 "AE") ;U+00C6 LATIN CAPITAL LETTER AE
(cl-define-keysym #x00c7 "Ccedilla") ;U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA
(cl-define-keysym #x00c8 "Egrave") ;U+00C8 LATIN CAPITAL LETTER E WITH GRAVE
(cl-define-keysym #x00c9 "Eacute") ;U+00C9 LATIN CAPITAL LETTER E WITH ACUTE
(cl-define-keysym #x00ca "Ecircumflex") ;U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX
(cl-define-keysym #x00cb "Ediaeresis") ;U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS
(cl-define-keysym #x00cc "Igrave") ;U+00CC LATIN CAPITAL LETTER I WITH GRAVE
(cl-define-keysym #x00cd "Iacute") ;U+00CD LATIN CAPITAL LETTER I WITH ACUTE
(cl-define-keysym #x00ce "Icircumflex") ;U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX
(cl-define-keysym #x00cf "Idiaeresis") ;U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS
(cl-define-keysym #x00d0 "ETH") ;U+00D0 LATIN CAPITAL LETTER ETH
(cl-define-keysym #x00d0 "Eth") ;deprecated
(cl-define-keysym #x00d1 "Ntilde") ;U+00D1 LATIN CAPITAL LETTER N WITH TILDE
(cl-define-keysym #x00d2 "Ograve") ;U+00D2 LATIN CAPITAL LETTER O WITH GRAVE
(cl-define-keysym #x00d3 "Oacute") ;U+00D3 LATIN CAPITAL LETTER O WITH ACUTE
(cl-define-keysym #x00d4 "Ocircumflex") ;U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
(cl-define-keysym #x00d5 "Otilde") ;U+00D5 LATIN CAPITAL LETTER O WITH TILDE
(cl-define-keysym #x00d6 "Odiaeresis") ;U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS
(cl-define-keysym #x00d7 "multiply") ;U+00D7 MULTIPLICATION SIGN
(cl-define-keysym #x00d8 "Oslash") ;U+00D8 LATIN CAPITAL LETTER O WITH STROKE
(cl-define-keysym #x00d8 "Ooblique") ;U+00D8 LATIN CAPITAL LETTER O WITH STROKE
(cl-define-keysym #x00d9 "Ugrave") ;U+00D9 LATIN CAPITAL LETTER U WITH GRAVE
(cl-define-keysym #x00da "Uacute") ;U+00DA LATIN CAPITAL LETTER U WITH ACUTE
(cl-define-keysym #x00db "Ucircumflex") ;U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX
(cl-define-keysym #x00dc "Udiaeresis") ;U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS
(cl-define-keysym #x00dd "Yacute") ;U+00DD LATIN CAPITAL LETTER Y WITH ACUTE
(cl-define-keysym #x00de "THORN") ;U+00DE LATIN CAPITAL LETTER THORN
(cl-define-keysym #x00de "Thorn") ;deprecated
(cl-define-keysym #x00df "ssharp") ;U+00DF LATIN SMALL LETTER SHARP S
(cl-define-keysym #x00e0 "agrave") ;U+00E0 LATIN SMALL LETTER A WITH GRAVE
(cl-define-keysym #x00e1 "aacute") ;U+00E1 LATIN SMALL LETTER A WITH ACUTE
(cl-define-keysym #x00e2 "acircumflex") ;U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
(cl-define-keysym #x00e3 "atilde") ;U+00E3 LATIN SMALL LETTER A WITH TILDE
(cl-define-keysym #x00e4 "adiaeresis") ;U+00E4 LATIN SMALL LETTER A WITH DIAERESIS
(cl-define-keysym #x00e5 "aring") ;U+00E5 LATIN SMALL LETTER A WITH RING ABOVE
(cl-define-keysym #x00e6 "ae") ;U+00E6 LATIN SMALL LETTER AE
(cl-define-keysym #x00e7 "ccedilla") ;U+00E7 LATIN SMALL LETTER C WITH CEDILLA
(cl-define-keysym #x00e8 "egrave") ;U+00E8 LATIN SMALL LETTER E WITH GRAVE
(cl-define-keysym #x00e9 "eacute") ;U+00E9 LATIN SMALL LETTER E WITH ACUTE
(cl-define-keysym #x00ea "ecircumflex") ;U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX
(cl-define-keysym #x00eb "ediaeresis") ;U+00EB LATIN SMALL LETTER E WITH DIAERESIS
(cl-define-keysym #x00ec "igrave") ;U+00EC LATIN SMALL LETTER I WITH GRAVE
(cl-define-keysym #x00ed "iacute") ;U+00ED LATIN SMALL LETTER I WITH ACUTE
(cl-define-keysym #x00ee "icircumflex") ;U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX
(cl-define-keysym #x00ef "idiaeresis") ;U+00EF LATIN SMALL LETTER I WITH DIAERESIS
(cl-define-keysym #x00f0 "eth") ;U+00F0 LATIN SMALL LETTER ETH
(cl-define-keysym #x00f1 "ntilde") ;U+00F1 LATIN SMALL LETTER N WITH TILDE
(cl-define-keysym #x00f2 "ograve") ;U+00F2 LATIN SMALL LETTER O WITH GRAVE
(cl-define-keysym #x00f3 "oacute") ;U+00F3 LATIN SMALL LETTER O WITH ACUTE
(cl-define-keysym #x00f4 "ocircumflex") ;U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX
(cl-define-keysym #x00f5 "otilde") ;U+00F5 LATIN SMALL LETTER O WITH TILDE
(cl-define-keysym #x00f6 "odiaeresis") ;U+00F6 LATIN SMALL LETTER O WITH DIAERESIS
(cl-define-keysym #x00f7 "division") ;U+00F7 DIVISION SIGN
(cl-define-keysym #x00f8 "oslash") ;U+00F8 LATIN SMALL LETTER O WITH STROKE
(cl-define-keysym #x00f8 "ooblique") ;U+00F8 LATIN SMALL LETTER O WITH STROKE
(cl-define-keysym #x00f9 "ugrave") ;U+00F9 LATIN SMALL LETTER U WITH GRAVE
(cl-define-keysym #x00fa "uacute") ;U+00FA LATIN SMALL LETTER U WITH ACUTE
(cl-define-keysym #x00fb "ucircumflex") ;U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX
(cl-define-keysym #x00fc "udiaeresis") ;U+00FC LATIN SMALL LETTER U WITH DIAERESIS
(cl-define-keysym #x00fd "yacute") ;U+00FD LATIN SMALL LETTER Y WITH ACUTE
(cl-define-keysym #x00fe "thorn") ;U+00FE LATIN SMALL LETTER THORN
(cl-define-keysym #x00ff "ydiaeresis") ;U+00FF LATIN SMALL LETTER Y WITH DIAERESIS
(cl-define-keysym #x01a1 "Aogonek") ;U+0104 LATIN CAPITAL LETTER A WITH OGONEK
(cl-define-keysym #x01a2 "breve") ;U+02D8 BREVE
(cl-define-keysym #x01a3 "Lstroke") ;U+0141 LATIN CAPITAL LETTER L WITH STROKE
(cl-define-keysym #x01a5 "Lcaron") ;U+013D LATIN CAPITAL LETTER L WITH CARON
(cl-define-keysym #x01a6 "Sacute") ;U+015A LATIN CAPITAL LETTER S WITH ACUTE
(cl-define-keysym #x01a9 "Scaron") ;U+0160 LATIN CAPITAL LETTER S WITH CARON
(cl-define-keysym #x01aa "Scedilla") ;U+015E LATIN CAPITAL LETTER S WITH CEDILLA
(cl-define-keysym #x01ab "Tcaron") ;U+0164 LATIN CAPITAL LETTER T WITH CARON
(cl-define-keysym #x01ac "Zacute") ;U+0179 LATIN CAPITAL LETTER Z WITH ACUTE
(cl-define-keysym #x01ae "Zcaron") ;U+017D LATIN CAPITAL LETTER Z WITH CARON
(cl-define-keysym #x01af "Zabovedot") ;U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE
(cl-define-keysym #x01b1 "aogonek") ;U+0105 LATIN SMALL LETTER A WITH OGONEK
(cl-define-keysym #x01b2 "ogonek") ;U+02DB OGONEK
(cl-define-keysym #x01b3 "lstroke") ;U+0142 LATIN SMALL LETTER L WITH STROKE
(cl-define-keysym #x01b5 "lcaron") ;U+013E LATIN SMALL LETTER L WITH CARON
(cl-define-keysym #x01b6 "sacute") ;U+015B LATIN SMALL LETTER S WITH ACUTE
(cl-define-keysym #x01b7 "caron") ;U+02C7 CARON
(cl-define-keysym #x01b9 "scaron") ;U+0161 LATIN SMALL LETTER S WITH CARON
(cl-define-keysym #x01ba "scedilla") ;U+015F LATIN SMALL LETTER S WITH CEDILLA
(cl-define-keysym #x01bb "tcaron") ;U+0165 LATIN SMALL LETTER T WITH CARON
(cl-define-keysym #x01bc "zacute") ;U+017A LATIN SMALL LETTER Z WITH ACUTE
(cl-define-keysym #x01bd "doubleacute") ;U+02DD DOUBLE ACUTE ACCENT
(cl-define-keysym #x01be "zcaron") ;U+017E LATIN SMALL LETTER Z WITH CARON
(cl-define-keysym #x01bf "zabovedot") ;U+017C LATIN SMALL LETTER Z WITH DOT ABOVE
(cl-define-keysym #x01c0 "Racute") ;U+0154 LATIN CAPITAL LETTER R WITH ACUTE
(cl-define-keysym #x01c3 "Abreve") ;U+0102 LATIN CAPITAL LETTER A WITH BREVE
(cl-define-keysym #x01c5 "Lacute") ;U+0139 LATIN CAPITAL LETTER L WITH ACUTE
(cl-define-keysym #x01c6 "Cacute") ;U+0106 LATIN CAPITAL LETTER C WITH ACUTE
(cl-define-keysym #x01c8 "Ccaron") ;U+010C LATIN CAPITAL LETTER C WITH CARON
(cl-define-keysym #x01ca "Eogonek") ;U+0118 LATIN CAPITAL LETTER E WITH OGONEK
(cl-define-keysym #x01cc "Ecaron") ;U+011A LATIN CAPITAL LETTER E WITH CARON
(cl-define-keysym #x01cf "Dcaron") ;U+010E LATIN CAPITAL LETTER D WITH CARON
(cl-define-keysym #x01d0 "Dstroke") ;U+0110 LATIN CAPITAL LETTER D WITH STROKE
(cl-define-keysym #x01d1 "Nacute") ;U+0143 LATIN CAPITAL LETTER N WITH ACUTE
(cl-define-keysym #x01d2 "Ncaron") ;U+0147 LATIN CAPITAL LETTER N WITH CARON
(cl-define-keysym #x01d5 "Odoubleacute") ;U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
(cl-define-keysym #x01d8 "Rcaron") ;U+0158 LATIN CAPITAL LETTER R WITH CARON
(cl-define-keysym #x01d9 "Uring") ;U+016E LATIN CAPITAL LETTER U WITH RING ABOVE
(cl-define-keysym #x01db "Udoubleacute") ;U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
(cl-define-keysym #x01de "Tcedilla") ;U+0162 LATIN CAPITAL LETTER T WITH CEDILLA
(cl-define-keysym #x01e0 "racute") ;U+0155 LATIN SMALL LETTER R WITH ACUTE
(cl-define-keysym #x01e3 "abreve") ;U+0103 LATIN SMALL LETTER A WITH BREVE
(cl-define-keysym #x01e5 "lacute") ;U+013A LATIN SMALL LETTER L WITH ACUTE
(cl-define-keysym #x01e6 "cacute") ;U+0107 LATIN SMALL LETTER C WITH ACUTE
(cl-define-keysym #x01e8 "ccaron") ;U+010D LATIN SMALL LETTER C WITH CARON
(cl-define-keysym #x01ea "eogonek") ;U+0119 LATIN SMALL LETTER E WITH OGONEK
(cl-define-keysym #x01ec "ecaron") ;U+011B LATIN SMALL LETTER E WITH CARON
(cl-define-keysym #x01ef "dcaron") ;U+010F LATIN SMALL LETTER D WITH CARON
(cl-define-keysym #x01f0 "dstroke") ;U+0111 LATIN SMALL LETTER D WITH STROKE
(cl-define-keysym #x01f1 "nacute") ;U+0144 LATIN SMALL LETTER N WITH ACUTE
(cl-define-keysym #x01f2 "ncaron") ;U+0148 LATIN SMALL LETTER N WITH CARON
(cl-define-keysym #x01f5 "odoubleacute") ;U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE
(cl-define-keysym #x01fb "udoubleacute") ;U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE
(cl-define-keysym #x01f8 "rcaron") ;U+0159 LATIN SMALL LETTER R WITH CARON
(cl-define-keysym #x01f9 "uring") ;U+016F LATIN SMALL LETTER U WITH RING ABOVE
(cl-define-keysym #x01fe "tcedilla") ;U+0163 LATIN SMALL LETTER T WITH CEDILLA
(cl-define-keysym #x01ff "abovedot") ;U+02D9 DOT ABOVE
(cl-define-keysym #x02a1 "Hstroke") ;U+0126 LATIN CAPITAL LETTER H WITH STROKE
(cl-define-keysym #x02a6 "Hcircumflex") ;U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX
(cl-define-keysym #x02a9 "Iabovedot") ;U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
(cl-define-keysym #x02ab "Gbreve") ;U+011E LATIN CAPITAL LETTER G WITH BREVE
(cl-define-keysym #x02ac "Jcircumflex") ;U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX
(cl-define-keysym #x02b1 "hstroke") ;U+0127 LATIN SMALL LETTER H WITH STROKE
(cl-define-keysym #x02b6 "hcircumflex") ;U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX
(cl-define-keysym #x02b9 "idotless") ;U+0131 LATIN SMALL LETTER DOTLESS I
(cl-define-keysym #x02bb "gbreve") ;U+011F LATIN SMALL LETTER G WITH BREVE
(cl-define-keysym #x02bc "jcircumflex") ;U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX
(cl-define-keysym #x02c5 "Cabovedot") ;U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE
(cl-define-keysym #x02c6 "Ccircumflex") ;U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX
(cl-define-keysym #x02d5 "Gabovedot") ;U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE
(cl-define-keysym #x02d8 "Gcircumflex") ;U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX
(cl-define-keysym #x02dd "Ubreve") ;U+016C LATIN CAPITAL LETTER U WITH BREVE
(cl-define-keysym #x02de "Scircumflex") ;U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX
(cl-define-keysym #x02e5 "cabovedot") ;U+010B LATIN SMALL LETTER C WITH DOT ABOVE
(cl-define-keysym #x02e6 "ccircumflex") ;U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX
(cl-define-keysym #x02f5 "gabovedot") ;U+0121 LATIN SMALL LETTER G WITH DOT ABOVE
(cl-define-keysym #x02f8 "gcircumflex") ;U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX
(cl-define-keysym #x02fd "ubreve") ;U+016D LATIN SMALL LETTER U WITH BREVE
(cl-define-keysym #x02fe "scircumflex") ;U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX
(cl-define-keysym #x03a2 "kra") ;U+0138 LATIN SMALL LETTER KRA
(cl-define-keysym #x03a2 "kappa") ;deprecated
(cl-define-keysym #x03a3 "Rcedilla") ;U+0156 LATIN CAPITAL LETTER R WITH CEDILLA
(cl-define-keysym #x03a5 "Itilde") ;U+0128 LATIN CAPITAL LETTER I WITH TILDE
(cl-define-keysym #x03a6 "Lcedilla") ;U+013B LATIN CAPITAL LETTER L WITH CEDILLA
(cl-define-keysym #x03aa "Emacron") ;U+0112 LATIN CAPITAL LETTER E WITH MACRON
(cl-define-keysym #x03ab "Gcedilla") ;U+0122 LATIN CAPITAL LETTER G WITH CEDILLA
(cl-define-keysym #x03ac "Tslash") ;U+0166 LATIN CAPITAL LETTER T WITH STROKE
(cl-define-keysym #x03b3 "rcedilla") ;U+0157 LATIN SMALL LETTER R WITH CEDILLA
(cl-define-keysym #x03b5 "itilde") ;U+0129 LATIN SMALL LETTER I WITH TILDE
(cl-define-keysym #x03b6 "lcedilla") ;U+013C LATIN SMALL LETTER L WITH CEDILLA
(cl-define-keysym #x03ba "emacron") ;U+0113 LATIN SMALL LETTER E WITH MACRON
(cl-define-keysym #x03bb "gcedilla") ;U+0123 LATIN SMALL LETTER G WITH CEDILLA
(cl-define-keysym #x03bc "tslash") ;U+0167 LATIN SMALL LETTER T WITH STROKE
(cl-define-keysym #x03bd "ENG") ;U+014A LATIN CAPITAL LETTER ENG
(cl-define-keysym #x03bf "eng") ;U+014B LATIN SMALL LETTER ENG
(cl-define-keysym #x03c0 "Amacron") ;U+0100 LATIN CAPITAL LETTER A WITH MACRON
(cl-define-keysym #x03c7 "Iogonek") ;U+012E LATIN CAPITAL LETTER I WITH OGONEK
(cl-define-keysym #x03cc "Eabovedot") ;U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE
(cl-define-keysym #x03cf "Imacron") ;U+012A LATIN CAPITAL LETTER I WITH MACRON
(cl-define-keysym #x03d1 "Ncedilla") ;U+0145 LATIN CAPITAL LETTER N WITH CEDILLA
(cl-define-keysym #x03d2 "Omacron") ;U+014C LATIN CAPITAL LETTER O WITH MACRON
(cl-define-keysym #x03d3 "Kcedilla") ;U+0136 LATIN CAPITAL LETTER K WITH CEDILLA
(cl-define-keysym #x03d9 "Uogonek") ;U+0172 LATIN CAPITAL LETTER U WITH OGONEK
(cl-define-keysym #x03dd "Utilde") ;U+0168 LATIN CAPITAL LETTER U WITH TILDE
(cl-define-keysym #x03de "Umacron") ;U+016A LATIN CAPITAL LETTER U WITH MACRON
(cl-define-keysym #x03e0 "amacron") ;U+0101 LATIN SMALL LETTER A WITH MACRON
(cl-define-keysym #x03e7 "iogonek") ;U+012F LATIN SMALL LETTER I WITH OGONEK
(cl-define-keysym #x03ec "eabovedot") ;U+0117 LATIN SMALL LETTER E WITH DOT ABOVE
(cl-define-keysym #x03ef "imacron") ;U+012B LATIN SMALL LETTER I WITH MACRON
(cl-define-keysym #x03f1 "ncedilla") ;U+0146 LATIN SMALL LETTER N WITH CEDILLA
(cl-define-keysym #x03f2 "omacron") ;U+014D LATIN SMALL LETTER O WITH MACRON
(cl-define-keysym #x03f3 "kcedilla") ;U+0137 LATIN SMALL LETTER K WITH CEDILLA
(cl-define-keysym #x03f9 "uogonek") ;U+0173 LATIN SMALL LETTER U WITH OGONEK
(cl-define-keysym #x03fd "utilde") ;U+0169 LATIN SMALL LETTER U WITH TILDE
(cl-define-keysym #x03fe "umacron") ;U+016B LATIN SMALL LETTER U WITH MACRON
(cl-define-keysym #x1001e02 "Babovedot") ;U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE
(cl-define-keysym #x1001e03 "babovedot") ;U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE
(cl-define-keysym #x1001e0a "Dabovedot") ;U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE
(cl-define-keysym #x1001e80 "Wgrave") ;U+1E80 LATIN CAPITAL LETTER W WITH GRAVE
(cl-define-keysym #x1001e82 "Wacute") ;U+1E82 LATIN CAPITAL LETTER W WITH ACUTE
(cl-define-keysym #x1001e0b "dabovedot") ;U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE
(cl-define-keysym #x1001ef2 "Ygrave") ;U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE
(cl-define-keysym #x1001e1e "Fabovedot") ;U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE
(cl-define-keysym #x1001e1f "fabovedot") ;U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE
(cl-define-keysym #x1001e40 "Mabovedot") ;U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE
(cl-define-keysym #x1001e41 "mabovedot") ;U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE
(cl-define-keysym #x1001e56 "Pabovedot") ;U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE
(cl-define-keysym #x1001e81 "wgrave") ;U+1E81 LATIN SMALL LETTER W WITH GRAVE
(cl-define-keysym #x1001e57 "pabovedot") ;U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE
(cl-define-keysym #x1001e83 "wacute") ;U+1E83 LATIN SMALL LETTER W WITH ACUTE
(cl-define-keysym #x1001e60 "Sabovedot") ;U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE
(cl-define-keysym #x1001ef3 "ygrave") ;U+1EF3 LATIN SMALL LETTER Y WITH GRAVE
(cl-define-keysym #x1001e84 "Wdiaeresis") ;U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS
(cl-define-keysym #x1001e85 "wdiaeresis") ;U+1E85 LATIN SMALL LETTER W WITH DIAERESIS
(cl-define-keysym #x1001e61 "sabovedot") ;U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE
(cl-define-keysym #x1000174 "Wcircumflex") ;U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX
(cl-define-keysym #x1001e6a "Tabovedot") ;U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE
(cl-define-keysym #x1000176 "Ycircumflex") ;U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
(cl-define-keysym #x1000175 "wcircumflex") ;U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX
(cl-define-keysym #x1001e6b "tabovedot") ;U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE
(cl-define-keysym #x1000177 "ycircumflex") ;U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX
(cl-define-keysym #x13bc "OE") ;U+0152 LATIN CAPITAL LIGATURE OE
(cl-define-keysym #x13bd "oe") ;U+0153 LATIN SMALL LIGATURE OE
(cl-define-keysym #x13be "Ydiaeresis") ;U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS
(cl-define-keysym #x047e "overline") ;U+203E OVERLINE
(cl-define-keysym #x04a1 "kana_fullstop") ;U+3002 IDEOGRAPHIC FULL STOP
(cl-define-keysym #x04a2 "kana_openingbracket") ;U+300C LEFT CORNER BRACKET
(cl-define-keysym #x04a3 "kana_closingbracket") ;U+300D RIGHT CORNER BRACKET
(cl-define-keysym #x04a4 "kana_comma") ;U+3001 IDEOGRAPHIC COMMA
(cl-define-keysym #x04a5 "kana_conjunctive") ;U+30FB KATAKANA MIDDLE DOT
(cl-define-keysym #x04a5 "kana_middledot") ;deprecated
(cl-define-keysym #x04a6 "kana_WO") ;U+30F2 KATAKANA LETTER WO
(cl-define-keysym #x04a7 "kana_a") ;U+30A1 KATAKANA LETTER SMALL A
(cl-define-keysym #x04a8 "kana_i") ;U+30A3 KATAKANA LETTER SMALL I
(cl-define-keysym #x04a9 "kana_u") ;U+30A5 KATAKANA LETTER SMALL U
(cl-define-keysym #x04aa "kana_e") ;U+30A7 KATAKANA LETTER SMALL E
(cl-define-keysym #x04ab "kana_o") ;U+30A9 KATAKANA LETTER SMALL O
(cl-define-keysym #x04ac "kana_ya") ;U+30E3 KATAKANA LETTER SMALL YA
(cl-define-keysym #x04ad "kana_yu") ;U+30E5 KATAKANA LETTER SMALL YU
(cl-define-keysym #x04ae "kana_yo") ;U+30E7 KATAKANA LETTER SMALL YO
(cl-define-keysym #x04af "kana_tsu") ;U+30C3 KATAKANA LETTER SMALL TU
(cl-define-keysym #x04af "kana_tu") ;deprecated
(cl-define-keysym #x04b0 "prolongedsound") ;U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK
(cl-define-keysym #x04b1 "kana_A") ;U+30A2 KATAKANA LETTER A
(cl-define-keysym #x04b2 "kana_I") ;U+30A4 KATAKANA LETTER I
(cl-define-keysym #x04b3 "kana_U") ;U+30A6 KATAKANA LETTER U
(cl-define-keysym #x04b4 "kana_E") ;U+30A8 KATAKANA LETTER E
(cl-define-keysym #x04b5 "kana_O") ;U+30AA KATAKANA LETTER O
(cl-define-keysym #x04b6 "kana_KA") ;U+30AB KATAKANA LETTER KA
(cl-define-keysym #x04b7 "kana_KI") ;U+30AD KATAKANA LETTER KI
(cl-define-keysym #x04b8 "kana_KU") ;U+30AF KATAKANA LETTER KU
(cl-define-keysym #x04b9 "kana_KE") ;U+30B1 KATAKANA LETTER KE
(cl-define-keysym #x04ba "kana_KO") ;U+30B3 KATAKANA LETTER KO
(cl-define-keysym #x04bb "kana_SA") ;U+30B5 KATAKANA LETTER SA
(cl-define-keysym #x04bc "kana_SHI") ;U+30B7 KATAKANA LETTER SI
(cl-define-keysym #x04bd "kana_SU") ;U+30B9 KATAKANA LETTER SU
(cl-define-keysym #x04be "kana_SE") ;U+30BB KATAKANA LETTER SE
(cl-define-keysym #x04bf "kana_SO") ;U+30BD KATAKANA LETTER SO
(cl-define-keysym #x04c0 "kana_TA") ;U+30BF KATAKANA LETTER TA
(cl-define-keysym #x04c1 "kana_CHI") ;U+30C1 KATAKANA LETTER TI
(cl-define-keysym #x04c1 "kana_TI") ;deprecated
(cl-define-keysym #x04c2 "kana_TSU") ;U+30C4 KATAKANA LETTER TU
(cl-define-keysym #x04c2 "kana_TU") ;deprecated
(cl-define-keysym #x04c3 "kana_TE") ;U+30C6 KATAKANA LETTER TE
(cl-define-keysym #x04c4 "kana_TO") ;U+30C8 KATAKANA LETTER TO
(cl-define-keysym #x04c5 "kana_NA") ;U+30CA KATAKANA LETTER NA
(cl-define-keysym #x04c6 "kana_NI") ;U+30CB KATAKANA LETTER NI
(cl-define-keysym #x04c7 "kana_NU") ;U+30CC KATAKANA LETTER NU
(cl-define-keysym #x04c8 "kana_NE") ;U+30CD KATAKANA LETTER NE
(cl-define-keysym #x04c9 "kana_NO") ;U+30CE KATAKANA LETTER NO
(cl-define-keysym #x04ca "kana_HA") ;U+30CF KATAKANA LETTER HA
(cl-define-keysym #x04cb "kana_HI") ;U+30D2 KATAKANA LETTER HI
(cl-define-keysym #x04cc "kana_FU") ;U+30D5 KATAKANA LETTER HU
(cl-define-keysym #x04cc "kana_HU") ;deprecated
(cl-define-keysym #x04cd "kana_HE") ;U+30D8 KATAKANA LETTER HE
(cl-define-keysym #x04ce "kana_HO") ;U+30DB KATAKANA LETTER HO
(cl-define-keysym #x04cf "kana_MA") ;U+30DE KATAKANA LETTER MA
(cl-define-keysym #x04d0 "kana_MI") ;U+30DF KATAKANA LETTER MI
(cl-define-keysym #x04d1 "kana_MU") ;U+30E0 KATAKANA LETTER MU
(cl-define-keysym #x04d2 "kana_ME") ;U+30E1 KATAKANA LETTER ME
(cl-define-keysym #x04d3 "kana_MO") ;U+30E2 KATAKANA LETTER MO
(cl-define-keysym #x04d4 "kana_YA") ;U+30E4 KATAKANA LETTER YA
(cl-define-keysym #x04d5 "kana_YU") ;U+30E6 KATAKANA LETTER YU
(cl-define-keysym #x04d6 "kana_YO") ;U+30E8 KATAKANA LETTER YO
(cl-define-keysym #x04d7 "kana_RA") ;U+30E9 KATAKANA LETTER RA
(cl-define-keysym #x04d8 "kana_RI") ;U+30EA KATAKANA LETTER RI
(cl-define-keysym #x04d9 "kana_RU") ;U+30EB KATAKANA LETTER RU
(cl-define-keysym #x04da "kana_RE") ;U+30EC KATAKANA LETTER RE
(cl-define-keysym #x04db "kana_RO") ;U+30ED KATAKANA LETTER RO
(cl-define-keysym #x04dc "kana_WA") ;U+30EF KATAKANA LETTER WA
(cl-define-keysym #x04dd "kana_N") ;U+30F3 KATAKANA LETTER N
(cl-define-keysym #x04de "voicedsound") ;U+309B KATAKANA-HIRAGANA VOICED SOUND MARK
(cl-define-keysym #x04df "semivoicedsound") ;U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
(cl-define-keysym #xff7e "kana_switch") ;Alias for mode_switch
(cl-define-keysym #x10006f0 "Farsi_0") ;U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO
(cl-define-keysym #x10006f1 "Farsi_1") ;U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE
(cl-define-keysym #x10006f2 "Farsi_2") ;U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO
(cl-define-keysym #x10006f3 "Farsi_3") ;U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE
(cl-define-keysym #x10006f4 "Farsi_4") ;U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR
(cl-define-keysym #x10006f5 "Farsi_5") ;U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE
(cl-define-keysym #x10006f6 "Farsi_6") ;U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX
(cl-define-keysym #x10006f7 "Farsi_7") ;U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN
(cl-define-keysym #x10006f8 "Farsi_8") ;U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT
(cl-define-keysym #x10006f9 "Farsi_9") ;U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE
(cl-define-keysym #x100066a "Arabic_percent") ;U+066A ARABIC PERCENT SIGN
(cl-define-keysym #x1000670 "Arabic_superscript_alef") ;U+0670 ARABIC LETTER SUPERSCRIPT ALEF
(cl-define-keysym #x1000679 "Arabic_tteh") ;U+0679 ARABIC LETTER TTEH
(cl-define-keysym #x100067e "Arabic_peh") ;U+067E ARABIC LETTER PEH
(cl-define-keysym #x1000686 "Arabic_tcheh") ;U+0686 ARABIC LETTER TCHEH
(cl-define-keysym #x1000688 "Arabic_ddal") ;U+0688 ARABIC LETTER DDAL
(cl-define-keysym #x1000691 "Arabic_rreh") ;U+0691 ARABIC LETTER RREH
(cl-define-keysym #x05ac "Arabic_comma") ;U+060C ARABIC COMMA
(cl-define-keysym #x10006d4 "Arabic_fullstop") ;U+06D4 ARABIC FULL STOP
(cl-define-keysym #x1000660 "Arabic_0") ;U+0660 ARABIC-INDIC DIGIT ZERO
(cl-define-keysym #x1000661 "Arabic_1") ;U+0661 ARABIC-INDIC DIGIT ONE
(cl-define-keysym #x1000662 "Arabic_2") ;U+0662 ARABIC-INDIC DIGIT TWO
(cl-define-keysym #x1000663 "Arabic_3") ;U+0663 ARABIC-INDIC DIGIT THREE
(cl-define-keysym #x1000664 "Arabic_4") ;U+0664 ARABIC-INDIC DIGIT FOUR
(cl-define-keysym #x1000665 "Arabic_5") ;U+0665 ARABIC-INDIC DIGIT FIVE
(cl-define-keysym #x1000666 "Arabic_6") ;U+0666 ARABIC-INDIC DIGIT SIX
(cl-define-keysym #x1000667 "Arabic_7") ;U+0667 ARABIC-INDIC DIGIT SEVEN
(cl-define-keysym #x1000668 "Arabic_8") ;U+0668 ARABIC-INDIC DIGIT EIGHT
(cl-define-keysym #x1000669 "Arabic_9") ;U+0669 ARABIC-INDIC DIGIT NINE
(cl-define-keysym #x05bb "Arabic_semicolon") ;U+061B ARABIC SEMICOLON
(cl-define-keysym #x05bf "Arabic_question_mark") ;U+061F ARABIC QUESTION MARK
(cl-define-keysym #x05c1 "Arabic_hamza") ;U+0621 ARABIC LETTER HAMZA
(cl-define-keysym #x05c2 "Arabic_maddaonalef") ;U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE
(cl-define-keysym #x05c3 "Arabic_hamzaonalef") ;U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE
(cl-define-keysym #x05c4 "Arabic_hamzaonwaw") ;U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE
(cl-define-keysym #x05c5 "Arabic_hamzaunderalef") ;U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW
(cl-define-keysym #x05c6 "Arabic_hamzaonyeh") ;U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE
(cl-define-keysym #x05c7 "Arabic_alef") ;U+0627 ARABIC LETTER ALEF
(cl-define-keysym #x05c8 "Arabic_beh") ;U+0628 ARABIC LETTER BEH
(cl-define-keysym #x05c9 "Arabic_tehmarbuta") ;U+0629 ARABIC LETTER TEH MARBUTA
(cl-define-keysym #x05ca "Arabic_teh") ;U+062A ARABIC LETTER TEH
(cl-define-keysym #x05cb "Arabic_theh") ;U+062B ARABIC LETTER THEH
(cl-define-keysym #x05cc "Arabic_jeem") ;U+062C ARABIC LETTER JEEM
(cl-define-keysym #x05cd "Arabic_hah") ;U+062D ARABIC LETTER HAH
(cl-define-keysym #x05ce "Arabic_khah") ;U+062E ARABIC LETTER KHAH
(cl-define-keysym #x05cf "Arabic_dal") ;U+062F ARABIC LETTER DAL
(cl-define-keysym #x05d0 "Arabic_thal") ;U+0630 ARABIC LETTER THAL
(cl-define-keysym #x05d1 "Arabic_ra") ;U+0631 ARABIC LETTER REH
(cl-define-keysym #x05d2 "Arabic_zain") ;U+0632 ARABIC LETTER ZAIN
(cl-define-keysym #x05d3 "Arabic_seen") ;U+0633 ARABIC LETTER SEEN
(cl-define-keysym #x05d4 "Arabic_sheen") ;U+0634 ARABIC LETTER SHEEN
(cl-define-keysym #x05d5 "Arabic_sad") ;U+0635 ARABIC LETTER SAD
(cl-define-keysym #x05d6 "Arabic_dad") ;U+0636 ARABIC LETTER DAD
(cl-define-keysym #x05d7 "Arabic_tah") ;U+0637 ARABIC LETTER TAH
(cl-define-keysym #x05d8 "Arabic_zah") ;U+0638 ARABIC LETTER ZAH
(cl-define-keysym #x05d9 "Arabic_ain") ;U+0639 ARABIC LETTER AIN
(cl-define-keysym #x05da "Arabic_ghain") ;U+063A ARABIC LETTER GHAIN
(cl-define-keysym #x05e0 "Arabic_tatweel") ;U+0640 ARABIC TATWEEL
(cl-define-keysym #x05e1 "Arabic_feh") ;U+0641 ARABIC LETTER FEH
(cl-define-keysym #x05e2 "Arabic_qaf") ;U+0642 ARABIC LETTER QAF
(cl-define-keysym #x05e3 "Arabic_kaf") ;U+0643 ARABIC LETTER KAF
(cl-define-keysym #x05e4 "Arabic_lam") ;U+0644 ARABIC LETTER LAM
(cl-define-keysym #x05e5 "Arabic_meem") ;U+0645 ARABIC LETTER MEEM
(cl-define-keysym #x05e6 "Arabic_noon") ;U+0646 ARABIC LETTER NOON
(cl-define-keysym #x05e7 "Arabic_ha") ;U+0647 ARABIC LETTER HEH
(cl-define-keysym #x05e7 "Arabic_heh") ;deprecated
(cl-define-keysym #x05e8 "Arabic_waw") ;U+0648 ARABIC LETTER WAW
(cl-define-keysym #x05e9 "Arabic_alefmaksura") ;U+0649 ARABIC LETTER ALEF MAKSURA
(cl-define-keysym #x05ea "Arabic_yeh") ;U+064A ARABIC LETTER YEH
(cl-define-keysym #x05eb "Arabic_fathatan") ;U+064B ARABIC FATHATAN
(cl-define-keysym #x05ec "Arabic_dammatan") ;U+064C ARABIC DAMMATAN
(cl-define-keysym #x05ed "Arabic_kasratan") ;U+064D ARABIC KASRATAN
(cl-define-keysym #x05ee "Arabic_fatha") ;U+064E ARABIC FATHA
(cl-define-keysym #x05ef "Arabic_damma") ;U+064F ARABIC DAMMA
(cl-define-keysym #x05f0 "Arabic_kasra") ;U+0650 ARABIC KASRA
(cl-define-keysym #x05f1 "Arabic_shadda") ;U+0651 ARABIC SHADDA
(cl-define-keysym #x05f2 "Arabic_sukun") ;U+0652 ARABIC SUKUN
(cl-define-keysym #x1000653 "Arabic_madda_above") ;U+0653 ARABIC MADDAH ABOVE
(cl-define-keysym #x1000654 "Arabic_hamza_above") ;U+0654 ARABIC HAMZA ABOVE
(cl-define-keysym #x1000655 "Arabic_hamza_below") ;U+0655 ARABIC HAMZA BELOW
(cl-define-keysym #x1000698 "Arabic_jeh") ;U+0698 ARABIC LETTER JEH
(cl-define-keysym #x10006a4 "Arabic_veh") ;U+06A4 ARABIC LETTER VEH
(cl-define-keysym #x10006a9 "Arabic_keheh") ;U+06A9 ARABIC LETTER KEHEH
(cl-define-keysym #x10006af "Arabic_gaf") ;U+06AF ARABIC LETTER GAF
(cl-define-keysym #x10006ba "Arabic_noon_ghunna") ;U+06BA ARABIC LETTER NOON GHUNNA
(cl-define-keysym #x10006be "Arabic_heh_doachashmee") ;U+06BE ARABIC LETTER HEH DOACHASHMEE
(cl-define-keysym #x10006cc "Farsi_yeh") ;U+06CC ARABIC LETTER FARSI YEH
(cl-define-keysym #x10006cc "Arabic_farsi_yeh") ;U+06CC ARABIC LETTER FARSI YEH
(cl-define-keysym #x10006d2 "Arabic_yeh_baree") ;U+06D2 ARABIC LETTER YEH BARREE
(cl-define-keysym #x10006c1 "Arabic_heh_goal") ;U+06C1 ARABIC LETTER HEH GOAL
(cl-define-keysym #xff7e "Arabic_switch") ;Alias for mode_switch
(cl-define-keysym #x1000492 "Cyrillic_GHE_bar") ;U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE
(cl-define-keysym #x1000493 "Cyrillic_ghe_bar") ;U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE
(cl-define-keysym #x1000496 "Cyrillic_ZHE_descender") ;U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
(cl-define-keysym #x1000497 "Cyrillic_zhe_descender") ;U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER
(cl-define-keysym #x100049a "Cyrillic_KA_descender") ;U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER
(cl-define-keysym #x100049b "Cyrillic_ka_descender") ;U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER
(cl-define-keysym #x100049c "Cyrillic_KA_vertstroke") ;U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
(cl-define-keysym #x100049d "Cyrillic_ka_vertstroke") ;U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
(cl-define-keysym #x10004a2 "Cyrillic_EN_descender") ;U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER
(cl-define-keysym #x10004a3 "Cyrillic_en_descender") ;U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER
(cl-define-keysym #x10004ae "Cyrillic_U_straight") ;U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U
(cl-define-keysym #x10004af "Cyrillic_u_straight") ;U+04AF CYRILLIC SMALL LETTER STRAIGHT U
(cl-define-keysym #x10004b0 "Cyrillic_U_straight_bar") ;U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
(cl-define-keysym #x10004b1 "Cyrillic_u_straight_bar") ;U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
(cl-define-keysym #x10004b2 "Cyrillic_HA_descender") ;U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER
(cl-define-keysym #x10004b3 "Cyrillic_ha_descender") ;U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER
(cl-define-keysym #x10004b6 "Cyrillic_CHE_descender") ;U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
(cl-define-keysym #x10004b7 "Cyrillic_che_descender") ;U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER
(cl-define-keysym #x10004b8 "Cyrillic_CHE_vertstroke") ;U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
(cl-define-keysym #x10004b9 "Cyrillic_che_vertstroke") ;U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
(cl-define-keysym #x10004ba "Cyrillic_SHHA") ;U+04BA CYRILLIC CAPITAL LETTER SHHA
(cl-define-keysym #x10004bb "Cyrillic_shha") ;U+04BB CYRILLIC SMALL LETTER SHHA
(cl-define-keysym #x10004d8 "Cyrillic_SCHWA") ;U+04D8 CYRILLIC CAPITAL LETTER SCHWA
(cl-define-keysym #x10004d9 "Cyrillic_schwa") ;U+04D9 CYRILLIC SMALL LETTER SCHWA
(cl-define-keysym #x10004e2 "Cyrillic_I_macron") ;U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON
(cl-define-keysym #x10004e3 "Cyrillic_i_macron") ;U+04E3 CYRILLIC SMALL LETTER I WITH MACRON
(cl-define-keysym #x10004e8 "Cyrillic_O_bar") ;U+04E8 CYRILLIC CAPITAL LETTER BARRED O
(cl-define-keysym #x10004e9 "Cyrillic_o_bar") ;U+04E9 CYRILLIC SMALL LETTER BARRED O
(cl-define-keysym #x10004ee "Cyrillic_U_macron") ;U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON
(cl-define-keysym #x10004ef "Cyrillic_u_macron") ;U+04EF CYRILLIC SMALL LETTER U WITH MACRON
(cl-define-keysym #x06a1 "Serbian_dje") ;U+0452 CYRILLIC SMALL LETTER DJE
(cl-define-keysym #x06a2 "Macedonia_gje") ;U+0453 CYRILLIC SMALL LETTER GJE
(cl-define-keysym #x06a3 "Cyrillic_io") ;U+0451 CYRILLIC SMALL LETTER IO
(cl-define-keysym #x06a4 "Ukrainian_ie") ;U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE
(cl-define-keysym #x06a4 "Ukranian_je") ;deprecated
(cl-define-keysym #x06a5 "Macedonia_dse") ;U+0455 CYRILLIC SMALL LETTER DZE
(cl-define-keysym #x06a6 "Ukrainian_i") ;U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
(cl-define-keysym #x06a6 "Ukranian_i") ;deprecated
(cl-define-keysym #x06a7 "Ukrainian_yi") ;U+0457 CYRILLIC SMALL LETTER YI
(cl-define-keysym #x06a7 "Ukranian_yi") ;deprecated
(cl-define-keysym #x06a8 "Cyrillic_je") ;U+0458 CYRILLIC SMALL LETTER JE
(cl-define-keysym #x06a8 "Serbian_je") ;deprecated
(cl-define-keysym #x06a9 "Cyrillic_lje") ;U+0459 CYRILLIC SMALL LETTER LJE
(cl-define-keysym #x06a9 "Serbian_lje") ;deprecated
(cl-define-keysym #x06aa "Cyrillic_nje") ;U+045A CYRILLIC SMALL LETTER NJE
(cl-define-keysym #x06aa "Serbian_nje") ;deprecated
(cl-define-keysym #x06ab "Serbian_tshe") ;U+045B CYRILLIC SMALL LETTER TSHE
(cl-define-keysym #x06ac "Macedonia_kje") ;U+045C CYRILLIC SMALL LETTER KJE
(cl-define-keysym #x06ad "Ukrainian_ghe_with_upturn") ;U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN
(cl-define-keysym #x06ae "Byelorussian_shortu") ;U+045E CYRILLIC SMALL LETTER SHORT U
(cl-define-keysym #x06af "Cyrillic_dzhe") ;U+045F CYRILLIC SMALL LETTER DZHE
(cl-define-keysym #x06af "Serbian_dze") ;deprecated
(cl-define-keysym #x06b0 "numerosign") ;U+2116 NUMERO SIGN
(cl-define-keysym #x06b1 "Serbian_DJE") ;U+0402 CYRILLIC CAPITAL LETTER DJE
(cl-define-keysym #x06b2 "Macedonia_GJE") ;U+0403 CYRILLIC CAPITAL LETTER GJE
(cl-define-keysym #x06b3 "Cyrillic_IO") ;U+0401 CYRILLIC CAPITAL LETTER IO
(cl-define-keysym #x06b4 "Ukrainian_IE") ;U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE
(cl-define-keysym #x06b4 "Ukranian_JE") ;deprecated
(cl-define-keysym #x06b5 "Macedonia_DSE") ;U+0405 CYRILLIC CAPITAL LETTER DZE
(cl-define-keysym #x06b6 "Ukrainian_I") ;U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
(cl-define-keysym #x06b6 "Ukranian_I") ;deprecated
(cl-define-keysym #x06b7 "Ukrainian_YI") ;U+0407 CYRILLIC CAPITAL LETTER YI
(cl-define-keysym #x06b7 "Ukranian_YI") ;deprecated
(cl-define-keysym #x06b8 "Cyrillic_JE") ;U+0408 CYRILLIC CAPITAL LETTER JE
(cl-define-keysym #x06b8 "Serbian_JE") ;deprecated
(cl-define-keysym #x06b9 "Cyrillic_LJE") ;U+0409 CYRILLIC CAPITAL LETTER LJE
(cl-define-keysym #x06b9 "Serbian_LJE") ;deprecated
(cl-define-keysym #x06ba "Cyrillic_NJE") ;U+040A CYRILLIC CAPITAL LETTER NJE
(cl-define-keysym #x06ba "Serbian_NJE") ;deprecated
(cl-define-keysym #x06bb "Serbian_TSHE") ;U+040B CYRILLIC CAPITAL LETTER TSHE
(cl-define-keysym #x06bc "Macedonia_KJE") ;U+040C CYRILLIC CAPITAL LETTER KJE
(cl-define-keysym #x06bd "Ukrainian_GHE_WITH_UPTURN") ;U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN
(cl-define-keysym #x06be "Byelorussian_SHORTU") ;U+040E CYRILLIC CAPITAL LETTER SHORT U
(cl-define-keysym #x06bf "Cyrillic_DZHE") ;U+040F CYRILLIC CAPITAL LETTER DZHE
(cl-define-keysym #x06bf "Serbian_DZE") ;deprecated
(cl-define-keysym #x06c0 "Cyrillic_yu") ;U+044E CYRILLIC SMALL LETTER YU
(cl-define-keysym #x06c1 "Cyrillic_a") ;U+0430 CYRILLIC SMALL LETTER A
(cl-define-keysym #x06c2 "Cyrillic_be") ;U+0431 CYRILLIC SMALL LETTER BE
(cl-define-keysym #x06c3 "Cyrillic_tse") ;U+0446 CYRILLIC SMALL LETTER TSE
(cl-define-keysym #x06c4 "Cyrillic_de") ;U+0434 CYRILLIC SMALL LETTER DE
(cl-define-keysym #x06c5 "Cyrillic_ie") ;U+0435 CYRILLIC SMALL LETTER IE
(cl-define-keysym #x06c6 "Cyrillic_ef") ;U+0444 CYRILLIC SMALL LETTER EF
(cl-define-keysym #x06c7 "Cyrillic_ghe") ;U+0433 CYRILLIC SMALL LETTER GHE
(cl-define-keysym #x06c8 "Cyrillic_ha") ;U+0445 CYRILLIC SMALL LETTER HA
(cl-define-keysym #x06c9 "Cyrillic_i") ;U+0438 CYRILLIC SMALL LETTER I
(cl-define-keysym #x06ca "Cyrillic_shorti") ;U+0439 CYRILLIC SMALL LETTER SHORT I
(cl-define-keysym #x06cb "Cyrillic_ka") ;U+043A CYRILLIC SMALL LETTER KA
(cl-define-keysym #x06cc "Cyrillic_el") ;U+043B CYRILLIC SMALL LETTER EL
(cl-define-keysym #x06cd "Cyrillic_em") ;U+043C CYRILLIC SMALL LETTER EM
(cl-define-keysym #x06ce "Cyrillic_en") ;U+043D CYRILLIC SMALL LETTER EN
(cl-define-keysym #x06cf "Cyrillic_o") ;U+043E CYRILLIC SMALL LETTER O
(cl-define-keysym #x06d0 "Cyrillic_pe") ;U+043F CYRILLIC SMALL LETTER PE
(cl-define-keysym #x06d1 "Cyrillic_ya") ;U+044F CYRILLIC SMALL LETTER YA
(cl-define-keysym #x06d2 "Cyrillic_er") ;U+0440 CYRILLIC SMALL LETTER ER
(cl-define-keysym #x06d3 "Cyrillic_es") ;U+0441 CYRILLIC SMALL LETTER ES
(cl-define-keysym #x06d4 "Cyrillic_te") ;U+0442 CYRILLIC SMALL LETTER TE
(cl-define-keysym #x06d5 "Cyrillic_u") ;U+0443 CYRILLIC SMALL LETTER U
(cl-define-keysym #x06d6 "Cyrillic_zhe") ;U+0436 CYRILLIC SMALL LETTER ZHE
(cl-define-keysym #x06d7 "Cyrillic_ve") ;U+0432 CYRILLIC SMALL LETTER VE
(cl-define-keysym #x06d8 "Cyrillic_softsign") ;U+044C CYRILLIC SMALL LETTER SOFT SIGN
(cl-define-keysym #x06d9 "Cyrillic_yeru") ;U+044B CYRILLIC SMALL LETTER YERU
(cl-define-keysym #x06da "Cyrillic_ze") ;U+0437 CYRILLIC SMALL LETTER ZE
(cl-define-keysym #x06db "Cyrillic_sha") ;U+0448 CYRILLIC SMALL LETTER SHA
(cl-define-keysym #x06dc "Cyrillic_e") ;U+044D CYRILLIC SMALL LETTER E
(cl-define-keysym #x06dd "Cyrillic_shcha") ;U+0449 CYRILLIC SMALL LETTER SHCHA
(cl-define-keysym #x06de "Cyrillic_che") ;U+0447 CYRILLIC SMALL LETTER CHE
(cl-define-keysym #x06df "Cyrillic_hardsign") ;U+044A CYRILLIC SMALL LETTER HARD SIGN
(cl-define-keysym #x06e0 "Cyrillic_YU") ;U+042E CYRILLIC CAPITAL LETTER YU
(cl-define-keysym #x06e1 "Cyrillic_A") ;U+0410 CYRILLIC CAPITAL LETTER A
(cl-define-keysym #x06e2 "Cyrillic_BE") ;U+0411 CYRILLIC CAPITAL LETTER BE
(cl-define-keysym #x06e3 "Cyrillic_TSE") ;U+0426 CYRILLIC CAPITAL LETTER TSE
(cl-define-keysym #x06e4 "Cyrillic_DE") ;U+0414 CYRILLIC CAPITAL LETTER DE
(cl-define-keysym #x06e5 "Cyrillic_IE") ;U+0415 CYRILLIC CAPITAL LETTER IE
(cl-define-keysym #x06e6 "Cyrillic_EF") ;U+0424 CYRILLIC CAPITAL LETTER EF
(cl-define-keysym #x06e7 "Cyrillic_GHE") ;U+0413 CYRILLIC CAPITAL LETTER GHE
(cl-define-keysym #x06e8 "Cyrillic_HA") ;U+0425 CYRILLIC CAPITAL LETTER HA
(cl-define-keysym #x06e9 "Cyrillic_I") ;U+0418 CYRILLIC CAPITAL LETTER I
(cl-define-keysym #x06ea "Cyrillic_SHORTI") ;U+0419 CYRILLIC CAPITAL LETTER SHORT I
(cl-define-keysym #x06eb "Cyrillic_KA") ;U+041A CYRILLIC CAPITAL LETTER KA
(cl-define-keysym #x06ec "Cyrillic_EL") ;U+041B CYRILLIC CAPITAL LETTER EL
(cl-define-keysym #x06ed "Cyrillic_EM") ;U+041C CYRILLIC CAPITAL LETTER EM
(cl-define-keysym #x06ee "Cyrillic_EN") ;U+041D CYRILLIC CAPITAL LETTER EN
(cl-define-keysym #x06ef "Cyrillic_O") ;U+041E CYRILLIC CAPITAL LETTER O
(cl-define-keysym #x06f0 "Cyrillic_PE") ;U+041F CYRILLIC CAPITAL LETTER PE
(cl-define-keysym #x06f1 "Cyrillic_YA") ;U+042F CYRILLIC CAPITAL LETTER YA
(cl-define-keysym #x06f2 "Cyrillic_ER") ;U+0420 CYRILLIC CAPITAL LETTER ER
(cl-define-keysym #x06f3 "Cyrillic_ES") ;U+0421 CYRILLIC CAPITAL LETTER ES
(cl-define-keysym #x06f4 "Cyrillic_TE") ;U+0422 CYRILLIC CAPITAL LETTER TE
(cl-define-keysym #x06f5 "Cyrillic_U") ;U+0423 CYRILLIC CAPITAL LETTER U
(cl-define-keysym #x06f6 "Cyrillic_ZHE") ;U+0416 CYRILLIC CAPITAL LETTER ZHE
(cl-define-keysym #x06f7 "Cyrillic_VE") ;U+0412 CYRILLIC CAPITAL LETTER VE
(cl-define-keysym #x06f8 "Cyrillic_SOFTSIGN") ;U+042C CYRILLIC CAPITAL LETTER SOFT SIGN
(cl-define-keysym #x06f9 "Cyrillic_YERU") ;U+042B CYRILLIC CAPITAL LETTER YERU
(cl-define-keysym #x06fa "Cyrillic_ZE") ;U+0417 CYRILLIC CAPITAL LETTER ZE
(cl-define-keysym #x06fb "Cyrillic_SHA") ;U+0428 CYRILLIC CAPITAL LETTER SHA
(cl-define-keysym #x06fc "Cyrillic_E") ;U+042D CYRILLIC CAPITAL LETTER E
(cl-define-keysym #x06fd "Cyrillic_SHCHA") ;U+0429 CYRILLIC CAPITAL LETTER SHCHA
(cl-define-keysym #x06fe "Cyrillic_CHE") ;U+0427 CYRILLIC CAPITAL LETTER CHE
(cl-define-keysym #x06ff "Cyrillic_HARDSIGN") ;U+042A CYRILLIC CAPITAL LETTER HARD SIGN
(cl-define-keysym #x07a1 "Greek_ALPHAaccent") ;U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS
(cl-define-keysym #x07a2 "Greek_EPSILONaccent") ;U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS
(cl-define-keysym #x07a3 "Greek_ETAaccent") ;U+0389 GREEK CAPITAL LETTER ETA WITH TONOS
(cl-define-keysym #x07a4 "Greek_IOTAaccent") ;U+038A GREEK CAPITAL LETTER IOTA WITH TONOS
(cl-define-keysym #x07a5 "Greek_IOTAdieresis") ;U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
(cl-define-keysym #x07a5 "Greek_IOTAdiaeresis") ;old typo
(cl-define-keysym #x07a7 "Greek_OMICRONaccent") ;U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS
(cl-define-keysym #x07a8 "Greek_UPSILONaccent") ;U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS
(cl-define-keysym #x07a9 "Greek_UPSILONdieresis") ;U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
(cl-define-keysym #x07ab "Greek_OMEGAaccent") ;U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS
(cl-define-keysym #x07ae "Greek_accentdieresis") ;U+0385 GREEK DIALYTIKA TONOS
(cl-define-keysym #x07af "Greek_horizbar") ;U+2015 HORIZONTAL BAR
(cl-define-keysym #x07b1 "Greek_alphaaccent") ;U+03AC GREEK SMALL LETTER ALPHA WITH TONOS
(cl-define-keysym #x07b2 "Greek_epsilonaccent") ;U+03AD GREEK SMALL LETTER EPSILON WITH TONOS
(cl-define-keysym #x07b3 "Greek_etaaccent") ;U+03AE GREEK SMALL LETTER ETA WITH TONOS
(cl-define-keysym #x07b4 "Greek_iotaaccent") ;U+03AF GREEK SMALL LETTER IOTA WITH TONOS
(cl-define-keysym #x07b5 "Greek_iotadieresis") ;U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA
(cl-define-keysym #x07b6 "Greek_iotaaccentdieresis") ;U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
(cl-define-keysym #x07b7 "Greek_omicronaccent") ;U+03CC GREEK SMALL LETTER OMICRON WITH TONOS
(cl-define-keysym #x07b8 "Greek_upsilonaccent") ;U+03CD GREEK SMALL LETTER UPSILON WITH TONOS
(cl-define-keysym #x07b9 "Greek_upsilondieresis") ;U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA
(cl-define-keysym #x07ba "Greek_upsilonaccentdieresis") ;U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
(cl-define-keysym #x07bb "Greek_omegaaccent") ;U+03CE GREEK SMALL LETTER OMEGA WITH TONOS
(cl-define-keysym #x07c1 "Greek_ALPHA") ;U+0391 GREEK CAPITAL LETTER ALPHA
(cl-define-keysym #x07c2 "Greek_BETA") ;U+0392 GREEK CAPITAL LETTER BETA
(cl-define-keysym #x07c3 "Greek_GAMMA") ;U+0393 GREEK CAPITAL LETTER GAMMA
(cl-define-keysym #x07c4 "Greek_DELTA") ;U+0394 GREEK CAPITAL LETTER DELTA
(cl-define-keysym #x07c5 "Greek_EPSILON") ;U+0395 GREEK CAPITAL LETTER EPSILON
(cl-define-keysym #x07c6 "Greek_ZETA") ;U+0396 GREEK CAPITAL LETTER ZETA
(cl-define-keysym #x07c7 "Greek_ETA") ;U+0397 GREEK CAPITAL LETTER ETA
(cl-define-keysym #x07c8 "Greek_THETA") ;U+0398 GREEK CAPITAL LETTER THETA
(cl-define-keysym #x07c9 "Greek_IOTA") ;U+0399 GREEK CAPITAL LETTER IOTA
(cl-define-keysym #x07ca "Greek_KAPPA") ;U+039A GREEK CAPITAL LETTER KAPPA
(cl-define-keysym #x07cb "Greek_LAMDA") ;U+039B GREEK CAPITAL LETTER LAMDA
(cl-define-keysym #x07cb "Greek_LAMBDA") ;U+039B GREEK CAPITAL LETTER LAMDA
(cl-define-keysym #x07cc "Greek_MU") ;U+039C GREEK CAPITAL LETTER MU
(cl-define-keysym #x07cd "Greek_NU") ;U+039D GREEK CAPITAL LETTER NU
(cl-define-keysym #x07ce "Greek_XI") ;U+039E GREEK CAPITAL LETTER XI
(cl-define-keysym #x07cf "Greek_OMICRON") ;U+039F GREEK CAPITAL LETTER OMICRON
(cl-define-keysym #x07d0 "Greek_PI") ;U+03A0 GREEK CAPITAL LETTER PI
(cl-define-keysym #x07d1 "Greek_RHO") ;U+03A1 GREEK CAPITAL LETTER RHO
(cl-define-keysym #x07d2 "Greek_SIGMA") ;U+03A3 GREEK CAPITAL LETTER SIGMA
(cl-define-keysym #x07d4 "Greek_TAU") ;U+03A4 GREEK CAPITAL LETTER TAU
(cl-define-keysym #x07d5 "Greek_UPSILON") ;U+03A5 GREEK CAPITAL LETTER UPSILON
(cl-define-keysym #x07d6 "Greek_PHI") ;U+03A6 GREEK CAPITAL LETTER PHI
(cl-define-keysym #x07d7 "Greek_CHI") ;U+03A7 GREEK CAPITAL LETTER CHI
(cl-define-keysym #x07d8 "Greek_PSI") ;U+03A8 GREEK CAPITAL LETTER PSI
(cl-define-keysym #x07d9 "Greek_OMEGA") ;U+03A9 GREEK CAPITAL LETTER OMEGA
(cl-define-keysym #x07e1 "Greek_alpha") ;U+03B1 GREEK SMALL LETTER ALPHA
(cl-define-keysym #x07e2 "Greek_beta") ;U+03B2 GREEK SMALL LETTER BETA
(cl-define-keysym #x07e3 "Greek_gamma") ;U+03B3 GREEK SMALL LETTER GAMMA
(cl-define-keysym #x07e4 "Greek_delta") ;U+03B4 GREEK SMALL LETTER DELTA
(cl-define-keysym #x07e5 "Greek_epsilon") ;U+03B5 GREEK SMALL LETTER EPSILON
(cl-define-keysym #x07e6 "Greek_zeta") ;U+03B6 GREEK SMALL LETTER ZETA
(cl-define-keysym #x07e7 "Greek_eta") ;U+03B7 GREEK SMALL LETTER ETA
(cl-define-keysym #x07e8 "Greek_theta") ;U+03B8 GREEK SMALL LETTER THETA
(cl-define-keysym #x07e9 "Greek_iota") ;U+03B9 GREEK SMALL LETTER IOTA
(cl-define-keysym #x07ea "Greek_kappa") ;U+03BA GREEK SMALL LETTER KAPPA
(cl-define-keysym #x07eb "Greek_lamda") ;U+03BB GREEK SMALL LETTER LAMDA
(cl-define-keysym #x07eb "Greek_lambda") ;U+03BB GREEK SMALL LETTER LAMDA
(cl-define-keysym #x07ec "Greek_mu") ;U+03BC GREEK SMALL LETTER MU
(cl-define-keysym #x07ed "Greek_nu") ;U+03BD GREEK SMALL LETTER NU
(cl-define-keysym #x07ee "Greek_xi") ;U+03BE GREEK SMALL LETTER XI
(cl-define-keysym #x07ef "Greek_omicron") ;U+03BF GREEK SMALL LETTER OMICRON
(cl-define-keysym #x07f0 "Greek_pi") ;U+03C0 GREEK SMALL LETTER PI
(cl-define-keysym #x07f1 "Greek_rho") ;U+03C1 GREEK SMALL LETTER RHO
(cl-define-keysym #x07f2 "Greek_sigma") ;U+03C3 GREEK SMALL LETTER SIGMA
(cl-define-keysym #x07f3 "Greek_finalsmallsigma") ;U+03C2 GREEK SMALL LETTER FINAL SIGMA
(cl-define-keysym #x07f4 "Greek_tau") ;U+03C4 GREEK SMALL LETTER TAU
(cl-define-keysym #x07f5 "Greek_upsilon") ;U+03C5 GREEK SMALL LETTER UPSILON
(cl-define-keysym #x07f6 "Greek_phi") ;U+03C6 GREEK SMALL LETTER PHI
(cl-define-keysym #x07f7 "Greek_chi") ;U+03C7 GREEK SMALL LETTER CHI
(cl-define-keysym #x07f8 "Greek_psi") ;U+03C8 GREEK SMALL LETTER PSI
(cl-define-keysym #x07f9 "Greek_omega") ;U+03C9 GREEK SMALL LETTER OMEGA
(cl-define-keysym #xff7e "Greek_switch") ;Alias for mode_switch
(cl-define-keysym #x08a1 "leftradical") ;U+23B7 RADICAL SYMBOL BOTTOM
(cl-define-keysym #x08a2 "topleftradical") ;(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)
(cl-define-keysym #x08a3 "horizconnector") ;(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)
(cl-define-keysym #x08a4 "topintegral") ;U+2320 TOP HALF INTEGRAL
(cl-define-keysym #x08a5 "botintegral") ;U+2321 BOTTOM HALF INTEGRAL
(cl-define-keysym #x08a6 "vertconnector") ;(U+2502 BOX DRAWINGS LIGHT VERTICAL)
(cl-define-keysym #x08a7 "topleftsqbracket") ;U+23A1 LEFT SQUARE BRACKET UPPER CORNER
(cl-define-keysym #x08a8 "botleftsqbracket") ;U+23A3 LEFT SQUARE BRACKET LOWER CORNER
(cl-define-keysym #x08a9 "toprightsqbracket") ;U+23A4 RIGHT SQUARE BRACKET UPPER CORNER
(cl-define-keysym #x08aa "botrightsqbracket") ;U+23A6 RIGHT SQUARE BRACKET LOWER CORNER
(cl-define-keysym #x08ab "topleftparens") ;U+239B LEFT PARENTHESIS UPPER HOOK
(cl-define-keysym #x08ac "botleftparens") ;U+239D LEFT PARENTHESIS LOWER HOOK
(cl-define-keysym #x08ad "toprightparens") ;U+239E RIGHT PARENTHESIS UPPER HOOK
(cl-define-keysym #x08ae "botrightparens") ;U+23A0 RIGHT PARENTHESIS LOWER HOOK
(cl-define-keysym #x08af "leftmiddlecurlybrace") ;U+23A8 LEFT CURLY BRACKET MIDDLE PIECE
(cl-define-keysym #x08b0 "rightmiddlecurlybrace") ;U+23AC RIGHT CURLY BRACKET MIDDLE PIECE
(cl-define-keysym #x08b1 "topleftsummation")
(cl-define-keysym #x08b2 "botleftsummation")
(cl-define-keysym #x08b3 "topvertsummationconnector")
(cl-define-keysym #x08b4 "botvertsummationconnector")
(cl-define-keysym #x08b5 "toprightsummation")
(cl-define-keysym #x08b6 "botrightsummation")
(cl-define-keysym #x08b7 "rightmiddlesummation")
(cl-define-keysym #x08bc "lessthanequal") ;U+2264 LESS-THAN OR EQUAL TO
(cl-define-keysym #x08bd "notequal") ;U+2260 NOT EQUAL TO
(cl-define-keysym #x08be "greaterthanequal") ;U+2265 GREATER-THAN OR EQUAL TO
(cl-define-keysym #x08bf "integral") ;U+222B INTEGRAL
(cl-define-keysym #x08c0 "therefore") ;U+2234 THEREFORE
(cl-define-keysym #x08c1 "variation") ;U+221D PROPORTIONAL TO
(cl-define-keysym #x08c2 "infinity") ;U+221E INFINITY
(cl-define-keysym #x08c5 "nabla") ;U+2207 NABLA
(cl-define-keysym #x08c8 "approximate") ;U+223C TILDE OPERATOR
(cl-define-keysym #x08c9 "similarequal") ;U+2243 ASYMPTOTICALLY EQUAL TO
(cl-define-keysym #x08cd "ifonlyif") ;U+21D4 LEFT RIGHT DOUBLE ARROW
(cl-define-keysym #x08ce "implies") ;U+21D2 RIGHTWARDS DOUBLE ARROW
(cl-define-keysym #x08cf "identical") ;U+2261 IDENTICAL TO
(cl-define-keysym #x08d6 "radical") ;U+221A SQUARE ROOT
(cl-define-keysym #x08da "includedin") ;U+2282 SUBSET OF
(cl-define-keysym #x08db "includes") ;U+2283 SUPERSET OF
(cl-define-keysym #x08dc "intersection") ;U+2229 INTERSECTION
(cl-define-keysym #x08dd "union") ;U+222A UNION
(cl-define-keysym #x08de "logicaland") ;U+2227 LOGICAL AND
(cl-define-keysym #x08df "logicalor") ;U+2228 LOGICAL OR
(cl-define-keysym #x08ef "partialderivative") ;U+2202 PARTIAL DIFFERENTIAL
(cl-define-keysym #x08f6 "function") ;U+0192 LATIN SMALL LETTER F WITH HOOK
(cl-define-keysym #x08fb "leftarrow") ;U+2190 LEFTWARDS ARROW
(cl-define-keysym #x08fc "uparrow") ;U+2191 UPWARDS ARROW
(cl-define-keysym #x08fd "rightarrow") ;U+2192 RIGHTWARDS ARROW
(cl-define-keysym #x08fe "downarrow") ;U+2193 DOWNWARDS ARROW
(cl-define-keysym #x09df "blank")
(cl-define-keysym #x09e0 "soliddiamond") ;U+25C6 BLACK DIAMOND
(cl-define-keysym #x09e1 "checkerboard") ;U+2592 MEDIUM SHADE
(cl-define-keysym #x09e2 "ht") ;U+2409 SYMBOL FOR HORIZONTAL TABULATION
(cl-define-keysym #x09e3 "ff") ;U+240C SYMBOL FOR FORM FEED
(cl-define-keysym #x09e4 "cr") ;U+240D SYMBOL FOR CARRIAGE RETURN
(cl-define-keysym #x09e5 "lf") ;U+240A SYMBOL FOR LINE FEED
(cl-define-keysym #x09e8 "nl") ;U+2424 SYMBOL FOR NEWLINE
(cl-define-keysym #x09e9 "vt") ;U+240B SYMBOL FOR VERTICAL TABULATION
(cl-define-keysym #x09ea "lowrightcorner") ;U+2518 BOX DRAWINGS LIGHT UP AND LEFT
(cl-define-keysym #x09eb "uprightcorner") ;U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT
(cl-define-keysym #x09ec "upleftcorner") ;U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT
(cl-define-keysym #x09ed "lowleftcorner") ;U+2514 BOX DRAWINGS LIGHT UP AND RIGHT
(cl-define-keysym #x09ee "crossinglines") ;U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
(cl-define-keysym #x09ef "horizlinescan1") ;U+23BA HORIZONTAL SCAN LINE-1
(cl-define-keysym #x09f0 "horizlinescan3") ;U+23BB HORIZONTAL SCAN LINE-3
(cl-define-keysym #x09f1 "horizlinescan5") ;U+2500 BOX DRAWINGS LIGHT HORIZONTAL
(cl-define-keysym #x09f2 "horizlinescan7") ;U+23BC HORIZONTAL SCAN LINE-7
(cl-define-keysym #x09f3 "horizlinescan9") ;U+23BD HORIZONTAL SCAN LINE-9
(cl-define-keysym #x09f4 "leftt") ;U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT
(cl-define-keysym #x09f5 "rightt") ;U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT
(cl-define-keysym #x09f6 "bott") ;U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL
(cl-define-keysym #x09f7 "topt") ;U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
(cl-define-keysym #x09f8 "vertbar") ;U+2502 BOX DRAWINGS LIGHT VERTICAL
(cl-define-keysym #x0aa1 "emspace") ;U+2003 EM SPACE
(cl-define-keysym #x0aa2 "enspace") ;U+2002 EN SPACE
(cl-define-keysym #x0aa3 "em3space") ;U+2004 THREE-PER-EM SPACE
(cl-define-keysym #x0aa4 "em4space") ;U+2005 FOUR-PER-EM SPACE
(cl-define-keysym #x0aa5 "digitspace") ;U+2007 FIGURE SPACE
(cl-define-keysym #x0aa6 "punctspace") ;U+2008 PUNCTUATION SPACE
(cl-define-keysym #x0aa7 "thinspace") ;U+2009 THIN SPACE
(cl-define-keysym #x0aa8 "hairspace") ;U+200A HAIR SPACE
(cl-define-keysym #x0aa9 "emdash") ;U+2014 EM DASH
(cl-define-keysym #x0aaa "endash") ;U+2013 EN DASH
(cl-define-keysym #x0aac "signifblank") ;(U+2423 OPEN BOX)
(cl-define-keysym #x0aae "ellipsis") ;U+2026 HORIZONTAL ELLIPSIS
(cl-define-keysym #x0aaf "doubbaselinedot") ;U+2025 TWO DOT LEADER
(cl-define-keysym #x0ab0 "onethird") ;U+2153 VULGAR FRACTION ONE THIRD
(cl-define-keysym #x0ab1 "twothirds") ;U+2154 VULGAR FRACTION TWO THIRDS
(cl-define-keysym #x0ab2 "onefifth") ;U+2155 VULGAR FRACTION ONE FIFTH
(cl-define-keysym #x0ab3 "twofifths") ;U+2156 VULGAR FRACTION TWO FIFTHS
(cl-define-keysym #x0ab4 "threefifths") ;U+2157 VULGAR FRACTION THREE FIFTHS
(cl-define-keysym #x0ab5 "fourfifths") ;U+2158 VULGAR FRACTION FOUR FIFTHS
(cl-define-keysym #x0ab6 "onesixth") ;U+2159 VULGAR FRACTION ONE SIXTH
(cl-define-keysym #x0ab7 "fivesixths") ;U+215A VULGAR FRACTION FIVE SIXTHS
(cl-define-keysym #x0ab8 "careof") ;U+2105 CARE OF
(cl-define-keysym #x0abb "figdash") ;U+2012 FIGURE DASH
(cl-define-keysym #x0abc "leftanglebracket") ;(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)
(cl-define-keysym #x0abd "decimalpoint") ;(U+002E FULL STOP)
(cl-define-keysym #x0abe "rightanglebracket") ;(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)
(cl-define-keysym #x0abf "marker")
(cl-define-keysym #x0ac3 "oneeighth") ;U+215B VULGAR FRACTION ONE EIGHTH
(cl-define-keysym #x0ac4 "threeeighths") ;U+215C VULGAR FRACTION THREE EIGHTHS
(cl-define-keysym #x0ac5 "fiveeighths") ;U+215D VULGAR FRACTION FIVE EIGHTHS
(cl-define-keysym #x0ac6 "seveneighths") ;U+215E VULGAR FRACTION SEVEN EIGHTHS
(cl-define-keysym #x0ac9 "trademark") ;U+2122 TRADE MARK SIGN
(cl-define-keysym #x0aca "signaturemark") ;(U+2613 SALTIRE)
(cl-define-keysym #x0acb "trademarkincircle")
(cl-define-keysym #x0acc "leftopentriangle") ;(U+25C1 WHITE LEFT-POINTING TRIANGLE)
(cl-define-keysym #x0acd "rightopentriangle") ;(U+25B7 WHITE RIGHT-POINTING TRIANGLE)
(cl-define-keysym #x0ace "emopencircle") ;(U+25CB WHITE CIRCLE)
(cl-define-keysym #x0acf "emopenrectangle") ;(U+25AF WHITE VERTICAL RECTANGLE)
(cl-define-keysym #x0ad0 "leftsinglequotemark") ;U+2018 LEFT SINGLE QUOTATION MARK
(cl-define-keysym #x0ad1 "rightsinglequotemark") ;U+2019 RIGHT SINGLE QUOTATION MARK
(cl-define-keysym #x0ad2 "leftdoublequotemark") ;U+201C LEFT DOUBLE QUOTATION MARK
(cl-define-keysym #x0ad3 "rightdoublequotemark") ;U+201D RIGHT DOUBLE QUOTATION MARK
(cl-define-keysym #x0ad4 "prescription") ;U+211E PRESCRIPTION TAKE
(cl-define-keysym #x0ad6 "minutes") ;U+2032 PRIME
(cl-define-keysym #x0ad7 "seconds") ;U+2033 DOUBLE PRIME
(cl-define-keysym #x0ad9 "latincross") ;U+271D LATIN CROSS
(cl-define-keysym #x0ada "hexagram")
(cl-define-keysym #x0adb "filledrectbullet") ;(U+25AC BLACK RECTANGLE)
(cl-define-keysym #x0adc "filledlefttribullet") ;(U+25C0 BLACK LEFT-POINTING TRIANGLE)
(cl-define-keysym #x0add "filledrighttribullet") ;(U+25B6 BLACK RIGHT-POINTING TRIANGLE)
(cl-define-keysym #x0ade "emfilledcircle") ;(U+25CF BLACK CIRCLE)
(cl-define-keysym #x0adf "emfilledrect") ;(U+25AE BLACK VERTICAL RECTANGLE)
(cl-define-keysym #x0ae0 "enopencircbullet") ;(U+25E6 WHITE BULLET)
(cl-define-keysym #x0ae1 "enopensquarebullet") ;(U+25AB WHITE SMALL SQUARE)
(cl-define-keysym #x0ae2 "openrectbullet") ;(U+25AD WHITE RECTANGLE)
(cl-define-keysym #x0ae3 "opentribulletup") ;(U+25B3 WHITE UP-POINTING TRIANGLE)
(cl-define-keysym #x0ae4 "opentribulletdown") ;(U+25BD WHITE DOWN-POINTING TRIANGLE)
(cl-define-keysym #x0ae5 "openstar") ;(U+2606 WHITE STAR)
(cl-define-keysym #x0ae6 "enfilledcircbullet") ;(U+2022 BULLET)
(cl-define-keysym #x0ae7 "enfilledsqbullet") ;(U+25AA BLACK SMALL SQUARE)
(cl-define-keysym #x0ae8 "filledtribulletup") ;(U+25B2 BLACK UP-POINTING TRIANGLE)
(cl-define-keysym #x0ae9 "filledtribulletdown") ;(U+25BC BLACK DOWN-POINTING TRIANGLE)
(cl-define-keysym #x0aea "leftpointer") ;(U+261C WHITE LEFT POINTING INDEX)
(cl-define-keysym #x0aeb "rightpointer") ;(U+261E WHITE RIGHT POINTING INDEX)
(cl-define-keysym #x0aec "club") ;U+2663 BLACK CLUB SUIT
(cl-define-keysym #x0aed "diamond") ;U+2666 BLACK DIAMOND SUIT
(cl-define-keysym #x0aee "heart") ;U+2665 BLACK HEART SUIT
(cl-define-keysym #x0af0 "maltesecross") ;U+2720 MALTESE CROSS
(cl-define-keysym #x0af1 "dagger") ;U+2020 DAGGER
(cl-define-keysym #x0af2 "doubledagger") ;U+2021 DOUBLE DAGGER
(cl-define-keysym #x0af3 "checkmark") ;U+2713 CHECK MARK
(cl-define-keysym #x0af4 "ballotcross") ;U+2717 BALLOT X
(cl-define-keysym #x0af5 "musicalsharp") ;U+266F MUSIC SHARP SIGN
(cl-define-keysym #x0af6 "musicalflat") ;U+266D MUSIC FLAT SIGN
(cl-define-keysym #x0af7 "malesymbol") ;U+2642 MALE SIGN
(cl-define-keysym #x0af8 "femalesymbol") ;U+2640 FEMALE SIGN
(cl-define-keysym #x0af9 "telephone") ;U+260E BLACK TELEPHONE
(cl-define-keysym #x0afa "telephonerecorder") ;U+2315 TELEPHONE RECORDER
(cl-define-keysym #x0afb "phonographcopyright") ;U+2117 SOUND RECORDING COPYRIGHT
(cl-define-keysym #x0afc "caret") ;U+2038 CARET
(cl-define-keysym #x0afd "singlelowquotemark") ;U+201A SINGLE LOW-9 QUOTATION MARK
(cl-define-keysym #x0afe "doublelowquotemark") ;U+201E DOUBLE LOW-9 QUOTATION MARK
(cl-define-keysym #x0aff "cursor")
(cl-define-keysym #x0ba3 "leftcaret") ;(U+003C LESS-THAN SIGN)
(cl-define-keysym #x0ba6 "rightcaret") ;(U+003E GREATER-THAN SIGN)
(cl-define-keysym #x0ba8 "downcaret") ;(U+2228 LOGICAL OR)
(cl-define-keysym #x0ba9 "upcaret") ;(U+2227 LOGICAL AND)
(cl-define-keysym #x0bc0 "overbar") ;(U+00AF MACRON)
(cl-define-keysym #x0bc2 "downtack") ;U+22A5 UP TACK
(cl-define-keysym #x0bc3 "upshoe") ;(U+2229 INTERSECTION)
(cl-define-keysym #x0bc4 "downstile") ;U+230A LEFT FLOOR
(cl-define-keysym #x0bc6 "underbar") ;(U+005F LOW LINE)
(cl-define-keysym #x0bca "jot") ;U+2218 RING OPERATOR
(cl-define-keysym #x0bcc "quad") ;U+2395 APL FUNCTIONAL SYMBOL QUAD
(cl-define-keysym #x0bce "uptack") ;U+22A4 DOWN TACK
(cl-define-keysym #x0bcf "circle") ;U+25CB WHITE CIRCLE
(cl-define-keysym #x0bd3 "upstile") ;U+2308 LEFT CEILING
(cl-define-keysym #x0bd6 "downshoe") ;(U+222A UNION)
(cl-define-keysym #x0bd8 "rightshoe") ;(U+2283 SUPERSET OF)
(cl-define-keysym #x0bda "leftshoe") ;(U+2282 SUBSET OF)
(cl-define-keysym #x0bdc "lefttack") ;U+22A2 RIGHT TACK
(cl-define-keysym #x0bfc "righttack") ;U+22A3 LEFT TACK
(cl-define-keysym #x0cdf "hebrew_doublelowline") ;U+2017 DOUBLE LOW LINE
(cl-define-keysym #x0ce0 "hebrew_aleph") ;U+05D0 HEBREW LETTER ALEF
(cl-define-keysym #x0ce1 "hebrew_bet") ;U+05D1 HEBREW LETTER BET
(cl-define-keysym #x0ce1 "hebrew_beth") ;deprecated
(cl-define-keysym #x0ce2 "hebrew_gimel") ;U+05D2 HEBREW LETTER GIMEL
(cl-define-keysym #x0ce2 "hebrew_gimmel") ;deprecated
(cl-define-keysym #x0ce3 "hebrew_dalet") ;U+05D3 HEBREW LETTER DALET
(cl-define-keysym #x0ce3 "hebrew_daleth") ;deprecated
(cl-define-keysym #x0ce4 "hebrew_he") ;U+05D4 HEBREW LETTER HE
(cl-define-keysym #x0ce5 "hebrew_waw") ;U+05D5 HEBREW LETTER VAV
(cl-define-keysym #x0ce6 "hebrew_zain") ;U+05D6 HEBREW LETTER ZAYIN
(cl-define-keysym #x0ce6 "hebrew_zayin") ;deprecated
(cl-define-keysym #x0ce7 "hebrew_chet") ;U+05D7 HEBREW LETTER HET
(cl-define-keysym #x0ce7 "hebrew_het") ;deprecated
(cl-define-keysym #x0ce8 "hebrew_tet") ;U+05D8 HEBREW LETTER TET
(cl-define-keysym #x0ce8 "hebrew_teth") ;deprecated
(cl-define-keysym #x0ce9 "hebrew_yod") ;U+05D9 HEBREW LETTER YOD
(cl-define-keysym #x0cea "hebrew_finalkaph") ;U+05DA HEBREW LETTER FINAL KAF
(cl-define-keysym #x0ceb "hebrew_kaph") ;U+05DB HEBREW LETTER KAF
(cl-define-keysym #x0cec "hebrew_lamed") ;U+05DC HEBREW LETTER LAMED
(cl-define-keysym #x0ced "hebrew_finalmem") ;U+05DD HEBREW LETTER FINAL MEM
(cl-define-keysym #x0cee "hebrew_mem") ;U+05DE HEBREW LETTER MEM
(cl-define-keysym #x0cef "hebrew_finalnun") ;U+05DF HEBREW LETTER FINAL NUN
(cl-define-keysym #x0cf0 "hebrew_nun") ;U+05E0 HEBREW LETTER NUN
(cl-define-keysym #x0cf1 "hebrew_samech") ;U+05E1 HEBREW LETTER SAMEKH
(cl-define-keysym #x0cf1 "hebrew_samekh") ;deprecated
(cl-define-keysym #x0cf2 "hebrew_ayin") ;U+05E2 HEBREW LETTER AYIN
(cl-define-keysym #x0cf3 "hebrew_finalpe") ;U+05E3 HEBREW LETTER FINAL PE
(cl-define-keysym #x0cf4 "hebrew_pe") ;U+05E4 HEBREW LETTER PE
(cl-define-keysym #x0cf5 "hebrew_finalzade") ;U+05E5 HEBREW LETTER FINAL TSADI
(cl-define-keysym #x0cf5 "hebrew_finalzadi") ;deprecated
(cl-define-keysym #x0cf6 "hebrew_zade") ;U+05E6 HEBREW LETTER TSADI
(cl-define-keysym #x0cf6 "hebrew_zadi") ;deprecated
(cl-define-keysym #x0cf7 "hebrew_qoph") ;U+05E7 HEBREW LETTER QOF
(cl-define-keysym #x0cf7 "hebrew_kuf") ;deprecated
(cl-define-keysym #x0cf8 "hebrew_resh") ;U+05E8 HEBREW LETTER RESH
(cl-define-keysym #x0cf9 "hebrew_shin") ;U+05E9 HEBREW LETTER SHIN
(cl-define-keysym #x0cfa "hebrew_taw") ;U+05EA HEBREW LETTER TAV
(cl-define-keysym #x0cfa "hebrew_taf") ;deprecated
(cl-define-keysym #xff7e "Hebrew_switch") ;Alias for mode_switch
(cl-define-keysym #x0da1 "Thai_kokai") ;U+0E01 THAI CHARACTER KO KAI
(cl-define-keysym #x0da2 "Thai_khokhai") ;U+0E02 THAI CHARACTER KHO KHAI
(cl-define-keysym #x0da3 "Thai_khokhuat") ;U+0E03 THAI CHARACTER KHO KHUAT
(cl-define-keysym #x0da4 "Thai_khokhwai") ;U+0E04 THAI CHARACTER KHO KHWAI
(cl-define-keysym #x0da5 "Thai_khokhon") ;U+0E05 THAI CHARACTER KHO KHON
(cl-define-keysym #x0da6 "Thai_khorakhang") ;U+0E06 THAI CHARACTER KHO RAKHANG
(cl-define-keysym #x0da7 "Thai_ngongu") ;U+0E07 THAI CHARACTER NGO NGU
(cl-define-keysym #x0da8 "Thai_chochan") ;U+0E08 THAI CHARACTER CHO CHAN
(cl-define-keysym #x0da9 "Thai_choching") ;U+0E09 THAI CHARACTER CHO CHING
(cl-define-keysym #x0daa "Thai_chochang") ;U+0E0A THAI CHARACTER CHO CHANG
(cl-define-keysym #x0dab "Thai_soso") ;U+0E0B THAI CHARACTER SO SO
(cl-define-keysym #x0dac "Thai_chochoe") ;U+0E0C THAI CHARACTER CHO CHOE
(cl-define-keysym #x0dad "Thai_yoying") ;U+0E0D THAI CHARACTER YO YING
(cl-define-keysym #x0dae "Thai_dochada") ;U+0E0E THAI CHARACTER DO CHADA
(cl-define-keysym #x0daf "Thai_topatak") ;U+0E0F THAI CHARACTER TO PATAK
(cl-define-keysym #x0db0 "Thai_thothan") ;U+0E10 THAI CHARACTER THO THAN
(cl-define-keysym #x0db1 "Thai_thonangmontho") ;U+0E11 THAI CHARACTER THO NANGMONTHO
(cl-define-keysym #x0db2 "Thai_thophuthao") ;U+0E12 THAI CHARACTER THO PHUTHAO
(cl-define-keysym #x0db3 "Thai_nonen") ;U+0E13 THAI CHARACTER NO NEN
(cl-define-keysym #x0db4 "Thai_dodek") ;U+0E14 THAI CHARACTER DO DEK
(cl-define-keysym #x0db5 "Thai_totao") ;U+0E15 THAI CHARACTER TO TAO
(cl-define-keysym #x0db6 "Thai_thothung") ;U+0E16 THAI CHARACTER THO THUNG
(cl-define-keysym #x0db7 "Thai_thothahan") ;U+0E17 THAI CHARACTER THO THAHAN
(cl-define-keysym #x0db8 "Thai_thothong") ;U+0E18 THAI CHARACTER THO THONG
(cl-define-keysym #x0db9 "Thai_nonu") ;U+0E19 THAI CHARACTER NO NU
(cl-define-keysym #x0dba "Thai_bobaimai") ;U+0E1A THAI CHARACTER BO BAIMAI
(cl-define-keysym #x0dbb "Thai_popla") ;U+0E1B THAI CHARACTER PO PLA
(cl-define-keysym #x0dbc "Thai_phophung") ;U+0E1C THAI CHARACTER PHO PHUNG
(cl-define-keysym #x0dbd "Thai_fofa") ;U+0E1D THAI CHARACTER FO FA
(cl-define-keysym #x0dbe "Thai_phophan") ;U+0E1E THAI CHARACTER PHO PHAN
(cl-define-keysym #x0dbf "Thai_fofan") ;U+0E1F THAI CHARACTER FO FAN
(cl-define-keysym #x0dc0 "Thai_phosamphao") ;U+0E20 THAI CHARACTER PHO SAMPHAO
(cl-define-keysym #x0dc1 "Thai_moma") ;U+0E21 THAI CHARACTER MO MA
(cl-define-keysym #x0dc2 "Thai_yoyak") ;U+0E22 THAI CHARACTER YO YAK
(cl-define-keysym #x0dc3 "Thai_rorua") ;U+0E23 THAI CHARACTER RO RUA
(cl-define-keysym #x0dc4 "Thai_ru") ;U+0E24 THAI CHARACTER RU
(cl-define-keysym #x0dc5 "Thai_loling") ;U+0E25 THAI CHARACTER LO LING
(cl-define-keysym #x0dc6 "Thai_lu") ;U+0E26 THAI CHARACTER LU
(cl-define-keysym #x0dc7 "Thai_wowaen") ;U+0E27 THAI CHARACTER WO WAEN
(cl-define-keysym #x0dc8 "Thai_sosala") ;U+0E28 THAI CHARACTER SO SALA
(cl-define-keysym #x0dc9 "Thai_sorusi") ;U+0E29 THAI CHARACTER SO RUSI
(cl-define-keysym #x0dca "Thai_sosua") ;U+0E2A THAI CHARACTER SO SUA
(cl-define-keysym #x0dcb "Thai_hohip") ;U+0E2B THAI CHARACTER HO HIP
(cl-define-keysym #x0dcc "Thai_lochula") ;U+0E2C THAI CHARACTER LO CHULA
(cl-define-keysym #x0dcd "Thai_oang") ;U+0E2D THAI CHARACTER O ANG
(cl-define-keysym #x0dce "Thai_honokhuk") ;U+0E2E THAI CHARACTER HO NOKHUK
(cl-define-keysym #x0dcf "Thai_paiyannoi") ;U+0E2F THAI CHARACTER PAIYANNOI
(cl-define-keysym #x0dd0 "Thai_saraa") ;U+0E30 THAI CHARACTER SARA A
(cl-define-keysym #x0dd1 "Thai_maihanakat") ;U+0E31 THAI CHARACTER MAI HAN-AKAT
(cl-define-keysym #x0dd2 "Thai_saraaa") ;U+0E32 THAI CHARACTER SARA AA
(cl-define-keysym #x0dd3 "Thai_saraam") ;U+0E33 THAI CHARACTER SARA AM
(cl-define-keysym #x0dd4 "Thai_sarai") ;U+0E34 THAI CHARACTER SARA I
(cl-define-keysym #x0dd5 "Thai_saraii") ;U+0E35 THAI CHARACTER SARA II
(cl-define-keysym #x0dd6 "Thai_saraue") ;U+0E36 THAI CHARACTER SARA UE
(cl-define-keysym #x0dd7 "Thai_sarauee") ;U+0E37 THAI CHARACTER SARA UEE
(cl-define-keysym #x0dd8 "Thai_sarau") ;U+0E38 THAI CHARACTER SARA U
(cl-define-keysym #x0dd9 "Thai_sarauu") ;U+0E39 THAI CHARACTER SARA UU
(cl-define-keysym #x0dda "Thai_phinthu") ;U+0E3A THAI CHARACTER PHINTHU
(cl-define-keysym #x0dde "Thai_maihanakat_maitho")
(cl-define-keysym #x0ddf "Thai_baht") ;U+0E3F THAI CURRENCY SYMBOL BAHT
(cl-define-keysym #x0de0 "Thai_sarae") ;U+0E40 THAI CHARACTER SARA E
(cl-define-keysym #x0de1 "Thai_saraae") ;U+0E41 THAI CHARACTER SARA AE
(cl-define-keysym #x0de2 "Thai_sarao") ;U+0E42 THAI CHARACTER SARA O
(cl-define-keysym #x0de3 "Thai_saraaimaimuan") ;U+0E43 THAI CHARACTER SARA AI MAIMUAN
(cl-define-keysym #x0de4 "Thai_saraaimaimalai") ;U+0E44 THAI CHARACTER SARA AI MAIMALAI
(cl-define-keysym #x0de5 "Thai_lakkhangyao") ;U+0E45 THAI CHARACTER LAKKHANGYAO
(cl-define-keysym #x0de6 "Thai_maiyamok") ;U+0E46 THAI CHARACTER MAIYAMOK
(cl-define-keysym #x0de7 "Thai_maitaikhu") ;U+0E47 THAI CHARACTER MAITAIKHU
(cl-define-keysym #x0de8 "Thai_maiek") ;U+0E48 THAI CHARACTER MAI EK
(cl-define-keysym #x0de9 "Thai_maitho") ;U+0E49 THAI CHARACTER MAI THO
(cl-define-keysym #x0dea "Thai_maitri") ;U+0E4A THAI CHARACTER MAI TRI
(cl-define-keysym #x0deb "Thai_maichattawa") ;U+0E4B THAI CHARACTER MAI CHATTAWA
(cl-define-keysym #x0dec "Thai_thanthakhat") ;U+0E4C THAI CHARACTER THANTHAKHAT
(cl-define-keysym #x0ded "Thai_nikhahit") ;U+0E4D THAI CHARACTER NIKHAHIT
(cl-define-keysym #x0df0 "Thai_leksun") ;U+0E50 THAI DIGIT ZERO
(cl-define-keysym #x0df1 "Thai_leknung") ;U+0E51 THAI DIGIT ONE
(cl-define-keysym #x0df2 "Thai_leksong") ;U+0E52 THAI DIGIT TWO
(cl-define-keysym #x0df3 "Thai_leksam") ;U+0E53 THAI DIGIT THREE
(cl-define-keysym #x0df4 "Thai_leksi") ;U+0E54 THAI DIGIT FOUR
(cl-define-keysym #x0df5 "Thai_lekha") ;U+0E55 THAI DIGIT FIVE
(cl-define-keysym #x0df6 "Thai_lekhok") ;U+0E56 THAI DIGIT SIX
(cl-define-keysym #x0df7 "Thai_lekchet") ;U+0E57 THAI DIGIT SEVEN
(cl-define-keysym #x0df8 "Thai_lekpaet") ;U+0E58 THAI DIGIT EIGHT
(cl-define-keysym #x0df9 "Thai_lekkao") ;U+0E59 THAI DIGIT NINE
(cl-define-keysym #xff31 "Hangul") ;Hangul start/stop(toggle)
(cl-define-keysym #xff32 "Hangul_Start") ;Hangul start
(cl-define-keysym #xff33 "Hangul_End") ;Hangul end, English start
(cl-define-keysym #xff34 "Hangul_Hanja") ;Start Hangul->Hanja Conversion
(cl-define-keysym #xff35 "Hangul_Jamo") ;Hangul Jamo mode
(cl-define-keysym #xff36 "Hangul_Romaja") ;Hangul Romaja mode
(cl-define-keysym #xff37 "Hangul_Codeinput") ;Hangul code input mode
(cl-define-keysym #xff38 "Hangul_Jeonja") ;Jeonja mode
(cl-define-keysym #xff39 "Hangul_Banja") ;Banja mode
(cl-define-keysym #xff3a "Hangul_PreHanja") ;Pre Hanja conversion
(cl-define-keysym #xff3b "Hangul_PostHanja") ;Post Hanja conversion
(cl-define-keysym #xff3c "Hangul_SingleCandidate") ;Single candidate
(cl-define-keysym #xff3d "Hangul_MultipleCandidate") ;Multiple candidate
(cl-define-keysym #xff3e "Hangul_PreviousCandidate") ;Previous candidate
(cl-define-keysym #xff3f "Hangul_Special") ;Special symbols
(cl-define-keysym #xff7e "Hangul_switch") ;Alias for mode_switch
(cl-define-keysym #x0ea1 "Hangul_Kiyeog")
(cl-define-keysym #x0ea2 "Hangul_SsangKiyeog")
(cl-define-keysym #x0ea3 "Hangul_KiyeogSios")
(cl-define-keysym #x0ea4 "Hangul_Nieun")
(cl-define-keysym #x0ea5 "Hangul_NieunJieuj")
(cl-define-keysym #x0ea6 "Hangul_NieunHieuh")
(cl-define-keysym #x0ea7 "Hangul_Dikeud")
(cl-define-keysym #x0ea8 "Hangul_SsangDikeud")
(cl-define-keysym #x0ea9 "Hangul_Rieul")
(cl-define-keysym #x0eaa "Hangul_RieulKiyeog")
(cl-define-keysym #x0eab "Hangul_RieulMieum")
(cl-define-keysym #x0eac "Hangul_RieulPieub")
(cl-define-keysym #x0ead "Hangul_RieulSios")
(cl-define-keysym #x0eae "Hangul_RieulTieut")
(cl-define-keysym #x0eaf "Hangul_RieulPhieuf")
(cl-define-keysym #x0eb0 "Hangul_RieulHieuh")
(cl-define-keysym #x0eb1 "Hangul_Mieum")
(cl-define-keysym #x0eb2 "Hangul_Pieub")
(cl-define-keysym #x0eb3 "Hangul_SsangPieub")
(cl-define-keysym #x0eb4 "Hangul_PieubSios")
(cl-define-keysym #x0eb5 "Hangul_Sios")
(cl-define-keysym #x0eb6 "Hangul_SsangSios")
(cl-define-keysym #x0eb7 "Hangul_Ieung")
(cl-define-keysym #x0eb8 "Hangul_Jieuj")
(cl-define-keysym #x0eb9 "Hangul_SsangJieuj")
(cl-define-keysym #x0eba "Hangul_Cieuc")
(cl-define-keysym #x0ebb "Hangul_Khieuq")
(cl-define-keysym #x0ebc "Hangul_Tieut")
(cl-define-keysym #x0ebd "Hangul_Phieuf")
(cl-define-keysym #x0ebe "Hangul_Hieuh")
(cl-define-keysym #x0ebf "Hangul_A")
(cl-define-keysym #x0ec0 "Hangul_AE")
(cl-define-keysym #x0ec1 "Hangul_YA")
(cl-define-keysym #x0ec2 "Hangul_YAE")
(cl-define-keysym #x0ec3 "Hangul_EO")
(cl-define-keysym #x0ec4 "Hangul_E")
(cl-define-keysym #x0ec5 "Hangul_YEO")
(cl-define-keysym #x0ec6 "Hangul_YE")
(cl-define-keysym #x0ec7 "Hangul_O")
(cl-define-keysym #x0ec8 "Hangul_WA")
(cl-define-keysym #x0ec9 "Hangul_WAE")
(cl-define-keysym #x0eca "Hangul_OE")
(cl-define-keysym #x0ecb "Hangul_YO")
(cl-define-keysym #x0ecc "Hangul_U")
(cl-define-keysym #x0ecd "Hangul_WEO")
(cl-define-keysym #x0ece "Hangul_WE")
(cl-define-keysym #x0ecf "Hangul_WI")
(cl-define-keysym #x0ed0 "Hangul_YU")
(cl-define-keysym #x0ed1 "Hangul_EU")
(cl-define-keysym #x0ed2 "Hangul_YI")
(cl-define-keysym #x0ed3 "Hangul_I")
(cl-define-keysym #x0ed4 "Hangul_J_Kiyeog")
(cl-define-keysym #x0ed5 "Hangul_J_SsangKiyeog")
(cl-define-keysym #x0ed6 "Hangul_J_KiyeogSios")
(cl-define-keysym #x0ed7 "Hangul_J_Nieun")
(cl-define-keysym #x0ed8 "Hangul_J_NieunJieuj")
(cl-define-keysym #x0ed9 "Hangul_J_NieunHieuh")
(cl-define-keysym #x0eda "Hangul_J_Dikeud")
(cl-define-keysym #x0edb "Hangul_J_Rieul")
(cl-define-keysym #x0edc "Hangul_J_RieulKiyeog")
(cl-define-keysym #x0edd "Hangul_J_RieulMieum")
(cl-define-keysym #x0ede "Hangul_J_RieulPieub")
(cl-define-keysym #x0edf "Hangul_J_RieulSios")
(cl-define-keysym #x0ee0 "Hangul_J_RieulTieut")
(cl-define-keysym #x0ee1 "Hangul_J_RieulPhieuf")
(cl-define-keysym #x0ee2 "Hangul_J_RieulHieuh")
(cl-define-keysym #x0ee3 "Hangul_J_Mieum")
(cl-define-keysym #x0ee4 "Hangul_J_Pieub")
(cl-define-keysym #x0ee5 "Hangul_J_PieubSios")
(cl-define-keysym #x0ee6 "Hangul_J_Sios")
(cl-define-keysym #x0ee7 "Hangul_J_SsangSios")
(cl-define-keysym #x0ee8 "Hangul_J_Ieung")
(cl-define-keysym #x0ee9 "Hangul_J_Jieuj")
(cl-define-keysym #x0eea "Hangul_J_Cieuc")
(cl-define-keysym #x0eeb "Hangul_J_Khieuq")
(cl-define-keysym #x0eec "Hangul_J_Tieut")
(cl-define-keysym #x0eed "Hangul_J_Phieuf")
(cl-define-keysym #x0eee "Hangul_J_Hieuh")
(cl-define-keysym #x0eef "Hangul_RieulYeorinHieuh")
(cl-define-keysym #x0ef0 "Hangul_SunkyeongeumMieum")
(cl-define-keysym #x0ef1 "Hangul_SunkyeongeumPieub")
(cl-define-keysym #x0ef2 "Hangul_PanSios")
(cl-define-keysym #x0ef3 "Hangul_KkogjiDalrinIeung")
(cl-define-keysym #x0ef4 "Hangul_SunkyeongeumPhieuf")
(cl-define-keysym #x0ef5 "Hangul_YeorinHieuh")
(cl-define-keysym #x0ef6 "Hangul_AraeA")
(cl-define-keysym #x0ef7 "Hangul_AraeAE")
(cl-define-keysym #x0ef8 "Hangul_J_PanSios")
(cl-define-keysym #x0ef9 "Hangul_J_KkogjiDalrinIeung")
(cl-define-keysym #x0efa "Hangul_J_YeorinHieuh")
(cl-define-keysym #x0eff "Korean_Won") ;(U+20A9 WON SIGN)
(cl-define-keysym #x1000587 "Armenian_ligature_ew") ;U+0587 ARMENIAN SMALL LIGATURE ECH YIWN
(cl-define-keysym #x1000589 "Armenian_full_stop") ;U+0589 ARMENIAN FULL STOP
(cl-define-keysym #x1000589 "Armenian_verjaket") ;U+0589 ARMENIAN FULL STOP
(cl-define-keysym #x100055d "Armenian_separation_mark") ;U+055D ARMENIAN COMMA
(cl-define-keysym #x100055d "Armenian_but") ;U+055D ARMENIAN COMMA
(cl-define-keysym #x100058a "Armenian_hyphen") ;U+058A ARMENIAN HYPHEN
(cl-define-keysym #x100058a "Armenian_yentamna") ;U+058A ARMENIAN HYPHEN
(cl-define-keysym #x100055c "Armenian_exclam") ;U+055C ARMENIAN EXCLAMATION MARK
(cl-define-keysym #x100055c "Armenian_amanak") ;U+055C ARMENIAN EXCLAMATION MARK
(cl-define-keysym #x100055b "Armenian_accent") ;U+055B ARMENIAN EMPHASIS MARK
(cl-define-keysym #x100055b "Armenian_shesht") ;U+055B ARMENIAN EMPHASIS MARK
(cl-define-keysym #x100055e "Armenian_question") ;U+055E ARMENIAN QUESTION MARK
(cl-define-keysym #x100055e "Armenian_paruyk") ;U+055E ARMENIAN QUESTION MARK
(cl-define-keysym #x1000531 "Armenian_AYB") ;U+0531 ARMENIAN CAPITAL LETTER AYB
(cl-define-keysym #x1000561 "Armenian_ayb") ;U+0561 ARMENIAN SMALL LETTER AYB
(cl-define-keysym #x1000532 "Armenian_BEN") ;U+0532 ARMENIAN CAPITAL LETTER BEN
(cl-define-keysym #x1000562 "Armenian_ben") ;U+0562 ARMENIAN SMALL LETTER BEN
(cl-define-keysym #x1000533 "Armenian_GIM") ;U+0533 ARMENIAN CAPITAL LETTER GIM
(cl-define-keysym #x1000563 "Armenian_gim") ;U+0563 ARMENIAN SMALL LETTER GIM
(cl-define-keysym #x1000534 "Armenian_DA") ;U+0534 ARMENIAN CAPITAL LETTER DA
(cl-define-keysym #x1000564 "Armenian_da") ;U+0564 ARMENIAN SMALL LETTER DA
(cl-define-keysym #x1000535 "Armenian_YECH") ;U+0535 ARMENIAN CAPITAL LETTER ECH
(cl-define-keysym #x1000565 "Armenian_yech") ;U+0565 ARMENIAN SMALL LETTER ECH
(cl-define-keysym #x1000536 "Armenian_ZA") ;U+0536 ARMENIAN CAPITAL LETTER ZA
(cl-define-keysym #x1000566 "Armenian_za") ;U+0566 ARMENIAN SMALL LETTER ZA
(cl-define-keysym #x1000537 "Armenian_E") ;U+0537 ARMENIAN CAPITAL LETTER EH
(cl-define-keysym #x1000567 "Armenian_e") ;U+0567 ARMENIAN SMALL LETTER EH
(cl-define-keysym #x1000538 "Armenian_AT") ;U+0538 ARMENIAN CAPITAL LETTER ET
(cl-define-keysym #x1000568 "Armenian_at") ;U+0568 ARMENIAN SMALL LETTER ET
(cl-define-keysym #x1000539 "Armenian_TO") ;U+0539 ARMENIAN CAPITAL LETTER TO
(cl-define-keysym #x1000569 "Armenian_to") ;U+0569 ARMENIAN SMALL LETTER TO
(cl-define-keysym #x100053a "Armenian_ZHE") ;U+053A ARMENIAN CAPITAL LETTER ZHE
(cl-define-keysym #x100056a "Armenian_zhe") ;U+056A ARMENIAN SMALL LETTER ZHE
(cl-define-keysym #x100053b "Armenian_INI") ;U+053B ARMENIAN CAPITAL LETTER INI
(cl-define-keysym #x100056b "Armenian_ini") ;U+056B ARMENIAN SMALL LETTER INI
(cl-define-keysym #x100053c "Armenian_LYUN") ;U+053C ARMENIAN CAPITAL LETTER LIWN
(cl-define-keysym #x100056c "Armenian_lyun") ;U+056C ARMENIAN SMALL LETTER LIWN
(cl-define-keysym #x100053d "Armenian_KHE") ;U+053D ARMENIAN CAPITAL LETTER XEH
(cl-define-keysym #x100056d "Armenian_khe") ;U+056D ARMENIAN SMALL LETTER XEH
(cl-define-keysym #x100053e "Armenian_TSA") ;U+053E ARMENIAN CAPITAL LETTER CA
(cl-define-keysym #x100056e "Armenian_tsa") ;U+056E ARMENIAN SMALL LETTER CA
(cl-define-keysym #x100053f "Armenian_KEN") ;U+053F ARMENIAN CAPITAL LETTER KEN
(cl-define-keysym #x100056f "Armenian_ken") ;U+056F ARMENIAN SMALL LETTER KEN
(cl-define-keysym #x1000540 "Armenian_HO") ;U+0540 ARMENIAN CAPITAL LETTER HO
(cl-define-keysym #x1000570 "Armenian_ho") ;U+0570 ARMENIAN SMALL LETTER HO
(cl-define-keysym #x1000541 "Armenian_DZA") ;U+0541 ARMENIAN CAPITAL LETTER JA
(cl-define-keysym #x1000571 "Armenian_dza") ;U+0571 ARMENIAN SMALL LETTER JA
(cl-define-keysym #x1000542 "Armenian_GHAT") ;U+0542 ARMENIAN CAPITAL LETTER GHAD
(cl-define-keysym #x1000572 "Armenian_ghat") ;U+0572 ARMENIAN SMALL LETTER GHAD
(cl-define-keysym #x1000543 "Armenian_TCHE") ;U+0543 ARMENIAN CAPITAL LETTER CHEH
(cl-define-keysym #x1000573 "Armenian_tche") ;U+0573 ARMENIAN SMALL LETTER CHEH
(cl-define-keysym #x1000544 "Armenian_MEN") ;U+0544 ARMENIAN CAPITAL LETTER MEN
(cl-define-keysym #x1000574 "Armenian_men") ;U+0574 ARMENIAN SMALL LETTER MEN
(cl-define-keysym #x1000545 "Armenian_HI") ;U+0545 ARMENIAN CAPITAL LETTER YI
(cl-define-keysym #x1000575 "Armenian_hi") ;U+0575 ARMENIAN SMALL LETTER YI
(cl-define-keysym #x1000546 "Armenian_NU") ;U+0546 ARMENIAN CAPITAL LETTER NOW
(cl-define-keysym #x1000576 "Armenian_nu") ;U+0576 ARMENIAN SMALL LETTER NOW
(cl-define-keysym #x1000547 "Armenian_SHA") ;U+0547 ARMENIAN CAPITAL LETTER SHA
(cl-define-keysym #x1000577 "Armenian_sha") ;U+0577 ARMENIAN SMALL LETTER SHA
(cl-define-keysym #x1000548 "Armenian_VO") ;U+0548 ARMENIAN CAPITAL LETTER VO
(cl-define-keysym #x1000578 "Armenian_vo") ;U+0578 ARMENIAN SMALL LETTER VO
(cl-define-keysym #x1000549 "Armenian_CHA") ;U+0549 ARMENIAN CAPITAL LETTER CHA
(cl-define-keysym #x1000579 "Armenian_cha") ;U+0579 ARMENIAN SMALL LETTER CHA
(cl-define-keysym #x100054a "Armenian_PE") ;U+054A ARMENIAN CAPITAL LETTER PEH
(cl-define-keysym #x100057a "Armenian_pe") ;U+057A ARMENIAN SMALL LETTER PEH
(cl-define-keysym #x100054b "Armenian_JE") ;U+054B ARMENIAN CAPITAL LETTER JHEH
(cl-define-keysym #x100057b "Armenian_je") ;U+057B ARMENIAN SMALL LETTER JHEH
(cl-define-keysym #x100054c "Armenian_RA") ;U+054C ARMENIAN CAPITAL LETTER RA
(cl-define-keysym #x100057c "Armenian_ra") ;U+057C ARMENIAN SMALL LETTER RA
(cl-define-keysym #x100054d "Armenian_SE") ;U+054D ARMENIAN CAPITAL LETTER SEH
(cl-define-keysym #x100057d "Armenian_se") ;U+057D ARMENIAN SMALL LETTER SEH
(cl-define-keysym #x100054e "Armenian_VEV") ;U+054E ARMENIAN CAPITAL LETTER VEW
(cl-define-keysym #x100057e "Armenian_vev") ;U+057E ARMENIAN SMALL LETTER VEW
(cl-define-keysym #x100054f "Armenian_TYUN") ;U+054F ARMENIAN CAPITAL LETTER TIWN
(cl-define-keysym #x100057f "Armenian_tyun") ;U+057F ARMENIAN SMALL LETTER TIWN
(cl-define-keysym #x1000550 "Armenian_RE") ;U+0550 ARMENIAN CAPITAL LETTER REH
(cl-define-keysym #x1000580 "Armenian_re") ;U+0580 ARMENIAN SMALL LETTER REH
(cl-define-keysym #x1000551 "Armenian_TSO") ;U+0551 ARMENIAN CAPITAL LETTER CO
(cl-define-keysym #x1000581 "Armenian_tso") ;U+0581 ARMENIAN SMALL LETTER CO
(cl-define-keysym #x1000552 "Armenian_VYUN") ;U+0552 ARMENIAN CAPITAL LETTER YIWN
(cl-define-keysym #x1000582 "Armenian_vyun") ;U+0582 ARMENIAN SMALL LETTER YIWN
(cl-define-keysym #x1000553 "Armenian_PYUR") ;U+0553 ARMENIAN CAPITAL LETTER PIWR
(cl-define-keysym #x1000583 "Armenian_pyur") ;U+0583 ARMENIAN SMALL LETTER PIWR
(cl-define-keysym #x1000554 "Armenian_KE") ;U+0554 ARMENIAN CAPITAL LETTER KEH
(cl-define-keysym #x1000584 "Armenian_ke") ;U+0584 ARMENIAN SMALL LETTER KEH
(cl-define-keysym #x1000555 "Armenian_O") ;U+0555 ARMENIAN CAPITAL LETTER OH
(cl-define-keysym #x1000585 "Armenian_o") ;U+0585 ARMENIAN SMALL LETTER OH
(cl-define-keysym #x1000556 "Armenian_FE") ;U+0556 ARMENIAN CAPITAL LETTER FEH
(cl-define-keysym #x1000586 "Armenian_fe") ;U+0586 ARMENIAN SMALL LETTER FEH
(cl-define-keysym #x100055a "Armenian_apostrophe") ;U+055A ARMENIAN APOSTROPHE
(cl-define-keysym #x10010d0 "Georgian_an") ;U+10D0 GEORGIAN LETTER AN
(cl-define-keysym #x10010d1 "Georgian_ban") ;U+10D1 GEORGIAN LETTER BAN
(cl-define-keysym #x10010d2 "Georgian_gan") ;U+10D2 GEORGIAN LETTER GAN
(cl-define-keysym #x10010d3 "Georgian_don") ;U+10D3 GEORGIAN LETTER DON
(cl-define-keysym #x10010d4 "Georgian_en") ;U+10D4 GEORGIAN LETTER EN
(cl-define-keysym #x10010d5 "Georgian_vin") ;U+10D5 GEORGIAN LETTER VIN
(cl-define-keysym #x10010d6 "Georgian_zen") ;U+10D6 GEORGIAN LETTER ZEN
(cl-define-keysym #x10010d7 "Georgian_tan") ;U+10D7 GEORGIAN LETTER TAN
(cl-define-keysym #x10010d8 "Georgian_in") ;U+10D8 GEORGIAN LETTER IN
(cl-define-keysym #x10010d9 "Georgian_kan") ;U+10D9 GEORGIAN LETTER KAN
(cl-define-keysym #x10010da "Georgian_las") ;U+10DA GEORGIAN LETTER LAS
(cl-define-keysym #x10010db "Georgian_man") ;U+10DB GEORGIAN LETTER MAN
(cl-define-keysym #x10010dc "Georgian_nar") ;U+10DC GEORGIAN LETTER NAR
(cl-define-keysym #x10010dd "Georgian_on") ;U+10DD GEORGIAN LETTER ON
(cl-define-keysym #x10010de "Georgian_par") ;U+10DE GEORGIAN LETTER PAR
(cl-define-keysym #x10010df "Georgian_zhar") ;U+10DF GEORGIAN LETTER ZHAR
(cl-define-keysym #x10010e0 "Georgian_rae") ;U+10E0 GEORGIAN LETTER RAE
(cl-define-keysym #x10010e1 "Georgian_san") ;U+10E1 GEORGIAN LETTER SAN
(cl-define-keysym #x10010e2 "Georgian_tar") ;U+10E2 GEORGIAN LETTER TAR
(cl-define-keysym #x10010e3 "Georgian_un") ;U+10E3 GEORGIAN LETTER UN
(cl-define-keysym #x10010e4 "Georgian_phar") ;U+10E4 GEORGIAN LETTER PHAR
(cl-define-keysym #x10010e5 "Georgian_khar") ;U+10E5 GEORGIAN LETTER KHAR
(cl-define-keysym #x10010e6 "Georgian_ghan") ;U+10E6 GEORGIAN LETTER GHAN
(cl-define-keysym #x10010e7 "Georgian_qar") ;U+10E7 GEORGIAN LETTER QAR
(cl-define-keysym #x10010e8 "Georgian_shin") ;U+10E8 GEORGIAN LETTER SHIN
(cl-define-keysym #x10010e9 "Georgian_chin") ;U+10E9 GEORGIAN LETTER CHIN
(cl-define-keysym #x10010ea "Georgian_can") ;U+10EA GEORGIAN LETTER CAN
(cl-define-keysym #x10010eb "Georgian_jil") ;U+10EB GEORGIAN LETTER JIL
(cl-define-keysym #x10010ec "Georgian_cil") ;U+10EC GEORGIAN LETTER CIL
(cl-define-keysym #x10010ed "Georgian_char") ;U+10ED GEORGIAN LETTER CHAR
(cl-define-keysym #x10010ee "Georgian_xan") ;U+10EE GEORGIAN LETTER XAN
(cl-define-keysym #x10010ef "Georgian_jhan") ;U+10EF GEORGIAN LETTER JHAN
(cl-define-keysym #x10010f0 "Georgian_hae") ;U+10F0 GEORGIAN LETTER HAE
(cl-define-keysym #x10010f1 "Georgian_he") ;U+10F1 GEORGIAN LETTER HE
(cl-define-keysym #x10010f2 "Georgian_hie") ;U+10F2 GEORGIAN LETTER HIE
(cl-define-keysym #x10010f3 "Georgian_we") ;U+10F3 GEORGIAN LETTER WE
(cl-define-keysym #x10010f4 "Georgian_har") ;U+10F4 GEORGIAN LETTER HAR
(cl-define-keysym #x10010f5 "Georgian_hoe") ;U+10F5 GEORGIAN LETTER HOE
(cl-define-keysym #x10010f6 "Georgian_fi") ;U+10F6 GEORGIAN LETTER FI
(cl-define-keysym #x1001e8a "Xabovedot") ;U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE
(cl-define-keysym #x100012c "Ibreve") ;U+012C LATIN CAPITAL LETTER I WITH BREVE
(cl-define-keysym #x10001b5 "Zstroke") ;U+01B5 LATIN CAPITAL LETTER Z WITH STROKE
(cl-define-keysym #x10001e6 "Gcaron") ;U+01E6 LATIN CAPITAL LETTER G WITH CARON
(cl-define-keysym #x10001d1 "Ocaron") ;U+01D2 LATIN CAPITAL LETTER O WITH CARON
(cl-define-keysym #x100019f "Obarred") ;U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE
(cl-define-keysym #x1001e8b "xabovedot") ;U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE
(cl-define-keysym #x100012d "ibreve") ;U+012D LATIN SMALL LETTER I WITH BREVE
(cl-define-keysym #x10001b6 "zstroke") ;U+01B6 LATIN SMALL LETTER Z WITH STROKE
(cl-define-keysym #x10001e7 "gcaron") ;U+01E7 LATIN SMALL LETTER G WITH CARON
(cl-define-keysym #x10001d2 "ocaron") ;U+01D2 LATIN SMALL LETTER O WITH CARON
(cl-define-keysym #x1000275 "obarred") ;U+0275 LATIN SMALL LETTER BARRED O
(cl-define-keysym #x100018f "SCHWA") ;U+018F LATIN CAPITAL LETTER SCHWA
(cl-define-keysym #x1000259 "schwa") ;U+0259 LATIN SMALL LETTER SCHWA
(cl-define-keysym #x1001e36 "Lbelowdot") ;U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW
(cl-define-keysym #x1001e37 "lbelowdot") ;U+1E37 LATIN SMALL LETTER L WITH DOT BELOW
(cl-define-keysym #x1001ea0 "Abelowdot") ;U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW
(cl-define-keysym #x1001ea1 "abelowdot") ;U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW
(cl-define-keysym #x1001ea2 "Ahook") ;U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE
(cl-define-keysym #x1001ea3 "ahook") ;U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE
(cl-define-keysym #x1001ea4 "Acircumflexacute") ;U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
(cl-define-keysym #x1001ea5 "acircumflexacute") ;U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE
(cl-define-keysym #x1001ea6 "Acircumflexgrave") ;U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
(cl-define-keysym #x1001ea7 "acircumflexgrave") ;U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE
(cl-define-keysym #x1001ea8 "Acircumflexhook") ;U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
(cl-define-keysym #x1001ea9 "acircumflexhook") ;U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
(cl-define-keysym #x1001eaa "Acircumflextilde") ;U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
(cl-define-keysym #x1001eab "acircumflextilde") ;U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE
(cl-define-keysym #x1001eac "Acircumflexbelowdot") ;U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
(cl-define-keysym #x1001ead "acircumflexbelowdot") ;U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW
(cl-define-keysym #x1001eae "Abreveacute") ;U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
(cl-define-keysym #x1001eaf "abreveacute") ;U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE
(cl-define-keysym #x1001eb0 "Abrevegrave") ;U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
(cl-define-keysym #x1001eb1 "abrevegrave") ;U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE
(cl-define-keysym #x1001eb2 "Abrevehook") ;U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
(cl-define-keysym #x1001eb3 "abrevehook") ;U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE
(cl-define-keysym #x1001eb4 "Abrevetilde") ;U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE
(cl-define-keysym #x1001eb5 "abrevetilde") ;U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE
(cl-define-keysym #x1001eb6 "Abrevebelowdot") ;U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
(cl-define-keysym #x1001eb7 "abrevebelowdot") ;U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW
(cl-define-keysym #x1001eb8 "Ebelowdot") ;U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW
(cl-define-keysym #x1001eb9 "ebelowdot") ;U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW
(cl-define-keysym #x1001eba "Ehook") ;U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE
(cl-define-keysym #x1001ebb "ehook") ;U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE
(cl-define-keysym #x1001ebc "Etilde") ;U+1EBC LATIN CAPITAL LETTER E WITH TILDE
(cl-define-keysym #x1001ebd "etilde") ;U+1EBD LATIN SMALL LETTER E WITH TILDE
(cl-define-keysym #x1001ebe "Ecircumflexacute") ;U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
(cl-define-keysym #x1001ebf "ecircumflexacute") ;U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE
(cl-define-keysym #x1001ec0 "Ecircumflexgrave") ;U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
(cl-define-keysym #x1001ec1 "ecircumflexgrave") ;U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE
(cl-define-keysym #x1001ec2 "Ecircumflexhook") ;U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
(cl-define-keysym #x1001ec3 "ecircumflexhook") ;U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
(cl-define-keysym #x1001ec4 "Ecircumflextilde") ;U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
(cl-define-keysym #x1001ec5 "ecircumflextilde") ;U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE
(cl-define-keysym #x1001ec6 "Ecircumflexbelowdot") ;U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
(cl-define-keysym #x1001ec7 "ecircumflexbelowdot") ;U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW
(cl-define-keysym #x1001ec8 "Ihook") ;U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE
(cl-define-keysym #x1001ec9 "ihook") ;U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE
(cl-define-keysym #x1001eca "Ibelowdot") ;U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW
(cl-define-keysym #x1001ecb "ibelowdot") ;U+1ECB LATIN SMALL LETTER I WITH DOT BELOW
(cl-define-keysym #x1001ecc "Obelowdot") ;U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW
(cl-define-keysym #x1001ecd "obelowdot") ;U+1ECD LATIN SMALL LETTER O WITH DOT BELOW
(cl-define-keysym #x1001ece "Ohook") ;U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE
(cl-define-keysym #x1001ecf "ohook") ;U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE
(cl-define-keysym #x1001ed0 "Ocircumflexacute") ;U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
(cl-define-keysym #x1001ed1 "ocircumflexacute") ;U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE
(cl-define-keysym #x1001ed2 "Ocircumflexgrave") ;U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
(cl-define-keysym #x1001ed3 "ocircumflexgrave") ;U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE
(cl-define-keysym #x1001ed4 "Ocircumflexhook") ;U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
(cl-define-keysym #x1001ed5 "ocircumflexhook") ;U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
(cl-define-keysym #x1001ed6 "Ocircumflextilde") ;U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
(cl-define-keysym #x1001ed7 "ocircumflextilde") ;U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE
(cl-define-keysym #x1001ed8 "Ocircumflexbelowdot") ;U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
(cl-define-keysym #x1001ed9 "ocircumflexbelowdot") ;U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW
(cl-define-keysym #x1001eda "Ohornacute") ;U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE
(cl-define-keysym #x1001edb "ohornacute") ;U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE
(cl-define-keysym #x1001edc "Ohorngrave") ;U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE
(cl-define-keysym #x1001edd "ohorngrave") ;U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE
(cl-define-keysym #x1001ede "Ohornhook") ;U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
(cl-define-keysym #x1001edf "ohornhook") ;U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE
(cl-define-keysym #x1001ee0 "Ohorntilde") ;U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE
(cl-define-keysym #x1001ee1 "ohorntilde") ;U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE
(cl-define-keysym #x1001ee2 "Ohornbelowdot") ;U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
(cl-define-keysym #x1001ee3 "ohornbelowdot") ;U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW
(cl-define-keysym #x1001ee4 "Ubelowdot") ;U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW
(cl-define-keysym #x1001ee5 "ubelowdot") ;U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW
(cl-define-keysym #x1001ee6 "Uhook") ;U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE
(cl-define-keysym #x1001ee7 "uhook") ;U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE
(cl-define-keysym #x1001ee8 "Uhornacute") ;U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE
(cl-define-keysym #x1001ee9 "uhornacute") ;U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE
(cl-define-keysym #x1001eea "Uhorngrave") ;U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE
(cl-define-keysym #x1001eeb "uhorngrave") ;U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE
(cl-define-keysym #x1001eec "Uhornhook") ;U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
(cl-define-keysym #x1001eed "uhornhook") ;U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE
(cl-define-keysym #x1001eee "Uhorntilde") ;U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE
(cl-define-keysym #x1001eef "uhorntilde") ;U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE
(cl-define-keysym #x1001ef0 "Uhornbelowdot") ;U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
(cl-define-keysym #x1001ef1 "uhornbelowdot") ;U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW
(cl-define-keysym #x1001ef4 "Ybelowdot") ;U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW
(cl-define-keysym #x1001ef5 "ybelowdot") ;U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW
(cl-define-keysym #x1001ef6 "Yhook") ;U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE
(cl-define-keysym #x1001ef7 "yhook") ;U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE
(cl-define-keysym #x1001ef8 "Ytilde") ;U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE
(cl-define-keysym #x1001ef9 "ytilde") ;U+1EF9 LATIN SMALL LETTER Y WITH TILDE
(cl-define-keysym #x10001a0 "Ohorn") ;U+01A0 LATIN CAPITAL LETTER O WITH HORN
(cl-define-keysym #x10001a1 "ohorn") ;U+01A1 LATIN SMALL LETTER O WITH HORN
(cl-define-keysym #x10001af "Uhorn") ;U+01AF LATIN CAPITAL LETTER U WITH HORN
(cl-define-keysym #x10001b0 "uhorn") ;U+01B0 LATIN SMALL LETTER U WITH HORN
(cl-define-keysym #x10020a0 "EcuSign") ;U+20A0 EURO-CURRENCY SIGN
(cl-define-keysym #x10020a1 "ColonSign") ;U+20A1 COLON SIGN
(cl-define-keysym #x10020a2 "CruzeiroSign") ;U+20A2 CRUZEIRO SIGN
(cl-define-keysym #x10020a3 "FFrancSign") ;U+20A3 FRENCH FRANC SIGN
(cl-define-keysym #x10020a4 "LiraSign") ;U+20A4 LIRA SIGN
(cl-define-keysym #x10020a5 "MillSign") ;U+20A5 MILL SIGN
(cl-define-keysym #x10020a6 "NairaSign") ;U+20A6 NAIRA SIGN
(cl-define-keysym #x10020a7 "PesetaSign") ;U+20A7 PESETA SIGN
(cl-define-keysym #x10020a8 "RupeeSign") ;U+20A8 RUPEE SIGN
(cl-define-keysym #x10020a9 "WonSign") ;U+20A9 WON SIGN
(cl-define-keysym #x10020aa "NewSheqelSign") ;U+20AA NEW SHEQEL SIGN
(cl-define-keysym #x10020ab "DongSign") ;U+20AB DONG SIGN
(cl-define-keysym #x20ac "EuroSign") ;U+20AC EURO SIGN
(cl-define-keysym #x1002070 "zerosuperior") ;U+2070 SUPERSCRIPT ZERO
(cl-define-keysym #x1002074 "foursuperior") ;U+2074 SUPERSCRIPT FOUR
(cl-define-keysym #x1002075 "fivesuperior") ;U+2075 SUPERSCRIPT FIVE
(cl-define-keysym #x1002076 "sixsuperior") ;U+2076 SUPERSCRIPT SIX
(cl-define-keysym #x1002077 "sevensuperior") ;U+2077 SUPERSCRIPT SEVEN
(cl-define-keysym #x1002078 "eightsuperior") ;U+2078 SUPERSCRIPT EIGHT
(cl-define-keysym #x1002079 "ninesuperior") ;U+2079 SUPERSCRIPT NINE
(cl-define-keysym #x1002080 "zerosubscript") ;U+2080 SUBSCRIPT ZERO
(cl-define-keysym #x1002081 "onesubscript") ;U+2081 SUBSCRIPT ONE
(cl-define-keysym #x1002082 "twosubscript") ;U+2082 SUBSCRIPT TWO
(cl-define-keysym #x1002083 "threesubscript") ;U+2083 SUBSCRIPT THREE
(cl-define-keysym #x1002084 "foursubscript") ;U+2084 SUBSCRIPT FOUR
(cl-define-keysym #x1002085 "fivesubscript") ;U+2085 SUBSCRIPT FIVE
(cl-define-keysym #x1002086 "sixsubscript") ;U+2086 SUBSCRIPT SIX
(cl-define-keysym #x1002087 "sevensubscript") ;U+2087 SUBSCRIPT SEVEN
(cl-define-keysym #x1002088 "eightsubscript") ;U+2088 SUBSCRIPT EIGHT
(cl-define-keysym #x1002089 "ninesubscript") ;U+2089 SUBSCRIPT NINE
(cl-define-keysym #x1002202 "partdifferential") ;U+2202 PARTIAL DIFFERENTIAL
(cl-define-keysym #x1002205 "emptyset") ;U+2205 NULL SET
(cl-define-keysym #x1002208 "elementof") ;U+2208 ELEMENT OF
(cl-define-keysym #x1002209 "notelementof") ;U+2209 NOT AN ELEMENT OF
(cl-define-keysym #x100220B "containsas") ;U+220B CONTAINS AS MEMBER
(cl-define-keysym #x100221A "squareroot") ;U+221A SQUARE ROOT
(cl-define-keysym #x100221B "cuberoot") ;U+221B CUBE ROOT
(cl-define-keysym #x100221C "fourthroot") ;U+221C FOURTH ROOT
(cl-define-keysym #x100222C "dintegral") ;U+222C DOUBLE INTEGRAL
(cl-define-keysym #x100222D "tintegral") ;U+222D TRIPLE INTEGRAL
(cl-define-keysym #x1002235 "because") ;U+2235 BECAUSE
(cl-define-keysym #x1002248 "approxeq") ;U+2245 ALMOST EQUAL TO
(cl-define-keysym #x1002247 "notapproxeq") ;U+2247 NOT ALMOST EQUAL TO
(cl-define-keysym #x1002262 "notidentical") ;U+2262 NOT IDENTICAL TO
(cl-define-keysym #x1002263 "stricteq") ;U+2263 STRICTLY EQUIVALENT TO
;; A bunch of extended keysyms
(cl-define-keysym #x100000A8 "hpmute_acute")
(cl-define-keysym #x100000A9 "hpmute_grave")
(cl-define-keysym #x100000AA "hpmute_asciicircum")
(cl-define-keysym #x100000AB "hpmute_diaeresis")
(cl-define-keysym #x100000AC "hpmute_asciitilde")
(cl-define-keysym #x100000AF "hplira")
(cl-define-keysym #x100000BE "hpguilder")
(cl-define-keysym #x100000EE "hpYdiaeresis")
(cl-define-keysym #x100000EE "hpIO")
(cl-define-keysym #x100000F6 "hplongminus")
(cl-define-keysym #x100000FC "hpblock")
(cl-define-keysym #x1000FF00 "apLineDel")
(cl-define-keysym #x1000FF01 "apCharDel")
(cl-define-keysym #x1000FF02 "apCopy")
(cl-define-keysym #x1000FF03 "apCut")
(cl-define-keysym #x1000FF04 "apPaste")
(cl-define-keysym #x1000FF05 "apMove")
(cl-define-keysym #x1000FF06 "apGrow")
(cl-define-keysym #x1000FF07 "apCmd")
(cl-define-keysym #x1000FF08 "apShell")
(cl-define-keysym #x1000FF09 "apLeftBar")
(cl-define-keysym #x1000FF0A "apRightBar")
(cl-define-keysym #x1000FF0B "apLeftBox")
(cl-define-keysym #x1000FF0C "apRightBox")
(cl-define-keysym #x1000FF0D "apUpBox")
(cl-define-keysym #x1000FF0E "apDownBox")
(cl-define-keysym #x1000FF0F "apPop")
(cl-define-keysym #x1000FF10 "apRead")
(cl-define-keysym #x1000FF11 "apEdit")
(cl-define-keysym #x1000FF12 "apSave")
(cl-define-keysym #x1000FF13 "apExit")
(cl-define-keysym #x1000FF14 "apRepeat")
(cl-define-keysym #x1000FF48 "hpModelock1")
(cl-define-keysym #x1000FF49 "hpModelock2")
(cl-define-keysym #x1000FF6C "hpReset")
(cl-define-keysym #x1000FF6D "hpSystem")
(cl-define-keysym #x1000FF6E "hpUser")
(cl-define-keysym #x1000FF6F "hpClearLine")
(cl-define-keysym #x1000FF70 "hpInsertLine")
(cl-define-keysym #x1000FF71 "hpDeleteLine")
(cl-define-keysym #x1000FF72 "hpInsertChar")
(cl-define-keysym #x1000FF73 "hpDeleteChar")
(cl-define-keysym #x1000FF74 "hpBackTab")
(cl-define-keysym #x1000FF75 "hpKP_BackTab")
(cl-define-keysym #x1000FFA8 "apKP_parenleft")
(cl-define-keysym #x1000FFA9 "apKP_parenright")
(cl-define-keysym #x10004001 "I2ND_FUNC_L")
(cl-define-keysym #x10004002 "I2ND_FUNC_R")
(cl-define-keysym #x10004003 "IREMOVE")
(cl-define-keysym #x10004004 "IREPEAT")
(cl-define-keysym #x10004101 "IA1")
(cl-define-keysym #x10004102 "IA2")
(cl-define-keysym #x10004103 "IA3")
(cl-define-keysym #x10004104 "IA4")
(cl-define-keysym #x10004105 "IA5")
(cl-define-keysym #x10004106 "IA6")
(cl-define-keysym #x10004107 "IA7")
(cl-define-keysym #x10004108 "IA8")
(cl-define-keysym #x10004109 "IA9")
(cl-define-keysym #x1000410A "IA10")
(cl-define-keysym #x1000410B "IA11")
(cl-define-keysym #x1000410C "IA12")
(cl-define-keysym #x1000410D "IA13")
(cl-define-keysym #x1000410E "IA14")
(cl-define-keysym #x1000410F "IA15")
(cl-define-keysym #x10004201 "IB1")
(cl-define-keysym #x10004202 "IB2")
(cl-define-keysym #x10004203 "IB3")
(cl-define-keysym #x10004204 "IB4")
(cl-define-keysym #x10004205 "IB5")
(cl-define-keysym #x10004206 "IB6")
(cl-define-keysym #x10004207 "IB7")
(cl-define-keysym #x10004208 "IB8")
(cl-define-keysym #x10004209 "IB9")
(cl-define-keysym #x1000420A "IB10")
(cl-define-keysym #x1000420B "IB11")
(cl-define-keysym #x1000420C "IB12")
(cl-define-keysym #x1000420D "IB13")
(cl-define-keysym #x1000420E "IB14")
(cl-define-keysym #x1000420F "IB15")
(cl-define-keysym #x10004210 "IB16")
(cl-define-keysym #x1000FF00 "DRemove")
(cl-define-keysym #x1000FEB0 "Dring_accent")
(cl-define-keysym #x1000FE5E "Dcircumflex_accent")
(cl-define-keysym #x1000FE2C "Dcedilla_accent")
(cl-define-keysym #x1000FE27 "Dacute_accent")
(cl-define-keysym #x1000FE60 "Dgrave_accent")
(cl-define-keysym #x1000FE7E "Dtilde")
(cl-define-keysym #x1000FE22 "Ddiaeresis")
(cl-define-keysym #x1004FF02 "osfCopy")
(cl-define-keysym #x1004FF03 "osfCut")
(cl-define-keysym #x1004FF04 "osfPaste")
(cl-define-keysym #x1004FF07 "osfBackTab")
(cl-define-keysym #x1004FF08 "osfBackSpace")
(cl-define-keysym #x1004FF0B "osfClear")
(cl-define-keysym #x1004FF1B "osfEscape")
(cl-define-keysym #x1004FF31 "osfAddMode")
(cl-define-keysym #x1004FF32 "osfPrimaryPaste")
(cl-define-keysym #x1004FF33 "osfQuickPaste")
(cl-define-keysym #x1004FF40 "osfPageLeft")
(cl-define-keysym #x1004FF41 "osfPageUp")
(cl-define-keysym #x1004FF42 "osfPageDown")
(cl-define-keysym #x1004FF43 "osfPageRight")
(cl-define-keysym #x1004FF44 "osfActivate")
(cl-define-keysym #x1004FF45 "osfMenuBar")
(cl-define-keysym #x1004FF51 "osfLeft")
(cl-define-keysym #x1004FF52 "osfUp")
(cl-define-keysym #x1004FF53 "osfRight")
(cl-define-keysym #x1004FF54 "osfDown")
(cl-define-keysym #x1004FF55 "osfPrior")
(cl-define-keysym #x1004FF56 "osfNext")
(cl-define-keysym #x1004FF57 "osfEndLine")
(cl-define-keysym #x1004FF58 "osfBeginLine")
(cl-define-keysym #x1004FF59 "osfEndData")
(cl-define-keysym #x1004FF5A "osfBeginData")
(cl-define-keysym #x1004FF5B "osfPrevMenu")
(cl-define-keysym #x1004FF5C "osfNextMenu")
(cl-define-keysym #x1004FF5D "osfPrevField")
(cl-define-keysym #x1004FF5E "osfNextField")
(cl-define-keysym #x1004FF60 "osfSelect")
(cl-define-keysym #x1004FF63 "osfInsert")
(cl-define-keysym #x1004FF65 "osfUndo")
(cl-define-keysym #x1004FF67 "osfMenu")
(cl-define-keysym #x1004FF69 "osfCancel")
(cl-define-keysym #x1004FF6A "osfHelp")
(cl-define-keysym #x1004FF71 "osfSelectAll")
(cl-define-keysym #x1004FF72 "osfDeselectAll")
(cl-define-keysym #x1004FF73 "osfReselect")
(cl-define-keysym #x1004FF74 "osfExtend")
(cl-define-keysym #x1004FF78 "osfRestore")
(cl-define-keysym #x1004FF7E "osfSwitchDirection")
(cl-define-keysym #x1004FFF5 "osfPriorMinor")
(cl-define-keysym #x1004FFF6 "osfNextMinor")
(cl-define-keysym #x1004FFF7 "osfRightLine")
(cl-define-keysym #x1004FFF8 "osfLeftLine")
(cl-define-keysym #x1004FFFF "osfDelete")
(cl-define-keysym #x1005FF00 "SunFA_Grave")
(cl-define-keysym #x1005FF01 "SunFA_Circum")
(cl-define-keysym #x1005FF02 "SunFA_Tilde")
(cl-define-keysym #x1005FF03 "SunFA_Acute")
(cl-define-keysym #x1005FF04 "SunFA_Diaeresis")
(cl-define-keysym #x1005FF05 "SunFA_Cedilla")
(cl-define-keysym #x1005FF10 "SunF36")
(cl-define-keysym #x1005FF11 "SunF37")
(cl-define-keysym #x1005FF60 "SunSys_Req")
(cl-define-keysym #x1005FF70 "SunProps")
(cl-define-keysym #x1005FF71 "SunFront")
(cl-define-keysym #x1005FF72 "SunCopy")
(cl-define-keysym #x1005FF73 "SunOpen")
(cl-define-keysym #x1005FF74 "SunPaste")
(cl-define-keysym #x1005FF75 "SunCut")
(cl-define-keysym #x1005FF76 "SunPowerSwitch")
(cl-define-keysym #x1005FF77 "SunAudioLowerVolume")
(cl-define-keysym #x1005FF78 "SunAudioMute")
(cl-define-keysym #x1005FF79 "SunAudioRaiseVolume")
(cl-define-keysym #x1005FF7A "SunVideoDegauss")
(cl-define-keysym #x1005FF7B "SunVideoLowerBrightness")
(cl-define-keysym #x1005FF7C "SunVideoRaiseBrightness")
(cl-define-keysym #x1005FF7D "SunPowerSwitchShift")
(cl-define-keysym #xFF20 "SunCompose")
(cl-define-keysym #xFF55 "SunPageUp")
(cl-define-keysym #xFF56 "SunPageDown")
(cl-define-keysym #xFF61 "SunPrint_Screen")
(cl-define-keysym #xFF65 "SunUndo")
(cl-define-keysym #xFF66 "SunAgain")
(cl-define-keysym #xFF68 "SunFind")
(cl-define-keysym #xFF69 "SunStop")
(cl-define-keysym #xFF7E "SunAltGraph")
(cl-define-keysym #x1006FF00 "WYSetup")
(cl-define-keysym #x1006FF00 "ncdSetup")
(cl-define-keysym #x10070001 "XeroxPointerButton1")
(cl-define-keysym #x10070002 "XeroxPointerButton2")
(cl-define-keysym #x10070003 "XeroxPointerButton3")
(cl-define-keysym #x10070004 "XeroxPointerButton4")
(cl-define-keysym #x10070005 "XeroxPointerButton5")
(cl-define-keysym #x1008FF01 "XF86ModeLock")
(cl-define-keysym #x1008FF02 "XF86MonBrightnessUp")
(cl-define-keysym #x1008FF03 "XF86MonBrightnessDown")
(cl-define-keysym #x1008FF04 "XF86KbdLightOnOff")
(cl-define-keysym #x1008FF05 "XF86KbdBrightnessUp")
(cl-define-keysym #x1008FF06 "XF86KbdBrightnessDown")
(cl-define-keysym #x1008FF10 "XF86Standby")
(cl-define-keysym #x1008FF11 "XF86AudioLowerVolume")
(cl-define-keysym #x1008FF12 "XF86AudioMute")
(cl-define-keysym #x1008FF13 "XF86AudioRaiseVolume")
(cl-define-keysym #x1008FF14 "XF86AudioPlay")
(cl-define-keysym #x1008FF15 "XF86AudioStop")
(cl-define-keysym #x1008FF16 "XF86AudioPrev")
(cl-define-keysym #x1008FF17 "XF86AudioNext")
(cl-define-keysym #x1008FF18 "XF86HomePage")
(cl-define-keysym #x1008FF19 "XF86Mail")
(cl-define-keysym #x1008FF1A "XF86Start")
(cl-define-keysym #x1008FF1B "XF86Search")
(cl-define-keysym #x1008FF1C "XF86AudioRecord")
(cl-define-keysym #x1008FF1D "XF86Calculator")
(cl-define-keysym #x1008FF1E "XF86Memo")
(cl-define-keysym #x1008FF1F "XF86ToDoList")
(cl-define-keysym #x1008FF20 "XF86Calendar")
(cl-define-keysym #x1008FF21 "XF86PowerDown")
(cl-define-keysym #x1008FF22 "XF86ContrastAdjust")
(cl-define-keysym #x1008FF23 "XF86RockerUp")
(cl-define-keysym #x1008FF24 "XF86RockerDown")
(cl-define-keysym #x1008FF25 "XF86RockerEnter")
(cl-define-keysym #x1008FF26 "XF86Back")
(cl-define-keysym #x1008FF27 "XF86Forward")
(cl-define-keysym #x1008FF28 "XF86Stop")
(cl-define-keysym #x1008FF29 "XF86Refresh")
(cl-define-keysym #x1008FF2A "XF86PowerOff")
(cl-define-keysym #x1008FF2B "XF86WakeUp")
(cl-define-keysym #x1008FF2C "XF86Eject")
(cl-define-keysym #x1008FF2D "XF86ScreenSaver")
(cl-define-keysym #x1008FF2E "XF86WWW")
(cl-define-keysym #x1008FF2F "XF86Sleep")
(cl-define-keysym #x1008FF30 "XF86Favorites")
(cl-define-keysym #x1008FF31 "XF86AudioPause")
(cl-define-keysym #x1008FF32 "XF86AudioMedia")
(cl-define-keysym #x1008FF33 "XF86MyComputer")
(cl-define-keysym #x1008FF34 "XF86VendorHome")
(cl-define-keysym #x1008FF35 "XF86LightBulb")
(cl-define-keysym #x1008FF36 "XF86Shop")
(cl-define-keysym #x1008FF37 "XF86History")
(cl-define-keysym #x1008FF38 "XF86OpenURL")
(cl-define-keysym #x1008FF39 "XF86AddFavorite")
(cl-define-keysym #x1008FF3A "XF86HotLinks")
(cl-define-keysym #x1008FF3B "XF86BrightnessAdjust")
(cl-define-keysym #x1008FF3C "XF86Finance")
(cl-define-keysym #x1008FF3D "XF86Community")
(cl-define-keysym #x1008FF3E "XF86AudioRewind")
(cl-define-keysym #x1008FF3F "XF86BackForward")
(cl-define-keysym #x1008FF40 "XF86Launch0")
(cl-define-keysym #x1008FF41 "XF86Launch1")
(cl-define-keysym #x1008FF42 "XF86Launch2")
(cl-define-keysym #x1008FF43 "XF86Launch3")
(cl-define-keysym #x1008FF44 "XF86Launch4")
(cl-define-keysym #x1008FF45 "XF86Launch5")
(cl-define-keysym #x1008FF46 "XF86Launch6")
(cl-define-keysym #x1008FF47 "XF86Launch7")
(cl-define-keysym #x1008FF48 "XF86Launch8")
(cl-define-keysym #x1008FF49 "XF86Launch9")
(cl-define-keysym #x1008FF4A "XF86LaunchA")
(cl-define-keysym #x1008FF4B "XF86LaunchB")
(cl-define-keysym #x1008FF4C "XF86LaunchC")
(cl-define-keysym #x1008FF4D "XF86LaunchD")
(cl-define-keysym #x1008FF4E "XF86LaunchE")
(cl-define-keysym #x1008FF4F "XF86LaunchF")
(cl-define-keysym #x1008FF50 "XF86ApplicationLeft")
(cl-define-keysym #x1008FF51 "XF86ApplicationRight")
(cl-define-keysym #x1008FF52 "XF86Book")
(cl-define-keysym #x1008FF53 "XF86CD")
(cl-define-keysym #x1008FF54 "XF86Calculater")
(cl-define-keysym #x1008FF55 "XF86Clear")
(cl-define-keysym #x1008FF56 "XF86Close")
(cl-define-keysym #x1008FF57 "XF86Copy")
(cl-define-keysym #x1008FF58 "XF86Cut")
(cl-define-keysym #x1008FF59 "XF86Display")
(cl-define-keysym #x1008FF5A "XF86DOS")
(cl-define-keysym #x1008FF5B "XF86Documents")
(cl-define-keysym #x1008FF5C "XF86Excel")
(cl-define-keysym #x1008FF5D "XF86Explorer")
(cl-define-keysym #x1008FF5E "XF86Game")
(cl-define-keysym #x1008FF5F "XF86Go")
(cl-define-keysym #x1008FF60 "XF86iTouch")
(cl-define-keysym #x1008FF61 "XF86LogOff")
(cl-define-keysym #x1008FF62 "XF86Market")
(cl-define-keysym #x1008FF63 "XF86Meeting")
(cl-define-keysym #x1008FF65 "XF86MenuKB")
(cl-define-keysym #x1008FF66 "XF86MenuPB")
(cl-define-keysym #x1008FF67 "XF86MySites")
(cl-define-keysym #x1008FF68 "XF86New")
(cl-define-keysym #x1008FF69 "XF86News")
(cl-define-keysym #x1008FF6A "XF86OfficeHome")
(cl-define-keysym #x1008FF6B "XF86Open")
(cl-define-keysym #x1008FF6C "XF86Option")
(cl-define-keysym #x1008FF6D "XF86Paste")
(cl-define-keysym #x1008FF6E "XF86Phone")
(cl-define-keysym #x1008FF70 "XF86Q")
(cl-define-keysym #x1008FF72 "XF86Reply")
(cl-define-keysym #x1008FF73 "XF86Reload")
(cl-define-keysym #x1008FF74 "XF86RotateWindows")
(cl-define-keysym #x1008FF75 "XF86RotationPB")
(cl-define-keysym #x1008FF76 "XF86RotationKB")
(cl-define-keysym #x1008FF77 "XF86Save")
(cl-define-keysym #x1008FF78 "XF86ScrollUp")
(cl-define-keysym #x1008FF79 "XF86ScrollDown")
(cl-define-keysym #x1008FF7A "XF86ScrollClick")
(cl-define-keysym #x1008FF7B "XF86Send")
(cl-define-keysym #x1008FF7C "XF86Spell")
(cl-define-keysym #x1008FF7D "XF86SplitScreen")
(cl-define-keysym #x1008FF7E "XF86Support")
(cl-define-keysym #x1008FF7F "XF86TaskPane")
(cl-define-keysym #x1008FF80 "XF86Terminal")
(cl-define-keysym #x1008FF81 "XF86Tools")
(cl-define-keysym #x1008FF82 "XF86Travel")
(cl-define-keysym #x1008FF84 "XF86UserPB")
(cl-define-keysym #x1008FF85 "XF86User1KB")
(cl-define-keysym #x1008FF86 "XF86User2KB")
(cl-define-keysym #x1008FF87 "XF86Video")
(cl-define-keysym #x1008FF88 "XF86WheelButton")
(cl-define-keysym #x1008FF89 "XF86Word")
(cl-define-keysym #x1008FF8A "XF86Xfer")
(cl-define-keysym #x1008FF8B "XF86ZoomIn")
(cl-define-keysym #x1008FF8C "XF86ZoomOut")
(cl-define-keysym #x1008FF8D "XF86Away")
(cl-define-keysym #x1008FF8E "XF86Messenger")
(cl-define-keysym #x1008FF8F "XF86WebCam")
(cl-define-keysym #x1008FF90 "XF86MailForward")
(cl-define-keysym #x1008FF91 "XF86Pictures")
(cl-define-keysym #x1008FF92 "XF86Music")
(cl-define-keysym #x1008FE01 "XF86_Switch_VT_1")
(cl-define-keysym #x1008FE02 "XF86_Switch_VT_2")
(cl-define-keysym #x1008FE03 "XF86_Switch_VT_3")
(cl-define-keysym #x1008FE04 "XF86_Switch_VT_4")
(cl-define-keysym #x1008FE05 "XF86_Switch_VT_5")
(cl-define-keysym #x1008FE06 "XF86_Switch_VT_6")
(cl-define-keysym #x1008FE07 "XF86_Switch_VT_7")
(cl-define-keysym #x1008FE08 "XF86_Switch_VT_8")
(cl-define-keysym #x1008FE09 "XF86_Switch_VT_9")
(cl-define-keysym #x1008FE0A "XF86_Switch_VT_10")
(cl-define-keysym #x1008FE0B "XF86_Switch_VT_11")
(cl-define-keysym #x1008FE0C "XF86_Switch_VT_12")
(cl-define-keysym #x1008FE20 "XF86_Ungrab")
(cl-define-keysym #x1008FE21 "XF86_ClearGrab")
(cl-define-keysym #x1008FE22 "XF86_Next_VMode")
(cl-define-keysym #x1008FE23 "XF86_Prev_VMode")
(cl-define-keysym #x100000A8 "usldead_acute")
(cl-define-keysym #x100000A9 "usldead_grave")
(cl-define-keysym #x100000AB "usldead_diaeresis")
(cl-define-keysym #x100000AA "usldead_asciicircum")
(cl-define-keysym #x100000AC "usldead_asciitilde")
(cl-define-keysym #x1000FE2C "usldead_cedilla")
(cl-define-keysym #x1000FEB0 "usldead_ring")
;; For convenience
(cl-define-keysym #xff55 "Page_Up")
(cl-define-keysym #xff56 "Page_Down")
| 129,307 | Common Lisp | .lisp | 2,060 | 61.74466 | 115 | 0.76273 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 57bb74dec09a7e9409ce22a2c32d4be1ebc98f04c2840f265592af15ba186753 | 6,485 | [
-1
] |
6,486 | clfswm-internal.lisp | LdBeth_CLFSWM/src/clfswm-internal.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(defgeneric child-border-size (child))
(defmethod child-border-size ((child frame))
(x-drawable-border-width (frame-window child)))
(defmethod child-border-size ((child xlib:window))
(x-drawable-border-width child))
(defmethod child-border-size (child)
(declare (ignore child))
0)
(defgeneric set-child-border-size (child value))
(defmethod set-child-border-size ((child frame) value)
(setf (x-drawable-border-width (frame-window child)) value))
(defmethod set-child-border-size ((child xlib:window) value)
(setf (x-drawable-border-width child) value))
(defmethod set-child-border-size (child value)
(declare (ignore child value)))
(defsetf child-border-size set-child-border-size)
;;; Conversion functions
;;; Float -> Pixel conversion
(defun x-fl->px (x parent)
"Convert float X coordinate to pixel"
(round (+ (* x (frame-rw parent)) (frame-rx parent))))
(defun y-fl->px (y parent)
"Convert float Y coordinate to pixel"
(round (+ (* y (frame-rh parent)) (frame-ry parent))))
(defun w-fl->px (w parent)
"Convert float Width coordinate to pixel"
(round (* w (frame-rw parent))))
(defun h-fl->px (h parent)
"Convert float Height coordinate to pixel"
(round (* h (frame-rh parent))))
;;; Pixel -> Float conversion
(defun x-px->fl (x parent)
"Convert pixel X coordinate to float"
(/ (- x (frame-rx parent) (child-border-size parent)) (frame-rw parent)))
(defun y-px->fl (y parent)
"Convert pixel Y coordinate to float"
(/ (- y (frame-ry parent) (child-border-size parent)) (frame-rh parent)))
(defun w-px->fl (w parent)
"Convert pixel Width coordinate to float"
(/ w (frame-rw parent)))
(defun h-px->fl (h parent)
"Convert pixel Height coordinate to float"
(/ h (frame-rh parent)))
(defun rect-hidden-p (rect1 rect2)
"Return T if child-rect1 hide child-rect2"
(and *show-hide-policy*
(funcall *show-hide-policy* (child-rect-x rect1) (child-rect-x rect2))
(funcall *show-hide-policy* (child-rect-y rect1) (child-rect-y rect2))
(funcall *show-hide-policy* (+ (child-rect-x rect2) (child-rect-w rect2))
(+ (child-rect-x rect1) (child-rect-w rect1)))
(funcall *show-hide-policy* (+ (child-rect-y rect2) (child-rect-h rect2))
(+ (child-rect-y rect1) (child-rect-h rect1)))))
(defgeneric frame-p (frame))
(defmethod frame-p ((frame frame))
(declare (ignore frame))
t)
(defmethod frame-p (frame)
(declare (ignore frame))
nil)
;;; in-*: Find if point (x,y) is in frame, window or child
(defun in-rect (x y xr yr wr hr)
(and (<= xr x (+ xr wr))
(<= yr y (+ yr hr))))
(defun in-frame (frame x y)
(and (frame-p frame)
(in-rect x y (frame-rx frame) (frame-ry frame) (frame-rw frame) (frame-rh frame))))
(defun in-window (window x y)
(and (xlib:window-p window)
(in-rect x y
(x-drawable-x window) (x-drawable-y window)
(x-drawable-width window) (x-drawable-height window))))
(defgeneric in-child (child x y))
(defmethod in-child ((child frame) x y)
(in-frame child x y))
(defmethod in-child ((child xlib:window) x y)
(in-window child x y))
(defmethod in-child (child x y)
(declare (ignore child x y))
nil)
(defun frame-selected-child (frame)
(when (frame-p frame)
(with-slots (child selected-pos) frame
(let ((len (length child)))
(cond ((minusp selected-pos) (setf selected-pos 0))
((>= selected-pos len) (setf selected-pos (max (1- len) 0)))))
(nth selected-pos child))))
(defgeneric child-equal-p (child-1 child-2))
(defmethod child-equal-p ((child-1 xlib:window) (child-2 xlib:window))
(xlib:window-equal child-1 child-2))
(defmethod child-equal-p ((child-1 frame) (child-2 frame))
(equal child-1 child-2))
(defmethod child-equal-p (child-1 child-2)
(declare (ignore child-1 child-2))
nil)
(declaim (inline child-member child-remove child-position))
(defun child-member (child list)
(member child list :test #'child-equal-p))
(defun child-remove (child list)
(remove child list :test #'child-equal-p))
(defun child-position (child list)
(position child list :test #'child-equal-p))
;;; Frame data manipulation functions
(defun frame-data-slot (frame slot)
"Return the value associated to data slot"
(when (frame-p frame)
(second (assoc slot (frame-data frame)))))
(defun set-frame-data-slot (frame slot value)
"Set the value associated to data slot"
(when (frame-p frame)
(with-slots (data) frame
(setf data (remove (assoc slot data) data))
(push (list slot value) data))
value))
(defsetf frame-data-slot set-frame-data-slot)
(defun remove-frame-data-slot (frame slot)
"Remove a slot in frame data slots"
(when (frame-p frame)
(with-slots (data) frame
(setf data (remove (assoc slot data) data)))))
(defun managed-window-p (window frame)
"Return t only if window is managed by frame"
(if (frame-p frame)
(with-slots ((managed forced-managed-window)
(unmanaged forced-unmanaged-window)) frame
(and (xlib:window-p window)
(not (child-member window unmanaged))
(not (member (xlib:wm-name window) unmanaged :test #'string-equal-p))
(or (member :all (frame-managed-type frame))
(member (window-type window) (frame-managed-type frame))
(child-member window managed)
(member (xlib:wm-name window) managed :test #'string-equal-p))))
t))
(defun add-in-never-managed-window-list (value)
(pushnew value *never-managed-window-list* :test #'equal))
(defun never-managed-window-p (window)
(when (xlib:window-p window)
(dolist (type *never-managed-window-list*)
(when (funcall (first type) window)
(return (values t (second type)))))))
(defun never-managed-window-and-handled-p (window)
(multiple-value-bind (never-managed handle)
(never-managed-window-p window)
(and never-managed handle)))
(defgeneric child-name (child))
(defmethod child-name ((child xlib:window))
(ensure-printable (xlib:wm-name child)))
(defmethod child-name ((child frame))
(frame-name child))
(defmethod child-name (child)
(declare (ignore child))
"???")
(defgeneric set-child-name (child name))
(defmethod set-child-name ((child xlib:window) name)
(setf (xlib:wm-name child) (ensure-printable name)))
(defmethod set-child-name ((child frame) name)
(setf (frame-name child) (ensure-printable name)))
(defmethod set-child-name (child name)
(declare (ignore child name)))
(defsetf child-name set-child-name)
(defgeneric child-fullname (child))
(defmethod child-fullname ((child xlib:window))
(format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?")))
(defmethod child-fullname ((child frame))
(aif (frame-name child)
(format nil "~A (Frame ~A)" it (frame-number child))
(format nil "Frame ~A" (frame-number child))))
(defmethod child-fullname (child)
(declare (ignore child))
"???")
(defgeneric child-transparency (child))
(defmethod child-transparency ((child xlib:window))
(window-transparency child))
(defmethod child-transparency ((child frame))
(window-transparency (frame-window child)))
(defmethod child-transparency (child)
(declare (ignore child))
1)
(defgeneric set-child-transparency (child value))
(defmethod set-child-transparency ((child xlib:window) value)
(setf (window-transparency child) value))
(defmethod set-child-transparency ((child frame) value)
(setf (window-transparency (frame-window child)) value))
(defmethod set-child-transparency (child value)
(declare (ignore child value)))
(defsetf child-transparency set-child-transparency)
(defgeneric child-x (child))
(defmethod child-x ((child xlib:window))
(x-drawable-x child))
(defmethod child-x ((child frame))
(frame-rx child))
(defgeneric child-y (child))
(defmethod child-y ((child xlib:window))
(x-drawable-y child))
(defmethod child-y ((child frame))
(frame-ry child))
(defgeneric child-width (child))
(defmethod child-width ((child xlib:window))
(x-drawable-width child))
(defmethod child-width ((child frame))
(frame-rw child))
(defgeneric child-height (child))
(defmethod child-height ((child xlib:window))
(x-drawable-height child))
(defmethod child-height ((child frame))
(frame-rh child))
(defgeneric child-x2 (child))
(defmethod child-x2 ((child xlib:window))
(+ (x-drawable-x child) (x-drawable-width child)))
(defmethod child-x2 ((child frame))
(+ (frame-rx child) (frame-rw child)))
(defgeneric child-y2 (child))
(defmethod child-y2 ((child xlib:window))
(+ (x-drawable-y child) (x-drawable-height child)))
(defmethod child-y2 ((child frame))
(+ (frame-ry child) (frame-rh child)))
(defgeneric child-center (child))
(defmethod child-center ((child xlib:window))
(values (+ (x-drawable-x child) (/ (x-drawable-width child) 2))
(+ (x-drawable-y child) (/ (x-drawable-height child) 2))))
(defmethod child-center ((child frame))
(values (+ (frame-rx child) (/ (frame-rw child) 2))
(+ (frame-ry child) (/ (frame-rh child) 2))))
(defun child-distance (child1 child2)
(multiple-value-bind (x1 y1) (child-center child1)
(multiple-value-bind (x2 y2) (child-center child2)
(values (+ (abs (- x2 x1)) (abs (- y2 y1)))
(- x2 x1)
(- y2 y1)))))
(defun middle-child-x (child)
(+ (child-x child) (/ (child-width child) 2)))
(defun middle-child-y (child)
(+ (child-y child) (/ (child-height child) 2)))
(declaim (inline adj-border-xy adj-border-wh))
(defgeneric adj-border-xy (value child))
(defgeneric adj-border-wh (value child))
(defmethod adj-border-xy (v (child xlib:window))
(+ v (x-drawable-border-width child)))
(defmethod adj-border-xy (v (child frame))
(+ v (x-drawable-border-width (frame-window child))))
(defmethod adj-border-wh (v (child xlib:window))
(- v (* (x-drawable-border-width child) 2)))
(defmethod adj-border-wh (v (child frame))
(- v (* (x-drawable-border-width (frame-window child)) 2)))
(declaim (inline anti-adj-border-xy anti-adj-border-wh))
(defgeneric anti-adj-border-xy (value child))
(defgeneric anti-adj-border-wh (value child))
(defmethod anti-adj-border-xy (v (child xlib:window))
(- v (x-drawable-border-width child)))
(defmethod anti-adj-border-xy (v (child frame))
(- v (x-drawable-border-width (frame-window child))))
(defmethod anti-adj-border-wh (v (child xlib:window))
(+ v (* (x-drawable-border-width child) 2)))
(defmethod anti-adj-border-wh (v (child frame))
(+ v (* (x-drawable-border-width (frame-window child)) 2)))
(defmacro with-focus-window ((window) &body body)
`(let ((,window (xlib:input-focus *display*)))
(when (and ,window (not (xlib:window-equal ,window *no-focus-window*)))
,@body)))
;; (with-all-children (*root-frame* child) (typecase child (xlib:window (print child)) (frame (print (frame-number child)))))
(defmacro with-all-children ((root child) &body body)
(let ((rec (gensym))
(sub-child (gensym)))
`(block nil
(labels ((,rec (,child)
,@body
(when (frame-p ,child)
(dolist (,sub-child (reverse (frame-child ,child)))
(,rec ,sub-child)))))
(,rec ,root)))))
;; (with-all-children (*root-frame* child) (typecase child (xlib:window (print child)) (frame (print (frame-number child)))))
(defmacro with-all-children-reversed ((root child) &body body)
(let ((rec (gensym))
(sub-child (gensym)))
`(block nil
(labels ((,rec (,child)
,@body
(when (frame-p ,child)
(dolist (,sub-child (frame-child ,child))
(,rec ,sub-child)))))
(,rec ,root)))))
;; (with-all-frames (*root-frame* frame) (print (frame-number frame)))
(defmacro with-all-frames ((root frame) &body body)
(let ((rec (gensym))
(child (gensym)))
`(block nil
(labels ((,rec (,frame)
(when (frame-p ,frame)
,@body
(dolist (,child (reverse (frame-child ,frame)))
(,rec ,child)))))
(,rec ,root)))))
;; (with-all-windows (*root-frame* window) (print window))
(defmacro with-all-windows ((root window) &body body)
(let ((rec (gensym))
(child (gensym)))
`(block nil
(labels ((,rec (,window)
(when (xlib:window-p ,window)
,@body)
(when (frame-p ,window)
(dolist (,child (reverse (frame-child ,window)))
(,rec ,child)))))
(,rec ,root)))))
;; (with-all-frames-windows (*root-frame* child) (print child) (print (frame-number child)))
(defmacro with-all-windows-frames ((root child) body-window body-frame)
(let ((rec (gensym))
(sub-child (gensym)))
`(block nil
(labels ((,rec (,child)
(typecase ,child
(xlib:window ,body-window)
(frame ,body-frame
(dolist (,sub-child (reverse (frame-child ,child)))
(,rec ,sub-child))))))
(,rec ,root)))))
(defmacro with-all-windows-frames-and-parent ((root child parent) body-window body-frame)
(let ((rec (gensym))
(sub-child (gensym)))
`(block nil
(labels ((,rec (,child ,parent)
(typecase ,child
(xlib:window ,body-window)
(frame ,body-frame
(dolist (,sub-child (reverse (frame-child ,child)))
(,rec ,sub-child ,child))))))
(,rec ,root nil)))))
(defun create-frame-window ()
(let ((win (xlib:create-window :parent *root*
:x 0
:y 0
:width 200
:height 200
:background (get-color *frame-background*)
:colormap (xlib:screen-default-colormap *screen*)
:border-width *border-size*
:border (get-color *color-selected*)
:event-mask '(:exposure :button-press :button-release :pointer-motion :enter-window))))
(setf (window-transparency win) *frame-transparency*)
win))
(defun create-frame-gc (window)
(xlib:create-gcontext :drawable window
:foreground (get-color *frame-foreground*)
:background (get-color *frame-background*)
:font *default-font*
:line-style :solid))
(defun destroy-all-frames-window ()
(with-all-frames (*root-frame* frame)
(when (frame-gc frame)
(xlib:free-gcontext (frame-gc frame))
(setf (frame-gc frame) nil))
(when (frame-window frame)
(xlib:destroy-window (frame-window frame))
(setf (frame-window frame) nil))))
(defun create-all-frames-window ()
(with-all-frames (*root-frame* frame)
(unless (frame-window frame)
(setf (frame-window frame) (create-frame-window)))
(unless (frame-gc frame)
(setf (frame-gc frame) (create-frame-gc (frame-window frame)))))
(with-all-frames (*root-frame* frame)
(dolist (child (frame-child frame))
(handler-case
(dbg (child-fullname child))
(error (c)
(setf (frame-child frame) (remove child (frame-child frame) :test #'child-equal-p))
(dbg c child))))))
(defun frame-find-free-number ()
(let ((all-numbers nil))
(with-all-frames (*root-frame* frame)
(pushnew (frame-number frame) all-numbers))
(find-free-number all-numbers)))
(defun create-frame (&rest args &key (number (frame-find-free-number)) &allow-other-keys)
(let* ((window (create-frame-window))
(gc (create-frame-gc window)))
(apply #'make-instance 'frame :number number :window window :gc gc args)))
(defun add-frame (frame parent)
(push frame (frame-child parent))
frame)
(defun place-frame (frame parent prx pry prw prh)
"Place a frame from real (pixel) coordinates"
(when (and (frame-p frame) (frame-p parent))
(with-slots (window x y w h) frame
(setf (x-drawable-x window) prx
(x-drawable-y window) pry
(x-drawable-width window) prw
(x-drawable-height window) prh
x (x-px->fl prx parent)
y (y-px->fl pry parent)
w (w-px->fl prw parent)
h (h-px->fl prh parent))
(xlib:display-finish-output *display*))))
(defun find-child (to-find root)
"Find to-find in root or in its children"
(with-all-children (root child)
(when (child-equal-p child to-find)
(return-from find-child t))))
(defmacro with-find-in-all-frames (test &optional return-value)
`(let (ret)
(block return-block
(with-all-frames (root frame)
(when ,test
(if first-foundp
(return-from return-block (or ,return-value frame))
(setf ret frame))))
(or ,return-value ret))))
(defun find-parent-frame (to-find &optional (root *root-frame*) first-foundp)
"Return the parent frame of to-find"
(with-find-in-all-frames
(child-member to-find (frame-child frame))))
(defun find-frame-window (window &optional (root *root-frame*) first-foundp)
"Return the frame with the window window"
(with-find-in-all-frames
(xlib:window-equal window (frame-window frame))))
(defun find-frame-by-name (name &optional (root *root-frame*) first-foundp)
"Find a frame from its name"
(when name
(with-find-in-all-frames
(string-equal name (frame-name frame)))))
(defun find-frame-by-number (number &optional (root *root-frame*) first-foundp)
"Find a frame from its number"
(when (numberp number)
(with-find-in-all-frames
(= number (frame-number frame)))))
(defun find-child-in-parent (child base)
"Return t if child is in base or in its parents"
(labels ((rec (base)
(when (child-equal-p child base)
(return-from find-child-in-parent t))
(let ((parent (find-parent-frame base)))
(when parent
(rec parent)))))
(rec base)))
;;; Multiple roots support (replace the old *current-root* variable)
(let ((root-list nil)
(current-child nil))
(defun get-root-list ()
root-list)
(let ((save-root-list nil))
(defun save-root-list ()
(setf save-root-list nil)
(dolist (root root-list)
(push (copy-root root) save-root-list)))
(defun restore-root-list ()
(setf root-list nil)
(dolist (root save-root-list)
(push (copy-root root) root-list))))
(defmacro with-saved-root-list (() &body body)
`(progn
(save-root-list)
,@body
(restore-root-list)))
(defun reset-root-list ()
(setf root-list nil
current-child nil))
(defun define-as-root (child x y width height)
(push (make-root :child child :original child :current-child nil :x x :y y :w width :h height) root-list))
(defun find-root-by-coordinates (x y)
(dolist (root root-list)
(when (in-rect x y (root-x root) (root-y root) (root-w root) (root-h root))
(return root))))
(defun root (x &optional y)
"Return the root at coordinates (x,y) if y is not nil.
Otherwise, return the x nth root in root-list"
(if y
(find-root-by-coordinates x y)
(nth x root-list)))
(defun all-root-child ()
(loop for root in root-list
collect (root-child root)))
(defmacro with-all-root-child ((root) &body body)
(let ((root-symb (gensym)))
`(dolist (,root-symb (get-root-list))
(let ((,root (root-child ,root-symb)))
,@body))))
(labels ((generic-child-root-p (child function)
(dolist (root root-list)
(when (child-equal-p child (funcall function root))
(return root)))))
(defun child-root-p (child)
(generic-child-root-p child #'root-child))
(defun child-original-root-p (child)
(generic-child-root-p child #'root-original)))
(defun change-root (old-root new-child)
(when (and old-root new-child)
(setf (root-child old-root) new-child)))
(defun find-root (child)
(aif (child-original-root-p child)
it
(awhen (find-parent-frame child)
(find-root it))))
(defun find-child-in-all-root (child)
(dolist (root root-list)
(when (find-child child (root-child root))
(return-from find-child-in-all-root root))))
(defun find-current-root ()
(root-child (find-root current-child)))
(defun exchange-root-geometry (root-1 root-2)
(when (and root-1 root-2)
(rotatef (root-x root-1) (root-x root-2))
(rotatef (root-y root-1) (root-y root-2))
(rotatef (root-w root-1) (root-w root-2))
(rotatef (root-h root-1) (root-h root-2))))
(defun rotate-root-geometry ()
(let* ((current (first root-list))
(orig-x (root-x current))
(orig-y (root-y current))
(orig-w (root-w current))
(orig-h (root-h current)))
(dolist (elem (rest root-list))
(setf (root-x current) (root-x elem)
(root-y current) (root-y elem)
(root-w current) (root-w elem)
(root-h current) (root-h elem)
current elem))
(let ((last (car (last root-list))))
(setf (root-x last) orig-x
(root-y last) orig-y
(root-w last) orig-w
(root-h last) orig-h))))
(defun anti-rotate-root-geometry ()
(setf root-list (nreverse root-list))
(rotate-root-geometry)
(setf root-list (nreverse root-list)))
;;; Current child functions
(defun current-child ()
current-child)
(defun current-child-setter (value)
(when value
(awhen (find-root value)
(setf (root-current-child it) value))
(setf current-child value)))
(defmacro with-current-child ((new-child) &body body)
"Temporarly change the current child"
(let ((old-child (gensym))
(ret (gensym)))
`(let ((,old-child (current-child)))
(setf (current-child) ,new-child)
(let ((,ret (multiple-value-list (progn ,@body))))
(setf (current-child) ,old-child)
(values-list ,ret)))))
(defun child-is-a-current-child-p (child)
(find child root-list :test #'child-equal-p :key #'root-current-child)))
(defsetf current-child current-child-setter)
(defun ensure-at-least-one-root ()
(unless (get-root-list)
(let ((frame (create-frame)))
(add-frame frame *root-frame*)
(define-as-root frame 0 0 (screen-width) (screen-height))
(add-frame (create-frame) frame))))
(defun is-in-current-child-p (child)
(and (frame-p (current-child))
(child-member child (frame-child (current-child)))))
(defun fixe-real-size (frame parent)
"Fixe real (pixel) coordinates in float coordinates"
(when (frame-p frame)
(with-slots (x y w h rx ry rw rh) frame
(setf x (x-px->fl rx parent)
y (y-px->fl ry parent)
w (w-px->fl (anti-adj-border-wh rw parent) parent)
h (h-px->fl (anti-adj-border-wh rh parent) parent)))))
(defun fixe-real-size-current-child ()
"Fixe real (pixel) coordinates in float coordinates for children in the current child"
(when (frame-p (current-child))
(dolist (child (frame-child (current-child)))
(fixe-real-size child (current-child)))))
;;; Multiple physical screen helper
(defun add-placed-frame-tmp (frame n) ;; For test
(add-frame (create-frame :x 0.01 :y 0.01 :w 0.4 :h 0.4) frame)
(add-frame (create-frame :x 0.55 :y 0.01 :w 0.4 :h 0.4) frame)
(add-frame (create-frame :x 0.03 :y 0.5 :w 0.64 :h 0.44) frame)
(when (plusp n)
(add-placed-frame-tmp (first (frame-child frame)) (1- n))))
(defun parse-xinerama-info (line)
(remove nil
(mapcar (lambda (string)
(parse-integer string :junk-allowed t))
(split-string (substitute #\space #\x (substitute #\space #\, line))))))
(defun get-connected-heads-size (&optional fake)
(labels ((heads-info ()
(if (not fake)
(do-shell "xdpyinfo -ext XINERAMA")
(progn
(setf *show-root-frame-p* t)
(do-shell "echo ' available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
XINERAMA version 1.1 opcode: 150
head #0: 500x300 @ 10,10
head #1: 480x300 @ 520,20
head #2: 600x250 @ 310,330'")))))
(when (xlib:query-extension *display* "XINERAMA")
(let ((output (heads-info))
(sizes nil))
(loop for line = (read-line output nil nil)
while line
do (when (search " head " line)
(destructuring-bind (w h x y)
(parse-xinerama-info line)
(let ((found
(dolist (s sizes)
(destructuring-bind (x1 y1 w1 h1) s
(when (and (>= x x1)
(>= y y1)
(<= (+ x w) (+ x1 w1))
(<= (+ y h) (+ y1 h1)))
(return t))))))
(unless found
(push (list x y w h) sizes))))))
sizes))))
;;'((10 10 500 300) (550 50 400 400) (100 320 400 270))))))
;;'((10 10 500 580) (540 50 470 500))))))
(let ((last-sizes nil))
(defun reset-last-head-size ()
(setf last-sizes nil))
(defun place-frames-from-xinerama-infos ()
"Place frames according to xdpyinfo/xinerama informations"
(let ((sizes (get-connected-heads-size))
(width (screen-width))
(height (screen-height)))
(labels ((update-root-geometry ()
(loop for size in sizes
for root in (get-root-list)
do (destructuring-bind (x y w h) size
(setf (root-x root) x
(root-y root) y
(root-w root) w
(root-h root) h)))
(setf last-sizes sizes)
:update)
(create-root-geometry ()
(reset-root-list)
;; Add frames in *root-frame* until we get the same number as screen heads
(loop while (< (length (frame-child *root-frame*)) (length sizes))
do (let ((frame (create-frame)))
(add-frame frame *root-frame*)))
;; On the opposite way: remove frames while there is more than screen heads in *root-frame*
(when (and sizes (> (length (frame-child *root-frame*)) (length sizes)))
(dotimes (i (- (length (frame-child *root-frame*)) (length sizes)))
(let ((deleted-child (pop (frame-child *root-frame*))))
(typecase deleted-child
(xlib:window (push deleted-child (frame-child (first (frame-child *root-frame*)))))
(frame (dolist (child (frame-child deleted-child))
(push child (frame-child (first (frame-child *root-frame*)))))))
(setf (frame-layout (first (frame-child *root-frame*))) 'tile-space-layout
(frame-data-slot (first (frame-child *root-frame*)) :tile-layout-keep-position) :yes))))
(loop for size in sizes
for frame in (frame-child *root-frame*)
do (destructuring-bind (x y w h) size
(setf (frame-x frame) (float (/ x width))
(frame-y frame) (float (/ y height))
(frame-w frame) (float (/ w width))
(frame-h frame) (float (/ h height)))
;;(add-placed-frame-tmp frame 2) ;; For tests
(unless (frame-child frame)
(add-frame (create-frame) frame))
(define-as-root frame x y w h)))
(setf last-sizes sizes)
nil))
(format t "Screen sizes: ~A~%" sizes)
(if (= (length sizes) (length last-sizes))
(update-root-geometry)
(create-root-geometry))))))
(defun finish-configuring-root ()
(ensure-at-least-one-root)
(setf (current-child) (first (frame-child (first (frame-child *root-frame*))))))
(defun get-all-windows (&optional (root *root-frame*))
"Return all windows in root and in its children"
(let ((acc nil))
(with-all-windows (root window)
(push window acc))
acc))
(defun get-all-frame-windows (&optional (root *root-frame*))
"Return all frame windows in root and in its children"
(let ((acc nil))
(with-all-frames (root frame)
(push (frame-window frame) acc))
acc))
(defun get-all-frames (&optional (root *root-frame*))
"Return all frame in root and in its children"
(let ((acc nil))
(with-all-frames (root frame)
(push frame acc))
acc))
(defun get-all-children (&optional (root *root-frame*))
"Return a list of all children in root"
(let ((acc nil))
(with-all-children (root child)
(push child acc))
acc))
(defun get-hidden-windows ()
"Return all hiddens windows"
(let ((all-windows (get-all-windows))
(hidden-windows (remove-if-not #'window-hidden-p
(copy-list (xlib:query-tree *root*)))))
(set-difference hidden-windows all-windows)))
;;; Current window utilities
(defun get-current-window ()
(typecase (current-child)
(xlib:window (current-child))
(frame (frame-selected-child (current-child)))))
(defmacro with-current-window (&body body)
"Bind 'window' to the current window"
`(let ((window (get-current-window)))
(when (xlib:window-p window)
,@body)))
(defun get-first-window ()
(typecase (current-child)
(xlib:window (current-child))
(frame (or (first (frame-child (current-child)))
(current-child)))))
(defun display-frame-info (frame)
(when (frame-p frame)
(let ((dy (+ (xlib:max-char-ascent *default-font*) (xlib:max-char-descent *default-font*))))
(with-slots (name number gc window child hidden-children) frame
(setf (xlib:gcontext-background gc) (get-color *frame-background*)
(xlib:window-background window) (get-color *frame-background*))
(clear-pixmap-buffer window gc)
(setf (xlib:gcontext-foreground gc) (get-color (if (and (child-root-p frame)
(child-equal-p frame (current-child)))
*frame-foreground-root* *frame-foreground*)))
(xlib:draw-glyphs *pixmap-buffer* gc 5 dy
(format nil "Frame: ~A~A"
number
(if name (format nil " - ~A" name) "")))
(let ((pos dy))
(when (child-root-p frame)
(when *child-selection*
(xlib:draw-glyphs *pixmap-buffer* gc 5 (incf pos dy)
(with-output-to-string (str)
(format str " Selection: ")
(dolist (child *child-selection*)
(typecase child
(xlib:window (format str " ~A " (xlib:wm-name child)))
(frame (format str " frame:~A[~A] " (frame-number child)
(aif (frame-name child) it "")))))))))
(dolist (ch child)
(xlib:draw-glyphs *pixmap-buffer* gc 5 (incf pos dy)
(format nil " ~A" (ensure-printable (child-fullname ch))))))
(copy-pixmap-buffer window gc)
(values t t)))))
(defgeneric rename-child (child name))
(defmethod rename-child ((child frame) name)
(setf (frame-name child) name)
(display-frame-info child))
(defmethod rename-child ((child xlib:window) name)
(setf (xlib:wm-name child) name))
(defmethod rename-child (child name)
(declare (ignore child name)))
(defun get-parent-layout (child parent)
(aif (child-root-p child)
(values (- (root-x it) (child-border-size child)) (- (root-y it) (child-border-size child))
(root-w it) (root-h it))
(if (or (frame-p child) (managed-window-p child parent))
(if (frame-p parent)
(aif (frame-layout parent)
(funcall it child parent)
(no-layout child parent))
(values (- (child-border-size child)) (- (child-border-size child))
(screen-width)
(screen-height)))
(values (x-drawable-x child) (x-drawable-y child)
(x-drawable-width child) (x-drawable-height child)))))
(defgeneric adapt-child-to-parent (child parent))
(defmethod adapt-child-to-parent ((window xlib:window) parent)
(when (managed-window-p window parent)
(multiple-value-bind (nx ny nw nh)
(get-parent-layout window parent)
(setf nw (max nw 1) nh (max nh 1))
(let ((change nil))
(when (or (/= (x-drawable-x window) nx)
(/= (x-drawable-y window) ny))
(setf change :moved))
(when (or (/= (x-drawable-width window) nw)
(/= (x-drawable-height window) nh))
(setf change :resized))
(when change
(xlib:with-state (window)
(setf (x-drawable-x window) nx
(x-drawable-y window) ny
(x-drawable-width window) nw
(x-drawable-height window) nh)))
change))))
(defmethod adapt-child-to-parent ((frame frame) parent)
(declare (ignore parent))
(with-slots (rx ry rw rh window) frame
(let ((change nil))
(when (or (/= (x-drawable-x window) rx)
(/= (x-drawable-y window) ry))
(setf change :moved))
(when (or (/= (x-drawable-width window) rw)
(/= (x-drawable-height window) rh))
(setf change :resized))
(when change
(xlib:with-state (window)
(setf (x-drawable-x window) rx
(x-drawable-y window) ry
(x-drawable-width window) rw
(x-drawable-height window) rh)))
change)))
(defmethod adapt-child-to-parent (child parent)
(declare (ignore child parent))
nil)
(defgeneric set-child-stack-order (window child)
(:documentation "Put window just below child"))
(defmethod set-child-stack-order (window (child xlib:window))
(lower-window window child))
(defmethod set-child-stack-order (window (child frame))
(lower-window window (frame-window child)))
(defmethod set-child-stack-order (window child)
(declare (ignore child))
(unless (maxmin-size-equal-window-in-tree)
(raise-window window)))
(defgeneric show-child (child parent previous))
(defmethod show-child ((frame frame) parent previous)
(declare (ignore parent))
(with-slots (window show-window-p) frame
(if (and show-window-p
(or *show-root-frame-p* (not (child-root-p frame))))
(progn
(map-window window)
(set-child-stack-order window previous)
(display-frame-info frame))
(hide-window window))))
(defun hide-unmanaged-window-p (parent)
(let ((action (frame-data-slot parent :unmanaged-window-action)))
(case action
(:hide t)
(:show nil)
(t *hide-unmanaged-window*))))
(defmethod show-child ((window xlib:window) parent previous)
(if (or (managed-window-p window parent)
(child-equal-p window (current-child))
(not (hide-unmanaged-window-p parent))
(child-is-a-current-child-p parent))
(progn
(map-window window)
(set-child-stack-order window previous))
(hide-window window)))
(defmethod show-child (child parent raise-p)
(declare (ignore child parent raise-p))
())
(defgeneric hide-child (child))
(defmethod hide-child ((frame frame))
(with-slots (window) frame
(xlib:unmap-window window)))
(defmethod hide-child ((window xlib:window))
(hide-window window))
(defmethod hide-child (child)
(declare (ignore child))
())
(defgeneric select-child (child selected))
(labels ((get-selected-color (child selected-p)
(get-color (cond ((child-equal-p child (current-child)) *color-selected*)
(selected-p *color-maybe-selected*)
(t *color-unselected*)))))
(defmethod select-child ((frame frame) selected-p)
(when (and (frame-p frame) (frame-window frame))
(setf (xlib:window-border (frame-window frame))
(get-selected-color frame selected-p))))
(defmethod select-child ((window xlib:window) selected-p)
(setf (xlib:window-border window)
(get-selected-color window selected-p)))
(defmethod select-child (child selected)
(declare (ignore child selected))
()))
(defun select-current-frame (selected)
(select-child (current-child) selected))
(defun unselect-all-frames ()
(with-all-children (*root-frame* child)
(select-child child nil)))
(defun set-focus-to-current-child ()
(labels ((rec (child)
(typecase child
(xlib:window (focus-window child))
(frame (rec (frame-selected-child child))))))
(no-focus)
(rec (current-child))))
(defun adapt-frame-to-parent (frame parent)
(multiple-value-bind (nx ny nw nh)
(get-parent-layout frame parent)
(with-slots (rx ry rw rh window) frame
(setf rx nx ry ny
rw (max nw 1)
rh (max nh 1)))))
(defun adapt-child-to-rect (rect)
(let ((window (typecase (child-rect-child rect)
(xlib:window (when (managed-window-p (child-rect-child rect) (child-rect-parent rect))
(child-rect-child rect)))
(frame (frame-window (child-rect-child rect))))))
(when window
(let ((change (or (/= (x-drawable-x window) (child-rect-x rect))
(/= (x-drawable-y window) (child-rect-y rect))
(/= (x-drawable-width window) (child-rect-w rect))
(/= (x-drawable-height window) (child-rect-h rect)))))
(when change
(setf (x-drawable-width window) (child-rect-w rect)
(x-drawable-height window) (child-rect-h rect)
(x-drawable-x window) (child-rect-x rect)
(x-drawable-y window) (child-rect-y rect)))
change))))
(let ((displayed-child nil))
(defun get-displayed-child ()
displayed-child)
(defun show-all-children (&optional (from-root-frame nil))
"Show all children and hide those not in a root frame"
(declare (ignore from-root-frame))
(let ((geometry-change nil)
(hidden-child nil)
(has-no-leader-list nil))
(labels ((set-has-no-leader-list ()
(let ((window-list nil)
(leader-list nil))
(with-all-windows (*root-frame* win)
(let ((leader (window-leader win)))
(when leader
(when (member leader window-list :test (lambda (x y) (eql x (first y))))
(pushnew leader leader-list))
(push (list leader win) window-list))))
(dolist (leader-win window-list)
(unless (member leader-win leader-list :test (lambda (x y) (eql (first x) y)))
(push (second leader-win) has-no-leader-list)))))
(in-displayed-list (child)
(member child displayed-child :test (lambda (c rect)
(child-equal-p c (child-rect-child rect)))))
(add-in-hidden-list (child)
(pushnew child hidden-child :test #'child-equal-p))
(set-geometry (child parent in-current-root child-current-root-p)
(if (or in-current-root child-current-root-p)
(when (frame-p child)
(adapt-frame-to-parent child (if child-current-root-p nil parent)))
(add-in-hidden-list child)))
(recurse-on-frame-child (child in-current-root child-current-root-p selected-p)
(let ((selected-child (frame-selected-child child)))
(dolist (sub-child (frame-child child))
(rec sub-child child
(and selected-p (child-equal-p sub-child selected-child))
(or in-current-root child-current-root-p)))))
(hidden-child-p (rect)
(when (or (frame-p (child-rect-child rect))
(member (window-type (child-rect-child rect)) *show-hide-policy-type*))
(dolist (r displayed-child)
(when (and (rect-hidden-p r rect)
(or (not (xlib:window-p (child-rect-child r)))
(eq (window-type (child-rect-child r)) :normal)))
(return t)))))
(select-and-display (child parent selected-p)
(multiple-value-bind (nx ny nw nh)
(get-parent-layout child parent)
(let ((rect (make-child-rect :child child :parent parent
:selected-p selected-p
:x nx :y ny :w nw :h nh)))
(if (and *show-hide-policy* (hidden-child-p rect)
(member child has-no-leader-list :test #'child-equal-p))
(add-in-hidden-list child)
(push rect displayed-child)))))
(display-displayed-child ()
(let ((previous nil))
(setf displayed-child (nreverse displayed-child))
(dolist (rect displayed-child)
(when (adapt-child-to-rect rect)
(setf geometry-change t))
(select-child (child-rect-child rect) (child-rect-selected-p rect))
(show-child (child-rect-child rect)
(child-rect-parent rect)
previous)
(setf previous (child-rect-child rect)))))
(rec (child parent selected-p in-current-root)
(let ((child-current-root-p (child-root-p child)))
(unless (in-displayed-list child)
(set-geometry child parent in-current-root child-current-root-p))
(when (frame-p child)
(recurse-on-frame-child child in-current-root child-current-root-p selected-p))
(when (and (or in-current-root child-current-root-p)
(not (in-displayed-list child)))
(select-and-display child parent selected-p)))))
(setf displayed-child nil)
(set-has-no-leader-list)
(rec *root-frame* nil t (child-root-p *root-frame*))
(display-displayed-child)
(dolist (child hidden-child)
(hide-child child))
(set-focus-to-current-child)
(xlib:display-finish-output *display*)
geometry-change))))
(defun hide-all-children (root &optional except)
"Hide all root children"
(when (and (frame-p root) (not (child-equal-p root except)))
(dolist (child (frame-child root))
(hide-all child except))))
(defun hide-all (root &optional except)
"Hide root and all its children"
(unless (child-equal-p root except)
(hide-child root))
(hide-all-children root except))
(defun focus-child (child parent)
"Focus child - Return true if something has change"
(when (and (frame-p parent)
(child-member child (frame-child parent)))
(when (not (child-equal-p child (frame-selected-child parent)))
(with-slots ((parent-child child) selected-pos) parent
(setf parent-child (nth-insert selected-pos child (child-remove child parent-child))))
t)))
(defun focus-child-rec (child parent)
"Focus child and its parents - Return true if something has change"
(let ((change nil))
(labels ((rec (child parent)
(when (focus-child child parent)
(setf change t))
(when parent
(rec parent (find-parent-frame parent)))))
(rec child parent))
change))
(defun set-current-child-generic (child)
(unless (child-equal-p (current-child) child)
(setf (current-child) child)
t))
(defgeneric set-current-child (child parent window-parent))
(defmethod set-current-child ((child xlib:window) parent window-parent)
(set-current-child-generic (if window-parent parent child)))
(defmethod set-current-child ((child frame) parent window-parent)
(declare (ignore parent window-parent))
(set-current-child-generic child))
(defmethod set-current-child (child parent window-parent)
(declare (ignore child parent window-parent))
())
(defun set-current-root (child parent window-parent)
"Set current root if parent is not in current root"
(let ((root (find-root child)))
(when (and root window-parent
(not (child-root-p child))
(not (find-child parent (root-child root))))
(change-root root parent)
t)))
(defun focus-all-children (child parent &optional (window-parent t))
"Focus child and its parents -
For window: set current child to window or its parent according to window-parent"
(let ((new-focus (focus-child-rec child parent))
(new-current-child (set-current-child child parent window-parent))
(new-root (set-current-root child parent window-parent)))
(or new-focus new-current-child new-root)))
(defun select-next-level ()
"Select the next level in frame"
(select-current-frame :maybe)
(when (frame-p (current-child))
(awhen (frame-selected-child (current-child))
(setf (current-child) it)))
(show-all-children))
(defun select-previous-level ()
"Select the previous level in frame"
(unless (child-root-p (current-child))
(select-current-frame :maybe)
(awhen (find-parent-frame (current-child))
(setf (current-child) it))
(show-all-children)))
(defun enter-frame ()
"Enter in the selected frame - ie make it the root frame"
(let ((root (find-root (current-child))))
(when (and root (not (child-equal-p (root-child root) (current-child))))
(change-root root (current-child)))
(show-all-children t)))
(defun leave-frame ()
"Leave the selected frame - ie make its parent the root frame"
(let ((root (find-root (current-child))))
(unless (or (child-equal-p (root-child root) *root-frame*)
(child-original-root-p (root-child root)))
(awhen (and root (find-parent-frame (root-child root)))
(when (frame-p it)
(change-root root it)))
(show-all-children))))
;;; Other actions (select-next-child, select-next-brother...) are in
;;; clfswm-circulate-mode.lisp
(defun frame-lower-child ()
"Lower the child in the current frame"
(when (frame-p (current-child))
(with-slots (child selected-pos) (current-child)
(unless (>= selected-pos (length child))
(when (nth (1+ selected-pos) child)
(rotatef (nth selected-pos child)
(nth (1+ selected-pos) child)))
(incf selected-pos)))
(show-all-children)))
(defun frame-raise-child ()
"Raise the child in the current frame"
(when (frame-p (current-child))
(with-slots (child selected-pos) (current-child)
(unless (< selected-pos 1)
(when (nth (1- selected-pos) child)
(rotatef (nth selected-pos child)
(nth (1- selected-pos) child)))
(decf selected-pos)))
(show-all-children)))
(defun frame-select-next-child ()
"Select the next child in the current frame"
(when (frame-p (current-child))
(with-slots (child selected-pos) (current-child)
(setf selected-pos (mod (1+ selected-pos) (max (length child) 1))))
(show-all-children)))
(defun frame-select-previous-child ()
"Select the previous child in the current frame"
(when (frame-p (current-child))
(with-slots (child selected-pos) (current-child)
(setf selected-pos (mod (1- selected-pos) (max (length child) 1))))
(show-all-children)))
(defun switch-to-root-frame (&key (show-later nil))
"Switch to the root frame"
(let ((root (find-root (current-child))))
(when root
(change-root root (root-original root)))
(unless show-later
(show-all-children t))))
(defun switch-and-select-root-frame (&key (show-later nil))
"Switch and select the root frame"
(let ((root (find-root (current-child))))
(when root
(change-root root (root-original root))
(setf (current-child) (root-original root)))
(unless show-later
(show-all-children t))))
(defun toggle-show-root-frame ()
"Show/Hide the root frame"
(setf *show-root-frame-p* (not *show-root-frame-p*))
(show-all-children))
(defun move-child-to (child frame-dest)
(when (and child (frame-p frame-dest))
(remove-child-in-frame child (find-parent-frame child))
(pushnew child (frame-child frame-dest) :test #'child-equal-p)
(focus-all-children child frame-dest)
(show-all-children t)))
(defun prevent-current-*-equal-child (child)
" Prevent current-root and current-child equal to child"
(if (child-original-root-p child)
nil
(progn
(awhen (child-root-p child)
(change-root it (find-parent-frame child)))
(when (child-equal-p child (current-child))
(awhen (find-root child)
(setf (current-child) (root-child it))))
t)))
(defun remove-child-in-frame (child frame)
"Remove the child in frame"
(when (frame-p frame)
(setf (frame-child frame) (child-remove child (frame-child frame)))))
(defun remove-child-in-frames (child root)
"Remove child in the frame root and in all its children"
(with-all-frames (root frame)
(remove-child-in-frame child frame)))
(defun remove-child-in-all-frames (child)
"Remove child in all frames from *root-frame*"
(when (prevent-current-*-equal-child child)
(remove-child-in-frames child *root-frame*)))
(defun delete-child-in-frames (child root &optional (close-methode 'delete-window))
"Delete child in the frame root and in all its children
Warning:frame window and gc are freeed."
(with-all-frames (root frame)
(remove-child-in-frame child frame)
(unless (find-frame-window (frame-window frame))
(awhen (frame-gc frame) (xlib:free-gcontext it) (setf it nil))
(awhen (frame-window frame) (xlib:destroy-window it) (setf it nil))))
(when (xlib:window-p child)
(funcall close-methode child)
(netwm-remove-in-client-list child)))
(defun delete-child-in-all-frames (child &optional (close-methode 'delete-window))
"Delete child in all frames from *root-frame*"
(when (prevent-current-*-equal-child child)
(delete-child-in-frames child *root-frame* close-methode)))
(defun delete-child-and-children-in-frames (child root &optional (close-methode 'delete-window))
"Delete child and its children in the frame root and in all its children
Warning:frame window and gc are freeed."
(when (and (frame-p child) (frame-child child))
(dolist (ch (frame-child child))
(delete-child-and-children-in-frames ch root close-methode)))
(delete-child-in-frames child root close-methode))
(defun delete-child-and-children-in-all-frames (child &optional (close-methode 'delete-window))
"Delete child and its children in all frames from *root-frame*"
(when (prevent-current-*-equal-child child)
(when (frame-p child)
(delete-child-and-children-in-frames child *root-frame* close-methode))
(when (xlib:window-p child)
(funcall close-methode child))
(when (frame-p child)
(awhen (frame-gc child) (xlib:free-gcontext it) (setf it nil))
(awhen (frame-window child) (xlib:destroy-window it) (setf it nil)))))
(defun clean-windows-in-all-frames ()
"Remove all xlib:windows present in *root-frame* and not in the xlib tree"
(let ((x-tree (xlib:query-tree *root*)))
(with-all-frames (*root-frame* frame)
(dolist (child (frame-child frame))
(when (xlib:window-p child)
(unless (member child x-tree :test #'xlib:window-equal)
(when (prevent-current-*-equal-child child)
(setf (frame-child frame)
(child-remove child (frame-child frame))))))))))
(defun do-all-frames-nw-hook (window)
"Call nw-hook of each frame."
(catch 'nw-hook-loop
(let ((found nil))
(with-all-frames (*root-frame* frame)
(awhen (frame-nw-hook frame)
(setf found (call-hook it frame window))))
found)))
(defun process-new-window (window)
"When a new window is created (or when we are scanning initial
windows), this function dresses the window up and gets it ready to be
managed."
(setf (xlib:window-event-mask window) *window-events*)
(set-window-state window +normal-state+)
(setf (x-drawable-border-width window) (case (window-type window)
(:normal *border-size*)
(:maxsize 0)
(:transient *border-size*)
(:dialog *border-size*)
(t *border-size*)))
(grab-all-buttons window)
(unless (never-managed-window-p window)
(unless (do-all-frames-nw-hook window)
(call-hook *default-nw-hook* *root-frame* window)))
(netwm-add-in-client-list window))
(defun with-all-mapped-windows (screen fun)
(let ((all-windows (get-all-windows)))
(dolist (win (xlib:query-tree (xlib:screen-root screen)))
(unless (child-member win all-windows)
(let ((map-state (xlib:window-map-state win))
(wm-state (window-state win)))
(unless (or (eql (xlib:window-override-redirect win) :on)
(eql win *no-focus-window*)
(is-notify-window-p win))
(when (or (eql map-state :viewable)
(eql wm-state +iconic-state+))
(funcall fun win))))))))
(defun store-root-background ()
(with-all-mapped-windows *screen* #'hide-window)
(setf *background-image* (xlib:create-pixmap :width (screen-width)
:height (screen-height)
:depth (xlib:screen-root-depth *screen*)
:drawable *root*)
*background-gc* (xlib:create-gcontext :drawable *background-image*
:foreground (get-color *frame-foreground*)
:background (get-color *frame-background*)
:font *default-font*
:line-style :solid))
(xlib:copy-area *root* *background-gc*
0 0 (screen-width) (screen-height)
*background-image* 0 0)
(with-all-mapped-windows *screen* #'unhide-window))
(defun hide-existing-windows (screen)
"Hide all existing windows in screen"
(dolist (win (xlib:query-tree (xlib:screen-root screen)))
(hide-window win)))
(defun process-existing-windows (screen)
"Windows present when clfswm starts up must be absorbed by clfswm."
(setf *in-process-existing-windows* t)
(let ((id-list nil)
(all-windows (get-all-windows))
(all-frame-windows (get-all-frame-windows)))
(dolist (win (xlib:query-tree (xlib:screen-root screen)))
(unless (or (child-member win all-windows)
(child-member win all-frame-windows)
(child-equal-p win *no-focus-window*)
(child-equal-p win *sm-window*))
(let ((map-state (xlib:window-map-state win))
(wm-state (window-state win)))
(unless (or (eql (xlib:window-override-redirect win) :on)
(eql win *no-focus-window*)
(is-notify-window-p win)
(never-managed-window-p win))
(when (or (eql map-state :viewable)
(eql wm-state +iconic-state+))
(format t "Processing ~S: type=~A ~S~%" (xlib:wm-name win) (window-type win) win)
(unhide-window win)
(process-new-window win)
(map-window win)
(raise-window win)
(pushnew (xlib:window-id win) id-list))))))
(netwm-set-client-list id-list))
(setf *in-process-existing-windows* nil))
;;; Child order manipulation functions
(defun put-child-on-top (child parent)
"Put the child on top of its parent children"
(when (frame-p parent)
(setf (frame-child parent) (cons child (child-remove child (frame-child parent)))
(frame-selected-pos parent) 0)))
(defun put-child-on-bottom (child parent)
"Put the child at the bottom of its parent children"
(when (frame-p parent)
(setf (frame-child parent) (append (child-remove child (frame-child parent)) (list child))
(frame-selected-pos parent) 0)))
(let ((last-child nil))
(defun manage-focus (window root-x root-y)
(case (if (frame-p (current-child))
(frame-focus-policy (current-child))
*default-focus-policy*)
(:sloppy (focus-window window))
(:sloppy-strict (when (and (frame-p (current-child))
(child-member window (frame-child (current-child))))
(focus-window window)))
(:sloppy-select (let* ((child (find-child-under-mouse root-x root-y))
(parent (find-parent-frame child)))
(unless (or (child-root-p child)
(child-equal-p (typecase child
(xlib:window parent)
(t child))
(current-child)))
(focus-all-children child parent)
(show-all-children))))
(:sloppy-select-window (let* ((child (find-child-under-mouse root-x root-y))
(parent (find-parent-frame child))
(need-warp-pointer (not (or (frame-p child)
(child-equal-p child (frame-selected-child parent))))))
(unless (or (child-root-p child)
(child-equal-p child last-child))
(setf last-child child)
(when (focus-all-children child parent)
(show-all-children)
(when (and need-warp-pointer
(not (eql (frame-data-slot (current-child) :tile-layout-keep-position)
:yes)))
(typecase child
(xlib:window (xlib:warp-pointer *root*
(truncate (+ (x-drawable-x child)
(/ (x-drawable-width child) 2)))
(truncate (+ (x-drawable-y child)
(/ (x-drawable-height child) 2)))))
(frame (xlib:warp-pointer *root*
(+ (frame-rx child) 10)
(+ (frame-ry child) 10))))))))))))
;;; Dumping/restoring frame tree functions
(defun print-frame-tree (root &optional (disp-fun #'child-fullname))
(labels ((rec (child space)
(print-space space)
(format t "~A~%" (funcall disp-fun child))
(when (frame-p child)
(dolist (c (reverse (frame-child child)))
(rec c (+ space 2))))))
(rec root 0)))
(defmethod print-object ((frame frame) stream)
(format stream "~A - ~F ~F ~F ~F ~A ~A ~A ~X ~X ~A ~A ~A ~A"
(child-fullname frame)
(frame-x frame) (frame-y frame) (frame-w frame) (frame-h frame)
(frame-layout frame) (frame-nw-hook frame)
(frame-managed-type frame)
(frame-forced-managed-window frame)
(frame-forced-unmanaged-window frame)
(frame-show-window-p frame)
(frame-hidden-children frame)
(frame-selected-pos frame)
(frame-focus-policy frame)
;;(frame-data frame))
))
(defun window->xid (window)
(when (xlib:window-p window)
(xlib:window-id window)))
(defun xid->window (xid)
(dolist (win (xlib:query-tree *root*))
(when (equal xid (xlib:window-id win))
(return-from xid->window win))))
(defun copy-frame (frame &optional (window-fun #'window->xid))
(labels ((handle-window-list (list)
(loop for win in list
collect (funcall window-fun win))))
(with-slots (name number x y w h layout nw-hook managed-type
forced-managed-window forced-unmanaged-window
show-window-p hidden-children selected-pos
focus-policy data)
frame
(make-instance 'frame :name name :number number
:x x :y y :w w :h h
:layout layout :nw-hook nw-hook
:managed-type (if (consp managed-type)
(copy-list managed-type)
managed-type)
:forced-managed-window (handle-window-list forced-managed-window)
:forced-unmanaged-window (handle-window-list forced-unmanaged-window)
:show-window-p show-window-p
:hidden-children (handle-window-list hidden-children)
:selected-pos selected-pos
:focus-policy focus-policy
:data (copy-tree data)))))
(defun dump-frame-tree (root &optional (window-fun #'window->xid))
"Return a tree of frames."
(let ((new-root (copy-frame root window-fun)))
(labels ((store (from root)
(when (frame-p from)
(dolist (c (reverse (frame-child from)))
(push (if (frame-p c)
(let ((new-root (copy-frame c window-fun)))
(store c new-root)
new-root)
(funcall window-fun c))
(frame-child root))))))
(store root new-root)
new-root)))
(defun test-dump-frame-tree ()
(let ((store (dump-frame-tree *root-frame*)))
(print-frame-tree store
#'(lambda (x)
(format nil "~A" x)))
(format t "~&--------------------------------------------------~2%")
(print-frame-tree (dump-frame-tree store #'xid->window)
#'(lambda (x)
(format nil "~A" (if (frame-p x) x (child-fullname x)))))))
| 64,341 | Common Lisp | .lisp | 1,426 | 35.979663 | 125 | 0.59642 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | c866c78f0f560aa3714370ca502a85d2ca40cb97bce4d2c44d5c912ac8f01cba | 6,486 | [
-1
] |
6,487 | clfswm-corner.lisp | LdBeth_CLFSWM/src/clfswm-corner.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Corner functions
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2005-2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(symbol-macrolet ((sw (screen-width))
(sh (screen-height))
(cs *corner-size*))
(defun in-corner (corner x y)
"Return t if (x, y) is in corner.
Corner is one of :bottom-right :bottom-left :top-right :top-left"
(multiple-value-bind (xmin ymin xmax ymax)
(case corner
(:bottom-right (values (- sw cs) (- sh cs) sw sh))
(:bottom-left (values 0 (- sh cs) cs sh))
(:top-left (values 0 0 cs cs))
(:top-right (values (- sw cs) 0 sw cs))
(t (values 10 10 0 0)))
(and (<= xmin x xmax)
(<= ymin y ymax)))))
(symbol-macrolet ((sw (screen-width))
(sh (screen-height))
(cs *corner-size*))
(defun find-corner (x y)
(cond ((and (< cs x (- sw cs)) (< cs y (- sh cs))) nil)
((and (<= 0 x cs) (<= 0 y cs)) :top-left)
((and (<= (- sw cs) x sw) (<= 0 y cs)) :top-right)
((and (<= 0 x cs) (<= (- sh cs) y sh)) :bottom-left)
((and (<= (- sw cs) x sw) (<= (- sh cs) y sh)) :bottom-right)
(t nil))))
(defun do-corner-action (x y corner-list)
"Do the action associated with corner. The corner function must return T to
stop the button event"
(when (frame-p (find-current-root))
(let ((corner (find-corner x y)))
(when corner
(let ((fun (second (assoc corner corner-list))))
(when fun
(funcall fun)))))))
;;;***************************************;;;
;;; CONFIG - Corner actions definitions: ;;;
;;;***************************************;;;
(defun find-window-in-query-tree (target-win)
(when target-win
(dolist (win (xlib:query-tree *root*))
(when (child-equal-p win target-win)
(return t)))))
(defun wait-window-in-query-tree (wait-test)
(dotimes (try *corner-command-try-number*)
(dolist (win (xlib:query-tree *root*))
(when (funcall wait-test win)
(return-from wait-window-in-query-tree win)))
(sleep *corner-command-try-delay*)))
(defun generic-present-body (cmd wait-test win &optional focus-p)
(stop-button-event)
(unless (find-window-in-query-tree win)
(do-shell cmd)
(setf win (wait-window-in-query-tree wait-test))
(if win
(progn
(grab-all-buttons win)
(hide-window win))
(notify-message *corner-error-message-delay*
(list (format nil "Error with command ~S" cmd)
*corner-error-message-color*))))
(when win
(cond ((window-hidden-p win)
(unhide-window win)
(when focus-p
(focus-window win))
(raise-window win))
(t (hide-window win)
(show-all-children))))
win)
(let (win)
(defun close-virtual-keyboard ()
(when win
(xlib:destroy-window win)
(xlib:display-finish-output *display*)
(setf win nil)))
(defun present-virtual-keyboard ()
"Present a virtual keyboard"
(setf win (generic-present-body *virtual-keyboard-cmd*
(lambda (win)
(string-equal (xlib:get-wm-class win) "xvkbd"))
win))
t))
(let (win)
(defun equal-clfswm-terminal (window)
(when (and win (xlib:window-p window))
(xlib:window-equal window win)))
(defun close-clfswm-terminal ()
(when win
(xlib:destroy-window win)
(xlib:display-finish-output *display*)
(setf win nil)))
(defun present-clfswm-terminal ()
"Hide/Unhide a terminal"
(setf win (generic-present-body *clfswm-terminal-cmd*
(lambda (win)
(string-equal (xlib:wm-name win) *clfswm-terminal-name*))
win
t))
t))
| 4,732 | Common Lisp | .lisp | 124 | 33.201613 | 78 | 0.574918 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 4823ac6f2a6464b0d12a3634aaf5e27d4ddeddf3ef90a3fcb2643df721af9f5e | 6,487 | [
-1
] |
6,488 | contrib-example.lisp | LdBeth_CLFSWM/contrib/contrib-example.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: A contrib example.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: A contrib example.
;;; If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "contrib-example.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading Contrib Example code... ")
(format t "~&My contribution code start here~%")
(format t "done~%")
| 1,512 | Common Lisp | .lisp | 34 | 43.352941 | 78 | 0.574627 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | f1f7c7d6945ab9a64699ae20a9a3096130544fa6d957a8949413c145b962834b | 6,488 | [
-1
] |
6,489 | cd-player.lisp | LdBeth_CLFSWM/contrib/cd-player.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Music Player Daemon (MPD) interface
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: Handle the CD player
;;; This code needs pcd (http://hocwp.free.fr/pcd.html).
;; If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "cd-player.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading CDPLAYER code... ")
(defun cdplayer-menu ()
"Open the CDPLAYER menu"
(open-menu (find-menu 'cdplayer-menu)))
(defun cdplayer-play ()
"Start playing CD"
(do-shell "pcd play"))
(defun cdplayer-stop ()
"Stop playing CD"
(do-shell "pcd stop"))
(defun cdplayer-pause ()
"Toggle pause"
(do-shell "pcd toggle"))
(defun show-cdplayer-status ()
"Show the current CD status"
(info-on-shell "CDPLAYER status:" "pcd info")
(cdplayer-menu))
(defun show-cdplayer-playlist ()
"Show the current CD playlist"
(info-on-shell "CDPLAYER:" "pcd more_info")
(cdplayer-menu))
(defun cdplayer-next-track ()
"Play the next CD track"
(do-shell "pcd next")
(cdplayer-menu))
(defun cdplayer-previous-track ()
"Play the previous CD track"
(do-shell "pcd previous")
(cdplayer-menu))
(defun cdplayer-eject ()
"Eject CD"
(do-shell "pcd eject"))
(defun cdplayer-close ()
"Close CD"
(do-shell "pcd close"))
(unless (find-menu 'cdplayer-menu)
(add-sub-menu 'help-menu "i" 'cdplayer-menu "CDPLAYER menu")
(add-menu-key 'cdplayer-menu "y" 'cdplayer-play)
(add-menu-key 'cdplayer-menu "k" 'cdplayer-stop)
(add-menu-key 'cdplayer-menu "t" 'cdplayer-pause)
(add-menu-key 'cdplayer-menu "s" 'show-cdplayer-status)
(add-menu-key 'cdplayer-menu "l" 'show-cdplayer-playlist)
(add-menu-key 'cdplayer-menu "n" 'cdplayer-next-track)
(add-menu-key 'cdplayer-menu "p" 'cdplayer-previous-track)
(add-menu-key 'cdplayer-menu "e" 'cdplayer-eject)
(add-menu-key 'cdplayer-menu "c" 'cdplayer-close))
(format t "done~%")
| 3,037 | Common Lisp | .lisp | 79 | 36.392405 | 78 | 0.636086 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 3689f76b0a52af04bcba9379eb81d22aa8b1c167db8a718c51659f76a971e4c9 | 6,489 | [
-1
] |
6,490 | reboot-halt.lisp | LdBeth_CLFSWM/contrib/reboot-halt.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Reboot and halt menu
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "mpd.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading Reboot/Halt code... ")
(defconfig *power-suspend-to-ram-cmd* "sudo pm-suspend"
'power-management "Suspend to ram command")
(defconfig *power-suspend-to-disk-cmd* "sudo pm-hibernate"
'power-management "Suspend to disk command")
(defconfig *power-reboot-cmd* "sudo /sbin/reboot"
'power-management "Reboot command")
(defconfig *power-halt-cmd* "sudo /sbin/halt"
'power-management "Halt command")
(defun reboot-halt-menu ()
"Open the Reboot/Halt menu"
(open-menu (find-menu 'reboot-halt-menu)))
(defun do-with-terminal (command)
(do-shell (format nil "xterm -e '~A'" command)))
;;(do-shell (format nil "xterm -e 'echo ~A; sleep 3'" command))) ;; test
(defun do-nothing ()
"Do nothing"
())
(defun do-suspend ()
"Suspend the computer to RAM"
(do-with-terminal *power-suspend-to-ram-cmd*))
(defun do-hibernate ()
"Suspend the computer to DISK"
(do-with-terminal *power-suspend-to-disk-cmd*))
(defun do-reboot ()
"Reboot the computer"
(do-with-terminal *power-reboot-cmd*))
(defun do-halt ()
"Halt the computer"
(do-with-terminal *power-halt-cmd*))
(unless (find-menu 'reboot-halt-menu)
(add-sub-menu 'clfswm-menu "Pause" 'reboot-halt-menu "Suspend/Reboot/Halt menu")
(add-menu-key 'reboot-halt-menu "-" 'do-nothing)
(add-menu-key 'reboot-halt-menu "s" 'do-suspend)
(add-menu-key 'reboot-halt-menu "d" 'do-hibernate)
(add-menu-key 'reboot-halt-menu "r" 'do-reboot)
(add-menu-key 'reboot-halt-menu "h" 'do-halt))
(defun reboot-halt-binding ()
(define-main-key ("Pause") 'reboot-halt-menu))
(add-hook *binding-hook* 'reboot-halt-binding)
(format t "done~%")
| 2,990 | Common Lisp | .lisp | 71 | 40.211268 | 82 | 0.640028 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 6286437dba036b9f58043f252c4a84a153ee956263541fc91c37251650374db5 | 6,490 | [
-1
] |
6,491 | blank-window-mode.lisp | LdBeth_CLFSWM/contrib/blank-window-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Blank window mode to place blank window on screen and manage
;;; them with the keyboard or the mouse.
;;; This is useful when you want to hide some part of the screen (for example
;;; in school class for interactive presentation).
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: Blank window mode to place blank window on screen.
;;; If you want to use this file, just add this line in your configuration
;;; file:
;;;
;;; (load-contrib "blank-window-mode.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading Blank Window Mode code... ")
(defconfig *blank-window-width* 50 'blank-window "Blank window width")
(defconfig *blank-window-height* 20 'blank-window "Blank window height")
(defconfig *blank-window-color* "white" 'blank-window "Blank window color")
(defconfig *blank-window-border* "magenta" 'blank-window "Blank window border color")
(defparameter *blank-window-list* nil)
(defparameter *in-blank-window-mode* nil)
(defparameter *blank-window-show-current* nil)
(defparameter *blank-window-keys* nil)
(defparameter *blank-window-mouse* nil)
(define-init-hash-table-key *blank-window-keys* "Blank-Window mode keys")
(define-init-hash-table-key *blank-window-mouse* "Blank-Window mode mouse button")
(define-define-key "blank-window" *blank-window-keys*)
(define-define-mouse "blank-window-mouse" *blank-window-mouse*)
(add-hook *binding-hook* 'init-*blank-window-keys*)
(defun leave-blank-window-mode (&optional window root-x root-y)
"Leave the blank-window mode"
(declare (ignore window root-x root-y))
(when *in-blank-window-mode*
(throw 'exit-blank-window-loop nil)))
(defun bwm-enter-function ()
(setf *in-blank-window-mode* t)
(ungrab-main-keys)
(xgrab-keyboard *root*)
(xgrab-pointer *root* 66 67)
(dolist (window *blank-window-list*)
(raise-window window)))
(defun bwm-leave-function ()
(setf *in-blank-window-mode* nil)
(xungrab-keyboard)
(xungrab-pointer)
(grab-main-keys)
(wait-no-key-or-button-press))
(define-handler blank-window-mode :key-press (code state)
(funcall-key-from-code *blank-window-keys* code state))
(define-handler blank-window-mode :button-press (code state window root-x root-y)
(funcall-button-from-code *blank-window-mouse* code state window root-x root-y *fun-press*))
(defun blank-window-mode ()
"Blank window mode"
(generic-mode 'blank-window-mode
'exit-blank-window-loop
:enter-function #'bwm-enter-function
;;:loop-function #'bwm-loop-function
:leave-function #'bwm-leave-function
:original-mode 'main-mode))
(defun create-new-blank-window (&rest args)
"Create a new blank window"
(declare (ignore args))
(with-x-pointer
(push (xlib:create-window :parent *root*
:x (- x 50) :y y
:width *blank-window-width* :height *blank-window-height*
:background (get-color *blank-window-color*)
:border-width 0
:border (get-color *blank-window-border*)
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure))
*blank-window-list*))
(map-window (first *blank-window-list*)))
(defun clear-all-blank-window ()
"Clear all blank window"
(dolist (window *blank-window-list*)
(hide-window window)
(xlib:destroy-window window))
(setf *blank-window-list* nil))
(defmacro with-current-blank-window ((window) &body body)
`(let ((,window (first *blank-window-list*)))
(when ,window
,@body)))
(defun blank-window-fill-width ()
"Current blank window fill all width screen"
(with-current-blank-window (window)
(setf (xlib:drawable-x window) 0
(xlib:drawable-width window) (xlib:drawable-width *root*))))
(defun blank-window-fill-height ()
"Current blank window fill all height screen"
(with-current-blank-window (window)
(setf (xlib:drawable-y window) 0
(xlib:drawable-height window) (xlib:drawable-height *root*))))
(defun blank-window-down (dy)
"Move current blank window down"
(with-current-blank-window (window)
(incf (xlib:drawable-y window) dy)))
(defun blank-window-right (dx)
"Move current blank window right"
(with-current-blank-window (window)
(incf (xlib:drawable-x window) dx)))
(defun blank-window-inc-width (dw)
"Change current blank window width"
(with-current-blank-window (window)
(decf (xlib:drawable-x window) dw)
(incf (xlib:drawable-width window) (* dw 2))))
(defun blank-window-inc-height (dh)
"Change current blank window height"
(with-current-blank-window (window)
(decf (xlib:drawable-y window) dh)
(incf (xlib:drawable-height window) (* dh 2))))
(defun select-next-blank-window ()
"Select next blank window"
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) 0))
(setf *blank-window-list* (rotate-list *blank-window-list*))
(when *blank-window-show-current*
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) 1))))
(defun toggle-show-current-blank-window ()
(setf *blank-window-show-current* (not *blank-window-show-current*))
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) (if *blank-window-show-current* 1 0))))
(defun remove-current-blank-window ()
(let ((window (pop *blank-window-list*)))
(when window
(hide-window window)
(xlib:destroy-window window)))
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) (if *blank-window-show-current* 1 0))))
(defun find-blank-window-under-mouse ()
"Return the blank window under the mouse pointer if any"
(with-x-pointer
(dolist (win *blank-window-list*)
(when (in-window win x y)
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) 0))
(setf *blank-window-list* (remove win *blank-window-list* :test #'xlib:window-equal))
(push win *blank-window-list*)
(when *blank-window-show-current*
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) 1)))
(return-from find-blank-window-under-mouse win)))))
(defun move-blank-window (window root-x root-y)
"Move blank window with the mouse"
(declare (ignore window))
(let ((window (find-blank-window-under-mouse)))
(when window
(move-window window root-x root-y))))
(defun resize-blank-window (window root-x root-y)
"Resize blank window with the mouse"
(declare (ignore window))
(let ((window (find-blank-window-under-mouse)))
(when window
(resize-window window root-x root-y))))
(defun hide-unhide-current-blank-window ()
"Hide or unhide the current blank window"
(with-current-blank-window (window)
(if (window-hidden-p window)
(unhide-window window)
(hide-window window))))
(defun blank-black-window ()
"Open a black window. ie light of the screen"
(let ((black-win (xlib:create-window :parent *root*
:x 0 :y 0
:width (xlib:drawable-width *root*)
:height (xlib:drawable-height *root*)
:background (get-color "black")
:border-width 0
:border (get-color "black")
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure))))
(map-window black-win)
(wait-no-key-or-button-press)
(wait-a-key-or-button-press)
(xlib:destroy-window black-win)
(wait-no-key-or-button-press)))
(defun set-default-blank-window-keys ()
;;(define-blank-window-key ("Return") 'leave-blank-window-mode)
(define-blank-window-key ("Escape") 'leave-blank-window-mode)
(define-blank-window-key ("twosuperior") 'leave-blank-window-mode)
(define-blank-window-key ("Return") 'create-new-blank-window)
(define-blank-window-key ("BackSpace" :control) 'clear-all-blank-window)
(define-blank-window-key ("Tab") 'select-next-blank-window)
(define-blank-window-key ("w") 'blank-window-fill-width)
(define-blank-window-key ("h") 'blank-window-fill-height)
(define-blank-window-key ("Down") 'blank-window-down 5)
(define-blank-window-key ("Down" :shift) 'blank-window-down 1)
(define-blank-window-key ("Down" :control) 'blank-window-down 20)
(define-blank-window-key ("Up") 'blank-window-down -5)
(define-blank-window-key ("Up" :shift) 'blank-window-down -1)
(define-blank-window-key ("Up" :control) 'blank-window-down -20)
(define-blank-window-key ("Right") 'blank-window-right 5)
(define-blank-window-key ("Right" :shift) 'blank-window-right 1)
(define-blank-window-key ("Right" :control) 'blank-window-right 20)
(define-blank-window-key ("Left") 'blank-window-right -5)
(define-blank-window-key ("Left" :shift) 'blank-window-right -1)
(define-blank-window-key ("Left" :control) 'blank-window-right -20)
(define-blank-window-key ("c") 'toggle-show-current-blank-window)
(define-blank-window-key ("p") 'blank-window-inc-width 1)
(define-blank-window-key ("o") 'blank-window-inc-height 1)
(define-blank-window-key ("m") 'blank-window-inc-width -1)
(define-blank-window-key ("l") 'blank-window-inc-height -1)
(define-blank-window-key ("Delete") 'remove-current-blank-window)
(define-blank-window-key ("t") 'hide-unhide-current-blank-window)
(define-blank-window-key ("Control_R") 'banish-pointer)
(define-blank-window-key ("b") 'banish-pointer)
(define-blank-window-key ("x") 'blank-black-window)
(define-blank-window-mouse (1) 'move-blank-window)
(define-blank-window-mouse (2) 'create-new-blank-window)
(define-blank-window-mouse (3) 'resize-blank-window))
(add-hook *binding-hook* 'set-default-blank-window-keys)
(format t "done~%")
| 11,127 | Common Lisp | .lisp | 233 | 42.223176 | 94 | 0.660454 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 1918886047537de2a8108120f32f7797190c9e1652f6c3c8f14ef6145a8f1f2b | 6,491 | [
-1
] |
6,492 | toolbar.lisp | LdBeth_CLFSWM/contrib/toolbar.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Toolbar
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "toolbar.lisp")
;;;
;;; You can add a toolbar with the function add-toolbar in your configuration
;;; file. You can obtain modules list with the list-toolbar-modules function.
;;;
;;; For convenience, here is the add-toolbar documentation:
;;;
;;; add-toolbar (root-x root-y direction size placement modules
;;; &key (autohide *toolbar-default-autohide*)
;;; (thickness *toolbar-default-thickness*)
;;; (refresh-delay *toolbar-default-refresh-delay*)
;;; (border-size *toolbar-default-border-size*))
;;; "Add a new toolbar.
;;; root-x, root-y: root coordinates or if root-y is nil, root-x is the nth root in root-list.
;;; direction: one of :horiz or :vert
;;; placement: same argument as with-placement macro
;;; modules: list of modules: a list of module name, position in percent and arguments.
;;; 0%=left/up <-> 100%=right/down.
;;; Example: '((clock 1) (label 50 \"My label\") (clickable-clock 90))
;;; size: toolbar size in percent of root size
;;; thickness: toolbar height for horizontal toolbar or width for vertical one
;;; autohide: one of nil, :click, or :motion
;;; refresh-delay: refresh delay for toolbar in seconds
;;; border-size: toolbar window border size"
;;;
;;; Here are some examples:
;;; (load-contrib "toolbar.lisp")
;;;
;;; ;; Add an horizontal toolbar on root at coordinates 0,0 pixels
;;; ;; with default modules
;;;
;;; (add-toolbar 0 0 :horiz 80 'top-middle-root-placement *default-toolbar*)
;;;
;;;
;;; ;; Add an horizontal toolbar on root at coordinates 0,0 pixels
;;;
;;; (add-toolbar 0 0 :horiz 90 'top-middle-root-placement
;;; '((clock 1) (label 50 "Plop") (clock-second 25) (clickable-clock 99))
;;; :autohide :click
;;; :refresh-delay 1)
;;;
;;;
;;; ;; Add an horizontal toolbar on root at coordinates 0,0 pixels
;;;
;;; (add-toolbar 0 0 :horiz 70 'bottom-middle-root-placement '((clock 1) (label 50 "Paf) (clock 99))
;;; :autohide :motion)
;;;
;;;
;;; ;; Add a vertical toolbar on root 0
;;;
;;; (add-toolbar 0 nil :vert 60 'middle-left-root-placement '((clock 1) (label 50 "My label") (clock 90)))
;;;
;;;
;;; ;; Add a vertical toolbar on root 1
;;;
;;; (add-toolbar 1 nil :vert 70 'bottom-right-root-placement '((clock 1) (label 50) (clickable-clock 99)))
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading Toolbar code... ")
(pushnew :clfswm-toolbar *features*)
(defstruct toolbar root-x root-y root direction size thickness placement refresh-delay
autohide modules clickable hide-state font window gc border-size
exposure-hook button-press-hook motion-notify-hook leave-notify-hook)
(defstruct toolbar-module name pos display-fun click-fun args rect)
(defparameter *toolbar-list* nil)
(defparameter *toolbar-module-list* nil)
(defparameter *toolbar-root-usage* nil)
(defconfig *default-toolbar* '((clfswm-menu 1)
(expose-mode-button 10)
(system-usage 90)
(clickable-clock 99))
'Toolbar "Default toolbar modules")
;;; CONFIG - Toolbar window string colors
(defconfig *toolbar-window-font-string* *default-font-string*
'Toolbar "Toolbar window font string")
(defconfig *toolbar-window-background* "black"
'Toolbar "Toolbar Window background color")
(defconfig *toolbar-window-foreground* "green"
'Toolbar "Toolbar Window foreground color")
(defconfig *toolbar-window-border* "red"
'Toolbar "Toolbar Window border color")
(defconfig *toolbar-default-border-size* 0
'Toolbar "Toolbar Window border size")
(defconfig *toolbar-window-transparency* *default-transparency*
'Toolbar "Toolbar window background transparency")
(defconfig *toolbar-default-thickness* 20
'Toolbar "Toolbar default thickness")
(defconfig *toolbar-default-refresh-delay* 30
'Toolbar "Toolbar default refresh delay")
(defconfig *toolbar-default-autohide* nil
'Toolbar "Toolbar default autohide value")
(defconfig *toolbar-sensibility* 3
'Toolbar "Toolbar sensibility in pixels")
(defconfig *toolbar-window-placement* 'top-left-placement
'Placement "Toolbar window placement")
(use-event-hook :exposure)
(use-event-hook :button-press)
(use-event-hook :motion-notify)
(use-event-hook :leave-notify)
(defun toolbar-symbol-fun (name &optional (type 'display))
(create-symbol-in-package :clfswm 'toolbar- name '-module- type))
(defmacro with-toolbar-root-usage ((root place) &body body)
"Apply body only if root place is not already used"
`(unless (member ,place (gethash ,root *toolbar-root-usage*))
,@body
(pushnew ,place (gethash ,root *toolbar-root-usage*))))
(defun toolbar-adjust-root-size (toolbar &optional (dir +1))
(unless (toolbar-autohide toolbar)
(let ((root (toolbar-root toolbar))
(placement-name (symbol-name (toolbar-placement toolbar)))
(thickness (+ (toolbar-thickness toolbar) (* 2 (toolbar-border-size toolbar)))))
(when (root-p root)
(case (toolbar-direction toolbar)
(:horiz (cond ((search "TOP" placement-name)
(with-toolbar-root-usage (root :top)
(incf (root-y root) (* thickness dir))
(decf (root-h root) (* thickness dir))))
((search "BOTTOM" placement-name)
(with-toolbar-root-usage (root :bottom)
(decf (root-h root) (* thickness dir))))))
(t (cond ((search "LEFT" placement-name)
(with-toolbar-root-usage (root :left)
(incf (root-x root) (* thickness dir))
(decf (root-w root) (* thickness dir))))
((search "RIGHT" placement-name)
(with-toolbar-root-usage (root :right)
(decf (root-w root) (* thickness dir)))))))))))
(defun toolbar-draw-text (toolbar pos1 pos2 text color)
"pos1: percent of toolbar, pos2: pixels in toolbar"
(labels ((horiz-text ()
(let* ((height (- (xlib:font-ascent (toolbar-font toolbar)) (xlib:font-descent (toolbar-font toolbar))))
(dy (truncate (+ pos2 (/ height 2))))
(width (xlib:text-width (toolbar-font toolbar) text))
(pos (truncate (/ (* (- (xlib:drawable-width (toolbar-window toolbar)) width) pos1) 100))))
(xlib:draw-glyphs *pixmap-buffer* (toolbar-gc toolbar) pos dy text)
(values (+ pos (xlib:drawable-x (toolbar-window toolbar)))
(xlib:drawable-y (toolbar-window toolbar))
width
(xlib:drawable-height (toolbar-window toolbar)))))
(vert-text ()
(let* ((width (xlib:max-char-width (toolbar-font toolbar)))
(dx (truncate (- pos2 (/ width 2))))
(dpos (xlib:max-char-ascent (toolbar-font toolbar)))
(height (* dpos (length text)))
(pos (+ (truncate (/ (* (- (xlib:drawable-height (toolbar-window toolbar)) height
(xlib:max-char-descent (toolbar-font toolbar)))
pos1) 100))
(xlib:font-ascent (toolbar-font toolbar)))))
(loop for c across text
for i from 0
do (xlib:draw-glyphs *pixmap-buffer* (toolbar-gc toolbar) dx (+ pos (* i dpos)) (string c)))
(values (xlib:drawable-x (toolbar-window toolbar))
(+ (- pos dpos) (xlib:drawable-y (toolbar-window toolbar)))
(xlib:drawable-width (toolbar-window toolbar))
height))))
(xlib:with-gcontext ((toolbar-gc toolbar) :foreground (get-color color))
(case (toolbar-direction toolbar)
(:horiz (horiz-text))
(:vert (vert-text))))))
(defun toolbar-module-text (toolbar module color formatter &rest text)
"Print a formatted text at module position centered in toolbar"
(toolbar-draw-text toolbar (toolbar-module-pos module) (/ *toolbar-default-thickness* 2)
(apply #'format nil formatter text)
color))
(defun is-valid-toolbar (toolbar)
(member toolbar *toolbar-list*))
(defun refresh-toolbar (toolbar)
(when (is-valid-toolbar toolbar)
(unless (toolbar-hide-state toolbar)
(add-timer (toolbar-refresh-delay toolbar)
(lambda ()
(refresh-toolbar toolbar))
:refresh-toolbar)
(clear-pixmap-buffer (toolbar-window toolbar) (toolbar-gc toolbar))
(dolist (module (toolbar-modules toolbar))
(when (fboundp (toolbar-module-display-fun module))
(apply (toolbar-module-display-fun module) toolbar module (toolbar-module-args module))))
(copy-pixmap-buffer (toolbar-window toolbar) (toolbar-gc toolbar)))))
(defun toolbar-in-sensibility-zone-p (toolbar root-x root-y)
(let* ((tb-win (toolbar-window toolbar))
(win-x (xlib:drawable-x tb-win))
(win-y (xlib:drawable-y tb-win))
(width (xlib:drawable-width tb-win))
(height (xlib:drawable-height tb-win))
(tb-dir (toolbar-direction toolbar) )
(placement-name (symbol-name (toolbar-placement toolbar))))
(or (and (equal tb-dir :horiz) (search "TOP" placement-name)
(<= root-y win-y (+ root-y *toolbar-sensibility*))
(<= win-x root-x (+ win-x width)) (toolbar-autohide toolbar))
(and (equal tb-dir :horiz) (search "BOTTOM" placement-name)
(<= (+ win-y height (- *toolbar-sensibility*)) root-y (+ win-y height))
(<= win-x root-x (+ win-x width)) (toolbar-autohide toolbar))
(and (equal tb-dir :vert) (search "LEFT" placement-name)
(<= root-x win-x (+ root-x *toolbar-sensibility*))
(<= win-y root-y (+ win-y height)) (toolbar-autohide toolbar))
(and (equal tb-dir :vert) (search "RIGHT" placement-name)
(<= (+ win-x width (- *toolbar-sensibility*)) root-x (+ win-x width))
(<= win-y root-y (+ win-y height)) (toolbar-autohide toolbar)))))
(defun toolbar-add-exposure-hook (toolbar)
(push (define-event-hook :exposure (window)
(when (and (is-valid-toolbar toolbar)
(xlib:window-p window)
(xlib:window-equal (toolbar-window toolbar) window))
(refresh-toolbar toolbar)))
(toolbar-exposure-hook toolbar)))
(defun toggle-toolbar-hide-state (toolbar)
(let* ((tb-win (toolbar-window toolbar)))
(if (toolbar-hide-state toolbar)
(progn
(setf (toolbar-hide-state toolbar) nil)
(map-window tb-win)
(raise-window tb-win)
(refresh-toolbar toolbar))
(progn
(hide-window tb-win)
(setf (toolbar-hide-state toolbar) t)))))
(defun toolbar-add-hide-button-press-hook (toolbar)
(push (define-event-hook :button-press (code root-x root-y)
(when (and (is-valid-toolbar toolbar) (= code 1)
(toolbar-in-sensibility-zone-p toolbar root-x root-y))
(toggle-toolbar-hide-state toolbar)
(wait-mouse-button-release)
(stop-button-event)
(exit-handle-event)))
(toolbar-button-press-hook toolbar)))
(defun toolbar-add-hide-motion-hook (toolbar)
(push (define-event-hook :motion-notify (root-x root-y)
(unless (compress-motion-notify)
(when (and (is-valid-toolbar toolbar)
(toolbar-hide-state toolbar)
(toolbar-in-sensibility-zone-p toolbar root-x root-y))
(map-window (toolbar-window toolbar))
(raise-window (toolbar-window toolbar))
(refresh-toolbar toolbar)
(setf (toolbar-hide-state toolbar) nil)
(exit-handle-event))))
(toolbar-motion-notify-hook toolbar)))
(defun toolbar-add-hide-leave-hook (toolbar)
(push (define-event-hook :leave-notify (root-x root-y)
(when (and (is-valid-toolbar toolbar)
(not (toolbar-hide-state toolbar))
(not (in-window (toolbar-window toolbar) root-x root-y)))
(hide-window (toolbar-window toolbar))
(setf (toolbar-hide-state toolbar) t)
(exit-handle-event)))
(toolbar-leave-notify-hook toolbar)))
(defun toolbar-add-clickable-module-hook (toolbar)
(push (define-event-hook :button-press (code state root-x root-y)
(when (and (is-valid-toolbar toolbar)
(in-window (toolbar-window toolbar) root-x root-y)
(not (toolbar-hide-state toolbar)))
(dolist (module (toolbar-modules toolbar))
(when (and (in-rectangle root-x root-y (toolbar-module-rect module))
(fboundp (toolbar-module-click-fun module)))
(apply (toolbar-module-click-fun module) toolbar module code state root-x root-y
(toolbar-module-args module))
(stop-button-event)
(exit-handle-event)))))
(toolbar-button-press-hook toolbar)))
(defun define-toolbar-hooks (toolbar)
(toolbar-add-exposure-hook toolbar)
(when (toolbar-clickable toolbar)
(toolbar-add-clickable-module-hook toolbar))
(case (toolbar-autohide toolbar)
(:click (toolbar-add-hide-button-press-hook toolbar))
(:motion (toolbar-add-hide-motion-hook toolbar)
(toolbar-add-hide-leave-hook toolbar))))
(defun set-clickable-toolbar (toolbar)
(dolist (module (toolbar-modules toolbar))
(when (fboundp (toolbar-module-click-fun module))
(setf (toolbar-clickable toolbar) t))))
(defmacro remove-toolbar-hook (toolbar keyword)
(let ((fun (create-symbol 'toolbar- keyword '-hook)))
`(dolist (hook (,fun ,toolbar))
(remove-event-hook ,keyword hook))))
(let ((windows-list nil))
(defun is-toolbar-window-p (win)
(and (xlib:window-p win) (member win windows-list :test 'xlib:window-equal)))
(defun close-toolbar (toolbar)
(when (toolbar-p toolbar)
(erase-timer :refresh-toolbar-window)
(remove-toolbar-hook toolbar :exposure)
(remove-toolbar-hook toolbar :button-press)
(remove-toolbar-hook toolbar :leave-notify)
(remove-toolbar-hook toolbar :motion-notify)
(setf *never-managed-window-list*
(remove (list #'is-toolbar-window-p nil)
*never-managed-window-list* :test #'equal))
(awhen (toolbar-gc toolbar)
(xlib:free-gcontext it))
(awhen (toolbar-window toolbar)
(xlib:destroy-window it))
(awhen (toolbar-font toolbar)
(xlib:close-font it))
(xlib:display-finish-output *display*)
(setf (toolbar-window toolbar) nil
(toolbar-gc toolbar) nil
(toolbar-font toolbar) nil)))
(defun open-toolbar (toolbar)
(let ((root (root (toolbar-root-x toolbar) (toolbar-root-y toolbar))))
(when (root-p root)
(setf (toolbar-root toolbar) root)
(let ((*get-current-root-fun* (lambda () root)))
(setf (toolbar-font toolbar) (xlib:open-font *display* *toolbar-window-font-string*))
(let* ((width (if (equal (toolbar-direction toolbar) :horiz)
(round (/ (* (root-w root) (toolbar-size toolbar)) 100))
(toolbar-thickness toolbar)))
(height (if (equal (toolbar-direction toolbar) :horiz)
(toolbar-thickness toolbar)
(round (/ (* (root-h root) (toolbar-size toolbar)) 100)))))
(with-placement ((toolbar-placement toolbar) x y width height (toolbar-border-size toolbar))
(setf (toolbar-window toolbar) (xlib:create-window :parent *root*
:x x
:y y
:width width
:height height
:background (get-color *toolbar-window-background*)
:border-width (toolbar-border-size toolbar)
:border (when (plusp (toolbar-border-size toolbar))
(get-color *toolbar-window-border*))
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure :key-press :leave-window
:pointer-motion))
(toolbar-gc toolbar) (xlib:create-gcontext :drawable (toolbar-window toolbar)
:foreground (get-color *toolbar-window-foreground*)
:background (get-color *toolbar-window-background*)
:font (toolbar-font toolbar)
:line-style :solid))
(push (toolbar-window toolbar) windows-list)
(setf (window-transparency (toolbar-window toolbar)) *toolbar-window-transparency*)
(add-in-never-managed-window-list (list 'is-toolbar-window-p nil))
(map-window (toolbar-window toolbar))
(raise-window (toolbar-window toolbar))
(refresh-toolbar toolbar)
(when (toolbar-autohide toolbar)
(hide-window (toolbar-window toolbar))
(setf (toolbar-hide-state toolbar) t))
(xlib:display-finish-output *display*)
(set-clickable-toolbar toolbar)
(define-toolbar-hooks toolbar))))))))
(defun remove-toolbar (toolbar)
(close-toolbar toolbar)
(setf *toolbar-list* (remove toolbar *toolbar-list* :test #'equal)))
(defun open-all-toolbars ()
"Open all toolbars"
(setf *toolbar-root-usage* (make-hash-table :test #'equal))
(dolist (toolbar *toolbar-list*)
(open-toolbar toolbar))
(dolist (toolbar *toolbar-list*)
(toolbar-adjust-root-size toolbar)))
(defun close-all-toolbars ()
(setf *toolbar-root-usage* (make-hash-table :test #'equal))
(dolist (toolbar *toolbar-list*)
(toolbar-adjust-root-size toolbar -1))
(dolist (toolbar *toolbar-list*)
(remove-toolbar toolbar))
(stop-system-poll))
(defun create-toolbar-modules (modules)
(loop for mod in modules
collect (make-toolbar-module :name (first mod)
:pos (second mod)
:display-fun (toolbar-symbol-fun (first mod))
:click-fun (toolbar-symbol-fun (first mod) 'click)
:args (cddr mod)
:rect nil)))
(defun add-toolbar (root-x root-y direction size placement modules
&key (autohide *toolbar-default-autohide*)
(thickness *toolbar-default-thickness*)
(refresh-delay *toolbar-default-refresh-delay*)
(border-size *toolbar-default-border-size*))
"Add a new toolbar.
root-x, root-y: root coordinates or if root-y is nil, root-x is the nth root in root-list.
direction: one of :horiz or :vert
placement: same argument as with-placement macro
modules: list of modules: a list of module name, position in percent and arguments.
0%=left/up <-> 100%=right/down.
Example: '((clock 1) (label 50 \"My label\") (clickable-clock 90))
size: toolbar size in percent of root size
thickness: toolbar height for horizontal toolbar or width for vertical one
autohide: one of nil, :click, or :motion
refresh-delay: refresh delay for toolbar in seconds
border-size: toolbar window border size"
(let ((toolbar (make-toolbar :root-x root-x :root-y root-y
:direction direction :size size
:thickness thickness
:placement placement
:autohide autohide
:refresh-delay refresh-delay
:border-size border-size
:modules (create-toolbar-modules modules))))
(push toolbar *toolbar-list*)
toolbar))
(add-hook *init-hook* 'open-all-toolbars)
(add-hook *close-hook* 'close-all-toolbars)
(defun set-toolbar-module-rectangle (module x y width height)
(unless (toolbar-module-rect module)
(setf (toolbar-module-rect module) (make-rectangle)))
(setf (rectangle-x (toolbar-module-rect module)) x
(rectangle-y (toolbar-module-rect module)) y
(rectangle-width (toolbar-module-rect module)) width
(rectangle-height (toolbar-module-rect module)) height))
(defmacro with-set-toolbar-module-rectangle ((module) &body body)
(let ((x (gensym)) (y (gensym)) (width (gensym)) (height (gensym)))
`(multiple-value-bind (,x ,y ,width ,height)
,@body
(set-toolbar-module-rectangle ,module ,x ,y ,width ,height))))
(defmacro define-toolbar-module ((name &rest args) &body body)
(let ((symbol-fun (toolbar-symbol-fun name)))
`(progn
(pushnew ',name *toolbar-module-list*)
(defun ,symbol-fun (toolbar module ,@(when args `(&optional ,@args)))
,@body))))
(defmacro define-toolbar-module-click ((name &rest args) &body body)
(let ((symbol-fun (toolbar-symbol-fun name 'click)))
`(progn
(pushnew ',name *toolbar-module-list*)
(defun ,symbol-fun (toolbar module code state root-x root-y ,@(when args `(&optional ,@args)))
,@body))))
(defun list-toolbar-modules (&optional (stream t))
"List all toolbar modules"
(format stream "Toolbar modules availables:~%")
(dolist (module (reverse *toolbar-module-list*))
(format stream " Module: ~A~%" module)
(when (fboundp (toolbar-symbol-fun module))
(format stream " ~A~%" (documentation (toolbar-symbol-fun module) 'function)))
(when (fboundp (toolbar-symbol-fun module 'click))
(format stream " On click: ~A~%" (documentation (toolbar-symbol-fun module 'click) 'function)))))
(defmacro define-toolbar-color (name doc-string &optional (value *toolbar-window-foreground*))
(let ((symbol-name (create-symbol '*toolbar- name '-color*)))
`(defconfig ,symbol-name ,value 'Toolbar ,doc-string)))
(defmacro tb-color (name)
(let ((symbol-name (create-symbol '*toolbar- name '-color*)))
symbol-name))
;;;
;;; Module subdivisions functions
;;;
(defun toolbar-module-subdiv-horiz (module root-x N)
(truncate (* N (/ (- root-x (rectangle-x (toolbar-module-rect module)))
(rectangle-width (toolbar-module-rect module))))))
(defun toolbar-module-subdiv-vert (module root-y N)
(truncate (* N (/ (- root-y (rectangle-y (toolbar-module-rect module)))
(rectangle-height (toolbar-module-rect module))))))
(defun toolbar-module-subdiv (toolbar module root-x root-y N)
(case (toolbar-direction toolbar)
(:horiz (toolbar-module-subdiv-horiz module root-x N))
(:vert (toolbar-module-subdiv-vert module root-y N))))
;;;
;;; Modules definitions
;;;
;;;
;;; Clock module
;;;
(define-toolbar-color clock "Clock color")
(define-toolbar-module (clock)
"A clock module"
(multiple-value-bind (s m h)
(get-decoded-time)
(declare (ignore s))
(toolbar-module-text toolbar module (tb-color clock) "~2,'0D:~2,'0D" h m)))
;;;
;;; Clock module with seconds
;;;
(define-toolbar-module (clock-second)
"A clock module with seconds"
(multiple-value-bind (s m h)
(get-decoded-time)
(toolbar-module-text toolbar module (tb-color clock) "~2,'0D:~2,'0D:~2,'0D" h m s)))
;;;
;;; Label module
;;;
(define-toolbar-color label "Label color")
(define-toolbar-module (label text)
"(text) - Display a text in toolbar"
(toolbar-module-text toolbar module (tb-color label) (or text "Empty")))
;;;
;;; Clickable label module
;;;
(define-toolbar-color clickable-label "Clickable label color")
(define-toolbar-module (clickable-label text action)
"(text action) - Display a clickable text in toolbar"
(declare (ignore action))
(with-set-toolbar-module-rectangle (module)
(toolbar-module-text toolbar module (tb-color clickable-label) (or text "Empty"))))
(define-toolbar-module-click (clickable-label text action)
"Call the function 'action'"
(declare (ignore text root-x root-y))
(when action
(funcall action toolbar module code state )))
;;;
;;; Clickable clock module
;;;
(define-toolbar-color clickable-clock "Clickable clock color")
(define-toolbar-module (clickable-clock)
"A clickable clock module"
(multiple-value-bind (s m h)
(get-decoded-time)
(declare (ignore s))
(with-set-toolbar-module-rectangle (module)
(toolbar-module-text toolbar module (tb-color clickable-clock) "~2,'0D:~2,'0D" h m))))
(defconfig *toolbar-clock-action* "xclock -analog"
'toolbar "Toolbar clickable clock module action on click")
(define-toolbar-module-click (clickable-clock)
"Start an external clock"
(declare (ignore toolbar module state root-x root-y))
(when (= code 1)
(do-shell *toolbar-clock-action*)))
;;;
;;; CLFSWM menu module
;;;
(define-toolbar-color clfswm-menu "CLFSWM menu color")
(define-toolbar-module (clfswm-menu text placement)
"(text placement) - Display an entry for the CLFSWM menu"
(declare (ignore placement))
(with-set-toolbar-module-rectangle (module)
(toolbar-module-text toolbar module (tb-color clfswm-menu) (or text "CLFSWM"))))
(define-toolbar-module-click (clfswm-menu text placement)
"Open the CLFSWM main menu"
(declare (ignore text code state toolbar module root-x root-y))
(let ((*info-mode-placement* (or placement *info-mode-placement*)))
(open-menu)))
;;;
;;; CPU usage
;;;
(define-toolbar-color cpu "CPU color")
(define-toolbar-module (cpu)
"Display the CPU usage (slow methode)"
(toolbar-module-text toolbar module (tb-color cpu) "CPU:~A%" (cpu-usage)))
;;;
;;; Memory usage
;;;
(define-toolbar-color mem "Memory color")
(define-toolbar-module (mem)
"Display the memory usage (slow methode)"
(multiple-value-bind (used total)
(memory-usage)
(toolbar-module-text toolbar module (tb-color mem) "Mem:~A%" (round (* (/ used total) 100.0)))))
;;;
;;; Battery usage
;;;
(define-toolbar-color system-info "System information colors (CPU+Mem+Battery)")
(define-toolbar-color system-info-low "System information colors (CPU+Mem+Battery)" "Yellow")
(define-toolbar-color system-info-alert "System information colors (CPU+Mem+Battery)" "Magenta")
(define-toolbar-color system-info-urgent "System information colors (CPU+Mem+Battery)" "Red")
(defun toolbar-battery-color (bat)
(if (numberp bat)
(cond ((<= bat 5) (tb-color system-info-urgent))
((<= bat 10) (tb-color system-info-alert))
((<= bat 25) (tb-color system-info-low))
(t (tb-color system-info)))
(tb-color system-info)))
(define-toolbar-module (bat)
"Display the battery usage (slow methode)"
(let* ((bat (battery-usage)))
(toolbar-module-text toolbar module
(toolbar-battery-color bat)
"Bat:~A%" bat)))
;;;
;;; System usage - Battery, CPU and Memory usage all in one
;;;
(define-toolbar-module (system-usage (poll-delay 10))
"Display system usage: CPU, Memory and Battery (poll methode)"
(multiple-value-bind (cpu used total bat)
(system-usage-poll poll-delay)
(toolbar-module-text toolbar module (toolbar-battery-color bat)
"Bat:~A% CPU:~A% Mem:~A%"
bat cpu
(round (* (/ used total) 100)))))
;;;
;;; CPU and Memory usage - CPU and Memory usage
;;;
(define-toolbar-module (system-cpu-mem (poll-delay 10))
"Display system usage: CPU and Memory (poll methode)"
(multiple-value-bind (cpu used total)
(system-usage-poll poll-delay)
(toolbar-module-text toolbar module (tb-color cpu)
"CPU:~A% Mem:~A%"
cpu
(round (* (/ used total) 100)))))
;;;
;;; Expose-mode-button
;;;
(define-toolbar-color expose-mode-button "Expose-mode button")
(define-toolbar-module (expose-mode-button text)
"On click, switch to expose-mode"
(with-set-toolbar-module-rectangle (module)
(toolbar-module-text toolbar module (tb-color expose-mode-button) (or text "Xpo"))))
(define-toolbar-module-click (expose-mode-button)
"left click=Show only current frames ; Right click=show all roots frames"
(declare (ignore state toolbar module root-x root-y))
(if (= code 1)
(expose-windows-mode)
(expose-all-windows-mode)))
;;;
;;; End of code
;;;
(format t "done~%")
| 30,734 | Common Lisp | .lisp | 622 | 40.318328 | 117 | 0.608452 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 079cdc6f26e8c4e20930b36fb9473ce28d4bb8eb566cc2e74cf03c1cc240cecc | 6,492 | [
-1
] |
6,493 | keyb_fr.lisp | LdBeth_CLFSWM/contrib/keyb_fr.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Define some keybindings for an azerty french keyboard
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: French keyboard layout.
;;; If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "keyb_fr.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading French Keyboard code... ")
(defun fr-binding ()
;; For an azery keyboard:
;; Main mode
(undefine-main-multi-keys ("1" :mod-1) ("2" :mod-1) ("3" :mod-1)
("4" :mod-1) ("5" :mod-1) ("6" :mod-1)
("7" :mod-1) ("8" :mod-1) ("9" :mod-1) ("0" :mod-1))
(define-main-key ("twosuperior") 'banish-pointer)
(define-main-key ("ampersand" :mod-1) 'bind-or-jump 1)
(define-main-key ("eacute" :mod-1) 'bind-or-jump 2)
(define-main-key ("quotedbl" :mod-1) 'bind-or-jump 3)
(define-main-key ("quoteright" :mod-1) 'bind-or-jump 4)
(define-main-key ("parenleft" :mod-1) 'bind-or-jump 5)
(define-main-key ("minus" :mod-1) 'bind-or-jump 6)
(define-main-key ("egrave" :mod-1) 'bind-or-jump 7)
(define-main-key ("underscore" :mod-1) 'bind-or-jump 8)
(define-main-key ("ccedilla" :mod-1) 'bind-or-jump 9)
(define-main-key ("agrave" :mod-1) 'bind-or-jump 10)
;; Second mode
(undefine-second-multi-keys ("1" :mod-1) ("2" :mod-1) ("3" :mod-1)
("4" :mod-1) ("5" :mod-1) ("6" :mod-1)
("7" :mod-1) ("8" :mod-1) ("9" :mod-1) ("0" :mod-1))
(define-second-key ("twosuperior") 'banish-pointer)
(define-second-key ("ampersand" :mod-1) 'bind-or-jump 1)
(define-second-key ("eacute" :mod-1) 'bind-or-jump 2)
(define-second-key ("quotedbl" :mod-1) 'bind-or-jump 3)
(define-second-key ("quoteright" :mod-1) 'bind-or-jump 4)
(define-second-key ("parenleft" :mod-1) 'bind-or-jump 5)
(define-second-key ("minus" :mod-1) 'bind-or-jump 6)
(define-second-key ("egrave" :mod-1) 'bind-or-jump 7)
(define-second-key ("underscore" :mod-1) 'bind-or-jump 8)
(define-second-key ("ccedilla" :mod-1) 'bind-or-jump 9)
(define-second-key ("agrave" :mod-1) 'bind-or-jump 10))
(unless (member 'fr-binding *binding-hook*)
(add-hook *binding-hook* 'fr-binding))
(format t "done~%")
| 3,257 | Common Lisp | .lisp | 67 | 46.223881 | 78 | 0.59843 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | bc93833f043ea6cbfe1cc4fc89ae8f866f6e6b2a7f1e70c835d5f4e8b57d53cd | 6,493 | [
-1
] |
6,494 | volume-mode.lisp | LdBeth_CLFSWM/contrib/volume-mode.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Volume mode
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Desmond O. Chang <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: A volume mode.
;;; If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "volume-mode.lisp")
;;; And with the alsa mixer:
;;; (load-contrib "amixer.lisp")
;;;
;;; This mode is inspired by the emms volume package. When you change the
;;; volume in main mode or second mode, clfswm will enter volume mode and
;;; set a timer to leave this mode. Changing volume in volume mode will
;;; reset the timer. You can also leave volume mode manually by return,
;;; escape or control-g.
;;;
;;; Special variable *VOLUME-MODE-TIMEOUT* controls the timeout in
;;; seconds. If it's positive, volume mode will exit when timeout occurs;
;;; if it's 0, volume mode will exit right now; if it's negative, volume
;;; will not exit even if timeout occurs. Default timeout is 3 seconds.
;;;
;;; Volume mode uses three special variables to control the mixer:
;;; *VOLUME-MUTE-FUNCTION*, *VOLUME-LOWER-FUNCTION* and
;;; *VOLUME-RAISE-FUNCTION*. Their values are functions which must accept
;;; no arguments and return two values indicating the mixer state. The
;;; first value is the volume ratio whose type must be (real 0 1). If the
;;; mixer is mute, the second value should be true, otherwise it should be
;;; false. If volume controller cannot get the mixer state, it must
;;; return NIL.
;;;
;;; Volume mode shows a mute sign, a percentage and a ratio bar on the
;;; screen. A plus sign '+' means it's unmute and a minus sign '-' means
;;; it's mute now. If volume mode doesn't know the mixer state, a message
;;; "unknown" will be shown.
;;;
;;; contrib/amixer.lisp shows how to use volume mode with alsa.
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading Volume mode code... ")
(defparameter *volume-keys* nil)
(defparameter *volume-mouse* nil)
(defconfig *volume-mode-placement* 'bottom-middle-root-placement
'Placement "Volume mode window placement")
(defvar *volume-window* nil)
(defvar *volume-font* nil)
(defvar *volume-gc* nil)
(defvar *in-volume-mode* nil)
(defvar *leave-volume-mode* nil)
(defvar *volume-ratio* nil)
(defvar *volume-mute* nil)
(defvar *volume-mode-timeout* 3
"Volume mode timeout in seconds:
> 0 means volume mode will exit when timeout occurs;
= 0 means exit right now;
< 0 means exit manually.")
;;; CONFIG - Volume mode
(defconfig *volume-font-string* *default-font-string*
'Volume-mode "Volume window font string")
(defconfig *volume-background* "black"
'Volume-mode "Volume window background color")
(defconfig *volume-foreground* "green"
'Volume-mode "Volume window foreground color")
(defconfig *volume-border* "red"
'Volume-mode "Volume window border color")
(defconfig *volume-border-size* 1
'Volume-mode "Volume window border size")
(defconfig *volume-width* 400
'Volume-mode "Volume mode window width")
(defconfig *volume-height* 15
'Volume-mode "Volume mode window height")
(defconfig *volume-text-limit* 30
'Volume-mode "Maximum text limit in the volume window")
(defconfig *volume-external-mixer-cmd* "/usr/bin/gnome-alsamixer"
'Volume-mode "Command to start an external mixer program")
(define-init-hash-table-key *volume-keys* "Volume mode keys")
(define-init-hash-table-key *volume-mouse* "Volume mode mouse button")
(define-define-key "volume" *volume-keys*)
(define-define-mouse "volume-mouse" *volume-mouse*)
(add-hook *binding-hook* 'init-*volume-keys*)
(defun set-default-volume-keys ()
(define-volume-key ("XF86AudioMute") 'volume-mute)
(define-volume-key ("XF86AudioLowerVolume") 'volume-lower)
(define-volume-key ("XF86AudioRaiseVolume") 'volume-raise)
(define-volume-key (#\/) 'volume-mute)
(define-volume-key (#\,) 'volume-lower)
(define-volume-key (#\.) 'volume-raise)
(define-volume-key ("m") 'volume-mute)
(define-volume-key ("l") 'volume-lower)
(define-volume-key ("r") 'volume-raise)
(define-volume-key ("Down") 'volume-lower)
(define-volume-key ("Up") 'volume-raise)
(define-volume-key ("Left") 'volume-lower)
(define-volume-key ("Right") 'volume-raise)
(define-volume-key ("PageUp") 'volume-lower)
(define-volume-key ("PageDown") 'volume-raise)
(define-volume-key ("Return") 'leave-volume-mode)
(define-volume-key ("Escape") 'leave-volume-mode)
(define-volume-key ("g" :control) 'leave-volume-mode)
(define-volume-key ("e") 'run-external-volume-mixer)
(define-volume-mouse (1) 'leave-volume-mode)
(define-volume-mouse (2) 'run-external-volume-mixer)
(define-volume-mouse (3) 'volume-mute)
(define-volume-mouse (4) 'volume-raise)
(define-volume-mouse (5) 'volume-lower)
;;; Main mode
(define-main-key ("XF86AudioMute") 'volume-mute)
(define-main-key ("XF86AudioLowerVolume") 'volume-lower)
(define-main-key ("XF86AudioRaiseVolume") 'volume-raise)
;;; Second mode
(define-second-key ("XF86AudioMute") 'volume-mute)
(define-second-key ("XF86AudioLowerVolume") 'volume-lower)
(define-second-key ("XF86AudioRaiseVolume") 'volume-raise))
(add-hook *binding-hook* 'set-default-volume-keys)
(defun volume-mode-window-message (width)
(if *volume-ratio*
(let* ((mute (if *volume-mute* #\- #\+))
(percentage (round (* 100 *volume-ratio*)))
(n (round (* width *volume-ratio*))))
(format nil "[~A] ~3@A% ~A~A" mute percentage
(repeat-chars n #\#) (repeat-chars (- width n) #\.)))
"unknown"))
(defun draw-volume-mode-window ()
(raise-window *volume-window*)
(clear-pixmap-buffer *volume-window* *volume-gc*)
(let* ((text (limit-length (volume-mode-window-message 20) *volume-text-limit*))
(len (length text)))
(xlib:draw-glyphs *pixmap-buffer* *volume-gc*
(truncate (/ (- *volume-width* (* (xlib:max-char-width *volume-font*) len)) 2))
(truncate (/ (+ *volume-height* (- (xlib:font-ascent *volume-font*) (xlib:font-descent *volume-font*))) 2))
text))
(copy-pixmap-buffer *volume-window* *volume-gc*))
(defun leave-volume-mode (&optional window root-x root-y)
"Leave the volume mode"
(declare (ignore window root-x root-y))
(when *in-volume-mode*
(throw 'exit-volume-loop nil)))
(defun update-volume-mode ()
(draw-volume-mode-window)
(cond ((plusp *volume-mode-timeout*)
(erase-timer :volume-mode-timer)
(with-timer (*volume-mode-timeout* :volume-mode-timer)
(setf *leave-volume-mode* t)))
((zerop *volume-mode-timeout*)
(erase-timer :volume-mode-timer)
(setf *leave-volume-mode* t))
((minusp *volume-mode-timeout*)
(erase-timer :volume-mode-timer))))
(defun volume-enter-function ()
(with-placement (*volume-mode-placement* x y *volume-width* *volume-height* *volume-border-size*)
(setf *volume-font* (xlib:open-font *display* *volume-font-string*)
*volume-window* (xlib:create-window :parent *root*
:x x
:y y
:width *volume-width*
:height *volume-height*
:background (get-color *volume-background*)
:border-width *volume-border-size*
:border (when (plusp *volume-border-size*)
(get-color *volume-border*))
:colormap (xlib:screen-default-colormap *screen*)
:event-mask '(:exposure :key-press :button-press))
*volume-gc* (xlib:create-gcontext :drawable *volume-window*
:foreground (get-color *volume-foreground*)
:background (get-color *volume-background*)
:font *volume-font*
:line-style :solid))
(map-window *volume-window*))
(setf *in-volume-mode* t
*leave-volume-mode* nil)
(update-volume-mode))
(defun volume-loop-function ()
(when *leave-volume-mode*
(leave-volume-mode)))
(defun volume-leave-function ()
(setf *in-volume-mode* nil
*leave-volume-mode* nil)
(when *volume-gc*
(xlib:free-gcontext *volume-gc*))
(when *volume-window*
(xlib:destroy-window *volume-window*))
(when *volume-font*
(xlib:close-font *volume-font*))
(xlib:display-finish-output *display*)
(erase-timer :volume-mode-timer)
(setf *volume-window* nil
*volume-gc* nil
*volume-font* nil))
(define-handler volume-mode :key-press (code state)
(funcall-key-from-code *volume-keys* code state))
(define-handler volume-mode :button-press (code state window root-x root-y)
(funcall-button-from-code *volume-mouse* code state window root-x root-y *fun-press*))
(defun volume-mode ()
(with-grab-keyboard-and-pointer (92 93 66 67 t)
(generic-mode 'volume-mode 'exit-volume-loop
:enter-function 'volume-enter-function
:loop-function 'volume-loop-function
:leave-function 'volume-leave-function
:original-mode '(main-mode))))
(defun volume-set (fn)
(when fn
(setf (values *volume-ratio* *volume-mute*) (funcall fn))
(if *in-volume-mode*
(update-volume-mode)
(volume-mode))))
(defvar *volume-mute-function* nil)
(defvar *volume-lower-function* nil)
(defvar *volume-raise-function* nil)
(defun volume-mute (&optional window root-x root-y)
"Toggle mute."
(declare (ignore window root-x root-y))
(volume-set *volume-mute-function*))
(defun volume-lower (&optional window root-x root-y)
"Lower volume."
(declare (ignore window root-x root-y))
(volume-set *volume-lower-function*))
(defun volume-raise (&optional window root-x root-y)
"Raise volume."
(declare (ignore window root-x root-y))
(volume-set *volume-raise-function*))
(defun run-external-volume-mixer (&optional window root-x root-y)
"Start an external volume mixer"
(declare (ignore window root-x root-y))
(do-shell *volume-external-mixer-cmd*))
#+:clfswm-toolbar
(progn
(define-toolbar-color volume-mode-button "Volume mode color")
(define-toolbar-module (volume-mode-button (text "Vol"))
"Volume mode button"
(with-set-toolbar-module-rectangle (module)
(toolbar-module-text toolbar module (tb-color volume-mode-button) text)))
(define-toolbar-module-click (volume-mode-button text)
"Volume mode"
(declare (ignore text module))
(if *in-volume-mode*
(funcall-button-from-code *volume-mouse* code state (toolbar-window toolbar)
root-x root-y *fun-press*)
(volume-mode))))
(format t "done~%")
| 12,041 | Common Lisp | .lisp | 260 | 40.226923 | 129 | 0.64063 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | fabe13a2d34fa8dc303f1e9bf7b510ef397dfb97ce34b853a6ddd19472976490 | 6,494 | [
-1
] |
6,495 | moc.lisp | LdBeth_CLFSWM/contrib/moc.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: MOC - Console audio player - interface
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "moc.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading MOC code... ")
(defun moc-menu ()
"Open the MOC menu"
(open-menu (find-menu 'moc-menu)))
(defun start-mocp ()
"Start mocp"
(do-shell "xterm -e 'mocp 2> /dev/null'"))
(defun show-moc-info ()
"Show MOC informations"
(info-on-shell "MOC informations:" "mocp --info")
(moc-menu))
(defun moc-previous (&optional (in-menu t))
"Play the previous song in the current playlist"
(do-shell "mocp --previous" nil t)
(when in-menu
(moc-menu)))
(defun moc-next (&optional (in-menu t))
"Play the next song in the current playlist"
(do-shell "mocp --next" nil t)
(when in-menu
(moc-menu)))
(defun moc-toggle ()
"Toggles Play/Pause, plays if stopped"
(do-shell "mocp --toggle-pause"))
(defun moc-play ()
"Start playing"
(do-shell "mocp --play"))
(defun moc-stop ()
"Stop the currently playing playlists"
(do-shell "mocp --stop"))
(defun moc-seek-+5s (&optional (in-menu t))
"Seeks to +5s"
(if in-menu
(progn
(do-shell "mocp --seek +5")
(moc-menu))
(do-shell "mocp --seek +5" nil t)))
(defun moc-seek--5s (&optional (in-menu t))
"Seeks to -5s"
(if in-menu
(progn
(do-shell "mocp --seek -5")
(moc-menu))
(do-shell "mocp --seek -5" nil t)))
(unless (find-menu 'moc-menu)
(add-sub-menu 'help-menu "F3" 'moc-menu "MOC - Console audio player - menu")
(add-menu-key 'moc-menu "i" 'show-moc-info)
(add-menu-key 'moc-menu "p" 'moc-previous)
(add-menu-key 'moc-menu "n" 'moc-next)
(add-menu-key 'moc-menu "t" 'moc-toggle)
(add-menu-key 'moc-menu "y" 'moc-play)
(add-menu-key 'moc-menu "k" 'moc-stop)
(add-menu-key 'moc-menu "x" 'moc-seek-+5s)
(add-menu-key 'moc-menu "w" 'moc-seek--5s)
(add-menu-key 'moc-menu "m" 'start-mocp))
(defun moc-binding ()
(define-main-key ("F3" :alt) 'moc-menu))
(add-hook *binding-hook* 'moc-binding)
(format t "done~%")
| 3,272 | Common Lisp | .lisp | 89 | 34.033708 | 78 | 0.602974 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | ea0669be0cd5fa0d2b86e30808a6ee041d7ee46abd2f9f7dc04e32c1b934e2cf | 6,495 | [
-1
] |
6,496 | fcitx.lisp | LdBeth_CLFSWM/contrib/fcitx.lisp | (in-package :clfswm)
(format t "Loading fcitx code...")
(defconfig *fcitx-remote-command* "fcitx-remote"
'fcitx "Command for fcitx remote program")
(defun fcitx-status ()
(let ((code (car (do-shell-output *fcitx-remote-command*))))
(if (or (string-equal "0" code) nil t))))
(defun fcitx-toggle ()
"Toogle fxitx"
(do-shell (concatenate 'string *fcitx-remote-command*
(if (fcitx-status) "-c" "-o"))))
(defun set-fcitx-keys ()
(define-main-key ("Shift" :mod-4) 'fcitx-toggle))
(add-hook *binding-hook* 'set-fcitx-keys)
(format t "done~%")
| 582 | Common Lisp | .lisp | 15 | 34.733333 | 62 | 0.651786 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 899978a7fd922b05a3d66816ee2ad3f65f325ade3a997f9546bbbefab0261e51 | 6,496 | [
-1
] |
6,497 | mpd.lisp | LdBeth_CLFSWM/contrib/mpd.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Music Player Daemon (MPD) interface
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "mpd.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading MPD code... ")
(defun mpd-menu ()
"Open the Music Player Daemon (MPD) menu"
(open-menu (find-menu 'mpd-menu)))
(defun start-sonata ()
"Start sonata"
(do-shell "exec sonata"))
(defun start-gmpc ()
"Start gmpc"
(do-shell "exec gmpc"))
(defun show-mpd-info ()
"Show MPD informations"
(info-on-shell "MPD informations:" "mpc")
(mpd-menu))
(defun mpd-previous (&optional (in-menu t))
"Play the previous song in the current playlist"
(if in-menu
(progn
(info-on-shell "MPD:" "mpc prev")
(mpd-menu))
(do-shell "mpc prev" nil t)))
(defun mpd-next (&optional (in-menu t))
"Play the next song in the current playlist"
(if in-menu
(progn
(info-on-shell "MPD:" "mpc next")
(mpd-menu))
(do-shell "mpc next" nil t)))
(defun mpd-toggle ()
"Toggles Play/Pause, plays if stopped"
(do-shell "mpc toggle"))
(defun mpd-play ()
"Start playing"
(do-shell "mpc play"))
(defun mpd-stop ()
"Stop the currently playing playlists"
(do-shell "mpc stop"))
(defun mpd-seek-+5% (&optional (in-menu t))
"Seeks to +5%"
(if in-menu
(progn
(do-shell "mpc seek +5%")
(mpd-menu))
(do-shell "mpc seek +5%" nil t)))
(defun mpd-seek--5% (&optional (in-menu t))
"Seeks to -5%"
(if in-menu
(progn
(do-shell "mpc seek -5%")
(mpd-menu))
(do-shell "mpc seek -5%" nil t)))
(defun show-mpd-playlist ()
"Show the current MPD playlist"
(info-on-shell "Current MPD playlist:" "mpc playlist")
(mpd-menu))
(unless (find-menu 'mpd-menu)
(add-sub-menu 'help-menu "F2" 'mpd-menu "Music Player Daemon (MPD) menu")
(add-menu-key 'mpd-menu "i" 'show-mpd-info)
(add-menu-key 'mpd-menu "p" 'mpd-previous)
(add-menu-key 'mpd-menu "n" 'mpd-next)
(add-menu-key 'mpd-menu "t" 'mpd-toggle)
(add-menu-key 'mpd-menu "y" 'mpd-play)
(add-menu-key 'mpd-menu "k" 'mpd-stop)
(add-menu-key 'mpd-menu "x" 'mpd-seek-+5%)
(add-menu-key 'mpd-menu "w" 'mpd-seek--5%)
(add-menu-key 'mpd-menu "l" 'show-mpd-playlist)
(add-menu-key 'mpd-menu "s" 'start-sonata)
(add-menu-key 'mpd-menu "g" 'start-gmpc))
(defun mpd-binding ()
(define-main-key ("F2" :alt) 'mpd-menu))
(add-hook *binding-hook* 'mpd-binding)
#+:clfswm-toolbar
(progn
(defconfig *mpd-toolbar* '((mpd-buttons 1)
(mpd-info 60))
'Toolbar "MPD toolbar modules")
(defconfig *mpd-toolbar-client* "gmpc"
'Toolbar "MPD client")
(define-toolbar-color mpd-info "MPD - Music Player Daemon information color")
(define-toolbar-color mpd-buttons "MPD - Music Player Daemon buttons color")
(define-toolbar-module (mpd-info small)
"(small) - MPD (Music Player Daemon) informations"
(let* ((lines (do-shell "mpc" nil t))
(mpd-line (loop for line = (read-line lines nil nil)
while line
collect line)))
(if (>= (length mpd-line) 3)
(if small
(toolbar-module-text toolbar module (tb-color mpd-info)
"~A"
(ensure-printable (first mpd-line)))
(toolbar-module-text toolbar module (tb-color mpd-info)
"~A - ~A"
(ensure-printable (first mpd-line))
(ensure-printable (second mpd-line))))
(toolbar-module-text toolbar module (tb-color mpd-info)
"MPD - Not playing"))))
(define-toolbar-module (mpd-buttons small)
"(small) - MPD (Music Player Daemon) buttons"
(with-set-toolbar-module-rectangle (module)
(toolbar-module-text toolbar module (tb-color mpd-buttons)
(if small
"PNT<>C"
"P N T < > C"))))
(define-toolbar-module-click (mpd-buttons small)
"P=Previous, N=Next, T=Toogle, <=seek-5% >=seek+5% C=start MPD client"
(declare (ignore state small))
(when (= code 1)
(let ((pos (toolbar-module-subdiv toolbar module root-x root-y 6)))
(case pos
(0 (mpd-previous nil))
(1 (mpd-next nil))
(2 (mpd-toggle))
(3 (mpd-seek--5% nil))
(4 (mpd-seek-+5% nil))
(5 (do-shell *mpd-toolbar-client*))))
(refresh-toolbar toolbar))))
(format t "done~%")
| 5,770 | Common Lisp | .lisp | 148 | 32.662162 | 79 | 0.575416 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | d694ddd301196a6c6aad4311affc2725f51075745207c58aa8d74418a88a01ca | 6,497 | [
-1
] |
6,498 | xmms.lisp | LdBeth_CLFSWM/contrib/xmms.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Music Player Daemon (MPD) interface
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; Documentation: Handle the XMMS player
;;; This code needs xmmsctrl.
;; If you want to use this file, just add this line in
;;; your configuration file:
;;;
;;; (load-contrib "xmms.lisp")
;;;
;;; --------------------------------------------------------------------------
(in-package :clfswm)
(format t "Loading XMMS code... ")
(defun xmms-menu ()
"Open the XMMS menu"
(open-menu (find-menu 'xmms-menu)))
(defun launch-xmms ()
"Lanch XMMS"
(do-shell "xmmsctrl launch"))
(defun show-xmms-status ()
"Show the current xmms status"
(info-on-shell "XMMS status:" "xmmsctrl cur"))
(defun show-xmms-playlist ()
"Show the current xmms playlist"
(info-on-shell "XMMS Playlist:" "xmmsctrl playlist"))
(defun xmms-next-track ()
"Play the next XMMS track"
(do-shell "xmmsctrl next")
(show-xmms-status)
(xmms-menu))
(defun xmms-previous-track ()
"Play the previous XMMS track"
(do-shell "xmmsctrl previous")
(show-xmms-status)
(xmms-menu))
(defun xmms-load-file ()
"open xmms \"Load file(s)\" dialog window."
(do-shell "xmmsctrl eject"))
(unless (find-menu 'xmms-menu)
(add-sub-menu 'help-menu "x" 'xmms-menu "XMMS menu")
(add-menu-key 'xmms-menu "r" 'launch-xmms)
(add-menu-key 'xmms-menu "s" 'show-xmms-status)
(add-menu-key 'xmms-menu "l" 'show-xmms-playlist)
(add-menu-key 'xmms-menu "n" 'xmms-next-track)
(add-menu-key 'xmms-menu "p" 'xmms-previous-track)
(add-menu-key 'xmms-menu "e" 'xmms-load-file))
(format t "done~%")
| 2,623 | Common Lisp | .lisp | 67 | 37.223881 | 78 | 0.620676 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 3749431e670ae01d6b12de84b69a37a5ad79861edddb9583bcaf4a9ce204720c | 6,498 | [
-1
] |
6,499 | load.lisp | LdBeth_CLFSWM/contrib/server/load.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: CLFSWM Client
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
(defparameter *base-dir* (directory-namestring *load-truename*))
(export '*base-dir*)
#+CMU
(setf ext:*gc-verbose* nil)
#+SBCL
(require :asdf)
#+SBCL
(require :sb-posix)
#-ASDF
(let ((asdf-file (make-pathname :host (pathname-host *base-dir*)
:device (pathname-device *base-dir*)
:directory (pathname-directory *base-dir*)
:name "asdf" :type "lisp")))
(if (probe-file asdf-file)
(load asdf-file)
(load (make-pathname :host (pathname-host *base-dir*)
:device (pathname-device *base-dir*)
:directory (butlast (pathname-directory *base-dir*))
:name "asdf" :type "lisp"))))
(push *base-dir* asdf:*central-registry*)
(asdf:oos 'asdf:load-op :clfswm-client)
(in-package :clfswm-client)
(start-client nil)
| 1,942 | Common Lisp | .lisp | 47 | 39.170213 | 78 | 0.597347 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | ca477fd2a5cd35ccdd3b23c2b16e9de291026d8baeeeaf0beb6563acf9d35dbb | 6,499 | [
-1
] |
6,500 | crypt.lisp | LdBeth_CLFSWM/contrib/server/crypt.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Client/server connection.
;;; The connection is crypted and you can only connect to the server with the
;;; same clfswm binary.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
;;; Server protocole:
;;; Server -> Client: orig_key=a generated key crypted with *key*
;;; Client : build its new_key with orig_key+*key*
;;; Client -> Server: new_key+(md5 new_key) crypted with new_key
;;; Server -> Client: check if the keys match and then authenticate the client.
;;; Server <-> Client: All connections are crypted with new_key
;;; --------------------------------------------------------------------------
(in-package :common-lisp-user)
(defpackage :crypt
(:use :common-lisp)
(:export :crypt
:decrypt
:generate-key))
(in-package :crypt)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun mkstr (&rest args)
(with-output-to-string (s)
(dolist (a args)
(princ a s))))
(defun symb (&rest args)
(values (intern (apply #'mkstr args)))))
(defmacro circ-loop (binding &body body)
"Loop circularly over some sequences.
binding is a list of (variable sequence).
The loop is the same size of the first sequence.
Each variable binding element is bound to each character in the
sequence in the second element.
See 'test-circ-loop for some usage examples."
(labels ((let-body (prefix list)
(loop for i from 0
for l in list
collect `(,(symb prefix "-" i) (coerce ,(second l) 'list))))
(loop-var-name (l)
(symb "LOOP-VAR-" (first l)))
(do-body (prefix list)
(cons (list (loop-var-name (first list))
(symb prefix "-" 0)
`(cdr ,(loop-var-name (first list))))
(loop for i from 1
for l in (cdr list)
collect (list (loop-var-name l)
(symb prefix "-" i)
`(or (cdr ,(loop-var-name l))
,(symb prefix "-" i))))))
(stop-body (list)
(list `(null ,(loop-var-name (first list)))))
(symbol-body (list)
(loop for l in list
collect `(,(first l) (car ,(loop-var-name l))))))
(let ((prefix (gensym)))
`(let (,@(let-body prefix binding))
(do ,(do-body prefix binding)
,(stop-body binding)
(symbol-macrolet ,(symbol-body binding)
,@body))))))
(defun test-circ-loop ()
(print 'first-test)
(circ-loop ((m "Ceci est un test. יאח^# 1234567890")
(k "azerty")
(p "test")
(o "123"))
(print (list m k p o)))
(print 'second-test) (terpri)
(circ-loop ((a #(1 2 3 4 5 6 7 8 9 10))
(b '(1 2 3))
(c "abcd"))
(format t "(~A ~A ~A) " a b c)))
(defun crypt-to-list (msg &optional (size 4))
(let ((len (length msg)))
(when (zerop (mod len size))
(loop for i from 0 below (/ len size)
collect (parse-integer (subseq msg (* i size) (* (1+ i) size)) :radix 16 :junk-allowed t)))))
(defun crypt (msg key)
(with-output-to-string (str)
(circ-loop ((m msg) (k key))
(format str "~4,'0X" (logxor (char-code m) (char-code k))))))
(defun decrypt (msg key)
(with-output-to-string (str)
(circ-loop ((m (crypt-to-list msg 4)) (k key))
(princ (code-char (logxor m (char-code k))) str))))
(defun test ()
(let* ((key "11a3e229084349bc25d97e29393ced1d")
(msg (format nil "~C Ceci est un test. יאח^# 1234567890" (code-char 100)))
(crypt (crypt msg key))
(decrypt (decrypt crypt key)))
(format t "msg: ~A~%Crypt: ~A~%Decrypt: ~A~%" msg crypt decrypt)))
(let* ((dic (with-output-to-string (str)
(dotimes (i 26)
(princ (code-char (+ i (char-code #\a))) str)
(princ (code-char (+ i (char-code #\A))) str))
(dotimes (i 10)
(princ (code-char (+ i (char-code #\0))) str))))
(dic-size (length dic)))
(defun generate-key (&optional (min-size 10) (max-size 30))
(let ((length (+ (random (- max-size min-size)) min-size)))
(with-output-to-string (str)
(dotimes (i length)
(princ (aref dic (random dic-size)) str))))))
| 5,035 | Common Lisp | .lisp | 124 | 36.919355 | 95 | 0.588668 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 56deb31e630873e21f1d4fa969117301c56745abfb5c3afb8ea7a7efea4f3a92 | 6,500 | [
-1
] |
6,501 | clfswm-client.lisp | LdBeth_CLFSWM/contrib/server/clfswm-client.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Client/server connection.
;;; The connection is crypted and you can only connect to the server with the
;;; same clfswm binary.
;;; --------------------------------------------------------------------------
;;;
;;; (C) 2015 Philippe Brochard <[email protected]>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;;;
;;; --------------------------------------------------------------------------
;;; Server protocole:
;;; Server -> Client: orig_key=a generated key crypted with *key*
;;; Client : build its new_key with orig_key+*key*
;;; Client -> Server: new_key+(md5 new_key) crypted with new_key
;;; Server -> Client: check if the keys match and then authenticate the client.
;;; Server <-> Client: All connections are crypted with new_key
;;; --------------------------------------------------------------------------
(in-package :common-lisp-user)
(defpackage :clfswm-client
(:use :common-lisp :crypt)
(:export :start-client))
(in-package :clfswm-client)
(defun uquit ()
#+(or clisp cmu) (ext:quit)
#+sbcl (sb-ext:quit)
#+ecl (si:quit)
#+gcl (lisp:quit)
#+lispworks (lw:quit)
#+(or allegro-cl allegro-cl-trial) (excl:exit)
#+ccl (ccl:quit))
;;(defparameter *server-port* 33333)
(defun print-output (sock &optional wait)
(when (or wait (ignore-errors (listen sock)))
(let ((line (ignore-errors (string-trim '(#\newline) (read-line sock nil nil)))))
(when line
(format t "~&~A" (decrypt line *key*))
(force-output)))))
(defun quit-on-command (line sock)
(when (member line '("quit" "close" "bye") :test #'string-equal)
(loop for line = (read-line sock nil nil)
while line
do (format t "~&~A" (decrypt line *key*))
(force-output))
(terpri)
(uquit)))
(defun parse-args (sock args)
(unless (string= args "")
(multiple-value-bind (form pos)
(read-from-string args)
(let ((str (format nil "~A" form)))
(format t "~A~% " str)
(format sock "~A~%" (crypt str *key*))
(force-output sock)
(print-output sock t)
(quit-on-command str sock)
(parse-args sock (subseq args pos))))))
(defun start-client (args &optional (url "127.0.0.1") (port clfswm::*server-port*))
(load-new-key)
(let* ((sock (port:open-socket url port))
(key (string-trim '(#\Newline #\Space) (decrypt (read-line sock nil nil) *key*))))
(setf *key* (concatenate 'string key *key*))
(write-line (crypt (format nil "~A~A" *key* (md5:md5 *key*)) *key*) sock)
(force-output sock)
(print-output sock t)
(dolist (a args)
(parse-args sock a))
(loop
(print-output sock)
(when (listen)
(let ((line (read-line)))
(write-line (crypt line *key*) sock)
(force-output sock)
(quit-on-command line sock)))
(sleep 0.01))))
| 3,661 | Common Lisp | .lisp | 90 | 37.844444 | 85 | 0.596402 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 6c85707963372ab7523404c5de9fbe1b469fb4f5ba6ab35e098e927d6c8e27e0 | 6,501 | [
-1
] |
6,502 | test.lisp | LdBeth_CLFSWM/contrib/server/test.lisp | (in-package :clfswm)
(leave-frame)
(select-previous-level)
(let ((frame (create-frame \:name \"Test root\" \:x 0.05 \:y 0.05)))
(add-frame frame (current-child))
(add-frame (create-frame \:name \"Test 1\" \:x 0.3 \:y 0 \:w 0.7 \:h 1) frame)
(add-frame (create-frame \:name \"Test 2\" \:x 0 \:y 0 \:w 0.3 \:h 1) frame)
(setf (current-child) (first (frame-child frame))))
(show-all-children *current-root*)
| 419 | Common Lisp | .lisp | 9 | 44 | 80 | 0.631188 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | a77f1c8661b70ad420d58b43b1120b0889c26be602b95d983d3f0e4e2fe15ed8 | 6,502 | [
-1
] |
6,503 | clfswm.asd | LdBeth_CLFSWM/clfswm.asd | ;;;; -*- Mode: Lisp -*-
;;;; Author: Philippe Brochard <[email protected]>
;;;; ASDF System Definition
;;;
(in-package #:asdf)
(defsystem clfswm
:description "CLFSWM: Fullscreen Window Manager"
:version "1209.2"
:author "Philippe Brochard <[email protected]>"
:licence "GNU Public License (GPL)"
:components ((:module src
:components
((:file "tools")
(:file "version"
:depends-on ("tools"))
(:file "my-html"
:depends-on ("tools"))
(:file "package"
:depends-on ("my-html" "tools" "version"))
(:file "keysyms"
:depends-on ("package"))
(:file "xlib-util"
:depends-on ("package" "keysyms" "tools"))
(:file "config"
:depends-on ("package" "xlib-util"))
(:file "netwm-util"
:depends-on ("package" "xlib-util"))
(:file "clfswm-keys"
:depends-on ("package" "config" "xlib-util" "keysyms"))
(:file "clfswm-autodoc"
:depends-on ("package" "clfswm-keys" "my-html" "tools" "config"))
(:file "clfswm-internal"
:depends-on ("xlib-util" "clfswm-keys" "netwm-util" "tools" "config"))
(:file "clfswm-placement"
:depends-on ("package" "clfswm-internal"))
(:file "clfswm-generic-mode"
:depends-on ("package" "tools" "xlib-util" "clfswm-internal"))
(:file "clfswm-query"
:depends-on ("package" "config" "xlib-util" "clfswm-keys"
"clfswm-generic-mode" "clfswm-placement"))
(:file "clfswm-circulate-mode"
:depends-on ("xlib-util" "clfswm-keys" "clfswm-generic-mode"
"clfswm-internal" "netwm-util" "tools" "config"
"clfswm-placement"))
(:file "clfswm"
:depends-on ("xlib-util" "netwm-util" "clfswm-keys" "config"
"clfswm-internal" "clfswm-circulate-mode" "tools"))
(:file "clfswm-second-mode"
:depends-on ("package" "clfswm" "clfswm-internal" "clfswm-generic-mode"
"clfswm-placement"))
(:file "clfswm-expose-mode"
:depends-on ("package" "config" "clfswm-internal" "xlib-util" "tools"
"clfswm-keys" "clfswm-generic-mode" "clfswm-placement"
"clfswm-query"))
(:file "clfswm-fastswitch-mode"
:depends-on ("package" "config" "clfswm-internal" "xlib-util" "tools"
"clfswm-keys" "clfswm-generic-mode" "clfswm-placement"
"clfswm-expose-mode"))
(:file "clfswm-corner"
:depends-on ("package" "config" "clfswm-internal" "clfswm-expose-mode" "xlib-util"))
(:file "clfswm-info"
:depends-on ("package" "version" "xlib-util" "config" "clfswm-keys" "clfswm"
"clfswm-internal"
"clfswm-autodoc" "clfswm-corner"
"clfswm-generic-mode" "clfswm-placement"))
(:file "clfswm-menu"
:depends-on ("package" "clfswm-info"))
(:file "clfswm-util"
:depends-on ("clfswm" "keysyms" "clfswm-info" "clfswm-second-mode" "clfswm-query"
"clfswm-menu" "clfswm-autodoc" "clfswm-corner"
"clfswm-placement" "tools"))
(:file "clfswm-configuration"
:depends-on ("package" "config" "clfswm-internal" "clfswm-util" "clfswm-query"
"clfswm-menu"))
(:file "menu-def"
:depends-on ("clfswm-menu" "clfswm-configuration" "clfswm" "clfswm-util" "clfswm-info"))
(:file "clfswm-layout"
:depends-on ("package" "clfswm-internal" "clfswm-util" "clfswm-info" "menu-def"))
(:file "clfswm-pack"
:depends-on ("clfswm" "xlib-util" "clfswm-util" "clfswm-second-mode" "clfswm-layout"))
(:file "clfswm-nw-hooks"
:depends-on ("package" "clfswm-util" "clfswm-info" "clfswm-layout" "menu-def"))
(:file "bindings"
:depends-on ("clfswm" "clfswm-internal" "clfswm-util" "clfswm-menu"))
(:file "bindings-second-mode"
:depends-on ("clfswm" "clfswm-util" "clfswm-query" "bindings" "clfswm-pack"
"clfswm-menu" "menu-def" "clfswm-layout")))))
:depends-on ( #-:CLX :clx #+:sbcl :sb-posix #+:ccl :asdf))
| 4,381 | Common Lisp | .asd | 88 | 37.568182 | 109 | 0.548763 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 93d9078de73f335cab619d8d3c9c95280e1210610abc8917f2ec8e00cfbe19eb | 6,503 | [
-1
] |
6,504 | clfswm-client.asd | LdBeth_CLFSWM/contrib/server/clfswm-client.asd | ;;;; -*- Mode: Lisp -*-
;;;; ASDF System Definition
;;;
(in-package #:asdf)
(defsystem clfswm-client
:description ""
:licence "GNU Lesser General Public License (LGPL)"
:components ((:file "md5")
(:file "net")
(:file "crypt")
(:file "key"
:depends-on ("crypt"))
(:file "clfswm-client"
:depends-on ("md5" "net" "crypt" "key"))))
| 386 | Common Lisp | .asd | 14 | 22.428571 | 53 | 0.559783 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | d8f09dbc97a7ba39c703a3935d750869ee2115bfc417f652d952eaa2215fbe1e | 6,504 | [
-1
] |
6,505 | dot-clfswmrc | LdBeth_CLFSWM/doc/dot-clfswmrc | ;;; -*- lisp -*-
;;;
;;; CLFSWM configuration file example
;;;
;;; Send me your configuration file at pbrochard _at_ common-lisp -dot- net
;;; if you want to share it with others.
(in-package :clfswm)
;;;; Uncomment the line above if you need default modifiers (or not)
;;(with-capslock)
;;(with-numlock)
;;(without-capslock)
;;(without-numlock)
;;;; Uncomment the line above if you want to enable the notify event compression.
;;;; This variable may be useful to speed up some slow version of CLX
;;;; It is particulary useful with CLISP/MIT-CLX.
;; (setf *have-to-compress-notify* t)
;;; Color configuration example
;;;
;;; See in package.lisp or config.lisp for all variables
;;(setf *color-unselected* "Blue")
;;; How to change the default fullscreen size
;;(defun get-fullscreen-size ()
;; "Return the size of root child (values rx ry rw rh)
;;You can tweak this to what you want"
;; (values -2 -2 (+ (xlib:screen-width *screen*) 2) (- (xlib:screen-height *screen*) 20)))
;;; Contributed code example
;;; See in the clfswm/contrib directory to find some contributed code
;;; and se load-contrib to load them. For example:
;;(load-contrib "contrib-example.lisp")
;;(load-contrib "mpd.lisp")
;;(load-contrib "keyb_fr.lisp")
;;(load-contrib "xmms.lisp")
;;(load-contrib "cd-player.lisp")
;;(load-contrib "reboot-halt.lisp")
;;;; Client/server connection - the connection is crypted and you can only
;;;; connect to the server with the same clfswm binary.
;;(load-contrib "server/server.lisp")
;;(unless (is-started-as-client-p)
;; (start-server))
;;; Binding example: Undefine Control-F1 and define Control-F5 as a
;;; new binding in main mode
;;;
;;; See bindings.lisp, bindings-second-mode.lisp for all default bindings definitions.
;;
;;(defun $start-emacs ()
;; "Run or raise emacs"
;; (setf *second-mode-leave-function*
;; (lambda ()
;; (run-or-raise (lambda (win) (string-equal "emacs"
;; (xlib:get-wm-class win)))
;; (lambda () (do-shell "cd $HOME && exec emacsclient -c")))))
;; (leave-second-mode))
;;
;;(defun $start-conkeror ()
;; "Run or raise conkeror"
;; (setf *second-mode-leave-function*
;; (lambda ()
;; (run-or-raise (lambda (win) (string-equal "Navigator"
;; (xlib:get-wm-class win)))
;; (lambda () (do-shell "cd $HOME && exec conkeror")))))
;; (leave-second-mode))
;;
;;(defun binding-example ()
;; (undefine-main-key ("F1" :mod-1))
;; (define-main-key ("F5" :mod-1) 'help-on-clfswm)
;; (define-second-key ("e") '$start-emacs)
;; (define-second-key ("c") '$start-conkeror)
;; ;; Binding example for apwal
;; (define-second-key (#\Space)
;; (defun tpm-apwal ()
;; "Run Apwal"
;; (do-shell "exec apwal")
;; (show-all-windows-in-workspace (current-workspace))
;; (throw 'exit-second-loop nil))))
;;
;;(add-hook *binding-hook* 'binding-example)
;;; Set up an UZBL frame where all uzbl windows will be absorbed.
;;;
;;(defun set-uzbl-frame-nw-hook (&optional (frame *current-child*))
;; "Open the window in the UZBL frame if it match uzbl absorb-nw-test"
;; (when (frame-p frame)
;; (setf (frame-nw-hook frame) 'absorb-window-nw-hook
;; (frame-data-slot frame :nw-absorb-test) (nw-absorb-test-class "uzbl-core"))))
;;
;;#-:uzbl-menu-added
;;(add-menu-key 'frame-nw-hook-menu "z" 'set-uzbl-frame-nw-hook)
;;
;;(pushnew :uzbl-menu-added *features*)
;;
;;
;;(defun init-uzbl-frame ()
;; (let ((frame (first (frame-child *root-frame*))))
;; (setf (frame-data-slot frame :tile-size) 0.7)
;; (setf *current-child* frame)
;; (bind-on-slot 0)
;; (let ((uzbl-frame (create-frame :name "Uzbl" :x 0.01 :y 0.01 :w 0.98 :h 0.98)))
;; (add-frame uzbl-frame frame)
;; (set-uzbl-frame-nw-hook uzbl-frame))))
;;
;;(unless (member 'init-uzbl-frame *init-hook*)
;; (add-hook *init-hook* 'init-uzbl-frame))
;;; End UZBL setup.
;;; A more complex example I use to record my desktop and show
;;; documentation associated to each key press.
;;;See contrib/osd.lisp
;;(load-contrib "osd.lisp")
;;;;; -- Doc example end --
;;;;; Init hook examples:
;;(defun my-init-hook-1 ()
;; (dbg 'my-init-hook)
;; ;;(add-frame (create-frame :name "Default" :layout #'tile-left-layout :data (list '(:tile-size 0.6))) *root-frame*)
;; (add-frame (create-frame :name "The Gimp" :x 0.6 :y 0 :w 0.3 :h 0.2) *root-frame*)
;; (add-frame (create-frame :name "Net" :x 0.52 :y 0.3 :w 0.4 :h 0.3) *root-frame*)
;; (add-frame (create-frame :x 0.4 :y 0 :w 0.2 :h 0.3) (first (frame-child *root-frame*)))
;; (add-frame (create-frame :x 0.6 :y 0.4 :w 0.4 :h 0.2) (first (frame-child *root-frame*)))
;; (add-frame (create-frame :x 0.4 :y 0.7 :w 0.2 :h 0.3) (first (frame-child *root-frame*)))
;; (let ((frame (create-frame :name "The Qiv" :x 0 :y 0.4 :w 0.4 :h 0.2)))
;; (add-frame frame (first (frame-child *root-frame*)))
;; (add-frame (create-frame) frame))
;; (add-frame (create-frame :x 0.1 :y 0.55 :w 0.8 :h 0.43) *root-frame*)
;; (add-frame (create-frame :x 0.2 :y 0.1 :w 0.6 :h 0.4) (first (frame-child *root-frame*)))
;; (add-frame (create-frame :x 0.3 :y 0.55 :w 0.4 :h 0.3) (first (frame-child *root-frame*)))
;; (add-frame (create-frame :x 0.1 :y 0.1 :w 0.3 :h 0.6) (first (frame-child (first (frame-child *root-frame*)))))
;; (setf (frame-layout *current-child*) #'tile-layout))
;;
;;(defun my-init-hook-2 ()
;; (dbg 'my-init-hook)
;; (add-frame (create-frame :name "Default" :layout #'tile-left-layout :data (list '(:tile-size 0.6))) *root-frame*)
;; (setf (frame-layout *current-child*) #'tile-layout))
;;
;;
;;(defun my-init-hook-3 ()
;; (dbg 'my-init-hook)
;; (add-frame (create-frame :name "plop" :x 0.1 :y 0.4 :w 0.7 :h 0.3) *root-frame*)
;; (add-frame (create-frame :name "Default" :layout nil :x 0.1 :y 0.5 :w 0.8 :h 0.5)
;; *root-frame*)
;; (setf (frame-layout *root-frame*) nil))
;;
;;
;;
;;(defun my-init-hook-4 ()
;; (let ((frame (add-frame (create-frame :name "Default"
;; :layout #'tile-left-layout
;; :x 0.05 :y 0.05 :w 0.9 :h 0.9)
;; *root-frame*)))
;; (setf *current-child* frame)))
;;
;;
;;;;; Use this hook and prevent yourself to create a new frame to emulate
;;;;; the MS Windows desktop style :)
;;(defun my-init-hook-ms-windows-style ()
;; (setf (frame-managed-type *root-frame*) nil))
;;
;;
;;;;; Here is another example useful with the ROX filer: Only the
;;;;; root frame fullscreen with some space on the left for icons.
;;(defun my-init-hook-rox-filer ()
;; (setf (frame-layout *root-frame*) #'tile-left-space-layout
;; (frame-data-slot *root-frame* :tile-size) 0.9))
;;
;;
;;
;;
;;(setf *init-hook* '(my-init-hook-4)) ;; <- choose one in 1 to 4,
;;;; my-init-hook-ms-windows-style
;;;; my-init-hook-rox-filer
;;;;(setf *init-hook* nil)
;;;;; Init hook end
;;; For debuging: start another sever (for example: 'startx -- :1'), Xnest
;;; or Zephyr and add the lines above in a dot-clfswmrc-debug file
;;; mod-2 is the numlock key on some keyboards.
;;(setf *default-modifiers* '(:mod-2))
;;
;;(defun my-add-escape ()
;; (define-main-key ("Escape" :mod-2) 'exit-clfswm))
;;
;;(add-hook *binding-hook* 'my-add-escape)
;;
;;(clfswm:main :display ":1" :alternate-conf #P"/where/is/dot-clfswmrc-debug")
| 7,350 | Common Lisp | .cl | 179 | 39.916201 | 119 | 0.63317 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | a4bd16c99a543f0c59e662fe199310728ab6b8150c85dc1baf1732431622e892 | 6,505 | [
-1
] |
6,509 | clfswm-session.desktop | LdBeth_CLFSWM/clfswm-session.desktop | [Desktop Entry]
Version=1212
Encoding=UTF-8
Name=clfswm
Name[en_US]=clfswm
Comment=A(nother) Common Lisp FullScreen Window Manager
Terminal=false
Exec=clfswm
TryExec=clfswm
[Window Manager]
SessionManaged=true
| 211 | Common Lisp | .l | 11 | 18.090909 | 55 | 0.869347 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | e07164b2b000c4b60775a0b90e92da0f866e4b1056f45f6f7db17248370a4f3a | 6,509 | [
-1
] |
6,511 | Makefile | LdBeth_CLFSWM/Makefile | DESTDIR=/usr/local/
LOAD=load.lisp
all: clfswm
clfswm:
@echo "Please, tweak the file load.lisp to fit your needs."
@clisp -E iso-8859-1 $(LOAD) || \
sbcl --load $(LOAD) || \
cmucl -load $(LOAD) || lisp -load $(LOAD) || \
ccl --load $(LOAD) || \
ecl -load $(LOAD) || \
echo "No Lisp found. Please, install one of CLISP, SBCL, CMUCL, CCL or ECL"
install: clfswm
@echo "Installing CLFSWM in $(DESTDIR)"
mkdir -p $(DESTDIR)
mkdir -p $(DESTDIR)/bin
mkdir -p $(DESTDIR)/lib/clfswm
mkdir -p $(DESTDIR)/share/doc/clfswm
mkdir -p $(DESTDIR)/man/man.1
mkdir -p $(DESTDIR)/share/applications
mkdir -p $(DESTDIR)/share/xsessions
cp clfswm $(DESTDIR)/bin/
cp -R contrib/* $(DESTDIR)/lib/clfswm/
cp doc/* $(DESTDIR)/share/doc/clfswm/
cp README COPYING AUTHORS $(DESTDIR)/share/doc/clfswm/
cp clfswm.1 $(DESTDIR)/man/man.1/
cp clfswm.desktop $(DESTDIR)/share/applications/
cp clfswm-session.desktop $(DESTDIR)/share/xsessions/
uninstall:
@echo "Uninstalling CLFSWM from $(DESTDIR)"
rm -f $(DESTDIR)/bin/clfswm
rm -rf $(DESTDIR)/lib/clfswm/*
rm -f $(DESTDIR)/share/doc/clfswm/*
rm -f $(DESTDIR)/man/man.1/clfswm.1
rm -f $(DESTDIR)/share/applications/clfswm.desktop
rm -f $(DESTDIR)/share/xsessions/clfswm-session.desktop
rmdir $(DESTDIR)/lib/clfswm
rmdir $(DESTDIR)/share/doc/clfswm
clean:
rm -f clfswm
| 1,329 | Common Lisp | .l | 39 | 32 | 76 | 0.708594 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 29b2ec252d1eda865e9350c8725f89fbfb2d437d00dd22148cc3075f3343b645 | 6,511 | [
-1
] |
6,512 | clfswm.desktop | LdBeth_CLFSWM/clfswm.desktop | [Desktop Entry]
Version=1212
Encoding=UTF-8
Type=Application
Name=clfswm
Comment=A(nother) Common Lisp FullScreen Window Manager
Exec=clfswm
| 141 | Common Lisp | .l | 7 | 19.142857 | 55 | 0.873134 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 89e96ce4587f01c4e96c6c2bc88bddbca1d79294840908f8c04231d524771eb1 | 6,512 | [
-1
] |
6,513 | clfswm.1 | LdBeth_CLFSWM/clfswm.1 | '\" t
.\" Title: clfswm
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 10/12/2012
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "CLFSWM" "1" "10/12/2012" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
clfswm \- A(nother) Common Lisp Full Screen Window Manager
.SH "SYNOPSIS"
.sp
\fBclfswm\fR [\fIimplementation\fR]
.SH "DESCRIPTION"
.sp
CLFSWM is a 100% Common Lisp X11 window manager (based on Tinywm and Stumpwm\&. Many thanks to them)\&. It can be driven only with the keyboard or with the mouse\&.
.sp
CLFSWM uses the following rules to determine which implementation should be used:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
the first command line argument\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
environment variable $LISP
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
the first line like "debian=<impl>" in its configuration file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 4.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 4." 4.2
.\}
clisp
.RE
.sp
CLFSWM handles clisp, sbcl and cmucl internally\&. If you specify a different implementation, CLFSWM will try to execute the command clfswm\-<implementation>\&. See /usr/share/doc/clfswm/README\&.Debian for details\&.
.SH "OPTIONS"
.PP
\fIimplementation\fR
.RS 4
Indicates which implementation should be used\&.
.RE
.SH "ENVIRONMENT"
.PP
\fILISP\fR
.RS 4
Indicates which implementation should be used\&.
.RE
.SH "FILES"
.PP
\fI$XDG_CONFIG_HOME/clfswm/clfswmrc\fR
.RS 4
User configuration file\&. If XDG_CONFIG_HOME is undefined,
\fI$HOME/\&.config/clfswm/clfswmrc\fR
will be used\&.
.RE
.PP
\fI$HOME/\&.clfswmrc\fR
.RS 4
Deprecated\&. This file will be used only if the previous file does not exist\&.
.RE
.PP
\fI/etc/clfswmrc\fR
.RS 4
System\-wide configuration file\&.
.RE
.SH "SEE ALSO"
.sp
clisp(1), sbcl(1), cmucl(1)\&.
.SH "AUTHOR"
.sp
CLFSWM was written by Philippe Brochard <pbrochard@common\-lisp\&.net>\&.
.sp
This manual page was written by Desmond O\&. Chang <dochang@gmail\&.com>, for the Debian project (and may be used by others)\&.
| 3,083 | Common Lisp | .l | 123 | 24.065041 | 217 | 0.557432 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | e551bbec5c77e030eb6d67db8224ebd06a2533bbcdae6b86a9741d3b2faf38f7 | 6,513 | [
-1
] |
6,541 | clfswm.1.txt | LdBeth_CLFSWM/doc/clfswm.1.txt | // -*- mode: doc -*-
// Use "a2x -f manpage clfswm.1.txt" to generate the man page.
CLFSWM(1)
=========
:doctype: manpage
NAME
----
clfswm - A(nother) Common Lisp Full Screen Window Manager
SYNOPSIS
--------
*clfswm* ['implementation']
DESCRIPTION
-----------
CLFSWM is a 100% Common Lisp X11 window manager (based on Tinywm and
Stumpwm. Many thanks to them). It can be driven only with the
keyboard or with the mouse.
CLFSWM uses the following rules to determine which implementation
should be used:
. the first command line argument.
. environment variable $LISP
. the first line like "debian=<impl>" in its configuration file.
. clisp
CLFSWM handles clisp, sbcl and cmucl internally. If you specify a
different implementation, CLFSWM will try to execute the command
`clfswm-<implementation>`. See /usr/share/doc/clfswm/README.Debian
for details.
OPTIONS
-------
'implementation'::
Indicates which implementation should be used.
ENVIRONMENT
-----------
'LISP'::
Indicates which implementation should be used.
FILES
-----
'$XDG_CONFIG_HOME/clfswm/clfswmrc'::
User configuration file. If XDG_CONFIG_HOME is undefined,
'$HOME/.config/clfswm/clfswmrc' will be used.
'$HOME/.clfswmrc'::
Deprecated. This file will be used only if the previous file
does not exist.
'/etc/clfswmrc'::
System-wide configuration file.
SEE ALSO
--------
clisp(1), sbcl(1), cmucl(1).
AUTHOR
------
CLFSWM was written by Philippe Brochard <[email protected]>.
This manual page was written by Desmond O. Chang <[email protected]>,
for the Debian project (and may be used by others).
| 1,596 | Common Lisp | .l | 52 | 29.153846 | 69 | 0.751806 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 02f1aa4346bb7d6f34db091e24d2cd8a2b6fda0db8da7669ad518dc8afc30a32 | 6,541 | [
-1
] |
6,542 | corner.html | LdBeth_CLFSWM/doc/corner.html | <html>
<head>
<title>
CLFSWM Corners
</title>
</head>
<body>
<h1>
<a name="top">
CLFSWM Corners
</a>
</h1>
<p>
Here are the actions associated to screen corners in CLFSWM:
</p>
<h3>
*corner-main-mode-left-button*
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Left:
</td>
<td style="color:#0000ff" nowrap>
Open the main menu
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Right:
</td>
<td style="color:#0000ff" nowrap>
Present a virtual keyboard
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Right:
</td>
<td style="color:#0000ff" nowrap>
Present all windows in currents roots (An expose like)
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
</table>
<h3>
*corner-main-mode-middle-button*
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Left:
</td>
<td style="color:#0000ff" nowrap>
Open the help and info window
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Right:
</td>
<td style="color:#0000ff" nowrap>
Close or kill the current window (ask before doing anything)
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Right:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
</table>
<h3>
*corner-main-mode-right-button*
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Left:
</td>
<td style="color:#0000ff" nowrap>
Hide/Unhide a terminal
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Right:
</td>
<td style="color:#0000ff" nowrap>
Close or kill the current window (ask before doing anything)
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Right:
</td>
<td style="color:#0000ff" nowrap>
Present all windows in all frames (An expose like)
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
</table>
<h3>
*corner-second-mode-left-button*
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Right:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Right:
</td>
<td style="color:#0000ff" nowrap>
Present all windows in currents roots (An expose like)
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
</table>
<h3>
*corner-second-mode-middle-button*
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Left:
</td>
<td style="color:#0000ff" nowrap>
Open the help and info window
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Right:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Right:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
</table>
<h3>
*corner-second-mode-right-button*
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Top-Right:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Right:
</td>
<td style="color:#0000ff" nowrap>
Present all windows in all frames (An expose like)
</td>
</tr>
<tr>
<td align="left" width="1%" style="color:#ff0000" nowrap>
Bottom-Left:
</td>
<td style="color:#0000ff" nowrap>
---
</td>
</tr>
</table>
<p>
<small>
This documentation was produced with the CLFSWM auto-doc functions. To reproduce it, use the produce-corner-doc-html-in-file or
the produce-all-docs function from the Lisp REPL.
</small>
</p>
<p>
<small>
Something like this:<br>
LISP> (in-package :clfswm)<br>
CLFSWM> (produce-corner-doc-html-in-file "my-corner.html")<br>
or<br> CLFSWM> (produce-all-docs)
</small>
</p>
</body>
</html>
| 6,599 | Common Lisp | .l | 253 | 18.01581 | 135 | 0.494485 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | df94c5353e3e12c7d561f322f3ecbc8ec2c01c48e7fae51df3827e0cdf159290 | 6,542 | [
-1
] |
6,543 | variables.txt | LdBeth_CLFSWM/doc/variables.txt | * CLFSWM Configuration variables *
------------------------------
<= Circulate Mode Group =>
*CIRCULATE-BACKGROUND* = "black"
Circulate string window background color
*CIRCULATE-BORDER* = "red"
Circulate string window border color
*CIRCULATE-HEIGHT* = 15
Circulate mode window height
*CIRCULATE-WIDTH* = 400
Circulate mode window width
*CIRCULATE-TEXT-LIMITE* = 30
Maximum text limite in the circulate window
*CIRCULATE-FONT-STRING* = "genera-cptfonti"
Circulate string window font string
*CIRCULATE-TRANSPARENCY* = 0.8
Circulate window background transparency
*CIRCULATE-FOREGROUND* = "green"
Circulate string window foreground color
<= Corner Group =>
*VIRTUAL-KEYBOARD-CMD* = "xvkbd"
The command to display the virtual keybaord
Here is an ~/.Xresources example for xvkbd:
xvkbd.windowGeometry: 300x100-0-0
xvkbd*Font: 6x12
xvkbd.modalKeytop: true
xvkbd.customization: -french
xvkbd.keypad: false
And make it always on top
*CORNER-SECOND-MODE-MIDDLE-BUTTON* = ((:TOP-LEFT HELP-ON-CLFSWM) (:TOP-RIGHT NIL) (:BOTTOM-RIGHT NIL) (:BOTTOM-LEFT NIL))
Actions on corners in the second mode with the middle mouse button
*CORNER-ERROR-MESSAGE-DELAY* = 5
Time to display the error message on commad error
*CLFSWM-TERMINAL-CMD* = "xterm -T clfswm-terminal"
The clfswm terminal command.
This command must set the window title to *clfswm-terminal-name*
*CORNER-SECOND-MODE-LEFT-BUTTON* = ((:TOP-LEFT NIL) (:TOP-RIGHT NIL) (:BOTTOM-RIGHT EXPOSE-WINDOWS-MODE) (:BOTTOM-LEFT NIL))
Actions on corners in the second mode with the left mouse button
*CORNER-MAIN-MODE-LEFT-BUTTON* = ((:TOP-LEFT OPEN-MENU) (:TOP-RIGHT PRESENT-VIRTUAL-KEYBOARD) (:BOTTOM-RIGHT EXPOSE-WINDOWS-MODE) (:BOTTOM-LEFT NIL))
Actions on corners in the main mode with the left mouse button
*CORNER-MAIN-MODE-MIDDLE-BUTTON* = ((:TOP-LEFT HELP-ON-CLFSWM) (:TOP-RIGHT ASK-CLOSE/KILL-CURRENT-WINDOW) (:BOTTOM-RIGHT NIL) (:BOTTOM-LEFT NIL))
Actions on corners in the main mode with the middle mouse button
*CORNER-COMMAND-TRY-NUMBER* = 10
Number of try to wait the window in query tree
*CORNER-COMMAND-TRY-DELAY* = 0.2
Time to wait before checking window in query tree
*CORNER-MAIN-MODE-RIGHT-BUTTON* = ((:TOP-LEFT PRESENT-CLFSWM-TERMINAL) (:TOP-RIGHT ASK-CLOSE/KILL-CURRENT-WINDOW) (:BOTTOM-RIGHT EXPOSE-ALL-WINDOWS-MODE) (:BOTTOM-LEFT NIL))
Actions on corners in the main mode with the right mouse button
*CORNER-SECOND-MODE-RIGHT-BUTTON* = ((:TOP-LEFT NIL) (:TOP-RIGHT NIL) (:BOTTOM-RIGHT EXPOSE-ALL-WINDOWS-MODE) (:BOTTOM-LEFT NIL))
Actions on corners in the second mode with the right mouse button
*CLFSWM-TERMINAL-NAME* = "clfswm-terminal"
The clfswm terminal name
*CORNER-ERROR-MESSAGE-COLOR* = "red"
Error message color
*CORNER-SIZE* = 3
The size of the corner square
<= Expose Mode Group =>
*EXPOSE-TRANSPARENCY* = 0.9
Expose string window background transparency
*EXPOSE-BACKGROUND-LETTER-MATCH* = "green"
Expose string window background color for matching letters
*EXPOSE-SHOW-WINDOW-TITLE* = T
Show the window title on accel window
*EXPOSE-FONT-STRING* = "genera-cptfontc"
Expose string window font string
*EXPOSE-BORDER* = "grey20"
Expose string window border color
*EXPOSE-VALID-ON-KEY* = T
Valid expose mode when an accel key is pressed
*EXPOSE-FOREGROUND* = "grey50"
Expose string window foreground color
*EXPOSE-FOREGROUND-LETTER-NOK* = "grey30"
Expose string window foreground color for letter not selected
*EXPOSE-FOREGROUND-LETTER* = "red"
Expose string window foreground color for letters
*EXPOSE-DIRECT-SELECT* = T
Immediately select child if they can be directly accessed
*EXPOSE-BACKGROUND* = "grey10"
Expose string window background color
<= Fastswitch Mode Group =>
*FASTSWITCH-FOREGROUND-CHILDNAME* = "grey70"
Fastswitch string window foreground color for childname
*FASTSWITCH-SHOW-FRAME-P* = T
Fastswitch show frame in mini window
*FASTSWITCH-DISPLAY-MODE* = TREE
Fastswitch display mode (one of LINE or TREE)
*FASTSWITCH-TRANSPARENCY* = 0.9
Fastswitch string window background transparency
*FASTSWITCH-BORDER* = "grey20"
Fastswitch string window border color
*FASTSWITCH-BACKGROUND* = "grey10"
Fastswitch string window background color
*FASTSWITCH-FOREGROUND-LETTER-SECOND* = "magenta"
Fastswitch string window foreground color for letters
*FASTSWITCH-FOREGROUND-LETTER* = "red"
Fastswitch string window foreground color for letters
*FASTSWITCH-ADJUST-WINDOW-P* = T
Fastswitch adjust window to show all children names
*FASTSWITCH-FOREGROUND-LETTER-SECOND-FRAME* = "yellow"
Fastswitch string window foreground color for letters for frames
*FASTSWITCH-FONT-STRING* = "genera-13fgb"
Fastswitch string window font string
*FASTSWITCH-FOREGROUND* = "grey50"
Fastswitch string window foreground color
<= Frame Colors Group =>
*FRAME-FOREGROUND-ROOT* = "Red"
Frame foreground when the frame is the root frame
*FRAME-FOREGROUND* = "Green"
Frame foreground
*FRAME-BACKGROUND* = "Black"
Frame background
*FRAME-TRANSPARENCY* = 0.6
Frame background transparency
*FRAME-FOREGROUND-HIDDEN* = "Darkgreen"
Frame foreground for hidden windows
<= Gimp Layout Group =>
*GIMP-LAYOUT-NOTIFY-WINDOW-DELAY* = 30
Time to display the GIMP layout notify window help
<= Hook Group =>
*CLOSE-HOOK* = (CLOSE-NOTIFY-WINDOW CLOSE-CLFSWM-TERMINAL CLOSE-VIRTUAL-KEYBOARD)
Close hook. This hook is run just before closing the display
*MAIN-ENTRANCE-HOOK* = NIL
Hook executed on the main function entrance after
loading configuration file and before opening the display.
*QUERY-KEY-PRESS-HOOK* = (QUERY-MODE-COMPLETE-SUGGEST-RESET)
Query hook. Hook called on each key press event in query loop
*BINDING-HOOK* = (INIT-*QUERY-KEYS* SET-DEFAULT-QUERY-KEYS SET-DEFAULT-CIRCULATE-KEYS INIT-*INFO-KEYS* INIT-*INFO-MOUSE* SET-DEFAULT-INFO-KEYS SET-DEFAULT-INFO-MOUSE INIT-*MAIN-KEYS* INIT-*MAIN-MOUSE* SET-DEFAULT-MAIN-KEYS SET-DEFAULT-MAIN-MOUSE INIT-*SECOND-KEYS* INIT-*SECOND-MOUSE* SET-DEFAULT-SECOND-KEYS SET-DEFAULT-SECOND-MOUSE)
Hook executed when keys/buttons are bounds
*DEFAULT-NW-HOOK* = DEFAULT-FRAME-NW-HOOK
Default action to do on newly created windows
*INIT-HOOK* = (DEFAULT-INIT-HOOK DISPLAY-HELLO-WINDOW)
Init hook. This hook is run just after the first root frame is created
*ROOT-SIZE-CHANGE-HOOK* = NIL
Hook executed when the root size has changed for example when adding/removing a monitor
*LOOP-HOOK* = NIL
Hook executed on each event loop
*QUERY-BUTTON-PRESS-HOOK* = NIL
Query hook. Hook called on each button press event in query loop
<= Identify Key Group =>
*IDENTIFY-FOREGROUND* = "green"
Identify window foreground color
*IDENTIFY-BORDER* = "red"
Identify window border color
*IDENTIFY-TRANSPARENCY* = 0.8
Identify window background transparency
*IDENTIFY-FONT-STRING* = "genera-hl10"
Identify window font string
*IDENTIFY-BACKGROUND* = "black"
Identify window background color
<= Info Mode Group =>
*INFO-COLOR-UNDERLINE* = "Yellow"
Colored info underline color
*INFO-TRANSPARENCY* = 0.8
Info window background transparency
*INFO-FOREGROUND* = "green"
Info window foreground color
*INFO-FONT-STRING* = "genera-cptfontcc"
Info window font string
*INFO-COLOR-FIRST* = "Cyan"
Colored info first color
*INFO-COLOR-TITLE* = "Magenta"
Colored info title color
*INFO-BORDER* = "red"
Info window border color
*INFO-COLOR-SECOND* = "lightblue"
Colored info second color
*INFO-CLICK-TO-SELECT* = T
If true, click on info window select item. Otherwise, click to drag the menu
*INFO-SELECTED-BACKGROUND* = "blue"
Info selected item background color
*INFO-LINE-CURSOR* = "white"
Info window line cursor color color
*INFO-BACKGROUND* = "black"
Info window background color
<= Main Mode Group =>
*COLOR-MOVE-WINDOW* = "DeepPink"
Color when moving or resizing a windows
*COLOR-MAYBE-SELECTED* = "Yellow"
Color of maybe selected windows
*COLOR-UNSELECTED* = "Blue"
Color of unselected color
*COLOR-SELECTED* = "Red"
Color of selected window
<= Menu Group =>
*MENU-COLOR-COMMENT* = "Yellow"
Comment color in menu
*MENU-KEY-BOUND-COLOR* = "gray50"
Key bound min menu color
*XDG-SECTION-LIST* = (TEXTEDITOR FILEMANAGER WEBBROWSER AUDIOVIDEO AUDIO VIDEO DEVELOPMENT EDUCATION GAME GRAPHICS NETWORK OFFICE SETTINGS SYSTEM UTILITY TERMINALEMULATOR SCREENSAVER)
Standard menu sections
*MENU-COLOR-MENU-KEY* = #<COLOR 0.99609375 0.6015625 0.99609375>
Menu key color in menu
*MENU-COLOR-KEY* = "Magenta"
Key color in menu
*MENU-COLOR-SUBMENU* = "Cyan"
Submenu color in menu
<= Miscellaneous Group =>
*STEAL-FOCUS* = T
Allow to steal the focus on configure request
*BORDER-SIZE* = 1
Windows and frames border size
*SPATIAL-MOVE-DELAY-BEFORE* = 0.2
Delay to display the current child before doing a spatial move
*SNAP-SIZE* = 5
Snap size (in % of parent size) when move or resize frame is constrained
*SHOW-HIDE-POLICY-TYPE* = (:NORMAL)
Windows types which are optimized by the show hide policy
*DEFAULT-WINDOW-HEIGHT* = 300
Default window height
*DEFAULT-MODIFIERS* = NIL
Default modifiers list to append to explicit modifiers
Example: :mod-2 for num_lock, :lock for Caps_lock...
*TRANSPARENT-BACKGROUND* = T
Enable transparent background: one of nil, :pseudo, t (xcompmgr must be started)
*SPATIAL-MOVE-DELAY-AFTER* = 0.5
Delay to display the new child after doing a spatial move
*DEFAULT-WINDOW-WIDTH* = 400
Default window width
*HAVE-TO-COMPRESS-NOTIFY* = T
Compress event notify?
This variable may be useful to speed up some slow version of CLX.
It is particulary useful with CLISP/MIT-CLX.
*DEFAULT-TRANSPARENCY* = 0.8
Default transparency for all windows when in xcompmgr transparency mode
*DEFAULT-FRAME-DATA* = ((:TILE-SIZE 0.8) (:TILE-SPACE-SIZE 0.1) (:FAST-LAYOUT (TILE-LEFT-LAYOUT TILE-LAYOUT)) (:MAIN-LAYOUT-WINDOWS NIL))
Default slots set in frame date
*DEFAULT-FONT-STRING* = "genera-cptfontc"
The default font used in clfswm
*SHOW-ROOT-FRAME-P* = NIL
Show the root frame information or not
*LOOP-TIMEOUT* = 1
Maximum time (in seconds) to wait before calling *loop-hook*
*DEFAULT-MANAGED-TYPE* = (:NORMAL)
Default managed window types
*HIDE-UNMANAGED-WINDOW* = T
Hide or not unmanaged windows when a child is deselected.
*WM-NAME* = "clfswm"
Set to "LG3D" for making Java GUI programs work.
*SHOW-HIDE-POLICY* = #<Compiled-function <= #x300000165B7F>
'NIL': always display all children (better with transparency support).
'<': Hide only children less than children above.
'<=': Hide children less or equal to children above (better for performance on slow machine).
*NEVER-MANAGED-WINDOW-LIST* = ((EQUAL-WM-CLASS-ROX-PINBOARD NIL) (EQUAL-WM-CLASS-XVKBD RAISE-WINDOW) (EQUAL-CLFSWM-TERMINAL RAISE-AND-FOCUS-WINDOW))
CLFSWM will never manage windows of this type.
A list of (list match-function handle-function)
*DEFAULT-FOCUS-POLICY* = :CLICK
Default mouse focus policy. One of :click, :sloppy, :sloppy-strict, :sloppy-select or
:sloppy-select-window.
<= Notify Window Group =>
*NOTIFY-WINDOW-BACKGROUND* = "black"
Notify Window background color
*NOTIFY-WINDOW-TRANSPARENCY* = 0.8
Notify window background transparency
*NOTIFY-WINDOW-BORDER* = "red"
Notify Window border color
*NOTIFY-WINDOW-DELAY* = 10
Notify Window display delay
*NOTIFY-WINDOW-FONT-STRING* = "genera-sail12"
Notify window font string
*NOTIFY-WINDOW-FOREGROUND* = "green"
Notify Window foreground color
<= Placement Group =>
*ASK-CLOSE/KILL-PLACEMENT* = TOP-RIGHT-ROOT-PLACEMENT
Ask close/kill window placement
*NOTIFY-WINDOW-PLACEMENT* = BOTTOM-RIGHT-ROOT-PLACEMENT
Notify window placement
*EXPOSE-QUERY-PLACEMENT* = BOTTOM-LEFT-ROOT-PLACEMENT
Expose mode query window placement
*UNMANAGED-WINDOW-PLACEMENT* = MIDDLE-MIDDLE-ROOT-PLACEMENT
Unmanager window placement
*SECOND-MODE-PLACEMENT* = TOP-MIDDLE-ROOT-PLACEMENT
Second mode window placement
*INFO-MODE-PLACEMENT* = TOP-LEFT-ROOT-PLACEMENT
Info mode window placement
*QUERY-MODE-PLACEMENT* = TOP-LEFT-ROOT-PLACEMENT
Query mode window placement
*EXPOSE-MODE-PLACEMENT* = TOP-LEFT-CHILD-PLACEMENT
Expose mode window placement (Selection keys position)
*BANISH-POINTER-PLACEMENT* = BOTTOM-RIGHT-ROOT-PLACEMENT
Pointer banishment placement
*CIRCULATE-MODE-PLACEMENT* = BOTTOM-MIDDLE-ROOT-PLACEMENT
Circulate mode window placement
*FASTSWITCH-MODE-PLACEMENT* = TOP-LEFT-ROOT-PLACEMENT
Fastswitch mode window placement
<= Query String Group =>
*QUERY-TRANSPARENCY* = 0.8
Query string window background transparency
*QUERY-CURSOR-COLOR* = "white"
Query string window foreground cursor color
*QUERY-PARENT-COLOR* = "blue"
Query string window parenthesis color
*QUERY-BACKGROUND* = "black"
Query string window background color
*QUERY-BORDER* = "red"
Query string window border color
*QUERY-MIN-COMPLET-CHAR* = 2
Query minimum input length for completion
*QUERY-PARENT-ERROR-COLOR* = "red"
Query string window parenthesis color when no match
*QUERY-FONT-STRING* = "genera-cptfontc"
Query string window font string
*QUERY-FOREGROUND* = "green"
Query string window foreground color
*QUERY-MESSAGE-COLOR* = "yellow"
Query string window message color
*QUERY-MAX-COMPLET-LENGTH* = 100
Query maximum length of completion list
<= Root Group =>
*SHOW-CURRENT-ROOT-DELAY* = 1
Delay to show the current root
*SHOW-CURRENT-ROOT-PLACEMENT* = MIDDLE-MIDDLE-ROOT-PLACEMENT
Current root notify window placement
*SHOW-CURRENT-ROOT-MESSAGE* = "Current root"
Current root notify window message
*CREATE-FRAME-ON-ROOT* = NIL
Create frame on root.
Set this variable to true if you want to allow to create a new frame
on the root window in the main mode with the mouse
*HAVE-TO-SHOW-CURRENT-ROOT* = T
Show the current root if true
<= Second Mode Group =>
*SM-HEIGHT* = 25
Second mode window height
*SM-BACKGROUND-COLOR* = "Black"
Second mode window background color
*SM-FOREGROUND-COLOR* = "Red"
Second mode window foreground color
*SM-FONT-STRING* = "genera-cptfontbi"
Second mode window font string
*SM-TRANSPARENCY* = 0.8
Second mode background transparency
*SM-BORDER-COLOR* = "Green"
Second mode window border color
*SM-WIDTH* = 300
Second mode window width
Those variables can be changed in clfswm.
Maybe you'll need to restart clfswm to take care of new values
This documentation was produced with the CLFSWM auto-doc functions.
To reproduce it, use the produce-conf-var-doc-in-file or
the produce-all-docs function from the Lisp REPL.
Something like this:
LISP> (in-package :clfswm)
CLFSWM> (produce-conf-var-doc-in-file "my-variables.txt")
or
CLFSWM> (produce-all-docs)
| 15,210 | Common Lisp | .l | 345 | 40.231884 | 336 | 0.744345 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | df6100e5055e7dc3d8b6bdb40ef204954117b3b7694487ef692afd31171c1f66 | 6,543 | [
-1
] |
6,544 | keys.html | LdBeth_CLFSWM/doc/keys.html | <html>
<head>
<title>
CLFSWM Keys
</title>
</head>
<body>
<h1>
CLFSWM Keys
</h1>
<p>
<small>
Note: Mod-1 is the Meta or Alt key, Mod-4 is the Super or Cmd key
</small>
</p>
<h3>
<u>
Main mode keys
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Enter in the selected frame - ie make it the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
7
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select the next brother
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
2
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Maximize/Unmaximize the current frame in its parent frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Menu
</td>
<td style="color:#0000ff" nowrap>
Switch between children with expose shortcut
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Page_down
</td>
<td style="color:#0000ff" nowrap>
Select the next child in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
B
</td>
<td style="color:#0000ff" nowrap>
Move the pointer to the lower right corner of the screen
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
0
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Leave the selected frame - ie make its parent the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Switch to the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
9
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Escape
</td>
<td style="color:#0000ff" nowrap>
Close or kill the current window (ask before doing anything)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Present all windows in currents roots (An expose like)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
F12
</td>
<td style="color:#0000ff" nowrap>
Hide/Unhide a terminal
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the right direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Page_down
</td>
<td style="color:#0000ff" nowrap>
Raise the child in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
T
</td>
<td style="color:#0000ff" nowrap>
Switch to editing mode (second mode)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
6
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the left direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select the previous brother and move the current focused child in it
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
F4
</td>
<td style="color:#0000ff" nowrap>
Switch between children with expose shortcut
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Page_up
</td>
<td style="color:#0000ff" nowrap>
Select the previous child in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Exit clfswm
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control Shift
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Show/Hide the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Present all windows in all frames (An expose like)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the left direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Switch and select the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
8
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select the next brother and move the current focused child in it
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Page_up
</td>
<td style="color:#0000ff" nowrap>
Lower the child in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-5
</td>
<td align="center" nowrap>
Menu
</td>
<td style="color:#0000ff" nowrap>
Present all windows in currents roots (An expose like)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Select the previous level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the down direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Less
</td>
<td style="color:#0000ff" nowrap>
Switch to editing mode (second mode)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the up direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Menu
</td>
<td style="color:#0000ff" nowrap>
Move children with expose shortcut
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the next child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the previous child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-5
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Maximize/Unmaximize the current frame in its parent frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the right direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the up direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-1
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Switch between two layouts
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the next subchild
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select the previous brother
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Select the next level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the down direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
F12
</td>
<td style="color:#0000ff" nowrap>
Show all frames info windows
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Shift
</td>
<td align="center" nowrap>
F12
</td>
<td style="color:#0000ff" nowrap>
Show all frames info windows until a key is release
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-1
</td>
<td align="center" nowrap>
F1
</td>
<td style="color:#0000ff" nowrap>
Open the help and info window
</td>
</tr>
</table>
<h3>
<u>
Mouse buttons actions in main mode
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Resize and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Increment the child under mouse transparency
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Resize and focus the current frame or focus the current window parent.
Or do actions on corners
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Resize (constrained by other frames) and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Increment slowly the child under mouse transparency
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move and focus the current frame or focus the current window parent.
Or do actions on corners
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Decrement slowly the child under mouse transparency
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Leave the selected frame - ie make its parent the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move the child under the mouse cursor to another frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Select the next level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Select the previous level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move (constrained by other frames) and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Decrement the child under mouse transparency
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
2
</td>
<td style="color:#0000ff" nowrap>
Do actions on corners
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Enter in the selected frame - ie make it the root frame
</td>
</tr>
</table>
<h3>
<u>
Second mode keys
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the right direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Minus
</td>
<td style="color:#0000ff" nowrap>
Decrease the tile layout size
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
K
</td>
<td style="color:#0000ff" nowrap>
Close or kill the current window (ask before doing anything)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Colon
</td>
<td style="color:#0000ff" nowrap>
Eval a lisp form from the query input
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Reset speed mouse coordinates
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Page_down
</td>
<td style="color:#0000ff" nowrap>
Select the previous root
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Plus
</td>
<td style="color:#0000ff" nowrap>
Increase slowly the tile layout size
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Enter in the selected frame - ie make it the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the up direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Page_up
</td>
<td style="color:#0000ff" nowrap>
Lower the child in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
P
</td>
<td style="color:#0000ff" nowrap>
Open the frame movement menu (pack/fill/resize)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
9
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
F12
</td>
<td style="color:#0000ff" nowrap>
Show all frames info windows
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Select the next level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select the previous brother
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
T
</td>
<td style="color:#0000ff" nowrap>
start an xterm
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Exit clfswm
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
A
</td>
<td style="color:#0000ff" nowrap>
Add a default frame in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the previous child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Page_down
</td>
<td style="color:#0000ff" nowrap>
Raise the child in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control Shift
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Show/Hide the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
W
</td>
<td style="color:#0000ff" nowrap>
Open the window menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the down direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
6
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Leave second mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the left direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
C
</td>
<td style="color:#0000ff" nowrap>
Copy the current child to the selection
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Less
</td>
<td style="color:#0000ff" nowrap>
Open the main menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Less
</td>
<td style="color:#0000ff" nowrap>
Open the main menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
X
</td>
<td style="color:#0000ff" nowrap>
Update layout managed children position
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
X
</td>
<td style="color:#0000ff" nowrap>
Clear the current selection
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Switch and select the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select the next brother and move the current focused child in it
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
J
</td>
<td style="color:#0000ff" nowrap>
Swap current brother frame geometry
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Delete
</td>
<td style="color:#0000ff" nowrap>
Delete the current child and its children in all frames
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the left direction
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Shift
</td>
<td align="center" nowrap>
T
</td>
<td style="color:#0000ff" nowrap>
Tile the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Menu
</td>
<td style="color:#0000ff" nowrap>
Show/Hide the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
T
</td>
<td style="color:#0000ff" nowrap>
Decrement the current window transparency
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Page_down
</td>
<td style="color:#0000ff" nowrap>
Rotate root geometry to previous root
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Exclam
</td>
<td style="color:#0000ff" nowrap>
Run a program from the query input
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Page_up
</td>
<td style="color:#0000ff" nowrap>
Rotate root geometry to next root
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Leave the selected frame - ie make its parent the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Plus
</td>
<td style="color:#0000ff" nowrap>
Increase the tile layout size
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Maximize/Unmaximize the current frame in its parent frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
R
</td>
<td style="color:#0000ff" nowrap>
Open the root menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
N
</td>
<td style="color:#0000ff" nowrap>
Open the action by name menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Store the current child and switch to the previous one
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Page_up
</td>
<td style="color:#0000ff" nowrap>
Select the next root
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
V
</td>
<td style="color:#0000ff" nowrap>
Paste the selection in the current frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
F4
</td>
<td style="color:#0000ff" nowrap>
Show/Hide the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Escape
</td>
<td style="color:#0000ff" nowrap>
Close or kill the current window (ask before doing anything)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Shift
</td>
<td align="center" nowrap>
H
</td>
<td style="color:#0000ff" nowrap>
Anti rotate brother frame geometry
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
2
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control Shift
</td>
<td align="center" nowrap>
V
</td>
<td style="color:#0000ff" nowrap>
Paste the selection in the current frame - Do not clear the selection after paste
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select the next brother
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Shift
</td>
<td align="center" nowrap>
F12
</td>
<td style="color:#0000ff" nowrap>
Show all frames info windows until a key is release
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Select the previous level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
7
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Speed move mouse to right
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
I
</td>
<td style="color:#0000ff" nowrap>
Identify a key
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Revert to the first speed move mouse
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the right direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Q
</td>
<td style="color:#0000ff" nowrap>
Close focus window: Delete the focus window in all frames and workspaces
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Escape
</td>
<td style="color:#0000ff" nowrap>
Leave second mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Switch to the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
G
</td>
<td style="color:#0000ff" nowrap>
Stop all pending actions
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
O
</td>
<td style="color:#0000ff" nowrap>
Open the next window in a new frame in the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Present all windows in all frames (An expose like)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
H
</td>
<td style="color:#0000ff" nowrap>
Rotate brother frame geometry
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
0
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
A
</td>
<td style="color:#0000ff" nowrap>
Add a frame in the parent frame (and reorganize parent frame)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Speed move mouse to left
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
F
</td>
<td style="color:#0000ff" nowrap>
Open the frame menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
C
</td>
<td style="color:#0000ff" nowrap>
Open the child menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Present all windows in currents roots (An expose like)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
M
</td>
<td style="color:#0000ff" nowrap>
Open the main menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the next child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-1
</td>
<td align="center" nowrap>
F1
</td>
<td style="color:#0000ff" nowrap>
Open the help and info window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-1
</td>
<td align="center" nowrap>
F10
</td>
<td style="color:#0000ff" nowrap>
Switch between two layouts
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control Shift
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the up direction - move current focused child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
O
</td>
<td style="color:#0000ff" nowrap>
Open the next window in a new frame in the parent frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
8
</td>
<td style="color:#0000ff" nowrap>
Bind or jump to a slot (a frame or a window)
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Minus
</td>
<td style="color:#0000ff" nowrap>
Decrease slowly the tile layout size
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Delete
</td>
<td style="color:#0000ff" nowrap>
Remove the current child from its parent frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-5
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Maximize/Unmaximize the current frame in its parent frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
B
</td>
<td style="color:#0000ff" nowrap>
Move the pointer to the lower right corner of the screen
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the next subchild
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control Shift
</td>
<td align="center" nowrap>
T
</td>
<td style="color:#0000ff" nowrap>
Increment the current window transparency
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
X
</td>
<td style="color:#0000ff" nowrap>
Cut the current child to the selection
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Speed move mouse to down
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Speed move mouse to up
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
U
</td>
<td style="color:#0000ff" nowrap>
Open the action by number menu
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
E
</td>
<td style="color:#0000ff" nowrap>
start emacs
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select the previous brother and move the current focused child in it
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Undo last speed mouse move
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Select spatially the nearest brother of the current child in the down direction
</td>
</tr>
</table>
<h3>
<u>
Mouse buttons actions in second mode
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Resize and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Resize and focus the current child - Create a new frame on the root window.
Or do corners actions
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Resize (constrained by other frames) and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move and focus the current child - Create a new frame on the root window.
Or do corners actions
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Leave the selected frame - ie make its parent the root frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move the child under the mouse cursor to another frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Select the next level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Select the previous level in frame
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
Move (constrained by other frames) and focus the current child - Create a new frame on the root window
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
2
</td>
<td style="color:#0000ff" nowrap>
Do actions on corners
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Enter in the selected frame - ie make it the root frame
</td>
</tr>
</table>
<h3>
<u>
Info mode keys
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
G
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Twosuperior
</td>
<td style="color:#0000ff" nowrap>
Move the pointer to the lower right corner of the screen
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Move one char left
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Escape
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
End
</td>
<td style="color:#0000ff" nowrap>
Move to last line
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Up
</td>
<td style="color:#0000ff" nowrap>
Move one line up
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Q
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-2
</td>
<td align="center" nowrap>
Kp_enter
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode and valid the selected item
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Move one char right
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Page_down
</td>
<td style="color:#0000ff" nowrap>
Move ten lines down
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Page_up
</td>
<td style="color:#0000ff" nowrap>
Move ten lines up
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Return
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode and valid the selected item
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Down
</td>
<td style="color:#0000ff" nowrap>
Move one line down
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Space
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode and valid the selected item
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Home
</td>
<td style="color:#0000ff" nowrap>
Move to first line
</td>
</tr>
</table>
<h3>
<u>
Mouse buttons actions in info mode
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
3
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
1
</td>
<td style="color:#0000ff" nowrap>
<nil>
</nil>
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
4
</td>
<td style="color:#0000ff" nowrap>
Move one line up
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
5
</td>
<td style="color:#0000ff" nowrap>
Move one line down
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Motion
</td>
<td style="color:#0000ff" nowrap>
<nil>
</nil>
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
2
</td>
<td style="color:#0000ff" nowrap>
Leave the info mode
</td>
</tr>
</table>
<h3>
<u>
Circulate mode keys
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Control
</td>
<td align="center" nowrap>
G
</td>
<td style="color:#0000ff" nowrap>
Leave the circulate mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Right
</td>
<td style="color:#0000ff" nowrap>
Select the next brother
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Iso_left_tab
</td>
<td style="color:#0000ff" nowrap>
Select the previous child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
</td>
<td align="center" nowrap>
Escape
</td>
<td style="color:#0000ff" nowrap>
Leave the circulate mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-1 Control
</td>
<td align="center" nowrap>
G
</td>
<td style="color:#0000ff" nowrap>
Leave the circulate mode
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the next child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Shift
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the previous child
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4 Control
</td>
<td align="center" nowrap>
Tab
</td>
<td style="color:#0000ff" nowrap>
Select the next subchild
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-4
</td>
<td align="center" nowrap>
Left
</td>
<td style="color:#0000ff" nowrap>
Select the previous borther
</td>
</tr>
<tr>
<td align="right" style="color:#ff0000" nowrap>
Mod-1
</td>
<td align="center" nowrap>
Escape
</td>
<td style="color:#0000ff" nowrap>
Leave the circulate mode
</td>
</tr>
</table>
<h3>
<u>
Expose windows mode keys
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
</table>
<h3>
<u>
Mouse buttons actions in expose windows mode
</u>
</h3>
<table class="ex" cellspacing="5" border="0" width="100%">
<tr>
<th align="right" width="10%">
Modifiers
</th>
<th align="center" width="10%">
Key/Button
</th>
<th align="left">
Function
</th>
</tr>
</table>
<p>
<small>
This documentation was produced with the CLFSWM auto-doc functions. To reproduce it, use the produce-doc-html-in-file or
the produce-all-docs function from the Lisp REPL.
</small>
</p>
<p>
<small>
Something like this:<br>
LISP> (in-package :clfswm)<br>
CLFSWM> (produce-doc-html-in-file "my-keys.html")<br>
or<br> CLFSWM> (produce-all-docs)
</small>
</p>
</body>
</html>
| 65,042 | Common Lisp | .l | 2,484 | 16.771739 | 128 | 0.481043 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 26ad1364ca3ecaed62ef7d1035e86828edacde0264485f1f4801322eced97361 | 6,544 | [
-1
] |
6,546 | variables.html | LdBeth_CLFSWM/doc/variables.html | <html>
<head>
<title>
CLFSWM - Configuration variables
</title>
</head>
<body>
<h1>
<a name='top'>
CLFSWM - Configuration variables
</a>
</h1>
<p>
Here are the variables you can configure in CLFSWM with the configuration file or the configuration menu:
</p>
<h3>
<a name='top'>
Configuration variables groups:
</a>
</h3>
<ul>
<li>
<a href='#circulate-mode'>
Circulate Mode Group
</a>
</li>
<li>
<a href='#corner'>
Corner Group
</a>
</li>
<li>
<a href='#expose-mode'>
Expose Mode Group
</a>
</li>
<li>
<a href='#fastswitch-mode'>
Fastswitch Mode Group
</a>
</li>
<li>
<a href='#frame-colors'>
Frame Colors Group
</a>
</li>
<li>
<a href='#gimp-layout'>
Gimp Layout Group
</a>
</li>
<li>
<a href='#hook'>
Hook Group
</a>
</li>
<li>
<a href='#identify-key'>
Identify Key Group
</a>
</li>
<li>
<a href='#info-mode'>
Info Mode Group
</a>
</li>
<li>
<a href='#main-mode'>
Main Mode Group
</a>
</li>
<li>
<a href='#menu'>
Menu Group
</a>
</li>
<li>
<a href='#miscellaneous'>
Miscellaneous Group
</a>
</li>
<li>
<a href='#notify-window'>
Notify Window Group
</a>
</li>
<li>
<a href='#placement'>
Placement Group
</a>
</li>
<li>
<a href='#query-string'>
Query String Group
</a>
</li>
<li>
<a href='#root'>
Root Group
</a>
</li>
<li>
<a href='#second-mode'>
Second Mode Group
</a>
</li>
</ul>
<p>
<a name='circulate-mode' href='#top'>
<= Circulate Mode Group =>
</a>
</p>
<font color='#ff0000'>
*circulate-background*
</font>
<font color='#0000ff'>
= "black" <br>
</font>
Circulate string window background color <br>
<font color='#ff0000'>
*circulate-border*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Circulate string window border color <br>
<font color='#ff0000'>
*circulate-height*
</font>
<font color='#0000ff'>
= 15 <br>
</font>
Circulate mode window height <br>
<font color='#ff0000'>
*circulate-width*
</font>
<font color='#0000ff'>
= 400 <br>
</font>
Circulate mode window width <br>
<font color='#ff0000'>
*circulate-text-limite*
</font>
<font color='#0000ff'>
= 30 <br>
</font>
Maximum text limite in the circulate window <br>
<font color='#ff0000'>
*circulate-font-string*
</font>
<font color='#0000ff'>
= "genera-cptfonti" <br>
</font>
Circulate string window font string <br>
<font color='#ff0000'>
*circulate-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Circulate window background transparency <br>
<font color='#ff0000'>
*circulate-foreground*
</font>
<font color='#0000ff'>
= "green" <br>
</font>
Circulate string window foreground color <br>
<p>
<a name='corner' href='#top'>
<= Corner Group =>
</a>
</p>
<font color='#ff0000'>
*virtual-keyboard-cmd*
</font>
<font color='#0000ff'>
= "xvkbd" <br>
</font>
The command to display the virtual keybaord <br>
Here is an ~/.Xresources example for xvkbd: <br>
xvkbd.windowGeometry: 300x100-0-0 <br>
xvkbd*Font: 6x12 <br>
xvkbd.modalKeytop: true <br>
xvkbd.customization: -french <br>
xvkbd.keypad: false <br>
And make it always on top <br>
<font color='#ff0000'>
*corner-second-mode-middle-button*
</font>
<font color='#0000ff'>
= ((:TOP-LEFT HELP-ON-CLFSWM) (:TOP-RIGHT NIL) (:BOTTOM-RIGHT NIL) (:BOTTOM-LEFT NIL)) <br>
</font>
Actions on corners in the second mode with the middle mouse button <br>
<font color='#ff0000'>
*corner-error-message-delay*
</font>
<font color='#0000ff'>
= 5 <br>
</font>
Time to display the error message on commad error <br>
<font color='#ff0000'>
*clfswm-terminal-cmd*
</font>
<font color='#0000ff'>
= "xterm -T clfswm-terminal" <br>
</font>
The clfswm terminal command. <br>
This command must set the window title to *clfswm-terminal-name* <br>
<font color='#ff0000'>
*corner-second-mode-left-button*
</font>
<font color='#0000ff'>
= ((:TOP-LEFT NIL) (:TOP-RIGHT NIL) (:BOTTOM-RIGHT EXPOSE-WINDOWS-MODE) (:BOTTOM-LEFT NIL)) <br>
</font>
Actions on corners in the second mode with the left mouse button <br>
<font color='#ff0000'>
*corner-main-mode-left-button*
</font>
<font color='#0000ff'>
= ((:TOP-LEFT OPEN-MENU) (:TOP-RIGHT PRESENT-VIRTUAL-KEYBOARD) (:BOTTOM-RIGHT EXPOSE-WINDOWS-MODE) (:BOTTOM-LEFT NIL)) <br>
</font>
Actions on corners in the main mode with the left mouse button <br>
<font color='#ff0000'>
*corner-main-mode-middle-button*
</font>
<font color='#0000ff'>
= ((:TOP-LEFT HELP-ON-CLFSWM) (:TOP-RIGHT ASK-CLOSE/KILL-CURRENT-WINDOW) (:BOTTOM-RIGHT NIL) (:BOTTOM-LEFT NIL)) <br>
</font>
Actions on corners in the main mode with the middle mouse button <br>
<font color='#ff0000'>
*corner-command-try-number*
</font>
<font color='#0000ff'>
= 10 <br>
</font>
Number of try to wait the window in query tree <br>
<font color='#ff0000'>
*corner-command-try-delay*
</font>
<font color='#0000ff'>
= 0.2 <br>
</font>
Time to wait before checking window in query tree <br>
<font color='#ff0000'>
*corner-main-mode-right-button*
</font>
<font color='#0000ff'>
= ((:TOP-LEFT PRESENT-CLFSWM-TERMINAL) (:TOP-RIGHT ASK-CLOSE/KILL-CURRENT-WINDOW) (:BOTTOM-RIGHT EXPOSE-ALL-WINDOWS-MODE) (:BOTTOM-LEFT NIL)) <br>
</font>
Actions on corners in the main mode with the right mouse button <br>
<font color='#ff0000'>
*corner-second-mode-right-button*
</font>
<font color='#0000ff'>
= ((:TOP-LEFT NIL) (:TOP-RIGHT NIL) (:BOTTOM-RIGHT EXPOSE-ALL-WINDOWS-MODE) (:BOTTOM-LEFT NIL)) <br>
</font>
Actions on corners in the second mode with the right mouse button <br>
<font color='#ff0000'>
*clfswm-terminal-name*
</font>
<font color='#0000ff'>
= "clfswm-terminal" <br>
</font>
The clfswm terminal name <br>
<font color='#ff0000'>
*corner-error-message-color*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Error message color <br>
<font color='#ff0000'>
*corner-size*
</font>
<font color='#0000ff'>
= 3 <br>
</font>
The size of the corner square <br>
<p>
<a name='expose-mode' href='#top'>
<= Expose Mode Group =>
</a>
</p>
<font color='#ff0000'>
*expose-transparency*
</font>
<font color='#0000ff'>
= 0.9 <br>
</font>
Expose string window background transparency <br>
<font color='#ff0000'>
*expose-background-letter-match*
</font>
<font color='#0000ff'>
= "green" <br>
</font>
Expose string window background color for matching letters <br>
<font color='#ff0000'>
*expose-show-window-title*
</font>
<font color='#0000ff'>
= T <br>
</font>
Show the window title on accel window <br>
<font color='#ff0000'>
*expose-font-string*
</font>
<font color='#0000ff'>
= "genera-cptfontc" <br>
</font>
Expose string window font string <br>
<font color='#ff0000'>
*expose-border*
</font>
<font color='#0000ff'>
= "grey20" <br>
</font>
Expose string window border color <br>
<font color='#ff0000'>
*expose-valid-on-key*
</font>
<font color='#0000ff'>
= T <br>
</font>
Valid expose mode when an accel key is pressed <br>
<font color='#ff0000'>
*expose-foreground*
</font>
<font color='#0000ff'>
= "grey50" <br>
</font>
Expose string window foreground color <br>
<font color='#ff0000'>
*expose-foreground-letter-nok*
</font>
<font color='#0000ff'>
= "grey30" <br>
</font>
Expose string window foreground color for letter not selected <br>
<font color='#ff0000'>
*expose-foreground-letter*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Expose string window foreground color for letters <br>
<font color='#ff0000'>
*expose-direct-select*
</font>
<font color='#0000ff'>
= T <br>
</font>
Immediately select child if they can be directly accessed <br>
<font color='#ff0000'>
*expose-background*
</font>
<font color='#0000ff'>
= "grey10" <br>
</font>
Expose string window background color <br>
<p>
<a name='fastswitch-mode' href='#top'>
<= Fastswitch Mode Group =>
</a>
</p>
<font color='#ff0000'>
*fastswitch-foreground-childname*
</font>
<font color='#0000ff'>
= "grey70" <br>
</font>
Fastswitch string window foreground color for childname <br>
<font color='#ff0000'>
*fastswitch-show-frame-p*
</font>
<font color='#0000ff'>
= T <br>
</font>
Fastswitch show frame in mini window <br>
<font color='#ff0000'>
*fastswitch-display-mode*
</font>
<font color='#0000ff'>
= TREE <br>
</font>
Fastswitch display mode (one of LINE or TREE) <br>
<font color='#ff0000'>
*fastswitch-transparency*
</font>
<font color='#0000ff'>
= 0.9 <br>
</font>
Fastswitch string window background transparency <br>
<font color='#ff0000'>
*fastswitch-border*
</font>
<font color='#0000ff'>
= "grey20" <br>
</font>
Fastswitch string window border color <br>
<font color='#ff0000'>
*fastswitch-background*
</font>
<font color='#0000ff'>
= "grey10" <br>
</font>
Fastswitch string window background color <br>
<font color='#ff0000'>
*fastswitch-foreground-letter-second*
</font>
<font color='#0000ff'>
= "magenta" <br>
</font>
Fastswitch string window foreground color for letters <br>
<font color='#ff0000'>
*fastswitch-foreground-letter*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Fastswitch string window foreground color for letters <br>
<font color='#ff0000'>
*fastswitch-adjust-window-p*
</font>
<font color='#0000ff'>
= T <br>
</font>
Fastswitch adjust window to show all children names <br>
<font color='#ff0000'>
*fastswitch-foreground-letter-second-frame*
</font>
<font color='#0000ff'>
= "yellow" <br>
</font>
Fastswitch string window foreground color for letters for frames <br>
<font color='#ff0000'>
*fastswitch-font-string*
</font>
<font color='#0000ff'>
= "genera-13fgb" <br>
</font>
Fastswitch string window font string <br>
<font color='#ff0000'>
*fastswitch-foreground*
</font>
<font color='#0000ff'>
= "grey50" <br>
</font>
Fastswitch string window foreground color <br>
<p>
<a name='frame-colors' href='#top'>
<= Frame Colors Group =>
</a>
</p>
<font color='#ff0000'>
*frame-foreground-root*
</font>
<font color='#0000ff'>
= "Red" <br>
</font>
Frame foreground when the frame is the root frame <br>
<font color='#ff0000'>
*frame-foreground*
</font>
<font color='#0000ff'>
= "Green" <br>
</font>
Frame foreground <br>
<font color='#ff0000'>
*frame-background*
</font>
<font color='#0000ff'>
= "Black" <br>
</font>
Frame background <br>
<font color='#ff0000'>
*frame-transparency*
</font>
<font color='#0000ff'>
= 0.6 <br>
</font>
Frame background transparency <br>
<font color='#ff0000'>
*frame-foreground-hidden*
</font>
<font color='#0000ff'>
= "Darkgreen" <br>
</font>
Frame foreground for hidden windows <br>
<p>
<a name='gimp-layout' href='#top'>
<= Gimp Layout Group =>
</a>
</p>
<font color='#ff0000'>
*gimp-layout-notify-window-delay*
</font>
<font color='#0000ff'>
= 30 <br>
</font>
Time to display the GIMP layout notify window help <br>
<p>
<a name='hook' href='#top'>
<= Hook Group =>
</a>
</p>
<font color='#ff0000'>
*close-hook*
</font>
<font color='#0000ff'>
= (CLOSE-NOTIFY-WINDOW CLOSE-CLFSWM-TERMINAL CLOSE-VIRTUAL-KEYBOARD) <br>
</font>
Close hook. This hook is run just before closing the display <br>
<font color='#ff0000'>
*main-entrance-hook*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Hook executed on the main function entrance after <br>
loading configuration file and before opening the display. <br>
<font color='#ff0000'>
*query-key-press-hook*
</font>
<font color='#0000ff'>
= (QUERY-MODE-COMPLETE-SUGGEST-RESET) <br>
</font>
Query hook. Hook called on each key press event in query loop <br>
<font color='#ff0000'>
*binding-hook*
</font>
<font color='#0000ff'>
= (INIT-*QUERY-KEYS* SET-DEFAULT-QUERY-KEYS SET-DEFAULT-CIRCULATE-KEYS INIT-*INFO-KEYS* INIT-*INFO-MOUSE* SET-DEFAULT-INFO-KEYS SET-DEFAULT-INFO-MOUSE INIT-*MAIN-KEYS* INIT-*MAIN-MOUSE* SET-DEFAULT-MAIN-KEYS SET-DEFAULT-MAIN-MOUSE INIT-*SECOND-KEYS* INIT-*SECOND-MOUSE* SET-DEFAULT-SECOND-KEYS SET-DEFAULT-SECOND-MOUSE) <br>
</font>
Hook executed when keys/buttons are bounds <br>
<font color='#ff0000'>
*default-nw-hook*
</font>
<font color='#0000ff'>
= DEFAULT-FRAME-NW-HOOK <br>
</font>
Default action to do on newly created windows <br>
<font color='#ff0000'>
*init-hook*
</font>
<font color='#0000ff'>
= (DEFAULT-INIT-HOOK DISPLAY-HELLO-WINDOW) <br>
</font>
Init hook. This hook is run just after the first root frame is created <br>
<font color='#ff0000'>
*root-size-change-hook*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Hook executed when the root size has changed for example when adding/removing a monitor <br>
<font color='#ff0000'>
*loop-hook*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Hook executed on each event loop <br>
<font color='#ff0000'>
*query-button-press-hook*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Query hook. Hook called on each button press event in query loop <br>
<p>
<a name='identify-key' href='#top'>
<= Identify Key Group =>
</a>
</p>
<font color='#ff0000'>
*identify-foreground*
</font>
<font color='#0000ff'>
= "green" <br>
</font>
Identify window foreground color <br>
<font color='#ff0000'>
*identify-border*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Identify window border color <br>
<font color='#ff0000'>
*identify-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Identify window background transparency <br>
<font color='#ff0000'>
*identify-font-string*
</font>
<font color='#0000ff'>
= "genera-hl10" <br>
</font>
Identify window font string <br>
<font color='#ff0000'>
*identify-background*
</font>
<font color='#0000ff'>
= "black" <br>
</font>
Identify window background color <br>
<p>
<a name='info-mode' href='#top'>
<= Info Mode Group =>
</a>
</p>
<font color='#ff0000'>
*info-color-underline*
</font>
<font color='#0000ff'>
= "Yellow" <br>
</font>
Colored info underline color <br>
<font color='#ff0000'>
*info-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Info window background transparency <br>
<font color='#ff0000'>
*info-foreground*
</font>
<font color='#0000ff'>
= "green" <br>
</font>
Info window foreground color <br>
<font color='#ff0000'>
*info-font-string*
</font>
<font color='#0000ff'>
= "genera-cptfontcc" <br>
</font>
Info window font string <br>
<font color='#ff0000'>
*info-color-first*
</font>
<font color='#0000ff'>
= "Cyan" <br>
</font>
Colored info first color <br>
<font color='#ff0000'>
*info-color-title*
</font>
<font color='#0000ff'>
= "Magenta" <br>
</font>
Colored info title color <br>
<font color='#ff0000'>
*info-border*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Info window border color <br>
<font color='#ff0000'>
*info-color-second*
</font>
<font color='#0000ff'>
= "lightblue" <br>
</font>
Colored info second color <br>
<font color='#ff0000'>
*info-click-to-select*
</font>
<font color='#0000ff'>
= T <br>
</font>
If true, click on info window select item. Otherwise, click to drag the menu <br>
<font color='#ff0000'>
*info-selected-background*
</font>
<font color='#0000ff'>
= "blue" <br>
</font>
Info selected item background color <br>
<font color='#ff0000'>
*info-line-cursor*
</font>
<font color='#0000ff'>
= "white" <br>
</font>
Info window line cursor color color <br>
<font color='#ff0000'>
*info-background*
</font>
<font color='#0000ff'>
= "black" <br>
</font>
Info window background color <br>
<p>
<a name='main-mode' href='#top'>
<= Main Mode Group =>
</a>
</p>
<font color='#ff0000'>
*color-move-window*
</font>
<font color='#0000ff'>
= "DeepPink" <br>
</font>
Color when moving or resizing a windows <br>
<font color='#ff0000'>
*color-maybe-selected*
</font>
<font color='#0000ff'>
= "Yellow" <br>
</font>
Color of maybe selected windows <br>
<font color='#ff0000'>
*color-unselected*
</font>
<font color='#0000ff'>
= "Blue" <br>
</font>
Color of unselected color <br>
<font color='#ff0000'>
*color-selected*
</font>
<font color='#0000ff'>
= "Red" <br>
</font>
Color of selected window <br>
<p>
<a name='menu' href='#top'>
<= Menu Group =>
</a>
</p>
<font color='#ff0000'>
*menu-color-comment*
</font>
<font color='#0000ff'>
= "Yellow" <br>
</font>
Comment color in menu <br>
<font color='#ff0000'>
*menu-key-bound-color*
</font>
<font color='#0000ff'>
= "gray50" <br>
</font>
Key bound min menu color <br>
<font color='#ff0000'>
*xdg-section-list*
</font>
<font color='#0000ff'>
= (TEXTEDITOR FILEMANAGER WEBBROWSER AUDIOVIDEO AUDIO VIDEO DEVELOPMENT EDUCATION GAME GRAPHICS NETWORK OFFICE SETTINGS SYSTEM UTILITY TERMINALEMULATOR SCREENSAVER) <br>
</font>
Standard menu sections <br>
<font color='#ff0000'>
*menu-color-menu-key*
</font>
<font color='#0000ff'>
= #<COLOR 0.99609375 0.6015625 0.99609375> <br>
</font>
Menu key color in menu <br>
<font color='#ff0000'>
*menu-color-key*
</font>
<font color='#0000ff'>
= "Magenta" <br>
</font>
Key color in menu <br>
<font color='#ff0000'>
*menu-color-submenu*
</font>
<font color='#0000ff'>
= "Cyan" <br>
</font>
Submenu color in menu <br>
<p>
<a name='miscellaneous' href='#top'>
<= Miscellaneous Group =>
</a>
</p>
<font color='#ff0000'>
*steal-focus*
</font>
<font color='#0000ff'>
= T <br>
</font>
Allow to steal the focus on configure request <br>
<font color='#ff0000'>
*border-size*
</font>
<font color='#0000ff'>
= 1 <br>
</font>
Windows and frames border size <br>
<font color='#ff0000'>
*spatial-move-delay-before*
</font>
<font color='#0000ff'>
= 0.2 <br>
</font>
Delay to display the current child before doing a spatial move <br>
<font color='#ff0000'>
*snap-size*
</font>
<font color='#0000ff'>
= 5 <br>
</font>
Snap size (in % of parent size) when move or resize frame is constrained <br>
<font color='#ff0000'>
*show-hide-policy-type*
</font>
<font color='#0000ff'>
= (:NORMAL) <br>
</font>
Windows types which are optimized by the show hide policy <br>
<font color='#ff0000'>
*default-window-height*
</font>
<font color='#0000ff'>
= 300 <br>
</font>
Default window height <br>
<font color='#ff0000'>
*default-modifiers*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Default modifiers list to append to explicit modifiers <br>
Example: :mod-2 for num_lock, :lock for Caps_lock... <br>
<font color='#ff0000'>
*transparent-background*
</font>
<font color='#0000ff'>
= T <br>
</font>
Enable transparent background: one of nil, :pseudo, t (xcompmgr must be started) <br>
<font color='#ff0000'>
*spatial-move-delay-after*
</font>
<font color='#0000ff'>
= 0.5 <br>
</font>
Delay to display the new child after doing a spatial move <br>
<font color='#ff0000'>
*default-window-width*
</font>
<font color='#0000ff'>
= 400 <br>
</font>
Default window width <br>
<font color='#ff0000'>
*have-to-compress-notify*
</font>
<font color='#0000ff'>
= T <br>
</font>
Compress event notify? <br>
This variable may be useful to speed up some slow version of CLX. <br>
It is particulary useful with CLISP/MIT-CLX. <br>
<font color='#ff0000'>
*default-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Default transparency for all windows when in xcompmgr transparency mode <br>
<font color='#ff0000'>
*default-frame-data*
</font>
<font color='#0000ff'>
= ((:TILE-SIZE 0.8) (:TILE-SPACE-SIZE 0.1) (:FAST-LAYOUT (TILE-LEFT-LAYOUT TILE-LAYOUT)) (:MAIN-LAYOUT-WINDOWS NIL)) <br>
</font>
Default slots set in frame date <br>
<font color='#ff0000'>
*default-font-string*
</font>
<font color='#0000ff'>
= "genera-cptfontc" <br>
</font>
The default font used in clfswm <br>
<font color='#ff0000'>
*show-root-frame-p*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Show the root frame information or not <br>
<font color='#ff0000'>
*loop-timeout*
</font>
<font color='#0000ff'>
= 1 <br>
</font>
Maximum time (in seconds) to wait before calling *loop-hook* <br>
<font color='#ff0000'>
*default-managed-type*
</font>
<font color='#0000ff'>
= (:NORMAL) <br>
</font>
Default managed window types <br>
<font color='#ff0000'>
*hide-unmanaged-window*
</font>
<font color='#0000ff'>
= T <br>
</font>
Hide or not unmanaged windows when a child is deselected. <br>
<font color='#ff0000'>
*wm-name*
</font>
<font color='#0000ff'>
= "clfswm" <br>
</font>
Set to "LG3D" for making Java GUI programs work. <br>
<font color='#ff0000'>
*show-hide-policy*
</font>
<font color='#0000ff'>
= #<Compiled-function <= #x300000165B7F> <br>
</font>
'NIL': always display all children (better with transparency support). <br>
'<': Hide only children less than children above. <br>
<p>
<a name='miscellaneous' href='#top'>
'<=': Hide children less or equal to children above (better for performance on slow machine).
</a>
</p>
<font color='#ff0000'>
*never-managed-window-list*
</font>
<font color='#0000ff'>
= ((EQUAL-WM-CLASS-ROX-PINBOARD NIL) (EQUAL-WM-CLASS-XVKBD RAISE-WINDOW) (EQUAL-CLFSWM-TERMINAL RAISE-AND-FOCUS-WINDOW)) <br>
</font>
CLFSWM will never manage windows of this type. <br>
A list of (list match-function handle-function) <br>
<font color='#ff0000'>
*default-focus-policy*
</font>
<font color='#0000ff'>
= :CLICK <br>
</font>
Default mouse focus policy. One of :click, :sloppy, :sloppy-strict, :sloppy-select or <br>
:sloppy-select-window. <br>
<p>
<a name='notify-window' href='#top'>
<= Notify Window Group =>
</a>
</p>
<font color='#ff0000'>
*notify-window-background*
</font>
<font color='#0000ff'>
= "black" <br>
</font>
Notify Window background color <br>
<font color='#ff0000'>
*notify-window-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Notify window background transparency <br>
<font color='#ff0000'>
*notify-window-border*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Notify Window border color <br>
<font color='#ff0000'>
*notify-window-delay*
</font>
<font color='#0000ff'>
= 10 <br>
</font>
Notify Window display delay <br>
<font color='#ff0000'>
*notify-window-font-string*
</font>
<font color='#0000ff'>
= "genera-sail12" <br>
</font>
Notify window font string <br>
<font color='#ff0000'>
*notify-window-foreground*
</font>
<font color='#0000ff'>
= "green" <br>
</font>
Notify Window foreground color <br>
<p>
<a name='placement' href='#top'>
<= Placement Group =>
</a>
</p>
<font color='#ff0000'>
*ask-close/kill-placement*
</font>
<font color='#0000ff'>
= TOP-RIGHT-ROOT-PLACEMENT <br>
</font>
Ask close/kill window placement <br>
<font color='#ff0000'>
*notify-window-placement*
</font>
<font color='#0000ff'>
= BOTTOM-RIGHT-ROOT-PLACEMENT <br>
</font>
Notify window placement <br>
<font color='#ff0000'>
*expose-query-placement*
</font>
<font color='#0000ff'>
= BOTTOM-LEFT-ROOT-PLACEMENT <br>
</font>
Expose mode query window placement <br>
<font color='#ff0000'>
*unmanaged-window-placement*
</font>
<font color='#0000ff'>
= MIDDLE-MIDDLE-ROOT-PLACEMENT <br>
</font>
Unmanager window placement <br>
<font color='#ff0000'>
*second-mode-placement*
</font>
<font color='#0000ff'>
= TOP-MIDDLE-ROOT-PLACEMENT <br>
</font>
Second mode window placement <br>
<font color='#ff0000'>
*info-mode-placement*
</font>
<font color='#0000ff'>
= TOP-LEFT-ROOT-PLACEMENT <br>
</font>
Info mode window placement <br>
<font color='#ff0000'>
*query-mode-placement*
</font>
<font color='#0000ff'>
= TOP-LEFT-ROOT-PLACEMENT <br>
</font>
Query mode window placement <br>
<font color='#ff0000'>
*expose-mode-placement*
</font>
<font color='#0000ff'>
= TOP-LEFT-CHILD-PLACEMENT <br>
</font>
Expose mode window placement (Selection keys position) <br>
<font color='#ff0000'>
*banish-pointer-placement*
</font>
<font color='#0000ff'>
= BOTTOM-RIGHT-ROOT-PLACEMENT <br>
</font>
Pointer banishment placement <br>
<font color='#ff0000'>
*circulate-mode-placement*
</font>
<font color='#0000ff'>
= BOTTOM-MIDDLE-ROOT-PLACEMENT <br>
</font>
Circulate mode window placement <br>
<font color='#ff0000'>
*fastswitch-mode-placement*
</font>
<font color='#0000ff'>
= TOP-LEFT-ROOT-PLACEMENT <br>
</font>
Fastswitch mode window placement <br>
<p>
<a name='query-string' href='#top'>
<= Query String Group =>
</a>
</p>
<font color='#ff0000'>
*query-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Query string window background transparency <br>
<font color='#ff0000'>
*query-cursor-color*
</font>
<font color='#0000ff'>
= "white" <br>
</font>
Query string window foreground cursor color <br>
<font color='#ff0000'>
*query-parent-color*
</font>
<font color='#0000ff'>
= "blue" <br>
</font>
Query string window parenthesis color <br>
<font color='#ff0000'>
*query-background*
</font>
<font color='#0000ff'>
= "black" <br>
</font>
Query string window background color <br>
<font color='#ff0000'>
*query-border*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Query string window border color <br>
<font color='#ff0000'>
*query-min-complet-char*
</font>
<font color='#0000ff'>
= 2 <br>
</font>
Query minimum input length for completion <br>
<font color='#ff0000'>
*query-parent-error-color*
</font>
<font color='#0000ff'>
= "red" <br>
</font>
Query string window parenthesis color when no match <br>
<font color='#ff0000'>
*query-font-string*
</font>
<font color='#0000ff'>
= "genera-cptfontc" <br>
</font>
Query string window font string <br>
<font color='#ff0000'>
*query-foreground*
</font>
<font color='#0000ff'>
= "green" <br>
</font>
Query string window foreground color <br>
<font color='#ff0000'>
*query-message-color*
</font>
<font color='#0000ff'>
= "yellow" <br>
</font>
Query string window message color <br>
<font color='#ff0000'>
*query-max-complet-length*
</font>
<font color='#0000ff'>
= 100 <br>
</font>
Query maximum length of completion list <br>
<p>
<a name='root' href='#top'>
<= Root Group =>
</a>
</p>
<font color='#ff0000'>
*show-current-root-delay*
</font>
<font color='#0000ff'>
= 1 <br>
</font>
Delay to show the current root <br>
<font color='#ff0000'>
*show-current-root-placement*
</font>
<font color='#0000ff'>
= MIDDLE-MIDDLE-ROOT-PLACEMENT <br>
</font>
Current root notify window placement <br>
<font color='#ff0000'>
*show-current-root-message*
</font>
<font color='#0000ff'>
= "Current root" <br>
</font>
Current root notify window message <br>
<font color='#ff0000'>
*create-frame-on-root*
</font>
<font color='#0000ff'>
= NIL <br>
</font>
Create frame on root. <br>
Set this variable to true if you want to allow to create a new frame <br>
on the root window in the main mode with the mouse <br>
<font color='#ff0000'>
*have-to-show-current-root*
</font>
<font color='#0000ff'>
= T <br>
</font>
Show the current root if true <br>
<p>
<a name='second-mode' href='#top'>
<= Second Mode Group =>
</a>
</p>
<font color='#ff0000'>
*sm-height*
</font>
<font color='#0000ff'>
= 25 <br>
</font>
Second mode window height <br>
<font color='#ff0000'>
*sm-background-color*
</font>
<font color='#0000ff'>
= "Black" <br>
</font>
Second mode window background color <br>
<font color='#ff0000'>
*sm-foreground-color*
</font>
<font color='#0000ff'>
= "Red" <br>
</font>
Second mode window foreground color <br>
<font color='#ff0000'>
*sm-font-string*
</font>
<font color='#0000ff'>
= "genera-cptfontbi" <br>
</font>
Second mode window font string <br>
<font color='#ff0000'>
*sm-transparency*
</font>
<font color='#0000ff'>
= 0.8 <br>
</font>
Second mode background transparency <br>
<font color='#ff0000'>
*sm-border-color*
</font>
<font color='#0000ff'>
= "Green" <br>
</font>
Second mode window border color <br>
<font color='#ff0000'>
*sm-width*
</font>
<font color='#0000ff'>
= 300 <br>
</font>
Second mode window width <br>
<p>
<small>
This documentation was produced with the CLFSWM auto-doc functions. To reproduce it, use the produce-conf-var-doc-html-in-file or
the produce-all-docs function from the Lisp REPL.
</small>
</p>
<p>
<small>
Something like this:<br>
LISP> (in-package :clfswm)<br>
CLFSWM> (produce-conf-var-doc-html-in-file "my-variables.html")<br>
or<br> CLFSWM> (produce-all-docs)
</small>
</p>
</body>
</html>
| 41,044 | Common Lisp | .l | 1,273 | 26.155538 | 331 | 0.565888 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 6d9ad9fe6ee962347fdfe71231995e9b057c1c02772fcd8b406de84d6689360b | 6,546 | [
-1
] |
6,547 | menu.html | LdBeth_CLFSWM/doc/menu.html | <html>
<head>
<title>
CLFSWM Menu
</title>
</head>
<body>
<h1>
<a name="top">
CLFSWM Menu
</a>
</h1>
<p>
Here is the map of the CLFSWM menu:
(By default it is bound on second-mode + m)
</p>
<h3>
<a name="MAIN"></a><a href="#Top">Main</a>
</h3>
<p>
F1: <a href="#HELP-MENU">< Help menu ></a>
</p>
<p>
d: <a href="#STANDARD-MENU">< Standard menu ></a>
</p>
<p>
c: <a href="#CHILD-MENU">< Child menu ></a>
</p>
<p>
r: <a href="#ROOT-MENU">< Root menu ></a>
</p>
<p>
f: <a href="#FRAME-MENU">< Frame menu ></a>
</p>
<p>
w: <a href="#WINDOW-MENU">< Window menu ></a>
</p>
<p>
s: <a href="#SELECTION-MENU">< Selection menu ></a>
</p>
<p>
n: <a href="#ACTION-BY-NAME-MENU">< Action by name menu ></a>
</p>
<p>
u: <a href="#ACTION-BY-NUMBER-MENU">< Action by number menu ></a>
</p>
<p>
y: <a href="#UTILITY-MENU">< Utility menu ></a>
</p>
<p>
o: <a href="#CONFIGURATION-MENU">< Configuration menu ></a>
</p>
<p>
m: <a href="#CLFSWM-MENU">< CLFSWM menu ></a>
</p>
<hr>
<h3>
<a name="HELP-MENU"></a><a href="#MAIN">Help-Menu</a>
</h3>
<p>
a: Show the first aid kit key binding
</p>
<p>
h: Show all key binding
</p>
<p>
b: Show the main mode binding
</p>
<p>
s: Show the second mode key binding
</p>
<p>
r: Show the circulate mode key binding
</p>
<p>
e: Show the expose window mode key binding
</p>
<p>
c: Help on clfswm corner
</p>
<p>
g: Show all configurable variables
</p>
<p>
d: Show the current time and date
</p>
<p>
p: Show current processes sorted by CPU usage
</p>
<p>
m: Show current processes sorted by memory usage
</p>
<p>
v: Show the current CLFSWM version
</p>
<hr>
<h3>
<a name="STANDARD-MENU"></a><a href="#MAIN">Standard-Menu</a>
</h3>
<p>
a: <a href="#TEXTEDITOR">< TEXTEDITOR ></a>
</p>
<p>
b: <a href="#FILEMANAGER">< FILEMANAGER ></a>
</p>
<p>
c: <a href="#WEBBROWSER">< WEBBROWSER ></a>
</p>
<p>
d: <a href="#AUDIOVIDEO">< AUDIOVIDEO ></a>
</p>
<p>
e: <a href="#AUDIO">< AUDIO ></a>
</p>
<p>
f: <a href="#VIDEO">< VIDEO ></a>
</p>
<p>
g: <a href="#DEVELOPMENT">< DEVELOPMENT ></a>
</p>
<p>
h: <a href="#EDUCATION">< EDUCATION ></a>
</p>
<p>
i: <a href="#GAME">< GAME ></a>
</p>
<p>
j: <a href="#GRAPHICS">< GRAPHICS ></a>
</p>
<p>
k: <a href="#NETWORK">< NETWORK ></a>
</p>
<p>
l: <a href="#OFFICE">< OFFICE ></a>
</p>
<p>
m: <a href="#SETTINGS">< SETTINGS ></a>
</p>
<p>
n: <a href="#SYSTEM">< SYSTEM ></a>
</p>
<p>
o: <a href="#UTILITY">< UTILITY ></a>
</p>
<p>
p: <a href="#TERMINALEMULATOR">< TERMINALEMULATOR ></a>
</p>
<p>
q: <a href="#SCREENSAVER">< SCREENSAVER ></a>
</p>
<hr>
<h3>
<a name="TEXTEDITOR"></a><a href="#STANDARD-MENU">Texteditor</a>
</h3>
<p>
a: GNU Emacs - Emacs is the extensible, customizable, self-documenting real-time display editor
</p>
<p>
b: Jasspa MicroEmacs - Advanced Text Editor
</p>
<p>
c: XEmacs Text Editor - Edit text
</p>
<hr>
<h3>
<a name="FILEMANAGER"></a><a href="#STANDARD-MENU">Filemanager</a>
</h3>
<hr>
<h3>
<a name="WEBBROWSER"></a><a href="#STANDARD-MENU">Webbrowser</a>
</h3>
<p>
a: qutebrowser - A keyboard-driven, vim-like browser based on PyQt5
</p>
<hr>
<h3>
<a name="AUDIOVIDEO"></a><a href="#STANDARD-MENU">Audiovideo</a>
</h3>
<p>
a: mpv Media Player - Play movies and songs
</p>
<hr>
<h3>
<a name="AUDIO"></a><a href="#STANDARD-MENU">Audio</a>
</h3>
<p>
a: mpv Media Player - Play movies and songs
</p>
<hr>
<h3>
<a name="VIDEO"></a><a href="#STANDARD-MENU">Video</a>
</h3>
<p>
a: mpv Media Player - Play movies and songs
</p>
<hr>
<h3>
<a name="DEVELOPMENT"></a><a href="#STANDARD-MENU">Development</a>
</h3>
<p>
a: CMake - Cross-platform buildsystem
</p>
<p>
b: GNU Emacs - Emacs is the extensible, customizable, self-documenting real-time display editor
</p>
<p>
c: Jasspa MicroEmacs - Advanced Text Editor
</p>
<p>
d: sandbox - launch a sandboxed shell ... useful for debugging ebuilds
</p>
<hr>
<h3>
<a name="EDUCATION"></a><a href="#STANDARD-MENU">Education</a>
</h3>
<p>
a: xmaxima - A graphical interface for Maxima, a Computer Algebra System
</p>
<hr>
<h3>
<a name="GAME"></a><a href="#STANDARD-MENU">Game</a>
</h3>
<p>
a: Katawa Shoujo - Bishoujo-style visual novel by Four Leaf Studios
</p>
<p>
b: oshu! - Fast osu! port
</p>
<hr>
<h3>
<a name="GRAPHICS"></a><a href="#STANDARD-MENU">Graphics</a>
</h3>
<p>
a: PhotoQt - View and manage images
</p>
<hr>
<h3>
<a name="NETWORK"></a><a href="#STANDARD-MENU">Network</a>
</h3>
<p>
a: qutebrowser - A keyboard-driven, vim-like browser based on PyQt5
</p>
<p>
b: Qtransmission Bittorrent Client - Download and share files over BitTorrent
</p>
<p>
c: WPA Supplicant Administration GUI - IEEE 802.1X/WPA supplicant for secure wireless transfers
</p>
<hr>
<h3>
<a name="OFFICE"></a><a href="#STANDARD-MENU">Office</a>
</h3>
<p>
a: qpdfview - A tabbed document viewer using Qt and the Poppler library.
</p>
<hr>
<h3>
<a name="SETTINGS"></a><a href="#STANDARD-MENU">Settings</a>
</h3>
<hr>
<h3>
<a name="SYSTEM"></a><a href="#STANDARD-MENU">System</a>
</h3>
<p>
a: Alacritty
</p>
<p>
b: simpleterm - simple terminal implementation for X
</p>
<hr>
<h3>
<a name="UTILITY"></a><a href="#STANDARD-MENU">Utility</a>
</h3>
<p>
a: compton - A X compositor
</p>
<p>
b: XEmacs Text Editor - Edit text
</p>
<hr>
<h3>
<a name="TERMINALEMULATOR"></a><a href="#STANDARD-MENU">Terminalemulator</a>
</h3>
<p>
a: Alacritty
</p>
<p>
b: simpleterm - simple terminal implementation for X
</p>
<hr>
<h3>
<a name="SCREENSAVER"></a><a href="#STANDARD-MENU">Screensaver</a>
</h3>
<hr>
<h3>
<a name="CHILD-MENU"></a><a href="#MAIN">Child-Menu</a>
</h3>
<p>
r: Rename the current child
</p>
<p>
b: Bury the current child: put the current child at the end of the parent frame children list
</p>
<p>
f: Bury the first child: put the first child at the end of the current frame children list
</p>
<p>
t: Set the current child transparency
</p>
<p>
o: Set the current child border size
</p>
<p>
e: Ensure that all children names are unique
</p>
<p>
n: Ensure that all children numbers are unique
</p>
<p>
Delete: Delete the current child and its children in all frames
</p>
<p>
X: Remove the current child from its parent frame
</p>
<p>
R: Retrieve existing windows not already managed by CLFSWM.
</p>
<p>
h: Hide the current child
</p>
<p>
u: Unhide a child in the current frame
</p>
<p>
F: Unhide a child from all frames in the current frame
</p>
<p>
a: Unhide all current frame hidden children
</p>
<p>
Page_Up: Lower the child in the current frame
</p>
<p>
Page_Down: Raise the child in the current frame
</p>
<hr>
<h3>
<a name="ROOT-MENU"></a><a href="#MAIN">Root-Menu</a>
</h3>
<p>
n: Select the next root
</p>
<p>
p: Select the previous root
</p>
<p>
g: Rotate root geometry to next root
</p>
<p>
f: Rotate root geometry to previous root
</p>
<p>
x: Exchange two root geometry pointed with the mouse
</p>
<p>
r: Change the current root geometry
</p>
<hr>
<h3>
<a name="FRAME-MENU"></a><a href="#MAIN">Frame-Menu</a>
</h3>
<p>
a: <a href="#FRAME-ADDING-MENU">< Adding frame menu ></a>
</p>
<p>
l: <a href="#FRAME-LAYOUT-MENU">< Frame layout menu ></a>
</p>
<p>
n: <a href="#FRAME-NW-HOOK-MENU">< Frame new window hook menu ></a>
</p>
<p>
m: <a href="#FRAME-MOVEMENT-MENU">< Frame movement menu ></a>
</p>
<p>
f: <a href="#FRAME-FOCUS-POLICY">< Frame focus policy menu ></a>
</p>
<p>
w: <a href="#FRAME-MANAGED-WINDOW-MENU">< Managed window type menu ></a>
</p>
<p>
u: <a href="#FRAME-UNMANAGED-WINDOW-MENU">< Unmanaged window behaviour ></a>
</p>
<p>
s: <a href="#FRAME-MISCELLANEOUS-MENU">< Frame miscallenous menu ></a>
</p>
<p>
x: Maximize/Unmaximize the current frame in its parent frame
</p>
<hr>
<h3>
<a name="FRAME-ADDING-MENU"></a><a href="#FRAME-MENU">Frame-Adding-Menu</a>
</h3>
<p>
a: Add a default frame in the current frame
</p>
<p>
p: Add a placed frame in the current frame
</p>
<hr>
<h3>
<a name="FRAME-LAYOUT-MENU"></a><a href="#FRAME-MENU">Frame-Layout-Menu</a>
</h3>
<p>
a: <a href="#FRAME-FAST-LAYOUT-MENU">< Frame fast layout menu ></a>
</p>
<p>
b: No layout: Maximize windows in their frame - Leave frames to their original size
</p>
<p>
c: No layout: Maximize windows in their frame - Leave frames to their actual size
</p>
<p>
d: Maximize layout: Maximize windows and frames in their parent frame
</p>
<p>
e: <a href="#FRAME-TILE-LAYOUT-MENU">< Frame tile layout menu ></a>
</p>
<p>
f: <a href="#FRAME-TILE-DIR-LAYOUT-MENU">< Tile in one direction layout menu ></a>
</p>
<p>
g: <a href="#FRAME-TILE-SPACE-LAYOUT-MENU">< Tile with some space on one side menu ></a>
</p>
<p>
h: <a href="#FRAME-MAIN-WINDOW-LAYOUT-MENU">< Main window layout menu ></a>
</p>
<p>
i: <a href="#FRAME-GIMP-LAYOUT-MENU">< The GIMP layout menu ></a>
</p>
<hr>
<h3>
<a name="FRAME-FAST-LAYOUT-MENU"></a><a href="#FRAME-LAYOUT-MENU">Frame-Fast-Layout-Menu</a>
</h3>
<p>
s: Switch between two layouts
</p>
<p>
p: Push the current layout in the fast layout list
</p>
<hr>
<h3>
<a name="FRAME-TILE-LAYOUT-MENU"></a><a href="#FRAME-LAYOUT-MENU">Frame-Tile-Layout-Menu</a>
</h3>
<p>
v: Tile child in its frame (vertical)
</p>
<p>
h: Tile child in its frame (horizontal)
</p>
<p>
m: Tile child in its frame (mix: automatic choose between vertical/horizontal)
</p>
<p>
c: One column layout
</p>
<p>
l: One line layout
</p>
<p>
s: Tile Space: tile child in its frame leaving spaces between them
</p>
<p>
t: Three Columns: main child in the middle, others on the two sides.
</p>
<hr>
<h3>
<a name="FRAME-TILE-DIR-LAYOUT-MENU"></a><a href="#FRAME-LAYOUT-MENU">Frame-Tile-Dir-Layout-Menu</a>
</h3>
<p>
l: Tile Left: main child on left and others on right
</p>
<p>
r: Tile Right: main child on right and others on left
</p>
<p>
t: Tile Top: main child on top and others on bottom
</p>
<p>
b: Tile Bottom: main child on bottom and others on top
</p>
<hr>
<h3>
<a name="FRAME-TILE-SPACE-LAYOUT-MENU"></a><a href="#FRAME-LAYOUT-MENU">Frame-Tile-Space-Layout-Menu</a>
</h3>
<p>
a: Tile Left Space: main child on left and others on right. Leave some space on the left.
</p>
<hr>
<h3>
<a name="FRAME-MAIN-WINDOW-LAYOUT-MENU"></a><a href="#FRAME-LAYOUT-MENU">Frame-Main-Window-Layout-Menu</a>
</h3>
<p>
r: Main window right: Main windows on the right. Others on the left.
</p>
<p>
l: Main window left: Main windows on the left. Others on the right.
</p>
<p>
t: Main window top: Main windows on the top. Others on the bottom.
</p>
<p>
b: Main window bottom: Main windows on the bottom. Others on the top.
</p>
<p>
-=- Actions on main windows list -=-
</p>
<p>
a: Add the current window in the main window list
</p>
<p>
v: Remove the current window from the main window list
</p>
<p>
c: Clear the main window list
</p>
<hr>
<h3>
<a name="FRAME-GIMP-LAYOUT-MENU"></a><a href="#FRAME-LAYOUT-MENU">Frame-Gimp-Layout-Menu</a>
</h3>
<p>
g: The GIMP Layout
</p>
<p>
p: Restore the previous layout
</p>
<p>
h: Help on the GIMP layout
</p>
<p>
-=- Main window layout -=-
</p>
<p>
r: Main window right: Main windows on the right. Others on the left.
</p>
<p>
l: Main window left: Main windows on the left. Others on the right.
</p>
<p>
t: Main window top: Main windows on the top. Others on the bottom.
</p>
<p>
b: Main window bottom: Main windows on the bottom. Others on the top.
</p>
<p>
-=- Actions on main windows list -=-
</p>
<p>
a: Add the current window in the main window list
</p>
<p>
v: Remove the current window from the main window list
</p>
<p>
c: Clear the main window list
</p>
<hr>
<h3>
<a name="FRAME-NW-HOOK-MENU"></a><a href="#FRAME-MENU">Frame-Nw-Hook-Menu</a>
</h3>
<p>
a: Open the next window in the current frame
</p>
<p>
b: Open the next window in the current root
</p>
<p>
c: Open the next window in a new frame in the current root
</p>
<p>
d: Open the next window in a new frame in the root frame
</p>
<p>
e: Open the next window in a new frame in the parent frame
</p>
<p>
f: Open the next window in the current frame and leave the focus on the current child
</p>
<p>
g: Open the next window in a named frame
</p>
<p>
h: Open the next window in a numbered frame
</p>
<p>
i: Open the window in this frame if it match nw-absorb-test
</p>
<hr>
<h3>
<a name="FRAME-MOVEMENT-MENU"></a><a href="#FRAME-MENU">Frame-Movement-Menu</a>
</h3>
<p>
p: <a href="#FRAME-PACK-MENU">< Frame pack menu ></a>
</p>
<p>
f: <a href="#FRAME-FILL-MENU">< Frame fill menu ></a>
</p>
<p>
r: <a href="#FRAME-RESIZE-MENU">< Frame resize menu ></a>
</p>
<p>
c: Center the current frame
</p>
<p>
R: Select the next brother frame
</p>
<p>
L: Select the previous brother frame
</p>
<p>
U: Select the next level
</p>
<p>
D: Select the previous levelframe
</p>
<p>
T: Select the next child
</p>
<hr>
<h3>
<a name="FRAME-PACK-MENU"></a><a href="#FRAME-MOVEMENT-MENU">Frame-Pack-Menu</a>
</h3>
<p>
u: Pack the current frame up
</p>
<p>
d: Pack the current frame down
</p>
<p>
l: Pack the current frame left
</p>
<p>
r: Pack the current frame right
</p>
<hr>
<h3>
<a name="FRAME-FILL-MENU"></a><a href="#FRAME-MOVEMENT-MENU">Frame-Fill-Menu</a>
</h3>
<p>
u: Fill the current frame up
</p>
<p>
d: Fill the current frame down
</p>
<p>
l: Fill the current frame left
</p>
<p>
r: Fill the current frame right
</p>
<p>
a: Fill the current frame in all directions
</p>
<p>
v: Fill the current frame vertically
</p>
<p>
h: Fill the current frame horizontally
</p>
<hr>
<h3>
<a name="FRAME-RESIZE-MENU"></a><a href="#FRAME-MOVEMENT-MENU">Frame-Resize-Menu</a>
</h3>
<p>
u: Resize the current frame up to its half height
</p>
<p>
d: Resize the current frame down to its half height
</p>
<p>
l: Resize the current frame left to its half width
</p>
<p>
r: Resize the current frame right to its half width
</p>
<p>
a: Resize down the current frame
</p>
<p>
m: Resize down the current frame to its minimal size
</p>
<hr>
<h3>
<a name="FRAME-FOCUS-POLICY"></a><a href="#FRAME-MENU">Frame-Focus-Policy</a>
</h3>
<p>
-=- For the current frame -=-
</p>
<p>
a: Set a click focus policy for the current frame.
</p>
<p>
b: Set a sloppy focus policy for the current frame.
</p>
<p>
c: Set a (strict) sloppy focus policy only for windows in the current frame.
</p>
<p>
d: Set a sloppy select policy for the current frame.
</p>
<p>
e: Set a sloppy select window policy for the current frame.
</p>
<p>
-=- For all frames -=-
</p>
<p>
f: Set a click focus policy for all frames.
</p>
<p>
g: Set a sloppy focus policy for all frames.
</p>
<p>
h: Set a (strict) sloppy focus policy for all frames.
</p>
<p>
i: Set a sloppy select policy for all frames.
</p>
<p>
j: Set a sloppy select window policy for all frames.
</p>
<hr>
<h3>
<a name="FRAME-MANAGED-WINDOW-MENU"></a><a href="#FRAME-MENU">Frame-Managed-Window-Menu</a>
</h3>
<p>
m: Change window types to be managed by a frame
</p>
<p>
a: Manage all window type
</p>
<p>
n: Manage only normal window type
</p>
<p>
u: Do not manage any window type
</p>
<hr>
<h3>
<a name="FRAME-UNMANAGED-WINDOW-MENU"></a><a href="#FRAME-MENU">Frame-Unmanaged-Window-Menu</a>
</h3>
<p>
s: Show unmanaged windows when frame is not selected
</p>
<p>
h: Hide unmanaged windows when frame is not selected
</p>
<p>
d: Set default behaviour to hide or not unmanaged windows when frame is not selected
</p>
<p>
w: Show unmanaged windows by default. This is overriden by functions above
</p>
<p>
i: Hide unmanaged windows by default. This is overriden by functions above
</p>
<hr>
<h3>
<a name="FRAME-MISCELLANEOUS-MENU"></a><a href="#FRAME-MENU">Frame-Miscellaneous-Menu</a>
</h3>
<p>
s: Show all frames info windows
</p>
<p>
a: Hide all frames info windows
</p>
<p>
h: Hide the current frame window
</p>
<p>
w: Show the current frame window
</p>
<p>
u: Renumber the current frame
</p>
<p>
x: Create a new frame for each window in frame
</p>
<p>
i: Absorb all frames subchildren in frame (explode frame opposite)
</p>
<hr>
<h3>
<a name="WINDOW-MENU"></a><a href="#MAIN">Window-Menu</a>
</h3>
<p>
i: Display information on the current window
</p>
<p>
t: Set the current window transparency
</p>
<p>
f: Force the current window to move in the frame (Useful only for unmanaged windows)
</p>
<p>
c: Force the current window to move in the center of the frame (Useful only for unmanaged windows)
</p>
<p>
m: Force to manage the current window by its parent frame
</p>
<p>
u: Force to not manage the current window by its parent frame
</p>
<p>
a: Adapt the current frame to the current window minimal size hints
</p>
<p>
w: Adapt the current frame to the current window minimal width hint
</p>
<p>
h: Adapt the current frame to the current window minimal height hint
</p>
<hr>
<h3>
<a name="SELECTION-MENU"></a><a href="#MAIN">Selection-Menu</a>
</h3>
<p>
x: Cut the current child to the selection
</p>
<p>
c: Copy the current child to the selection
</p>
<p>
v: Paste the selection in the current frame
</p>
<p>
p: Paste the selection in the current frame - Do not clear the selection after paste
</p>
<p>
Delete: Remove the current child from its parent frame
</p>
<p>
z: Clear the current selection
</p>
<hr>
<h3>
<a name="ACTION-BY-NAME-MENU"></a><a href="#MAIN">Action-By-Name-Menu</a>
</h3>
<p>
f: Focus a frame by name
</p>
<p>
o: Open a new frame in a named frame
</p>
<p>
d: Delete a frame by name
</p>
<p>
m: Move current child in a named frame
</p>
<p>
c: Copy current child in a named frame
</p>
<hr>
<h3>
<a name="ACTION-BY-NUMBER-MENU"></a><a href="#MAIN">Action-By-Number-Menu</a>
</h3>
<p>
f: Focus a frame by number
</p>
<p>
o: Open a new frame in a numbered frame
</p>
<p>
d: Delete a frame by number
</p>
<p>
m: Move current child in a numbered frame
</p>
<p>
c: Copy current child in a numbered frame
</p>
<hr>
<h3>
<a name="UTILITY-MENU"></a><a href="#MAIN">Utility-Menu</a>
</h3>
<p>
i: Identify a key
</p>
<p>
colon: Eval a lisp form from the query input
</p>
<p>
exclam: Run a program from the query input
</p>
<p>
o: <a href="#OTHER-WINDOW-MANAGER-MENU">< Other window manager menu ></a>
</p>
<hr>
<h3>
<a name="OTHER-WINDOW-MANAGER-MENU"></a><a href="#UTILITY-MENU">Other-Window-Manager-Menu</a>
</h3>
<p>
x: Run xterm
</p>
<p>
t: Run twm
</p>
<p>
i: Run icewm
</p>
<p>
g: Run Gnome
</p>
<p>
k: Run KDE
</p>
<p>
c: Run XFCE
</p>
<p>
l: Run LXDE
</p>
<p>
p: Prompt for an other window manager
</p>
<hr>
<h3>
<a name="CONFIGURATION-MENU"></a><a href="#MAIN">Configuration-Menu</a>
</h3>
<p>
a: <a href="#CONF-GIMP-LAYOUT">< Gimp Layout Group ></a>
</p>
<p>
b: <a href="#CONF-FASTSWITCH-MODE">< Fastswitch Mode Group ></a>
</p>
<p>
c: <a href="#CONF-EXPOSE-MODE">< Expose Mode Group ></a>
</p>
<p>
d: <a href="#CONF-QUERY-STRING">< Query String Group ></a>
</p>
<p>
e: <a href="#CONF-FRAME-COLORS">< Frame Colors Group ></a>
</p>
<p>
f: <a href="#CONF-ROOT">< Root Group ></a>
</p>
<p>
g: <a href="#CONF-HOOK">< Hook Group ></a>
</p>
<p>
h: <a href="#CONF-MAIN-MODE">< Main Mode Group ></a>
</p>
<p>
i: <a href="#CONF-MENU">< Menu Group ></a>
</p>
<p>
j: <a href="#CONF-MISCELLANEOUS">< Miscellaneous Group ></a>
</p>
<p>
k: <a href="#CONF-INFO-MODE">< Info Mode Group ></a>
</p>
<p>
l: <a href="#CONF-SECOND-MODE">< Second Mode Group ></a>
</p>
<p>
m: <a href="#CONF-NOTIFY-WINDOW">< Notify Window Group ></a>
</p>
<p>
n: <a href="#CONF-IDENTIFY-KEY">< Identify Key Group ></a>
</p>
<p>
o: <a href="#CONF-PLACEMENT">< Placement Group ></a>
</p>
<p>
p: <a href="#CONF-CORNER">< Corner Group ></a>
</p>
<p>
q: <a href="#CONF-CIRCULATE-MODE">< Circulate Mode Group ></a>
</p>
<p>
F2: Save all configuration variables in clfswmrc
</p>
<p>
F3: Reset all configuration variables to their default values
</p>
<hr>
<h3>
<a name="CONF-GIMP-LAYOUT"></a><a href="#CONFIGURATION-MENU">Conf-Gimp-Layout</a>
</h3>
<p>
a: Configure GIMP-LAYOUT-NOTIFY-WINDOW-DELAY
</p>
<hr>
<h3>
<a name="CONF-FASTSWITCH-MODE"></a><a href="#CONFIGURATION-MENU">Conf-Fastswitch-Mode</a>
</h3>
<p>
a: Configure FASTSWITCH-FOREGROUND
</p>
<p>
b: Configure FASTSWITCH-FONT-STRING
</p>
<p>
c: Configure FASTSWITCH-FOREGROUND-LETTER-SECOND-FRAME
</p>
<p>
d: Configure FASTSWITCH-ADJUST-WINDOW-P
</p>
<p>
e: Configure FASTSWITCH-FOREGROUND-LETTER
</p>
<p>
f: Configure FASTSWITCH-FOREGROUND-LETTER-SECOND
</p>
<p>
g: Configure FASTSWITCH-BACKGROUND
</p>
<p>
h: Configure FASTSWITCH-BORDER
</p>
<p>
i: Configure FASTSWITCH-TRANSPARENCY
</p>
<p>
j: Configure FASTSWITCH-DISPLAY-MODE
</p>
<p>
k: Configure FASTSWITCH-SHOW-FRAME-P
</p>
<p>
l: Configure FASTSWITCH-FOREGROUND-CHILDNAME
</p>
<hr>
<h3>
<a name="CONF-EXPOSE-MODE"></a><a href="#CONFIGURATION-MENU">Conf-Expose-Mode</a>
</h3>
<p>
a: Configure EXPOSE-BACKGROUND
</p>
<p>
b: Configure EXPOSE-DIRECT-SELECT
</p>
<p>
c: Configure EXPOSE-FOREGROUND-LETTER
</p>
<p>
d: Configure EXPOSE-FOREGROUND-LETTER-NOK
</p>
<p>
e: Configure EXPOSE-FOREGROUND
</p>
<p>
f: Configure EXPOSE-VALID-ON-KEY
</p>
<p>
g: Configure EXPOSE-BORDER
</p>
<p>
h: Configure EXPOSE-FONT-STRING
</p>
<p>
i: Configure EXPOSE-SHOW-WINDOW-TITLE
</p>
<p>
j: Configure EXPOSE-BACKGROUND-LETTER-MATCH
</p>
<p>
k: Configure EXPOSE-TRANSPARENCY
</p>
<hr>
<h3>
<a name="CONF-QUERY-STRING"></a><a href="#CONFIGURATION-MENU">Conf-Query-String</a>
</h3>
<p>
a: Configure QUERY-MAX-COMPLET-LENGTH
</p>
<p>
b: Configure QUERY-MESSAGE-COLOR
</p>
<p>
c: Configure QUERY-FOREGROUND
</p>
<p>
d: Configure QUERY-FONT-STRING
</p>
<p>
e: Configure QUERY-PARENT-ERROR-COLOR
</p>
<p>
f: Configure QUERY-MIN-COMPLET-CHAR
</p>
<p>
g: Configure QUERY-BORDER
</p>
<p>
h: Configure QUERY-BACKGROUND
</p>
<p>
i: Configure QUERY-PARENT-COLOR
</p>
<p>
j: Configure QUERY-CURSOR-COLOR
</p>
<p>
k: Configure QUERY-TRANSPARENCY
</p>
<hr>
<h3>
<a name="CONF-FRAME-COLORS"></a><a href="#CONFIGURATION-MENU">Conf-Frame-Colors</a>
</h3>
<p>
a: Configure FRAME-FOREGROUND-HIDDEN
</p>
<p>
b: Configure FRAME-TRANSPARENCY
</p>
<p>
c: Configure FRAME-BACKGROUND
</p>
<p>
d: Configure FRAME-FOREGROUND
</p>
<p>
e: Configure FRAME-FOREGROUND-ROOT
</p>
<hr>
<h3>
<a name="CONF-ROOT"></a><a href="#CONFIGURATION-MENU">Conf-Root</a>
</h3>
<p>
a: Configure HAVE-TO-SHOW-CURRENT-ROOT
</p>
<p>
b: Configure CREATE-FRAME-ON-ROOT
</p>
<p>
c: Configure SHOW-CURRENT-ROOT-MESSAGE
</p>
<p>
d: Configure SHOW-CURRENT-ROOT-PLACEMENT
</p>
<p>
e: Configure SHOW-CURRENT-ROOT-DELAY
</p>
<hr>
<h3>
<a name="CONF-HOOK"></a><a href="#CONFIGURATION-MENU">Conf-Hook</a>
</h3>
<p>
a: Configure QUERY-BUTTON-PRESS-HOOK
</p>
<p>
b: Configure LOOP-HOOK
</p>
<p>
c: Configure ROOT-SIZE-CHANGE-HOOK
</p>
<p>
d: Configure INIT-HOOK
</p>
<p>
e: Configure DEFAULT-NW-HOOK
</p>
<p>
f: Configure BINDING-HOOK
</p>
<p>
g: Configure QUERY-KEY-PRESS-HOOK
</p>
<p>
h: Configure MAIN-ENTRANCE-HOOK
</p>
<p>
i: Configure CLOSE-HOOK
</p>
<hr>
<h3>
<a name="CONF-MAIN-MODE"></a><a href="#CONFIGURATION-MENU">Conf-Main-Mode</a>
</h3>
<p>
a: Configure COLOR-SELECTED
</p>
<p>
b: Configure COLOR-UNSELECTED
</p>
<p>
c: Configure COLOR-MAYBE-SELECTED
</p>
<p>
d: Configure COLOR-MOVE-WINDOW
</p>
<hr>
<h3>
<a name="CONF-MENU"></a><a href="#CONFIGURATION-MENU">Conf-Menu</a>
</h3>
<p>
a: Configure MENU-COLOR-SUBMENU
</p>
<p>
b: Configure MENU-COLOR-KEY
</p>
<p>
c: Configure MENU-COLOR-MENU-KEY
</p>
<p>
d: Configure XDG-SECTION-LIST
</p>
<p>
e: Configure MENU-KEY-BOUND-COLOR
</p>
<p>
f: Configure MENU-COLOR-COMMENT
</p>
<hr>
<h3>
<a name="CONF-MISCELLANEOUS"></a><a href="#CONFIGURATION-MENU">Conf-Miscellaneous</a>
</h3>
<p>
a: Configure DEFAULT-FOCUS-POLICY
</p>
<p>
b: Configure NEVER-MANAGED-WINDOW-LIST
</p>
<p>
c: Configure SHOW-HIDE-POLICY
</p>
<p>
d: Configure WM-NAME
</p>
<p>
e: Configure HIDE-UNMANAGED-WINDOW
</p>
<p>
f: Configure DEFAULT-MANAGED-TYPE
</p>
<p>
g: Configure LOOP-TIMEOUT
</p>
<p>
h: Configure SHOW-ROOT-FRAME-P
</p>
<p>
i: Configure DEFAULT-FONT-STRING
</p>
<p>
j: Configure DEFAULT-FRAME-DATA
</p>
<p>
k: Configure DEFAULT-TRANSPARENCY
</p>
<p>
l: Configure HAVE-TO-COMPRESS-NOTIFY
</p>
<p>
m: Configure DEFAULT-WINDOW-WIDTH
</p>
<p>
n: Configure SPATIAL-MOVE-DELAY-AFTER
</p>
<p>
o: Configure TRANSPARENT-BACKGROUND
</p>
<p>
p: Configure DEFAULT-MODIFIERS
</p>
<p>
q: Configure DEFAULT-WINDOW-HEIGHT
</p>
<p>
r: Configure SHOW-HIDE-POLICY-TYPE
</p>
<p>
s: Configure SNAP-SIZE
</p>
<p>
t: Configure SPATIAL-MOVE-DELAY-BEFORE
</p>
<p>
u: Configure BORDER-SIZE
</p>
<p>
v: Configure STEAL-FOCUS
</p>
<hr>
<h3>
<a name="CONF-INFO-MODE"></a><a href="#CONFIGURATION-MENU">Conf-Info-Mode</a>
</h3>
<p>
a: Configure INFO-BACKGROUND
</p>
<p>
b: Configure INFO-LINE-CURSOR
</p>
<p>
c: Configure INFO-SELECTED-BACKGROUND
</p>
<p>
d: Configure INFO-CLICK-TO-SELECT
</p>
<p>
e: Configure INFO-COLOR-SECOND
</p>
<p>
f: Configure INFO-BORDER
</p>
<p>
g: Configure INFO-COLOR-TITLE
</p>
<p>
h: Configure INFO-COLOR-FIRST
</p>
<p>
i: Configure INFO-FONT-STRING
</p>
<p>
j: Configure INFO-FOREGROUND
</p>
<p>
k: Configure INFO-TRANSPARENCY
</p>
<p>
l: Configure INFO-COLOR-UNDERLINE
</p>
<hr>
<h3>
<a name="CONF-SECOND-MODE"></a><a href="#CONFIGURATION-MENU">Conf-Second-Mode</a>
</h3>
<p>
a: Configure SM-WIDTH
</p>
<p>
b: Configure SM-BORDER-COLOR
</p>
<p>
c: Configure SM-TRANSPARENCY
</p>
<p>
d: Configure SM-FONT-STRING
</p>
<p>
e: Configure SM-FOREGROUND-COLOR
</p>
<p>
f: Configure SM-BACKGROUND-COLOR
</p>
<p>
g: Configure SM-HEIGHT
</p>
<hr>
<h3>
<a name="CONF-NOTIFY-WINDOW"></a><a href="#CONFIGURATION-MENU">Conf-Notify-Window</a>
</h3>
<p>
a: Configure NOTIFY-WINDOW-FOREGROUND
</p>
<p>
b: Configure NOTIFY-WINDOW-FONT-STRING
</p>
<p>
c: Configure NOTIFY-WINDOW-DELAY
</p>
<p>
d: Configure NOTIFY-WINDOW-BORDER
</p>
<p>
e: Configure NOTIFY-WINDOW-TRANSPARENCY
</p>
<p>
f: Configure NOTIFY-WINDOW-BACKGROUND
</p>
<hr>
<h3>
<a name="CONF-IDENTIFY-KEY"></a><a href="#CONFIGURATION-MENU">Conf-Identify-Key</a>
</h3>
<p>
a: Configure IDENTIFY-BACKGROUND
</p>
<p>
b: Configure IDENTIFY-FONT-STRING
</p>
<p>
c: Configure IDENTIFY-TRANSPARENCY
</p>
<p>
d: Configure IDENTIFY-BORDER
</p>
<p>
e: Configure IDENTIFY-FOREGROUND
</p>
<hr>
<h3>
<a name="CONF-PLACEMENT"></a><a href="#CONFIGURATION-MENU">Conf-Placement</a>
</h3>
<p>
a: Configure FASTSWITCH-MODE-PLACEMENT
</p>
<p>
b: Configure CIRCULATE-MODE-PLACEMENT
</p>
<p>
c: Configure BANISH-POINTER-PLACEMENT
</p>
<p>
d: Configure EXPOSE-MODE-PLACEMENT
</p>
<p>
e: Configure QUERY-MODE-PLACEMENT
</p>
<p>
f: Configure INFO-MODE-PLACEMENT
</p>
<p>
g: Configure SECOND-MODE-PLACEMENT
</p>
<p>
h: Configure UNMANAGED-WINDOW-PLACEMENT
</p>
<p>
i: Configure EXPOSE-QUERY-PLACEMENT
</p>
<p>
j: Configure NOTIFY-WINDOW-PLACEMENT
</p>
<p>
k: Configure ASK-CLOSE/KILL-PLACEMENT
</p>
<hr>
<h3>
<a name="CONF-CORNER"></a><a href="#CONFIGURATION-MENU">Conf-Corner</a>
</h3>
<p>
a: Configure CORNER-SIZE
</p>
<p>
b: Configure CORNER-ERROR-MESSAGE-COLOR
</p>
<p>
c: Configure CLFSWM-TERMINAL-NAME
</p>
<p>
d: Configure CORNER-SECOND-MODE-RIGHT-BUTTON
</p>
<p>
e: Configure CORNER-MAIN-MODE-RIGHT-BUTTON
</p>
<p>
f: Configure CORNER-COMMAND-TRY-DELAY
</p>
<p>
g: Configure CORNER-COMMAND-TRY-NUMBER
</p>
<p>
h: Configure CORNER-MAIN-MODE-MIDDLE-BUTTON
</p>
<p>
i: Configure CORNER-MAIN-MODE-LEFT-BUTTON
</p>
<p>
j: Configure CORNER-SECOND-MODE-LEFT-BUTTON
</p>
<p>
k: Configure CLFSWM-TERMINAL-CMD
</p>
<p>
l: Configure CORNER-ERROR-MESSAGE-DELAY
</p>
<p>
m: Configure CORNER-SECOND-MODE-MIDDLE-BUTTON
</p>
<p>
n: Configure VIRTUAL-KEYBOARD-CMD
</p>
<hr>
<h3>
<a name="CONF-CIRCULATE-MODE"></a><a href="#CONFIGURATION-MENU">Conf-Circulate-Mode</a>
</h3>
<p>
a: Configure CIRCULATE-FOREGROUND
</p>
<p>
b: Configure CIRCULATE-TRANSPARENCY
</p>
<p>
c: Configure CIRCULATE-FONT-STRING
</p>
<p>
d: Configure CIRCULATE-TEXT-LIMITE
</p>
<p>
e: Configure CIRCULATE-WIDTH
</p>
<p>
f: Configure CIRCULATE-HEIGHT
</p>
<p>
g: Configure CIRCULATE-BORDER
</p>
<p>
h: Configure CIRCULATE-BACKGROUND
</p>
<hr>
<h3>
<a name="CLFSWM-MENU"></a><a href="#MAIN">Clfswm-Menu</a>
</h3>
<p>
r: Reset clfswm
</p>
<p>
l: Reload clfswm
</p>
<p>
x: Exit clfswm
</p>
<hr>
<p>
<small>
This documentation was produced with the CLFSWM auto-doc functions. To reproduce it, use the produce-menu-doc-html-in-file or
the produce-all-docs function from the Lisp REPL.
</small>
</p>
<p>
<small>
Something like this:<br>
LISP> (in-package :clfswm)<br>
CLFSWM> (produce-menu-doc-html-in-file "my-menu.html")<br>
or<br> CLFSWM> (produce-all-docs)
</small>
</p>
</body>
</html>
| 34,941 | Common Lisp | .l | 1,531 | 17.199216 | 133 | 0.550015 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 5d33a56292fdd272646ce2e8241c2759886baf31c824af3f942314b375a1cd38 | 6,547 | [
-1
] |
6,556 | clfswm | LdBeth_CLFSWM/contrib/clfswm | #!/bin/bash -e
#
# (C) 2015 Xavier Maillard <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# --------------------------------------------------------------------------
# Documentation:
#
# Original code and idea: http://stumpwm.antidesktop.net/cgi-bin/wiki/SetUp
#
# Installation:
# Put this script wherever you want and just call it from your .xinitrc file
#
# The first time you will launch it, it will build the final
# executable and then call it. To force a rebuild of your executable
# (say you have updated something in the CLFSWM source tree), just
# delete the image and restart your X session.
# --------------------------------------------------------------------------
no_start=no
lisp=clisp # +config+
lisp_bin='' # +config+
lisp_opt='' # +config+
dump_path="$XDG_CACHE_HOME/clfswm/" # +config+
clfswm_asd_path="$(pwd)" # +config+
asdf_path="$(pwd)/contrib" # +config+
tmp_dir=/tmp
usage() {
echo "$0 [options]
-n, --no-start don't start CLFSWM after image dump
-f, --force force image dump
--rebuild same as -f, --force
-l, --with-lisp use <lisp> as the common lisp implementation [$lisp]
-b, --lisp-bin use <bin> as the common lisp program [$lisp_bin] (default: same as with-lisp type)
-o, --lisp-opt use <opt> as lisp option [$lisp_opt]
-d, --dump-path path to the dump directory [$dump_path]
--with-clfswm path to clfswm.asd file [$clfswm_asd_path]
--with-asdf path to the asdf.lisp file [$asdf_path]"
exit 0
}
die() {
echo >&2 "$@"
exit 1
}
build_clisp ()
{
$lisp_bin $lisp_opt -m 8MB -E ISO-8859-1 -q -i "$asdf_path"/asdf.lisp -x "(load \"$clfswm_asd_path/clfswm.asd\")
(asdf:oos 'asdf:load-op :clfswm) \
(EXT:SAVEINITMEM \"$dump_image\" :INIT-FUNCTION (lambda () (clfswm:main) (quit)) :EXECUTABLE t :norc t)"
}
build_sbcl()
{
$lisp_bin $lisp_opt --disable-debugger --eval "(require :asdf)" \
--eval "(require :sb-posix)" \
--eval "(load \"$clfswm_asd_path/clfswm.asd\")" \
--eval "(require :clfswm)" \
--eval "(save-lisp-and-die \"$dump_image\" :toplevel 'clfswm:main)"
}
build_cmucl()
{
$lisp_bin $lisp_opt -eval "(require :clx)" \
-eval "(load \"$asdf_path/asdf.lisp\")" \
-eval "(load \"$clfswm_asd_path/clfswm.asd\")" \
-eval "(asdf:oos 'asdf:load-op :clfswm)" \
-eval "(save-lisp \"$dump_image\" :init-function (lambda () (clfswm:main) (quit)))"
}
build_ccl()
{
$lisp_bin $lisp_opt --eval "(require :asdf)" \
--eval "(load \"$clfswm_asd_path/clfswm.asd\")" \
--eval "(asdf:oos 'asdf:load-op :clfswm)" \
--eval "(save-application \"$dump_image\" :toplevel-function (lambda () (clfswm:main) (quit)))"
}
build_ecl()
{
$lisp_bin $lisp_opt -eval "(require :asdf)" \
-eval "(load \"$clfswm_asd_path/clfswm.asd\")" \
-eval "(asdf:make-build :clfswm :type :program :monolithic t :move-here \".\" :prologue-code '(progn (require :asdf) (require :clx)))" \
-eval "(ext:quit 0)"
mv ./clfswm-mono "$dump_image"
echo "$dump_image"
}
while test $# != 0
do
case "$1" in
-n|--no-start)
no_start=yes ;;
-f|--force|--rebuild)
force=yes ;;
-d|--dump-path)
shift
dump_path="$1" ;;
--with-clfswm)
shift
clfswm_asd_path="$1" ;;
--with-asdf)
shift
asdf_path="$1" ;;
-l|--with-lisp)
shift
case "$1" in
'')
usage;;
clisp|sbcl|cmucl|ccl|ecl)
lisp="$1" ;;
esac
;;
-b|--lisp-bin)
shift
lisp_bin="$1" ;;
-o|--lisp-opt)
shift
lisp_opt="$1" ;;
--)
shift
break ;;
-h|--help)
usage ;;
*)
ARGS="$ARGS $1" ;;
esac
shift
done
if [ "x$lisp_bin" == "x" ]; then
lisp_bin=$lisp
fi
#dump_image="$dump_path/clfswm-$(cksum $(type -p $lisp) | cut -d ' ' -f 1)-$(echo "$clfswm_asd_path"|md5sum|cut -d ' ' -f 1).core"
dump_image="$dump_path/clfswm-$(echo $(cksum $(type -p $lisp)) "$clfswm_asd_path" | md5sum |cut -d ' ' -f 1).core"
if test yes = "$force" && test -e "$dump_image"
then
echo "Removing old image."
rm -f "$dump_image"
fi
clfswm_asd="$clfswm_asd_path"/clfswm.asd
if test -L "$clfswm_asd_path"; then
clfswm_asd=$(readlink "$clfswm_asd")
fi
older_image=0
for i in "$(dirname $clfswm_asd)"/src/*.lisp; do
test "$dump_image" -ot "$i" && older_image=1
done
if test ! -e "$dump_image" || test $older_image -eq 1
then
echo "Image is nonexistent or older than sources. Rebuilding clfswm."
echo "This may take some times."
echo " lisp=$lisp"
echo " lisp_bin=$lisp_bin"
echo " lisp_opt=$lisp_opt"
echo " dump_path=$dump_path"
echo " clfswm_asd_path=$clfswm_asd_path"
echo " asdf_path=$asdf_path"
echo " dump_image=$dump_image"
PID=""
if test -x "$(which zenity)" ; then
zenity --info --text " Rebuilding CLFSWM:\n\n Image is nonexistent or older than sources.\n\nPlease wait, the next CLFSWM boot will be faster." &
PID=$!
fi
test -x $(type -p "$lisp") || die "$lisp can't be found."
test -e "$clfswm_asd_path"/clfswm.asd || die "can't find clfswm.asd in $clfswm_asd_path"
test -e "$asdf_path"/asdf.lisp || die "can't find asdf.lisp in $asdf_path"
# Move clfswm sources to $tmp_dir if there is no write permission on $clfswm_asd_path
if test ! -w "$clfswm_asd_path" ; then
echo "* Note: No write access in sources ($clfswm_asd_path),
-> copying in a writable directory ($tmp_dir/clfswm-tmp)"
rm -rf "$tmp_dir"/clfswm-tmp
mkdir "$tmp_dir"/clfswm-tmp
cp -R "$clfswm_asd_path"/* "$tmp_dir"/clfswm-tmp
clfswm_asd_path="$tmp_dir"/clfswm-tmp
asdf_path="$tmp_dir"/clfswm-tmp/contrib
fi
mkdir -p "$dump_path"
mkdir -p "$dump_path/contrib"
eval build_"$lisp"
rm -rf "$dump_path/contrib"
cp -R "$clfswm_asd_path/contrib/" "$dump_path/"
rm -rf $(find "$dump_path/" -name "*svn")
rm -rf "$tmp_dir"/clfswm-tmp
if test "$PID" != "" ; then
kill $PID
fi
echo "CLFSWM image is: $dump_image"
fi
# Run the resulting image
if test no = "$no_start"
then
cd "$dump_path"
echo "Arguments: $* and $ARGS"
case $lisp in
clisp ) "$dump_image" -- $ARGS ;;
sbcl ) exec $lisp_bin --core "$dump_image" $ARGS ;;
cmucl ) exec $lisp_bin -core "$dump_image" $ARGS ;;
ccl ) exec $lisp_bin -I "$dump_image" -- $ARGS ;;
ecl ) "$dump_image" -eval "(progn (clfswm:main) (ext:quit 0))" $ARGS ;;
*) echo "..." ;;
esac
else
echo "As requested, we have just dumped the image."
fi
| 7,238 | Common Lisp | .l | 211 | 30.838863 | 158 | 0.611977 | LdBeth/CLFSWM | 29 | 4 | 1 | GPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 2c42b5b153192fb9ced1d7bbe1d9abfb71d3f0e18fc6fdf11489e03a3d7bc803 | 6,556 | [
-1
] |
6,579 | arboreta-core.asd | Arboreta_arboreta-core/arboreta-core.asd | (defclass cl-file (cl-source-file)
((type :initform "cl")))
(defsystem "arboreta-core"
:name "arboreta-core"
:serial t
:version "0.3"
:author "Dylan Ball <[email protected]>"
:depends-on
(alexandria anaphora cl-cairo2
cl-cairo2-xlib cl-colors cl-pango
cl-ppcre iterate dynamic-classes)
:components
((:module :src
:components
((:cl-file "cl-xkb")
(:cl-file "base" :depends-on ("cl-xkb"))))))
| 450 | Common Lisp | .asd | 16 | 23.5 | 53 | 0.642032 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | d5e6987cea416dc982cbd825777ceddbb024d8a004b2847a7475f1425f2bd50c | 6,579 | [
-1
] |
6,580 | test2.cl | Arboreta_arboreta-core/src/test2.cl | (ql:quickload 'arboreta-core)
(in-package arboreta)
(defparameter window nil)
(defparameter w 600)
(defparameter h 400)
(defclass example-window (window)
(width w)
(height h)
(handle-events (*this*)
(with-slots (event-queue) this
(iter (while event-queue)
(let ((e (pop event-queue)))
(when (and (eq (first e) :keypress) (equalp (second e) 4) (equalp (third e) 113)) ;; C-q
(shutdown window)
(sb-thread:terminate-thread sb-thread:*current-thread*)))))))
(defun main ()
(setf window (make-instance example-window))
(sb-thread:make-thread #'start-drawing :arguments (list window))
(setf cairo::*context* (image-context window))
(set-hex-color "DC2566")
(draw-rectangle 10 10 50 50))
;; (sb-ext:save-lisp-and-die "test2" :executable t :toplevel #'main)
| 863 | Common Lisp | .cl | 22 | 33.090909 | 103 | 0.640964 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 08df992b3366cdf63cdb558b32a5bbbd509d5d8030abf1728bd459901a4c07d1 | 6,580 | [
-1
] |
6,581 | containers.cl | Arboreta_arboreta-core/src/containers.cl | (in-package arboreta)
(defclass container-window (window)
(root-container nil)
(start-drawing ((window window))
(iter (for x = (+ (get-internal-real-time) 20))
(when (root-container window)
(with-context ((image-context window))
(draw (root-container window)))
(update window))
(handle-events window)
(iter (while (cairo::handle-event window)))
(let ((delay (/ (- x (get-internal-real-time)) 1000)))
(sleep (if (> delay 0) delay 0))))))
(defclass container ()
(x 0)
(y 0)
(width 0)
(height 0)
(subcontainers nil)
(above nil)
(draw-subs (*this*)
(with-slots (subcontainers) this
(when subcontainers
(iter (for c in subcontainers) (draw c)))))
(draw (*this*)
(draw-subs this))
(:before draw (*this*)
(with-slots (x y width height) this
(reset-clip)
(reset-trans-matrix)
(new-path)
(rectangle x y width height)
(clip)
(translate x y))))
(defclass rect (container)
(color "FFFFFF")
(draw (*this*)
(with-slots (color width height) this
(set-hex-color color)
(draw-rectangle 0 0 width height)
(draw-subs this))))
(defmacro rect (&rest args)
(let ((pargs (dynamic-classes::extract-keyargs args)))
`(make-instance rect ,@(dynamic-classes::unpair (first pargs))
:subcontainers (list ,@(second pargs)))))
(defclass vertical-list (container)
(draw (*this*)
(with-slots (subcontainers) this
(when subcontainers
(iter (for c in subcontainers)
(setf (y c) delta-y)
(draw c)
(reducing (height c) by #'+ into delta-y initial-value 0))))))
(defmacro vertical-list (&rest args)
(let ((pargs (dynamic-classes::extract-keyargs args)))
`(make-instance vertical-list ,@(dynamic-classes::unpair (first pargs))
:subcontainers (list ,@(second pargs)))))
| 2,073 | Common Lisp | .cl | 57 | 27.578947 | 80 | 0.5695 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 6e4d19c56191e6876f53cc7436711057821691077693dfb46dadf7921b6f16bb | 6,581 | [
-1
] |
6,582 | base.cl | Arboreta_arboreta-core/src/base.cl | ;;(declaim (optimize (speed 0) (safety 3) (debug 3) (space 0)))
(declaim #+sbcl(sb-ext:muffle-conditions style-warning))
(declaim #+sbcl(sb-ext:muffle-conditions warning))
;; I've left this stuff as-is so that arboreta-repl still works.
(ql:quickload '(alexandria iterate anaphora cl-cairo2 cl-cairo2-xlib cl-pango cl-colors cl-ppcre dynamic-classes) :silent t)
(load "cl-xkb.cl" :if-does-not-exist nil)
(defpackage arboreta
(:shadowing-import-from dynamic-classes defclass make-instance)
(:use cl iterate anaphora cl-cairo2))
(in-package cl-cairo2)
(defcfun ("XChangeProperty" xchangeproperty) :int
(display display)
(window window)
(property xatom)
(atom-type xatom)
(format :int)
(mode :int)
(data :pointer)
(nelements :int))
(defcfun ("XGetDefault" x-get-defualt) :string
(display display)
(program :string)
(option :string))
(defcstruct xbuttonevent
(type :int)
(serial :unsigned-long)
(send-event bool)
(display display)
(window window)
(root window)
(subwindow window)
(time :long)
(x :int)
(y :int)
(x-root :int)
(y-root :int)
(state :int)
(button :int))
(defcstruct xkeyevent
(type :int)
(serial :unsigned-long)
(send-event bool)
(display display)
(window window)
(root window)
(subwindow window)
(time :long)
(x :int)
(y :int)
(x-root :int)
(y-root :int)
(state :int)
(keycode :int))
(defcstruct xmotionevent
(type :int)
(serial :unsigned-long)
(send-event bool)
(display display)
(window window)
(root window)
(subwindow window)
(time :long)
(x :int)
(y :int)
(x-root :int)
(y-root :int)
(state :int))
(defcfun ("XKeycodeToKeysym" xkeycode->keysym) :int
(display display)
(keycode :int)
(index :int))
(defcfun ("XKeysymToString" xkeysym->string) :string
(keysym :int))
(defcfun ("XPending" xpending) :int
(display display))
(defun refresh (xlib-image-context)
;; (print "refresh")
(with-slots ((display-pointer display) dest-surface) xlib-image-context
(cairo_paint (xlib-context xlib-image-context))
(cairo_surface_flush dest-surface)))
(defun handle-event (arboreta-window)
(with-foreign-object (xev :long 24)
;; get next event
(with-slots (display) (arboreta::image-context arboreta-window)
(if (> (xpending display) 0)
(xnextevent display xev)
(return-from handle-event nil)))
;; decipher structure, at least partially
(with-foreign-slots ((type window serial) xev xanyevent)
;; action based on event type
(cond
;; expose events
((and (= type 12))
(arboreta::update arboreta-window)
nil)
;; button press (mouse) events
((= type 4)
(with-foreign-slots ((state button x y) xev xbuttonevent)
(alexandria::appendf (arboreta::event-queue arboreta-window)
(list (list :mouse state button x y)))))
((= type 6)
(with-foreign-slots ((state x y) xev xmotionevent)
(alexandria::appendf (arboreta::event-queue arboreta-window)
(list (list :hover state x y)))))
;; key press and release events
;; remember to update cursor position from here as well
((or (= type 2)) ;; type 3 for release
(with-foreign-slots ((state keycode x y) xev xkeyevent)
(setf state (logand state (lognot 16)))
(let ((code
(with-slots (display) (arboreta::image-context arboreta-window)
(xkb::xkb-keycode->keysym display keycode 0 state))))
(alexandria::appendf (arboreta::event-queue arboreta-window)
(if (zerop code)
(list
(list :keypress
state
(with-slots (display) (arboreta::image-context arboreta-window)
(xkb::xkb-keycode->keysym display keycode 0 0))
nil))
(list
(list :keypress
state
code
(xkb::get-keysym-name code)))))))))
t)))
(defparameter net-wm-type nil)
(defparameter net-wm-type-target nil)
(defun setup-window (xlib-image-context width height window-name)
(finish-output)
(call-xinitthreads)
(bind (((:slots display signal-window (this-window window)
wm-delete-window pointer graphics-context
xlib-context dest-surface)
xlib-image-context)
(screen (xdefaultscreen display))
(root (xdefaultrootwindow display))
(visual (xdefaultvisual display screen))
(whitepixel (xwhitepixel display screen))
(wm-protocols (xinternatom display "WM_PROTOCOLS" 1)))
;; we sync everything for initialization
(xsynchronize display 1)
;; create signal window and window
(setf this-window
(create-window display root width height 'inputoutput
visual whitepixel
(logior exposuremask
keypressmask
keyreleasemask
buttonpressmask
pointermotionmask
structurenotifymask)
t))
(setf signal-window (create-window display root 1 1 'inputonly visual whitepixel 0 nil))
;; create graphics-context
(setf graphics-context (xcreategc display this-window 0 (null-pointer)))
;; set size hints on window (hoping that window managers will
;; respect this)
(set-window-size-hints display this-window width width height height)
;; intern atom for window closing, set protocol on window
(setf wm-delete-window (xinternatom display "WM_DELETE_WINDOW" 1))
(with-foreign-object (prot 'xatom)
(setf (mem-aref prot 'xatom) wm-delete-window)
(xsetwmprotocols display this-window prot 1))
;; store name
(xstorename display this-window window-name)
;; set window type
(setf net-wm-type (xinternatom display "_NET_WM_WINDOW_TYPE" 1))
(setf net-wm-type-target (xinternatom display "_NET_WM_WINDOW_TYPE_NORMAL" 1))
(with-foreign-object (prop2 'xatom)
(setf (mem-aref prop2 'xatom) net-wm-type-target)
(xchangeproperty display this-window net-wm-type 4 32 0 prop2 1))
;; first we create an X11 surface and context on the window
(let ((xlib-surface (cairo_xlib_surface_create display this-window visual width height)))
(setf xlib-context (cairo_create xlib-surface))
(setf dest-surface xlib-surface))
;; create cairo surface, then context, then set the
;; surface as the source of the xlib-context
(let ((surface (cairo_image_surface_create :CAIRO_FORMAT_RGB24 width height)))
(setf pointer (cairo_create surface))
(cairo_set_source_surface xlib-context surface 0 0))
;; map window
(xmapwindow display this-window)
;; end of synchronizing
(xsynchronize display 0)))
(defun clean-shutdown (xlib-image-context)
(with-slots (display pixmap window signal-window pointer xlib-context dest-surface) xlib-image-context
(xsynchronize display 1)
(let ((saved-pointer pointer))
(setf pointer nil) ; invalidate first so it can't be used
(cairo_destroy saved-pointer))
(cairo_surface_destroy dest-surface)
(cairo_destroy xlib-context)
;; !! free xlib-context, surface
(xdestroywindow display window)
(xdestroywindow display signal-window)
(xclosedisplay display)))
(defun create-window* (width height &key (background-color +white+))
(let ((display (xopendisplay (null-pointer)))
(window-name (next-xlib-image-context-name)))
(when (null-pointer-p display)
(error "couldn't open display"))
(let ((xlib-image-context
(make-instance 'xlib-image-context
:display display
:width width
:height height
:pixel-based-p t
:background-color background-color)))
(setup-window xlib-image-context width height window-name)
;; paint it if we are given a background color
(when background-color
(set-source-color background-color xlib-image-context)
(paint xlib-image-context)
(sync xlib-image-context))
;; return context
xlib-image-context)))
(in-package arboreta)
(defun get-block (index size seq)
(nth index
(iter (for x from 0 to (length seq) by size)
(for y from size to (length seq) by size)
(collect (subseq seq x y)))))
(defun set-hex-color (hex)
(let ((colors (mapcar (lambda (x) (/ (parse-integer x :radix 16) 256))
(iter (for i from 0 to 2) (collect (get-block i 2 hex))))))
(set-source-rgb (first colors) (second colors) (third colors))))
(defun draw-rectangle (x y w h)
(new-path)
(rectangle x y w h)
(fill-path))
(defun basic-write (str font color x y)
(let ((pango-layout (pango:pango_cairo_create_layout (slot-value cairo:*context* 'cairo::pointer))))
(pango:pango_layout_set_font_description pango-layout font)
(new-path)
(move-to x y)
(set-hex-color color)
(pango:pango_layout_set_text pango-layout str -1)
(pango:pango_cairo_update_layout (slot-value *context* 'cairo::pointer) pango-layout)
(pango:pango_cairo_show_layout (slot-value *context* 'cairo::pointer) pango-layout)
(pango:g_object_unref pango-layout)))
(defclass window ()
(width (error "must supply width"))
(height (error "must supply height"))
(image-context nil)
(event-queue nil)
(update ((window window))
(cairo::refresh (image-context window)))
(shutdown ((window window))
(cairo::clean-shutdown (image-context window)))
(:after initialize-instance ((window window) &key)
(with-slots (width height) window
(setf (image-context window) (cairo::create-window* width height))))
(start-drawing ((window window))
(iter (for x = (+ (get-internal-real-time) 20))
(handle-events window)
(update window)
(iter (while (cairo::handle-event window)))
(let ((delay (/ (- x (get-internal-real-time)) 1000)))
(sleep (if (> delay 0) delay 0)))))
(handle-events ((window window))
(setf (event-queue window) nil)))
| 10,930 | Common Lisp | .cl | 262 | 32.183206 | 124 | 0.610197 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 499095f69d451f292094dd7278af10feedd793e865a8a13344a3ecad254fe38d | 6,582 | [
-1
] |
6,583 | cl-xkb.cl | Arboreta_arboreta-core/src/cl-xkb.cl | (defpackage :xkb
(:use :common-lisp :cffi))
(in-package :xkb)
(define-foreign-library xkb
(:unix (:or "/usr/lib64/libxkbcommon.so.0" "/usr/lib64/libxkbcommon.so" "/usr/lib/x86_64-linux-gnu/libxkbcommon.so"))
(t (:default "libxkbcommon")))
(use-foreign-library xkb)
(defctype display :pointer)
(defcstruct xkb-rule-names
(rules :string)
(model :string)
(layout :string)
(variant :string)
(options :string))
(defcfun "xkb_context_new" :pointer
(flags :uint32))
(defcfun "xkb_keymap_new_from_names" :pointer
(context :pointer)
(names :pointer)
(flags :uint32))
(defcfun ("XkbKeycodeToKeysym" xkb-keycode->keysym) :long
(display display)
(keycode :int)
(group :uint32)
(level :uint32))
;;(defcfun "xkb_keymap_get_as_string" :string
;; (keymap :pointer)
;; (format :int32))
(defun new-keymap-from-names (ctx rules model layout variant options)
(let* (;;(ctx (xkb-context-new 0))
(names (foreign-alloc '(:struct xkb-rule-names)))
(rules-ptr (foreign-alloc :char :count (+ (length rules) 1)))
(model-ptr (foreign-alloc :char :count (+ (length model) 1)))
(layout-ptr (foreign-alloc :char :count (+ (length layout) 1)))
(variant-ptr (foreign-alloc :char :count (+ (length variant) 1)))
(options-ptr (foreign-alloc :char :count (+ (length options) 1))))
(lisp-string-to-foreign rules rules-ptr (+ (length rules) 1))
(lisp-string-to-foreign model model-ptr (+ (length model) 1))
(lisp-string-to-foreign layout layout-ptr (+ (length layout) 1))
(lisp-string-to-foreign variant variant-ptr (+ (length variant) 1))
(lisp-string-to-foreign options options-ptr (+ (length options) 1))
(setf (foreign-slot-value names '(:struct xkb-rule-names) 'rules) rules-ptr)
(setf (foreign-slot-value names '(:struct xkb-rule-names) 'model) model-ptr)
(setf (foreign-slot-value names '(:struct xkb-rule-names) 'layout) layout-ptr)
(setf (foreign-slot-value names '(:struct xkb-rule-names) 'variant) variant-ptr)
(setf (foreign-slot-value names '(:struct xkb-rule-names) 'options) options-ptr)
(let ((keymap (xkb-keymap-new-from-names ctx names 0)))
(foreign-free names)
keymap)))
;;(new-keymap-from-names "" "pc105" "gb" "qwerty" "")
(defcfun "xkb_state_new" :pointer
(keymap :pointer))
(defcfun "xkb_state_key_get_one_sym" :uint32
(state :pointer)
(keycode :uint32))
(defcfun ("xkb_keysym_get_name") :int
(keysym :uint32)
(buffer :string)
(size :uint32))
(defun get-keysym-name (keysym)
(let* ((keysym-name (foreign-alloc :char :count 64)))
(xkb-keysym-get-name keysym keysym-name 64)
(let ((name (foreign-string-to-lisp keysym-name)))
(foreign-free keysym-name)
name)))
(defcfun "xkb_state_mod_name_is_active" :int
(state :pointer)
(modifier :string)
(type :int)) ;; effective 8
(defcfun "xkb_keymap_get_as_string" :string
(keymap :pointer)
(format :int)) ;; 1
(defcfun "xkb_keymap_key_by_name" :uint32
(keymap :pointer)
(name :string))
(defcfun "xkb_keymap_min_keycode" :uint32
(keymap :pointer))
(defcfun "xkb_keymap_max_keycode" :uint32
(keymap :pointer))
(defcfun "xkb_state_update_key" :int
(state :pointer)
(key :uint32)
(direction :int))
(defcfun "xkb_state_serialize_mods" :uint32
(state :pointer)
(components :int))
(defcfun "xkb_state_serialize_layout" :uint32
(state :pointer)
(components :int))
(defcfun "xkb_state_unref" :void
(state :pointer))
| 3,430 | Common Lisp | .cl | 91 | 34.516484 | 119 | 0.693329 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 7d39e8809e3e13dc052eea67694b298611d77aea97bcc353062f389f50091d54 | 6,583 | [
-1
] |
6,584 | test.cl | Arboreta_arboreta-core/src/test.cl | (ql:quickload 'arboreta-core)
(load "containers.cl")
(in-package arboreta)
(defparameter window nil)
(defparameter root nil)
(defparameter font-string "Fantasque Sans Mono 10")
(defparameter default-font nil)
(defparameter needs-update? t)
(defparameter w 1200)
(defparameter h 800)
(defclass example-container (rect)
(width w)
(height 50)
(:after draw (*this*)
(basic-write (format nil "#~a" (color this)) default-font "FFFFFF" 3 3)))
(defclass example-window (container-window)
(width w)
(height h)
(handle-events (*this*)
(with-slots (event-queue) this
(iter (while event-queue)
(let ((e (pop event-queue)))
(when (and (eq (first e) :keypress) (equalp (second e) 4) (equalp (third e) 113)) ;; C-q
(sb-ext:exit))))))
(start-drawing ((window example-window))
(iter (for x = (+ (get-internal-real-time) 20))
(when (and (root-container window) needs-update?)
(with-context ((image-context window))
(draw (root-container window)))
(update window)
(setf needs-update? nil))
(iter (while (cairo::handle-event window)))
(handle-events window)
(let ((delay (/ (- x (get-internal-real-time)) 1000)))
(sleep (if (> delay 0) delay 0))))))
(defun main ()
(setf window (make-instance example-window))
(setf default-font (pango:pango_font_description_from_string font-string))
(setf (root-container window)
(rect :width w :height h :color "252E32"
(vertical-list :width w :height h
(make-instance example-container :color "8FC029")
(make-instance example-container :color "DC2566")
(make-instance example-container :color "55BCCE"))))
(setf root (root-container window))
(start-drawing window))
;; (sb-ext:save-lisp-and-die "test" :executable t :toplevel #'main)
| 1,985 | Common Lisp | .cl | 47 | 34.12766 | 103 | 0.614621 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 0ed3aef808cf58dcfb185eb0dba00418539fb0023c02befb2d50a371ca5f69d1 | 6,584 | [
-1
] |
6,585 | draft.cl | Arboreta_arboreta-core/doc/draft.cl | Arboreta container draft v1.0
(defcontainer paddle (rect physical)
(width 40)
(height 200)
(color "#CCCCCC"))
(defcontainer ball (rect physical)
(height 20)
(width 20)
(velocity-x 2.5)
(velocity-y 2.5))
(defcontainer pong-container ()
(width 600)
(height 400)
(:subcontainer player
(make-container paddle
(:initially (align this :horizontal 1/3 :vertical 1/2))))
(:subcontainer enemy
(make-container paddle
(:initially (align this :horizontal 2/3 :vertical 1/2))))
(:subcontainer ball
(make-container ball))
(:keyevent (arrow-down) (event)
(decf (y (player this)) 30))
(:keyevent (arrow-up) (event)
(incf (y (player this)) 30)))
(defcontainer vertical-list
(:default-constructor vertical-list)
(draw (*this*)
(with-slots (subcontainers) this
(when subcontainers
(iter (for c in subcontainers)
(setf (y c) delta-y)
(draw c)
(reducing (height c) by #'+ into delta-y initial-value 0))))))
| 1,003 | Common Lisp | .cl | 34 | 25.058824 | 80 | 0.659067 | Arboreta/arboreta-core | 25 | 3 | 2 | AGPL-3.0 | 9/19/2024, 11:26:28 AM (Europe/Amsterdam) | 49faee4b1ed99adef83258ff3fc8af325436c4ca6b84ed42b0b703f63fbfe8f8 | 6,585 | [
-1
] |
6,587 | repl.png | Arboreta_arboreta-core/repl.png | âPNG
IHDR ¢ „ wèÍ bKGD ˇ ˇ ˇ†Ωßì pHYs öú tIME‡íû° IDATx WÜ®yˇˇˇ 8
óE IDAT ˇˇˇ nTÑn IDAT ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ =æ∂V IDAT ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ Ô’≠} IDAT WÜ®yˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˛˛˛ ˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˆvJ• IDAT ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˛˛˛ ˛˛˛ ˇˇˇ ˛˛˛ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˛˛˛ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˛˛˛ ˛˛˛ ˛˛˛ ˛˛˛ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˛˛˛ˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛ ˛˛˛ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˛˛˛˛˛˛ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇˇˇˇ˛˛˛ˇˇˇ» ŒìñùÌÌÔ é¡G IDAT nkc651 ˛˛˛ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇ ˛˛˛ˇˇˇˇˇˇ˛˛˛ˇˇˇ˛˛˛ˇˇˇ˛˛˛ˇˇˇX\fÎÏÌ ®£ö ˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇ ˛˛˛ˇˇˇˇˇˇ˛˛˛˛˛˛ˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛ÎÏÌ ÎÎ̸¸¸ˇˇˇ ˛˛˛ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ˛˛˛ˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛ ˛˛˛ ˇˇˇ˛˛˛ˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇ ˇˇˇ˛˛˛ˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˝˝˝˛˛˛ ‰Z‰Ù IDAT ˝˝˝ˇˇˇ ˇˇˇ˛˛˛ˇˇˇ ˇˇˇ ˛˛˛ˇˇˇ ˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˝˝˝˛˛˛˝˝˝ ˝˝˝ ˇˇˇˇˇˇˇˇˇ˛˛˛ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˝˝˝˛˛˛˝˝˝˝˝˝ ˝˝˝ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˝˝˝˝˝˝˝˝˝ ˝˝˝ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˝˝˝˝˝˝˝˝˝ ß:y IDAT ˝˝˝ ˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇ˛˛˛˝˝˝˝˝˝˝˝˝˛˛˛˝˝˝˝˝˝ ˝˝˝ ˝˝˝ ˇˇˇˇˇˇ ˇˇˇˇˇˇ ˇˇˇ WÜ®y ˇˇˇ ˇˇˇˇˇˇ˛˛˛˛˛˛ˇˇˇ˛˛˛ˇˇˇ˛˛˛ˇˇˇ˛˛˛˝˝˝˝˝˝˝˝˝¸¸¸ ¸¸¸ ˛˛˛˛˛˛˛˛˛ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˝˝˝ ˝˝˝˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇˇˇˇ˛˛˛ˇˇˇ˛˛˛˛˛˛˛˛˛˝˝˝¸¸¸˝˝˝ ju*ä IDAT ˝˝˝˛˛˛˛˛˛˛˛˛ˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˝˝˝˛˛˛˝˝˝ ˝˝˝˛˛˛˝˝˝˛˛˛˛˛˛˛˛˛˛˛˛ˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇ˛˛˛˛˛˛˝˝˝˛˛˛ ˛˛˛˝˝˝˛˛˛˛˛˛ˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˝˝˝ ˝˝˝˛˛˛˛˛˛˛˛˛˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇ˛˛˛ˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛ ˝ Èâ{T IDAT ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛ˇˇˇ˛˛˛ˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛ ˛˛˛˛˛˛˛˛˛˛˛˛˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇ ˛˛˛ˇˇˇ˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛ ˛˛˛˛˛˛ˇˇˇˇˇˇˇˇˇ˛˛˛ˇˇˇ˛˛˛ ˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛ ˛˛˛˛˛˛˛˛˛ˇˇˇˇˇˇˇˇˇˇˇˇ ˇˇˇˇˇˇˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇ ˇˇˇˇˇˇˇˇˇ˛˛˛˛˛˛˛˛˛ˇˇˇ˛˛˛7< |