summaryrefslogtreecommitdiffstats
path: root/xorg/xinitrc
blob: 432c1b6381a3b00f50fa6e1059cd0aeefcae0159 (plain)
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
#!/bin/bash

WM='i3'
WALLPAPER='media/bilder/wallpaper/wallpaper.png'

setxkbmap de neo
setxkbmap -option terminate:ctrl_alt_bksp

if [ -e /usr/bin/xset ]; then
	xset +fp /usr/share/fonts/local
	xset fp rehash
	xset -b
	xset dpms force on
	xset s off
fi

if [ -e /usr/bin/xrandr ]; then
	if [ $(hostname) = "galahad" ]; then
		if [ $(xrandr -q | grep VGA1 | awk '{print $2}') = "disconnected" ]; then
			xrandr --output LVDS1 --auto --output VGA1 --off
		else
			xrandr --output LVDS1 --off --output VGA1 --auto
		fi
	fi
fi

#if [ -e "$WALLPAPER" ] && [ -e /usr/bin/feh ]; then
#	feh --bg-scale $WALLPAPER
#fi

feh --bg-scale ~/media/bilder/wallpaper/$(ls ~/media/bilder/wallpaper/ | sort --random-sort | head -1)

if [ -e /usr/bin/xscreensaver ]; then
	xscreensaver -no-splash &
fi

if [ -e /usr/bin/ssh-agent ]; then
	exec ssh-agent $WM
else
	exec $WM
fi