diff --git a/config.h b/config.h index 87866b9..ea48151 100644 --- a/config.h +++ b/config.h @@ -57,16 +57,33 @@ //#define FOCUS_START FOCUS_IGNORE #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. 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_Up, .act = action_focus_direction, .num = UP }, { .mod = Mod4Mask, .key = XK_Right, .act = action_focus_direction, .num = RIGHT }, { .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_Up, .act = action_move_direction, .num = UP }, { .mod = ShiftMask|Mod4Mask, .key = XK_Right, .act = action_move_direction, .num = RIGHT }, diff --git a/xoat.c b/xoat.c index 3b16ac1..9384b2d 100644 --- a/xoat.c +++ b/xoat.c @@ -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) { monitor *m = &monitors[mon]; - int rotate = m->w < m->h ? 1:0; - if (rotate) + if (m->w < m->h) // rotated? { if (dir == LEFT) return SPOT3; if (dir == RIGHT) return SPOT2;