/dotfiles

Ansible driven dotfiles.

Primary LanguageLua

This is mine Ansible driven dotfiles. I use them on Ubuntu and Fedora. To install them, clone this repo and run ./setup from the root of this repo.

But I don't recommend installing them direct with install script: they are tailored for me and constantly changing. Instead, you can use them as inspiration.

zsh

Environment variables are in the .zprofile file.

Login shell settings are in .zshrc file. I use zsh-snap plugin mamager with powerlevel10k prompt theme framework.

In .zlogin file is a code, that byte-compiles into a background all zsh scripts. All custom zsh functions are compiles into single library file. Binary files automatically recompiles when source code changes.

zsh plugins

completion

I simluteniously use built-in zsh completion along with fzf-tab plugin and switch thwm in place with a Shift + Tab keymap (search completion-switch in zshrc file).

compsys fzf-tab

vi mode

For better Vi mode emulating in zsh prompt I use zsh-vi-mode.

fzf

I use custom CTRL-T command: it returns the selected file with absolute path relevant to home directory, if the file is inside home directory, and relative to root in other cases, instead of returning relative path to present directory as CTRL-T does by default.

man

The man binary is replaced with the wrapper function. Along with MANWIDTH env variables, wraps manuals content into 80 character column and center it in a terminal.

Installing CLI tools

Not all packages are present in the Ubuntu repositories, and those that are present often are outdated and I like to use the lates programs versions. So I come to a platform independent way: Most of the CLI utils that I use: fzf, zoxide, exa, rg, etc, I install directly from github releases with bin binary manager. See install_missing_programs file.

To install completion files for such programs without clonning the whole repo and symlink targer files, I download them directly from github repos with curl. See github_completion file.

tmux

In Ubuntu repos tmux is outdated and I use the floating window feature, so I make build-tmux task that compiles tmux from source.

keybindings

For convenience I rebind some keys using dual function keys (see dual-function-keys role):

  • Caps Lock to Esc on tap, and to Ctrl when another key pressed while holding Caps Lock;

  • Space to Space on tap and to Ctrl on hold;

  • Left and right Shift-s to ( and ) on tap correspondingly, and to Shift on hold.

neovim

I'm a big fun of Neovim and my Neovim config is a whole big story.