JWM (Joe's Window Manager) - to lekki menadżer okien dla X Window System stworzony przez Joe Wingbermuehle'a.
Strona projektu
http://joewing.net/programs/jwm/
źródła wersji svn-460 z 17.01.2010r.
http://joewing.net/programs/jwm/snapshots/jwm-460.tar.bz2
jwm.spec dla CentOS
[code]
# JWM Snapshot 460
Name: jwm
Version: 460
Release: 1%{?dist}
License: GPL
URL: http://joewing.net/programs/jwm/#description
BuildRoot: /tmp/%{name}-%{version}build
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}.patch
Group: User Interface/Desktops
#Summary: JWM is a window manager for the X11 Window System. JWM is written in C and uses only Xlib at a minimum.
Summary: Snapshot 460 z 17.01.2010r.
# core
BuildRequires: libXext-devel
BuildRequires: libXmu-devel
BuildRequires: libXinerama-devel
BuildRequires: libXpm-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libXft-devel
#BuildRequires: fribidi-devel
Requires: libXext
Requires: libXmu
Requires: libXinerama
Requires: libXpm
Requires: libjpeg
Requires: libpng
Requires: libXft
#Requires: fribidi
Requires: gnome-mount
Requires: gnome-menus
Requires: xdg-utils
%description
JWM is a window manager for the X11 Window System. JWM is written in C and uses only Xlib at a minimum.
The following libraries can also be used if available:
* libXext for the shape extension
* libXext for the render extension
* libXmu for the RoundedRectangle
* libXinerama for Xinerama support
* libXpm for XPM backgrounds and icons
* libjpeg for JPEG backgrounds and icons.
* libpng for PNG backgrounds and icons
* libXft for antialiased and true type fonts
* fribidi for right-to-left language support
It can support some MWM, GNOME, and WM Spec hints.
Authors:
http://joewing.net/about.shtml
Joe Wingbermuehle
%prep
rm -rf "$RPM_BUILD_ROOT"
%setup
%patch0 -p1
%build
%install
export NEW_LIBDIR=/usr/lib
NEW_LIBDIR_SHORT=/lib
## Function declaration
export new_prefix=/usr
export ldconfig=/sbin/ldconfig
export new_sysconfdir=/etc/jwm
build_without_uninstall ()
{
mkdir -p $RPM_BUILD_ROOT$NEW_LIBDIR
export PKG_CONFIG_PATH="$NEW_LIBDIR/pkgconfig:$PKG_CONFIG_PATH"
./configure --prefix=$new_prefix --exec-prefix=$new_prefix --libdir=$NEW_LIBDIR --sysconfdir=$new_sysconfdir --enable-fsstd --enable-sound --enable-pango --disable-fribidi
make || return 1
make DESTDIR=$RPM_BUILD_ROOT install || return 1
mkdir -p $RPM_BUILD_ROOT/usr/share/xsessions
cat > $RPM_BUILD_ROOT/usr/share/xsessions/jwm.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=jwm
Comment=Log in using jwm
Type=XSession
Exec=/usr/bin/jwm
TryExec=/usr/bin/jwm
EOF
find $RPM_BUILD_ROOT/ -type f -iname '*.la' -exec rm {} \;
find $RPM_BUILD_ROOT/ -type f -iname '*.a' -exec rm {} \;
find $RPM_BUILD_ROOT/ -type f -perm 755 -exec strip -s {} \;
}
cat Makefile.in | sed 's/install\ \-d\ \$(SYSCONF)/install\ \-d\ \$(RPM_BUILD_ROOT)\$(SYSCONF)/' > Makefile.in1
cat Makefile.in1 | sed 's/install\ \-m\ 644\ example\.jwmrc\ \$(SYSCONF)\/system.jwmrc/install\ \-m\ 644\ example\.jwmrc\ \$(RPM_BUILD_ROOT)\$(SYSCONF)\/system.jwmrc/' > Makefile.in2
cat Makefile.in2 | sed 's/install\ \-d\ \$(MANDIR)\/man1/install\ \-d\ \$(RPM_BUILD_ROOT)\$(MANDIR)\/man1/' > Makefile.in3
cat Makefile.in3 | sed 's/install\ \-m\ 644\ jwm\.1\ \$(MANDIR)\/man1\/jwm.1/install\ \-m\ 644\ jwm\.1\ \$(RPM_BUILD_ROOT)\$(MANDIR)\/man1\/jwm.1/' > Makefile.in4
cat Makefile.in4 | sed 's/cd\ src\ \;\ \$(MAKE)\ install/cd\ src\ \;\ \$(MAKE)\ \;\ install\ \-d\ \$(RPM_BUILD_ROOT)\/usr\/bin\ \;\ install\ \-m\ 755\ jwm\ \$(RPM_BUILD_ROOT)\/usr\/bin\/jwm/' > Makefile.in
## Build all components
build_without_uninstall
mkdir -p %{buildroot}/usr/share/jwm
cat > %{buildroot}/usr/share/jwm/jwm-xdg-menu << EOF
#!/usr/bin/env python
#
# Copyright (C) 2008 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Luke Macken <lmacken@redhat.com>
# Miroslav Lichvar <mlichvar@redhat.com>
import gmenu, re, sys
from xml.sax.saxutils import escape
def walk_menu(entry):
if entry.get_type() == gmenu.TYPE_DIRECTORY:
print '<Menu label="%s">' \
% escape(entry.get_name())
map(walk_menu, entry.get_contents())
print '</Menu>'
elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded:
print ' <Program label="%s">' % escape(entry.get_name())
command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', entry.get_exec())
if entry.launch_in_terminal:
command = 'xterm -title "%s" -e %s' % \
(entry.get_name(), command)
print ' %s' % escape(command)
print ' </Program>'
menu1 = 'applications.menu'
menu2 = 'system-settings.menu'
menu3 = 'preferences.menu'
print '<JWM>'
print '<Menu label="Aplikacje">'
map(walk_menu, gmenu.lookup_tree(menu1).root.get_contents())
print '</Menu>'
print '<Menu label="Administracja">'
map(walk_menu, gmenu.lookup_tree(menu2).root.get_contents())
print '</Menu>'
print '<Menu label="Preferencje">'
map(walk_menu, gmenu.lookup_tree(menu3).root.get_contents())
print '</Menu>'
print '</JWM>'
EOF
chmod 755 %{buildroot}/usr/share/jwm/jwm-xdg-menu
%clean
%{__rm} -rf %{buildroot}
%pre
%post
export ld_so_conf_file=/etc/ld.so.conf
export install_prefix=/usr
export ldconfig=/sbin/ldconfig
$ldconfig
%files
%defattr(-,root,root)
/*
%changelog
* Sun Jan 17 2010 Waldo Waldow <wladw@onet.eu>
- first build for CentOS / Scientific Linux (SL)
* Tue Oct 14 2008 first build for OpenSUSE <sda00@himki.net>
- added online rebuild capability of .src.rpm or .spec files
[/code]
Łata jwm.patch
[code]
--- jwm-460/example.jwmrc 2010-01-17 10:10:07.000000000 +0100
+++ jwm-460/example.jwmrc 2010-03-17 20:17:49.000000000 +0100
@@ -4,20 +4,15 @@
<!-- The root menu, if this is undefined you will not get a menu. -->
<!-- Additional RootMenu attributes: onroot, labeled, label -->
- <RootMenu height="32" onroot="123">
- <Program icon="rxvt.png" label="Terminal">rxvt</Program>
+ <RootMenu height="20" onroot="3">
+ <Program icon="rxvt.png" label="Terminal">xterm</Program>
<Menu icon="folder.png" label="Applications">
<Program icon="audacious.png" label="Audacious">audacious</Program>
- <Program icon="dia.png" label="Dia">dia</Program>
<Program icon="firefox.png" label="Firefox">firefox</Program>
<Program icon="pidgin.png" label="Pidgin">pidgin</Program>
<Program icon="gimp.png" label="Gimp">gimp</Program>
- <Program icon="gtk-gnutella.png" label="gtk-gnutella">
- gtk-gnutella
- </Program>
<Program icon="gxine.png" label="gxine">gxine</Program>
- <Program icon="ooffice.png" label="Open Office">ooffice</Program>
</Menu>
<Menu icon="folder.png" label="Utilities">
<Program icon="xcalc.png">xcalc</Program>
@@ -27,6 +22,10 @@
xprop | xmessage -file -
</Program>
</Menu>
+ <Separator/>
+ <Menu label="CentOS">
+ <Include>./.jwmrc-menu</Include>
+ </Menu>
<Separator/>
<Restart label="Restart" icon="restart.png"/>
<Exit label="Exit" confirm="true" icon="exit.png"/>
@@ -43,15 +42,20 @@
</Group>
<Group>
+ <Class>Gdeskcal</Class>
+ <Option>nolist</Option>
+ </Group>
+
+ <Group>
<Name>rxvt</Name>
<Option>vmax</Option>
</Group>
<!-- Additional tray attributes: autohide, width, border, layer, layout -->
- <Tray x="0" y="-1" height="32">
+ <Tray x="0" y="-1" height="28">
<!-- Additional TrayButton attribute: label -->
- <TrayButton label="JWM">root:1</TrayButton>
+ <TrayButton label="JWM">root:3</TrayButton>
<TrayButton label="_">showdesktop</TrayButton>
@@ -68,7 +72,7 @@
xload -nolabel -bg black -fg red -hl white
</Swallow>
- <Clock>xclock</Clock>
+ <Clock format=" %H:%M ">xclock</Clock>
</Tray>
@@ -77,7 +81,7 @@
<WindowStyle>
<Font>FreeSans-9:bold</Font>
- <Width>4</Width>
+ <Width>3</Width>
<Height>20</Height>
<Active>
@@ -95,16 +99,16 @@
</WindowStyle>
<TaskListStyle>
- <Font>FreeSans-12:bold</Font>
+ <Font>FreeSans-10:bold</Font>
<ActiveForeground>black</ActiveForeground>
- <ActiveBackground>gray40:gray90</ActiveBackground>
+ <ActiveBackground>gray90:gray70</ActiveBackground>
<Foreground>black</Foreground>
- <Background>gray90:gray40</Background>
+ <Background>gray70:gray90</Background>
</TaskListStyle>
<!-- Additional TrayStyle attribute: insert -->
<TrayStyle>
- <Font>FreeSans-12:bold</Font>
+ <Font>FreeSans-9:bold</Font>
<Background>gray90</Background>
<Foreground>black</Foreground>
</TrayStyle>
@@ -118,7 +122,7 @@
</PagerStyle>
<MenuStyle>
- <Font>FreeSans-12:bold</Font>
+ <Font>FreeSans-9:bold</Font>
<Foreground>black</Foreground>
<Background>gray90</Background>
<ActiveForeground>white</ActiveForeground>
@@ -126,7 +130,7 @@
</MenuStyle>
<PopupStyle>
- <Font>FreeSans-10</Font>
+ <Font>FreeSans-9</Font>
<Outline>black</Outline>
<Foreground>black</Foreground>
<Background>yellow</Background>
@@ -136,6 +140,18 @@
$HOME/.icons
</IconPath>
+ <StartupCommand>
+ /usr/share/jwm/jwm-xdg-menu > ~/.jwmrc-menu
+ </StartupCommand>
+
+ <RestartCommand>
+ /usr/share/jwm/jwm-xdg-menu > ~/.jwmrc-menu
+ </RestartCommand>
+
+ <ShutdownCommand>
+ /usr/share/jwm/jwm-xdg-menu > ~/.jwmrc-menu
+ </ShutdownCommand>
+
<!-- Virtual Desktops -->
<!-- Desktop tags can be contained within Desktops for desktop names. -->
<Desktops count="4">
@@ -155,7 +171,7 @@
<DoubleClickDelta>2</DoubleClickDelta>
<!-- The focus model (sloppy or click) -->
- <FocusModel>sloppy</FocusModel>
+ <FocusModel>click</FocusModel>
<!-- The snap mode (none, screen, or border) -->
<SnapMode distance="10">border</SnapMode>
@@ -181,7 +197,7 @@
<Key mask="A" key="Tab">nextstacked</Key>
<Key mask="A" key="F4">close</Key>
<Key mask="A" key="#">desktop#</Key>
- <Key mask="A" key="F1">root:1</Key>
+ <Key mask="A" key="F1">root:3</Key>
<Key mask="A" key="F2">window</Key>
</JWM>
[/code]
Plik jwm.spec jest trochę pogmatwany ale działa.