Skip to content

gianlucatruda/dotfiles

Repository files navigation

Gianluca's dotfiles

I forked Mathias's dotfiles in 2017 and I've been heavily tuning and personalising mine since then.

My stack:

  • Bash as shell
  • Tmux for multiplexing
  • Neovim as primary editor, based off Kickstart.nvim
  • Vim (with lean .vimrc, no plugins) as fallback editor
  • Alacritty as terminal
  • Homebrew as package manager
  • Karabiner for key modifiers and custom keybindings
  • Aerospace as (tiling) window manager (with tweaks)
SCR-20250404-pesw SCR-20250404-pfzx SCR-20250404-pfxu

Installation

With Git:

git clone --depth 5 [email protected]:gianlucatruda/dotfiles.git <your/dotfiles/path/>

(I suggest ~/dotfiles for the path)

Or with curl:

curl -L -o dotfiles-master.zip https://github.com/gianlucatruda/dotfiles/archive/master.zip
unzip dotfiles-master.zip
cd dotfiles-master

System agnostic bootstrap

From within the dotfiles directory:

source bootstrap.sh

Create the ~/.config/.extra file:

echo "" >> ~/.config/.extra

Add the following details (and any other system-wide variables):

# Git credentials
GIT_AUTHOR_NAME="Your Name"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="[email protected]"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.name "$GIT_AUTHOR_NAME"
git config --global user.email "$GIT_AUTHOR_EMAIL"
git config --global commit.gpgsign true
git config --global user.signingkey <signing key>

Then load up by running reload, which is an alias for:

exec $SHELL -l

Mac-specific setup

Configure some macOS preferences:

./macos.sh

Install packages with Homebrew:

./brew.sh

Keeping homebrew synced with dotfiles

Update the dotfiles repo from the system:

cd <your-dotfiles-repo>
brew bundle dump --all --describe --force --file .config/homebrew/Brewfile

Update the system from the dotfiles repo:

cd <your-dotfiles-repo>
source bootstrap.sh 
brew bundle install -v --cleanup --force --file ~/.config/homebrew/Brewfile

Note: you can also install, cleanup, upgrade in steps:

brew bundle install --no-upgrade --file ~/.config/homebrew/Brewfile
brew bundle cleanup --force --file ~/.config/homebrew/Brewfile
brew bundle install --file ~/.config/homebrew/Brewfile

Apps to manually install for my workflows

  • shottr
  • toothfairy
  • brave-browser
  • handbrake
  • iina
  • obs
  • anki
  • obsidian
  • spotify
  • tad (looking for nice TUI alt.)
  • todoist

Overview

Font and colour

Structure

Generate with:

tree -a -L 3 --gitignore -I .git/ -I .gitignore -I README.md
.
├── .bash_profile
├── .bashrc
├── .config
│   ├── .aliases
│   ├── .bash_prompt
│   ├── .exports
│   ├── .functions
│   ├── .inputrc
│   ├── .path
│   ├── aerospace
│   │   └── aerospace.toml
│   ├── alacritty.toml
│   ├── git
│   │   └── config
│   ├── homebrew
│   │   └── Brewfile
│   ├── htop
│   │   └── htoprc
│   ├── karabiner
│   │   ├── assets
│   │   ├── complex_modifications
│   │   └── karabiner.json
│   ├── lf
│   │   ├── colors
│   │   ├── icons
│   │   └── lfrc
│   ├── nvim
│   │   ├── init.lua
│   │   └── lua
│   └── tmux
│       └── tmux.conf
├── .gitignore_global
├── .vimrc
├── bootstrap.sh
├── brew.sh
├── macos.sh
└── scripts
    ├── gt-btooth
    ├── gt-cheat
    ├── gt-scan
    ├── gt-stt
    ├── gt-sync-obsidian
    ├── gt-synchdd
    ├── gt-todoist-export
    └── gt-tts

14 directories, 32 files

Bash functions

  • v(): Opens the current directory or a specified directory in neovim if available, otherwise uses vi.
  • sf(): Searches for text-readable, non-hidden files (or all files including hidden with -a flag, excluding .git) in the current directory using rg and fzf, then opens the selected file in Vim.
  • sd(): Searches directories using fzf and changes to the selected directory, excluding paths containing .git.
  • update_environment_from_tmumx(): Updates the environment variables in tmux if running inside a tmux session.
  • mkd(): Creates a new directory (and any necessary parent directories) then changes into it.
  • fs(): Displays the size of a file or total size of a directory using du, presenting results in human-readable form.
  • Built-in Overridden diff(): Uses Git’s colored diff functionality when Git is installed, otherwise falls back to standard behavior.
  • unidecode(): Decodes Unicode escape sequences in the format \x{ABCD} and outputs them.
  • o(): Opens the current directory or a specified file/directory with the default system application.
  • tre(): Runs the tree command showing hidden files and colorizing the output (ignoring .git, node_modules, and bower_components directories) and pipes the results to less with options to keep colors and line numbers.

Neovim setup

.config/nvim/
├── init.lua
└── lua
    ├── core
    │   ├── keymaps.lua
    │   ├── options.lua
    │   └── plugins.lua
    └── plugin_config
        ├── cmp.lua
        ├── colourscheme.lua
        ├── gitsigns.lua
        ├── ibl.lua
        ├── init.lua
        ├── lsp.lua
        ├── lualine.lua
        ├── neodev.lua
        ├── telescope.lua
        └── treesitter.lua

4 directories, 14 files

About

My custom dotfiles for daily-driving macOS via CLI.

Resources

Stars

Watchers

Forks

Contributors 107