-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.xprofile
48 lines (40 loc) · 1.42 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
#!/bin/sh
# WARNING! This file should not be executed directly.
# Shebang here is for shellcheck.
#
# ~/.xprofile
#
# sourced by /etc/lxdm/Xsession or /etc/lightdm/Xsession.
#
# Allows you to execute commands at the beginning
# of the X user session - before the WM is started.
#
# WARNING! This file should only contain
# POSIX-compliant commands and directives.
# Providing, for example, bash-specific commands will result
# in X server crash.
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
# Environment variables
#
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
########## ########## ########## ########## ##########
. "${HOME}/.sh/POSIX/dot_logger.sh"
dot_logger_log "Loading ~/.xprofile"
# Load display settings
if [ -d "${HOME}/.autorandr/${WS_PROFILE}" ]; then
dot_logger_log "Loading display profile '${WS_PROFILE}'"
autorandr.sh --change --default ${WS_PROFILE}
elif [ -d "${HOME}/.autorandr/hypnoglow" ]; then
dot_logger_log "Loading display profile 'hypnoglow'"
autorandr.sh --change --default hypnoglow
fi
# Load local fonts
xset +fp /usr/share/fonts/local
xset fp rehash
# Prepare i3 config based on workstation profile
if [ -x "$(which i3-generate-config 2>/dev/null)" ]; then
dot_logger_log "Executing i3-generate-config with profile ${WS_PROFILE}"
i3-generate-config "${WS_PROFILE}" &>> "$(dot_logger_getlogfile)"
fi