Skip to content

Instantly share code, notes, and snippets.

@leetschau
Last active February 25, 2026 14:16
Show Gist options
  • Select an option

  • Save leetschau/f8545ab597f5317da468173f4200df54 to your computer and use it in GitHub Desktop.

Select an option

Save leetschau/f8545ab597f5317da468173f4200df54 to your computer and use it in GitHub Desktop.
Working environment pvovision on Fedora & Debian
# OS provision on Debian 13.3 KDE
```bash
sudo apt update
sudo apt install fish git curl starship zoxide direnv fzf ranger
ssh-keygen # add the pub key into bitbucket
curl https://mise.run | sh
~/.local/bin/mise use -g chezmoi
~/.local/bin/mise use -g python@3.13
~/.local/bin/mise use -g go
~/.local/bin/mise use -g node
~/.local/bin/mise use -g neovim@stable # upgrade this rolling version with `mise upgrade neovim`
~/.local/bin/mise x -- chezmoi init git@bitbucket.org:leechau/mydotfiles.git
~/.local/bin/mise x -- chezmoi apply ~/.config/fish
git clone git@bitbucket.org:leechau/lazy-configs.git ~/.config/nvim
fish
```
## Customize Keyboard Layout
System Settings > Keyboard > Key Bindings (on the top right corner),
Check "Configure keyboard options".
Caps Lock behavior > Swap Esc and Caps Lock.
Ctrl position > Swap Left Win and Left Ctrl; Swap Right Win and Right Ctrl
## Fix neovim Error
Run `go install golang.org/x/tools/gopls@latest` if the following error raised after startup neovim:
[mason-lspconfig.nvim] failed to install gopls. Installation logs are available in :Mason and :MasonLog
gopls failed to install.
[ERROR Tuesday, February 24, 2026 PM04:19:19] ...im/lazy/mason/lua/mason-core/installer/InstallRunner.lua:93: Installation failed for Package(name=gopls) error=spawn: go failed with exit code 1 and signal 0. go: downloading golang.org/x/tools/gopls v0.21.1
go: golang.org/x/tools/gopls@v0.21.1: golang.org/x/tools/gopls@v0.21.1: Get "https://proxy.golang.org/golang.org/x/tools/gopls/@v/v0.21.1.zip": dial tcp 142.250.196.209:443: i/o timeout
## Chinese Input Method
```fish
sudo apt update
sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-frontend-qt5 fcitx5-frontend-gtk3 kde-config-fcitx5
im-config -n fcitx5
```
Log out the KDE desktop and log back in.
This is mandatory, or the Shuangpin method in the next step will not appear.
System Settings > Language & Time > Input Method: Add Input Method,
select "Shuangpin" at the bottom of the list.
Click "Configure addons..." then the confgiure icon of UI > Classic User Interface,
change the size of "Font" to 14.
Click the "Configure" button on the right side of "Shuangpin" in "Input Method On" list.
Change `-/=` of "Previous Page/Next Page" to `,/.`.
## command manager
```bash
mkdir ~/.config/pet
scp templ-host:~/.config/pet/config.toml ~/.config/pet/
touch ~/.config/pet/snippet.toml
pet sync
```
## donno
```bash
mkdir -p ~/.local/bin ~/.config/donno
cat << EOF > ~/.config/donno/config.json
{"app_home":"/home/leo/.donno/","default_notebook":"/Diary/2026","editor":"nvim","viewer":"nvim -R"}
EOF
scp templ-host:~/.local/bin/dn ~/.local/bin # or compiie from source:
# git clone git@github.com:leetschau/ron.git && cd ron && cargo build
git clone git@bitbucket.org:leechau/diaries.git ~/.donno/repo
```
## Static IP
```bash
nmcli con show # get connection name: CMxx-xxx
sudo nmcli con mod CMxx-xxx ipv4.addresses 192.168.1.82/24 ipv4.gateway 192.168.1.1 ipv4.dns "8.8.8.8,1.1.1.1" ipv4.method manual
sudo nmcli con up CMCC-AhSy
```
# necessary tools:
sudo dnf copr enable atim/starship
sudo dnf install fish git nvim zoxide direnv starship perl-Digest-SHA # on Fedora 43
# set shell:
chsh -s /bin/fish
# create public SSH key and add it to the source hosting platform:
ssh-keygen
# nvim configurations:
git clone git@bitbucket.org:leechau/lazy-configs.git ~/.config/nvim
# other configurations:
chezmoi init git@bitbucket.org:leechau/mydotfiles.git
chezmoi apply ~/.config/fish
chezmoi apply ~/.config/eget
# dsnote
mkdir -p ~/.local/bin ~/.config/donno
cat << EOF > ~/.config/donno/config.json
{"app_home":"/home/leo/.donno/","default_notebook":"/Diary/2026","editor":"nvim","viewer":"nvim -R"}
EOF
scp templ-host:~/.local/bin/dn ~/.local/bin # or compiie from source:
# git clone git@github.com:leetschau/ron.git && cd ron && cargo build
git clone git@bitbucket.org:leechau/diaries.git ~/.donno/repo
# command manager:
mkdir ~/.config/pet
scp templ-host:~/.config/pet/config.toml ~/.config/pet/
touch snippet.toml
pet sync
# standalone tools installer:
scp templ-host:~/.local/bin/eget ~/.local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment