New package: monsterwm-git

This commit is contained in:
Ypnose 2013-06-24 13:11:05 +02:00
parent c618944b57
commit 6e12051dc7
2 changed files with 145 additions and 0 deletions

View file

@ -0,0 +1,109 @@
/* see LICENSE for copyright and license */
#ifndef CONFIG_H
#define CONFIG_H
/** modifiers **/
#define MOD1 Mod1Mask /* ALT key */
#define MOD4 Mod4Mask /* Super/Windows key */
#define CONTROL ControlMask /* Control key */
#define SHIFT ShiftMask /* Shift key */
/** generic settings **/
#define MASTER_SIZE 0.52
#define SHOW_PANEL True /* show panel by default on exec */
#define TOP_PANEL True /* False means panel is on bottom */
#define PANEL_HEIGHT 18 /* 0 for no space for panel, thus no panel */
#define DEFAULT_MODE TILE /* initial layout/mode: TILE MONOCLE BSTACK GRID FLOAT */
#define ATTACH_ASIDE True /* False means new window is master */
#define FOLLOW_WINDOW False /* follow the window when moved to a different desktop */
#define FOLLOW_MOUSE False /* focus the window the mouse just entered */
#define CLICK_TO_FOCUS True /* focus an unfocused window when clicked */
#define FOCUS_BUTTON Button3 /* mouse button to be used along with CLICK_TO_FOCUS */
#define BORDER_WIDTH 2 /* window border width */
#define FOCUS "#ff950e" /* focused window border color */
#define UNFOCUS "#444444" /* unfocused window border color */
#define MINWSZ 50 /* minimum window size in pixels */
#define DEFAULT_DESKTOP 0 /* the desktop to focus initially */
#define DESKTOPS 4 /* number of desktops - edit DESKTOPCHANGE keys to suit */
/**
* open applications to specified desktop with specified mode.
* if desktop is negative, then current is assumed
*/
static const AppRule rules[] = { \
/* class desktop follow float */
{ "MPlayer", 3, True, False },
{ "Gimp", 0, False, True },
};
/* helper for spawning shell commands */
#define SHCMD(cmd) {.com = (const char*[]){"/bin/sh", "-c", cmd, NULL}}
/**
* custom commands
* must always end with ', NULL };'
*/
static const char *termcmd[] = { "xterm", NULL };
static const char *menucmd[] = { "dmenu_run", NULL };
#define DESKTOPCHANGE(K,N) \
{ MOD1, K, change_desktop, {.i = N}}, \
{ MOD1|ShiftMask, K, client_to_desktop, {.i = N}},
/**
* keyboard shortcuts
*/
static Key keys[] = {
/* modifier key function argument */
{ MOD1, XK_b, togglepanel, {NULL}},
{ MOD1, XK_BackSpace, focusurgent, {NULL}},
{ MOD1|SHIFT, XK_c, killclient, {NULL}},
{ MOD1, XK_j, next_win, {NULL}},
{ MOD1, XK_k, prev_win, {NULL}},
{ MOD1, XK_h, resize_master, {.i = -10}}, /* decrease size in px */
{ MOD1, XK_l, resize_master, {.i = +10}}, /* increase size in px */
{ MOD1, XK_o, resize_stack, {.i = -10}}, /* shrink size in px */
{ MOD1, XK_p, resize_stack, {.i = +10}}, /* grow size in px */
{ MOD1|CONTROL, XK_h, rotate, {.i = -1}},
{ MOD1|CONTROL, XK_l, rotate, {.i = +1}},
{ MOD1|SHIFT, XK_h, rotate_filled, {.i = -1}},
{ MOD1|SHIFT, XK_l, rotate_filled, {.i = +1}},
{ MOD1, XK_Tab, last_desktop, {NULL}},
{ MOD1, XK_Return, swap_master, {NULL}},
{ MOD1|SHIFT, XK_j, move_down, {NULL}},
{ MOD1|SHIFT, XK_k, move_up, {NULL}},
{ MOD1|SHIFT, XK_t, switch_mode, {.i = TILE}},
{ MOD1|SHIFT, XK_m, switch_mode, {.i = MONOCLE}},
{ MOD1|SHIFT, XK_b, switch_mode, {.i = BSTACK}},
{ MOD1|SHIFT, XK_g, switch_mode, {.i = GRID}},
{ MOD1|SHIFT, XK_f, switch_mode, {.i = FLOAT}},
{ MOD1|CONTROL, XK_r, quit, {.i = 0}}, /* quit with exit value 0 */
{ MOD1|CONTROL, XK_q, quit, {.i = 1}}, /* quit with exit value 1 */
{ MOD1|SHIFT, XK_Return, spawn, {.com = termcmd}},
{ MOD4, XK_v, spawn, {.com = menucmd}},
{ MOD4, XK_j, moveresize, {.v = (int []){ 0, 25, 0, 0 }}}, /* move down */
{ MOD4, XK_k, moveresize, {.v = (int []){ 0, -25, 0, 0 }}}, /* move up */
{ MOD4, XK_l, moveresize, {.v = (int []){ 25, 0, 0, 0 }}}, /* move right */
{ MOD4, XK_h, moveresize, {.v = (int []){ -25, 0, 0, 0 }}}, /* move left */
{ MOD4|SHIFT, XK_j, moveresize, {.v = (int []){ 0, 0, 0, 25 }}}, /* height grow */
{ MOD4|SHIFT, XK_k, moveresize, {.v = (int []){ 0, 0, 0, -25 }}}, /* height shrink */
{ MOD4|SHIFT, XK_l, moveresize, {.v = (int []){ 0, 0, 25, 0 }}}, /* width grow */
{ MOD4|SHIFT, XK_h, moveresize, {.v = (int []){ 0, 0, -25, 0 }}}, /* width shrink */
DESKTOPCHANGE( XK_F1, 0)
DESKTOPCHANGE( XK_F2, 1)
DESKTOPCHANGE( XK_F3, 2)
DESKTOPCHANGE( XK_F4, 3)
};
/**
* mouse shortcuts
*/
static Button buttons[] = {
{ MOD1, Button1, mousemotion, {.i = MOVE}},
{ MOD1, Button3, mousemotion, {.i = RESIZE}},
{ MOD4, Button3, spawn, {.com = menucmd}},
};
#endif
/* vim: set expandtab ts=4 sts=4 sw=4 : */

View file

@ -0,0 +1,36 @@
# Template file for 'monsterwm-git'
pkgname=monsterwm-git
version="$(date +%Y%m%d)"
revision=1
makedepends="libX11-devel"
short_desc="Minimal and lightweight dynamic tiling window manager"
maintainer="Ypnose <linuxienATlegtuxDOTorg>"
license="MIT"
homepage="https://github.com/c00kiemon5ter/monsterwm"
nofetch=yes
noextract=yes
do_fetch() {
local url="git://github.com/c00kiemon5ter/monsterwm"
msg_normal "Fetching source from $url ...\n"
git clone ${url} ${pkgname}-${version}
}
do_build() {
cp ${FILESDIR}/config.h config.h
sed -i 's/CFLAGS =/CFLAGS +=/g' Makefile
sed -i 's/LDFLAGS =/LDFLAGS +=/g' Makefile
make CC=$CC INCS="-I." LIBS="-lX11" ${makejobs}
}
do_install() {
make PREFIX=/usr DESTDIR=$DESTDIR install
vinstall LICENSE 644 usr/share/licenses/$pkgname
}
monsterwm-git_package() {
pkg_install() {
vmove usr
}
}