add hex2xterm & readme

This commit is contained in:
2025-05-04 04:45:04 +08:00
parent cdbc062183
commit 98254b9dc4
2 changed files with 102 additions and 0 deletions

View File

@@ -140,6 +140,41 @@ rm -rf ~/.config/alacritty ~/.config/zellij
</details>
擴充的小工具
--------------------------------------------------------------------------------
### git-pushmulti 同時上傳到多個git server
* 本體在:`~/.local/bin/git-pushmulti`
已經設定在 `.gitconfig` 裡面的alias用法簡述
```
git pushmulti "(origin,github)" master
```
範例中origin,github就是remote名。
PS. 因為zsh與bash的限制一旦用到`{}`符號會跳脫在shell層處理進不去執行檔腳本所以權宜之計要用 `"()"`包起來
### imgcat 直接 cat顯示圖片檔
* 本體在:`~/.local/share/chezmoi/.chezmoitemplates/common.sh.tmpl`
PS. 你的終端機程式要支援sixel已知可用的 Konsole, iTerm2, Alacritty(非官方修改版)
```
imgcat /usr/share/wallpapers/Mountain/contents/images/1080x1920.png
```
### hex2xterm 色碼轉接近的xterm-256顏色數字編號
* 本體在:`~/.local/bin/hex2xterm`
用法範例:
```
hex2xterm "#FFFFFF"
# Output:
# 最接近的 Xterm 色碼為231
# Xterm RGB#FFFFFF
```
zsh
--------------------------------------------------------------------------------