Check if i3 exists when trying to do splits, else just spawn new frames
This commit is contained in:
parent
0be422e429
commit
726224bfe0
@ -475,18 +475,23 @@
|
|||||||
(add-to-list 'frames-only-mode-use-window-functions 'undo-tree-visualize)
|
(add-to-list 'frames-only-mode-use-window-functions 'undo-tree-visualize)
|
||||||
(frames-only-mode t)
|
(frames-only-mode t)
|
||||||
(menu-bar-mode 0)
|
(menu-bar-mode 0)
|
||||||
(defun split-window-below-i3 ()
|
(if (executable-find "i3")
|
||||||
"It's like `split-window-below', but uses i3 stuff"
|
(progn
|
||||||
(interactive)
|
(defun split-window-below-i3 ()
|
||||||
(call-process "i3" nil nil nil "split v")
|
"It's like `split-window-below', but uses i3 stuff"
|
||||||
(make-frame))
|
(interactive)
|
||||||
(defun split-window-right-i3 ()
|
(call-process "i3" nil nil nil "split v")
|
||||||
"It's like `split-window-below', but uses i3 stuff"
|
(make-frame))
|
||||||
(interactive)
|
(defun split-window-right-i3 ()
|
||||||
(call-process "i3" nil nil nil "split h")
|
"It's like `split-window-below', but uses i3 stuff"
|
||||||
(make-frame))
|
(interactive)
|
||||||
(bind-key "C-x 2" 'split-window-below-i3)
|
(call-process "i3" nil nil nil "split h")
|
||||||
(bind-key "C-x 3" 'split-window-right-i3))
|
(make-frame))
|
||||||
|
(bind-key "C-x 2" 'split-window-below-i3)
|
||||||
|
(bind-key "C-x 3" 'split-window-right-i3))
|
||||||
|
(progn
|
||||||
|
(bind-key "C-x 2" 'make-frame-command)
|
||||||
|
(bind-key "C-x 3" 'make-frame-command))))
|
||||||
|
|
||||||
(use-package crux :ensure
|
(use-package crux :ensure
|
||||||
:bind (("C-a" . crux-move-beginning-of-line)))
|
:bind (("C-a" . crux-move-beginning-of-line)))
|
||||||
|
Loading…
Reference in New Issue
Block a user