Skip to content

daviderestivo/dotfiles

Repository files navigation

dotfiles

License: GPL v3

This repository contains my personal dotfiles for macOS. With a few minor modifications, they can also be used on GNU/Linux.

Present software

Installation

Clone the repo

git clone --depth 1 https://github.com/daviderestivo/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
git submodule init
git submodule update
git submodule foreach --recursive git checkout master

Install required fonts

Intall DejaVuSansMono fonts: https://dejavu-fonts.github.io/Download.html Intall DejaVuSansMonoPowerline fonts: https://github.com/powerline/fonts/tree/master/DejaVuSansMono

Install cmake and compile tmux-mem-cpu-load

# Install cmake if not done before
brew install cmake

# Compile tmux-mem-cpu-load
cd  ~/.dotfiles/tmux/plugins/tmux-mem-cpu-load
cmake .
make

Install Emacs (only if interested in magit)

Emacs is required in order to use magit from console.

brew tap daviderestivo/emacs-head
brew install emacs-head@31 --with-cocoa

Magit

Install required packages

brew install bash bash-completion@2 ruby tmux \
    reattach-to-user-namespace midnight-commander \
    the_silver_searcher tmuxinator-completion coreutils \
    grep tree bat diffutils yazi ffmpeg sevenzip jq \
    poppler fd ripgrep fzf zoxide imagemagick \
    font-symbols-only-nerd-font

# Cowsay-ng (Optional)
brew tap daviderestivo/homebrew-cowsay-ng
brew install cowsay-ng

# Fortune-mod (Optional)
brew tap daviderestivo/fortune-mod
brew install fortune-mod --with-offensive --with-fortune-mod-it --with-fortune-mod-woody-allen-it

# Install terminals (you can choose between iTerm or tabby)
brew install --cask tabby iterm2@beta

# Install tmuxinator
gem install tmuxinator

Link the dotfiles

# Move to your homedir
cd ~

# Create directories
mkdir -p ~/bin
mkdir -p ~/.config/bat
mkdir -p ~/.config/mc
mkdir -p ~/.config/rtv

# Backup your current dotfiles
cp ~/.bash_profile ~/.bash_profile.orig
cp ~/.bashrc ~/.bashrc.orig
cp ~/.tmux.conf ~/.tmux.conf.orig
cp ~/.config/mc/ini ~/.config/mc/ini.orig
cp ~/.config/rtv/rtv.cfg ~/.config/rtv/rtv.cfg.orig
cp ~/.config/bat/config ~/.config/bat/config.orig
cp ~/Library/Application\ Support/tabby/config.yaml ~/Library/Application\ Support/tabby/config.yaml.orig

# Use the ones provided by this repo
cd ~
ln -sf ~/.dotfiles/bash_profile .bash_profile
ln -sf ~/.dotfiles/bashrc .bashrc
ln -sf ~/.dotfiles/bat/config .config/bat/config
ln -sf ~/.dotfiles/tmux/tmux.conf .tmux.conf
ln -sf ~/.dotfiles/mc/mc.ext .config/mc/mc.ext
ln -sf ~/.dotfiles/mc/ini .config/mc/ini
ln -sf ~/.dotfiles/rtv/rtv.cfg .config/rtv/rtv.cfg
ln -sf ~/.dotfiles/eless/eless ~/bin/eless
ln -sf ~/.dotfiles/edit/edit ~/bin/edit
ln -sf ~/.dotfiles/tabby/config.yaml ~/Library/Application\ Support/tabby/config.yaml
ln -sf ~/.dotfiles/yazi ~/.config/yazi

Configure iTerm2

Open iTerm2 settings and in the "General" section toggle "Load preferences from a custom folder or URL" and choose "~/.dotfiles/iterm2" as folder location.

Personalize your .bashrc

If you wish to add additional .bashrc related configurations/aliases you can simply create a new .bash_personal:

touch  ~/.bash_personal

and add them there.

Note for GNU/Linux users

  • Please comment out the below line in tmux.conf in case you run tmux in GNU/Linux:

    set -g default-command "reattach-to-user-namespace -l ${SHELL}"
  • Please use the standard mc.ext that comes with Midnight Commander