Git Product home page Git Product logo

dotfiles's Introduction

Dotfiles for user profile

background

It uses the following:

  • Window Manager: i3
  • Linux terminal: terminator/kitty/tilix
  • Editor: vim/neovim + plugins
  • Shell: zsh + oh-my-zsh

Install Dependencies/Packages

Install with Ansible Playbooks

Check this for some Ansible Playbooks you can use to install all the utilities.

Playbooks that you should run:

  • base_utils.yml
  • i3wm.yml

Install Manually

# Install Utilities
sudo apt-get update
sudo apt install -y imagemagick tree curl wget git unzip apt-file mc curl \
  exuberant-ctags ack-grep silversearcher-ag ripgrep golang ca-certificates \
  gnupg traceroute net-tools salt-minion

# npm
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update && sudo apt-get install nodejs -y

# Install i3 Window Manager
sudo apt install -y i3 i3blocks i3lock i3lock-fancy i3status xautolock conky feh rofi \
  gnome-control-center gnome-screensaver scrot pulseaudio-utils xbacklight

# Install zsh
sudo apt install -y zsh zsh-syntax-highlighting ttf-ancient-fonts fonts-powerline fonts-font-awesome

# Install terminal emulators
sudo apt install -y terminator tilix tmux
# tilix VTE: https://gnunn1.github.io/tilix-web/manual/vteconfig/
sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh

# Install Vim and plugin dependencies
sudo apt install -y vim
sudo apt install -y python3-pip exuberant-ctags ack-grep silversearcher-ag

## Install neovim
sudo apt install -y neovim

# Install the following linters/fixers
pip install --user pynvim flake8 pylint isort yamllint ansible-lint jedi \
  autopep8 yapf docformatter proselint saws autorandr virtualenvwrapper pre-commit

sudo npm install --global eslint eslint-plugin-vue yarn

# Terraform tflint
# https://github.com/terraform-linters/tflint
curl -L "$(curl -Ls https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" -o tflint.zip && unzip tflint.zip && rm tflint.zip
sudo mv tflint /usr/local/bin

# Install kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

Install dotfiles

The following method describes how you can use Git to keep track of your dotfiles.

Start your repository from scratch

git init --bare $HOME/.dotfiles
alias gitdotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
gitdotfiles config --local status.showUntrackedFiles no
echo "alias gitdotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc

Install your dotfiles onto a new system (or migrate to this setup)

Install and configure dependencies

# oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

# oh-my-zsh bullet-train theme
cd ~/.oh-my-zsh/themes/
curl -O https://raw.githubusercontent.com/caiogondim/bullet-train-oh-my-zsh-theme/master/bullet-train.zsh-theme
cd

# oh-my-zsh powerlevel10k theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

# zsh-autosuggestions plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

chsh -s $(which zsh)

Clone repository

cd
alias gitdotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
echo ".dotfiles" >> $HOME/.gitignore
git clone --bare https://github.com/bcochofel/dotfiles.git $HOME/.dotfiles
alias gitdotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
mkdir -p ~/.config-backup
gitdotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} ~/.config-backup/{}
gitdotfiles checkout
gitdotfiles config --local status.showUntrackedFiles no
gitdotfiles status

Additional configuration

# update ttf fonts cache
fc-cache -f -v

# choose default terminal
sudo update-alternatives --set x-terminal-emulator /usr/bin/terminator

# install tmux plugins
tmux start-server
tmux new-session -d
~/.tmux/plugins/tpm/scripts/install_plugins.sh
tmux kill-server

# kubectx and kubens
mkdir -p ~/.oh-my-zsh/completions
chmod -R 755 ~/.oh-my-zsh/completions
ln -s ~/bin/kubectx.zsh ~/.oh-my-zsh/completions/_kubectx.zsh
ln -s ~/bin/kubens.zsh ~/.oh-my-zsh/completions/_kubens.zsh

# create symbolic link for neovim config
mkdir -p ~/.config/nvim
ln -s ~/.vimrc ~/.config/nvim/init.vim

Gnome Keyring

To configure Gnome Keyring for i3 follow this

Plugin Manager

Install Vim-Plug

vim-plug

Install Vundle

Vundle

Useful plugins

Look & Feel

Utilities

General Programming

GIT

Tmux

Markdown

Terraform

Ansible

References

dotfiles's People

Contributors

bcochofel avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.