This commit is contained in:
Joe Frikker
2026-07-07 15:01:03 -04:00
parent 1c379cc4a3
commit 8fae2a5338
+32 -16
View File
@@ -656,7 +656,7 @@ Now we'll set up some keybindings:
key = "g", key = "g",
mods = "CMD", mods = "CMD",
action = wezterm.action.SpawnCommandInNewTab { action = wezterm.action.SpawnCommandInNewTab {
args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-c", "lazygit" } args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-i", "-c", "lazygit" }
} }
}, },
{ {
@@ -686,6 +686,17 @@ Now we'll set up some keybindings:
end end
#+END_SRC #+END_SRC
** Ghostty
#+BEGIN_SRC nix :tangle target/desktop/ghostty.nix
{pkgs, ...}: {
programs.ghostty = {
enable = true;
package = pkgs.ghostty-bin;
};
}
#+END_SRC
** Zsh ** Zsh
This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or
@@ -984,22 +995,25 @@ windows. I place windows in the bottom or on the right mostly depending on how w
content to be. content to be.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(defun jf/100-px-window (window) (defun jf/window-children (window)
(let* ((desired (min (/ (frame-width) 2) 101)) (let ((result nil)
(current (window-width window)) (child (window-child window)))
(delta (- desired current))) (while child
(window-resize window delta :horizontal t))) (push child result)
(setq child (window-next-sibling child)))
(reverse result)))
(defun jf/enforce-right-side-heights (win) (defun jf/enforce-right-side-heights (win)
(let ((slot-heights '((-1 . 10))) (let ((slot-heights '((-1 . 20)))
(parent (window-parent win))) (parent (window-parent win)))
(when parent (when parent
(let ((child (window-child parent))) (let ((children (jf/window-children parent)))
(while child (when (> (length children) 1)
(when-let* (((eq (window-parameter child 'window-side) 'right)) (cl-loop for child in children
(height (alist-get (window-parameter child 'window-slot) slot-heights))) for slot = (window-parameter child 'window-slot)
(window-resize child (- height (window-height child)))) for height = (alist-get slot slot-heights)
(setq child (window-next-sibling child))))))) when height do (progn (window-resize child (- height (window-height child)))
(window-preserve-size child nil t))))))))
(setq display-buffer-alist (setq display-buffer-alist
'(((or "\\*Flymake diagnostics .*" '(((or "\\*Flymake diagnostics .*"
@@ -1032,11 +1046,12 @@ content to be.
"\\*claude:.*" "\\*claude:.*"
"\\*Man .*" "\\*Man .*"
"\\*List .*") "\\*List .*")
(display-buffer-reuse-window display-buffer-in-side-window) (display-buffer-in-side-window)
(side . right) (side . right)
(slot . 0) (slot . 0)
(window-width . jf/100-px-window) (window-width . 101)
(window-height . jf/enforce-right-side-heights) (window-height . jf/enforce-right-side-heights)
(preserve-size . (t . nil))
(window-parameters (no-delete-other-windows . t) (window-parameters (no-delete-other-windows . t)
(no-other-window . t))) (no-other-window . t)))
((or "\\*Embark Actions\\*" ((or "\\*Embark Actions\\*"
@@ -1044,8 +1059,9 @@ content to be.
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . right) (side . right)
(slot . -1) (slot . -1)
(window-width . jf/100-px-window) (window-width . 101)
(window-height . jf/enforce-right-side-heights) (window-height . jf/enforce-right-side-heights)
(preserve-size . (t . t))
(window-parameters (no-delete-other-windows . t) (window-parameters (no-delete-other-windows . t)
(no-other-window . t))))) (no-other-window . t)))))