]> git.lizzy.rs Git - bspwm.git/commitdiff
Add setting: presel_feedback
authorSamuel Tribe <git@sjt.io>
Fri, 23 Nov 2018 14:37:55 +0000 (14:37 +0000)
committerBastien Dejean <nihilhill@gmail.com>
Sun, 27 Jan 2019 09:49:14 +0000 (10:49 +0100)
contrib/bash_completion
contrib/fish_completion
contrib/zsh_completion
doc/bspwm.1
doc/bspwm.1.asciidoc
src/messages.c
src/settings.c
src/settings.h
src/window.c

index 31a934b99eb917907c12683ce44727323501dfa0..059612c5e8201990a9b67cf3cc413beb00dfb012 100644 (file)
@@ -1,7 +1,7 @@
 _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 top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme removal_adjustment 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 ignore_ewmh_struts 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 removal_adjustment initial_polarity directional_focus_tightness presel_feedback 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 ignore_ewmh_struts center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
 
        COMPREPLY=()
 
index 2524ef3d5872f8d42e1f9bedc60bd8e67cc10356..c76cde5bd46ffacd4ee36edc5b335d969ae65925 100644 (file)
@@ -11,4 +11,4 @@ function __fish_bspc_using_command
 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 top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme removal_adjustment 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 ignore_ewmh_struts 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 removal_adjustment initial_polarity directional_focus_tightness presel_feedback 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 ignore_ewmh_struts center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
index 903d6d2d7e3bb7c35f3fb5294273917357d68a8c..0638ac641b68d0a22ad65dce3d103e1cd14593dd 100644 (file)
@@ -315,7 +315,7 @@ _bspc() {
                        ;;
                (config)
                        local -a {look,behaviour,input}{_bool,}
-                       look_bool=(borderless_monocle gapless_monocle)
+                       look_bool=(presel_feedback borderless_monocle gapless_monocle)
                        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 removal_adjustment ignore_ewmh_focus ignore_ewmh_struts 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)
index fe447ac916e85f92e6ff3f7ad2496df537b2d325..f7a99942243ffb85dd58b83104311502ee539573 100644 (file)
@@ -1186,6 +1186,12 @@ side of another window\&. Accept the following values:
 Adjust the brother when unlinking a node from the tree in accordance with the automatic insertion scheme\&.
 .RE
 .PP
+\fIpresel_feedback\fR
+.RS 4
+Draw the preselection feedback area\&. Defaults to
+\fItrue\fR\&.
+.RE
+.PP
 \fIborderless_monocle\fR
 .RS 4
 Remove borders of tiled windows for the
index 20d9298d8cbdb50598e8e4af26b70e2568952f4f..823c67789df0d843e8a8c363b8d905aceebc8022 100644 (file)
@@ -696,6 +696,9 @@ Global Settings
 'removal_adjustment'::
        Adjust the brother when unlinking a node from the tree in accordance with the automatic insertion scheme.
 
+'presel_feedback'::
+       Draw the preselection feedback area. Defaults to 'true'.
+
 'borderless_monocle'::
        Remove borders of tiled windows for the *monocle* desktop layout.
 
index 07035713051a628b3b3f81529e10fed251a901e2..c80f95768263125c55cb4a70eaf43087559594e7 100644 (file)
@@ -1666,6 +1666,7 @@ void set_setting(coordinates_t loc, char *name, char *value, FILE *rsp)
                        fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value); \
                        return; \
                }
+               SET_BOOL(presel_feedback)
                SET_BOOL(borderless_monocle)
                SET_BOOL(gapless_monocle)
                SET_BOOL(single_monocle)
@@ -1794,6 +1795,7 @@ void get_setting(coordinates_t loc, char *name, FILE* rsp)
 #define GET_BOOL(s) \
        } else if (streq(#s, name)) { \
                fprintf(rsp, "%s", BOOL_STR(s));
+       GET_BOOL(presel_feedback)
        GET_BOOL(borderless_monocle)
        GET_BOOL(gapless_monocle)
        GET_BOOL(single_monocle)
index a9375445c2c4e49cae2c013b2743dd2b1f361e14..8dc7ef9d6389ea60a9f9389073747b8ce3d773af 100644 (file)
@@ -69,6 +69,7 @@ void load_settings(void)
        pointer_actions[2] = ACTION_RESIZE_CORNER;
        mapping_events_count = MAPPING_EVENTS_COUNT;
 
+       presel_feedback = PRESEL_FEEDBACK;
        borderless_monocle = BORDERLESS_MONOCLE;
        gapless_monocle = GAPLESS_MONOCLE;
        single_monocle = SINGLE_MONOCLE;
index a0f1874b8989f796004dcf185aed0c7116572759..803b7e15b707ff26139d878411697e6934561970 100644 (file)
@@ -45,6 +45,7 @@
 #define AUTOMATIC_SCHEME     SCHEME_LONGEST_SIDE
 #define REMOVAL_ADJUSTMENT   true
 
+#define PRESEL_FEEDBACK             true
 #define BORDERLESS_MONOCLE          false
 #define GAPLESS_MONOCLE             false
 #define SINGLE_MONOCLE              false
@@ -88,6 +89,7 @@ uint32_t pointer_motion_interval;
 pointer_action_t pointer_actions[3];
 int8_t mapping_events_count;
 
+bool presel_feedback;
 bool borderless_monocle;
 bool gapless_monocle;
 bool single_monocle;
index 35716611a9bef1181b2f895aef70346707397ecc..d91ad0dd6ba56390f4ae5cde8a3bdc2f2b49e8df 100644 (file)
@@ -284,7 +284,7 @@ void initialize_presel_feedback(node_t *n)
 
 void draw_presel_feedback(monitor_t *m, desktop_t *d, node_t *n)
 {
-       if (n == NULL || n->presel == NULL || d->layout == LAYOUT_MONOCLE) {
+       if (n == NULL || n->presel == NULL || d->layout == LAYOUT_MONOCLE || !presel_feedback) {
                return;
        }