Peter A. Shevtsov avatar Peter A. Shevtsov committed fcbb8c5

My fork of 2wm

Comments (0)

Files changed (2)

2wm-pshevtsov/PKGBUILD

+# Maintainer: Peter A. Shevtsov
+
+pkgname=2wm-pshevtsov-hg
+pkgver=24
+pkgrel=1
+pkgdesc="Dual window manager prototype - The latest hg pull"
+url="https://bitbucket.org/severusweb/2wm-pshevtsov"
+arch=('i686' 'x86_64')
+license=('MIT')
+depends=('libx11')
+makedepends=('mercurial')
+conflicts=('2wm' '2wm-hg')
+provides=('2wm')
+source=(config.h)
+md5sums=('e99451319d09fd93fa2b505bf57b2927')
+
+_hgroot='https://bitbucket.org/severusweb'
+_hgrepo='2wm-pshevtsov'
+
+build() {
+    cd $startdir/src
+
+    # Update the repo, else clone a new one
+    if [ -d $_hgrepo ]; then
+        cd $_hgrepo
+        make clean
+        hg pull -u
+    else
+        hg clone ${_hgroot}/${_hgrepo}
+        cd $_hgrepo
+    fi
+
+    # Copy config.h
+    cp $startdir/config.h config.h
+
+    # Add correct settings to config.mk
+    sed -i "s|^PREFIX =.*|PREFIX = /usr|" config.mk
+    sed -i "s|^X11INC =.*|X11INC = /usr/include/X11|" config.mk
+    sed -i "s|^X11LIB =.*|X11LIB = /usr/lib/X11|" config.mk
+
+    msg "Starting build process."
+    make || return 1
+    make PREFIX=$startdir/pkg/usr install
+
+    mkdir -p $startdir/pkg/usr/share/licenses/2wm
+    cp LICENSE $startdir/pkg/usr/share/licenses/2wm
+}

2wm-pshevtsov/config.h

+/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
+ * See LICENSE file for license details.
+ */
+
+#define BORDERPX        1
+#define NORMCOLOR       "#333"
+#define SELCOLOR        "#69c"
+
+#define GAP         8
+#define SY          20
+#define SH          DisplayHeight(dpy, screen)
+#define MASTER          600             /* per thousand */
+#define MODKEY          Mod1Mask
+#define NMASTER         1               /* clients in master area */
+#define SNAP            40              /* pixel */
+
+#define KEYS \
+    static Key key[] = { \
+        /* modifier         key     function    argument */ \
+        { MODKEY|ShiftMask,     XK_Return,  spawn, \
+            { .cmd = "exec urxvtc" } }, \
+        { MODKEY,           XK_p,       spawn, \
+            { .cmd = "exe=\"$(lsx `echo $PATH | sed 's/:/ /g'` | sort -u " \
+                " | dmenu -p 'Run:' -fn '-misc-tamsyn-medium-r-*-*-14-*-*-*-*-*-*-*' -nb '#1c1c1c' -nf '#d0d0d0' " \
+                "-sb '#3a3a3a' -sf '#d0d0d0')\" && exec $exe" } }, \
+        { MODKEY|ShiftMask,     XK_t, spawn, \
+            { .cmd = "exec urxvtc -e tmux" } }, \
+        { MODKEY,           XK_a,       attach,     { 0 } }, \
+        { MODKEY,           XK_d,       detach,     { 0 } }, \
+        { MODKEY,           XK_j,       focusnext,  { 0 } }, \
+        { MODKEY,           XK_k,       focusprev,  { 0 } }, \
+        { MODKEY,           XK_Return,  zoom,       { 0 } }, \
+        { MODKEY,           XK_g,       resizemaster,   { .i = 15 } }, \
+        { MODKEY,           XK_s,       resizemaster,   { .i = -15 } }, \
+        { MODKEY,           XK_i,       incnmaster, { .i = 1 } }, \
+        { MODKEY,           XK_r,       incnmaster, { .i = -1 } }, \
+        { MODKEY|ShiftMask,     XK_c,       killclient, { 0 } }, \
+        { MODKEY,           XK_space,   toggleview, { 0 } }, \
+        { MODKEY|ShiftMask,     XK_space,   togglefloat,    { 0 } }, \
+        { MODKEY|ShiftMask,     XK_q,       quit,       { 0 } }, \
+    };
+
+#define FLOATS \
+    static char *floats[] = { "MPlayer.*", "Acroread.*", NULL };
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.