Emacs: qtile/emacs keybinding integration, but it's laggy...

This commit is contained in:
Joseph Ferano 2023-11-08 13:03:13 +07:00
parent f636d10120
commit a20aa01ca5

View File

@ -920,10 +920,37 @@ The theme of `C-x 4` bindings is that they operate on other windows, so this fun
(define-key ctl-x-4-map (kbd "-") #'joe/window-split-horizontal) (define-key ctl-x-4-map (kbd "-") #'joe/window-split-horizontal)
(define-key ctl-x-4-map (kbd "t") #'rotate-window) (define-key ctl-x-4-map (kbd "t") #'rotate-window)
(global-set-key (kbd "s-h") #'windmove-left) (defun joe/qtile-move-dir (dir)
(global-set-key (kbd "s-l") #'windmove-right) (start-process "qtile-dir" nil "qtile" "cmd-obj" "-o" "layout" "-f" dir))
(global-set-key (kbd "s-k") #'windmove-up)
(global-set-key (kbd "s-j") #'windmove-down) (defun joe/windmove-left ()
(interactive)
(if (window-in-direction 'left)
(windmove-left)
(joe/qtile-move-dir "left")))
(defun joe/windmove-right ()
(interactive)
(if (window-in-direction 'right)
(windmove-right)
(joe/qtile-move-dir "right")))
(defun joe/windmove-up ()
(interactive)
(if (window-in-direction 'up)
(windmove-up)
(joe/qtile-move-dir "up")))
(defun joe/windmove-down ()
(interactive)
(if (window-in-direction 'down)
(windmove-down)
(joe/qtile-move-dir "down")))
(global-set-key (kbd "s-h") #'joe/windmove-left)
(global-set-key (kbd "s-l") #'joe/windmove-right)
(global-set-key (kbd "s-k") #'joe/windmove-up)
(global-set-key (kbd "s-j") #'joe/windmove-down)
;; There's a bug in Gnome where frames are resized to the wrong dimensions ;; There's a bug in Gnome where frames are resized to the wrong dimensions
(defun joe/resize-frames () (defun joe/resize-frames ()