Skip to content

Dotfiles of a vim + tmux + bash setup. Managed with GNU Stow.

Notifications You must be signed in to change notification settings

pinealan/dotfiles

Repository files navigation

Dotfiles - Alan Chan

These dotfiles are organised to be managed with GNU stow. Here's my short summary of stow, inspired by the stow homepage description:

GNU Stow is a symlink manager that uses symlinks to make files appear from the source package directory appear to be installed at the destination.

Installation

Stow does not come pre-installed with most distribution. On debian systems, install it with the command:

sudo apt install stow

Clone this repository at your home folder and start stowing away

cd ~
git clone https://github.com/pinealan/dotfiles
cd dotfiles
stow bash

Packages config

Cross-posix shell setup TL;DR

Call graph:

.bash_profile -> .profile
.bash_profile -> .bashrc
.bashrc       -> .local/bashrc
.bashrc       -> .local/bash_plugins

.zshenv       -> .profile
.zshrc        -> .local/zshrc

.profile      -> .local/profile

Bash

Contains .profile, .bashrc. These sets up PATH environment variables, tmux integration, and various bash configurations.

~/.local/.profile and ~/.local/.bashrc will be sourced if they exist. These are for machine specific configs or aliases, and should not be committed to this repo.

All files in directory ~/.local/bash_plugins/ will be sourced by bash. This is used by the bashgit plugin that adds a git prompt to bash.

The following is the complete order in which bash scripts are source. Later scripts inherit and can override the environment set up by earlier scripts.

.profile
.local/profile
.bashrc
.local/bashrc
.local/bash_plugins/*

Bashgit

A heavily stripped down and styled version of bash-git-prompt. This version supports only bash and does not support switching themes.

Conky

The conky config is heavily machine dependent since it requires various hardware IDs to report on their status such as IO and Networking. The defaults are set to work on an XPS15 9750.

Notably, here are things you might want to change:

  • CPU/GPU numbers (line 61-64)
  • Filesystems (line 80-81)
  • WiFi (line 85-89)
  • Ethernet (line 90-94)

Git

Mainly provides aliases for common git commands like commit, branch, log. Configures a global core.excludesfile at ~/.gitignore_global.

Remember to change the user name, email, and github (or other git hosting services) account.

Tmux

Mainly color settings and shortcut re-bindings including changing the prefix key to Ctrl-A from Ctrl-B. Adds tmux-resurrect which is a plugin that allows save and restore of tmux sessions on an instance of the tmux server.

Vim

Vim packages are managed with vim-plug. The script plug.vim comes with the dotfiles and is in "autoload/" directory. To install the plugins simply run on your terminal

vim +PlugInstall

YouCompleteMe

For code-completion, these config uses YouCompleteMe as plugin, which might require additional steps to setup compiled components. Instructions can be found on the YCM Github README.

Migrate from vundle

To migrate existing vundle setups, you may use the provided vim/.vim/migrate-vundle-plug script to clean up old bunlde directory and install the plugins with vim-plug. Note that you will have to re-install YouCompleteMe in plugged/YouoCompleteMe after the migration.

Cinnamon

This directory has only one file desktop-keybindings.dconf. This is not meant to be stowed. These are portable key bindings that can be imported using dconf. See arch wiki or [cinnamon wiki(https://github.com/linuxmint/Cinnamon/wiki/Backing-up-and-restoring-your-cinnamon-settings-(dconf))

About

Dotfiles of a vim + tmux + bash setup. Managed with GNU Stow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published