Compare commits
3 Commits
2ff59608f5
...
0e5d344b74
Author | SHA1 | Date | |
---|---|---|---|
0e5d344b74 | |||
7de43b89a5 | |||
cee037e8dd |
@ -1,5 +1,6 @@
|
|||||||
{{- $name := promptStringOnce . "name" "請輸入您的姓名" -}}
|
{{- $name := promptStringOnce . "name" "請輸入您的姓名" -}}
|
||||||
{{- $email := promptStringOnce . "email" "輸入您的Email地址" -}}
|
{{- $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_choices := list "desktop" "server" "unroot_server" "manual" -}}
|
||||||
{{- $hosttype := promptChoice "What type of host are you on" $hosttype_choices -}}
|
{{- $hosttype := promptChoice "What type of host are you on" $hosttype_choices -}}
|
||||||
@ -32,6 +33,7 @@ sourceDir = "~/.local/share/chezmoi"
|
|||||||
[data]
|
[data]
|
||||||
name = {{ $name | quote }}
|
name = {{ $name | quote }}
|
||||||
email = {{ $email | quote }}
|
email = {{ $email | quote }}
|
||||||
|
signingkey = {{ $signingkey | quote }}
|
||||||
serverStyle = {{ $isServer }}
|
serverStyle = {{ $isServer }}
|
||||||
unRootMode = {{ $unRootMode }}
|
unRootMode = {{ $unRootMode }}
|
||||||
enableSixel = {{ $enableSixel }} {{/* TODO: packages.toml還沒處理 */}}
|
enableSixel = {{ $enableSixel }} {{/* TODO: packages.toml還沒處理 */}}
|
||||||
|
@ -107,7 +107,7 @@ chezmoi purge
|
|||||||
```
|
```
|
||||||
rm ~/.ssh/known_hosts
|
rm ~/.ssh/known_hosts
|
||||||
rm -rf ~/.vimrc ~/.vim ~/.gvimrc
|
rm -rf ~/.vimrc ~/.vim ~/.gvimrc
|
||||||
rm -rf ~/.config/nvim ~/.local/share/nvim ~/.cache/nvim
|
rm -rf ~/.config/nvim ~/.local/share/nvim ~/.cache/nvim ~/.local/state/nvim
|
||||||
rm ~/.zshrc
|
rm ~/.zshrc
|
||||||
rm -rf ~/.config/alacritty ~/.config/zellij
|
rm -rf ~/.config/alacritty ~/.config/zellij
|
||||||
```
|
```
|
||||||
|
@ -220,6 +220,9 @@ function __pb10k_bottom {
|
|||||||
# ----以下是我的自訂內容 ------------------------------------------------------
|
# ----以下是我的自訂內容 ------------------------------------------------------
|
||||||
export LANG=zh_TW.UTF-8 #macOS要手動指定,不然被ssh連入使用時會變亂碼
|
export LANG=zh_TW.UTF-8 #macOS要手動指定,不然被ssh連入使用時會變亂碼
|
||||||
|
|
||||||
|
{{ if .signingkey }}
|
||||||
|
export GPG_TTY=$(tty){{ end }}
|
||||||
|
|
||||||
# overwrite ls
|
# overwrite ls
|
||||||
if command -v eza &> /dev/null; then
|
if command -v eza &> /dev/null; then
|
||||||
alias ls='eza --color=always --icons=always'
|
alias ls='eza --color=always --icons=always'
|
||||||
|
@ -3,20 +3,7 @@ return {
|
|||||||
"3rd/image.nvim",
|
"3rd/image.nvim",
|
||||||
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
|
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 = not vim.g.neovide and not vim.fn.has("goneovim") == 1 and not vim.fn.has("gui_running") == 1,
|
||||||
cond = function()
|
cond = require("tools.gui").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,
|
|
||||||
lazy = false,
|
lazy = false,
|
||||||
opts = {
|
opts = {
|
||||||
backend = "ueberzug",
|
backend = "ueberzug",
|
||||||
|
@ -1,20 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
-- { "psliwka/vim-smoothie" },
|
-- { "psliwka/vim-smoothie" },
|
||||||
{ "karb94/neoscroll.nvim",
|
{ "karb94/neoscroll.nvim",
|
||||||
cond = function()
|
cond = require("tools.gui").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,
|
|
||||||
opts = {
|
opts = {
|
||||||
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
|
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
|
||||||
'<C-u>', '<C-d>',
|
'<C-u>', '<C-d>',
|
||||||
|
@ -16,4 +16,21 @@ function M.is_graphical()
|
|||||||
return term_program or display or wayland and true or false
|
return term_program or display or wayland and true or false
|
||||||
end
|
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
|
return M
|
||||||
|
@ -3,9 +3,16 @@
|
|||||||
smudge = git-media-smudge %f
|
smudge = git-media-smudge %f
|
||||||
[user]
|
[user]
|
||||||
name = {{ .name | quote }}
|
name = {{ .name | quote }}
|
||||||
email = {{ .email | quote }}
|
email = {{ .email | quote }}{{ if .signingkey }}
|
||||||
|
signingkey = {{ .signingkey | quote }}{{ end }}
|
||||||
|
{{ if .signingkey }}
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
|
||||||
|
[tag]
|
||||||
|
gpgSign = true
|
||||||
|
{{ end }}
|
||||||
[core]
|
[core]
|
||||||
editor = vim
|
|
||||||
excludesfile = {{ joinPath .chezmoi.homeDir ".gitignore_global" }}
|
excludesfile = {{ joinPath .chezmoi.homeDir ".gitignore_global" }}
|
||||||
[difftool "sourcetree"]
|
[difftool "sourcetree"]
|
||||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||||
|
@ -189,6 +189,10 @@ test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell
|
|||||||
export PATH="$PATH:$HOME/bin"
|
export PATH="$PATH:$HOME/bin"
|
||||||
zinit light mass8326/zsh-chezmoi
|
zinit light mass8326/zsh-chezmoi
|
||||||
|
|
||||||
|
{{ if .signingkey }}
|
||||||
|
export GPG_TTY=$TTY{{ end }}
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
|
||||||
# 自動補上 noglob 並禁用 Zsh 的 globbing 解析
|
# 自動補上 noglob 並禁用 Zsh 的 globbing 解析
|
||||||
function git_pushmulti() {
|
function git_pushmulti() {
|
||||||
# 手動處理方括號或括號內容,並進行推送
|
# 手動處理方括號或括號內容,並進行推送
|
||||||
|
Loading…
x
Reference in New Issue
Block a user