mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Importing pekwm as alternative wm. Adopting it to ede build system including autoconf checks.
Also center ede-launch window.
This commit is contained in:
13
data/pekwm/scripts/Jamfile
Normal file
13
data/pekwm/scripts/Jamfile
Normal 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 ;
|
65
data/pekwm/scripts/pekwm_themeset.sh
Normal file
65
data/pekwm/scripts/pekwm_themeset.sh
Normal 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
|
31
data/pekwm/scripts/pekwm_ws_menu.sh
Normal file
31
data/pekwm/scripts/pekwm_ws_menu.sh
Normal 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
|
Reference in New Issue
Block a user