51 lines
1.5 KiB
Bash
51 lines
1.5 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.
|
|
for i in next qutebrowser conkeror chromium icecat firefox google-chrome; do
|
|
command -v $i >/dev/null 2>&1 && export BROWSER=$i && break
|
|
done
|
|
|
|
## ~/.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
|
|
text/html=$BROWSER.desktop
|
|
application/pdf=$BROWSER.desktop
|
|
|
|
[Default Applications]
|
|
image/jpeg=sxiv.desktop
|
|
image/png=sxiv.desktop
|
|
text/html=$BROWSER.desktop
|
|
application/pdf=zathura.desktop
|
|
x-scheme-handler/http=$BROWSER.desktop
|
|
x-scheme-handler/https=$BROWSER.desktop
|
|
EOF
|
|
|
|
## X resources for xterm.
|
|
## Some DM merge this automatically; we merge it for TTY logins.
|
|
[ -f "$HOME/.Xresources" ] && xrdb -merge "$HOME/.Xresources"
|
|
|
|
## Load custom keymap and configure input devices.
|
|
## Some login managers don't like output hence the redirection.
|
|
setxkbmap -layout us -variant ""
|
|
xkbcomp -I"$HOME/.xkb" "$HOME/.xkb/usim.xkb" $DISPLAY 2>/dev/null
|
|
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 &
|
|
|
|
## Hook. Should be sourced last.
|
|
[ -f ~/.xprofile_hook ] && . ~/.xprofile_hook
|