Created a uniform interface accross all session scripts
This commit is contained in:
parent
794f7216cd
commit
463be06955
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
name=`basename "$0"`
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $name" >&2
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$#" -gt 0 ] && usage
|
||||||
|
|
||||||
# basic Xmd environment variables
|
# basic Xmd environment variables
|
||||||
export XMD_SESSION_PID="$$"
|
export XMD_SESSION_PID="$$"
|
||||||
export XMD_USERDIR="${HOME}/.Xmd"
|
export XMD_USERDIR="${HOME}/.Xmd"
|
||||||
@ -23,7 +32,7 @@ appDefaults="${XMD_USERDIR}/app-defaults"
|
|||||||
if [ -d "$appDefaults" ]; then
|
if [ -d "$appDefaults" ]; then
|
||||||
export XAPPLRESDIR="$appDefaults"
|
export XAPPLRESDIR="$appDefaults"
|
||||||
else
|
else
|
||||||
echo "!!! cant find $appDefaults"
|
echo "$name cant find $appDefaults" >&2
|
||||||
fi
|
fi
|
||||||
xmd-load-wallpaper
|
xmd-load-wallpaper
|
||||||
|
|
||||||
@ -33,7 +42,7 @@ if [ -d "$startupDir" ]; then
|
|||||||
export XMD_STARTUPDIR="$startupDir"
|
export XMD_STARTUPDIR="$startupDir"
|
||||||
xmd-run-startup-items
|
xmd-run-startup-items
|
||||||
else
|
else
|
||||||
echo "!!! cant find $startupDir"
|
echo "$name cant find $startupDir" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep infinity
|
sleep infinity
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
name=`basename "$0"`
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $name" >&2
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$#" -gt 0 ] && usage
|
||||||
|
|
||||||
if [ -z "$XMD_SESSION_PID" ]; then
|
if [ -z "$XMD_SESSION_PID" ]; then
|
||||||
echo "ERR session is not running (\$XMD_SESSION_PID not set)"
|
echo "$name: session is not running (\$XMD_SESSION_PID not set)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ usage() {
|
|||||||
|
|
||||||
[ "$#" -gt 0 ] && usage
|
[ "$#" -gt 0 ] && usage
|
||||||
|
|
||||||
|
echo $configFilePath
|
||||||
if type "$configFilePath" > /dev/null; then
|
if type "$configFilePath" > /dev/null; then
|
||||||
color="black"
|
color="black"
|
||||||
|
|
||||||
|
@ -1,10 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
xrdb -remove
|
name=`basename "$0"`
|
||||||
|
|
||||||
xResources="${XMD_USERDIR}/Xresources"
|
xResources="${XMD_USERDIR}/Xresources"
|
||||||
|
|
||||||
|
isInstalled() {
|
||||||
|
type "$1" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
mustHaveInstalled() {
|
||||||
|
if ! isInstalled "$1"; then
|
||||||
|
echo "$name: $1 is not installed" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $name" >&2
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$#" -gt 0 ] && usage
|
||||||
|
|
||||||
|
cd ~
|
||||||
if [ -r "$xResources" ]; then
|
if [ -r "$xResources" ]; then
|
||||||
|
mustHaveInstalled xrdb
|
||||||
xrdb -cpp /usr/bin/cpp < "$xResources"
|
xrdb -cpp /usr/bin/cpp < "$xResources"
|
||||||
else
|
else
|
||||||
echo "!!! can't find $xResources"
|
echo "$name: can't find $xResources" >&2
|
||||||
fi
|
fi
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
name=`basename "$0"`
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $name" >&2
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$#" -gt 0 ] && usage
|
||||||
|
|
||||||
if [ -z "$XMD_STARTUPDIR" ]; then
|
if [ -z "$XMD_STARTUPDIR" ]; then
|
||||||
echo "!!! \$XMD_STARTUPDIR not set"
|
echo "$name \$XMD_STARTUPDIR not set" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
for item in $XMD_STARTUPDIR/*; do
|
for item in "$XMD_STARTUPDIR"/*; do
|
||||||
if [ -x "$item" ]; then
|
if [ -x "$item" ]; then
|
||||||
"$item" &
|
"$item" &
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user