-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.profile
More file actions
executable file
·170 lines (148 loc) · 4.7 KB
/
Copy path.profile
File metadata and controls
executable file
·170 lines (148 loc) · 4.7 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/sh
# ~/.profile
#
# do the shellcheck y stuff disable=1091
#
# Put stuff here that you only want sourced when
# initializing login shells
[ $ALREADY_BEEN_HERE ] && return
export KERNEL="$(uname)"
. "$HOME/.mancolors"
. "$HOME/.config/lf/ico"
. "$HOME/.secret"
append_path() {
case ":$PATH:" in
*:"$1":*) ;;
*)
PATH="${PATH:+$PATH:}$1"
;;
esac
}
append_path $HOME/bin
append_path $HOME/.local/bin
append_path $HOME/.local/share/go/bin
# append_path $(ruby -r rubygems -e 'puts Gem.user_dir')/bin
unset append_path
export PATH
# Default Programs
export EDITOR="edit"
export VISUAL="$EDITOR"
export TERMINAL="kitty -1" # "wezterm"
# export TERM=xterm-kitty
export BROWSER="firefox-nightly" # firedragon librewolf firefox qutebrowser
export PAGER="nvimpager -p"
export FILEMAN="yazi"
export TASKMAN="htop" # btop "ytop -p" btm
export MUSICPLAYER="ncmpcpp"
export NEWSREADER="newsboat"
export READER="zathura"
export MAILREADER="neomutt"
export STATUSBAR="waybar"
# RICE!!!!!
export FONT="Mononoki Nerd Font"
export FONT_SIZE="11"
export GTK_THEME="oomox"
export QT_QPA_PLATFORMTHEME="gtk3"
# Program Configuration
export NH_FLAKE="$HOME"
export LYNX_CFG="$HOME/.lynxrc"
# Because some programs can't find the pulse cookie on their own I guess
export PULSE_COOKIE="$HOME/.pulse-cookie"
# XDG AppDirs
## NOTE: symlinked to ~/.local/etc and ~/etc
export XDG_CONFIG_HOME="$HOME/.config"
## TODO: symlink to ~/.local/cache or ~/cache or ~/var/cache?
export XDG_CACHE_HOME="$HOME/.cache"
## TODO: symlink to ~/share?
export XDG_DATA_HOME="$HOME/.local/share"
## TODO: symlink to ~/var/log?
export XDG_STATE_HOME="$HOME/.local/state"
## Wine
export WINEESYNC=1
export WINEFSYNC=1
# export STAGING_SHARED_MEMORY=1
# export STAGING_WRITECOPY=1
## DXVK
export DXVK_HUD="compiler"
export DXVK_ASYNC=0
## Graphics
export AMDVLK_ENABLE_DEVELOPING_EXT="all"
export ENABLE_VKBASALT=0
export RUSTICL_ENABLE=radeonsi
# export mesa_glthread=true
# export RADV_FORCE_VRS="2x2"
export RADV_PERFTEST="rt,sam,nv_ms" # pswave32,gewave32,cswave32
export VAAPI_MPEG4_ENABLED=true
# Dev Environment
export GOPATH="$XDG_DATA_HOME/go"
export CLASSPATH="$CLASSPATH:/usr/share/java/*"
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
## LaTeX plugins
export TEXINPUTS="$HOME/doc/tex/*/:$TEXINPUTS"
[ "$TERM" = linux ] \
&& [ -f "$XDG_CACHE_HOME/wal/colors-tty.sh" ] \
&& . "$XDG_CACHE_HOME/wal/colors-tty.sh"
if [ "$KERNEL" = "Linux" ]; then
[ -d "$HOME/.themes/$GTK_THEME" ] || {
echo >&2 "Error: $GTK_THEME is not installed."
echo "Fix this right now!"
}
fi
# my super simple login manager
[ "$WAYLAND_DISPLAY" ] || [ "$DISPLAY" ] || [ "$SSH_TTY" ] || [ "$TMUX" ] || [ "$TERM_PROGRAM" ] || {
login_options=$(
cat <<EOF
tty
sway
xorg
hyprland
EOF
)
[ "$SSH_AGENT_PID" ] || {
eval "$(ssh-agent)"
[ -f "$HOME/.ssh/id_rsa" ] && ssh-add "$HOME/.ssh/id_rsa"
[ -f "$HOME/.ssh/id_ed25519" ] && ssh-add "$HOME/.ssh/id_ed25519"
}
header="How do you wish to log in?"
disp=$(echo "$login_options" | fzf --header "$header" --header-first)
case $disp in
tty)
ALREADY_BEEN_HERE=1
;;
xorg)
# Set up multi-monitor FreeSync correctly by piggy-backing off wayland's better FreeSync support
# sway &
# sleep 5
# SWAYSOCK="/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock" sway exit
startx
;;
sway | hyprland)
# export WLR_RENDERER=vulkan
# export QT_QPA_PLATFORM=wayland
# export SDL_VIDEODRIVER=wayland
# export XDG_CURRENT_DESKTOP="$disp"
export MOZ_ENABLE_WAYLAND=1
export ELECTRON_OZONE_PLATFORM_HINT=wayland
if hash uwsm 2>/dev/null && uwsm check may-start; then # && uwsm select
exec uwsm start "${disp}-uwsm.desktop"
else
case $disp in sway) flags='--unsupported-gpu' ;; esac
exec $disp $flags
fi
;;
esac
}
[ "$TERM" = linux ] && {
echo "NOTE: Setting repeat and delay rate (Requires root)"
sudo -n kbdrate -r 35 -d 150 >/dev/null
# TODO: Remap caps lock and escape using interception
echo "NOTE: Remapping keys (Requires root)"
sudo loadkeys .config/root/etc/keystrings
}
source_if_exists() { [ -e "$1" ] && . "$1"; }
source_if_exists "$HOME/.nix-profile/etc/profile.d/nix.sh" # added by Nix installer
source_if_exists "$HOME/.cargo/env"
# source_if_exists "$HOME/.config/broot/launcher/bash/br"
export NVM_DIR="$HOME/.config/nvm"
source_if_exists "$NVM_DIR/nvm.sh" # This loads nvm
source_if_exists "$NVM_DIR/bash_completion" # This loads nvm bash_completion