dotfiles-guix/home/config/zsh/zprofile
2025-01-03 09:03:08 -05:00

102 lines
2.5 KiB
Bash

# =================================================================== 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