mirror of
https://github.com/vale981/bspwm
synced 2025-03-04 17:31:39 -05:00
Add setting: presel_feedback
This commit is contained in:
parent
19f3c5b2a2
commit
1783bc69ff
9 changed files with 18 additions and 4 deletions
|
@ -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=()
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue