-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zprofile
38 lines (32 loc) · 1.54 KB
/
dot_zprofile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[[ -f ~/.login_env ]] && . ~/.login_env
# Start keychain on login
eval $(keychain --eval --quiet ~/.ssh/test_nopasswd ~/.ssh/github)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Automatically start X or sway on TTY1
if [ -z "$DISPLAY" ] && [[ "$(tty)" = '/dev/tty1' ]]; then
if $(which sway &>/dev/null) && [[ -n "$USE_SWAY" ]] ; then
# make sure toolkits are forced to use wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export AWT_TOOLKIT=MToolkit
# TEMPORARY disable enforcement of Wayland support in apps
# According to https://github.com/swaywm/sway/wiki/Running-programs-natively-under-wayland
# GDK_BACKEND should not be set
#export GDK_BACKEND=wayland # unset for electron apps
#export QT_QPA_PLATFORM=wayland
#export QT_QPA_PLATFORMTHEME=qt5ct
#export CLUTTER_BACKEND=wayland
#export SDL_VIDEODRIVER=wayland
#export XDG_SESSION_TYPE=wayland
#export XDG_SESSION_DESKTOP=sway
#export XDG_CURRENT_DESKTOP=sway
# Make Java apps look less shitty
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
pkd=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
[ -x "$pkd" ] && exec "$pkd" &
exec sway &> ~/.sway.log &
else
# Make Java apps look less shitty
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
exec startx
fi
fi