1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-22 11:41:39 +01:00
Go to file
bretello cff20cef16
Revert "vim: ale: try using deoplete for completion"
This reverts commit bfad3b2a4c.
deoplete requires pynvim to be always available.
This is annoying when using virtualenvs or pynvim is not available.
2023-09-22 18:21:56 +02:00
aliases zsh: move git aliases to its own file, add glsu (git ls untracked) 2023-01-12 12:46:09 +01:00
ansible ansible: update brethil dotfiles mark 2023-09-14 23:30:31 +02:00
dev dev: update makefile with release target, update docs 2020-12-09 00:14:14 +01:00
extras add extras folder 2023-09-15 00:35:36 +02:00
functions zsh: add tracing module 2023-09-15 00:33:46 +02:00
ipython/profile_default ipython: make config saner 2023-09-15 10:23:01 +02:00
themes zsh: theme: do not increase shell level when using tmux 2023-07-27 12:01:26 +02:00
vim Revert "vim: ale: try using deoplete for completion" 2023-09-22 18:21:56 +02:00
.dockerignore update dockerignore 2022-04-02 19:58:52 +02:00
.drone.yml add drone CI 2022-02-07 23:44:19 +01:00
.git-blame-ignore-revs add git-blame-ignore-revs 2021-04-05 18:12:50 +02:00
.gitignore update selfupdate mechanism 2020-12-08 15:20:42 +01:00
antibody_plugins.txt zsh: remove duplicate grc omz plugin 2023-06-23 20:10:42 +02:00
brethil_dotfile.sh zsh: fix FZF_CTRL_T_COMMAND 2023-09-15 11:33:53 +02:00
colors.zsh zsh: add UNDERLINE to colors 2022-03-26 16:43:46 +01:00
completion_style.zsh zsh: add completion style 2021-10-07 20:34:53 +02:00
Dockerfile Docker: improvements 2022-02-07 21:10:44 +01:00
gitconfig gitconfig: formatting 2023-09-15 10:23:01 +02:00
gitignore ignore: add .vagrant dirs 2022-02-07 21:09:51 +01:00
pdbrc.py pdbrc: add support from THEME_PREFER_LIGHT env variable 2023-09-14 22:40:49 +02:00
README.md cleanup 2021-10-10 12:41:21 +02:00
tmux.conf tmux: add bind C customize-mode for quick customize-mode access 2023-07-26 00:06:27 +02:00
useful_commands useful_commands: add dbus introspection 2023-09-14 23:30:30 +02:00

brethil's dotfiles

A set of zsh dotfiles based on antibody and oh-my-zsh

Description

├── README.md
├──────── Main files ────────
│ ├── aliases.zsh
│ │     └── aliases definitions (sources `~/.dotfiles_aliases`)
│ ├── colors.zsh
│ │     └── ANSI color escapes
│ ├── functions.zsh
│ │     └── contains function definitions (sources `~/.dotfiles_functions`)
│ ├── ansible
│ │     └── ansible playboooks/config
│ └── brethil_dotfile.sh:
│       └── This file should be sourced by your `.zshrc`
├──────── antibody plugins ────────
│ ├── antibody_plugins_arch.txt
│ └── antibody_plugins.txt
├──────── oh-my-zsh themes ────────
│ ├── brethil.zsh-theme
│ └── brethil-minimal.zsh-theme
├──────── Misc rc files────────
│ ├── gitconfig
│ │     └── git configuration
│ ├── ipython
│ │     ├── profile_default
│ │     ├── ipython_config.py
│ │     ├── startup
│ │     ├── 11-autoreload.py
│ │     └── README
│ ├── vim
│ │    ├── vimrc
│ │    │ └── main vim rc
│ │    ├── plugs.vim
│ │    │ └── plugins to be installed with vim-plug
│ │    ├── plugins_config.vim
│ │    │ └── plugins configuration
│ │    ├── shortcuts.vim
│ │    │ └── vim shortcuts definitions
│ │    ├── functions.vim
│ │    │ └── miscellaneous vim function
│ │    └── twilight256.vim
│ │      └── an old colorscheme
│ └── pdbrc.py
│      └── pdb++ rc (a drop-in replacement for pdb)
├──────── Other ─────────────
├── check_for_update.sh
│      └── selfupdate script
└── useful_commands

Installation

  • With ansible:

    bash dev/add_community.general.sh # only if community.general is not installed
    ansible-playbook -v -i <hosts file> ansible/playbooks/setup.yml
    

    This playbook can be tested with a docker container

    Use -e fix_annoyances=true to fix some small annoyances (only run once)

  • Manually (this only installs the zsh configuration):

    git clone https://git.decapod.one/brethil/dotfiles ~/.dotfiles
    echo 'DOTFILES=~/.dotfiles' >> ~/.zshrc
    echo 'source $DOTFILES/brethil_dotfile.sh'
    

A self-update mechanism is included. It asks for confirmation to pull the latest changes from the git repo every two weeks. This also updates the git-sourced repositories installed by the install script. The self-update routine can be called manually by calling

dotfiles_selfupdate

If you do not want to run the installer script, you can just add source brethil_dotfile.sh in your .zshrc. This requires antibody installed.

Available Functions

  1. cheat: show cheat sheet for commands using cheat.sh (cheat <commandname>)

  2. Quickly edit/reload profile (esource/resource)

  3. dockertags list all tags for a given docker image

  4. color to print colored text (see 3. in the Misc section):

    color $Red "This will be printed in red"
    color $Yellow "This will be printed in red"
    
  5. git fixup (git-fixup) to create a fixup command and immediately rebase it

  6. Many more. Use list_functions to list defined functions and a small description

Files/Folders

  1. ~/bin, ~/git, ~/projects folders
  2. ssh config (~/.ssh/config):
    • Create ssh keys if not defined already
    • Keep connections alive by increasing timeout time
    • Include multiplexer to allow quick multiple connections to the same host
    • (Optional: Compression, this should allow more responsive shells with slow connections, but will slow things down when copying large files. My suggestion is to have compression enabled on a by-host basis in ~/.ssh/config)
  3. brethil.zsh-theme, brethil-minimal.zsh-themes, themes for oh-my-zsh.
  4. ~/.dotfiles_functions, ~/.dotfiles_aliases are sourced by this dotfiles, allowing for custom functions/aliases
  5. useful_commands contains a list of useful commands (the first rule of the tautology club...)

Misc

  1. Colored output (via grc) for several commands.

  2. Easy names for ANSI color escapes (Black, Red, Green, Yellow, Blue, Cyan, Purple, White, CLEAR), for example:

    echo -e "${Green}This text will be green${CLEAR}"
    

    will result in green text. Use $CLEAR to clear previous escape sequences add B before the variable (check colors.sh) name to use bold and U to underline (examples: $BRed, $UBlack for bold red and underlined black)

  3. Autoupdate script running every two weeks, autoupdate function: dotfiles_selfupdate (or git pull from $DOTFILESfolder)

  4. Automatic fix of theSSH_AUTH_SOCKenvironment variable:~/.ssh/rc is installed run on every ssh login, and updates a symlink pointing (~/.ssh/ssh_auth_sock). SSH_AUTH_SOCKpoints to this (set inbrethil_dotfile.sh). The idea is that if the user is logging in using ssh -A, and using tmux, it will be possible to use the remote socket over different sessions by always using the symlink.