_bspc() {
local commands='node desktop monitor query rule restore wm subscribe config quit'
- local settings='external_rules_command status_prefix normal_border_color active_border_color focused_border_color presel_feedback_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio initial_polarity borderless_monocle gapless_monocle single_monocle pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus focus_follows_pointer pointer_follows_focus pointer_follows_monitor history_aware_focus focus_by_distance ignore_ewmh_focus center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
+ local settings='external_rules_command status_prefix normal_border_color active_border_color focused_border_color presel_feedback_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio initial_polarity borderless_monocle gapless_monocle single_monocle pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus focus_follows_pointer pointer_follows_focus pointer_follows_monitor history_aware_focus ignore_ewmh_focus center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
COMPREPLY=()
_bspc() {
local -a commands settings
commands=('node' 'desktop' 'monitor' 'query' 'rule' 'restore' 'wm' 'subscribe' 'config' 'quit')
- settings=('external_rules_command' 'status_prefix' 'normal_border_color' 'active_border_color' 'focused_border_color' 'presel_feedback_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'initial_polarity' 'borderless_monocle' 'gapless_monocle' 'single_monocle' 'pointer_modifier' 'pointer_action1' 'pointer_action2' 'pointer_action3' 'click_to_focus' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' 'history_aware_focus' 'focus_by_distance' 'ignore_ewmh_focus' 'center_pseudo_tiled' 'honor_size_hints' 'remove_disabled_monitors' 'remove_unplugged_monitors' 'merge_overlapping_monitors')
+ settings=('external_rules_command' 'status_prefix' 'normal_border_color' 'active_border_color' 'focused_border_color' 'presel_feedback_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'initial_polarity' 'borderless_monocle' 'gapless_monocle' 'single_monocle' 'pointer_modifier' 'pointer_action1' 'pointer_action2' 'pointer_action3' 'click_to_focus' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' 'history_aware_focus' 'ignore_ewmh_focus' 'center_pseudo_tiled' 'honor_size_hints' 'remove_disabled_monitors' 'remove_unplugged_monitors' 'merge_overlapping_monitors')
if (( CURRENT == 2 )) ; then
_values 'command' "$commands[@]"
elif (( CURRENT == 3 )) ; then
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 04/19/2016
+.\" Date: 04/21/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.1-39-ge70f826
+.\" Source: Bspwm 0.9.1-45-g09e3d72
.\" Language: English
.\"
-.TH "BSPWM" "1" "04/19/2016" "Bspwm 0\&.9\&.1\-39\-ge70f826" "Bspwm Manual"
+.TH "BSPWM" "1" "04/21/2016" "Bspwm 0\&.9\&.1\-45\-g09e3d72" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Give priority to the focus history when focusing nodes\&.
.RE
.PP
-\fIfocus_by_distance\fR
-.RS 4
-Base focusing on distances between windows\&.
-.RE
-.PP
\fIborderless_monocle\fR
.RS 4
Remove borders of tiled windows for the
'history_aware_focus'::
Give priority to the focus history when focusing nodes.
-'focus_by_distance'::
- Base focusing on distances between windows.
-
'borderless_monocle'::
Remove borders of tiled windows for the *monocle* desktop layout.
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
-bspc config focus_by_distance true
bspc config history_aware_focus true
bspc rule -a Gimp desktop='^8' state=floating follow=on
SET_BOOL(pointer_follows_focus)
SET_BOOL(pointer_follows_monitor)
SET_BOOL(history_aware_focus)
- SET_BOOL(focus_by_distance)
SET_BOOL(ignore_ewmh_focus)
SET_BOOL(center_pseudo_tiled)
SET_BOOL(honor_size_hints)
GET_BOOL(pointer_follows_focus)
GET_BOOL(pointer_follows_monitor)
GET_BOOL(history_aware_focus)
- GET_BOOL(focus_by_distance)
GET_BOOL(ignore_ewmh_focus)
GET_BOOL(center_pseudo_tiled)
GET_BOOL(honor_size_hints)
#define EXTERNAL_RULES_COMMAND ""
#define STATUS_PREFIX "W"
-
#define NORMAL_BORDER_COLOR "#30302f"
#define ACTIVE_BORDER_COLOR "#474645"
#define FOCUSED_BORDER_COLOR "#817f7f"
#define SPLIT_RATIO 0.5
#define HISTORY_AWARE_FOCUS false
-#define FOCUS_BY_DISTANCE false
#define BORDERLESS_MONOCLE false
#define GAPLESS_MONOCLE false
#define PADDINGLESS_MONOCLE false
bool pointer_follows_focus;
bool pointer_follows_monitor;
bool history_aware_focus;
-bool focus_by_distance;
bool ignore_ewmh_focus;
bool center_pseudo_tiled;
bool click_to_focus;
nearest = nearest_from_history(m, d, n, dir, sel);
}
if (nearest == NULL) {
- if (focus_by_distance) {
- nearest = nearest_from_distance(m, d, n, dir, sel);
- } else {
- nearest = nearest_from_tree(m, d, n, dir, sel);
- }
+ nearest = nearest_from_distance(m, d, n, dir, sel);
}
return nearest;
}
}
}
-node_t *nearest_from_tree(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, node_select_t sel)
-{
- if (n == NULL) {
- return NULL;
- }
-
- node_t *fence = find_fence(n, dir);
-
- if (fence == NULL) {
- return NULL;
- }
-
- node_t *nearest = NULL;
-
- if (dir == DIR_NORTH || dir == DIR_WEST) {
- nearest = second_extrema(fence->first_child);
- } else if (dir == DIR_SOUTH || dir == DIR_EAST) {
- nearest = first_extrema(fence->second_child);
- }
-
- coordinates_t ref = {m, d, n};
- coordinates_t loc = {m, d, nearest};
-
- if (nearest != NULL && (nearest->vacant ||
- nearest->client == NULL || !node_matches(&loc, &ref, sel))) {
- return NULL;
- }
-
- return nearest;
-}
-
node_t *nearest_from_history(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, node_select_t sel)
{
if (n == NULL || (n->client != NULL && !IS_TILED(n->client))) {
bool is_descendant(node_t *a, node_t *b);
bool find_by_id(uint32_t id, coordinates_t *loc);
node_t *find_by_id_in(node_t *r, uint32_t id);
-node_t *nearest_from_tree(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, node_select_t sel);
node_t *nearest_from_history(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, node_select_t sel);
node_t *nearest_from_distance(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, node_select_t sel);
void get_opposite(direction_t src, direction_t *dst);