ENH use switches to control login/logout

This commit is contained in:
Nathan Dwarshuis 2022-07-20 20:39:01 -04:00
parent 8a45bd526a
commit bb98297669
5 changed files with 18 additions and 5 deletions

View File

@ -15,6 +15,7 @@ data:
virtualbox: {{ and $desktop (promptBool "virtualbox" false) }} virtualbox: {{ and $desktop (promptBool "virtualbox" false) }}
xsane: {{ and $desktop (promptBool "xsane" false) }} xsane: {{ and $desktop (promptBool "xsane" false) }}
f5vpn: {{ and $desktop (promptBool "f5vpn" false) }} f5vpn: {{ and $desktop (promptBool "f5vpn" false) }}
seafile: {{ and $desktop (promptBool "seafile" false) }}
development: development:
{{- /* emacs implies that most development options are true */}} {{- /* emacs implies that most development options are true */}}
emacs: {{ $emacs }} emacs: {{ $emacs }}

View File

@ -9,11 +9,13 @@ if [ -f "$userresources" ]; then
xrdb -merge "$userresources" xrdb -merge "$userresources"
fi fi
# TODO only do this if optimus is detected/desired {{ if .features.optimus -}}
/usr/bin/prime-offload > /dev/null 2>&1 /usr/bin/prime-offload > /dev/null 2>&1
{{- end }}
setxkbmap hypermode setxkbmap hypermode
{{ if .features.virtualbox -}}
KEYS="Control_L=Escape" KEYS="Control_L=Escape"
KEYS="$KEYS;Control_R=Return" KEYS="$KEYS;Control_R=Return"
KEYS="$KEYS;Super_L=Tab" KEYS="$KEYS;Super_L=Tab"
@ -21,14 +23,19 @@ KEYS="$KEYS;Super_R=backslash"
KEYS="$KEYS;Alt_R=space" KEYS="$KEYS;Alt_R=space"
KEYS="$KEYS;ISO_Level3_Shift=XF86Search" KEYS="$KEYS;ISO_Level3_Shift=XF86Search"
xman -t 500 "$KEYS" "^VirtualBox Machine$" & xman -t 500 "$KEYS" "^VirtualBox Machine$" &
{{- end }}
# TODO put xmonad-specific stuff in its own script # TODO put xmonad-specific stuff in its own script
tmuxctl start tmuxctl start
greenclip daemon & greenclip daemon &
redshift > /dev/null 2>&1 & redshift > /dev/null 2>&1 &
dunst & dunst &
{{ if .development.emacs -}}
emacs-start & emacs-start &
{{- end }}
{{ if .features.seafile -}}
seafile-applet > /dev/null 2>&1 & seafile-applet > /dev/null 2>&1 &
{{- end }}
flameshot > /dev/null 2>&1 & flameshot > /dev/null 2>&1 &
rofi-bw -d 3600 & rofi-bw -d 3600 &

View File

@ -1 +0,0 @@
sudo /usr/bin/prime-switch > /dev/null 2>&1

View File

@ -0,0 +1,4 @@
{{ if .features.optimus }}
# ASSUME this command is whitelisted in sudoers
sudo /usr/bin/prime-switch > /dev/null 2>&1
{{- end}}

View File

@ -105,13 +105,15 @@ PYLINTHOME DEFAULT=${XDG_CACHE_HOME}/pylint
PYENV_ROOT DEFAULT=${XDG_DATA_HOME}/pyenv PYENV_ROOT DEFAULT=${XDG_DATA_HOME}/pyenv
{{- end }} {{- end }}
{{ if .features.seafile -}}
# seafile
CCNET_CONF_DIR DEFAULT=${XDG_CONFIG_HOME}/ccnet
{{- end }}
{{ if .desktop -}} {{ if .desktop -}}
# gnucash # gnucash
AQBANKING_HOME DEFAULT=${XDG_CONFIG_HOME}/aqbanking AQBANKING_HOME DEFAULT=${XDG_CONFIG_HOME}/aqbanking
# seafile
CCNET_CONF_DIR DEFAULT=${XDG_CONFIG_HOME}/ccnet
# gtk2 # gtk2
GTK2_RC_FILES DEFAULT=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc GTK2_RC_FILES DEFAULT=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc