config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 0c96e417ecebaec2981f1d2c7c0ae010a0f6b108
parent 118d6ec27bde0713a720697b55be8523e28c25c7
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Thu,  1 Apr 2021 20:13:00 -0700

Move the xsession script to XDG_CONFIG_HOME

Add a costom xenodm Xsession script which is much simpler than the
original and uses XGD directories if possible. Also separate the
xorg module into the new xenodm and xresources modules.

Diffstat:
Aglobal/xenodm/etc/X11/xenodm/Xsession | 24++++++++++++++++++++++++
Mlocal/Makefile | 3++-
Rlocal/xorg/.xsession -> local/xenodm/.config/xsession | 0
Rlocal/xorg/.config/Xresources -> local/xresources/.config/Xresources | 0
4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/global/xenodm/etc/X11/xenodm/Xsession b/global/xenodm/etc/X11/xenodm/Xsession @@ -0,0 +1,24 @@ +#!/bin/sh +# Copyright 2021 Jacob R. Edwards +# License: GPLv3 +# +# Xsession -- Initialize X session +# +# If the xsession directory in $XDG_DATA_HOME exists output is +# redirected to a file within it. A configuration script must +# exist, it must be within either $XDG_CONFIG_HOME/xenodm, +# $HOME/.xenodm, or $HOME/.xinitrc. + +test -f "$HOME/.profile" && . "$HOME/.profile" + +datadir="${XDG_DATA_HOME:-$HOME/.local/share}/xsession" +configs="${XDG_CONFIG_HOME:-$HOME/.config}/xsession $HOME/.xsession $HOME/.xinitrc" + +config="$(stest -e $configs | /usr/bin/sed 1q)" +test -z "$config" && { + printf 'Xsession: %s: No such file or directory.\n' $configs 1>&2 + exit 1 +} + +test -d "$datadir" && exec 2>&1 >"$datadir/log" +exec /bin/sh "$config" diff --git a/local/Makefile b/local/Makefile @@ -17,8 +17,9 @@ MODULES =\ vimb\ whois\ xdg-open\ + xenodm\ xmodmap\ - xorg\ + xresources\ zathura\ all: install diff --git a/local/xorg/.xsession b/local/xenodm/.config/xsession diff --git a/local/xorg/.config/Xresources b/local/xresources/.config/Xresources