Skip to content

i3wm 不用确认一键退出 ​

bindsym $mod+Shift+q exit

reference


vi in bash ​

bash
cat > .inputrc <<'EOF'
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2

# optionally:
# switch to block cursor before executing a command
set keymap vi-insert
RETURN: "\e\n"
EOF

reference


disk ​

healthcheck ​

shell
pacman -S smartmontools
shell
smartctl -a /dev/sda

bunchmark ​

shell
pacman -S hdparm
shell
hdparm -Tt /dev/sda

Fix pacman ldconfig "file is empty, not checked" error ​

shell
pacman -Syyu $(pacman -Qnq) --overwrite '*'

refer

proxy dockerd ​

shell
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/proxy.conf <<EOF
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:7890"
Environment="HTTPS_PROXY=http://127.0.0.1:7890"
Environment="NO_PROXY=localhost,127.0.0.1"
EOF
sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl restart docker
# vertify
sudo systemctl show --property=Environment docker

reference

aur ​

init a new pkg

shell
git -c init.defaultBranch=master clone ssh://aur@aur.archlinux.org/pkgbase.git

update

shell
makepkg --printsrcinfo > .SRCINFO
git add PKGBUILD .SRCINFO
# commit and push

lto issue when packaging rust: refer

reset keyring ​

shell
sudo rm -rf /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate archlinux

refer

key mapping ​

shell
# Install keyd
if ! command -v keyd &>/dev/null; then
    sudo pacman -S --noconfirm keyd
fi

# Write keyd config to swap CapsLock and Escape
sudo tee /etc/keyd/default.conf >/dev/null <<EOF
[ids]
*

[main]
capslock = esc
esc = capslock
EOF

# Reload or start keyd
sudo systemctl enable --now keyd
sudo keyd reload