-
Notifications
You must be signed in to change notification settings - Fork 8
/
.xprofile
50 lines (41 loc) · 1.46 KB
/
.xprofile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/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