ambevar-dotfiles/.xprofile

40 lines
1.2 KiB
Bash

#!/bin/sh
################################################################################
## XPROFILE
## 2013-05-23
################################################################################
## This file is sourced by some DM and should not contain any desktop execution.
## Env vars and general config. The .profile file should be automatically
## sourced by the login manager.
# [ -f "$HOME/.profile" ] && . "$HOME/.profile"
## X config (for URxvt, etc.)
[ -f "${HOME}/.Xresources" ] && xrdb -merge "${HOME}/.Xresources"
## Numlock
numlockx on
## Keymap. Only useful on multi-user environment where users have different
## keymaps.
if [ "$(setxkbmap -v 7 | awk '/^layout/ {print $2}')" != "usex" ]; then
xmodmap ~/.xmodmap_usex
fi
if [ "$OSTYPE" = "linux-gnu" ] ; then
## Set sound volume.
[ -n "$(amixer 2>/dev/null | grep PCM)" ] && amixer set PCM 80%
## External device auto-mounting.
[ -n "$(command -v udiskie)" ] && udiskie &
fi
[ -d "$HOME/temp" ] && export TEMP="$HOME/temp"
## This env variable is used by some programs (like ranger and awesome) to get
## terminal executable name.
export TERMCMD="urxvt"
## Hook. Should be sourced last
[ -f ~/.xprofile_hook ] && . ~/.xprofile_hook