wip
This commit is contained in:
@@ -656,7 +656,7 @@ Now we'll set up some keybindings:
|
||||
key = "g",
|
||||
mods = "CMD",
|
||||
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_SRC
|
||||
|
||||
** Ghostty
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/desktop/ghostty.nix
|
||||
{pkgs, ...}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package = pkgs.ghostty-bin;
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** Zsh
|
||||
|
||||
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.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(defun jf/100-px-window (window)
|
||||
(let* ((desired (min (/ (frame-width) 2) 101))
|
||||
(current (window-width window))
|
||||
(delta (- desired current)))
|
||||
(window-resize window delta :horizontal t)))
|
||||
(defun jf/window-children (window)
|
||||
(let ((result nil)
|
||||
(child (window-child window)))
|
||||
(while child
|
||||
(push child result)
|
||||
(setq child (window-next-sibling child)))
|
||||
(reverse result)))
|
||||
|
||||
(defun jf/enforce-right-side-heights (win)
|
||||
(let ((slot-heights '((-1 . 10)))
|
||||
(let ((slot-heights '((-1 . 20)))
|
||||
(parent (window-parent win)))
|
||||
(when parent
|
||||
(let ((child (window-child parent)))
|
||||
(while child
|
||||
(when-let* (((eq (window-parameter child 'window-side) 'right))
|
||||
(height (alist-get (window-parameter child 'window-slot) slot-heights)))
|
||||
(window-resize child (- height (window-height child))))
|
||||
(setq child (window-next-sibling child)))))))
|
||||
(let ((children (jf/window-children parent)))
|
||||
(when (> (length children) 1)
|
||||
(cl-loop for child in children
|
||||
for slot = (window-parameter child 'window-slot)
|
||||
for height = (alist-get slot slot-heights)
|
||||
when height do (progn (window-resize child (- height (window-height child)))
|
||||
(window-preserve-size child nil t))))))))
|
||||
|
||||
(setq display-buffer-alist
|
||||
'(((or "\\*Flymake diagnostics .*"
|
||||
@@ -1032,22 +1046,24 @@ content to be.
|
||||
"\\*claude:.*"
|
||||
"\\*Man .*"
|
||||
"\\*List .*")
|
||||
(display-buffer-reuse-window display-buffer-in-side-window)
|
||||
(display-buffer-in-side-window)
|
||||
(side . right)
|
||||
(slot . 0)
|
||||
(window-width . jf/100-px-window)
|
||||
(window-width . 101)
|
||||
(window-height . jf/enforce-right-side-heights)
|
||||
(preserve-size . (t . nil))
|
||||
(window-parameters (no-delete-other-windows . t)
|
||||
(no-other-window . t)))
|
||||
((or "\\*Embark Actions\\*"
|
||||
"\\*eldoc\\*")
|
||||
(display-buffer-in-side-window)
|
||||
(side . right)
|
||||
(slot . -1)
|
||||
(window-width . jf/100-px-window)
|
||||
(window-height . jf/enforce-right-side-heights)
|
||||
(window-parameters (no-delete-other-windows . t)
|
||||
(no-other-window . t)))))
|
||||
(side . right)
|
||||
(slot . -1)
|
||||
(window-width . 101)
|
||||
(window-height . jf/enforce-right-side-heights)
|
||||
(preserve-size . (t . t))
|
||||
(window-parameters (no-delete-other-windows . t)
|
||||
(no-other-window . t)))))
|
||||
|
||||
(setopt window-persistent-parameters
|
||||
(cl-list* '(no-delete-other-windows . writable)
|
||||
|
||||
Reference in New Issue
Block a user