summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Wendel <lanius@gentoo.org>2005-04-26 13:58:54 +0000
committerHeinrich Wendel <lanius@gentoo.org>2005-04-26 13:58:54 +0000
commitdd3ea7a799bee1bfc85f94f3e475bab5797eeff0 (patch)
treeb55feabc055b51a83530b28856b1a30cdc65fee0 /x11-libs/motif-config/files
parentmotif-config-0.9 (diff)
downloadgentoo-2-dd3ea7a799bee1bfc85f94f3e475bab5797eeff0.tar.gz
gentoo-2-dd3ea7a799bee1bfc85f94f3e475bab5797eeff0.tar.bz2
gentoo-2-dd3ea7a799bee1bfc85f94f3e475bab5797eeff0.zip
motif-config-0.9
(Portage version: 2.0.51.19)
Diffstat (limited to 'x11-libs/motif-config/files')
-rw-r--r--x11-libs/motif-config/files/digest-motif-config-0.90
-rwxr-xr-xx11-libs/motif-config/files/motif-config-0.9289
-rw-r--r--x11-libs/motif-config/files/system.mwmrc186
3 files changed, 357 insertions, 118 deletions
diff --git a/x11-libs/motif-config/files/digest-motif-config-0.9 b/x11-libs/motif-config/files/digest-motif-config-0.9
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/x11-libs/motif-config/files/digest-motif-config-0.9
diff --git a/x11-libs/motif-config/files/motif-config-0.9 b/x11-libs/motif-config/files/motif-config-0.9
new file mode 100755
index 000000000000..d749184ccaf7
--- /dev/null
+++ b/x11-libs/motif-config/files/motif-config-0.9
@@ -0,0 +1,289 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# based on gcc-config by Martin Schlemmer <azarah@gentoo.org
+# Author: Heinrich Wendel <lanius@gentoo.org>
+
+umask 022
+
+PROFILE_PATH=/usr/@@LIBDIR@@/motif
+CONFIG_FILE=${PROFILE_PATH}/current
+
+usage() {
+cat << "USAGE_END"
+Usage: motif-config [option] [profile]
+Change the current motif profile, or give info about profiles.
+
+Options:
+
+ -c, --get-current-profile Print current used motif profile.
+
+ -l, --list-profiles Print a list of available profiles.
+
+ -s, --set-profile Set the current profile.
+
+ -L, --get-lib-path Print path where libraries of the given/current
+ profile are located.
+
+ -I, --get-inc-path Print path where includes of the given/current
+ profile are located.
+
+ --libs Print link flags for the given/current
+ profile.
+
+ --cflags Print compilation flags for the given/current
+ profile.
+
+USAGE_END
+ exit $1
+}
+[[ $# -lt 1 ]] && usage 1
+[[ $# -gt 2 ]] && usage 1
+
+# redefine eerror/einfo to remove baselayout dep
+# to make ppc-macos people happy
+eerror() {
+ echo -e " \e[31;01m*\e[0m $*";
+ exit 1
+}
+einfo() {
+ echo -e " \e[32;01m*\e[0m $*";
+}
+
+_check_root() {
+ if [[ "$(id -u)" -ne 0 ]] ; then
+ eerror "$0: Must be root."
+ exit 1
+ fi
+}
+
+_activate_profile() {
+ _check_root
+
+ if [ -z "${1}" ]; then
+ return 0
+ fi
+
+ # set new profile as default
+ new=${1}
+ files=""
+ # libs
+ for file in `ls /usr/@@LIBDIR@@/${new}/ | grep lib`; do
+ files="${files} /usr/@@LIBDIR@@/${file}"
+ rm -f /usr/@@LIBDIR@@/${file}
+ ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/@@LIBDIR@@/${file}
+ done
+ # includes
+ for file in `ls /usr/include/${new}/`; do
+ files="${files} /usr/include/${file}"
+ rm -f /usr/include/${file}
+ ln -s /usr/include/${new}/${file} /usr/include/${file}
+ done
+ # binaries
+ for file in `ls /usr/@@LIBDIR@@/${new} | grep -v lib`; do
+ files="${files} /usr/bin/${file}"
+ rm -f /usr/bin/${file}
+ ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/bin/${file}
+ done
+ # man pages
+ for file in `find /usr/share/man -regex ".*-${new}\..x?.gz"`; do
+ files="${files} ${file/-${new}/}"
+ rm -f ${file/-${new}/}
+ ln -s ${file} ${file/-${new}/}
+ done
+
+ cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE}
+ echo "FILES='${files}'" >> ${CONFIG_FILE}
+
+ return $?
+}
+
+_deactivate_profile() {
+ _check_root
+
+ source ${CONFIG_FILE} 2>/dev/null
+ current=${PROFILE}
+
+ if [ -z "$current" ]; then
+ return 0
+ fi
+
+ for file in ${FILES}; do
+ rm -f ${file}
+ done
+
+ rm -f ${CONFIG_FILE}
+
+ return $?
+}
+
+switch_profile() {
+ _check_root
+
+ if [ -n "$1" ]; then
+ if [ ! -e ${PROFILE_PATH}/${1} ]; then
+ eerror "$0: no such profile ${1}"
+ else
+ _deactivate_profile
+ _activate_profile $1
+ fi
+ else
+ source ${CONFIG_FILE} 2> /dev/null
+ _deactivate_profile
+ if [ -z "${PROFILE}" -o ! -f ${PROFILE_PATH}/${PROFILE} ]; then
+ for y in `ls ${PROFILE_PATH} | grep -v removed | grep -v current | sort -r`; do
+ _activate_profile ${y}
+ break
+ done
+ if [ -z "${y}" ]; then
+ eerror "$0: no profile to activate"
+ fi
+ else
+ _activate_profile ${PROFILE}
+ fi
+ fi
+
+ source ${CONFIG_FILE} 2>/dev/null
+ einfo "$0: New default Profile is: ${PROFILE}"
+
+ return $?
+}
+
+get_current_profile() {
+ source ${CONFIG_FILE} 2> /dev/null
+ echo ${PROFILE}
+}
+
+list_profiles() {
+ i=1
+ source ${CONFIG_FILE} 2> /dev/null
+ current=${PROFILE}
+ for y in `ls ${PROFILE_PATH} | grep -v current | grep -v removed`; do
+ source ${PROFILE_PATH}/${y}
+ output="[${i}] ${PROFILE}";
+ if [ "${y}" = "${current}" ]; then
+ output="${output} *"
+ fi
+ echo "$output"
+ i=$((i + 1))
+ done
+ exit $?
+}
+
+get_lib_path() {
+ if [ "$1" != "" ]; then
+ file=${1}
+ else
+ file="current"
+ fi
+ source ${PROFILE_PATH}/${file}
+ if [ $? -eq 1 ]; then
+ eerror "$0: No such profile: $profile"
+ else
+ echo "/usr/@@LIBDIR@@/${PROFILE}/"
+ exit 0
+ fi
+}
+
+get_inc_path() {
+ if [ "$1" != "" ]; then
+ file=${1}
+ else
+ file="current"
+ fi
+ source ${PROFILE_PATH}/${file}
+ if [ $? -eq 1 ]; then
+ eerror "$0: No such profile: $profile"
+ else
+ echo "/usr/include/${PROFILE}/"
+ exit 0
+ fi
+}
+
+get_cflags() {
+ if [ "$1" != "" ]; then
+ file=${1}
+ else
+ file="current"
+ fi
+ source ${PROFILE_PATH}/${file}
+ if [ $? -eq 1 ]; then
+ eerror "$0: No such profile: $profile"
+ else
+ echo "-I/usr/include/${PROFILE}/"
+ exit 0
+ fi
+}
+
+get_libs() {
+ if [ "$1" != "" ]; then
+ file=${1}
+ else
+ file="current"
+ fi
+ source ${PROFILE_PATH}/${file}
+ if [ $? -eq 1 ]; then
+ eerror "$0: No such profile: $profile"
+ else
+ echo "-L/usr/@@LIBDIR@@/${PROFILE}/"
+ exit 0
+ fi
+}
+
+for x in "$@"; do
+ case "${x}" in
+ -c|--get-current-profile)
+ [[ $# -ne 1 ]] && usage 1
+ get_current_profile
+ ;;
+
+ -l|--list-profiles)
+ [[ $# -ne 1 ]] && usage 1
+ list_profiles
+ ;;
+
+ -s|--set-profile)
+ [[ $# -gt 2 ]] && usage 1
+ switch_profile $2
+ exit $?
+ ;;
+
+ -L|--get-lib-path)
+ [[ $# -gt 2 ]] && usage 1
+ get_lib_path $2
+ ;;
+
+ -I|--get-inc-path)
+ [[ $# -gt 2 ]] && usage 1
+ get_inc_path $2
+ ;;
+
+ --cflags)
+ [[ $# -gt 2 ]] && usage 1
+ get_cflags $2
+ ;;
+
+ --libs)
+ [[ $# -gt 2 ]] && usage 1
+ get_libs $2
+ ;;
+
+ -h|--help)
+ usage 0
+ ;;
+
+ -v|--version)
+ echo "motif-config-0.9"
+ exit 0
+ ;;
+
+ -*)
+ usage 1
+ ;;
+
+ *)
+ usage 1
+ ;;
+
+ esac
+done
diff --git a/x11-libs/motif-config/files/system.mwmrc b/x11-libs/motif-config/files/system.mwmrc
index d530bac6706f..eae1d6785dd6 100644
--- a/x11-libs/motif-config/files/system.mwmrc
+++ b/x11-libs/motif-config/files/system.mwmrc
@@ -1,125 +1,71 @@
-!
-! @OPENGROUP_COPYRIGHT@
-! COPYRIGHT NOTICE
-! Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
-! Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group
-! ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
-! the full copyright text.
-!
-! This software is subject to an open license. It may only be
-! used on, with or for operating systems which are themselves open
-! source systems. You must contact The Open Group for a license
-! allowing distribution and sublicensing of this software on, with,
-! or for operating systems which are not Open Source programs.
-!
-! See http://www.opengroup.org/openmotif/license for full
-! details of the license agreement. Any use, reproduction, or
-! distribution of the program constitutes recipient's acceptance of
-! this agreement.
-!
-! EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-! PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-! KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
-! WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-! OR FITNESS FOR A PARTICULAR PURPOSE
-!
-! EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-! NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
-! INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-! DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED
-! AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-! ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
-! EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
-! POSSIBILITY OF SUCH DAMAGES.
-!
-! $XConsortium: system.mwmrc /main/9 1996/10/25 11:45:42 drk $
-!
-! HISTORY
-!
-
-!!
-!! DEFAULT Mwm RESOURCE DESCRIPTION FILE (system.mwmrc)
-!!
-!! NOTE: To personalize this file, copy this file before editing it.
-!! Personalize copies of the Mwm resource file typically
-!! reside as:
-!!
-!! $HOME/.mwmrc
!!
-
-!!
-!! Root Menu Description (this menu must be explicitly posted via f.menu)
+!! $Id: system.mwmrc,v 1.2 2005/04/26 13:56:50 lanius Exp $
+!! Root Menu Description
!!
-
Menu DefaultRootMenu
{
- "Root Menu" f.title
- "New Window" f.exec "xterm &"
+ "Root Menu" f.title
+ "New Window" f.exec "xterm -e /bin/bash &"
"Shuffle Up" f.circle_up
"Shuffle Down" f.circle_down
- "Refresh" f.refresh
+ "Refresh" f.refresh
"Pack Icons" f.pack_icons
-! "Toggle Behavior..." f.set_behavior
- no-label f.separator
- "Restart..." f.restart
- "Quit..." f.quit_mwm
-
-}
-
-Menu RootMenu_1.1
-{
- "Root Menu" f.title
- "New Window" f.exec "xterm &"
- "Shuffle Up" f.circle_up
- "Shuffle Down" f.circle_down
- "Refresh" f.refresh
-! "Pack Icons" f.pack_icons
-! "Toggle Behavior" f.set_behavior
- no-label f.separator
+ "Toggle Behavior..." f.set_behavior
+ no-label f.separator
"Restart..." f.restart
+ "Restart fvwm" f.restart - "fvwm"
+ "Screen next" f.screen - "next"
+ "Screen prev" f.screen - "prev"
+ "Screen back" f.screen - "back"
+ "Screen 0" f.screen - "0"
+ "Screen 1" f.screen - "1"
+ "Screen 3" f.screen - "3"
+ "Screen -1" f.screen - "-1"
+ "Quit..." f.quit_mwm
}
!!
-!! Default Window Menu Description
+!! Default Window Menu
!!
-
Menu DefaultWindowMenu
{
Restore _R Alt<Key>F5 f.restore
- Move _M Alt<Key>F7 f.move
- Size _S Alt<Key>F8 f.resize
- Minimize _n Alt<Key>F9 f.minimize
- Maximize _x Alt<Key>F10 f.maximize
- Lower _L Alt<Key>F3 f.lower
+ Move _M Alt<Key>F7 f.move
+ Size _S Alt<Key>F8 f.resize
+ Minimize _n Alt<Key>F9 f.minimize
+ Maximize _x Alt<Key>F10 f.maximize
+ Raise _a Alt<Key>F2 f.raise
+ Lower _L Alt<Key>F3 f.lower
no-label f.separator
- Close _C Alt<Key>F4 f.kill
+ Close _C Alt<Key>F4 f.kill
}
!!
-!! Key Binding Description
+!! Default Key Bindings
!!
-
Keys DefaultKeyBindings
{
- Shift<Key>Escape window|icon f.post_wmenu
- Alt<Key>space window|icon f.post_wmenu
- Alt<Key>Tab root|icon|window f.next_key
- Alt Shift<Key>Tab root|icon|window f.prev_key
- Alt<Key>Escape root|icon|window f.circle_down
- Alt Shift<Key>Escape root|icon|window f.circle_up
+ Shift<Key>Escape window|icon f.post_wmenu
+ Alt<Key>space window|icon f.post_wmenu
+ Alt<Key>Tab root|icon|window f.next_key
+ Alt Shift<Key>Tab root|icon|window f.prev_key
+ Alt<Key>Escape root|icon|window f.circle_down
+ Alt Shift<Key>Escape root|icon|window f.circle_up
Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior
- Alt<Key>F6 window f.next_key transient
- Alt Shift<Key>F6 window f.prev_key transient
- Shift<Key>F10 icon f.post_wmenu
-! Alt Shift<Key>Delete root|icon|window f.restart
+ Alt<Key>F6 window f.next_key transient
+ Alt Shift<Key>F6 window f.prev_key transient
+ Shift<Key>F10 icon f.post_wmenu
+ Alt Shift<Key>Delete root|icon|window f.restart
+ <Key>F11 root|icon|window f.screen - "next"
+ Alt<Key>F11 root|icon|window f.screen - "prev"
}
!!
!! Button Binding Description(s)
!!
-
+!! These can be used anywhere
+!!
Buttons DefaultButtonBindings
{
<Btn1Down> icon|frame f.raise
@@ -127,30 +73,34 @@ Buttons DefaultButtonBindings
<Btn3Down> root f.menu DefaultRootMenu
}
-Buttons ExplicitButtonBindings
-{
- <Btn1Down> frame|icon f.raise
- <Btn3Down> frame|icon f.post_wmenu
- <Btn3Down> root f.menu DefaultRootMenu
-! <Btn1Up> icon f.restore
- Alt<Btn1Down> window|icon f.lower
-! Alt<Btn2Down> window|icon f.resize
-! Alt<Btn3Down> window|icon f.move
-
-}
-
-Buttons PointerButtonBindings
-{
- <Btn1Down> frame|icon f.raise
- <Btn3Down> frame|icon f.post_wmenu
- <Btn3Down> root f.menu DefaultRootMenu
- <Btn1Down> window f.raise
-! <Btn1Up> icon f.restore
- Alt<Btn1Down> window|icon f.lower
-! Alt<Btn2Down> window|icon f.resize
-! Alt<Btn3Down> window|icon f.move
-}
-
!!
-!! END OF mwm RESOURCE DESCRIPTION FILE
+!! These are some example bindings that you might use if your
+!! keyboardFocusPolicy is "explicit". Note that to use these, you'll
+!! have to change the Mwm*buttonBindings resource in Mwm to
+!! ExplicitButtonBindings instead of DefaultButtonBindings.
+!!
+!!Buttons ExplicitButtonBindings
+!!{
+!! <Btn3Down> frame|icon f.post_wmenu
+!! <Btn1Up> icon f.restore
+!! Alt<Btn1Down> window|icon f.lower
+!! Alt<Btn2Down> window|icon f.resize
+!! Alt<Btn3Down> window|icon f.move
+!!}
+!!
+!! These are some example bindings that you might use if your
+!! keyboardFocusPolicy is "pointer". Note that to use these, you'll
+!! have to change the Mwm*buttonBindings resource in Mwm to
+!! PointerButtonBindings instead of DefaultButtonBindings.
!!
+!!Buttons PointerButtonBindings
+!!{
+!! <Btn1Down> frame|icon f.raise
+!! <Btn3Down> frame|icon f.post_wmenu
+!! <Btn3Down> root f.menu DefaultRootMenu
+!! <Btn1Down> window f.raise
+!! <Btn1Up> icon f.restore
+!! Alt<Btn1Down> window|icon f.lower
+!! Alt<Btn2Down> window|icon f.resize
+!! Alt<Btn3Down> window|icon f.move
+!!}