-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile
54 lines (49 loc) · 2.26 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
#!/bin/sh
# ------------------------------------------------------------------------------
# Default programs
# ------------------------------------------------------------------------------
export EDITOR="nvim"
export VISUAL="nvim"
export TERMINAL="alacritty"
export BROWSER="firefox"
# ------------------------------------------------------------------------------
# Misc env exports and ~/ clean-up
# ------------------------------------------------------------------------------
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/desktop/xinitrc"
export XCURSOR_SIZE="16"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/shell"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ZK_NOTEBOOK_DIR="$HOME/Stuff/notes"
export LESSHISTFILE="-"
export LS_COLORS="ow=30;42" # fix unreadable blue on green
export LIBVIRT_DEFAULT_URI="qemu:///system"
export QT_QPA_PLATFORMTHEME="qt5gtk2"
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export JDK_JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
# ------------------------------------------------------------------------------
# $PATH
# ------------------------------------------------------------------------------
add_path() {
test -d "$1" || return
echo ":$PATH:" | grep -q ":$1:" && return
export PATH="$1${PATH:+":${PATH}"}"
}
add_path "$GOPATH/bin"
add_path "$HOME/.local/bin"
unset -f add_path
# ------------------------------------------------------------------------------
# SSH AGENT
# ------------------------------------------------------------------------------
if [ -S "$XDG_RUNTIME_DIR/gcr/ssh" ] && pgrep -fu "$(whoami)" gnome-keyring-daemon >/dev/null; then
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
fi
if [ "$(ssh-add -l >/dev/null 2>&1; echo $?)" -eq 2 ] && command -v ssh-agent >/dev/null; then
eval $(ssh-agent -s) >/dev/null
trap 'kill $SSH_AGENT_PID' EXIT
fi
# ------------------------------------------------------------------------------
# Source bashrc
# ------------------------------------------------------------------------------
[ "$BASH" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bashrc" 2>/dev/null