diff --git a/session/install.sh b/session/install.sh new file mode 100755 index 0000000..e1da005 --- /dev/null +++ b/session/install.sh @@ -0,0 +1,3 @@ +#!/bin/sh +. ../scripts/flags.sh +cp src/* "$PREFIX/bin" diff --git a/session/src/xmd b/session/src/xmd new file mode 100755 index 0000000..b43f0fd --- /dev/null +++ b/session/src/xmd @@ -0,0 +1,29 @@ +#!/bin/sh + +export XMD_USERDIR="${HOME}/.Xmd" +mkdir -p "${XMD_USERDIR}" + +export XMD_REPLICANT_PATH="/usr/lib/Xmd/replicants:/usr/local/lib/Xmd/replicants" +localReplicantDir="$HOME/.local/lib/Xmd/replicants" +if [ -d "$localReplicantDir" ]; then + export XMD_REPLICANT_PATH="$localReplicantDir:$XMD_REPLICANT_PATH" +fi + +xmd-load-xresources +appDefaults="${XMD_USERDIR}/app-defaults" +if [ -d "$appDefaults" ]; then + export XAPPLRESDIR="$appDefaults" +else + echo "!!! cant find $appDefaults" +fi +xmd-load-wallpaper + +startupDir="$XMD_USERDIR/startup" +if [ -d "$startupDir" ]; then + export XMD_STARTUPDIR="$startupDir" + xmd-run-startup-items +else + echo "!!! cant find $startupDir" +fi + +exec mwm diff --git a/session/src/xmd-load-wallpaper b/session/src/xmd-load-wallpaper new file mode 100755 index 0000000..18cdf1d --- /dev/null +++ b/session/src/xmd-load-wallpaper @@ -0,0 +1,4 @@ +#!/bin/sh + +. $XMD_USERDIR/wallpaper +xwallpaper "--${mode}" "$file" diff --git a/session/src/xmd-load-xresources b/session/src/xmd-load-xresources new file mode 100755 index 0000000..f7feb0a --- /dev/null +++ b/session/src/xmd-load-xresources @@ -0,0 +1,10 @@ +#!/bin/sh + +xrdb -remove + +xResources="${XMD_USERDIR}/Xresources" +if [ -r "$xResources" ]; then + xrdb -cpp /usr/bin/cpp < "$xResources" +else + echo "!!! can't find $xResources" +fi diff --git a/session/src/xmd-run-startup-items b/session/src/xmd-run-startup-items new file mode 100755 index 0000000..9cb94c9 --- /dev/null +++ b/session/src/xmd-run-startup-items @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z "$XMD_STARTUPDIR" ]; then + echo "!!! \$XMD_STARTUPDIR not set" + exit 1 +fi +for item in $XMD_STARTUPDIR/*; do + if [ -x "$item" ]; then + "$item" & + fi +done