if [ -e "$HOME/.config/speedwm-de/global/config" ]; then
. $HOME/.config/speedwm-de/global/config
else
mkdir -p $HOME/.config/speedwm-de/global
printf "HAVE_GRID=$HAVE_GRID # Whether or not to use the Grid argument. If you do not have the dmenu grid patch, set this to false. Doing so will disable grid." > $HOME/.config/speedwm-de/global/config
POSITION="bottom" # top, bottom, center (your $RUNLAUNCHER must support center for this to work)
mkdir -p $HOME/.config/speedwm-de/winnav
# Create config if it does not exist.
if [ -e "$HOME/.config/speedwm-de/winnav/config" ]; then
. $HOME/.config/speedwm-de/winnav/config
else
printf "POSITION=$POSITION # top, bottom, center (Your installed $RUNLAUNCHER must support center (-c) for this to work)" > $HOME/.config/speedwm-de/winnav/config
fi
# Set position based on config
case "$POSITION" in
"bottom") POSARG="-b" ;;
"top") POSARG="" ;;
"center") POSARG="-c" ;;
esac
# Check if wmctrl is available
if [ -e "${BINDIR}wmctrl" ]; then
echo "wmctrl found"
case "$(wmctrl -xl | wc -l)" in
"") echo "No clients found." ; exit 1 ;;
"1") echo "One client running, will not open menu." ; exit 0 ;;