Skip to content

wesmarcum/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 _______   ______   .___________. _______  __   __       _______     _______.
|       \ /  __  \  |           ||   ____||  | |  |     |   ____|   /       |
|  .--.  |  |  |  | `---|  |----`|  |__   |  | |  |     |  |__     |   (----`
|  |  |  |  |  |  |     |  |     |   __|  |  | |  |     |   __|     \   \    
|  '--'  |  `--'  |     |  |     |  |     |  | |  `----.|  |____.----)   |   
|_______/ \______/      |__|     |__|     |__| |_______||_______|_______/    
                                                                             

This repo tracks my configuration files for tmux, vim/neovim, and zsh. A script (install.sh) is provided for easy installation of the tools, recommended packages, and linking files from your home directory.

Install

git clone https://github.com/wesmarcum/dotfiles ~/dotfiles
cd ~/dotfiles
./install.sh

The install script will do the following:

  • Install curl, git, tmux, vim/neovim, zsh
  • Optionally install recommended tools
  • Set your default shell to zsh
  • Link all files from your home directory to ~/dotfiles

Manual

If you would like to manually install packages, use your package manager to install what you need. You can then link each file manually (e.g. ln -s ~/dotfiles/zsh/zshenv ~/.zshenv).

Configuration

Alacritty

Alacritty configuration is provided in ~/dotfiles/alacritty/alacritty.toml. If Alacritty is installed, install.sh will link ~/.config/alacritty/alacritty.toml to the location in ~/dotfiles. This configuration file will optionally import ~/.config/alacritty/local.toml. The local.toml file can be used to set system specific settings, such as fonts.

Note: Starting with version v0.13.0, Alacritty uses TOML for configuration. YAML configuration is still provided for older versions, but may require manual linking.

Delta

Delta configuration is located in ~/dotfiles/delta/git-delta. This package currently requires manual installation. If you wish to use the configuration provided, use an include directive in your .gitconfig:

[include]
    path = ~/dotfiles/delta/git-delta

Neovim

The install script will link ~/.config/nvim to ~/dotfiles/nvim. This directory provides configuration files based on LazyVim. OneDark is set as the default colorscheme. Configuration files can be found in ~/dotfiles/nvim/lua/config. The config folder sets global options, including keymaps. Plugin options are located in ~/dotfiles/nvim/lua/plugins.

tmux

tmux.conf sets keybindings to vim for movement and copy/paste. C-a (Ctrl-a) is mapped to the prefix, instead of C-b. Mouse mode is also enabled, so you can resize panes with your mouse. A simple, light weight status line is set at the bottom.

Vim

vimrc uses vim-plug to load plugins. The first time you launch vim, vim-plug will be auto installed. vim-plug will then automatically download plugins and themes. You can then use :PlugStatus to check the plugin status, :PlugUpdate to update plugins, or :PlugUpgrade to upgrade vim-plug. The colorscheme (theme) can be changed with the :colorscheme vim command.

Plugins:

Color schemes:

zsh

The install script will link .zshenv in your home directory to ~/dotfiles/zsh/zshenv. The zshenv file will set the $ZDOTDIR variable to ~/dotfiles/zsh. This allows zsh to find .zshrc on startup.

~/dotfiles/zsh/.zshrc loads files in the ~/dotfiles/zsh/rc.d directory for a modular configuration:

  • 01-hist.zsh (set history file location and options)
  • 02-dirs.zsh (directory options and named directories)
  • 03-znap.zsh (install/load znap)
  • 04-env.zsh (environment variables, set path and fpath)
  • 05-plugins.zsh (sets theme options and loads plugins)
  • 06-opts.zsh (zsh options, zstyle options)
  • 07-keys.zsh (emacs/vi mode, general keybindings)
  • 08-commands.zsh (commands, functions, and aliases)
  • 09-cursor.zsh (set cursor for viins and vicmd)
  • 10-fzf.zsh (fzf options and environment variables)
  • 11-bat.zsh (bat options and environment variables)

znap is utilized for loading and managing plugins. znap will automatically download and load all plugins the first time you launch zsh. Plugins can then be updated with znap pull. Check plugin status with znap status.

OMZ Plugins:

Plugins:

The prompt/theme is set in the ~/dotfiles/zsh/conf/theme file. If theme does not exist, the default theme will be set to starship. To change the theme, just set the theme variable to a git repo. The repo can be in short form (assumed github) or a full URL. The syntax for OMZ is a little different: you need to use ohmyzsh/ohmyzsh <theme> syntax. Example theme files:

theme="starship/starship"
theme="ohmyzsh/ohmyzsh agnoster"

My favorite, and tested, themes:

The case statement in ~/dotfiles/zsh/rc.d/05-plugins.zsh will load different options for some of the themes. You can modify these options, or insert your own for your favorite theme.

Note: powerlevel10k has its own configuration stored in ~/.p10k.zsh. The first time you load powerlevel10k, it will run a configuration utility and generate this file. When prompted, do not write options to .zshrc. I also don't recommend using the "instant prompt" feature - znap has a similar feature. You can change options for powerlevel10k by running p10k configure or by editing ~/.p10k.zsh.

To use a proxy server, set proxy environment variables in ~/dotfiles/zsh/conf/proxy. This file is ignored by git to avoid exposing internal network information. Example proxy file:

# set proxy
export http_proxy="http://proxy.local.net:80"
export https_proxy="https://proxy.local.net:80"

Other zshrc features:

  • vi-ins mode is used by default, switch to vi-cmd with escape or jk.
  • ctrl + space to accept autosuggestion. alt + t to toggle suggestions on/off. You can also use forward word (alt + f) or back word (alt + b) for auto accept.
  • Set default editor to neovim or vim.
  • Set global aliases.
  • Add common dirs to path.
  • Autocomplete configuration and custom styling.
  • Functions are included in ~/dotfiles/zsh/functions
  • Bat integration.
  • fzf / fd integration.

Recommended Tools

The configuration files are optimized for the following tools:

These tools are not required, but can be installed using the install.sh script.

Manual Install

The following packages may require manual install or configuration:

Configuration files are provided for these packages and will be linked using install.sh if they are installed.