-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathx_rc.sh
More file actions
executable file
·42 lines (35 loc) · 1.18 KB
/
x_rc.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1.18 KB
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
#!/bin/bash
# Copyright 2019 Comet Observatory
# Licensed under GPLv3.
# Refer to License.txt file included.
# Source system xinitrc scripts.
if [[ -d /etc/X11/xinit/xinitrc.d ]]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
# shellcheck disable=1090
[[ -x "$f" ]] && . "$f"
done
unset f
fi
if [[ $CO_HOST = "DESKTOP" ]]; then
# Configure Xorg automatically.
nvidia-settings --load-config-only
fi
# Set environment variables for graphical programs. Applcations started from dwm inherit its
# environment, so this must be done prior to launching it. Non-graphical environment variables are
# set earlier; see docs/Init.md.
# shellcheck source=scripts/bash/user_graphical_rc.sh
source "$CO"/scripts/bash/user_graphical_rc.sh
# Enable job control. We need this, but it's disabled here because this is a login shell.
set -m
#exec startplasma-x11
first_time=true
while true; do
dwm &
if [[ $first_time = true ]]; then
# shellcheck source=scripts/bash/user_graphical_post_rc.sh
source "$CO"/scripts/bash/user_graphical_post_rc.sh
first_time=false
fi
fg "$(jobs |
sed --quiet --regexp-extended "s/^\[([[:digit:]]+)\].+\bdwm\b.+$/\1/p" | head --lines=1)"
done