mirror of
https://github.com/gaschz/dotfiles.git
synced 2025-06-06 18:08:31 +02:00
feat: source X11 profiles directory
This commit is contained in:
parent
076ea43eaf
commit
3d49981cab
0
files/sh/.config/sh/profile.d/.gitignore
vendored
Normal file
0
files/sh/.config/sh/profile.d/.gitignore
vendored
Normal file
@ -8,12 +8,12 @@
|
||||
## Sourced by display manager, xinit and startx.
|
||||
|
||||
## Load requirements.
|
||||
test -r "$HOME/.profile" && . "$HOME/.profile"
|
||||
: "${XDG_CONFIG_HOME:=$HOME/.config}"
|
||||
test -r "${HOME}/.profile" && . "${HOME}/.profile"
|
||||
: "${XDG_CONFIG_HOME:=${HOME}/.config}"
|
||||
|
||||
## Load resources.
|
||||
if command -v xrdb >/dev/null; then
|
||||
xrdb "$XDG_CONFIG_HOME/x11/xresources"
|
||||
xrdb "${XDG_CONFIG_HOME}/x11/xresources"
|
||||
fi
|
||||
|
||||
## If running normal OS or Qubes: Dom0, apply settings.
|
||||
@ -39,26 +39,30 @@ desktop_autostart(){
|
||||
|
||||
touch "${TMPDIR:-/tmp}/touch-desktop-autostart"
|
||||
autostart_etc="${XDG_CONFIG_DIRS-/etc/xdg}/autostart"
|
||||
autostart_home="${XDG_CONFIG_HOME-$HOME/.config}/autostart"
|
||||
autostart_home="${XDG_CONFIG_HOME-${HOME}/.config}/autostart"
|
||||
|
||||
for f in "$autostart_etc"/*.desktop "$autostart_home"/*.desktop; do
|
||||
test -r "$f" || continue
|
||||
for f in "${autostart_etc}"/*.desktop "${autostart_home}"/*.desktop; do
|
||||
test -r "${f}" || continue
|
||||
# shellcheck disable=SC2091
|
||||
autostart_exec="$(awk -F '=' '/^Exec=/{print $2}' "$f")"
|
||||
autostart_exec="$(awk -F '=' '/^Exec=/{print ${2}}' "${f}")"
|
||||
command -v "${autostart_exec%% *}" >/dev/null || continue
|
||||
${autostart_exec} &
|
||||
done
|
||||
}
|
||||
|
||||
## Source local profile.
|
||||
if test -r "$HOME/.xprofile.local"; then
|
||||
. "$HOME/.xprofile.local"
|
||||
## Source Xorg profiles.
|
||||
if test -r "${HOME}/.xprofile.local"; then
|
||||
. "${HOME}/.xprofile.local"
|
||||
for x11_profile in "${XDG_CONFIG_HOME}/x11/xprofile.d"/*.sh; do
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
! test -r "${x11_profile}" || . "${x11_profile}"
|
||||
done
|
||||
fi
|
||||
|
||||
: "${wm_list:="dwm"}"
|
||||
for wm in $wm_list; do
|
||||
command -v "$wm" >/dev/null || break
|
||||
if test "$wm" = "dwm" && command -v xsetroot >/dev/null; then
|
||||
for wm in ${wm_list}; do
|
||||
command -v "${wm}" >/dev/null || break
|
||||
if test "${wm}" = "dwm" && command -v xsetroot >/dev/null; then
|
||||
desktop_autostart
|
||||
while true; do
|
||||
xsetroot -name "$(display-statusbar)"
|
||||
@ -66,8 +70,8 @@ for wm in $wm_list; do
|
||||
done &
|
||||
fi
|
||||
# shellcheck disable=SC2093
|
||||
$wm &
|
||||
${wm} &
|
||||
wm_pid="$!"
|
||||
done
|
||||
|
||||
test -z "$wm_pid" || wait "$wm_pid"
|
||||
test -z "${wm_pid:-}" || wait "${wm_pid}"
|
||||
|
0
files/x11/.config/x11/xprofile.d/.gitignore
vendored
Normal file
0
files/x11/.config/x11/xprofile.d/.gitignore
vendored
Normal file
Loading…
x
Reference in New Issue
Block a user