From aca4f1d81491e09e4b0a409f31c2a6d94eab4b67 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 15 Sep 2023 14:58:52 -0700 Subject: [PATCH] Added early-init.alexanders-portable.zsh --- local/early-init.alexanders-portable.zsh | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 local/early-init.alexanders-portable.zsh diff --git a/local/early-init.alexanders-portable.zsh b/local/early-init.alexanders-portable.zsh new file mode 100644 index 0000000..c5acf3a --- /dev/null +++ b/local/early-init.alexanders-portable.zsh @@ -0,0 +1,28 @@ +# 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=2" +export _JAVA_AWT_WM_NONREPARENTING=1 + +add_ssh_keys() { + 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 + pass show ssh/notabug | ssh-add ~/.ssh/notabug + pass show ssh/aur | ssh-add ~/.ssh/aur +} + +# 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)" + if ! [[ -v WAYLAND_DISPLAY ]] && [ "${XDG_VTNR}" -eq 1 ]; then + pkill ssh-agent + fi + eval "$(ssh-agent)" + SSH_ASKPASS_REQUIRE="force" SSH_ASKPASS="/usr/local/bin/ssh-askpass-cat.sh" add_ssh_keys & + + if ! [[ -v WAYLAND_DISPLAY ]] && [ "${XDG_VTNR}" -eq 1 ]; then + exec Hyprland + fi +fi