From 7c01a7da041faad24e2eac2668ad7b4223ad1829 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 21 Jul 2022 00:03:41 -0400 Subject: [PATCH] ENH use switches in more places --- .chezmoi.yaml.tmpl | 2 +- .chezmoiexternal.yaml | 3 ++- .chezmoiignore | 11 +++++------ dot_bin/executable_bootstrap_pkgs.tmpl | 4 +++- ...ecutable_postswitch => executable_postswitch.tmpl} | 2 ++ dot_config/conda/condarc | 9 --------- dot_config/conda/condarc.tmpl | 9 +++++++++ dot_config/{greenclip.cfg => greenclip.cfg.tmpl} | 4 ++-- dot_config/zsh/{dot_zprofile => dot_zprofile.tmpl} | 2 ++ 9 files changed, 26 insertions(+), 20 deletions(-) rename dot_config/autorandr/{executable_postswitch => executable_postswitch.tmpl} (74%) delete mode 100644 dot_config/conda/condarc create mode 100644 dot_config/conda/condarc.tmpl rename dot_config/{greenclip.cfg => greenclip.cfg.tmpl} (61%) rename dot_config/zsh/{dot_zprofile => dot_zprofile.tmpl} (85%) diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index e6a33cb..2ff6733 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -22,7 +22,7 @@ data: xsane: {{ and $desktop (promptBool "xsane" false) }} f5vpn: {{ and $desktop (promptBool "f5vpn" false) }} seafile: {{ and $desktop (promptBool "seafile" false) }} - conky_alias: {{ and $desktop (promptString "conky" "null") }} + conky_alias: {{ and $desktop (promptString "conky" "none") }} development: {{- /* emacs implies that most development options are true */}} diff --git a/.chezmoiexternal.yaml b/.chezmoiexternal.yaml index cf34fd1..c9de467 100644 --- a/.chezmoiexternal.yaml +++ b/.chezmoiexternal.yaml @@ -10,10 +10,11 @@ .config/xmonad: type: git-repo url: https://github.com/ndwarshuis/xmonad-config.git +{{- end }} +{{- if ne .features.conky_alias "none" }} .config/conky: type: git-repo url: https://github.com/ndwarshuis/universal-conky.git - clone-args: --recurse-submodules {{- end }} {{- if .features.virtualbox }} .config/xman: diff --git a/.chezmoiignore b/.chezmoiignore index 383327b..a5e36d4 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -6,15 +6,14 @@ !.config/python !.config/tmux !.config/zsh -.config/zsh/.zprofile -.config/zsh/.zlogout .local {{- end }} -{{- if not .features.conky_alias }} -.config/conky.yml +{{ if ne .features.conky_alias "none" -}} +.symlinks/conky-configs {{- end }} -# this is linked; allow VirtualBox to configure by itself -VirtualBox.xml +{{ if not .features.virtualbox -}} +.symlinks/VirtualBox.xml +{{- end }} diff --git a/dot_bin/executable_bootstrap_pkgs.tmpl b/dot_bin/executable_bootstrap_pkgs.tmpl index 4c1c8ba..86d70ab 100644 --- a/dot_bin/executable_bootstrap_pkgs.tmpl +++ b/dot_bin/executable_bootstrap_pkgs.tmpl @@ -47,7 +47,7 @@ run_install_scripts() { run_yay() { # notifications - pkgs=(dunst) + pkgs=(dunst papirus-icon-theme) # gtk pkgs+=(zuki-themes) # sleep enhancement @@ -71,7 +71,9 @@ run_makepkg() { {{ if .features.clevo -}} call_makepkg "clevo-xsm-wmi-dkms" {{- end }} + {{ if ne .features.conky_alias "none" -}} call_makepkg "conky-lua" + {{- end }} call_makepkg "xkb-hypermode" } diff --git a/dot_config/autorandr/executable_postswitch b/dot_config/autorandr/executable_postswitch.tmpl similarity index 74% rename from dot_config/autorandr/executable_postswitch rename to dot_config/autorandr/executable_postswitch.tmpl index 6b3b735..fe0c88c 100644 --- a/dot_config/autorandr/executable_postswitch +++ b/dot_config/autorandr/executable_postswitch.tmpl @@ -2,5 +2,7 @@ feh --no-fehbg --bg-scale --bg-fill "$XDG_DATA_HOME/backgrounds/moon_forest.jpg" & +{{ if ne .features.conky_alias "none" -}} killall conky > /dev/null 2>&1 conky -d > /dev/null 2>&1 +{{- end }} diff --git a/dot_config/conda/condarc b/dot_config/conda/condarc deleted file mode 100644 index ee316e7..0000000 --- a/dot_config/conda/condarc +++ /dev/null @@ -1,9 +0,0 @@ -channels: - - conda-forge - - bioconda - -envs_dirs: - - ~/.local/share/conda/envs - -pkgs_dirs: - - ~/.local/share/conda/pkgs diff --git a/dot_config/conda/condarc.tmpl b/dot_config/conda/condarc.tmpl new file mode 100644 index 0000000..151d1fe --- /dev/null +++ b/dot_config/conda/condarc.tmpl @@ -0,0 +1,9 @@ +channels: + - conda-forge + - bioconda + +envs_dirs: + - {{ .paths.data }}/conda/envs + +pkgs_dirs: + - {{ .paths.data }}/conda/pkgs diff --git a/dot_config/greenclip.cfg b/dot_config/greenclip.cfg.tmpl similarity index 61% rename from dot_config/greenclip.cfg rename to dot_config/greenclip.cfg.tmpl index 61511df..359178c 100644 --- a/dot_config/greenclip.cfg +++ b/dot_config/greenclip.cfg.tmpl @@ -1,7 +1,7 @@ Config { maxHistoryLength = 100000, - historyPath = "~/.cache/greenclip.history", - staticHistoryPath = "~/.cache/greenclip.staticHistory", + historyPath = "{{ .paths.cache }}/greenclip.history", + staticHistoryPath = "{{ .paths.cache }}/greenclip.staticHistory", imageCachePath = "/tmp/greenclip/", usePrimarySelectionAsInput = False, blacklistedApps = [], diff --git a/dot_config/zsh/dot_zprofile b/dot_config/zsh/dot_zprofile.tmpl similarity index 85% rename from dot_config/zsh/dot_zprofile rename to dot_config/zsh/dot_zprofile.tmpl index 8727830..94092cd 100644 --- a/dot_config/zsh/dot_zprofile +++ b/dot_config/zsh/dot_zprofile.tmpl @@ -1,4 +1,6 @@ +{{ if .desktop -}} initfile="$XDG_CONFIG_HOME/X11/xinitrc" logfile="$XDG_DATA_HOME/X11/xinit.log" [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && \ exec startx "$initfile" -- -keeptty > "$logfile" 2>&1 +{{- end }}