ENH make nice config file to configure which apps/vars I need
This commit is contained in:
parent
e508b9e595
commit
4d0f966d12
|
@ -1,3 +1,27 @@
|
||||||
diff:
|
diff:
|
||||||
args: --color
|
args: --color
|
||||||
pager: less -r
|
pager: less -r
|
||||||
|
|
||||||
|
{{- $desktop := promptBool "desktop" false }}
|
||||||
|
data:
|
||||||
|
desktop: {{ $desktop }}
|
||||||
|
features:
|
||||||
|
{{- if $desktop }}
|
||||||
|
ansible: {{ promptBool "ansible" true }}
|
||||||
|
{{- end }}
|
||||||
|
development:
|
||||||
|
{{- if $desktop }}
|
||||||
|
{{- $emacs := promptBool "emacs" true }}
|
||||||
|
{{- /* emacs implies that most development options are true */}}
|
||||||
|
emacs: {{ $emacs }}
|
||||||
|
ruby: {{ or $emacs promptBool "ruby development" true }}
|
||||||
|
python: {{ or $emacs promptBool "python development" true }}
|
||||||
|
rust: {{ or $emacs promptBool "rust development" true }}
|
||||||
|
clojure: {{ or $emacs promptBool "clojure development" true }}
|
||||||
|
latex: {{ or $emacs promptBool "LaTeX development" true }}
|
||||||
|
r: {{ or $emacs promptBool "R development" true }}
|
||||||
|
conda: {{ or $emacs promptBool "conda" true }}
|
||||||
|
{{- /* these aren't implied by emacs */}}
|
||||||
|
matlab: {{ or $emacs promptBool "MATLAB development" true }}
|
||||||
|
github: {{ promptBool "GitHub development" true }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{- if ne .chezmoi.hostname "petrucci4prez" }}
|
{{- if not .desktop }}
|
||||||
.bin
|
.bin
|
||||||
|
|
||||||
.config/*
|
.config/*
|
||||||
|
|
|
@ -9,6 +9,7 @@ if [ -f "$userresources" ]; then
|
||||||
xrdb -merge "$userresources"
|
xrdb -merge "$userresources"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO only do this if optimus is detected/desired
|
||||||
/usr/bin/prime-offload > /dev/null 2>&1
|
/usr/bin/prime-offload > /dev/null 2>&1
|
||||||
|
|
||||||
setxkbmap hypermode
|
setxkbmap hypermode
|
||||||
|
@ -21,13 +22,13 @@ 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$" &
|
||||||
|
|
||||||
|
# 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 &
|
||||||
emacs-start &
|
emacs-start &
|
||||||
seafile-applet > /dev/null 2>&1 &
|
seafile-applet > /dev/null 2>&1 &
|
||||||
nm-applet > /dev/null 2>&1 &
|
|
||||||
flameshot > /dev/null 2>&1 &
|
flameshot > /dev/null 2>&1 &
|
||||||
rofi-bw -d 3600 &
|
rofi-bw -d 3600 &
|
||||||
|
|
||||||
|
@ -35,6 +36,5 @@ autorandr --change > /dev/null
|
||||||
picom --config "$XDG_CONFIG_HOME/picom.conf" -b
|
picom --config "$XDG_CONFIG_HOME/picom.conf" -b
|
||||||
|
|
||||||
numlockx on
|
numlockx on
|
||||||
xss-lock --ignore-sleep screenlock &
|
|
||||||
|
|
||||||
exec xmonad
|
exec xmonad
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#R_HOME_USER = ${XDG_DATA_HOME}/r
|
|
||||||
#R_LIBS_USER = ${R_HOME_USER}/x86_64-pc-linux-gnu-library/
|
|
||||||
R_PROFILE_USER = ${XDG_CONFIG_HOME}/r/Rprofile.r
|
R_PROFILE_USER = ${XDG_CONFIG_HOME}/r/Rprofile.r
|
||||||
R_MAKEVARS_USER = ${XDG_CONFIG_HOME}/r/Makevars
|
R_MAKEVARS_USER = ${XDG_CONFIG_HOME}/r/Makevars
|
||||||
# this shouldn't be needed because ESS overrides it
|
# this is only needed when running through the CLI (not emacs)
|
||||||
R_HISTFILE = ${XDG_HOME_USER}/session.Rhistory
|
R_HISTFILE = ${XDG_CONFIG_HOME}/r/session.Rhistory
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
## .First <- function() {
|
|
||||||
## message("R is the best\n","working directory is:", getwd())
|
|
||||||
## }
|
|
||||||
|
|
||||||
## TODO make this find .Rprofiles in parent directories
|
## TODO make this find .Rprofiles in parent directories
|
||||||
if ( ".Rprofile" %in% list.files(all.files = TRUE) ) {
|
if ( ".Rprofile" %in% list.files(all.files = TRUE) ) {
|
||||||
message("Sourcing local .Rprofile")
|
message("Sourcing local .Rprofile")
|
||||||
|
|
|
@ -9,3 +9,4 @@ features:
|
||||||
virtualbox: true
|
virtualbox: true
|
||||||
xsane: true
|
xsane: true
|
||||||
battery: true
|
battery: true
|
||||||
|
f5vpn: true
|
||||||
|
|
|
@ -1,89 +1,139 @@
|
||||||
#--------------------#
|
# path (include ~/.bin and ~/.local/bin)
|
||||||
# XDG Overrides
|
PATH OVERRIDE={{ .chezmoi.homeDir }}/.bin:{{ .chezmoi.homeDir }}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
|
||||||
#--------------------#
|
|
||||||
|
|
||||||
|
# default directories
|
||||||
XDG_CONFIG_HOME DEFAULT={{ .chezmoi.homeDir }}/.config
|
XDG_CONFIG_HOME DEFAULT={{ .chezmoi.homeDir }}/.config
|
||||||
XDG_CACHE_HOME DEFAULT={{ .chezmoi.homeDir }}/.cache
|
XDG_CACHE_HOME DEFAULT={{ .chezmoi.homeDir }}/.cache
|
||||||
XDG_DATA_HOME DEFAULT={{ .chezmoi.homeDir }}/.local/share
|
XDG_DATA_HOME DEFAULT={{ .chezmoi.homeDir }}/.local/share
|
||||||
XDG_RUNTIME_DIR DEFAULT=/run/user/{{ output "id" "-u" | trim }}
|
XDG_RUNTIME_DIR DEFAULT=/run/user/{{ output "id" "-u" | trim }}
|
||||||
|
|
||||||
|
# super common tools
|
||||||
|
PAGER DEFAULT=less
|
||||||
|
INPUTRC DEFAULT=${XDG_CONFIG_HOME}/readline/inputrc
|
||||||
|
LESSKEY DEFAULT=${XDG_CONFIG_HOME}/less/lesskey
|
||||||
|
LESSHISTFILE DEFAULT=-
|
||||||
|
GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupg
|
||||||
|
EDITOR DEFAULT=vim
|
||||||
|
|
||||||
|
# AWS (all will suffer...)
|
||||||
AWS_SHARED_CREDENTIALS_FILE DEFAULT=${XDG_CONFIG_HOME}/aws/credentials
|
AWS_SHARED_CREDENTIALS_FILE DEFAULT=${XDG_CONFIG_HOME}/aws/credentials
|
||||||
AWS_CONFIG_FILE DEFAULT=${XDG_CONFIG_HOME}/aws/config
|
AWS_CONFIG_FILE DEFAULT=${XDG_CONFIG_HOME}/aws/config
|
||||||
|
|
||||||
{{- if eq .chezmoi.hostname "petrucci4prez" }}
|
# cache compiled bits; highly recommended for makepkg
|
||||||
AQBANKING_HOME DEFAULT=${XDG_CONFIG_HOME}/aqbanking
|
CCACHE_CONFIGPATH DEFAULT=${XDG_CONFIG_HOME}/ccache.config
|
||||||
|
CCACHE_DIR DEFAULT=${XDG_CACHE_HOME}/ccache
|
||||||
|
|
||||||
|
# REPL stuff
|
||||||
|
NODE_REPL_HISTORY DEFAULT=${XDG_DATA_HOME}/npm/node_repl.log
|
||||||
|
PYTHONSTARTUP DEFAULT=${XDG_CONFIG_HOME}/python/startup.py
|
||||||
|
|
||||||
|
# shell stuff
|
||||||
|
HISTFILE DEFAULT=${XDG_DATA_HOME}/zsh_history.log
|
||||||
|
HISTSIZE DEFAULT=1000000
|
||||||
|
SAVEHIST DEFAULT=1000000
|
||||||
|
ZDOTDIR DEFAULT=${XDG_CONFIG_HOME}/zsh
|
||||||
|
|
||||||
|
# X11 forwarding (required even without a full X11 server)
|
||||||
|
ICEAUTHORITY DEFAULT=${XDG_CACHE_DIR}/ICEauthority
|
||||||
|
XAUTHORITY DEFAULT=${XDG_RUNTIME_DIR}/Xauthority
|
||||||
|
|
||||||
|
{{ if .features.ansible -}}
|
||||||
|
# ansible
|
||||||
ANSIBLE_VAULT_PASSWORD_FILE DEFAULT=@{HOME}/.bin/ansible-vault-pass-client
|
ANSIBLE_VAULT_PASSWORD_FILE DEFAULT=@{HOME}/.bin/ansible-vault-pass-client
|
||||||
ANSIBLE_VAULT_IDENTITY DEFAULT=ansible/vault
|
ANSIBLE_VAULT_IDENTITY DEFAULT=ansible/vault
|
||||||
ASPELL_CONF DEFAULT="per-conf ${XDG_CONFIG_HOME}/aspell/aspell.conf; personal ${XDG_CONFIG_HOME}/aspell/en.pws; repl ${XDG_CONFIG_HOME}/aspell/en.prepl"
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.emacs -}}
|
||||||
|
# emacs
|
||||||
|
MU_HOME DEFAULT=${XDG_CACHE_HOME}/mu
|
||||||
|
MAILDIR DEFAULT=/mnt/data/Mail
|
||||||
|
ASPELL_CONF DEFAULT="per-conf ${XDG_CONFIG_HOME}/aspell/aspell.conf; personal ${XDG_CONFIG_HOME}/aspell/en.pws; repl ${XDG_CONFIG_HOME}/aspell/en.prepl"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.ruby -}}
|
||||||
|
# ruby development
|
||||||
|
RBENV_ROOT DEFAULT=${XDG_DATA_HOME}/rbenv
|
||||||
BUNDLE_USER_CONFIG DEFAULT=${XDG_CONFIG_HOME}/bundle
|
BUNDLE_USER_CONFIG DEFAULT=${XDG_CONFIG_HOME}/bundle
|
||||||
BUNDLE_USER_CACHE DEFAULT=${XDG_CACHE_HOME}/bundle
|
BUNDLE_USER_CACHE DEFAULT=${XDG_CACHE_HOME}/bundle
|
||||||
BUNDLE_USER_PLUGIN DEFAULT=${XDG_DATA_HOME}/bundle
|
BUNDLE_USER_PLUGIN DEFAULT=${XDG_DATA_HOME}/bundle
|
||||||
CARGO_HOME DEFAULT=${XDG_DATA_HOME}/cargo
|
|
||||||
CCACHE_CONFIGPATH DEFAULT=${XDG_CONFIG_HOME}/ccache.config
|
|
||||||
CCACHE_DIR DEFAULT=${XDG_CACHE_HOME}/ccache
|
|
||||||
CCNET_CONF_DIR DEFAULT=${XDG_CONFIG_HOME}/ccnet
|
|
||||||
CONDARC DEFAULT=${XDG_CONFIG_HOME}/conda/condarc
|
|
||||||
GEM_HOME DEFAULT=${XDG_DATA_HOME}/gem
|
GEM_HOME DEFAULT=${XDG_DATA_HOME}/gem
|
||||||
GEM_SPEC_CACHE DEFAULT=${XDG_CACHE_HOME}/gem
|
GEM_SPEC_CACHE DEFAULT=${XDG_CACHE_HOME}/gem
|
||||||
GRIPHOME DEFAULT=${XDG_CONFIG_HOME}/grip
|
{{- end }}
|
||||||
GTK2_RC_FILES DEFAULT=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc
|
|
||||||
IPYTHONDIR DEFAULT=${XDG_CONFIG_HOME}/ipython
|
{{ if .development.rust -}}
|
||||||
|
# rust development
|
||||||
|
CARGO_HOME DEFAULT=${XDG_DATA_HOME}/cargo
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.clojure -}}
|
||||||
|
# clojure development
|
||||||
LEIN_HOME DEFAULT=${XDG_DATA_HOME}/lein
|
LEIN_HOME DEFAULT=${XDG_DATA_HOME}/lein
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.matlab -}}
|
||||||
|
# matlab development (if I must...)
|
||||||
MATLAB_PREFDIR DEFAULT=${XDG_CONFIG_HOME}/matlab
|
MATLAB_PREFDIR DEFAULT=${XDG_CONFIG_HOME}/matlab
|
||||||
MATLAB_LOG_DIR DEFAULT=${XDG_DATA_HOME}/matlab/log
|
MATLAB_LOG_DIR DEFAULT=${XDG_DATA_HOME}/matlab/log
|
||||||
MU_HOME DEFAULT=${XDG_CACHE_HOME}/mu
|
# required for matlab's silly GUI to work with xmonad
|
||||||
MAILDIR DEFAULT=/mnt/data/Mail
|
_JAVA_AWT_WM_NONREPARENTING DEFAULT=1
|
||||||
PAGER DEFAULT=less
|
{{- end }}
|
||||||
PYLINTHOME DEFAULT=${XDG_CACHE_HOME}/pylint
|
|
||||||
PYENV_ROOT DEFAULT=${XDG_DATA_HOME}/pyenv
|
{{ if .development.r -}}
|
||||||
|
# R development
|
||||||
R_ENVIRON_USER DEFAULT=${XDG_CONFIG_HOME}/r/Renviron
|
R_ENVIRON_USER DEFAULT=${XDG_CONFIG_HOME}/r/Renviron
|
||||||
RBENV_ROOT DEFAULT=${XDG_DATA_HOME}/rbenv
|
{{- end }}
|
||||||
STACK_ROOT DEFAULT=${XDG_DATA_HOME}/stack
|
|
||||||
|
{{ if .development.latex -}}
|
||||||
|
# LaTeX writing...I mean...development
|
||||||
TEXMFHOME DEFAULT=${XDG_CONFIG_HOME}/texmf
|
TEXMFHOME DEFAULT=${XDG_CONFIG_HOME}/texmf
|
||||||
RXVT_SOCKET DEFAULT=${XDG_RUNTIME_DIR}/urxvt/urxvtd-node
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.github -}}
|
||||||
|
# Github development (for READMEs)
|
||||||
|
GRIPHOME DEFAULT=${XDG_CONFIG_HOME}/grip
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.conda -}}
|
||||||
|
# conda development
|
||||||
|
CONDARC DEFAULT=${XDG_CONFIG_HOME}/conda/condarc
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if .development.python -}}
|
||||||
|
# python development
|
||||||
|
IPYTHONDIR DEFAULT=${XDG_CONFIG_HOME}/ipython
|
||||||
|
PYLINTHOME DEFAULT=${XDG_CACHE_HOME}/pylint
|
||||||
|
PYENV_ROOT DEFAULT=${XDG_DATA_HOME}/pyenv
|
||||||
|
{{- 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
|
||||||
|
|
||||||
|
# xft fonts
|
||||||
|
GDK_USE_XFT DEFAULT=1
|
||||||
|
QT_XFT DEFAULT=true
|
||||||
|
|
||||||
|
# QT (which should look like gtk)
|
||||||
|
QT_QPA_PLATFORMTHEME DEFAULT=qt5ct
|
||||||
|
|
||||||
|
# libreoffice?
|
||||||
|
SAL_USE_VCLPLUGIN DEFAULT=gtk
|
||||||
|
|
||||||
|
# store passwords in gnupg directory (which is then encrypted)
|
||||||
|
PASSWORD_STORE_DIR DEFAULT=${GNUPGHOME}/pass
|
||||||
|
|
||||||
|
# X11
|
||||||
XINITRC DEFAULT=${XDG_CONFIG_HOME}/X11/xinitrc
|
XINITRC DEFAULT=${XDG_CONFIG_HOME}/X11/xinitrc
|
||||||
|
|
||||||
|
# xmonad (and haskell)
|
||||||
|
STACK_ROOT DEFAULT=${XDG_DATA_HOME}/stack
|
||||||
XMONAD_CACHE_DIR DEFAULT=${XDG_CACHE_HOME}/xmonad
|
XMONAD_CACHE_DIR DEFAULT=${XDG_CACHE_HOME}/xmonad
|
||||||
XMONAD_CONFIG_DIR DEFAULT=${XDG_CONFIG_HOME}/xmonad
|
XMONAD_CONFIG_DIR DEFAULT=${XDG_CONFIG_HOME}/xmonad
|
||||||
XMONAD_DATA_DIR DEFAULT=${XDG_DATA_HOME}/xmonad
|
XMONAD_DATA_DIR DEFAULT=${XDG_DATA_HOME}/xmonad
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
INPUTRC DEFAULT=${XDG_CONFIG_HOME}/readline/inputrc
|
|
||||||
NODE_REPL_HISTORY DEFAULT=${XDG_DATA_HOME}/npm/node_repl.log
|
|
||||||
PYTHONSTARTUP DEFAULT=${XDG_CONFIG_HOME}/python/startup.py
|
|
||||||
LESSKEY DEFAULT=${XDG_CONFIG_HOME}/less/lesskey
|
|
||||||
LESSHISTFILE DEFAULT=-
|
|
||||||
HISTFILE DEFAULT=${XDG_DATA_HOME}/zsh_history.log
|
|
||||||
HISTSIZE DEFAULT=1000000
|
|
||||||
SAVEHIST DEFAULT=1000000
|
|
||||||
ICEAUTHORITY DEFAULT=${XDG_CACHE_DIR}/ICEauthority
|
|
||||||
XAUTHORITY DEFAULT=${XDG_RUNTIME_DIR}/Xauthority
|
|
||||||
ZDOTDIR DEFAULT=${XDG_CONFIG_HOME}/zsh
|
|
||||||
|
|
||||||
# store passwords in gnupg directory (and then encrypt the entire thing with veracrypt)
|
|
||||||
GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupg
|
|
||||||
{{- if eq .chezmoi.hostname "petrucci4prez" }}
|
|
||||||
PASSWORD_STORE_DIR DEFAULT=${GNUPGHOME}/pass
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
#--------------------#
|
|
||||||
# Path
|
|
||||||
#--------------------#
|
|
||||||
|
|
||||||
PATH OVERRIDE={{ .chezmoi.homeDir }}/.bin:{{ .chezmoi.homeDir }}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
|
|
||||||
|
|
||||||
#--------------------#
|
|
||||||
# Applications
|
|
||||||
#--------------------#
|
|
||||||
EDITOR DEFAULT=vim
|
|
||||||
|
|
||||||
{{- if eq .chezmoi.hostname "petrucci4prez" }}
|
|
||||||
GDK_USE_XFT DEFAULT=1
|
|
||||||
QT_XFT DEFAULT=true
|
|
||||||
SAL_USE_VCLPLUGIN DEFAULT=gtk
|
|
||||||
QT_QPA_PLATFORMTHEME DEFAULT=qt5ct
|
|
||||||
|
|
||||||
# this is needed to make MATLAB work with
|
|
||||||
# xmonad and other godly window managers
|
|
||||||
_JAVA_AWT_WM_NONREPARENTING DEFAULT=1
|
|
||||||
{{- end }}
|
|
||||||
|
|
Loading…
Reference in New Issue