- Notifications
You must be signed in to change notification settings - Fork12
Personal configuration for zsh, vim, tmux and other tools
License
z0rc/dotfiles
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains tools and configurations I use in the shell. Itincludes no graphical configurations, making it usable on servers and personalworkstations. It has been battle-tested on macOS and various Linuxdistributions, including Debian, Ubuntu, CentOS, and even WSL.
I'm a big fan of theXDG Base DirectorySpecificationand organize my dotfiles in a way that they don't clutter the$HOME
directory. I have reduced the files required in$HOME
to a single.zshenv
;everything else goes under standard XDG paths or is launched via aliases.Additionally, if you have root permissions, you can install dotfiles withzerohome presence.
- Extensive Zshconfiguration andplugins, including:
- Vimconfiguration andplugins
- Neovimconfiguration andplugins
- Tmuxconfiguration andplugins
- Other configurations:
- Handyutilities, including:
- fzf
- spark to draw bar charts right in the console
- diff-so-fancy for a much better git diff layout
- git-extras additional helpers for Git
- Environment wrappers for multiple programming languages:
Warning
I'm in process on switching to Neovim. Vim configuration isn't maintainedanymore, might be removed in future.
zsh
version 5.9 or newer is strongly recommendedgit
all external components are added as git submodules
make
(optional: required to install git helpers)perl
(optional: used by diff-so-fancy)fd
(optional: will be used in fzf bydefault, if present)rg
orag
(optional: will be usedin fzf by default, if present)bat
(optional: will be used in fzf bydefault, if present)
Dotfiles can be installed in any directory, but probably somewhere under$HOME
. Personally, I use$HOME/.local/dotfiles
. The installation is simple:
git clone https://github.com/z0rc/dotfiles.git"$HOME/.local/dotfiles"$HOME/.local/dotfiles/deploy.zshchsh -s /bin/zsh
Thedeployment script helps set up all required symlinks afterthe initial clone. It also adds a cron job to pull updates every midnight andserves as a post-merge git hook, so you don't have to worry about updatingsubmodules after a successful pull.
It's possible to install dotfiles without creating a~/.zshenv
symlink. To doso, set the environment variableZDOTDIR
to<installation dir>/zsh
, e.g.,$HOME/.local/dotfiles/zsh
. This variable should be set very early in the loginprocess, before zsh starts sourcing the user's.zshenv
. One possible option isto add:
export ZDOTDIR="$HOME/.local/dotfiles/zsh"
into/etc/zsh/zshenv
. Alternatively, you can set it with a PAM environmentmodule.
Neovim configuration is tested with latest released Neovim version only. At themoment of writing it's version 0.10.4.
Vim 9.1 or higher is required to support the XDG Base Directory Specification.To use all bundled vim plugins, install vim with Python and Ruby supportbuilt-in.
Update~/.config/git/local/user
with your email and name. It should look likethis:
[user]email = jdoe@example.comname = John Doe
You can also add additional configurations in~/.config/git/local/stuff
.
Note that Zsh configuration skips every global configuration file except/etc/zsh/zshenv
.
You can add your local configuration into$ZDOTDIR/env.d/9[0-9]_*
and$ZDOTDIR/rc.d/9[0-9]_*
. The difference is thatenv.d
is sourced always,whilerc.d
is sourced only in interactive sessions.
Additionally,$ZDOTDIR/.zlogin
and$ZDOTDIR/.zlogout
are available formodifications, though they are missing by default.
Local configuration can be added to$DOTFILES/nvim/lua/local_options.lua
.It's loaded after default options, but before any plugin.
Add your local configuration to$DOTFILES/vim/vimrc.local
.
Local binaries can be placed in$HOME/.local/bin
; it's added toPATH
bydefault. Man pages can be placed in$XDG_DATA_HOME/man
.
Pyenv and similar wrappers are lazy-loaded, meaning they won't be initializedat shell start. Activation occurs on the first execution. Check the output oftype -f pyenv
in the shell and theimplementation. Because of this, files like.python-version
won't work as expected; it's recommended to useautoenv.zsh
to explicitly activate the needed environment.
Midnight Commander is quite volatile in terms of writing to its configurationfile. Runningmc
with different screen sizes results in updating the panelsize value inmc.ini
. The same goes forhtop
.
To ignore local changes to configuration files, you can do:
git update-index --assume-unchanged configs/mc.ini
To restore git tracking of those files, use:
git update-index --no-assume-unchanged configs/mc.ini
About
Personal configuration for zsh, vim, tmux and other tools