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