Skip to content

Instantly share code, notes, and snippets.

@pipcet
Created August 28, 2015 19:58
Show Gist options
  • Save pipcet/d745fa6b44274d9dbce6 to your computer and use it in GitHub Desktop.
Save pipcet/d745fa6b44274d9dbce6 to your computer and use it in GitHub Desktop.
exwm--on-ClientMessage([161 32 140 0 20 0 96 0 115 1 0 0 1 0 0 0 119 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0] t)
funcall(exwm--on-ClientMessage [161 32 140 0 20 0 96 0 115 1 0 0 1 0 0 0 119 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0] t)
(condition-case err (funcall listener data synthetic) (error (message "%S" err)))
(let ((listener (car --dolist-tail--))) (message "calling %S" listener) (condition-case err (funcall listener data synthetic) (error (message "%S" err))) (message "returned from %S" listener) (setq --dolist-tail-- (cdr --dolist-tail--)))
(while --dolist-tail-- (let ((listener (car --dolist-tail--))) (message "calling %S" listener) (condition-case err (funcall listener data synthetic) (error (message "%S" err))) (message "returned from %S" listener) (setq --dolist-tail-- (cdr --dolist-tail--))))
(let ((--dolist-tail-- (elt event 0))) (while --dolist-tail-- (let ((listener (car --dolist-tail--))) (message "calling %S" listener) (condition-case err (funcall listener data synthetic) (error (message "%S" err))) (message "returned from %S" listener) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(while (setq event (car-safe (prog1 (slot-value object (quote event-queue)) (let* ((v object)) (eieio-oset v (quote event-queue) (cdr (slot-value object ...))))))) (setq data (elt event 1) synthetic (elt event 2)) (let ((--dolist-tail-- (elt event 0))) (while --dolist-tail-- (let ((listener (car --dolist-tail--))) (message "calling %S" listener) (condition-case err (funcall listener data synthetic) (error (message "%S" err))) (message "returned from %S" listener) (setq --dolist-tail-- (cdr --dolist-tail--))))))
(let (event data synthetic) (while (setq event (car-safe (prog1 (slot-value object (quote event-queue)) (let* ((v object)) (eieio-oset v (quote event-queue) (cdr ...)))))) (setq data (elt event 1) synthetic (elt event 2)) (let ((--dolist-tail-- (elt event 0))) (while --dolist-tail-- (let ((listener (car --dolist-tail--))) (message "calling %S" listener) (condition-case err (funcall listener data synthetic) (error (message "%S" err))) (message "returned from %S" listener) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
(if (slot-value object (quote event-lock)) nil (let* ((v object)) (eieio-oset v (quote event-lock) t)) (let (event data synthetic) (while (setq event (car-safe (prog1 (slot-value object (quote event-queue)) (let* (...) (eieio-oset v ... ...))))) (setq data (elt event 1) synthetic (elt event 2)) (let ((--dolist-tail-- (elt event 0))) (while --dolist-tail-- (let ((listener ...)) (message "calling %S" listener) (condition-case err (funcall listener data synthetic) (error ...)) (message "returned from %S" listener) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (let* ((v object)) (eieio-oset v (quote event-lock) nil)))
(let* ((object connection)) (if (slot-value object (quote event-lock)) nil (let* ((v object)) (eieio-oset v (quote event-lock) t)) (let (event data synthetic) (while (setq event (car-safe (prog1 (slot-value object ...) (let* ... ...)))) (setq data (elt event 1) synthetic (elt event 2)) (let ((--dolist-tail-- (elt event 0))) (while --dolist-tail-- (let (...) (message "calling %S" listener) (condition-case err ... ...) (message "returned from %S" listener) (setq --dolist-tail-- ...)))))) (let* ((v object)) (eieio-oset v (quote event-lock) nil))))
(if (slot-value connection (quote lock)) nil (let* ((object connection)) (let ((current-cache-length (length (slot-value object (quote message-cache))))) (let* ((v object)) (eieio-oset v (quote message-cache) (substring (slot-value object (quote message-cache)) (- cache-length (length cache))))) (if (/= current-cache-length cache-length) (progn (xcb:-connection-filter process []))))) (let* ((object connection)) (if (slot-value object (quote event-lock)) nil (let* ((v object)) (eieio-oset v (quote event-lock) t)) (let (event data synthetic) (while (setq event (car-safe (prog1 ... ...))) (setq data (elt event 1) synthetic (elt event 2)) (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ... ... ...))))) (let* ((v object)) (eieio-oset v (quote event-lock) nil)))))
(let* ((connection (plist-get (process-plist process) (quote connection))) (cache (vconcat (slot-value connection (quote message-cache)) msg)) (cache-length (length cache))) (let* ((v connection)) (eieio-oset v (quote message-cache) cache)) (catch (quote return) (if (slot-value connection (quote lock)) (progn (throw (quote return) (quote lock)))) (let* ((v connection)) (eieio-oset v (quote lock) t)) (if (slot-value connection (quote connected)) nil (if (<= 8 (length cache)) (progn (let ((data-len ...) obj) (if (>= ... data-len) (progn ... ...))))) (let* ((v connection)) (eieio-oset v (quote lock) nil)) (throw (quote return) (quote setup))) (catch (quote break) (while (<= 32 (length cache)) (let* ((val (elt cache 0))) (cond ((eq val 0) (let nil ... ...)) ((eq val 1) (let nil ...)) (t (let ... ... ... ...)))))) (let* ((v connection)) (eieio-oset v (quote lock) nil))) (if (slot-value connection (quote lock)) nil (let* ((object connection)) (let ((current-cache-length (length (slot-value object ...)))) (let* ((v object)) (eieio-oset v (quote message-cache) (substring (slot-value object ...) (- cache-length ...)))) (if (/= current-cache-length cache-length) (progn (xcb:-connection-filter process []))))) (let* ((object connection)) (if (slot-value object (quote event-lock)) nil (let* ((v object)) (eieio-oset v (quote event-lock) t)) (let (event data synthetic) (while (setq event (car-safe ...)) (setq data (elt event 1) synthetic (elt event 2)) (let (...) (while --dolist-tail-- ...)))) (let* ((v object)) (eieio-oset v (quote event-lock) nil))))))
xcb:-connection-filter(#<process XELB> "...")
read-event()
(progn (read-event))
(unwind-protect (progn (read-event)) (cancel-timer -with-timeout-timer-))
(let* ((-with-timeout-timer- (run-with-timer seconds nil (function (lambda nil (throw (quote timeout) (quote timeout)))))) (with-timeout-timers (cons -with-timeout-timer- with-timeout-timers))) (unwind-protect (progn (read-event)) (cancel-timer -with-timeout-timer-)))
(catch (quote timeout) (let* ((-with-timeout-timer- (run-with-timer seconds nil (function (lambda nil (throw ... ...))))) (with-timeout-timers (cons -with-timeout-timer- with-timeout-timers))) (unwind-protect (progn (read-event)) (cancel-timer -with-timeout-timer-))))
(let ((-with-timeout-value- (catch (quote timeout) (let* ((-with-timeout-timer- (run-with-timer seconds nil ...)) (with-timeout-timers (cons -with-timeout-timer- with-timeout-timers))) (unwind-protect (progn (read-event)) (cancel-timer -with-timeout-timer-)))))) (if (eq -with-timeout-value- (quote timeout)) (progn) -with-timeout-value-))
exwm--make-emacs-idle-for(0.1)
(let ((frame (elt exwm-workspace--list index))) (setq exwm-workspace--current frame exwm-workspace-current-index index) (select-frame-set-input-focus frame) (let ((position (mouse-pixel-position)) x y w h) (if (eq frame (car position)) nil (setq x (car (cdr position)) y (cdr (cdr position)) w (frame-pixel-width frame) h (frame-pixel-height frame)) (if (or (> x w) (> y h)) (progn (setq x (/ w 2) y (/ h 2)))) (set-mouse-pixel-position frame x y))) (setq default-minibuffer-frame frame) (let ((--dolist-tail-- exwm--id-buffer-alist)) (while --dolist-tail-- (let ((i (car --dolist-tail--))) (save-current-buffer (set-buffer (cdr i)) (let ((name ...)) (exwm-workspace-rename-buffer (if ... name ...)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (set-frame-parameter frame (quote exwm--urgency) nil) (exwm-workspace--update-switch-history) (exwm--make-emacs-idle-for 0.1) (xcb:-+request exwm--connection (make-instance (quote xcb:ewmh:set-_NET_CURRENT_DESKTOP) :window exwm--root :data index)) (xcb:flush exwm--connection))
(progn (let ((frame (elt exwm-workspace--list index))) (setq exwm-workspace--current frame exwm-workspace-current-index index) (select-frame-set-input-focus frame) (let ((position (mouse-pixel-position)) x y w h) (if (eq frame (car position)) nil (setq x (car (cdr position)) y (cdr (cdr position)) w (frame-pixel-width frame) h (frame-pixel-height frame)) (if (or (> x w) (> y h)) (progn (setq x (/ w 2) y (/ h 2)))) (set-mouse-pixel-position frame x y))) (setq default-minibuffer-frame frame) (let ((--dolist-tail-- exwm--id-buffer-alist)) (while --dolist-tail-- (let ((i (car --dolist-tail--))) (save-current-buffer (set-buffer (cdr i)) (let (...) (exwm-workspace-rename-buffer ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (set-frame-parameter frame (quote exwm--urgency) nil) (exwm-workspace--update-switch-history) (exwm--make-emacs-idle-for 0.1) (xcb:-+request exwm--connection (make-instance (quote xcb:ewmh:set-_NET_CURRENT_DESKTOP) :window exwm--root :data index)) (xcb:flush exwm--connection)))
(if (or force (/= exwm-workspace-current-index index)) (progn (let ((frame (elt exwm-workspace--list index))) (setq exwm-workspace--current frame exwm-workspace-current-index index) (select-frame-set-input-focus frame) (let ((position (mouse-pixel-position)) x y w h) (if (eq frame (car position)) nil (setq x (car (cdr position)) y (cdr (cdr position)) w (frame-pixel-width frame) h (frame-pixel-height frame)) (if (or (> x w) (> y h)) (progn (setq x ... y ...))) (set-mouse-pixel-position frame x y))) (setq default-minibuffer-frame frame) (let ((--dolist-tail-- exwm--id-buffer-alist)) (while --dolist-tail-- (let ((i ...)) (save-current-buffer (set-buffer ...) (let ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (set-frame-parameter frame (quote exwm--urgency) nil) (exwm-workspace--update-switch-history) (exwm--make-emacs-idle-for 0.1) (xcb:-+request exwm--connection (make-instance (quote xcb:ewmh:set-_NET_CURRENT_DESKTOP) :window exwm--root :data index)) (xcb:flush exwm--connection))))
(progn (if (and (<= 0 index) (< index exwm-workspace-number)) nil (user-error "[EXWM] Workspace index out of range: %d" index)) (if (or force (/= exwm-workspace-current-index index)) (progn (let ((frame (elt exwm-workspace--list index))) (setq exwm-workspace--current frame exwm-workspace-current-index index) (select-frame-set-input-focus frame) (let ((position (mouse-pixel-position)) x y w h) (if (eq frame (car position)) nil (setq x (car ...) y (cdr ...) w (frame-pixel-width frame) h (frame-pixel-height frame)) (if (or ... ...) (progn ...)) (set-mouse-pixel-position frame x y))) (setq default-minibuffer-frame frame) (let ((--dolist-tail-- exwm--id-buffer-alist)) (while --dolist-tail-- (let (...) (save-current-buffer ... ...) (setq --dolist-tail-- ...)))) (set-frame-parameter frame (quote exwm--urgency) nil) (exwm-workspace--update-switch-history) (exwm--make-emacs-idle-for 0.1) (xcb:-+request exwm--connection (make-instance (quote xcb:ewmh:set-_NET_CURRENT_DESKTOP) :window exwm--root :data index)) (xcb:flush exwm--connection)))))
(if index (progn (if (and (<= 0 index) (< index exwm-workspace-number)) nil (user-error "[EXWM] Workspace index out of range: %d" index)) (if (or force (/= exwm-workspace-current-index index)) (progn (let ((frame (elt exwm-workspace--list index))) (setq exwm-workspace--current frame exwm-workspace-current-index index) (select-frame-set-input-focus frame) (let ((position ...) x y w h) (if (eq frame ...) nil (setq x ... y ... w ... h ...) (if ... ...) (set-mouse-pixel-position frame x y))) (setq default-minibuffer-frame frame) (let ((--dolist-tail-- exwm--id-buffer-alist)) (while --dolist-tail-- (let ... ... ...))) (set-frame-parameter frame (quote exwm--urgency) nil) (exwm-workspace--update-switch-history) (exwm--make-emacs-idle-for 0.1) (xcb:-+request exwm--connection (make-instance (quote xcb:ewmh:set-_NET_CURRENT_DESKTOP) :window exwm--root :data index)) (xcb:flush exwm--connection))))))
exwm-workspace-switch(0 t)
exwm-workspace--init()
(if (xcb:-request-check exwm--connection (xcb:-+request-checked exwm--connection (make-instance (quote xcb:ChangeWindowAttributes) :window exwm--root :value-mask xcb:CW:EventMask :event-mask xcb:EventMask:SubstructureRedirect))) (progn (xcb:disconnect exwm--connection) (setq exwm--connection nil) (message (concat "[EXWM] " "Other window manager detected"))) (xcb:ewmh:init exwm--connection) (exwm--lock) (exwm--init-icccm-ewmh) (exwm-layout--init) (exwm-floating--init) (exwm-manage--init) (exwm-input--init) (exwm--unlock) (exwm-workspace--init) (exwm-manage--scan) (run-hooks (quote exwm-init-hook)))
(if exwm--connection nil (exwm-enable (quote undo)) (setq exwm--connection (xcb:connect-to-socket)) (set-process-query-on-exit-flag (slot-value exwm--connection (quote process)) nil) (setq exwm--root (slot-value (car (slot-value (xcb:get-setup exwm--connection) (quote roots))) (quote root))) (if (xcb:-request-check exwm--connection (xcb:-+request-checked exwm--connection (make-instance (quote xcb:ChangeWindowAttributes) :window exwm--root :value-mask xcb:CW:EventMask :event-mask xcb:EventMask:SubstructureRedirect))) (progn (xcb:disconnect exwm--connection) (setq exwm--connection nil) (message (concat "[EXWM] " "Other window manager detected"))) (xcb:ewmh:init exwm--connection) (exwm--lock) (exwm--init-icccm-ewmh) (exwm-layout--init) (exwm-floating--init) (exwm-manage--init) (exwm-input--init) (exwm--unlock) (exwm-workspace--init) (exwm-manage--scan) (run-hooks (quote exwm-init-hook))))
(if (not (eq (quote x) (framep (or frame (selected-frame))))) (message (concat "[EXWM] " "Not running under X environment")) (if exwm--connection nil (exwm-enable (quote undo)) (setq exwm--connection (xcb:connect-to-socket)) (set-process-query-on-exit-flag (slot-value exwm--connection (quote process)) nil) (setq exwm--root (slot-value (car (slot-value (xcb:get-setup exwm--connection) (quote roots))) (quote root))) (if (xcb:-request-check exwm--connection (xcb:-+request-checked exwm--connection (make-instance (quote xcb:ChangeWindowAttributes) :window exwm--root :value-mask xcb:CW:EventMask :event-mask xcb:EventMask:SubstructureRedirect))) (progn (xcb:disconnect exwm--connection) (setq exwm--connection nil) (message (concat "[EXWM] " "Other window manager detected"))) (xcb:ewmh:init exwm--connection) (exwm--lock) (exwm--init-icccm-ewmh) (exwm-layout--init) (exwm-floating--init) (exwm-manage--init) (exwm-input--init) (exwm--unlock) (exwm-workspace--init) (exwm-manage--scan) (run-hooks (quote exwm-init-hook)))))
exwm-init()
run-hooks(window-setup-hook)
command-line-1(nil)
command-line()
normal-top-level()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment