Hy3 based frames only mode

This commit is contained in:
outfoxxed 2023-06-27 15:00:45 -07:00
parent 7b6b253fc7
commit e79a0f867d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

26
init.el
View file

@ -283,3 +283,29 @@
(setq gc-cons-threshold (* 1024 1024 100) (setq gc-cons-threshold (* 1024 1024 100)
read-process-output-max (* 1024 1024)) read-process-output-max (* 1024 1024))
;; hy3 retardation
(use-package frames-only-mode
:config
(frames-only-mode))
(defun hyprctl (&rest args)
(apply #'start-process (append '("hyprctl" "hyprctl-buf" "hyprctl" "dispatch") args)))
(advice-add #'evil-window-split :override
(lambda (&optional count file)
(hyprctl "hy3:makegroup" "v")
(make-frame-command)))
(advice-add #'evil-window-vsplit :override
(lambda (&optional count file)
(hyprctl "hy3:makegroup" "h")
(make-frame-command)))
(advice-add #'evil-window-left :override
(lambda (&optional count file) (hyprctl "hy3:movefocus" "l")))
(advice-add #'evil-window-right :override
(lambda (&optional count file) (hyprctl "hy3:movefocus" "r")))
(advice-add #'evil-window-up :override
(lambda (&optional count file) (hyprctl "hy3:movefocus" "u")))
(advice-add #'evil-window-down :override
(lambda (&optional count file) (hyprctl "hy3:movefocus" "d")))