docs: both user & /opt in ReadMe

This commit is contained in:
Michel 2024-03-11 19:23:31 +01:00
parent ec705f2a96
commit cad63fc753
1 changed files with 75 additions and 12 deletions

View File

@ -34,6 +34,13 @@ dotfiles checkout 2>&1 | egrep "\s+" | awk {'print $1'} |
dotfiles checkout
```
When the `fetch` configuration is not set, insert the following line in
`.dotfiles/config`:
```config
fetch = +refs/heads/*:refs/remotes/origin/*
```
## Install into `/etc/skel`
```sh
@ -82,6 +89,10 @@ lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME
## Generic Tips
### Desktop Files
See <https://specifications.freedesktop.org/desktop-entry-spec/latest/>
### Github Patches
From [stackoverflow](https://stackoverflow.com/questions/28484186/apply-github-commit-pull-request-as-a-patch).
@ -103,12 +114,8 @@ dpkg-divert --divert /usr/share/zsh/vendor-completions/_rg --rename /usr/share/z
## Fonts
- [How to install and manage fonts on Linux](https://linuxconfig.org/how-to-install-and-manage-fonts-on-linux)
- `mv folder ~/.fonts`
- `fc-cache -fv ~/.fonts`
- [JetBrains Mono](https://www.jetbrains.com/lp/mono/)
- Install the files **without “NL”** (i.e No Ligatures) in their names
- Install the files **without** “NL” (No Ligatures) in their names
- [Nerd Fonts](https://www.nerdfonts.com/)
- [Download](https://github.com/ryanoasis/nerd-fonts/tags)
@ -117,18 +124,66 @@ dpkg-divert --divert /usr/share/zsh/vendor-completions/_rg --rename /usr/share/z
- [Cheat Sheet](https://www.nerdfonts.com/cheat-sheet)
- <https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/bin/scripts/test-fonts.sh>
### in $HOME/.fonts
```sh
mv folder ~/.fonts
fc-cache -fv ~/.fonts
```
See also [How to install and manage fonts on Linux](https://linuxconfig.org/how-to-install-and-manage-fonts-on-linux).
### in /opt/fonts
`/etc/fonts/conf.d/00-opt.conf`:
```xml
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/opt/fonts</dir>
</fontconfig>
```
```sh
sudo mv folder /opt/fonts
fc-cache -fv /opt/fonts
```
## kitty
- <https://sw.kovidgoyal.net/kitty/binary/>
- Install `JetBrains Mono` (without NF) & `NerdFontsSymbolsOnly` fonts.
### Dependencies
- `JetBrains Mono` (without NL)
- `NerdFontsSymbolsOnly`
- Note: outside of kitty, it may be interesting to also install
_JetBrains Mono_ **with** _NF_.
_JetBrains Mono_ **with** _NL_.
```sh
sudo apt install kitty-terminfo
(kitty --version && curl https://sw.kovidgoyal.net/kitty/changelog/ | html2text) | less
```
### Install
```sh
# Show installed version, debian package & changelog
(ls =kitty;
kitty --version;
apt show kitty;
curl https://sw.kovidgoyal.net/kitty/changelog/ | html2text) | less
# Debian package
sudo apt install kitty
# In $HOME
sh ~/.config/kitty/installer.sh
# In /opt/kitty.app
sudo sh ~/.config/kitty/installer.sh launch=n dest=/opt
sudo update-alternatives \
--install /usr/bin/x-terminal-emulator \
x-terminal-emulator /opt/kitty.app/bin/kitty 99
```
**Note**:
@ -165,6 +220,7 @@ LOCATION=$(curl -s $URI/releases/latest \
| sed 's/,$//' \
| sed 's/"//g')
echo $LOCATION
wget $LOCATION
tar xf *.tar.gz(om[1])
```
@ -195,6 +251,9 @@ commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=
```sh
mkdir -p $HOME/.local/bin
cd $HOME/.local/bin
# ---
mkdir -p /opt/neovim/bin
cd /opt/neovim/bin
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod u+x nvim.appimage
@ -230,28 +289,32 @@ flatpak install flathub io.neovim.nvim
- Trash:
- `trash-cli` is a much better CLI-only solution!
Compare the outputs of `trash-cli` and `gio trash --list`
<https://github.com/andreafrancia/trash-cli>
- For `gio trash`, packages `libglib2.0` & `gvfs` are recommended.
### From source
```sh
# From release
# From release
URI=https://github.com/jarun/nnn
xdg-open $URI/releases/latest
ARCHIVE=$(echo $HOME/Downloads/*.gz(om[1])) && echo $ARCHIVE
tar xf $ARCHIVE
# From repository
# From repository
git clone https://github.com/jarun/nnn.git
# Compile
cd nnn*(om[1])
make clean
sudo make O_GITSTATUS=1 O_NAMEFIRST=1 O_NERD=1 install
sudo make O_GITSTATUS=1 O_NAMEFIRST=1 O_NERD=1 install
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 chmod a+r /usr/local/share/zsh/site-functions/*
# Plugins
# Plugins
mv -v ~/.config/nnn/plugins plugins_$(stat -c %Y ~/.config/nnn/plugins)
mkdir -p ~/.config/nnn
cp -av plugins ~/.config/nnn