Compare commits
2 Commits
5cc0d953c7
...
8c6fccb87d
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c6fccb87d | |||
| 60b8734695 |
4
.justfile
Normal file
4
.justfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
# Run home-manager switch to update Nix environment
|
||||||
|
nixup:
|
||||||
|
cd "{{justfile_directory()}}`/nix" && home-manager switch --flake ".#std"
|
||||||
@@ -512,7 +512,7 @@
|
|||||||
"\\*Flycheck errors\\*"
|
"\\*Flycheck errors\\*"
|
||||||
help-mode
|
help-mode
|
||||||
compilation-mode
|
compilation-mode
|
||||||
"\\*eshell-popup\\*" eshell-mode))
|
"\\*eshell-popup\\*"))
|
||||||
|
|
||||||
(defun my/popper-window-height (window)
|
(defun my/popper-window-height (window)
|
||||||
"Make eshell popups take half the frame height, otherwise defer to popper--fit-window-height"
|
"Make eshell popups take half the frame height, otherwise defer to popper--fit-window-height"
|
||||||
@@ -669,6 +669,16 @@
|
|||||||
|
|
||||||
;;;; Emacs Server
|
;;;; Emacs Server
|
||||||
(server-start)
|
(server-start)
|
||||||
|
;;;; Just
|
||||||
|
|
||||||
|
(use-package just-mode
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package justl
|
||||||
|
:ensure t
|
||||||
|
:bind (("C-c j" . justl-exec-default-recipe)
|
||||||
|
("C-c J" . justl)))
|
||||||
|
|
||||||
;;; Org-mode
|
;;; Org-mode
|
||||||
(use-package org
|
(use-package org
|
||||||
:bind (("C-c o ," . my/org-clear-all)
|
:bind (("C-c o ," . my/org-clear-all)
|
||||||
@@ -929,8 +939,41 @@
|
|||||||
when (string-match regexp (buffer-name (window-buffer window)))
|
when (string-match regexp (buffer-name (window-buffer window)))
|
||||||
thereis window))
|
thereis window))
|
||||||
|
|
||||||
|
(defun my/split-largest-eshell-and-focus ()
|
||||||
|
"Find the largest eshell window in the current frame, split it
|
||||||
|
along its longest dimension, and create a new eshell in the
|
||||||
|
split. The new eshell uses the `default-directory` of the
|
||||||
|
buffer that was current when this command was invoked. Finally,
|
||||||
|
the new eshell window is selected."
|
||||||
|
(interactive)
|
||||||
|
(let* ((starting-dir default-directory)
|
||||||
|
(largest-eshell-window
|
||||||
|
(cl-loop with max-area = 0
|
||||||
|
with largest-win = nil
|
||||||
|
for win in (window-list)
|
||||||
|
when (with-current-buffer (window-buffer win)
|
||||||
|
(eq major-mode 'eshell-mode))
|
||||||
|
do (let ((area (* (window-total-width win) (window-total-height win))))
|
||||||
|
(when (> area max-area)
|
||||||
|
(setq max-area area)
|
||||||
|
(setq largest-win win)))
|
||||||
|
finally return largest-win))
|
||||||
|
|
||||||
|
(new-window
|
||||||
|
(with-selected-window largest-eshell-window
|
||||||
|
(if (> (window-total-width) (* 2 (window-total-height)))
|
||||||
|
(split-window-right)
|
||||||
|
(split-window-below)))))
|
||||||
|
|
||||||
|
(select-window new-window)
|
||||||
|
(let ((default-directory starting-dir))
|
||||||
|
(eshell t))))
|
||||||
|
; (select-window new-window)))
|
||||||
|
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
:bind (("M-`" . my/eshell-toggle))
|
:bind (("M-`" . my/eshell-toggle)
|
||||||
|
:map eshell-mode-map
|
||||||
|
("C-S-<return>" . my/split-largest-eshell-and-focus))
|
||||||
:config
|
:config
|
||||||
(setq eshell-destroy-buffer-when-process-dies t
|
(setq eshell-destroy-buffer-when-process-dies t
|
||||||
eshell-scroll-to-bottom-on-input t
|
eshell-scroll-to-bottom-on-input t
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
roboto-mono
|
roboto-mono
|
||||||
aider-chat
|
aider-chat
|
||||||
sops
|
sops
|
||||||
|
just
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
Reference in New Issue
Block a user