* .config/dunst/dunstrc: Update according to v1.5.0.
[~bandali/configs] / .profile
CommitLineData
ca3a844a
AB
1# ~/.profile: executed by the command interpreter for login shells.
2# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
3# exists.
4
5# source host-specific profile
6if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
7 . "$HOME/.config/profiles/$(hostname)"
8fi
9
10export EDITOR="emacsclient -nw"
11export VISUAL="emcl"
23748328 12export GPG_TTY=$(tty)
ca3a844a 13
52b7a57a 14PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
ca3a844a
AB
15if [ -z "$IS_GUIX_SYSTEM" ]; then
16 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
17 INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
18 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
19fi
20export PATH
21export INFOPATH
22
23export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
24export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
25
26export XDG_CONFIG_HOME="$HOME/.config"
27export XDG_DATA_HOME="$HOME/.local/share"
28
29if [ -f "$HOME/.config/user-dirs.dirs" ]; then
30 set -a
31 . "$HOME/.config/user-dirs.dirs"
32 set +a
33fi
34
35export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
36export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
37
38export MAILDIR="$HOME/mail"
39export CVS_RSH="ssh"
40
41if [ -x "$(command -v go)" ]; then
461f4ab2 42 export GOPATH="$HOME/s/go"
ca3a844a
AB
43 export PATH="$GOPATH/bin:$PATH"
44fi
45
9867e4bb
AB
46export _JAVA_AWT_WM_NONREPARENTING=1
47export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
48#export MOZ_USE_XINPUT2=1 # precise scrolling in firefox
49
ca3a844a
AB
50# if running bash
51if [ -n "$BASH_VERSION" ]; then
52 # include .bashrc if it exists
53 if [ -f "$HOME/.bashrc" ]; then
54 . "$HOME/.bashrc"
55 fi
56fi
57
58if [ -z "$IS_GUIX_SYSTEM" ]; then
59 # if guix is installed
60 if [ -x "$(command -v guix)" ]; then
61 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
62 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
63 export SSL_CERT_DIR
64 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
65 else
66 printf "it seems you forgot to \`guix install nss-certs\'\n"
67 fi
68 GUIX_PROFILE="$HOME/.guix-profile"
69 . "$GUIX_PROFILE/etc/profile"
70 unset XDG_DATA_DIRS
71 fi
72fi
73
74for p in $MY_GUIX_PROFILES/*; do
75 profile=$p/$(basename "$p")
76 if [ -f "$profile"/etc/profile ]; then
77 GUIX_PROFILE="$profile"
78 . "$GUIX_PROFILE"/etc/profile
79 fi
80 unset profile
81done
82
5fc03b0d 83export PATH="$HOME/u/local/bin:$HOME/.local/bin:$PATH"
ca3a844a
AB
84
85# start an ssh-agent (with guix's openssh)
86if [ -z "$IS_GUIX_SYSTEM" ]; then
87 if ! pgrep -u "$USER" ssh-agent > /dev/null; then
461f4ab2 88 rm -f ~/.ssh-agent-thing
ca3a844a
AB
89 ssh-agent > ~/.ssh-agent-thing
90 fi
91 if [[ ! "$SSH_AUTH_SOCK" ]]; then
92 eval "$(<~/.ssh-agent-thing)"
93 fi
94fi
95
96# footenote: when on a foreign distro and using Xfce, don't forget to
97# disable its auto-start of gpg- and ssh-agent, by issuing
98# xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
99# xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
100# see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
101# also, MATE does something similar with gnome-keyring-daemon:
102# http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop