Compare commits

..

No commits in common. "0e5d344b74d74487dad8f93307c8678ebfadb177" and "2ff59608f543fd2c2fee3c9f190434c0b6f914e6" have entirely different histories.

8 changed files with 31 additions and 38 deletions

View File

@ -1,6 +1,5 @@
{{- $name := promptStringOnce . "name" "請輸入您的姓名" -}}
{{- $email := promptStringOnce . "email" "輸入您的Email地址" -}}
{{- $signingkey := promptStringOnce . "signingkey" "輸入您的GPG金鑰ID (可從 gpg --list-secret-keys --keyid-format=long 去找)" -}}
{{- $hosttype_choices := list "desktop" "server" "unroot_server" "manual" -}}
{{- $hosttype := promptChoice "What type of host are you on" $hosttype_choices -}}
@ -33,7 +32,6 @@ sourceDir = "~/.local/share/chezmoi"
[data]
name = {{ $name | quote }}
email = {{ $email | quote }}
signingkey = {{ $signingkey | quote }}
serverStyle = {{ $isServer }}
unRootMode = {{ $unRootMode }}
enableSixel = {{ $enableSixel }} {{/* TODO: packages.toml還沒處理 */}}

View File

@ -107,7 +107,7 @@ chezmoi purge
```
rm ~/.ssh/known_hosts
rm -rf ~/.vimrc ~/.vim ~/.gvimrc
rm -rf ~/.config/nvim ~/.local/share/nvim ~/.cache/nvim ~/.local/state/nvim
rm -rf ~/.config/nvim ~/.local/share/nvim ~/.cache/nvim
rm ~/.zshrc
rm -rf ~/.config/alacritty ~/.config/zellij
```

View File

@ -220,9 +220,6 @@ function __pb10k_bottom {
# ----以下是我的自訂內容 ------------------------------------------------------
export LANG=zh_TW.UTF-8 #macOS要手動指定不然被ssh連入使用時會變亂碼
{{ if .signingkey }}
export GPG_TTY=$(tty){{ end }}
# overwrite ls
if command -v eza &> /dev/null; then
alias ls='eza --color=always --icons=always'

View File

@ -3,7 +3,20 @@ return {
"3rd/image.nvim",
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
-- cond = not vim.g.neovide and not vim.fn.has("goneovim") == 1 and not vim.fn.has("gui_running") == 1,
cond = require("tools.gui").is_enable_sixel(),
cond = function()
-- 如果是在 GUI如 NeoVide、Goneovim則不啟用插件
if vim.g.neovide or vim.fn.has("goneovim") == 1 or vim.fn.has("gui_running") == 1 then
return false
end
-- 獲取 TERM 環境變數
local term = vim.fn.getenv("TERM")
-- 檢查是否是常見的文字終端
local is_terminal = term and (term:match("xterm") or term:match("screen") or term:match("tmux") or term:match("linux"))
-- 如果是文字終端,則啟用插件
return is_terminal ~= nil
end,
lazy = false,
opts = {
backend = "ueberzug",

View File

@ -1,7 +1,20 @@
return {
-- { "psliwka/vim-smoothie" },
{ "karb94/neoscroll.nvim",
cond = require("tools.gui").is_enable_sixel(),
cond = function()
-- 如果是在 GUI如 NeoVide、Goneovim則不啟用插件
if vim.g.neovide or vim.fn.has("goneovim") == 1 or vim.fn.has("gui_running") == 1 then
return false
end
-- 獲取 TERM 環境變數
local term = vim.fn.getenv("TERM")
-- 檢查是否是常見的文字終端
local is_terminal = term and (term:match("xterm") or term:match("screen") or term:match("tmux") or term:match("linux"))
-- 如果是文字終端,則啟用插件
return is_terminal ~= nil
end,
opts = {
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
'<C-u>', '<C-d>',

View File

@ -16,21 +16,4 @@ function M.is_graphical()
return term_program or display or wayland and true or false
end
--- 當前終端機環境是否在圖形環境裡面並不使用專用GUI APP(NeoVide)
--- @return boolean is_enable_sixel
function M.is_enable_sixel()
-- 如果是在 GUI如 NeoVide、Goneovim則不啟用插件
if vim.g.neovide or vim.fn.has("goneovim") == 1 or vim.fn.has("gui_running") == 1 then
return false
end
-- 獲取 TERM 環境變數
local term = vim.fn.getenv("TERM")
-- 檢查是否是常見的文字終端
local is_terminal = term and (term:match("xterm") or term:match("screen") or term:match("tmux") or term:match("linux"))
-- 如果是文字終端,則啟用插件
return is_terminal ~= nil
end
return M

View File

@ -3,16 +3,9 @@
smudge = git-media-smudge %f
[user]
name = {{ .name | quote }}
email = {{ .email | quote }}{{ if .signingkey }}
signingkey = {{ .signingkey | quote }}{{ end }}
{{ if .signingkey }}
[commit]
gpgsign = true
[tag]
gpgSign = true
{{ end }}
email = {{ .email | quote }}
[core]
editor = vim
excludesfile = {{ joinPath .chezmoi.homeDir ".gitignore_global" }}
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"

View File

@ -189,10 +189,6 @@ test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell
export PATH="$PATH:$HOME/bin"
zinit light mass8326/zsh-chezmoi
{{ if .signingkey }}
export GPG_TTY=$TTY{{ end }}
gpgconf --launch gpg-agent
# 自動補上 noglob 並禁用 Zsh 的 globbing 解析
function git_pushmulti() {
# 手動處理方括號或括號內容,並進行推送