mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
parent
458358723f
commit
0a98de6624
9 changed files with 32 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
_bspc() {
|
_bspc() {
|
||||||
local commands='node desktop monitor query rule restore wm subscribe config quit'
|
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=()
|
COMPREPLY=()
|
||||||
|
|
||||||
|
|
|
@ -11,4 +11,4 @@ function __fish_bspc_using_command
|
||||||
end
|
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_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'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
_bspc() {
|
_bspc() {
|
||||||
local -a commands settings
|
local -a commands settings
|
||||||
commands=('node' 'desktop' 'monitor' 'query' 'rule' 'restore' 'wm' 'subscribe' 'config' 'quit')
|
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
|
if (( CURRENT == 2 )) ; then
|
||||||
_values 'command' "$commands[@]"
|
_values 'command' "$commands[@]"
|
||||||
elif (( CURRENT == 3 )) ; then
|
elif (( CURRENT == 3 )) ; then
|
||||||
|
|
11
doc/bspwm.1
11
doc/bspwm.1
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: bspwm
|
.\" Title: bspwm
|
||||||
.\" Author: [see the "Author" section]
|
.\" Author: [see the "Author" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
||||||
.\" Date: 05/24/2016
|
.\" Date: 05/28/2016
|
||||||
.\" Manual: Bspwm Manual
|
.\" Manual: Bspwm Manual
|
||||||
.\" Source: Bspwm 0.9.1-78-gfd6d090
|
.\" Source: Bspwm 0.9.1-80-g4583587
|
||||||
.\" Language: English
|
.\" 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
|
.\" * Define some portability stuff
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
@ -1065,6 +1065,11 @@ Set the desktop layout to
|
||||||
if there\(cqs only one tiled window in the tree\&.
|
if there\(cqs only one tiled window in the tree\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\fIpointer_motion_interval\fR
|
||||||
|
.RS 4
|
||||||
|
The minimum interval, in milliseconds, between two motion notify events\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\fIpointer_modifier\fR
|
\fIpointer_modifier\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Keyboard modifier used for moving or resizing windows\&. Accept the following values:
|
Keyboard modifier used for moving or resizing windows\&. Accept the following values:
|
||||||
|
|
|
@ -630,6 +630,9 @@ Global Settings
|
||||||
'single_monocle'::
|
'single_monocle'::
|
||||||
Set the desktop layout to *monocle* if there's only one tiled window in the tree.
|
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'::
|
'pointer_modifier'::
|
||||||
Keyboard modifier used for moving or resizing windows. Accept the following values: *shift*, *control*, *lock*, *mod1*, *mod2*, *mod3*, *mod4*, *mod5*.
|
Keyboard modifier used for moving or resizing windows. Accept the following values: *shift*, *control*, *lock*, *mod1*, *mod2*, *mod3*, *mod4*, *mod5*.
|
||||||
|
|
||||||
|
|
|
@ -1435,6 +1435,11 @@ void set_setting(coordinates_t loc, char *name, char *value, FILE *rsp)
|
||||||
fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
|
fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
|
||||||
return;
|
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) ||
|
} else if (streq("pointer_action1", name) ||
|
||||||
streq("pointer_action2", name) ||
|
streq("pointer_action2", name) ||
|
||||||
streq("pointer_action3", name)) {
|
streq("pointer_action3", name)) {
|
||||||
|
@ -1568,6 +1573,8 @@ void get_setting(coordinates_t loc, char *name, FILE* rsp)
|
||||||
fprintf(rsp, "%s", CHILD_POL_STR(initial_polarity));
|
fprintf(rsp, "%s", CHILD_POL_STR(initial_polarity));
|
||||||
} else if (streq("pointer_modifier", name)) {
|
} else if (streq("pointer_modifier", name)) {
|
||||||
print_modifier_mask(pointer_modifier, rsp);
|
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) ||
|
} else if (streq("pointer_action1", name) ||
|
||||||
streq("pointer_action2", name) ||
|
streq("pointer_action2", name) ||
|
||||||
streq("pointer_action3", name)) {
|
streq("pointer_action3", name)) {
|
||||||
|
|
|
@ -239,8 +239,8 @@ void track_pointer(coordinates_t loc, pointer_action_t pac, xcb_point_t pos)
|
||||||
uint8_t resp_type = XCB_EVENT_RESPONSE_TYPE(evt);
|
uint8_t resp_type = XCB_EVENT_RESPONSE_TYPE(evt);
|
||||||
if (resp_type == XCB_MOTION_NOTIFY) {
|
if (resp_type == XCB_MOTION_NOTIFY) {
|
||||||
xcb_motion_notify_event_t *e = (xcb_motion_notify_event_t*) evt;
|
xcb_motion_notify_event_t *e = (xcb_motion_notify_event_t*) evt;
|
||||||
int64_t dtime = e->time - last_motion_time;
|
uint32_t dtime = e->time - last_motion_time;
|
||||||
if (dtime < 20) {
|
if (dtime < pointer_motion_interval) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
last_motion_time = e->time;
|
last_motion_time = e->time;
|
||||||
|
|
|
@ -56,6 +56,7 @@ void load_settings(void)
|
||||||
split_ratio = SPLIT_RATIO;
|
split_ratio = SPLIT_RATIO;
|
||||||
initial_polarity = FIRST_CHILD;
|
initial_polarity = FIRST_CHILD;
|
||||||
pointer_modifier = POINTER_MODIFIER;
|
pointer_modifier = POINTER_MODIFIER;
|
||||||
|
pointer_motion_interval = POINTER_MOTION_INTERVAL;
|
||||||
|
|
||||||
pointer_actions[0] = ACTION_MOVE;
|
pointer_actions[0] = ACTION_MOVE;
|
||||||
pointer_actions[1] = ACTION_RESIZE_SIDE;
|
pointer_actions[1] = ACTION_RESIZE_SIDE;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#define CONFIG_NAME WM_NAME "rc"
|
#define CONFIG_NAME WM_NAME "rc"
|
||||||
#define CONFIG_HOME_ENV "XDG_CONFIG_HOME"
|
#define CONFIG_HOME_ENV "XDG_CONFIG_HOME"
|
||||||
#define POINTER_MODIFIER XCB_MOD_MASK_4
|
#define POINTER_MODIFIER XCB_MOD_MASK_4
|
||||||
|
#define POINTER_MOTION_INTERVAL 17
|
||||||
#define EXTERNAL_RULES_COMMAND ""
|
#define EXTERNAL_RULES_COMMAND ""
|
||||||
#define STATUS_PREFIX "W"
|
#define STATUS_PREFIX "W"
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ double split_ratio;
|
||||||
|
|
||||||
child_polarity_t initial_polarity;
|
child_polarity_t initial_polarity;
|
||||||
uint16_t pointer_modifier;
|
uint16_t pointer_modifier;
|
||||||
|
uint32_t pointer_motion_interval;
|
||||||
pointer_action_t pointer_actions[3];
|
pointer_action_t pointer_actions[3];
|
||||||
|
|
||||||
bool borderless_monocle;
|
bool borderless_monocle;
|
||||||
|
|
Loading…
Add table
Reference in a new issue