'auto_cancel'::
Interpret two consecutive identical *presel* messages as a *cancel* message.
-'focus_by_distance'::
- Use window or leaf distance for focus movement.
-
'history_aware_focus'::
Give priority to the focus history when focusing nodes.
message\&.
.RE
.PP
-\fIfocus_by_distance\fR
-.RS 4
-Use window or leaf distance for focus movement\&.
-.RE
-.PP
\fIhistory_aware_focus\fR
.RS 4
Give priority to the focus history when focusing nodes\&.
'auto_cancel'::
Interpret two consecutive identical *presel* messages as a *cancel* message.
-'focus_by_distance'::
- Use window or leaf distance for focus movement.
-
'history_aware_focus'::
Give priority to the focus history when focusing nodes.
bspc config window_gap 12
bspc config borderless_monocle true
bspc config gapless_monocle true
-bspc config focus_by_distance true
SETBOOL(apply_shadow_property)
SETBOOL(auto_alternate)
SETBOOL(auto_cancel)
- SETBOOL(focus_by_distance)
SETBOOL(history_aware_focus)
#undef SETBOOL
} else if (streq("wm_name", name)) {
GETBOOL(apply_shadow_property)
GETBOOL(auto_alternate)
GETBOOL(auto_cancel)
- GETBOOL(focus_by_distance)
GETBOOL(history_aware_focus)
#undef GETBOOL
else if (streq("wm_name", name))
apply_shadow_property = APPLY_SHADOW_PROPERTY;
auto_alternate = AUTO_ALTERNATE;
auto_cancel = AUTO_CANCEL;
- focus_by_distance = FOCUS_BY_DISTANCE;
history_aware_focus = HISTORY_AWARE_FOCUS;
}
#define APPLY_SHADOW_PROPERTY false
#define AUTO_ALTERNATE false
#define AUTO_CANCEL false
-#define FOCUS_BY_DISTANCE false
#define HISTORY_AWARE_FOCUS false
char focused_border_color[MAXLEN];
bool apply_shadow_property;
bool auto_alternate;
bool auto_cancel;
-bool focus_by_distance;
bool history_aware_focus;
char wm_name[MAXLEN];
node_t *nearest = NULL;
if (history_aware_focus)
nearest = nearest_from_history(d->history, n, dir);
- if (nearest == NULL) {
- if (focus_by_distance) {
- nearest = nearest_from_distance(d, n, dir);
- } else {
- nearest = nearest_from_tree(n, dir);
- }
- }
- return nearest;
-}
-
-node_t *nearest_from_tree(node_t *n, direction_t dir)
-{
- if (n == NULL)
- return NULL;
-
- node_t *fence = find_fence(n, dir);
-
- if (fence == NULL)
- return NULL;
-
- node_t *nearest = NULL;
-
- if (dir == DIR_UP || dir == DIR_LEFT)
- nearest = second_extrema(fence->first_child);
- else if (dir == DIR_DOWN || dir == DIR_RIGHT)
- nearest = first_extrema(fence->second_child);
-
+ if (nearest == NULL)
+ nearest = nearest_from_distance(d, n, dir);
return nearest;
}
void update_current(void);
node_t *find_fence(node_t *, direction_t);
node_t *nearest_neighbor(desktop_t *, node_t *, direction_t);
-node_t *nearest_from_tree(node_t *, direction_t);
node_t *nearest_from_distance(desktop_t *, node_t *, direction_t);
node_t *nearest_from_history(focus_history_t *, node_t *, direction_t);
node_t *find_biggest(desktop_t *);