Instead of exec-ing the tmux process, run it normally and exit
afterwards. Otherwise the zlogout is not read as mentioned a couple of
lines above and in `zsh(1)`:
> However, if the shell terminates due to exec'ing another process, the
> logout files are not read.
When connected over ssh and attaching to/creating a tmux session, the
shell should `exec` the tmux command so that detaching from the session
automatically also closes the ssh connection.
If something should happen and the `tmux` command bricks the remote
shell this can fixed by logging in with:
ssh [destination] zsh -dfi
Do not set `MANPAGER` to `nvim` as `nvim-man` is used already and in the
case that it does not open `nvim` I want to use `less` as **pager**.
This makes it possible to use `man -- <page>` as 'hack' to view the page
in `less` for example if a real pager is desired because of the loading
time (e.g. `zshall`).
Kill the ssh-agent only if it was created in this session.
Like that the login shell can inherit SSH_AGENT_PID without it killing
the agent at the end. For this to work properly it is important that
LAUNCHED_SSH_AGENT is not exported, otherwise nested login shells will
mess with each other.
On system where my dotfiles are only partially installed (e.g. only
the shell) for the environment variables defined in the zprofile to take
affect, every terminal instance needs to execute zsh a login-shell.
This lead to numerous instances of the ssh-agent that were not killed
when exiting the shell. As I still need the correct env-vars like
SSH_AGENT_PID in every shell I cannot just pgrep and execute the agent
respectively.
This adds a zlogout that kills the agent spawned in the current shell.
It also stops `exec`ing `startx` as then the zlogout is not read.
Move every file from plugins into zshrc.d as well as all bigger blobs in
the zshrc into their own files there.
Some stuff is still in there that I am not all too sure where it
belongs. TODO: Move.
Because all external plugins are now sourced over a symlink I had to
create a fork of fzf-tab for now that supports that.
See: https://github.com/Aloxaf/fzf-tab/pull/153
Add FZF_DEFAULT_COMMAND that displays hidden files as well, but ignores
.git directories.
Add :Files mapping in vim. Because it is bound to <leader>f, the leader
key mapping had to be moved to the top of the file.
Use tabs instead of spaces per default. (VSCodium will still respect the
indentation used in the file)
Stop vscode from writing files in HOME.
Since only the settings.json is versioned in this repo but the full
folder is symlinked: Ignore all other files that will be written.
(TODO: Only symlink file)
Use an environment variable and a wgetrc instead of an alias for wget to
enforce the XDG Base Directory Specification so that script calls
respect it too.
Move all environment variables that do not relate directly to zsh but
(in most cases) enforce the XDG Base Directory specification to
zprofile.
This way they are just exported once on login and not every time the
shell starts again.
Move the lines in zshenv that are not directly responsible for moving
the zsh files into $XDG_CONFIG_HOME to their own zshenv there.