Skip to content

Just some random nerd's dotfiles

Notifications You must be signed in to change notification settings

carlfriedrich/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

These dotfiles are managed with rcm. The repository contains configuration files as well as binaries of used helper tools (including rcm itself) in order to reduce dependencies and make installation easy.

Initial setup

Run the following commands to install the dotfiles on a new machine:

git clone https://github.com/carlfriedrich/dotfiles.git ~/.dotfiles
RCRC=~/.dotfiles/rcrc PATH=~/.dotfiles/local/bin/:${PATH} ~/.dotfiles/local/bin/rcup -v
exec bash -l

Contained tools

The following tools are contained in these dotfiles in binary or script form:

  • bat
    A cat clone with syntax highlighting, Git integration and line numbering

  • diff-so-fancy
    Beautiful human readable diffs

  • exa
    A modern replacement for ls with colours, icons and Git status

  • fd
    User-friendly alternative to find

  • forgit
    fzf integration for Git

  • fzf
    A general-purpose command-line fuzzy finder

  • jless
    A command-line JSON viewer

  • kubectx
    Power tools for kubectl

  • navi
    Interactive cheatsheet tool

  • print256colours
    Print all 256 colours to the terminal

  • rcm
    Tool for dotfiles management

  • ripgrep
    Fast and user-friendly grep alternative

  • sd
    Intuitive find & replace CLI, replacement for sed

  • starship
    Minimal, fast and infinitely customizable prompt

  • vscode-updateenv
    Make VS Code work in screen sessions

  • zoxide
    A cd replacement to quickly jump into recently used directories

Contained configuration

Here is a list of tools that these dotfiles contain configuration for:

Keybindings

These dotfiles come with a set of preconfigured bash keybindings:

  • Interactive History search Ctrl+R
    Opens an fzf window containing the bash history to interactively search for previously executed commands. Press Enter to select a command and insert it into your promt.

  • Interactive file search Ctrl+T
    Opens an fzf window containing all files within the current directory and its subdirectories. Press Enter to select a file and insert it into your prompt.

  • Interactive find in files Ctrl+F
    Opens an fzf window executing a ripgrep search in the current directory using the entered search string. Press Enter to open the file in your default editor. Press Alt+Enter to open it without closing the fzf window.

  • Interactive git log Ctrl+G
    Runs git forgit for interactive git history.

  • Interactive cheat sheet Ctrl+Space
    Opens navi for interactive selection of configured cheat sheets.

Dotfile management

Standard rcm commands

There are two essential commands from the rcm package that are used for managing the dotfiles:

  • mkrc
    Add a new file to the dotfiles directory. This should be called whenever a dotfile shall be put under version control. Example:

    carl@desktop:~$ mkrc .myconfig
    Moving...
    '/home/carl/.myconfig' -> '/home/carl/.dotfiles/myconfig'
    Linking...
    '/home/carl/.dotfiles/myconfig' -> '/home/carl/.myconfig'

    Aftwards the new dotfile can be added and committed to git within the ~/.dotfiles directory.

  • rcup
    Update dotfiles. This should be called after pulling changes from the upstream git repository in order to have them applied locally. Example:

    carl@desktop:~$ rcup
    identical /home/carl/.bash_aliases
    identical /home/carl/.bash_completion
    identical /home/carl/.bashrc
    '/home/carl/.dotfiles/myconfig' -> '/home/carl/.myconfig'

Helper scripts

To make the handling of the dotfiles even easier, there are a few custom helper scripts in this repository:

  • sbrc
    Alias for source ~/.bashrc. This should be called after pulling upstream changes in order to reload the .bashrc file for the current shell.

  • rcbl
    Searches for broken links to dotfiles in your home directory and lists them. This should be called after rcup if any dotfiles have been moved, removed or renamed upstream.

  • rcbld
    Deletes broken links to dotfiles in your home directory. This should be called if rcbl reports broken links due to moved, removed or renamed dotfiles.

  • dv Displays the dotfiles version using git describe.

Local customization

Extensions to .bashrc and .gitconfig that shall not be under version control can be configured in ~/.bashrc_local and ~/.gitconfig_local, respectively. These files will automatically be loaded if they exist.