docs: Install Read Me

This commit is contained in:
Michel 2024-04-16 10:07:34 +02:00
parent db59542fe7
commit 59928f6906
2 changed files with 67 additions and 24 deletions

View File

@ -77,15 +77,19 @@ lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME
# Every-day Tools # Every-day Tools
## Recommended Installation Order Recommended installation order:
- debian apt - System Config
- versions_check: bat, lsd - [Debian packages](#debian)
- fonts - Qubes proxy scripts (TODO)
- kitty - dotfiles (see above)
- lazygit - [ASDF](#asdf) & plugins
- nnn - Newer Debian packages: `bin/versions_check`
- neovim - [Fonts](#fonts)
- [kitty](#kitty) — `st`?
- [lazygit](#lazygit)
- [nnn](#nnn)
- [neovim](#neovim)
## Generic Tips ## Generic Tips
@ -102,17 +106,45 @@ wget https://github.com/jesseduffield/lazygit/pull/2604.patch
git apply --stat --apply 2604.patch git apply --stat --apply 2604.patch
``` ```
## Debian Packages ### Qubes Internet Access
- In _Basic_, connect to `sys-firewall`;
- In _Firewall rules_:
- check _Limit outgoing connections_;
- check _Allow full access for 25 minutes_.
## System Config
- [SysRq](https://www.kicksecure.com/wiki/SysRq)
## Debian Packages {#debian}
```sh ```sh
apt install curl fd-find fzf grc ripgrep wget xdg-utils apt install curl fd-find fzf git grc ripgrep wget xdg-utils
dpkg-divert --divert /usr/bin/fd --rename /usr/bin/fdfind dpkg-divert --divert /usr/bin/fd --rename /usr/bin/fdfind
dpkg-divert --divert /usr/share/man/man1/fd.1.gz --rename /usr/share/man/man1/fdfind.1.gz dpkg-divert --divert /usr/share/man/man1/fd.1.gz --rename /usr/share/man/man1/fdfind.1.gz
dpkg-divert --divert /usr/share/zsh/vendor-completions/_rg --rename /usr/share/zsh/vendor-completions/rg.zsh dpkg-divert --divert /usr/share/zsh/vendor-completions/_rg --rename /usr/share/zsh/vendor-completions/rg.zsh
``` ```
## Fonts ## ASDF & main plugins {#asdf}
`.zshrc` will install `asdf`.
Make sure you have the required [system dependencies](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
before installing/compiling Python.
```sh
sudo apt install --no-install-recommends XXX
asdf plugin add direnv
asdf plugin add python
cd ~/bin
asdf current
asdf install
```
## Fonts {#fonts}
- [JetBrains Mono](https://www.jetbrains.com/lp/mono/) - [JetBrains Mono](https://www.jetbrains.com/lp/mono/)
- Install the files **without** “NL” (No Ligatures) in their names - Install the files **without** “NL” (No Ligatures) in their names
@ -149,7 +181,7 @@ sudo mv folder /opt/fonts
fc-cache -fv /opt/fonts fc-cache -fv /opt/fonts
``` ```
## kitty ## kitty {#kitty}
- <https://sw.kovidgoyal.net/kitty/binary/> - <https://sw.kovidgoyal.net/kitty/binary/>
@ -163,26 +195,26 @@ fc-cache -fv /opt/fonts
```sh ```sh
sudo apt install kitty-terminfo sudo apt install kitty-terminfo
# OR: # OR:
wget 'https://salsa.debian.org/debian/kitty/-/raw/debian/sid/terminfo/x/xterm-kitty wget 'https://salsa.debian.org/debian/kitty/-/raw/debian/sid/terminfo/x/xterm-kitty
``` ```
### Install ### Install
```sh ```sh
# Show installed version, debian package & changelog # Show installed version, debian package & changelog
(ls =kitty; (ls =kitty;
kitty --version; kitty --version;
apt show kitty; apt show kitty;
curl https://sw.kovidgoyal.net/kitty/changelog/ | html2text) | less curl https://sw.kovidgoyal.net/kitty/changelog/ | html2text) | less
# Debian package # Debian package
sudo apt install kitty sudo apt install kitty
# In $HOME # In $HOME
sh ~/.config/kitty/installer.sh sh ~/.config/kitty/installer.sh
# In /opt/kitty.app # In /opt/kitty.app
sudo sh ~/.config/kitty/installer.sh launch=n dest=/opt sudo sh ~/.config/kitty/installer.sh launch=n dest=/opt
sudo update-alternatives \ sudo update-alternatives \
--install /usr/bin/x-terminal-emulator \ --install /usr/bin/x-terminal-emulator \
@ -193,13 +225,18 @@ sudo update-alternatives \
Kitty prepends its _bin_ folder to the path. Kitty prepends its _bin_ folder to the path.
So it is more coherent/simpler to copy this behaviour into Zsh. So it is more coherent/simpler to copy this behaviour into Zsh.
## lazygit ## lazygit {#lazygit}
### Dependencies ### Dependencies
- git-delta - git-delta
- go language (when compiling) - go language (when compiling)
```sh
# debian testing & unstable:
apt install git-delta
```
### From Source ### From Source
```sh ```sh
@ -216,6 +253,9 @@ go install
### Binary Releases ### Binary Releases
```sh ```sh
mkdir -p /opt/lazygit/bin
cd /opt/lazygit/bin
URI=https://api.github.com/repos/jesseduffield/lazygit URI=https://api.github.com/repos/jesseduffield/lazygit
LOCATION=$(curl -s $URI/releases/latest \ LOCATION=$(curl -s $URI/releases/latest \
| grep "browser_download_url.*Linux_x86_64" \ | grep "browser_download_url.*Linux_x86_64" \
@ -232,6 +272,8 @@ tar xf *.tar.gz(om[1])
```sh ```sh
go install github.com/jesseduffield/lazygit@latest go install github.com/jesseduffield/lazygit@latest
export GOPATH=/opt/go && sudo mkdir -p $GOPATH
sudo -E go install github.com/jesseduffield/lazygit@latest
``` ```
Problem: Commit ID, build date and version aren't set. Problem: Commit ID, build date and version aren't set.
@ -241,7 +283,7 @@ $ lazygit --version
commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64, git version=2.43.0 commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64, git version=2.43.0
``` ```
## neovim ## neovim {#neovim}
### Dependencies ### Dependencies
@ -254,7 +296,7 @@ commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=
```sh ```sh
mkdir -p $HOME/.local/bin mkdir -p $HOME/.local/bin
cd $HOME/.local/bin cd $HOME/.local/bin
# --- # ---
mkdir -p /opt/neovim/bin mkdir -p /opt/neovim/bin
cd /opt/neovim/bin cd /opt/neovim/bin
@ -274,7 +316,7 @@ vi --version
flatpak install flathub io.neovim.nvim flatpak install flathub io.neovim.nvim
``` ```
## nnn — n³ ## nnn — n³ {#nnn}
### Dependencies ### Dependencies
@ -298,13 +340,13 @@ flatpak install flathub io.neovim.nvim
### From source ### From source
```sh ```sh
# From release # From release
URI=https://github.com/jarun/nnn URI=https://github.com/jarun/nnn
xdg-open $URI/releases/latest xdg-open $URI/releases/latest
ARCHIVE=$(echo $HOME/Downloads/*.gz(om[1])) && echo $ARCHIVE ARCHIVE=$(echo $HOME/Downloads/*.gz(om[1])) && echo $ARCHIVE
tar xf $ARCHIVE tar xf $ARCHIVE
# From repository # From repository
git clone https://github.com/jarun/nnn.git git clone https://github.com/jarun/nnn.git
# Compile # Compile
@ -317,7 +359,7 @@ sudo make PREFIX=/opt/nnn O_GITSTATUS=1 O_NAMEFIRST=1 O_NERD=1 install
sudo cp -v misc/auto-completion/zsh/* /usr/local/share/zsh/site-functions sudo cp -v misc/auto-completion/zsh/* /usr/local/share/zsh/site-functions
sudo chmod a+r /usr/local/share/zsh/site-functions/* sudo chmod a+r /usr/local/share/zsh/site-functions/*
# Plugins # Plugins
mv -v ~/.config/nnn/plugins plugins_$(stat -c %Y ~/.config/nnn/plugins) mv -v ~/.config/nnn/plugins plugins_$(stat -c %Y ~/.config/nnn/plugins)
mkdir -p ~/.config/nnn mkdir -p ~/.config/nnn
cp -av plugins ~/.config/nnn cp -av plugins ~/.config/nnn

View File

@ -33,6 +33,7 @@ function debian
last_version=$(lastversion ${repository} --newer-than ${current_version}) last_version=$(lastversion ${repository} --newer-than ${current_version})
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo -n ${repository}/releases
echo "${fg[cyan]}" echo "${fg[cyan]}"
lastversion ${repository} --filter="${machine}\.deb" --assets lastversion ${repository} --filter="${machine}\.deb" --assets