-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathxinit.sh
executable file
·88 lines (65 loc) · 1.9 KB
/
xinit.sh
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/sh
#---
# This script is called from my .xinitrc at the start of my X.org session,
# before launching the WM.
#---
# Launch the given command asynchronously, if it's available
xinit_run() {
hash "${@%% *}" && eval "$@" &
}
# Only run this script once (checking if some main process is active)
if pgrep xbindkeys >/dev/null
then
echo "xinit.sh: already running processes"
return || exit
else
echo "** Running xinit.sh script"
fi
# wm-agnostic keyboard bindings
xinit_run xbindkeys
# Adjust color temperature of the screen according to the position of the sun
xinit_run redshift
xinit_run dbus-launch
# gnome-settings-daemon && eval $(gnome-keyring-daemon --start --components=secrets) &
# gnome-power-manager &
# gnome-volume-control-applet &
# nm-applet &
setxkbmap de
# Disable access control so any user can use the DISPLAY
xinit_run "xhost +"
# xbacklight utility to control screen backlight
xinit_run "xbacklight = 0"
# system beep [volume] [pitch] [duration(ms)]
xset b 2 1 200
# # synchronize the primary selection and clipboard buffers
# autocutsel -selection PRIMARY -fork
# autocutsel -selection CLIPBOARD -fork
# Activate Control+Alt+Backspace to kill X server
setxkbmap -option terminate:ctrl_alt_bksp
xrdb ~/.Xdefaults
## Set up sound and mixer start values
if hash pulseaudio
then
start-pulseaudio-x11
pactl set-sink-volume 0 0x05000 # 0x10000 == 100%
elif hash amixer
then
amixer sset Master 50% on
amixer sset PCM 100% on
amixer sset Front 100% on
amixer sset Headphone 100% on
fi
# ## Temperature & battery checking
# statck -d &
## Automatically suspend when computer is idle
xinit_run "idlescript.sh > idlescript.log"
# disable the touchpad tapping when typing
xinit_run "syndaemon -t -k -i 2 -d"
# enable video acceleration in ATI cards
export LIBVA_DRIVER_NAME=vdpau
export VDPAU_DRIVER=r600
###
xinit_run setwallpaper
xinit_run t
xinit_run browser
unset xinit_run