diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index a100895..78973a3 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -15,6 +15,7 @@ data: virtualbox: {{ and $desktop (promptBool "virtualbox" false) }} xsane: {{ and $desktop (promptBool "xsane" false) }} f5vpn: {{ and $desktop (promptBool "f5vpn" false) }} + seafile: {{ and $desktop (promptBool "seafile" false) }} development: {{- /* emacs implies that most development options are true */}} emacs: {{ $emacs }} diff --git a/dot_config/X11/xinitrc b/dot_config/X11/xinitrc.tmpl similarity index 83% rename from dot_config/X11/xinitrc rename to dot_config/X11/xinitrc.tmpl index c6c4277..52d477a 100644 --- a/dot_config/X11/xinitrc +++ b/dot_config/X11/xinitrc.tmpl @@ -9,11 +9,13 @@ if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi -# TODO only do this if optimus is detected/desired +{{ if .features.optimus -}} /usr/bin/prime-offload > /dev/null 2>&1 +{{- end }} setxkbmap hypermode +{{ if .features.virtualbox -}} KEYS="Control_L=Escape" KEYS="$KEYS;Control_R=Return" KEYS="$KEYS;Super_L=Tab" @@ -21,14 +23,19 @@ KEYS="$KEYS;Super_R=backslash" KEYS="$KEYS;Alt_R=space" KEYS="$KEYS;ISO_Level3_Shift=XF86Search" xman -t 500 "$KEYS" "^VirtualBox Machine$" & +{{- end }} # TODO put xmonad-specific stuff in its own script tmuxctl start greenclip daemon & redshift > /dev/null 2>&1 & dunst & +{{ if .development.emacs -}} emacs-start & +{{- end }} +{{ if .features.seafile -}} seafile-applet > /dev/null 2>&1 & +{{- end }} flameshot > /dev/null 2>&1 & rofi-bw -d 3600 & diff --git a/dot_config/zsh/dot_zlogout b/dot_config/zsh/dot_zlogout deleted file mode 100644 index 51ad70d..0000000 --- a/dot_config/zsh/dot_zlogout +++ /dev/null @@ -1 +0,0 @@ -sudo /usr/bin/prime-switch > /dev/null 2>&1 diff --git a/dot_config/zsh/dot_zlogout.tmpl b/dot_config/zsh/dot_zlogout.tmpl new file mode 100644 index 0000000..11d58ac --- /dev/null +++ b/dot_config/zsh/dot_zlogout.tmpl @@ -0,0 +1,4 @@ +{{ if .features.optimus }} +# ASSUME this command is whitelisted in sudoers +sudo /usr/bin/prime-switch > /dev/null 2>&1 +{{- end}} diff --git a/dot_pam_environment.tmpl b/dot_pam_environment.tmpl index e5a9951..e49bbb7 100644 --- a/dot_pam_environment.tmpl +++ b/dot_pam_environment.tmpl @@ -105,13 +105,15 @@ PYLINTHOME DEFAULT=${XDG_CACHE_HOME}/pylint PYENV_ROOT DEFAULT=${XDG_DATA_HOME}/pyenv {{- end }} +{{ if .features.seafile -}} +# seafile +CCNET_CONF_DIR DEFAULT=${XDG_CONFIG_HOME}/ccnet +{{- end }} + {{ if .desktop -}} # gnucash AQBANKING_HOME DEFAULT=${XDG_CONFIG_HOME}/aqbanking -# seafile -CCNET_CONF_DIR DEFAULT=${XDG_CONFIG_HOME}/ccnet - # gtk2 GTK2_RC_FILES DEFAULT=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc