Importing pekwm as alternative wm. Adopting it to ede build system including autoconf checks.

Also center ede-launch window.
This commit is contained in:
Sanel Zukan
2011-10-23 00:10:40 +00:00
parent dd008c9ac3
commit eed5749909
171 changed files with 37768 additions and 27 deletions

View File

@ -0,0 +1,13 @@
#
# $Id: Jamfile 2858 2009-10-03 07:24:06Z karijes $
#
# Part of Equinox Desktop Environment (EDE).
# Copyright (c) 2009-2011 EDE Authors.
#
# This program is licensed under terms of the
# GNU General Public License version 2 or newer.
# See COPYING for details.
SubDir TOP data pekwm scripts ;
InstallProgram "$(PEKWM_DATA_DIR)/scripts" : pekwm_themeset.sh pekwm_ws_menu.sh ;

View File

@ -0,0 +1,65 @@
#!/bin/sh
#
# Copyright © 2003-2009 the pekwm development team
#
# Add this to your menu to use this script:
#
# SubMenu = "Themes" {
# Entry { Actions = "Dynamic /path/to/this/file /path/to/themedir" }
# }
#
# Check usage
if test -z "${1}"; then
echo "usage: $0 /path/to/themedir (theme)";
exit 1
fi
if test -z "${2}"; then
theme_dir="${1}"
echo "Dynamic {"
# Check that theme directory exists, if it does not exist create a
# dummy entry that says the dir does not exist.
if test -d "${theme_dir}"; then
( cd ${theme_dir};
for theme_name in *; do
# Themes must be directories. This test also prevents * globbing
# problems if theme_dir is empty.
if test -d "${theme_name}"; then
theme_path="${theme_dir}/${theme_name}"
echo "Entry = \"${theme_name}\" { Actions = \"Exec ${0} ${1} ${theme_path}\" }"
fi
done )
else
echo "Entry = \"No such directory ${theme_dir}\" { Actions = \"None\" }"
fi
echo "}"
else
# Check for configuration file, if the environment is not set the
# script is not being run from pekwm, then exit with failure.
if test -f "${PEKWM_CONFIG_FILE}"; then
theme="$(echo "${2}" | /bin/sed -e "s@^${HOME}@~@" | /bin/sed -e 's/\//\\\//g')"
# Get temporary file, not all platforms have mktemp though
if test -x "/bin/mktemp"; then
tmp_file=$(mktemp -t pekwm_themeset.XXXXXX) || exit 1;
else
tmp_file="/tmp/pekwm_themeset.${USER}"
fi
# Change theme
/bin/sed -e "s/^\([^#]*\)[Tt][Hh][Ee][Mm][Ee]\ =\ \"[^\"]*\"/\\1Theme\ =\ \"${theme}\"/" "${PEKWM_CONFIG_FILE}" > "${tmp_file}"
mv "${tmp_file}" "${PEKWM_CONFIG_FILE}"
# Reload pekwm
kill -HUP $(xprop -root _NET_WM_PID | awk '/_NET_WM_PID/ { print $3 }')
else
exit 1
fi
fi
exit 0

View File

@ -0,0 +1,31 @@
#!/bin/sh
#
# Copyright © 2009 the pekwm development team
#
if test "${1}" = "send"; then
action="SendToWorkspace"
elif test "${1}" = "goto"; then
action="GotoWorkspace"
else
echo "usage: $0 goto|send dynamic"
exit 1
fi
if test "${2}" = "dynamic"; then
echo "Dynamic {"
fi
num_workspaces="$(xprop -root _NET_NUMBER_OF_DESKTOPS | awk '{ print $3 }')"
i=1;
while test "${i}" -le "${num_workspaces}"; do
echo "Entry = \"Workspace $i\" { Actions = \"${action} ${i}\" }"
i=$(($i + 1))
done
if test "${2}" = "dynamic"; then
echo "}"
fi