It seems recently there has been even more hype over Tiling Window Mangers. scrotwm is the latest one to appear on the block. It's inspired from dwm and xmonad. Personally I have tried to like ion3 but it just wasn't really my thing. Then I tried dwm and wmii but wasn't sure about it all, awesomewm then came along, and it fit my needs quite well. When v3 of awesomewm came along it was pretty much WTF?! with the complicated configuration system. Thus I ended up going to dwm and using it with some patches to make it work the way I want.

Aside from my experiments of using different Tiling Window Mangers and finally settling on dwm. I decided to try out scrotwm, interestingly it's developed by some openbsd developers, as a result it doesn't quite build right under linux. Although it does ship with a set of makefile's for linux, it doesn't quite do the right thing.

To cut things short, here is a spec file and a link to a tarball, scrotwm-srpm-package.tar.gz, containing some scripts and the SRPM that can be rebuilt (rpmbuild --rebuild scrotwm-0.9-2.el5.src.rpm), it's something that I put together which works on my desktop (so far) and on one or two other machines which I have tried it out on. YMMV, but it's probably better than some of the patches that just remove the LD_PRELOAD functionality of some of the code. I should really put together a better patch and send it back upstream rather doing all this nasty stuff in the spec file.

Name:           scrotwm
Version:        0.9
Release:        2%{?dist}
Summary:        Scrotwm is a small dynamic tiling window manager for X11.

Group:          System/GUI/Other
License:        ISC
URL:            http://www.peereboom.us/scrotwm/html/scrotwm.html
Source0:        http://www.peereboom.us/scrotwm/snapshot/scrotwm-%{version}.tgz
Source1:    lorder.sh.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#BuildRequires:  
Requires:       terminus-font-x11

%description
Scrotwm is a small dynamic tiling window manager for X11. It tries to
stay out of the way so that valuable screen real estate can be used for
much more important stuff. It has sane defaults and does not require one
to learn a language to do any configuration. It was written by hackers
for hackers and it strives to be small, compact and fast.

%prep
%setup 
%setup -a 1


%build
ln -sf %{_builddir}/%{name}-%{version}/scrotwm.c \
    %{_builddir}/%{name}-%{version}/lib/swm_hack.c \
    %{_builddir}/%{name}-%{version}/lorder.sh %{_builddir}/%{name}-%{version}/linux/
%{__perl} -pi -e 's|Mod1Mask|Mod4Mask|g' %{_builddir}/%{name}-%{version}/scrotwm.c
%{__perl} -pi -e 's|lorder|./lorder.sh|g' %{_builddir}/%{name}-%{version}/linux/Makefile
%{__make} -C "%{_builddir}/%{name}-%{version}/linux"


%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/usr/bin
install %{_builddir}/%{name}-%{version}/linux/scrotwm $RPM_BUILD_ROOT/usr/bin/scrotwm
install -d ${RPM_BUILD_ROOT}/usr/share/man/man1/
install %{_builddir}/%{name}-%{version}/scrotwm.1 $RPM_BUILD_ROOT/usr/share/man/man1/
install -d $RPM_BUILD_ROOT/etc
install %{_builddir}/%{name}-%{version}/scrotwm.conf $RPM_BUILD_ROOT/etc/scrotwm.conf
install -d $RPM_BUILD_ROOT/usr/X11R6/lib
install %{_builddir}/%{name}-%{version}/linux/libswmhack.so.0.0 $RPM_BUILD_ROOT/usr/X11R6/lib/swmhack.so
#install %{_builddir}/%{name}-%{version}/linux/libswmhack.so.0.0 $RPM_BUILD_ROOT/usr/X11R6/lib/libswmhack.so.0.0

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc initscreen.sh baraction.sh lorder.sh screenshot.sh scrotwm.conf
%{_bindir}/scrotwm
%{_mandir}/*
%{_prefix}/X11R6/lib/*
%config  /etc/scrotwm.conf


%changelog
* Mon Feb  2 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.9-1
- Initial package
Bookmark and Share