diff --git a/.chezmoiignore b/.chezmoiignore index 6758a1d..41c8104 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -7,7 +7,7 @@ README.md .config/tmux/bootstraps # note that the pattern is not `dot_config/tmux/bootstraps` {{- end }} -{{- if (and (ne .chezmoi.hostname "arch") (ne .chezmoi.hostname "buzz")) }} +{{- if (not (eq .hosttype "desktop" "laptop")) }} .config/alacritty .config/conky .config/dunst diff --git a/dot_config/alacritty/alacritty.toml.tmpl b/dot_config/alacritty/alacritty.toml.tmpl index ebce2d8..e42de84 100644 --- a/dot_config/alacritty/alacritty.toml.tmpl +++ b/dot_config/alacritty/alacritty.toml.tmpl @@ -45,9 +45,9 @@ shape = "Block" TERM = "xterm-256color" [font] -{{- if eq .chezmoi.hostname "arch" }} +{{- if eq .hosttype "desktop" }} size = 7.5 -{{- else if eq .chezmoi.hostname "buzz" }} +{{- else if eq .hosttype "laptop" }} size = 5.5 {{- end }} diff --git a/dot_config/nvim/lua/core/options.lua.tmpl b/dot_config/nvim/lua/core/options.lua.tmpl index bedf761..0d9ff7b 100644 --- a/dot_config/nvim/lua/core/options.lua.tmpl +++ b/dot_config/nvim/lua/core/options.lua.tmpl @@ -58,7 +58,7 @@ vim.cmd(':ca mkdir. call mkdir(expand("%:p:h"), "p")') vim.cmd(':ca W! w !sudo -A tee %') {{- end }} -{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} +{{- if (and (eq .hosttype "desktop" "laptop") (eq .chezmoi.os "linux")) }} vim.cmd([[ autocmd InsertLeave * call system("fcitx5-remote -c") ]]) {{- end }} diff --git a/dot_config/starship.toml.tmpl b/dot_config/starship.toml.tmpl index 6f2f24f..a2f47f8 100644 --- a/dot_config/starship.toml.tmpl +++ b/dot_config/starship.toml.tmpl @@ -52,7 +52,7 @@ truncate_to_repo = false truncation_symbol = "" format = "[$path]($style)[$read_only]($read_only_style) " -{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} +{{- if eq .hosttype "desktop" "laptop" }} [directory.substitutions] "/mnt/" = " " "~/dev/" = "" diff --git a/dot_config/tmux/tmux.conf.tmpl b/dot_config/tmux/tmux.conf.tmpl index 69cac6c..8860c54 100644 --- a/dot_config/tmux/tmux.conf.tmpl +++ b/dot_config/tmux/tmux.conf.tmpl @@ -1,5 +1,5 @@ # 256 color -{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} +{{- if eq .hosttype "desktop" "laptop" }} set -g default-terminal "screen-256color" {{- else }} set -g default-terminal "tmux-256color" @@ -83,7 +83,7 @@ bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer" # Aesthetic ########################### -{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} +{{- if eq .hosttype "desktop" "laptop" }} set -g pane-active-border-style fg=yellow set -g message-command-style 'fg=#eeeeee bg=#333333 bold' set -g message-style 'fg=#eeeeee bg=#333333 bold' @@ -114,7 +114,7 @@ set -g window-status-current-format '' -{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} +{{- if eq .hosttype "desktop" "laptop" }} ############################################### # local and nested remote tmux sessions # - https://www.freecodecamp.org/news/tmux-in-practice-local-and-nested-remote-tmux-sessions-4f7ba5db8795/