Fixes #855.
_bspc() {
local commands='node desktop monitor query rule 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 automatic_scheme initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen 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 top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
COMPREPLY=()
end
complete -f -c bspc -n '__fish_bspc_needs_command' -a 'node desktop monitor query rule wm subscribe config quit'
-complete -f -c bspc -n '__fish_bspc_using_command config' -a '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 automatic_scheme initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
+complete -f -c bspc -n '__fish_bspc_using_command config' -a '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 top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
(config)
local -a {look,behaviour,input}{_bool,}
look_bool=(borderless_monocle gapless_monocle)
- look=({normal,active,focused}_border_color {top,right,bottom,left}_padding presel_feedback_color border_width window_gap)
+ look=({normal,active,focused}_border_color {top,right,bottom,left}_padding {top,right,bottom,left}_monocle_padding presel_feedback_color border_width window_gap)
behaviour_bool=(single_monocle ignore_ewmh_focus center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors)
behaviour=(mapping_events_count ignore_ewmh_fullscreen external_rules_command split_ratio automatic_scheme initial_polarity directional_focus_tightness status_prefix)
input_bool=(swallow_first_click focus_follows_pointer pointer_follows_{focus,monitor})
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 08/31/2018
+.\" Date: 09/29/2018
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.5-14-g56ad57c
+.\" Source: Bspwm 0.9.5-17-g8573b26
.\" Language: English
.\"
-.TH "BSPWM" "1" "08/31/2018" "Bspwm 0\&.9\&.5\-14\-g56ad57c" "Bspwm Manual"
+.TH "BSPWM" "1" "09/29/2018" "Bspwm 0\&.9\&.5\-17\-g8573b26" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
desktop layout\&.
.RE
.PP
-\fIpaddingless_monocle\fR
+\fItop_monocle_padding\fR, \fIright_monocle_padding\fR, \fIbottom_monocle_padding\fR, \fIleft_monocle_padding\fR
.RS 4
-Remove padding space for the
+Padding space added at the sides of the screen for the
\fBmonocle\fR
desktop layout\&.
.RE
'gapless_monocle'::
Remove gaps of tiled windows for the *monocle* desktop layout.
-'paddingless_monocle'::
- Remove padding space for the *monocle* desktop layout.
+'top_monocle_padding'::
+'right_monocle_padding'::
+'bottom_monocle_padding'::
+'left_monocle_padding'::
+ Padding space added at the sides of the screen for the *monocle* desktop layout.
'single_monocle'::
Set the desktop layout to *monocle* if there's only one tiled window in the tree.
}
SET_DEF_MON_DESK(padding.left, lp)
#undef SET_DEF_MON_DESK
+ } else if (streq("top_monocle_padding", name)) {
+ if (sscanf(value, "%i", &monocle_padding.top) != 1) {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ }
+ } else if (streq("right_monocle_padding", name)) {
+ if (sscanf(value, "%i", &monocle_padding.right) != 1) {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ }
+ } else if (streq("bottom_monocle_padding", name)) {
+ if (sscanf(value, "%i", &monocle_padding.bottom) != 1) {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ }
+ } else if (streq("left_monocle_padding", name)) {
+ if (sscanf(value, "%i", &monocle_padding.left) != 1) {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ }
#define SET_STR(s) \
} else if (streq(#s, name)) { \
if (snprintf(s, sizeof(s), "%s", value) < 0) { \
}
SET_BOOL(borderless_monocle)
SET_BOOL(gapless_monocle)
- SET_BOOL(paddingless_monocle)
SET_BOOL(single_monocle)
SET_BOOL(swallow_first_click)
SET_BOOL(pointer_follows_focus)
} else if (streq("left_padding", name)) {
GET_DEF_MON_DESK(padding.left)
#undef GET_DEF_MON_DESK
+ } else if (streq("top_monocle_padding", name)) {
+ fprintf(rsp, "%i", monocle_padding.top);
+ } else if (streq("right_monocle_padding", name)) {
+ fprintf(rsp, "%i", monocle_padding.right);
+ } else if (streq("bottom_monocle_padding", name)) {
+ fprintf(rsp, "%i", monocle_padding.bottom);
+ } else if (streq("left_monocle_padding", name)) {
+ fprintf(rsp, "%i", monocle_padding.left);
} else if (streq("external_rules_command", name)) {
fprintf(rsp, "%s", external_rules_command);
} else if (streq("status_prefix", name)) {
fprintf(rsp, "%s", BOOL_STR(s));
GET_BOOL(borderless_monocle)
GET_BOOL(gapless_monocle)
- GET_BOOL(paddingless_monocle)
GET_BOOL(single_monocle)
GET_BOOL(swallow_first_click)
GET_BOOL(focus_follows_pointer)
snprintf(presel_feedback_color, sizeof(presel_feedback_color), "%s", PRESEL_FEEDBACK_COLOR);
padding = (padding_t) PADDING;
+ monocle_padding = (padding_t) MONOCLE_PADDING;
window_gap = WINDOW_GAP;
border_width = BORDER_WIDTH;
split_ratio = SPLIT_RATIO;
borderless_monocle = BORDERLESS_MONOCLE;
gapless_monocle = GAPLESS_MONOCLE;
- paddingless_monocle = PADDINGLESS_MONOCLE;
single_monocle = SINGLE_MONOCLE;
focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
#define PRESEL_FEEDBACK_COLOR "#f4d775"
#define PADDING {0, 0, 0, 0}
+#define MONOCLE_PADDING {0, 0, 0, 0}
#define WINDOW_GAP 6
#define BORDER_WIDTH 1
#define SPLIT_RATIO 0.5
#define BORDERLESS_MONOCLE false
#define GAPLESS_MONOCLE false
-#define PADDINGLESS_MONOCLE false
#define SINGLE_MONOCLE false
#define FOCUS_FOLLOWS_POINTER false
char presel_feedback_color[MAXLEN];
padding_t padding;
+padding_t monocle_padding;
int window_gap;
unsigned int border_width;
double split_ratio;
bool borderless_monocle;
bool gapless_monocle;
-bool paddingless_monocle;
bool single_monocle;
bool focus_follows_pointer;
xcb_rectangle_t rect = m->rectangle;
- if (!paddingless_monocle || l != LAYOUT_MONOCLE) {
- rect.x += m->padding.left + d->padding.left;
- rect.y += m->padding.top + d->padding.top;
- rect.width -= m->padding.left + d->padding.left + d->padding.right + m->padding.right;
- rect.height -= m->padding.top + d->padding.top + d->padding.bottom + m->padding.bottom;
+ rect.x += m->padding.left + d->padding.left;
+ rect.y += m->padding.top + d->padding.top;
+ rect.width -= m->padding.left + d->padding.left + d->padding.right + m->padding.right;
+ rect.height -= m->padding.top + d->padding.top + d->padding.bottom + m->padding.bottom;
+
+ if (l == LAYOUT_MONOCLE) {
+ rect.x += monocle_padding.left;
+ rect.y += monocle_padding.top;
+ rect.width -= monocle_padding.left + monocle_padding.right;
+ rect.height -= monocle_padding.top + monocle_padding.bottom;
}
if (!gapless_monocle || l != LAYOUT_MONOCLE) {