summaryrefslogtreecommitdiff
path: root/home/config/zsh/zprofile
blob: fe27d97951bc043926964a4e7a4b90c18ea65608 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# =================================================================== LOCALE ==
export LANG=en_US.UTF-8
export LC_COLLATE=C

# ================================================================== PROFILE ==
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
export LIBSEAT_BACKEND=logind

# Guix
. "$HOME/.guix-home/setup-environment"
"$HOME/.guix-home/on-first-login"
export GUIX_PROFILE

# NixOS
if [ -f "/run/current-system/profile/etc/profile.d/nix.sh" ]; then
    source /run/current-system/profile/etc/profile.d/nix.sh
fi

# ~/.local
export PATH="$PATH:$HOME/.local/bin"
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share"

# =================================================================== CONFIG ==

# wayland
export CLUTTER_BACKEND=wayland
export ELM_DISPLAY=wl
export XDG_SESSION_TYPE=wayland
export GDK_BACKEND=wayland,x11
export SDL_VIDEODRIVER=wayland

# java
export _JAVA_AWT_WM_NONREPARENTING=1

# mozilla
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1

# qt
export QT_QPA_PLATFORM="wayland;xcb"
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1

# programs
export TERMINAL=kitty
export EDITOR=nvim
export CC="$(which gcc)"
export LD="$(which gcc)"

# ricing
export QT_QPA_PLATFORM_THEME=gtk2
export GTK_THEME=Orchis-Teal-Dark
export XCURSOR_THEME=Adwaita
export XCURSOR_SIZE=24

# certs
export SSL_CERT_FILE=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt
export SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs

# ==================================================================== ENTRY ==

# dont prompt tmux to start
# another graphical env
if [ -n "$TMUX" ]; then
    return
fi

# prompt the user logging in (me)
# for which graphical env i want to use

clear
printf "\t\n\t\n\t\n\t\n"
printf "\tPlease select an environment...\n"
printf "\t[S]way [H]yprland [T]erminal [E]xit\n"
printf "\t\n\t\n\t"

while true; do
    stty raw -echo
    choice=$(dd bs=1 count=1 2> /dev/null)
    stty -raw echo
    case "$choice" in
        "s")
            echo "Launching sway..."
            export XDG_CURRENT_DESKTOP=sway
            exec dbus-run-session sway &> $HOME/.log/sway
            ;;
        "h")
            echo "Launching Hyprland..."
            export XDG_CURRENT_DESKTOP=Hyprland
            exec dbus-run-session Hyprland &> $HOME/.log/Hyprland
            ;;
        "t")
            exec cage -s kitty -- -o font_size=14 &> $HOME/.log/kitty
            ;;
        "e")
            exit
            ;;
        "d")
            break
            ;;
    esac
done