-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsx
executable file
·79 lines (64 loc) · 2.73 KB
/
sx
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
#!/bin/sh --
# sx - start an xorg server
# requires xauth Xorg /dev/urandom
cleanup() {
if [ "$server" ] && kill -0 "$server" 2> /dev/null; then
kill "$server"
wait "$server"
xorg=$?
fi
if ! stty "$stty"; then
stty sane
fi
xauth remove :"$tty"
}
stty=$(stty -g)
tty=$(tty)
tty=${tty#/dev/tty}
cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx
datadir=${XDG_DATA_HOME:-$HOME/.local/share}/sx
mkdir -p -- "$cfgdir" "$datadir"
export XAUTHORITY="${XAUTHORITY:-$datadir/xauthority}"
touch -- "$XAUTHORITY"
trap 'cleanup; exit "${xorg:-0}"' EXIT
export DISPLAY=:1
for signal in HUP INT QUIT TERM; do
# shellcheck disable=SC2064
trap "cleanup; trap - $signal EXIT; kill -s $signal $$" "$signal"
done
# Xorg will return a USR1 signal to the parent process indicating it is ready
# to accept connections if it inherited a USR1 signal with a SIG_IGN
# disposition. Consequently a client may be started directly from a USR1
# signal handler and obviate the need to poll for server readiness.
trap 'DISPLAY=:$tty "${@:-$cfgdir/sxrc}" & wait "$!"' USR1
xauth add :"$tty" MIT-MAGIC-COOKIE-1 "$(od -An -N16 -tx /dev/urandom | tr -d ' ')"
(trap '' USR1 && exec Xorg :"$tty" vt"$tty" -keeptty -noreset -auth "$XAUTHORITY") &
server=$!
wait "$server"
export $(dbus-launch)
export __GL_THREADED_OPTIMIZATIONS=0
export PATH=/home/sean/.cabal/bin:$PATH
xrandr --output DP-0 --primary --mode 2560x1440 --rate 144.0 --rotate normal
xrandr --output DP-2 --mode 2560x1440 --rate 144.00 --rotate normal --left-of DP-0
#xrandr --output DP-2 --mode 1920x1080 --rate 72.00 --rotate left --right-of DP-4
#xrandr --output DP-4 --mode 3840x2160 --rate 120.0 --primary --rotate normal
#xrandr --output DP-2 --mode 2560x1440 --rate 120.0 --rotate right --left-of DP-4
#xrandr --output DP-0 --mode 2560x1440 --rate 120.0 --rotate left --right-of DP-4
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
#xrandr --output DP-0 --mode 2560x1440 --rate 120.0 --primary --rotate normal
#xrandr --output HDMI-0 --mode 1920x1080 --rate 120.00 --primary --rotate normal --left-of DP-0
#xrandr --output DP-2 --mode 1920x1080 --rate 60.00 --primary --rotate left --right-of DP-0
#xrandr --output DP-5 --mode 1920x1080 --rate 60.00 --primary --rotate normal --above HDMI-0
{ xmobar &}&
setwall $(cat /home/sean/.config/scripts/curwall)
xset r rate 185 30
dunst > /dev/null 2>&1 &
xrdb /home/sean/.config/Xresources
xrdb -merge /home/sean/.config/Xdefaults
#xwallpaper --no-randr --focus /home/sean/.config/walls/snake_bottle.png
#unset XDG_RUNTIME_DIR
#export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX)
xsetroot -cursor_name left_ptr &
restart_audio &
#exec dbus-run-session i3
exec dbus-run-session $HOME/.cache/xmonad/xmonad-x86_64-linux