curl -fsSL https://raw.githubusercontent.com/FrederikvSvane/dotfiles/main/setup.sh | bashThe script:
- Installs zsh, git, curl, GNU Screen, tmux, and gh (apt, dnf, pacman, or brew).
Without root (not root and no sudo), it instead installs zsh
(zsh-bin) and gh into
~/.local. git and curl must already be present, and Screen and tmux are skipped if missing. - Installs oh-my-zsh.
- Installs powerlevel10k, zsh-autosuggestions, and zsh-syntax-highlighting.
- Installs Neovim (>= 0.11) plus ripgrep, fd, lazygit and delta for LazyVim and git. With root
it uses the package manager and
/opt/nvim; without root everything goes to~/.local. - Installs herdr (to
~/.local/bin, no root) and downloads.zshrc,.p10k.zsh,.gitconfig,.screenrc,.tmux.confand~/.config/herdr/config.tomlfrom this repo, plus~/.config/kitty/kitty.confwhen kitty is installed. Existing files are backed up first (.bak.<timestamp>). - Installs the LazyVim + Catppuccin config from
nvim/to~/.config/nvimand restores the plugins pinned inlazy-lock.json. - Sets zsh as the default shell. Without root, if
chshisn't possible, it adds a snippet to~/.bashrcthat starts zsh instead.
Safe to re-run: anything already installed is skipped, and a config file is only backed up and replaced when it differs from the repo's version.
GNU Screen automatically reads ~/.screenrc when a new session starts. The
included configuration keeps 10,000 lines of history and enables native
terminal scrolling for xterm-compatible terminals.
- Run
gh auth login. - Powerlevel10k needs the MesloLGS NF font. Install it in the terminal you connect from, not on the remote machine.
- Run
exec zshor log out and back in.
LazyVim with Catppuccin (mocha). Arrow keys and mouse work; press <space> for
the command menu. :LazyExtras toggles language support. <space>gv opens diffview (side-by-side
review of the whole working tree), <space>gV closes it.
Edit root-owned files with sudoedit <file> (alias svim), which runs your own
nvim config and only escalates the save. Plain sudo nvim may use root's empty
config depending on the system's HOME handling.
Mouse and trackpad scrolling work out of the box (scroll up enters copy mode),
with 50k lines of history, true colour and Catppuccin mocha colours. The prefix
is still Ctrl-b.
| Key | Action |
|---|---|
prefix | / - |
Split right / down (keeps current directory) |
Ctrl+Alt + arrows |
Move between panes, no prefix (kitty sends these for cmd+opt+arrows) |
Shift + left/right |
Previous / next window, no prefix |
prefix H J K L |
Resize panes |
Alt + t / w |
New window (current directory) / close pane, no prompt |
Alt + 1..9 |
Go to window N |
Alt + Shift + t |
Rename window |
prefix Tab |
Last window |
prefix Enter |
Copy mode (vi keys; v select, y copy) |
prefix r |
Reload config |
Dragging with the mouse selects and copies to the system clipboard (OSC 52, so it
also works over ssh in terminals that allow it). Plain Alt+arrows are left alone for
word jumps. Outside kitty, bind cmd+opt+arrows (or any key) to send Ctrl+Alt+arrows.
git diff, git show and git log -p go through delta,
side-by-side by default (n/N jump between files). On a narrow screen, run
diffmode inline for the session (diffmode side to go back), or gdi for a
single inline git diff. Without delta installed, git falls back to plain less.
Catppuccin mocha, MesloLGS NF 13, block cursor, tabs on top. Installed to
~/.config/kitty/kitty.conf only when kitty is present. cmd+shift+r reloads it.
| Key | Action |
|---|---|
opt+cmd+| / opt+cmd+- |
Split vertically / horizontally (current directory) |
cmd+d / cmd+shift+d |
Same splits, iTerm style |
cmd+alt+ arrows |
Move between panes: tmux/herdr panes (sent as Ctrl+Alt+arrows), else kitty splits. A kitty split beside an ssh window always wins; see arrow_pass.py |
cmd+1..cmd+9 |
Go to tab N |
cmd+t / cmd+w |
New tab / close pane |
cmd+enter |
Zoom the current split |
cmd+backspace |
Delete the whole line (sends ctrl+u) |
cmd+left / cmd+right |
Start / end of line (sends Home / End) |
It sets TERM=xterm-256color so ssh hosts without kitty's terminfo work and the
true-colour override in tmux.conf applies. macos_option_as_alt is on, so the
Alt+arrow pane bindings in tmux work. Note opt+cmd+\| is alt+super+i on a
Nordic layout, which is how it is mapped.
Config in herdr/config.toml. It mirrors tmux.conf: same prefix (ctrl+b), same
keys, so there is one set to remember. Run herdr directly, never inside tmux (tmux
would swallow ctrl+b and the Alt chords).
| Key | Action |
|---|---|
Alt+t / prefix c |
New tab |
Alt+w / prefix x |
Close pane |
Alt+Shift+t / prefix , |
Rename tab |
prefix & |
Close tab |
Alt+1..9 / prefix 1..9 |
Go to tab N |
Shift+ left/right / prefix p/n |
Previous / next tab |
prefix < / > |
Move tab |
prefix | / - |
Split vertically / horizontally |
prefix h j k l, cmd+opt+arrows |
Move between panes |
prefix Shift+h/j/k/l |
Resize panes |
prefix r |
Reload config |
prefix d / prefix q |
Detach |
prefix Enter / e |
Open scrollback in $EDITOR |
Ctrl+Shift + up/down |
Previous / next agent |
prefix w / g |
Workspace picker / jump anywhere |
cmd+opt+arrows reach herdr as Ctrl+Alt+arrows via kitty (arrow_pass.py), and the
Ctrl+Shift+arrows need kitty's passthrough in kitty.conf. There is no vi copy mode
or "last window" key. After editing the config, run herdr server reload-config.