Compare commits
2 Commits
a2d96c7305
...
59928f6906
Author | SHA1 | Date |
---|---|---|
Michel | 59928f6906 | |
Michel | db59542fe7 |
90
.README.md
90
.README.md
|
@ -77,15 +77,19 @@ lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME
|
|||
|
||||
# Every-day Tools
|
||||
|
||||
## Recommended Installation Order
|
||||
Recommended installation order:
|
||||
|
||||
- debian apt
|
||||
- versions_check: bat, lsd
|
||||
- fonts
|
||||
- kitty
|
||||
- lazygit
|
||||
- nnn
|
||||
- neovim
|
||||
- System Config
|
||||
- [Debian packages](#debian)
|
||||
- Qubes proxy scripts (TODO)
|
||||
- dotfiles (see above)
|
||||
- [ASDF](#asdf) & plugins
|
||||
- Newer Debian packages: `bin/versions_check`
|
||||
- [Fonts](#fonts)
|
||||
- [kitty](#kitty) — `st`?
|
||||
- [lazygit](#lazygit)
|
||||
- [nnn](#nnn)
|
||||
- [neovim](#neovim)
|
||||
|
||||
## Generic Tips
|
||||
|
||||
|
@ -102,17 +106,45 @@ wget https://github.com/jesseduffield/lazygit/pull/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
|
||||
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/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
|
||||
```
|
||||
|
||||
## 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/)
|
||||
- Install the files **without** “NL” (No Ligatures) in their names
|
||||
|
@ -149,7 +181,7 @@ sudo mv folder /opt/fonts
|
|||
fc-cache -fv /opt/fonts
|
||||
```
|
||||
|
||||
## kitty
|
||||
## kitty {#kitty}
|
||||
|
||||
- <https://sw.kovidgoyal.net/kitty/binary/>
|
||||
|
||||
|
@ -163,26 +195,26 @@ fc-cache -fv /opt/fonts
|
|||
|
||||
```sh
|
||||
sudo apt install kitty-terminfo
|
||||
# OR:
|
||||
# OR:
|
||||
wget 'https://salsa.debian.org/debian/kitty/-/raw/debian/sid/terminfo/x/xterm-kitty
|
||||
```
|
||||
|
||||
### Install
|
||||
|
||||
```sh
|
||||
# Show installed version, debian package & changelog
|
||||
# Show installed version, debian package & changelog
|
||||
(ls =kitty;
|
||||
kitty --version;
|
||||
apt show kitty;
|
||||
curl https://sw.kovidgoyal.net/kitty/changelog/ | html2text) | less
|
||||
|
||||
# Debian package
|
||||
# Debian package
|
||||
sudo apt install kitty
|
||||
|
||||
# In $HOME
|
||||
# In $HOME
|
||||
sh ~/.config/kitty/installer.sh
|
||||
|
||||
# In /opt/kitty.app
|
||||
# In /opt/kitty.app
|
||||
sudo sh ~/.config/kitty/installer.sh launch=n dest=/opt
|
||||
sudo update-alternatives \
|
||||
--install /usr/bin/x-terminal-emulator \
|
||||
|
@ -193,13 +225,18 @@ sudo update-alternatives \
|
|||
Kitty prepends its _bin_ folder to the path.
|
||||
So it is more coherent/simpler to copy this behaviour into Zsh.
|
||||
|
||||
## lazygit
|
||||
## lazygit {#lazygit}
|
||||
|
||||
### Dependencies
|
||||
|
||||
- git-delta
|
||||
- go language (when compiling)
|
||||
|
||||
```sh
|
||||
# debian testing & unstable:
|
||||
apt install git-delta
|
||||
```
|
||||
|
||||
### From Source
|
||||
|
||||
```sh
|
||||
|
@ -216,6 +253,9 @@ go install
|
|||
### Binary Releases
|
||||
|
||||
```sh
|
||||
mkdir -p /opt/lazygit/bin
|
||||
cd /opt/lazygit/bin
|
||||
|
||||
URI=https://api.github.com/repos/jesseduffield/lazygit
|
||||
LOCATION=$(curl -s $URI/releases/latest \
|
||||
| grep "browser_download_url.*Linux_x86_64" \
|
||||
|
@ -232,6 +272,8 @@ tar xf *.tar.gz(om[1])
|
|||
|
||||
```sh
|
||||
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.
|
||||
|
@ -241,7 +283,7 @@ $ lazygit --version
|
|||
commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64, git version=2.43.0
|
||||
```
|
||||
|
||||
## neovim
|
||||
## neovim {#neovim}
|
||||
|
||||
### Dependencies
|
||||
|
||||
|
@ -254,7 +296,7 @@ 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
|
||||
|
||||
|
@ -274,7 +316,7 @@ vi --version
|
|||
flatpak install flathub io.neovim.nvim
|
||||
```
|
||||
|
||||
## nnn — n³
|
||||
## nnn — n³ {#nnn}
|
||||
|
||||
### Dependencies
|
||||
|
||||
|
@ -298,13 +340,13 @@ flatpak install flathub io.neovim.nvim
|
|||
### 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
|
||||
|
@ -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 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
|
||||
|
|
56
.zshrc
56
.zshrc
|
@ -231,23 +231,22 @@ compdef hg=rg
|
|||
# To choose an existing instance for nvr, use:
|
||||
# `export NVIM=$(nvr --serverlist | fzf --exit-0 --select-1) && echo $NVIM`
|
||||
|
||||
|
||||
# nnn - n³
|
||||
#
|
||||
# See https://github.com/jarun/nnn/wiki/Usage#configuration
|
||||
export NNN_ARCHIVE='\.(7z|bz2|cbz|cbr|gz|tar|tbz|tgz|xz|zip|zst)$'
|
||||
if (( ${+commands[fuse-archive]} )); then
|
||||
export NNN_ARCHMNT='fuse-archive'
|
||||
fi
|
||||
export NNN_BMS="d:~/Downloads"
|
||||
export NNN_OPENER="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke"
|
||||
export NNN_OPTS='ABeGo'
|
||||
export NNN_ORDER="t:$HOME/Downloads"
|
||||
export NNN_PLUG=';:-!bat --paging=always "$nnn"*;d:fzcd;m:mimelist;o:-!mimeopen --ask "$nnn"*;O:-!mimeopen "$nnn"*;U:umounttree;z:fzopen'
|
||||
if (( ${+commands[trash-put]} )); then
|
||||
export NNN_TRASH=1
|
||||
elif (( ${+commands[gio]} )); then
|
||||
export NNN_TRASH=2
|
||||
fi
|
||||
|
||||
local nnn_plug=(
|
||||
'b:-!bat --paging=always "$nnn"*'
|
||||
'd:fzcd'
|
||||
'z:fzopen'
|
||||
'm:mimelist'
|
||||
'o:-!mimeopen "$nnn"*'
|
||||
'O:-!mimeopen --ask "$nnn"*'
|
||||
'U:umounttree'
|
||||
';:-!clear*'
|
||||
|
||||
# TODO Dump trash
|
||||
)
|
||||
|
||||
n()
|
||||
{
|
||||
|
@ -256,10 +255,27 @@ n()
|
|||
return
|
||||
fi
|
||||
|
||||
export GUI=1 # plugins: nuke, xdgdefault
|
||||
export LESS=${LESS/F}
|
||||
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/cd-on-quit"
|
||||
export PATH=$HOME/.config/nnn/plugins:$PATH
|
||||
local -x LESS=${LESS/F}
|
||||
local -x PATH=$HOME/.config/nnn/plugins:$PATH
|
||||
|
||||
# See https://github.com/jarun/nnn/wiki/Usage#configuration
|
||||
local -x GUI=1 # plugins: nuke, xdgdefault
|
||||
local -x NNN_ARCHIVE='\.(7z|bz2|cbz|cbr|gz|tar|tbz|tgz|xz|zip|zst)$'
|
||||
local -x NNN_BMS="d:~/Downloads;q:~/QubesIncoming"
|
||||
local -x NNN_OPENER="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke"
|
||||
local -x NNN_OPTS='ABeGo'
|
||||
local -x NNN_ORDER="t:$HOME/Downloads"
|
||||
local -x NNN_PLUG=${(j:;:)nnn_plug}
|
||||
local -x NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/cd-on-quit"
|
||||
|
||||
if (( ${+commands[fuse-archive]} )); then
|
||||
local -x NNN_ARCHMNT='fuse-archive'
|
||||
fi
|
||||
if (( ${+commands[trash-put]} )); then
|
||||
local -x NNN_TRASH=1
|
||||
elif (( ${+commands[gio]} )); then
|
||||
local -x NNN_TRASH=2
|
||||
fi
|
||||
|
||||
command nnn "$@"
|
||||
|
||||
|
@ -317,6 +333,7 @@ zle -N nnn-file-widget
|
|||
bindkey -M vicmd '\en' nnn-file-widget
|
||||
bindkey -M viins '\en' nnn-file-widget
|
||||
|
||||
|
||||
# Whiptail helper
|
||||
#
|
||||
# see https://stackoverflow.com/questions/1970180/whiptail-how-to-redirect-output-to-environment-variable
|
||||
|
@ -380,6 +397,7 @@ whiptail_menu() {
|
|||
return $res
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
### Aliases -- Global & automatic expansion
|
||||
###
|
||||
|
|
|
@ -33,6 +33,7 @@ function debian
|
|||
last_version=$(lastversion ${repository} --newer-than ${current_version})
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -n ${repository}/releases
|
||||
echo "${fg[cyan]}"
|
||||
lastversion ${repository} --filter="${machine}\.deb" --assets
|
||||
|
||||
|
|
Loading…
Reference in New Issue