[dwm/f13/master] Initial import (#643375)

Petr Sabata psabata at fedoraproject.org
Tue Oct 19 08:39:37 UTC 2010


commit bd18891e2b15ee1f36bd0bc83ef9aa5cf02d9012
Author: Petr Sabata <psabata at redhat.com>
Date:   Tue Oct 19 10:39:27 2010 +0200

    Initial import (#643375)

 .gitignore                 |    1 +
 dwm-5.8.2-modmask.patch    |  130 ++++++++++++++++++++++++++++++++++++++++++++
 dwm-5.8.2-prefix.patch     |   11 ++++
 dwm-5.8.2-user-notes.patch |   15 +++++
 dwm-start                  |   79 +++++++++++++++++++++++++++
 dwm-start.1                |   37 +++++++++++++
 dwm-user.desktop           |   12 ++++
 dwm.desktop                |   12 ++++
 dwm.spec                   |  104 +++++++++++++++++++++++++++++++++++
 fedora-config.patch        |   20 +++++++
 sources                    |    1 +
 11 files changed, 422 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2665314 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dwm-5.8.2.tar.gz
diff --git a/dwm-5.8.2-modmask.patch b/dwm-5.8.2-modmask.patch
new file mode 100644
index 0000000..4e8f26a
--- /dev/null
+++ b/dwm-5.8.2-modmask.patch
@@ -0,0 +1,130 @@
+--- dwm-5.8.2/dwm.1	2010-06-04 12:39:15.000000000 +0200
++++ dwm-5.8.2/dwm.1.new	2010-10-15 13:36:09.823239223 +0200
+@@ -48,97 +48,97 @@
+ .B Button3
+ click on a tag label adds/removes all windows with that tag to/from the view.
+ .TP
+-.B Mod1\-Button1
++.B Mod4\-Button1
+ click on a tag label applies that tag to the focused window.
+ .TP
+-.B Mod1\-Button3
++.B Mod4\-Button3
+ click on a tag label adds/removes that tag to/from the focused window.
+ .SS Keyboard commands
+ .TP
+-.B Mod1\-Shift\-Return
++.B Mod4\-Shift\-Return
+ Start
+ .BR uxterm (1).
+ .TP
+-.B Mod1\-,
++.B Mod4\-,
+ Focus previous screen, if any.
+ .TP
+-.B Mod1\-.
++.B Mod4\-.
+ Focus next screen, if any.
+ .TP
+-.B Mod1\-Shift\-,
++.B Mod4\-Shift\-,
+ Send focused window to previous screen, if any.
+ .TP
+-.B Mod1\-Shift\-.
++.B Mod4\-Shift\-.
+ Send focused window to next screen, if any.
+ .TP
+-.B Mod1\-b
++.B Mod4\-b
+ Toggles bar on and off.
+ .TP
+-.B Mod1\-t
++.B Mod4\-t
+ Sets tiled layout.
+ .TP
+-.B Mod1\-f
++.B Mod4\-f
+ Sets floating layout.
+ .TP
+-.B Mod1\-m
++.B Mod4\-m
+ Sets monocle layout.
+ .TP
+-.B Mod1\-space
++.B Mod4\-space
+ Toggles between current and previous layout.
+ .TP
+-.B Mod1\-j
++.B Mod4\-j
+ Focus next window.
+ .TP
+-.B Mod1\-k
++.B Mod4\-k
+ Focus previous window.
+ .TP
+-.B Mod1\-h
++.B Mod4\-h
+ Decrease master area size.
+ .TP
+-.B Mod1\-l
++.B Mod4\-l
+ Increase master area size.
+ .TP
+-.B Mod1\-Return
++.B Mod4\-Return
+ Zooms/cycles focused window to/from master area (tiled layouts only).
+ .TP
+-.B Mod1\-Shift\-c
++.B Mod4\-Shift\-c
+ Close focused window.
+ .TP
+-.B Mod1\-Shift\-space
++.B Mod4\-Shift\-space
+ Toggle focused window between tiled and floating state.
+ .TP
+-.B Mod1\-Tab
++.B Mod4\-Tab
+ Toggles to the previously selected tags.
+ .TP
+-.B Mod1\-Shift\-[1..n]
++.B Mod4\-Shift\-[1..n]
+ Apply nth tag to focused window.
+ .TP
+-.B Mod1\-Shift\-0
++.B Mod4\-Shift\-0
+ Apply all tags to focused window.
+ .TP
+-.B Mod1\-Control\-Shift\-[1..n]
++.B Mod4\-Control\-Shift\-[1..n]
+ Add/remove nth tag to/from focused window.
+ .TP
+-.B Mod1\-[1..n]
++.B Mod4\-[1..n]
+ View all windows with nth tag.
+ .TP
+-.B Mod1\-0
++.B Mod4\-0
+ View all windows with any tag.
+ .TP
+-.B Mod1\-Control\-[1..n]
++.B Mod4\-Control\-[1..n]
+ Add/remove all windows with nth tag to/from the view.
+ .TP
+-.B Mod1\-Shift\-q
++.B Mod4\-Shift\-q
+ Quit dwm.
+ .SS Mouse commands
+ .TP
+-.B Mod1\-Button1
++.B Mod4\-Button1
+ Move focused window while dragging. Tiled windows will be toggled to the floating state.
+ .TP
+-.B Mod1\-Button2
++.B Mod4\-Button2
+ Toggles focused window between floating and tiled state.
+ .TP
+-.B Mod1\-Button3
++.B Mod4\-Button3
+ Resize focused window while dragging. Tiled windows will be toggled to the floating state.
+ .SH CUSTOMIZATION
+ dwm is customized by creating a custom config.h and (re)compiling the source
diff --git a/dwm-5.8.2-prefix.patch b/dwm-5.8.2-prefix.patch
new file mode 100644
index 0000000..a69a68f
--- /dev/null
+++ b/dwm-5.8.2-prefix.patch
@@ -0,0 +1,11 @@
+--- dwm-5.8.2/config.mk	2010-06-04 12:39:15.000000000 +0200
++++ dwm-5.8.2/config.mk.new	2010-10-13 16:57:35.529138335 +0200
+@@ -4,7 +4,7 @@
+ # Customize below to fit your system
+ 
+ # paths
+-PREFIX = /usr/local
++PREFIX = /usr
+ MANPREFIX = ${PREFIX}/share/man
+ 
+ X11INC = /usr/X11R6/include
diff --git a/dwm-5.8.2-user-notes.patch b/dwm-5.8.2-user-notes.patch
new file mode 100644
index 0000000..377b1d5
--- /dev/null
+++ b/dwm-5.8.2-user-notes.patch
@@ -0,0 +1,15 @@
+--- dwm-5.8.2/dwm.1	2010-10-15 13:39:41.239409647 +0200
++++ dwm-5.8.2/dwm.1.new	2010-10-15 13:47:01.870203726 +0200
+@@ -4,6 +4,12 @@
+ .SH SYNOPSIS
+ .B dwm
+ .RB [ \-v ]
++.SH FEDORA NOTES
++Due to the nature of this software, dwm has to be rebuilt for any configuration
++changes. To achieve this in Fedora, install the
++.BR dwm-user
++package and see
++.BR dwm-start (1) .
+ .SH DESCRIPTION
+ dwm is a dynamic window manager for X. It manages windows in tiled, monocle
+ and floating layouts. Either layout can be applied dynamically, optimising the
diff --git a/dwm-start b/dwm-start
new file mode 100644
index 0000000..5b4cd0a
--- /dev/null
+++ b/dwm-start
@@ -0,0 +1,79 @@
+#!/bin/sh
+# MIT/X Consortium License
+#
+# 2010 Petr Sabata <psabata at redhat.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+version=VERSION
+release=RELEASE
+sources=/usr/src/dwm-user-${version}-${release}
+bindir=~/.dwm
+builddir=~/.dwmbuild
+config=${bindir}/config.h
+modified=${bindir}/modified
+buildver=${bindir}/version
+
+function run_custom {
+    echo "Running user dwm..." 1>&2
+    ${bindir}/dwm
+}
+
+function run_system {
+    echo "Running system dwm..." 1>&2
+    dwm
+}
+
+function rebuild {
+    if [ ! -d ${sources} ]; then
+        echo "Cannot find sources in ${sources}. Not rebuilding." 1>&2
+    else
+        echo -n "Rebuilding dwm... " 1>&2
+        rm -rf ${builddir}
+        cp -R ${sources} ${builddir}
+        cp ${config} ${builddir}/config.def.h
+        cd ${builddir}
+        make 2>&1 > ${builddir}/build.log
+        if [ "$?" -ne 0 ]; then
+            echo "FAILED" 1>&2
+            echo "See ${builddir}/build.log." 1>&2
+            exit 1
+        else
+            echo "OK" 1>&2
+        fi
+        mv ${builddir}/dwm ${bindir}
+        rm -rf ${builddir}
+        echo `stat -c %Y "${config}"` > ${modified}
+        echo "${version}-${release}" > ${buildver}
+    fi
+}
+
+mkdir -p ${bindir}
+if [ -f ${config} ]; then
+    if [ ! -f ${modified} ] || [ "`cat ${modified}`" -lt `stat -c %Y ${config}` ] ||
+       [ ! -f ${buildver} ] || [ "`cat ${buildver}`" != "${version}-${release}" ]; then
+        rebuild
+    fi
+    run_custom
+elif [ -f ${bindir}/dwm ]; then
+    run_custom
+else
+    run_system
+fi
diff --git a/dwm-start.1 b/dwm-start.1
new file mode 100644
index 0000000..8d5d5f8
--- /dev/null
+++ b/dwm-start.1
@@ -0,0 +1,37 @@
+.TH DWM\-START 1 dwm\-start\-VERSION\-RELEASE
+.SH NAME
+dwm\-start \- dwm reconfiguration helper script
+.SH SYNOPSIS
+.B dwm\-start
+.SH DESCRIPTION
+dwm\-start is a helper script for running and reconfiguring
+.BR dwm
+if neccessarry. It's the preferred way of starting
+.BR dwm
+in Fedora.
+.P
+Running
+.BR dwm-start
+starts Fedora build by default. If you wish to customize your configuration, put
+the dwm config header file to $HOME/.dwm/config.h and adjust it according to
+your needs. The official Fedora configuration file might be a useful template.
+See the
+.BR FILES
+section of this manual.
+.P
+Every time the user configuration file has changed,
+.BR dwm\-start
+will rebuild the user dwm binary prior to its execution.
+.SH FILES
+.nf
+$HOME/.dwm
+    - User dwm directory
+$HOME/.dwm/config.h
+    - User dwm configuration
+/usr/src/dwm\-VERSION\-RELEASE
+    - dwm sources
+/usr/src/dwm\-VERSION\-RELEASE/config.def.h
+    - Fedora build configuration
+.fi
+.SH SEE ALSO
+.BR dwm (1)
diff --git a/dwm-user.desktop b/dwm-user.desktop
new file mode 100644
index 0000000..121d5e4
--- /dev/null
+++ b/dwm-user.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=dwm-user
+GenericName=Window Manager
+Comment=Dynamic window manager for X (user configuration)
+Exec=dwm-start
+Terminal=false
+TryExec=dwm-start
+
+[Window Manager]
+SessionManaged=true
diff --git a/dwm.desktop b/dwm.desktop
new file mode 100644
index 0000000..232668b
--- /dev/null
+++ b/dwm.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=dwm
+GenericName=Window Manager
+Comment=Dynamic window manager for X
+Exec=dwm
+Terminal=false
+TryExec=dwm
+
+[Window Manager]
+SessionManaged=true
diff --git a/dwm.spec b/dwm.spec
new file mode 100644
index 0000000..0f085b4
--- /dev/null
+++ b/dwm.spec
@@ -0,0 +1,104 @@
+Name:           dwm
+Version:        5.8.2
+Release:        2%{?dist}
+Summary:        Dynamic window manager for X
+
+%global         _dwmsourcedir       %{_usrsrc}/dwm-user-%{version}-%{release}
+
+Group:          User Interface/Desktops
+License:        MIT
+URL:            http://dwm.suckless.org/
+Source0:        http://dl.suckless.org/dwm/%{name}-%{version}.tar.gz
+# dwm-start script and its manpage
+Source1:        dwm-start
+Source2:        dwm-start.1
+# Desktop files
+Source3:        dwm.desktop
+Source4:        dwm-user.desktop
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  libX11-devel, libXinerama-devel, libxcb-devel
+Requires:       dmenu, xterm
+
+# Default Fedora configuration for dwm
+Patch1:         fedora-config.patch
+# Install to /usr instead of /usr/local
+Patch2:         dwm-5.8.2-prefix.patch
+# Fedora config changes Mod1 to Mod4, adjust manpage
+Patch3:         dwm-5.8.2-modmask.patch
+# Fedora notes referring to dwm-user in dwm(1)
+Patch4:         dwm-5.8.2-user-notes.patch
+
+%description
+dwm is a dynamic window manager for X. It manages windows in tiled, monocle and
+floating layouts. All of the layouts can be applied dynamically, optimizing
+the environment for the application in use and the task performed.
+
+%package user
+Summary:        Dynamic window manager sources and tools for user configuration
+Group:          User Interface/Desktops
+License:        MIT
+Requires:       dwm = %{version}-%{release}
+Requires:       gcc, make, libX11-devel, libXinerama-devel, libxcb-devel
+
+%description user
+dwm sources and dwm-start script for individual user configuration. dwm-start
+reads user's header file and creates custom dwm build for user to use on
+the fly.
+
+%prep
+%setup -q
+%patch1 -p1 -b .config
+%patch2 -p1 -b .prefix
+%patch3 -p1 -b .modmask
+%patch4 -p1 -b .usernotes
+sed -i "s/version=VERSION/version=%{version}/" %{SOURCE1}
+sed -i "s/release=RELEASE/release=%{release}/" %{SOURCE1}
+sed -i "s/VERSION/%{version}/" %{SOURCE2}
+sed -i "s/RELEASE/%{release}/" %{SOURCE2}
+
+%build
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+install -m755 %{SOURCE1} %{buildroot}%{_bindir}/dwm-start
+install -m644 %{SOURCE2} %{buildroot}%{_mandir}/man1/dwm-start.1
+mkdir -p %{buildroot}%{_dwmsourcedir}
+install -m644 config.mk %{buildroot}%{_dwmsourcedir}/config.mk
+install -m644 config.def.h %{buildroot}%{_dwmsourcedir}/config.def.h
+install -m644 dwm.c %{buildroot}%{_dwmsourcedir}/dwm.c
+install -m644 dwm.1 %{buildroot}%{_dwmsourcedir}/dwm.1
+install -m644 Makefile %{buildroot}%{_dwmsourcedir}/Makefile
+mkdir -p %{buildroot}%{_datadir}/xsessions
+install -m644 %{SOURCE3} %{buildroot}%{_datadir}/xsessions/dwm.desktop
+install -m644 %{SOURCE4} %{buildroot}%{_datadir}/xsessions/dwm-user.desktop
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+%{_datadir}/xsessions/dwm.desktop
+
+%files user
+%defattr(-,root,root,-)
+%{_bindir}/%{name}-start
+%{_mandir}/man1/%{name}-start.1*
+%{_datadir}/xsessions/dwm-user.desktop
+%{_dwmsourcedir}
+
+%changelog
+* Mon Oct 18 2010 Petr Sabata <psabata at redhat.com> - 5.8.2-2
+- Description spelling changed to US english
+- Changed /usr/src to _usrsrc macro, dwmsourcedir changed to _dwmsourcedir
+- Added BuildRequires for Xinerama and xcb
+- Added dwm and dwm-users desktop files
+
+* Wed Oct 15 2010 Petr Sabata <psabata at redhat.com> - 5.8.2-1
+- New package
diff --git a/fedora-config.patch b/fedora-config.patch
new file mode 100644
index 0000000..7c49631
--- /dev/null
+++ b/fedora-config.patch
@@ -0,0 +1,20 @@
+--- dwm-5.8.2/config.def.h.orig	2010-10-13 18:28:52.520363397 +0200
++++ dwm-5.8.2/config.def.h	2010-10-13 18:32:30.363137566 +0200
+@@ -1,7 +1,7 @@
+ /* See LICENSE file for copyright and license details. */
+ 
+ /* appearance */
+-static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
++static const char font[]            = "-misc-fixed-medium-r-normal-*-10-*-*-*-*-*-iso10646-*";
+ static const char normbordercolor[] = "#cccccc";
+ static const char normbgcolor[]     = "#cccccc";
+ static const char normfgcolor[]     = "#000000";
+@@ -34,7 +34,7 @@
+ };
+ 
+ /* key definitions */
+-#define MODKEY Mod1Mask
++#define MODKEY Mod4Mask
+ #define TAGKEYS(KEY,TAG) \
+ 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
+ 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
diff --git a/sources b/sources
index e69de29..89df3ea 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f0b422bfeaa812d66c6dd15c3cc92a6b  dwm-5.8.2.tar.gz


More information about the scm-commits mailing list