Fixes #482.
_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 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_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus focus_follows_pointer pointer_follows_focus pointer_follows_monitor ignore_ewmh_focus 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 restore 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 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 ignore_ewmh_focus 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 split_ratio initial_polarity borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus focus_follows_pointer pointer_follows_focus pointer_follows_monitor ignore_ewmh_focus center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
_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' '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_motion_interval' 'pointer_modifier' 'pointer_action1' 'pointer_action2' 'pointer_action3' 'click_to_focus' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' '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.79.1 <http://docbook.sf.net/>
-.\" Date: 05/24/2016
+.\" Date: 05/28/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.1-78-gfd6d090
+.\" Source: Bspwm 0.9.1-80-g4583587
.\" Language: English
.\"
-.TH "BSPWM" "1" "05/24/2016" "Bspwm 0\&.9\&.1\-78\-gfd6d090" "Bspwm Manual"
+.TH "BSPWM" "1" "05/28/2016" "Bspwm 0\&.9\&.1\-80\-g4583587" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
if there\(cqs only one tiled window in the tree\&.
.RE
.PP
+\fIpointer_motion_interval\fR
+.RS 4
+The minimum interval, in milliseconds, between two motion notify events\&.
+.RE
+.PP
\fIpointer_modifier\fR
.RS 4
Keyboard modifier used for moving or resizing windows\&. Accept the following values:
'single_monocle'::
Set the desktop layout to *monocle* if there's only one tiled window in the tree.
+'pointer_motion_interval'::
+ The minimum interval, in milliseconds, between two motion notify events.
+
'pointer_modifier'::
Keyboard modifier used for moving or resizing windows. Accept the following values: *shift*, *control*, *lock*, *mod1*, *mod2*, *mod3*, *mod4*, *mod5*.
fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
return;
}
+ } else if (streq("pointer_motion_interval", name)) {
+ if (sscanf(value, "%u", &pointer_motion_interval) != 1) {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ return;
+ }
} else if (streq("pointer_action1", name) ||
streq("pointer_action2", name) ||
streq("pointer_action3", name)) {
fprintf(rsp, "%s", CHILD_POL_STR(initial_polarity));
} else if (streq("pointer_modifier", name)) {
print_modifier_mask(pointer_modifier, rsp);
+ } else if (streq("pointer_motion_interval", name)) {
+ fprintf(rsp, "%u", pointer_motion_interval);
} else if (streq("pointer_action1", name) ||
streq("pointer_action2", name) ||
streq("pointer_action3", name)) {
uint8_t resp_type = XCB_EVENT_RESPONSE_TYPE(evt);
if (resp_type == XCB_MOTION_NOTIFY) {
xcb_motion_notify_event_t *e = (xcb_motion_notify_event_t*) evt;
- int64_t dtime = e->time - last_motion_time;
- if (dtime < 20) {
+ uint32_t dtime = e->time - last_motion_time;
+ if (dtime < pointer_motion_interval) {
continue;
}
last_motion_time = e->time;
split_ratio = SPLIT_RATIO;
initial_polarity = FIRST_CHILD;
pointer_modifier = POINTER_MODIFIER;
+ pointer_motion_interval = POINTER_MOTION_INTERVAL;
pointer_actions[0] = ACTION_MOVE;
pointer_actions[1] = ACTION_RESIZE_SIDE;
#include "types.h"
-#define WM_NAME "bspwm"
-#define CONFIG_NAME WM_NAME "rc"
-#define CONFIG_HOME_ENV "XDG_CONFIG_HOME"
-#define POINTER_MODIFIER XCB_MOD_MASK_4
-#define EXTERNAL_RULES_COMMAND ""
-#define STATUS_PREFIX "W"
+#define WM_NAME "bspwm"
+#define CONFIG_NAME WM_NAME "rc"
+#define CONFIG_HOME_ENV "XDG_CONFIG_HOME"
+#define POINTER_MODIFIER XCB_MOD_MASK_4
+#define POINTER_MOTION_INTERVAL 17
+#define EXTERNAL_RULES_COMMAND ""
+#define STATUS_PREFIX "W"
#define NORMAL_BORDER_COLOR "#30302f"
#define ACTIVE_BORDER_COLOR "#474645"
child_polarity_t initial_polarity;
uint16_t pointer_modifier;
+uint32_t pointer_motion_interval;
pointer_action_t pointer_actions[3];
bool borderless_monocle;