feat: new installation update
This commit is contained in:
parent
082c534e0d
commit
acd9dbbae1
78
.README.md
78
.README.md
@ -68,7 +68,17 @@ lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME
|
||||
- Note 1: Must be called from $HOME
|
||||
- Note 2: Do not start <target-folder> with $HOME or ~
|
||||
|
||||
# Install recent versions of applications
|
||||
# Every-day Tools
|
||||
|
||||
## Recommended Installation Order
|
||||
|
||||
- debian apt
|
||||
- versions_check: bat, lsd
|
||||
- fonts
|
||||
- kitty
|
||||
- lazygit
|
||||
- nnn
|
||||
- neovim
|
||||
|
||||
## Generic Tips
|
||||
|
||||
@ -81,6 +91,16 @@ wget https://github.com/jesseduffield/lazygit/pull/2604.patch
|
||||
git apply --stat --apply 2604.patch
|
||||
```
|
||||
|
||||
## Debian Packages
|
||||
|
||||
```sh
|
||||
apt install curl fd-find fzf 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
|
||||
|
||||
- [How to install and manage fonts on Linux](https://linuxconfig.org/how-to-install-and-manage-fonts-on-linux)
|
||||
@ -92,6 +112,7 @@ git apply --stat --apply 2604.patch
|
||||
|
||||
- [Nerd Fonts](https://www.nerdfonts.com/)
|
||||
- [Download](https://github.com/ryanoasis/nerd-fonts/tags)
|
||||
- JetBrainsMono.tar.xz
|
||||
- NerdFontsSymbolsOnly.tar.xz
|
||||
- [Cheat Sheet](https://www.nerdfonts.com/cheat-sheet)
|
||||
- <https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/bin/scripts/test-fonts.sh>
|
||||
@ -104,8 +125,9 @@ git apply --stat --apply 2604.patch
|
||||
_JetBrains Mono_ **with** _NF_.
|
||||
|
||||
```sh
|
||||
sudo apt-get install kitty-terminfo
|
||||
sudo apt install kitty-terminfo
|
||||
(kitty --version && curl https://sw.kovidgoyal.net/kitty/changelog/ | html2text) | less
|
||||
|
||||
sh ~/.config/kitty/installer.sh
|
||||
```
|
||||
|
||||
@ -118,6 +140,20 @@ So it is more coherent/simpler to copy this behaviour into Zsh.
|
||||
### Dependencies
|
||||
|
||||
- git-delta
|
||||
- go language (when compiling)
|
||||
|
||||
### From Source
|
||||
|
||||
```sh
|
||||
mkdir -p $HOME/dev_3rd/golang
|
||||
cd $HOME/dev_3rd/golang
|
||||
|
||||
git clone https://github.com/jesseduffield/lazygit.git
|
||||
cd lazygit
|
||||
|
||||
path+=(/usr/lib/go-1.21/bin)
|
||||
go install
|
||||
```
|
||||
|
||||
### Binary Releases
|
||||
|
||||
@ -133,7 +169,7 @@ wget $LOCATION
|
||||
tar xf *.tar.gz(om[1])
|
||||
```
|
||||
|
||||
### Go
|
||||
### From Go Package
|
||||
|
||||
```sh
|
||||
go install github.com/jesseduffield/lazygit@latest
|
||||
@ -146,17 +182,6 @@ $ lazygit --version
|
||||
commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64, git version=2.43.0
|
||||
```
|
||||
|
||||
### Manual
|
||||
|
||||
```sh
|
||||
mkdir -p $HOME/dev_3rd/golang
|
||||
cd $HOME/dev_3rd/golang
|
||||
|
||||
git clone https://github.com/jesseduffield/lazygit.git
|
||||
cd lazygit
|
||||
go install
|
||||
```
|
||||
|
||||
## neovim
|
||||
|
||||
### Dependencies
|
||||
@ -181,6 +206,12 @@ nvim --version
|
||||
vi --version
|
||||
```
|
||||
|
||||
### flatpak
|
||||
|
||||
```sh
|
||||
flatpak install flathub io.neovim.nvim
|
||||
```
|
||||
|
||||
## nnn — n³
|
||||
|
||||
### Dependencies
|
||||
@ -201,30 +232,27 @@ vi --version
|
||||
Compare the outputs of `trash-cli` and `gio trash --list`…
|
||||
- For `gio trash`, packages `libglib2.0` & `gvfs` are recommended.
|
||||
|
||||
### Source Code of Latest Release
|
||||
### From source
|
||||
|
||||
```sh
|
||||
# Download archive & extract files
|
||||
# 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
|
||||
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 cp -v misc/auto-completion/zsh/* /usr/local/share/zsh/site-functions
|
||||
sudo chmod a+r /usr/local/share/zsh/site-functions/*
|
||||
|
||||
# Copy plugins
|
||||
# Plugins
|
||||
mv -v ~/.config/nnn/plugins plugins_$(stat -c %Y ~/.config/nnn/plugins)
|
||||
mkdir -p ~/.config/nnn
|
||||
cp -av plugins ~/.config/nnn
|
||||
```
|
||||
|
||||
### From repository
|
||||
|
||||
```sh
|
||||
git clone https://github.com/jarun/nnn.git
|
||||
```
|
||||
|
||||
and then, as above…
|
||||
|
22
.zshrc
22
.zshrc
@ -1,18 +1,5 @@
|
||||
#!/bin/zsh
|
||||
|
||||
###
|
||||
### Debian Settings
|
||||
###
|
||||
|
||||
# apt install bat curl fd-find fzf lsd ripgrep xdg-utils
|
||||
|
||||
# dpkg-divert --divert /usr/bin/bat --rename /usr/bin/batcat
|
||||
# dpkg-divert --divert /usr/bin/fd --rename /usr/bin/fdfind
|
||||
# dpkg-divert --divert /usr/share/man/man1/bat.1.gz --rename /usr/share/man/man1/batcat.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
|
||||
|
||||
|
||||
###
|
||||
### Zsh Configuration
|
||||
###
|
||||
@ -54,9 +41,13 @@ typeset -U path fpath
|
||||
### Modules
|
||||
###
|
||||
|
||||
### ASDF
|
||||
### ASDF & direnv
|
||||
#
|
||||
# asdf plugin add direnv
|
||||
# asdf install direnv latest
|
||||
# asdf direnv setup --version latest
|
||||
# asdf global direnv latest
|
||||
#
|
||||
# Line below from `asdf direnv setup --version latest`
|
||||
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
|
||||
|
||||
### b4b4r07/enhancd
|
||||
@ -506,7 +497,6 @@ typeset -U path fpath
|
||||
### Completion Late Definitions
|
||||
###
|
||||
|
||||
compdef bat=batcat
|
||||
compdef locate=glocate
|
||||
|
||||
# Hide "parameters" (i.e. environment variables) when looking for a "command"
|
||||
|
10
bin/.envrc
Normal file
10
bin/.envrc
Normal file
@ -0,0 +1,10 @@
|
||||
# See `direnv stdlib` for special functions provided by _direnv_.
|
||||
use asdf
|
||||
|
||||
# Python virtual env
|
||||
layout python3
|
||||
|
||||
if (($(echo $(direnv_layout_dir)/python* | wc --words) > 1)); then
|
||||
log_error "Found several python environments"
|
||||
du -sh .direnv/*
|
||||
fi
|
2
bin/.tool-versions
Normal file
2
bin/.tool-versions
Normal file
@ -0,0 +1,2 @@
|
||||
python 3.11.8
|
||||
direnv 2.33.0
|
21
bin/requirements.txt
Normal file
21
bin/requirements.txt
Normal file
@ -0,0 +1,21 @@
|
||||
lastversion==3.5.0
|
||||
|
||||
appdirs==1.4.4
|
||||
beautifulsoup4==4.12.3
|
||||
CacheControl==0.12.11
|
||||
certifi==2024.2.2
|
||||
charset-normalizer==3.3.2
|
||||
distro==1.9.0
|
||||
feedparser==6.0.11
|
||||
idna==3.6
|
||||
lockfile==0.12.2
|
||||
msgpack==1.0.7
|
||||
packaging==23.2
|
||||
python-dateutil==2.8.2
|
||||
PyYAML==6.0.1
|
||||
requests==2.31.0
|
||||
sgmllib3k==1.0.0
|
||||
six==1.16.0
|
||||
soupsieve==2.5
|
||||
tqdm==4.66.2
|
||||
urllib3==1.26.18
|
57
bin/versions_check
Executable file
57
bin/versions_check
Executable file
@ -0,0 +1,57 @@
|
||||
#!/bin/zsh
|
||||
#
|
||||
|
||||
# asdf, direnv, python & lastversion
|
||||
#
|
||||
# - https://github.com/dvershinin/lastversion
|
||||
#
|
||||
cd $(dirname $0)
|
||||
eval $(asdf exec direnv export zsh)
|
||||
|
||||
# zsh colors
|
||||
#
|
||||
autoload colors && colors
|
||||
|
||||
|
||||
machine=amd64
|
||||
|
||||
function debian
|
||||
{
|
||||
program=$1
|
||||
repository=$2
|
||||
|
||||
echo -n "${bg[green]}${fg[black]}\n>>>> ${program}${reset_color}\n\n"
|
||||
|
||||
# TODO debian package
|
||||
|
||||
if (( ${+commands[$program]} )); then
|
||||
|
||||
${program} --version
|
||||
\ls -lh =${program}
|
||||
|
||||
current_version=$(lastversion format "$(${program} --version)")
|
||||
last_version=$(lastversion ${repository} --newer-than ${current_version})
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "${fg[cyan]}"
|
||||
lastversion ${repository} --filter="${machine}\.deb" --assets
|
||||
|
||||
else
|
||||
echo "\n${fg[green]}up to date."
|
||||
fi
|
||||
|
||||
else
|
||||
echo "${fg[yellow]}...not found.\n"
|
||||
|
||||
echo -n "${fg[cyan]}"
|
||||
lastversion ${repository} --filter="${machine}\.deb" --assets
|
||||
fi
|
||||
|
||||
echo -n ${reset_color}
|
||||
}
|
||||
|
||||
###
|
||||
|
||||
debian bat "https://github.com/sharkdp/bat"
|
||||
debian git-delta "https://github.com/dandavison/delta"
|
||||
debian lsd "https://github.com/lsd-rs/lsd"
|
Loading…
Reference in New Issue
Block a user