68 lines
2.5 KiB
Org Mode
68 lines
2.5 KiB
Org Mode
#+TITLE: Dotfiles
|
|
#+OPTIONS: toc:nil
|
|
|
|
* Cloning
|
|
** Base repo (recommended)
|
|
This clone step is based on the tutorial at [[https://www.atlassian.com/git/tutorials/dotfiles]].
|
|
|
|
Clone dotfiles to ~/.config/dotfiles and build a work tree in $HOME:
|
|
|
|
#+begin_src shell
|
|
git clone --bare https://git.ynnx.eu/yannik/dotfiles.git ~/.config/dotfiles
|
|
git --git-dir="$HOME/.config/dotfiles" --work-tree="$HOME" checkout
|
|
#+end_src
|
|
|
|
Reload your ZSH, so the newly added files are loaded. You can now use the src_shell{dotfiles} command to interact with the git directory.
|
|
|
|
When you use src_shell{dotfiles status}, you see all the files in your home directory are untracked. To prevent this, run
|
|
|
|
#+begin_src shell
|
|
dotfiles config --local status.showUntrackedFiles no
|
|
#+end_src
|
|
|
|
** Stow (alternate)
|
|
If you are unfamiliar with bare repos or you don't want a command aliased to git, you can also use [[https://www.gnu.org/software/gnu][GNU Stow]]. Stow automatically links files or directories from the stow-dir to your dotfiles folder.
|
|
|
|
First, you need to install Stow, if it isn't already installed:
|
|
|
|
#+begin_src shell
|
|
sudo pacman -S stow # arch-based systems OR
|
|
sudo apt install stow # Debian-based systems (like Ubuntu) OR
|
|
sudo dnf install stow # RPM-based systems (like Fedora, CentOS, SUSE)
|
|
#+end_src
|
|
|
|
Clone dotfiles to ~/.dotfiles:
|
|
|
|
#+begin_src shell
|
|
git clone https://git.ynnx.eu/yannik/dotfiles.git .dotfiles
|
|
#+end_src
|
|
|
|
Now you can /stow/ the files:
|
|
|
|
#+begin_src shell
|
|
cd dotfiles
|
|
stow -v .
|
|
#+end_src
|
|
|
|
This creates symlinks to all files in this stow-dir. You can get an error message when files already exist in your home dir. Rename those files with
|
|
|
|
#+begin_src shell
|
|
mv ~/file-with-error ~/file-with-error.bak
|
|
#+end_src
|
|
|
|
and try =stow= again. Now you can compare those backupped files with the new ones and extend these as you like.
|
|
|
|
* Modules
|
|
** fzf
|
|
If your zsh startes with the message =unknown option: --zsh=, your fzf version is too old. Install fzf with version 0.48.1 or later.
|
|
|
|
You can download fzf from [[https://github.com/junegunn/fzf/releases][junegunn/fzf]].
|
|
|
|
Extract the tar.gz file and copy fzf to /usr/local/bin or any location on your $PATH.
|
|
|
|
** tmux
|
|
Tmux-plugin-manager TPM writes its plugins to =$XDG_CONFIG_HOME/tmux/plugins/=. As we /stow/ our config to =$XDG_CONFIG_HOME/tmux/=, too, we must create this directory before /stow/-ing, so only the tmux.conf is a symlink. This is not needed when using recommended base-repo install.
|
|
|
|
#+begin_src shell
|
|
mkdir $XDG_CONFIG_HOME/tmux # before stowing
|
|
#+end_src
|