9.1 KiB
About this repository
It contains all my configuration files (managed by Chezmoi) and the script permitting to install my configuration on any Arch-based Linux distribution or any Linux distribution (as long as you can install that).
Overview :
Check the utils/packages file to see all the packages installed by the script.
Installation
Prerequisites
Chezmoi, pacman and sudo are necessary, be sure to have them install and configure!
Git and age might be useful to have install.
You may want to install the appropriate driver if you have an NVIDIA GPU.
Installation guide
Initialize the chezmoi repository with the following command :
chezmoi init https://gitea.hexasec.io/tombdf/.dotfiles.git
Start the installation script with the following command :
chezmoi cd && ./install.sh
Finishing the configuration
The script will end by itself. I recommend you to restart your computer.
After restarting and opening the terminal, Fisher will install all the plugins.
If you have access to Github Copilot, I recommend you to log in neovim with the Copilot auth command.
I also recommend you to launch Firefox and create a Betterfox profile (using the ~/.config/betterfox/ folder). You can follow this tutorial. You may want to add an DNS in user.js (search line user_pref("network.trr.uri", "");).
You may also setup the DNS in /etc/systemd/resolved.conf (I use NextDNS for that).
Once you've done that, it's all good, enjoy your new config!
PS: Don't forget to check the log file
Usage
The following sections will resume what usage you can have of different commands, text editors or terminal emulator.
Commands
With Zsh and Zinit, a lot of commands will be installed. They're very useful and powerful so it might be a good idea to learn what they are.
Zoxide
Commands : z | zi
Replaced by : cd | cdi
Github page
Zoxide is a cd replacement. It will work fine as cd does, but every time you use the command, it will remember the path to the directory.
After a little bit of time using the command, you could use it to "jump" to a repository i.e. you could only write a part of the path to the directory. You could also not write the entire name of the directory.
If you want to see all the repository remembered by Zoxide, you can use the cdi command.
Note : Zoxide integrate a system to replace the original z command by another (alternative to alias). That mean that only the "new" command work, not the original work. You can find the command in the Shell configuration file.
Usage of the command : tldr zoxide
Lsd
Command : lsd
Aliased by : ls | ll
Github page
Lsd is a ls replacement. It will add colors, icons and even git status to the display.
The ll alias will print all the informations on all the files (including hidden files) in a directory. Check the aliases in the Shell configuration file.
Usage of the command : tldr lsd
Rip
Command : rip
Aliased by : rm
Github page
Rip is a rm replacement. It will send all the deleted files to the graveyard (/tmp/graveyard-$USER or $XDG_DATA_HOME/graveyard), which means that the files can be restored.
The files can only be deleted permanently by deleting the entire graveyard with the appropriate flag. Note that the graveyard can be put where you want with the right option.
Usage of the command : tldr rip
Bat
Command : bat
Aliased by : cat
Github page
Bat is a cat replacement. It supports syntax-highlighting and git integration.
It can be use as a pager.
Usage of the command : tldr bat
Ripgrep
Command : rg
Aliased by : grep
Github page
Ripgrep is a grep replacement. It's a faster and recursive alternative to the original command.
Usage of the command : tldr rg
Fd
Command : fd
Aliased by : find
Github page
Fd is a find replacement. It's a faster and more user-friendly alternative to the original command.
The alias is set to show the hidden directory as well. Check the alias in the Shell configuration file.
Usage of the command : tldr fd
Sd
Command : sd
Aliased by : sed
Github page
Sd is a sed replacement. It's a faster and more intuitive alternative to the original command.
Usage of the command : tldr sd
Topgrade
Command : topgrade
Github page
Topgrade permit to update, not only the system, but also all the packages and the git repository. It update ALL the things.
Usage of the command : tldr topgrade
Tealdeer
Command : tldr
Github page
Tealdeer is a faster TLDR. It shows you pages written by community on different commands and programs.
The pages shows different common and useful uses of commands.
Text editors
Differents text editors are available with my config. They're very powerful if you know how to use them and if you know the right keyboard shortcuts.
Vim
Command : vim
Replaced by : vi
Leader : ,
Vim is installed with vim-plug plugin manager and the Gruvbox theme. In Vim, you can use the PlugInstall command to install the plugin, and Minimap to toggle the minimap.
In Insert mode, you can use the jj mapping to go in Normal mode, and type Space to enter Command mode.
Also in Insert mode, you can use the <leader>' mapping to open a block instruction.
In Normal mode, use the j|k|l|m keys to move. Use the <Ctrl-n> mapping to open NerdTree.
To see all the mappings, check the .vimrc config file.
Neovim with NvChad
Command : nvim
Aliased by : vim
Leader : ,
NvChad Github page
Neovim is installed with the NvChad config. The basics mappings in Neovim are the same as the ones describes here.
To see (almost) all the mappings, use the <leader>ch mapping.
Use the Lazy command in Neovim to manage the plugins, and the Mason command to manage LSP.
Type the Copilot command and type tab to see all the command available to use Copilot and CopilotChat.
To see all the mappings, check the mappings.lua file in .config/nvim/lua/. To see all the plugins, check the plugins.lua file in .config/nvim/lua/plugins.
Terminal emulator
Kitty is the terminal emulator use in this config. The leader key is Ctrl+Shift, here is a list of useful mappings :
<leader>t: Create a new tab.<leader>q: Close a tab.<leader><Enter>: Split a tab.<leader><Directional-arrow>: Move between the different tab.
Check the kitty.conf file in .config/kitty/ to see all the possibility offered by Kitty.
Troubleshooting
Before doing anything, verify that all the packages listed here are installed with the latest stable version.
Fish
If something went wrong when sourcing the config file, it might be that fish_inclusion was not delete preventing, when sourcing the file again, the downloading or the call of certains plugins.
To fix that, you just have to run manually the command to reset the variable : set -e fish_inclusion
Neovim
If NvChad seems not to be installed, be sure to have the latest version of Neovim installed.
For any problem with a plugin, use the checkhealth command and see if anything wrong with the plugin is mentioned.
If you get an error message like this : "Client 1 quit with code 1", it might mean that a package is missing for Mason to work correctly.