-
Notifications
You must be signed in to change notification settings - Fork 2
/
.profile
169 lines (139 loc) · 4.84 KB
/
.profile
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
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
export EDITOR=nvim
export PATH="$HOME/.local/share/nvim/lazy/fzf/bin:$PATH"
export PATH="$HOME/.dotfiles/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/share/nvim/mason/bin:$PATH"
export PATH="$HOME/.luarocks/bin:$PATH"
export PATH="$HOME/.yarn/bin:$PATH"
export PATH="$HOME/.config/yarn/global/node_modules/.bin:$PATH"
if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
fi
export PATH="$HOME/.local/share/mise/shims:$PATH"
# set up go as needed. GOPRIVATE is set up together with .gitconfig
export PATH=$PATH:~/go/bin
export GOPATH=~/go
export GOPRIVATE=github.com
if [ -f "$HOME/.ghcup/env" ]; then
. "$HOME/.ghcup/env"
fi
# Set up node environment
PATH="$HOME/.npmpath/bin:$PATH"
export NODE_PATH="$HOME/.npmpath/lib/node_modules"
if [ -d "/usr/lib/ccache" ]; then
PATH="/usr/lib/ccache:$PATH"
fi
export ANDROID_HOME=~/.android-sdks
export JAVA_HOME="$(dirname $(dirname $(readlink -f $(which javac))))"
if [ -d "$HOME/.dotfiles/pyenv/bin" ]; then
export PYENV_ROOT="$HOME/.dotfiles/pyenv"
export PYTHON_CONFIGURE_OPTS="--enable-shared"
PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv_virtualenv_plugin_root="$HOME/.dotfiles/pyenv-plugins/pyenv-virtualenv"
if [ -d "$pyenv_virtualenv_plugin_root" ]; then
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
PATH="$pyenv_virtualenv_plugin_root/bin:$PATH"
eval "$(pyenv virtualenv-init -)"
eval "$(pyenv init --path)"
fi
fi
if command -v rg 1>/dev/null 2>&1; then
export RIPGREP_CONFIG_PATH="$HOME/.dotfiles/.ripgreprc"
export FZF_DEFAULT_COMMAND='fd --type f --hidden .'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND='fd --type d --hidden .'
fi
# Theming, look and feel of newt apps, e.g. nmtui, whiptail scripts
export NEWT_COLORS='
root=white,black
border=black,lightgray
window=lightgray,lightgray
shadow=black,gray
title=black,lightgray
button=black,cyan
actbutton=white,cyan
compactbutton=black,lightgray
checkbox=black,lightgray
actcheckbox=lightgray,cyan
entry=black,lightgray
disentry=gray,lightgray
label=black,lightgray
listbox=black,lightgray
actlistbox=black,cyan
sellistbox=lightgray,black
actsellistbox=lightgray,black
textbox=black,lightgray
acttextbox=black,cyan
emptyscale=,gray
fullscale=,cyan
helpline=white,black
roottext=lightgrey,black
'
# make (linux) menuconfig less bright
export MENUCONFIG_COLOR=blackbg
if command -v keychain 1>/dev/null 2>&1; then
eval "$(keychain -q --eval id_rsa)"
fi
# fix curses pinentry
export GPG_TTY=$(tty)
# Use the podman socket as replacement for docker, to be used by testcontainers etc.
if command -v podman 1>/dev/null 2>&1; then
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
if [ -f "$HOME/.docker/config.json" ]; then
export REGISTRY_AUTH_FILE="$HOME/.docker/config.json"
fi
fi
if [ -f "$HOME/.profile.local" ]; then
. "$HOME/.profile.local"
fi
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# Autostart sway session on specific tty
if [ "$(tty)" = "/dev/tty1" ]; then
# sway is installed, simply assuming sway as session for now
if command -v sway 1>/dev/null 2>&1; then
export QT_QPA_PLATFORMTHEME=qt5ct
export XDG_DATA_DIRS="$HOME/.local/share:$XDG_DATA_DIRS"
if command -v flatpak 1>/dev/null 2>&1; then
export XDG_DATA_DIRS="$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:$XDG_DATA_DIRS"
fi
# setting gdk_backend and qt_qpa_platform manually may cause trouble
# export QT_QPA_PLATFORM=wayland
export GDK_BACKEND=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export CLUTTER_BACKEND=wayland
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export XDG_CURRENT_DESKTOP=sway
export DESKTOP_SESSION=sway
export LIBSEAT_BACKEND=logind
export SDL_VIDEODRIVER=wayland
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
export GTK_THEME=adw-gtk3-dark
# gnome-keyring will be set up by sway
# TODO: Replace with gcr-4 setup once all environments in use support it
export SSH_AUTH_SOCK="$GNOME_KEYRING_CONTROL/ssh"
# Fix Java AWT applications on wayland
export _JAVA_AWT_WM_NONREPARENTING=1
if lshw -C display 2>/dev/null | grep -qi "vendor.*nvidia"; then
exec sway --unsupported-gpu
else
exec sway
fi
fi
fi