ambevar-dotfiles/.xprofile

53 lines
1.4 KiB
Bash

#!/bin/sh
## This file is sourced by some DM and should not contain any desktop execution.
## Internet browsers that need X to run.
export BROWSER=next
## ~/.local/share/applications/mimeapps.list shoud symlink to ~/.config/mimeapps.list.
cat<<EOF > ~/.config/mimeapps.list
[Added Associations]
image/jpeg=sxiv.desktop
video/H264=mpv.desktop
video/mpeg=mpv.desktop
text/html=$BROWSER.desktop
application/pdf=$BROWSER.desktop
[Default Applications]
image/jpeg=sxiv.desktop
image/png=sxiv.desktop
video/mpeg=mpv.desktop
text/html=$BROWSER.desktop
application/pdf=zathura.desktop
x-scheme-handler/http=$BROWSER.desktop
x-scheme-handler/https=$BROWSER.desktop
x-scheme-handler/mailto=emacs-mail.desktop
EOF
## X resources for xterm.
## Some DM merge this automatically; we merge it for TTY logins.
[ -f "$HOME/.Xresources" ] && xrdb -merge "$HOME/.Xresources"
## Set custom keymap and configure input devices.
setxkbmap -layout us -variant "altgr-intl" -option "ctrl:swapcaps,nodeadkeys,nbsp:level3"
xcape -e 'Control_L=Escape'
numlockx on
xbindkeys
## Disable the touchpad. There might be better ways to do this.
# xinput disable "SynPS/2 Synaptics TouchPad"
## Turn off the bell.
xset -b
## Lock screen on sleep.
xss-lock slock &
## PulseAudio. It should start automatically.
# start-pulseaudio-x11 &
## Privoxy
privoxy --no-daemon ~/.config/privoxy/config &
## Hook. Should be sourced last.
[ -f ~/.xprofile_hook ] && . ~/.xprofile_hook