From 2e6a533bd560345753501c192153ebfdd0dc14e0 Mon Sep 17 00:00:00 2001 From: Ypnose Date: Tue, 2 Jul 2013 21:40:08 +0200 Subject: [PATCH 1/2] mcwm: added config.h and needed scripts --- srcpkgs/mcwm/files/config.h | 98 +++++++++++++++++++++++++++++++++++++ srcpkgs/mcwm/template | 6 ++- 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/mcwm/files/config.h diff --git a/srcpkgs/mcwm/files/config.h b/srcpkgs/mcwm/files/config.h new file mode 100644 index 0000000000..0bfb3c3c76 --- /dev/null +++ b/srcpkgs/mcwm/files/config.h @@ -0,0 +1,98 @@ +/* User configurable stuff. */ + +/* + * Move this many pixels when moving or resizing with keyboard unless + * the window has hints saying otherwise. + */ +#define MOVE_STEP 32 + +/* + * Use this modifier combined with other keys to control wm from + * keyboard. Default is Mod4, which on my keyboard is the Alt key but + * is usually the Windows key on more normal keyboard layouts. + */ +#define MODKEY XCB_MOD_MASK_4 + +/* Extra modifier for resizing. Default is Shift. */ +#define SHIFTMOD XCB_MOD_MASK_SHIFT + +/* + * Modifier key to use with mouse buttons. Default Mod1, Meta on my + * keyboard. + */ +#define MOUSEMODKEY XCB_MOD_MASK_1 + +/* + * Start this program when pressing MODKEY + USERKEY_TERMINAL. Needs + * to be in $PATH. + * + * Change to "xterm" if you're feeling conservative. + * + * Can be set from command line with "-t program". + */ +#define TERMINAL "urxvt" + +/* + * Do we allow windows to be iconified? Set to true if you want this + * behaviour to be default. Can also be set by calling mcwm with -i. + */ +#define ALLOWICONS false + +/* + * Start these programs when pressing MOUSEMODKEY and mouse buttons on + * root window. + */ +#define MOUSE1 "" +#define MOUSE2 "" +#define MOUSE3 "mcmenu" + +/* + * Default colour on border for focused windows. Can be set from + * command line with "-f colour". + */ +#define FOCUSCOL "chocolate1" + +/* Ditto for unfocused. Use "-u colour". */ +#define UNFOCUSCOL "grey40" + +/* Ditto for fixed windows. Use "-x colour". */ +#define FIXEDCOL "grey90" + +/* Default width of border window, in pixels. Used unless -b width. */ +#define BORDERWIDTH 1 + +/* + * Keysym codes for window operations. Look in X11/keysymdefs.h for + * actual symbols. Use XK_VoidSymbol to disable a function. + */ +#define USERKEY_FIX XK_F +#define USERKEY_MOVE_LEFT XK_H +#define USERKEY_MOVE_DOWN XK_J +#define USERKEY_MOVE_UP XK_K +#define USERKEY_MOVE_RIGHT XK_L +#define USERKEY_MAXVERT XK_M +#define USERKEY_RAISE XK_R +#define USERKEY_TERMINAL XK_Return +#define USERKEY_MAX XK_X +#define USERKEY_CHANGE XK_Tab +#define USERKEY_BACKCHANGE XK_VoidSymbol +#define USERKEY_WS1 XK_1 +#define USERKEY_WS2 XK_2 +#define USERKEY_WS3 XK_3 +#define USERKEY_WS4 XK_4 +#define USERKEY_WS5 XK_5 +#define USERKEY_WS6 XK_6 +#define USERKEY_WS7 XK_7 +#define USERKEY_WS8 XK_8 +#define USERKEY_WS9 XK_9 +#define USERKEY_WS10 XK_0 +#define USERKEY_PREVWS XK_C +#define USERKEY_NEXTWS XK_V +#define USERKEY_TOPLEFT XK_Y +#define USERKEY_TOPRIGHT XK_U +#define USERKEY_BOTLEFT XK_B +#define USERKEY_BOTRIGHT XK_N +#define USERKEY_DELETE XK_End +#define USERKEY_PREVSCREEN XK_comma +#define USERKEY_NEXTSCREEN XK_period +#define USERKEY_ICONIFY XK_I diff --git a/srcpkgs/mcwm/template b/srcpkgs/mcwm/template index 8e10e08d11..954d774565 100644 --- a/srcpkgs/mcwm/template +++ b/srcpkgs/mcwm/template @@ -4,7 +4,7 @@ _distver=20130209 _patchver=2 wrksrc=${pkgname}-${_distver}-${_patchver} version=${_distver}.${_patchver} -revision=2 +revision=3 build_style=gnu-makefile makedepends="libxcb-devel xcb-proto xcb-util-devel xcb-util-keysyms-devel xcb-util-wm-devel" short_desc="A minimalist stacking X window manager based on XCB" @@ -15,6 +15,7 @@ distfiles="http://hack.org/mc/hacks/$pkgname/$pkgname-${_distver}-${_patchver}.t checksum=2d2f9ced77bc6f90cb9fbdbf790eed97f3be28caefb0de496ac28813aed606be do_build() { + cp ${FILESDIR}/config.h config.h sed -i 's/man\/man1/share\/man\/man1/g' Makefile make CC=$CC ${makejobs} } @@ -23,6 +24,9 @@ do_install() { vmkdir usr/bin vmkdir usr/share/man/man1 make PREFIX=${DESTDIR}/usr install + vinstall scripts/9icon 755 usr/bin + vinstall scripts/mcicon 755 usr/bin + vinstall scripts/mcmenu 755 usr/bin vinstall LICENSE 644 usr/share/licenses/${pkgname} } From 41a646b964e6510dd36f166db0f56d707b782200 Mon Sep 17 00:00:00 2001 From: Ypnose Date: Tue, 2 Jul 2013 21:40:27 +0200 Subject: [PATCH 2/2] mcwm-git: added config.h and needed scripts --- srcpkgs/mcwm-git/files/config.h | 98 +++++++++++++++++++++++++++++++++ srcpkgs/mcwm-git/template | 6 +- 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/mcwm-git/files/config.h diff --git a/srcpkgs/mcwm-git/files/config.h b/srcpkgs/mcwm-git/files/config.h new file mode 100644 index 0000000000..0bfb3c3c76 --- /dev/null +++ b/srcpkgs/mcwm-git/files/config.h @@ -0,0 +1,98 @@ +/* User configurable stuff. */ + +/* + * Move this many pixels when moving or resizing with keyboard unless + * the window has hints saying otherwise. + */ +#define MOVE_STEP 32 + +/* + * Use this modifier combined with other keys to control wm from + * keyboard. Default is Mod4, which on my keyboard is the Alt key but + * is usually the Windows key on more normal keyboard layouts. + */ +#define MODKEY XCB_MOD_MASK_4 + +/* Extra modifier for resizing. Default is Shift. */ +#define SHIFTMOD XCB_MOD_MASK_SHIFT + +/* + * Modifier key to use with mouse buttons. Default Mod1, Meta on my + * keyboard. + */ +#define MOUSEMODKEY XCB_MOD_MASK_1 + +/* + * Start this program when pressing MODKEY + USERKEY_TERMINAL. Needs + * to be in $PATH. + * + * Change to "xterm" if you're feeling conservative. + * + * Can be set from command line with "-t program". + */ +#define TERMINAL "urxvt" + +/* + * Do we allow windows to be iconified? Set to true if you want this + * behaviour to be default. Can also be set by calling mcwm with -i. + */ +#define ALLOWICONS false + +/* + * Start these programs when pressing MOUSEMODKEY and mouse buttons on + * root window. + */ +#define MOUSE1 "" +#define MOUSE2 "" +#define MOUSE3 "mcmenu" + +/* + * Default colour on border for focused windows. Can be set from + * command line with "-f colour". + */ +#define FOCUSCOL "chocolate1" + +/* Ditto for unfocused. Use "-u colour". */ +#define UNFOCUSCOL "grey40" + +/* Ditto for fixed windows. Use "-x colour". */ +#define FIXEDCOL "grey90" + +/* Default width of border window, in pixels. Used unless -b width. */ +#define BORDERWIDTH 1 + +/* + * Keysym codes for window operations. Look in X11/keysymdefs.h for + * actual symbols. Use XK_VoidSymbol to disable a function. + */ +#define USERKEY_FIX XK_F +#define USERKEY_MOVE_LEFT XK_H +#define USERKEY_MOVE_DOWN XK_J +#define USERKEY_MOVE_UP XK_K +#define USERKEY_MOVE_RIGHT XK_L +#define USERKEY_MAXVERT XK_M +#define USERKEY_RAISE XK_R +#define USERKEY_TERMINAL XK_Return +#define USERKEY_MAX XK_X +#define USERKEY_CHANGE XK_Tab +#define USERKEY_BACKCHANGE XK_VoidSymbol +#define USERKEY_WS1 XK_1 +#define USERKEY_WS2 XK_2 +#define USERKEY_WS3 XK_3 +#define USERKEY_WS4 XK_4 +#define USERKEY_WS5 XK_5 +#define USERKEY_WS6 XK_6 +#define USERKEY_WS7 XK_7 +#define USERKEY_WS8 XK_8 +#define USERKEY_WS9 XK_9 +#define USERKEY_WS10 XK_0 +#define USERKEY_PREVWS XK_C +#define USERKEY_NEXTWS XK_V +#define USERKEY_TOPLEFT XK_Y +#define USERKEY_TOPRIGHT XK_U +#define USERKEY_BOTLEFT XK_B +#define USERKEY_BOTRIGHT XK_N +#define USERKEY_DELETE XK_End +#define USERKEY_PREVSCREEN XK_comma +#define USERKEY_NEXTSCREEN XK_period +#define USERKEY_ICONIFY XK_I diff --git a/srcpkgs/mcwm-git/template b/srcpkgs/mcwm-git/template index dba0801a7a..ed552f4cb9 100644 --- a/srcpkgs/mcwm-git/template +++ b/srcpkgs/mcwm-git/template @@ -1,7 +1,7 @@ # Template file for 'mcwm-git' pkgname=mcwm-git version="$(date +%Y%m%d)" -revision=1 +revision=2 build_style=gnu-makefile makedepends="libxcb-devel xcb-proto xcb-util-devel xcb-util-keysyms-devel xcb-util-wm-devel" short_desc="A minimalist stacking X window manager based on XCB" @@ -19,6 +19,7 @@ do_fetch() { } do_build() { + cp ${FILESDIR}/config.h config.h sed -i 's/man\/man1/share\/man\/man1/g' Makefile make CC=$CC ${makejobs} } @@ -27,6 +28,9 @@ do_install() { vmkdir usr/bin vmkdir usr/share/man/man1 make PREFIX=${DESTDIR}/usr install + vinstall scripts/9icon 755 usr/bin + vinstall scripts/mcicon 755 usr/bin + vinstall scripts/mcmenu 755 usr/bin vinstall LICENSE 644 usr/share/licenses/${pkgname} }