Merge branch 'master' into personal

Conflicts:
	config.h
	xoat.c
This commit is contained in:
seanpringle
2012-09-21 16:14:44 +10:00
2 changed files with 20 additions and 4 deletions

View File

@@ -57,16 +57,33 @@
//#define FOCUS_START FOCUS_IGNORE //#define FOCUS_START FOCUS_IGNORE
#define FOCUS_START FOCUS_STEAL #define FOCUS_START FOCUS_STEAL
// Available actions...
// action_move .num = SPOT1/2/3
// action_focus .num = SPOT1/2/3
// action_move_direction .num = UP/DOWN/LEFT/RIGHT
// action_focus_direction .num = UP/DOWN/LEFT/RIGHT
// action_close
// action_cycle
// action_other
// action_command
// action_find_or_start
// action_move_monitor
// action_focus_monitor
// action_fullscreen
// action_above
// action_snapshot
// action_rollback
// If you use "AnyModifier" place those keys at the end of the array. // If you use "AnyModifier" place those keys at the end of the array.
binding keys[] = { binding keys[] = {
// Focus the top-most window in a spot. // Change focus to a spot by direction.
{ .mod = Mod4Mask, .key = XK_Left, .act = action_focus_direction, .num = LEFT }, { .mod = Mod4Mask, .key = XK_Left, .act = action_focus_direction, .num = LEFT },
{ .mod = Mod4Mask, .key = XK_Up, .act = action_focus_direction, .num = UP }, { .mod = Mod4Mask, .key = XK_Up, .act = action_focus_direction, .num = UP },
{ .mod = Mod4Mask, .key = XK_Right, .act = action_focus_direction, .num = RIGHT }, { .mod = Mod4Mask, .key = XK_Right, .act = action_focus_direction, .num = RIGHT },
{ .mod = Mod4Mask, .key = XK_Down, .act = action_focus_direction, .num = DOWN }, { .mod = Mod4Mask, .key = XK_Down, .act = action_focus_direction, .num = DOWN },
// Move the current window to another spot. // Move the current window to another spot by direction.
{ .mod = ShiftMask|Mod4Mask, .key = XK_Left, .act = action_move_direction, .num = LEFT }, { .mod = ShiftMask|Mod4Mask, .key = XK_Left, .act = action_move_direction, .num = LEFT },
{ .mod = ShiftMask|Mod4Mask, .key = XK_Up, .act = action_move_direction, .num = UP }, { .mod = ShiftMask|Mod4Mask, .key = XK_Up, .act = action_move_direction, .num = UP },
{ .mod = ShiftMask|Mod4Mask, .key = XK_Right, .act = action_move_direction, .num = RIGHT }, { .mod = ShiftMask|Mod4Mask, .key = XK_Right, .act = action_move_direction, .num = RIGHT },

3
xoat.c
View File

@@ -586,8 +586,7 @@ Window spot_focus_top_window(int spot, int mon, Window except)
int spot_choose_by_direction(int spot, int mon, int dir) int spot_choose_by_direction(int spot, int mon, int dir)
{ {
monitor *m = &monitors[mon]; monitor *m = &monitors[mon];
int rotate = m->w < m->h ? 1:0; if (m->w < m->h) // rotated?
if (rotate)
{ {
if (dir == LEFT) return SPOT3; if (dir == LEFT) return SPOT3;
if (dir == RIGHT) return SPOT2; if (dir == RIGHT) return SPOT2;