-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile
42 lines (35 loc) · 1.02 KB
/
.bash_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
# /etc/skel/.bash_profile
# env vars
if [[ -f ~/.env ]] ; then
. ~/.env
fi
# brew bash completion
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
# This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages.
if [[ -f ~/.bashrc ]] ; then
. ~/.bashrc
fi
# create runtime dir
if test -z "${XDG_RUNTIME_DIR}"; then
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi
# ssh-agent
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
# wayland
if [ "$(tty)" = "/dev/tty1" ]; then
export MOZ_DBUS_REMOTE=1
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM=wayland-egl
# start sway
exec dbus-run-session sway > ~/.local/sway.log 2>&1
fi