Added local-early.zsh.example
This commit is contained in:
parent
37ba6f3f40
commit
a8d1c8cd31
45
local-early.zsh.example
Normal file
45
local-early.zsh.example
Normal file
@ -0,0 +1,45 @@
|
||||
# Some extra environment variables
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
export JDK_JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dsun.java2d.opengl=true -Dsun.java2d.uiScale=3"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export DEBUGINFOD_URLS="https://debuginfod.archlinux.org"
|
||||
|
||||
add_ssh_keys() {
|
||||
pass show ssh/desktop | ssh-add ~/.ssh/desktop
|
||||
pass show ssh/notabug | ssh-add ~/.ssh/notabug
|
||||
pass show ssh/personal_gitea | ssh-add ~/.ssh/personal_gitea
|
||||
pass show ssh/personal_server | ssh-add ~/.ssh/personal_server
|
||||
pass show ssh/gandi_vps | ssh-add ~/.ssh/gandi_vps
|
||||
}
|
||||
|
||||
# Because I use zsh to start X11
|
||||
if [[ -o login ]]; then
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
eval "$(gnome-keyring-daemon --start 2>/dev/null)"
|
||||
eval "$(ssh-agent)"
|
||||
SSH_ASKPASS_REQUIRE="force" SSH_ASKPASS="/usr/local/bin/ssh-askpass-cat.sh" add_ssh_keys
|
||||
|
||||
if ! [[ -v DISPLAY ]] && [ "${XDG_VTNR}" -eq 1 ]; then
|
||||
startx
|
||||
sudo prime-switch
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
function define_java_alias() {
|
||||
name="${1}"
|
||||
eval $'function "${name}" {
|
||||
if ! [[ -v JAVA_HOME ]]; then
|
||||
command "${0}" "${@}"
|
||||
else
|
||||
"${JAVA_HOME}/bin/${0}" "${@}"
|
||||
fi
|
||||
}'
|
||||
unset name
|
||||
}
|
||||
define_java_alias 'java'
|
||||
define_java_alias 'javac'
|
||||
define_java_alias 'jshell'
|
||||
define_java_alias 'jar'
|
||||
unfunction define_java_alias
|
Loading…
Reference in New Issue
Block a user