Skip to content

Yolo390/Dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

How I manage my dotfiles

Purpose

The idea is to keep all my dotfiles in the same folder.
In this way, I can easily manage it with git / github to install it in a new computer.

Moreover, I don't really like how Linux organize all dotfiles and apps installation. If you look into your $HOME folder, some of them are in ~/.config directory, others in their own folder, and others like .zshrc in the $HOME directly.

I use Ubuntu 22.04.1 LTS as an operating system.
I use i3 as a window manager.
I use TMUX as a terminal multiplexer.
I use NEOVIM as an editor.

My workflow is pretty basic and I tend to not use my mouse. Even in Firefox thanks to the Vimium extension !

So, in the end, I created a simple folder called Flo in my $HOME.
Inside it, there is my Dotfiles directory and all other folders I use every day. Everything is clean and my mind is in peace xD

To deal with that and keep my dotfiles in the same folder, I use stow, which is a symlink manager.

Here is the process if you want the same environment ! πŸš€


Development Environment

⚠️ January 2023 ⚠️
β–Ί only tested and approved on:

  • Ubuntu 22.04.1 LTS x86_64
  • Virtual Box VM - Ubuntu 22.04.1 LTS x86_64

At first, this repo was for my own usage but I tried to comment every step so you can follow my instructions and take inspiration from my repo 😊

I assume you start with a fresh installation of Ubuntu 22.04.1 LTS

I also assume you know basics of VIM like how to edit and save/quit 😝

Each step respect a specific order. Please respect same order !

The complete installation take around ~60 min depending power of the computer and your knowledges to understand what I am doing.


  1. Dependencies

    1. Folder structure
    2. Install packages
  2. Oh-my-zsh

  3. More dependencies

    1. Node.js via nvm
    2. Rust and Cargo
  4. Neovim

    1. First option: install and config Neovim from flo-neovim-install.sh
    2. Second option:
      1. Install from sources
      2. Neovim config
  5. Tmux

    1. Install from sources
    2. Tmux config
  6. zsh config

  7. Alacritty as terminal

  8. Hack Nerd Font

  9. Starship custom zsh prompt

  10. fzf

  11. Rofi

  12. Polybar

  13. I3wm as windows manager

  14. Btop

  15. Git

    1. Git config
    2. Git CZ
    3. GitUI
  16. Insomnia

  17. Notion

  18. MongoDB

    1. MongoDB
    2. MongoDB Compass
  19. Glow

  20. SSH

  21. ~/Flo/Dotfiles as git repo

  22. AppImageLauncher

  23. PrismaStudio

  24. Stow

  25. Troubleshooting



If you install Ubuntu with VirtualBox

Here is few more steps if you start a fresh Ubuntu install with VirtualBox.

Log in as root user.

su

Add your user to 'sudo' group. In my case, my user is called 'flo'.

sudo usermod -a -G sudo flo

Install sudo package

apt install sudo

If you still have an issue like you user is not in the sudoers file..., you need to add manually your user.

su
sudo visudo

Write this line just after Root ALL=(ALL:ALL) ALL.

flo ALL=(ALL:ALL) ALL

Close your terminal and re open-it.


Update/Upgrade packages, update snap packages and delete pre-install useless games, programs and tools.
You need to close Firefox first and run those commands.

sudo apt update && \
sudo apt upgrade -y && \
sudo snap refresh firefox snapd snapd-desktop-integration && \
sudo apt remove -y thunderbird rhythmbox simple-scan shotwell remmina libreoffice-impress libreoffice-draw cheese \
aisleriot gnome-sudoku gnome-mines gnome-mahjongg gnome-todo gnome-todo-common && \
sudo apt autoremove -y && \
sudo apt autoclean -y

You also need to update version of core and version of gnome by going to Ubuntu Software tool (aka Snap Store).

To update snap-store itself, you need to first kill his process, then run sudo snap refresh snap-store.




Create folder structure

mkdir ~/Flo ~/Flo/Dev ~/Flo/Downloads ~/Flo/Apps ~/Flo/Dotfiles && \
rm -rf ~/Desktop ~/Videos ~/Templates ~/Public ~/Pictures ~/Music ~/Downloads ~/Documents




Install dependencies

sudo apt update && \
sudo apt upgrade -y && \
sudo apt install -y git zsh zsh-syntax-highlighting curl i3 rofi compton \
tree ripgrep fd-find silversearcher-ag unzip bat python3-dev \
neofetch stow mlocate zoxide python3-pip libsqlite3-dev \
libssl-dev wget && \
sudo apt autoremove -y && \
sudo apt autoclean -y




OH-MY-ZSH - install

https://ohmyz.sh/#install

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Close terminal.
Logout then login.
Open terminal.


Create needed folder and files, install custom theme ys-flo.zsh-theme and install plugins zsh-autosuggestions and zsh-syntax-highlighting.
https://github.com/Flo-Slv/Dotfiles/blob/main/oh-my-zsh/ys-flo.zsh-theme
https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh
https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md

mkdir -p ~/Flo/Dotfiles/oh-my-zsh && \
wget -P ~/.oh-my-zsh/custom/themes https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/oh-my-zsh/ys-flo.zsh-theme && \
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
mv ~/.oh-my-zsh ~/Flo/Dotfiles/oh-my-zsh && \
cd ~/Flo/Dotfiles && \
stow -t ~/ oh-my-zsh




NODE.JS via NVM - install

https://github.com/nvm-sh/nvm#installing-and-updating

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Close and re open terminal.

nvm install 18 && \
nvm install 16 && \
nvm use 18

Again, close and re open terminal.




RUST - install

https://www.rust-lang.org/tools/install

cd ~ && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Close and re open terminal.




First option: install and config NEOVIM from a bash script

WARNING: this script is not working anymore since I use Lazy.nvim as plugin manager ! Do not use it !!

https://github.com/Flo-Slv/Dotfiles/blob/main/flo-neovim-install.sh

I developed a script who will create the needed folder structure and install/config Neovim.

Warning: this script only run on Linux (sorry for users of Windows and Mac OS) and only if you have Node.js installed.

wget -P ~/ https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/flo-neovim-install.sh && \
chmod +x ~/flo-neovim-install.sh
cd ~ && ./flo-neovim-install.sh

Open packer.lua.

nvim ~/Flo/Dotfiles/neovim/lua/FloSlv/packer.lua

Then run this command: :PackerSync

Save and close: :wq

Re open packer.lua

nvim ~/Flo/Dotfiles/neovim/lua/FloSlv/packer.lua

And wait for LSP servers installation and Treesitter parsers installation.

You have to run :Mason to be sure that every LSP server is correctly installed.

You can also run :TSUpdate to be sure that every Treesitter parsers is installed.




Second option: NEOVIM - install from sources

https://github.com/neovim/neovim/wiki/Building-Neovim

  1. Install dependencies
cd ~ && \
sudo apt install -y ninja-build gettext libtool libtool-bin autoconf python3-dev \
automake cmake g++ pkg-config doxygen libicu-dev libboost-all-dev libssl-dev \
ripgrep fd-find silversearcher-ag mlocate zoxide python3-pip libsqlite3-dev bat

  1. Clone Neovim repository
git clone -b release-0.9 https://github.com/neovim/neovim ~/Flo/Apps/Neovim

  1. Compile sources
cd ~/Flo/Apps/Neovim && \
make CMAKE_BUILD_TYPE=RelWithDebInfo && \
sudo make install




NEOVIM - config

  1. PYNVIM - install

https://github.com/neovim/pynvim
We need it for some Neovim's plugins.

cd ~ && \
pip3 install pynvim

  1. Create folders

IMPORTANT: Replace FloSlv by your user name.

mkdir ~/.config/nvim && \
mkdir -p ~/Flo/Dotfiles/neovim/lua && \
mkdir -p ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins && \
mkdir -p ~/Flo/Dotfiles/neovim/lua/FloSlv/core/undodir

  1. Add config

Create init.lua, stylua.toml, .luarc.json, lua/FloSlv/lazy.lua, lua/FloSlv/core/init.lua, lua/FloSlv/core/options.lua, lua/FloSlv/core/keymaps.lua, lua/FloSlv/core/utils.lua.
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/init.lua
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/stylua.toml
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/.luarc.json
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/lua/FloSlv/lazy.lua
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/lua/FloSlv/core/init.lua
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/lua/FloSlv/core/options.lua
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/lua/FloSlv/core/keymaps.lua
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/lua/FloSlv/core/utils.lua
https://github.com/Flo-Slv/Dotfiles/blob/main/neovim/lua/FloSlv/core/autocmds.lua

wget -P ~/Flo/Dotfiles/neovim https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/init.lua && \
wget -P ~/Flo/Dotfiles/neovim https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/stylua.toml && \
wget -P ~/Flo/Dotfiles/neovim https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/.luarc.json && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/lazy.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/core https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/core/init.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/core https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/core/options.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/core https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/core/keymaps.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/core https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/core/utils.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/core https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/core/autocmds.lua

  1. Set up all plugins
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/alpha.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/barbecue.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/colorful-winsep.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/colorscheme.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/comment.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/dressing.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/formatting.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/gitsigns.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/glance.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/glow.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/indent-blankline.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/linting.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/lsp.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/lualine.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/neogen.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/neorg.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/noice.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/none-ls.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nui.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-autopairs.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-cmp.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-colorizer.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-notify.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-surround.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-tmux-navigation.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-tree.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-treesitter.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-ufo.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/nvim-web-devicons.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/schemastore.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/tailwindcss-colorizer-cmp.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/telescope.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/tint.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/todo-comments.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/toggleterm.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/trouble.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/vim-fugitive.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/vim-rhubarb.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/which-key.lua && \
wget -P ~/Flo/Dotfiles/neovim/lua/FloSlv/plugins https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/neovim/lua/FloSlv/plugins/winshift.lua

  1. Node.js required packages

Check if you already have Tree-Sitter and Neovim node.js package installed.

npm list -g

If not, you can easily install it.

npm i -g tree-sitter-cli && \
npm i -g neovim

  1. Stow
cd ~/Flo/Dotfiles && \
stow -t ~/.config/nvim neovim

  1. Last step

Open Neovim and wait for installation of all languages parsers from Treesitter and all LSP servers from Mason.

nvim ~/Flo/Dotfiles/neovim/lua/FloSlv/lazy.lua

Then, run this command: :MasonToolsInstall in order to be sure that all linters and formatters are well installed.

Save and close: :wq

Re open Neovim.

nvim

You can run :Mason to be sure that every LSP server is correctly installed.

You can also run :TSUpdate to be sure that every Treesitter language parsers is installed.




TMUX - install from sources

  1. Update packages and remove existing Tmux package.
cd ~ && \
sudo apt update && \
sudo apt upgrade -y && \
sudo apt remove tmux && \
sudo apt autoremove -y && \
rm -rf .tmux

  1. Install prerequisite libraries
sudo apt install -y libevent-dev ncurses-dev build-essential bison

  1. Fetch Tmux from Git repo
git clone https://github.com/tmux/tmux.git ~/Flo/Apps/Tmux

  1. Compile sources
cd ~/Flo/Apps/Tmux && \
sh autogen.sh && \
./configure && \
make && \
sudo make install

  1. Check version of Tmux
tmux -V



TMUX - config

  1. Create .tmux and tmux-powerline-custom-themes folders.
mkdir -p ~/Flo/Dotfiles/tmux/.tmux && \
mkdir -p ~/Flo/Dotfiles/tmux/.tmux/tmux-powerline-custom-themes

  1. Clone TMUX Plugin Manager and TMUX Powerline.
git clone https://github.com/tmux-plugins/tpm ~/Flo/Dotfiles/tmux/.tmux/plugins/tpm && \
git clone https://github.com/erikw/tmux-powerline.git ~/Flo/Dotfiles/tmux/.tmux/plugins/tmux-powerline

  1. Fetch .tmux.conf, .tmux-powerlinerc and flo-theme.sh files from my GitHub repo.

https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/tmux/.tmux.conf
https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/tmux/.tmux.powerlinerc
https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/tmux/.tmux/tmux-powerline-custom-themes/flo-theme.sh

wget -P ~/Flo/Dotfiles/tmux https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/tmux/.tmux.conf && \
wget -P ~/Flo/Dotfiles/tmux https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/tmux/.tmux.powerlinerc && \
wget -P ~/Flo/Dotfiles/tmux/.tmux/tmux-powerline-custom-themes https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/tmux/.tmux/tmux-powerline-custom-themes/flo-theme.sh

  1. Add my custom flo-theme.sh as default.sh theme for tmux-powerline.
mv ~/Flo/Dotfiles/tmux/.tmux/plugins/tmux-powerline/themes/default.sh ~/Flo/Dotfiles/tmux/.tmux/plugins/tmux-powerline/themes/default.sh.old && \
ln -s ~/Flo/Dotfiles/tmux/.tmux/tmux-powerline-custom-themes/flo-theme.sh ~/Flo/Dotfiles/tmux/.tmux/plugins/tmux-powerline/themes/default.sh

  1. Stow
cd ~/Flo/Dotfiles && \
stow -t ~/ tmux

Close and re open terminal.


  1. Open .tmux.conf, install plugins and reload TMUX.
tmux
nvim ~/Flo/Dotfiles/tmux/.tmux.conf
# ctrl+z I to install plugins
# ctrl+z r to re source tmux
# Save/close

Close Tmux then close and re open terminal.




ZSH - config

Create .zshrc.
https://github.com/Flo-Slv/Dotfiles/blob/main/zsh/.zshrc

rm -rf ~/.zshrc && \
mkdir -p ~/Flo/Dotfiles/zsh && \
wget -P ~/Flo/Dotfiles/zsh https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/zsh/.zshrc && \
mv ~/.zshenv ~/Flo/Dotfiles/zsh && \
cd ~/Flo/Dotfiles && \
stow -t ~/ zsh

Close terminal and re open it.

PS: do not copy/paste if you don't understand. You need to adapt with your own aliases, tmux panes sizes etc...




Alacritty - install

https://github.com/alacritty/alacritty

Install

cd ~ && \
git clone https://github.com/alacritty/alacritty.git ~/Flo/Apps/Alacritty && \
rustup override set stable && \
rustup update stable && \
sudo apt install -y cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev python3 && \
cd ~/Flo/Apps/Alacritty && \
cargo build --release

To have Desktop icon

cd ~/Flo/Apps/Alacritty && \
sudo cp target/release/alacritty /usr/local/bin && \
sudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svg && \
sudo desktop-file-install extra/linux/Alacritty.desktop && \
sudo update-desktop-database

To have manual page

cd ~/Flo/Apps/Alacritty && \
sudo mkdir -p /usr/local/share/man/man1 && \
gzip -c extra/alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null && \
gzip -c extra/alacritty-msg.man | sudo tee /usr/local/share/man/man1/alacritty-msg.1.gz > /dev/null

Config

cd ~ && \
mkdir -p ~/.config/alacritty && \
mkdir -p ~/Flo/Dotfiles/alacritty && \
wget -P ~/Flo/Dotfiles/alacritty https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/alacritty/alacritty.yml && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/alacritty alacritty

Close terminal and open Alacritty terminal.


To get emoji on Alacritty terminal.

cd ~ && \
sudo apt install -y fonts-noto-color-emoji && \
mkdir -p ~/.config/fontconfig && \
mkdir -p ~/Flo/Dotfiles/fontconfig && \
wget -P ~/Flo/Dotfiles/fontconfig https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/fontconfig/fonts.conf && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/fontconfig fontconfig

Close and re open Alacritty terminal.




KITTY - install

I was using Kitty but due to some performance issues I switched to Alacritty (dev in Rust).
You can still use Kitty if you want. Here is how to install/configure it.

https://sw.kovidgoyal.net/kitty/binary/

cd ~ && \
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

A new terminal has opened, close it for now.


Create kitty.conf
Download this file as 'kitty.conf': https://github.com/Flo-Slv/Dotfiles/blob/main/kitty/kitty.conf

mkdir -p ~/Flo/Dotfiles/kitty && \
wget -P ~/Flo/Dotfiles/kitty https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/kitty/kitty.conf && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/kitty kitty

To have desktop icons etc...

cd ~/.local && mkdir bin && ln -s ~/.local/kitty.app/bin/kitty ~/.local/bin/ && \
cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/ && \
cp ~/.local/kitty.app/share/applications/kitty-open.desktop ~/.local/share/applications/ && \
sed -i "s|Icon=kitty|Icon=/home/$USER/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" ~/.local/share/applications/kitty*.desktop && \
sed -i "s|Exec=kitty|Exec=/home/$USER/.local/kitty.app/bin/kitty|g" ~/.local/share/applications/kitty*.desktop

Close terminal and open Kitty terminal.




HACK FONT - install

Go to https://www.nerdfonts.com/font-downloads to check if link is the lastest release version !

wget -P ~/Flo/Downloads https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Hack.zip && \
cd ~/.local/share && \
mkdir fonts && \
cd fonts && \
mv ~/Flo/Downloads/Hack.zip . && \
unzip Hack.zip && \
rm -rf Hack.zip

Close and re open Alacritty terminal.

Check if Hack Nerd Font have been installed correctly.

On Alacritty

fc-list | grep -i "Hack"

Or on Kitty

kitty +list-fonts

Optional: to have Hack Nerd Font available in Polybar.

sudo mkdir /usr/share/fonts/truetype/hack-nerd-font && \
sudo cp ~/.local/share/fonts/Hack\ Regular\ Nerd\ Font\ Complete.ttf /usr/share/fonts/truetype/hack-nerd-font/




Starship - install

https://github.com/starship/starship

cd ~/ && \
curl -sS https://starship.rs/install.sh | sh
mkdir ~/Flo/Dotfiles/starship && \
wget -P ~/Flo/Dotfiles/starship https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/starship/starship.toml && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config starship

Close terminal and re open it.




fzf - install

https://github.com/junegunn/fzf

git clone https://github.com/junegunn/fzf ~/.fzf && \
cd ~/.fzf && ./install

Close terminal and re open it.




ROFI - config

mkdir ~/.config/rofi && \
mkdir -p ~/Flo/Dotfiles/rofi && \
wget -P ~/Flo/Dotfiles/rofi https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/rofi/config.rasi && \
wget -P ~/Flo/Dotfiles/rofi https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/rofi/flo-theme.rasi && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/rofi rofi




POLYBAR - install and config

  1. Install from sources https://github.com/polybar/polybar/wiki/Compiling
cd ~/ && \
sudo apt update && \
sudo apt upgrade -y && \
sudo apt install -y git cmake build-essential cmake-data pkg-config python3-sphinx \
libuv1-dev libcairo2-dev libxcb1-dev libcurl4-openssl-dev libnl-genl-3-dev \
libxcb-util0-dev libxcb-randr0-dev libxcb-composite0-dev python3-xcbgen \
xcb-proto libxcb-image0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-xkb-dev \
libxcb-xrm-dev libxcb-cursor-dev libasound2-dev libpulse-dev i3-wm \
libjsoncpp-dev libmpdclient-dev python3-packaging && \
sudo apt autoremove -y

Go to https://github.com/polybar/polybar/releases to check if link is the last release version.

wget -P ~/Flo/Downloads https://github.com/polybar/polybar/releases/download/3.6.3/polybar-3.6.3.tar.gz && \
cd ~/Flo/Downloads && \
tar xvzf polybar-3.6.3.tar.gz && \
rm -rf polybar-3.6.3.tar.gz
mv polybar-3.6.3 ~/Flo/Apps/Polybar-3.6.3 && \
cd ~/Flo/Apps/Polybar-3.6.3 && \
mkdir build && \
cd build
cmake .. && \
make -j$(nproc) && \
sudo make install

Create all necessaries folder and files.

mkdir ~/.config/polybar && \
mkdir ~/Flo/Dotfiles/polybar && \
wget -P ~/Flo/Dotfiles/polybar https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/polybar/polybar.sh && \
chmod +x ~/Flo/Dotfiles/polybar/polybar.sh && \
wget -P ~/Flo/Dotfiles/polybar https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/polybar/config.ini && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/polybar polybar

Install font-awesome

cd ~ && \
sudo apt install -y fonts-font-awesome




I3-WM - config

mkdir ~/.config/i3 && \
mkdir -p ~/Flo/Dotfiles/i3 && \
wget -P ~/Flo/Dotfiles/i3 https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/i3/config && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/i3 i3

Close Kitty.
Close all others windows.
Restart Ubuntu.
Choose i3 as windows manager.
Login.




BTOP - install

https://github.com/aristocratos/btop#installation

Download latest release (x86_64-linux-musl version in my case) into ~/Flo/Downloads.

Go to https://github.com/aristocratos/btop/releases to check if link is the lastest release version.

wget -P ~/Flo/Downloads https://github.com/aristocratos/btop/releases/download/v1.2.13/btop-x86_64-linux-musl.tbz && \
cd ~/Flo/Apps && \
mkdir Btop && \
mv ~/Flo/Downloads/btop-x86_64-linux-musl.tbz ~/Flo/Apps/Btop && \
cd ~/Flo/Apps/Btop && \
tar -xjf btop-x86_64-linux-musl.tbz && \
rm btop-x86_64-linux-musl.tbz && \
cd btop && sudo make install

Close and re open terminal.




GIT - config

Just copy/paste those lines into your terminal but change your email and name before type Enter !

mkdir -p ~/Flo/Dotfiles/git && \
touch ~/Flo/Dotfiles/git/.gitconfig && \
cat << EOF >> ~/Flo/Dotfiles/git/.gitconfig
[user]
    email = {your-email}
    name = {your-name}
[core]
    editor = nvim
[init]
    defaultBranch = main
EOF
cd ~/Flo/Dotfiles && \
stow -t ~/ git




GIT-CZ - install and config

https://github.com/streamich/git-cz

cd ~ && \
npm install -g git-cz

Create changelog.config.js

wget -P ~/Flo/Dotfiles/git https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/git/changelog.config.js && \
cd ~/Flo/Dotfiles && \
stow -t ~/ git




GITUI - install and config

  1. Install GitUI

https://github.com/extrawurst/gitui#build

cargo install gitui

  1. Configure GitUI
mkdir ~/.config/gitui && \
mkdir -p ~/Flo/Dotfiles/gitui && \
wget -P ~/Flo/Dotfiles/gitui https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/gitui/theme.ron && \
wget -P ~/Flo/Dotfiles/gitui https://raw.githubusercontent.com/Flo-Slv/Dotfiles/main/gitui/key_bindings.ron && \
cd ~/Flo/Dotfiles && \
stow -t ~/.config/gitui gitui




INSOMNIA - install

https://docs.insomnia.rest/insomnia/install

echo "deb [trusted=yes arch=amd64] https://download.konghq.com/insomnia-ubuntu/ default all" | sudo tee -a /etc/apt/sources.list.d/insomnia.list
sudo apt update && \
sudo apt install -y insomnia && \
sudo apt autoremove -y

Close terminal. Logout then login.


You can install plugins in Insomnia: tokyonight theme, gist integration and os infos.


NOTION - install

https://notion-enhancer.github.io/getting-started/installation/

echo "deb [trusted=yes] https://apt.fury.io/notion-repackaged/ /" | sudo tee /etc/apt/sources.list.d/notion-repackaged.list && \
sudo apt update && \
sudo apt install -y notion-app-enhanced && \
sudo apt autoremove -y




MONGODB - install

https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/

For Ubuntu 22.04 LTS.

sudo apt install -y gnupg curl && \
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
   --dearmor && \
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
sudo apt update && \
sudo apt install -y mongodb-org

Give permissions to mongodb user

sudo chown -R mongodb:mongodb /var/lib/mongodb && \
sudo chown mongodb:mongodb /tmp/mongodb-27017.sock




MONGODB COMPASS - install

https://www.mongodb.com/try/download/compass

Download the last stable version for Ubuntu 16.04+ (.deb file).

1.39.0 as I wrote this line (July 2023).

cd ~/Flo/Downloads && \
sudo dpkg -i mongodb-compass_1.39.0_amd64.deb

You maybe will need to run this command to fix issue after installing Mongo DB Compass.

sudo apt --fix-broken install




GLOW - install

https://github.com/charmbracelet/glow

sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list && \
sudo apt update && sudo apt install -y glow && sudo apt autoremove -y




SSH - github keys

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

cd ~/.ssh && \
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

cat ~/.ssh/id_ed25519.pub

Copy/paste to GitHub.

Add an alias into ~/.zshrc

nvim ~/.zshrc
# Add Github key to SSH agent.
alias sa="eval `ssh-agent`"
alias ss="ssh-add ~/.ssh/id_ed25519"




~/Flo/Dotfiles as git repo

https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories

  1. Initialize Dotfiles folder as a git repo and add Dotfiles github remote repo.
cd ~/Flo/Dotfiles && \
git init && \
git remote add origin [email protected]:Flo-Slv/Dotfiles.git && \
git checkout -b main

  1. Remove and pull from remote
cd ~/Flo/Dotfiles && \
rm -rf alacritty/ git/ gitui/ kitty/ neovim/ i3/ polybar/ rofi/ starship/ zsh/ tmux/.tmux.conf tmux/.tmux.powerlinerc tmux/.tmux/tmux-powerline-custom-themes/ && \
git pull origin main




AppImageLauncher - install

https://github.com/TheAssassin/AppImageLauncher
If you need to install an AppImage, you can install a launcher for AppImage.
It will be easier for you to handle install/config of AppImages.

sudo apt install software-properties-common && \
sudo add-apt-repository ppa:appimagelauncher-team/stable && \
sudo apt update && \
sudo apt install -y appimagelauncher && \
sudo apt autoremove -y

If you run AppImageLauncher, you can define where to save AppImages.




Prisma Studio - install

https://github.com/prisma/studio

If you don't want to use Mongo DB Compass, you can instead use Prisma Studio.

You will need to install AppImageLauncher first (see above).

Then download the latest Prisma-Studio.AppImage release.
https://github.com/prisma/studio/releases

You can now easily install Prisma Studio thanks to AppImageLauncher.




STOW

https://linux.die.net/man/8/stow

Here is basics usages

# Specify the target with -t parameter.
# Example with the i3 directory:
cd ~/Flo/Dotfiles/i3wm/i3
stow -t ~/.config i3

# "Unstow" with -D parameter.
cd ~/Flo/Dotfiles/i3wm/i3
stow -t ~/.config -D i3

If you need more info: stow --help




Troubleshooting

Enable touchpad tap to click on i3wm.
https://major.io/p/tray-icons-in-i3/




Special aliases for my laptop - in sudo mod

alias ffull='echo 255 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1'
alias fmedium='echo 150 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1'
alias fsmall='echo 100 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1'
alias fstop='echo 0 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'



Some cool commands that can help !

# To know shell we use (2 options)
# First option
echo $SHELL

# Second option
ls -l /proc/$$/exe

# To know terminal we use
echo $TERM

# To check if terminal is truecolor
echo $COLORTERM

# To have more info on Terminal
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)

# To see all env variables
printenv