]> git.lizzy.rs Git - bspwm.git/commitdiff
Remove settings: auto_cancel and auto_alternate
authorBastien Dejean <nihilhill@gmail.com>
Thu, 26 Nov 2015 19:13:05 +0000 (20:13 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Thu, 26 Nov 2015 19:13:05 +0000 (20:13 +0100)
auto_cancel can be emulated with:

super + ctrl + {h,j,k,l}
dir={left,down,up,right}; \
cur=$(bspc query -T -w focused.!automatic | jshon -e splitDir -u 2>&-); \
[ "$dir" = "$cur" ] && dir=cancel; \
bspc window -p "$dir"

and auto_alternate with:

super + {_,alt + }{1-9,0}
kind={desktop,monitor}; \
item="^{1-9,10}"; \
bspc query --"$kind"s --"$kind" "$\{item\}.focused" > /dev/null && item=last; \
bspc "$kind" -f "$item"

contrib/bash_completion
contrib/zsh_completion
doc/bspwm.1
doc/bspwm.1.asciidoc
messages.c
settings.c
settings.h

index b3c82751de47be073d3a2589bba17cf752e9bf89..cfcdccbb8a4db23b4ec619bcb3dfa55b882fc6ed 100644 (file)
@@ -1,7 +1,7 @@
 _bspc() {
        local commands='window desktop monitor query pointer rule restore control config quit'
 
-       local settings='external_rules_command status_prefix focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color focused_sticky_border_color normal_sticky_border_color focused_private_border_color active_private_border_color normal_private_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio initial_polarity borderless_monocle gapless_monocle leaf_monocle focus_follows_pointer pointer_follows_focus pointer_follows_monitor auto_alternate auto_cancel history_aware_focus focus_by_distance ignore_ewmh_focus center_pseudo_tiled remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
+       local settings='external_rules_command status_prefix focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color focused_sticky_border_color normal_sticky_border_color focused_private_border_color active_private_border_color normal_private_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio initial_polarity borderless_monocle gapless_monocle leaf_monocle focus_follows_pointer pointer_follows_focus pointer_follows_monitor history_aware_focus focus_by_distance ignore_ewmh_focus center_pseudo_tiled remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
 
        COMPREPLY=()
 
index b2d0a49bbc0a20f9b2963b2ce65ba5c5aa05f92a..4066b21b4372f1052da6de7c3cce7a6e4916e79a 100644 (file)
@@ -3,7 +3,7 @@
 _bspc() {
        local -a commands settings
        commands=('window' 'desktop' 'monitor' 'query' 'pointer' 'rule' 'restore' 'control' 'config' 'quit')
-       settings=('external_rules_command' 'status_prefix' 'focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'focused_sticky_border_color' 'normal_sticky_border_color' 'focused_private_border_color' 'active_private_border_color' 'normal_private_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'initial_polarity' 'borderless_monocle' 'gapless_monocle' 'leaf_monocle' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'focus_by_distance' 'ignore_ewmh_focus' 'center_pseudo_tiled' 'remove_disabled_monitors' 'remove_unplugged_monitors' 'merge_overlapping_monitors')
+       settings=('external_rules_command' 'status_prefix' 'focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'focused_sticky_border_color' 'normal_sticky_border_color' 'focused_private_border_color' 'active_private_border_color' 'normal_private_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'initial_polarity' 'borderless_monocle' 'gapless_monocle' 'leaf_monocle' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' 'history_aware_focus' 'focus_by_distance' 'ignore_ewmh_focus' 'center_pseudo_tiled' 'remove_disabled_monitors' 'remove_unplugged_monitors' 'merge_overlapping_monitors')
        if (( CURRENT == 2 )) ; then
                _values 'command' "$commands[@]"
        elif (( CURRENT == 3 )) ; then
index cee3823d101da64cab69ae588769f6e79222f71b..de3825f632fe294eac7bf8e68beeb52e71696ee9 100644 (file)
@@ -1060,28 +1060,6 @@ When focusing a window, put the pointer at its center\&.
 When focusing a monitor, put the pointer at its center\&.
 .RE
 .PP
-\fIauto_alternate\fR
-.RS 4
-Interpret consecutive identical
-\fB\-\-focus\fR
-arguments as the
-\fBlast\fR
-selector for the
-\fBmonitor\fR
-and
-\fBdesktop\fR
-commands\&.
-.RE
-.PP
-\fIauto_cancel\fR
-.RS 4
-Interpret consecutive identical
-\fB\-\-presel\fR
-arguments as
-\fB\-\-cancel\-presel\fR
-option\&.
-.RE
-.PP
 \fIignore_ewmh_focus\fR
 .RS 4
 Ignore EWMH focus requests coming from applications\&.
index 1b1bba03f61586affc71ec49581b2938305224cb..d063887f59c43f5ec6569b1d66fd0e263d99916a 100644 (file)
@@ -629,12 +629,6 @@ Global Settings
 'pointer_follows_monitor'::
        When focusing a monitor, put the pointer at its center.
 
-'auto_alternate'::
-       Interpret consecutive identical *--focus* arguments as the *last* selector for the *monitor* and *desktop* commands.
-
-'auto_cancel'::
-       Interpret consecutive identical *--presel* arguments as *--cancel-presel* option.
-
 'ignore_ewmh_focus'::
        Ignore EWMH focus requests coming from applications.
 
index 3c7a18c5becdcd13e6fde63fd730bc2bd449562b..6f3351939b51b7434022708f4a1c299d4506add3 100644 (file)
@@ -253,15 +253,9 @@ int cmd_window(char **args, int num)
                                                if (sscanf(*args, "%lf", &rat) != 1 || rat <= 0 || rat >= 1)
                                                        return MSG_FAILURE;
                                        }
-                                       if (auto_cancel && trg.node->split_mode == MODE_MANUAL &&
-                                           dir == trg.node->split_dir &&
-                                           rat == trg.node->split_ratio) {
-                                               reset_mode(&trg);
-                                       } else {
-                                               trg.node->split_mode = MODE_MANUAL;
-                                               trg.node->split_dir = dir;
-                                               trg.node->split_ratio = rat;
-                                       }
+                                       trg.node->split_mode = MODE_MANUAL;
+                                       trg.node->split_dir = dir;
+                                       trg.node->split_ratio = rat;
                                        window_draw_border(trg.node, trg.desktop->focus == trg.node, mon == trg.monitor);
                                } else {
                                        return MSG_FAILURE;
@@ -387,10 +381,6 @@ int cmd_desktop(char **args, int num)
                                if (!desktop_from_desc(*args, &trg, &dst))
                                        return MSG_FAILURE;
                        }
-                       if (auto_alternate && dst.desktop == mon->desk) {
-                               desktop_select_t sel = make_desktop_select();
-                               history_find_desktop(HISTORY_OLDER, &trg, &dst, sel);
-                       }
                        focus_node(dst.monitor, dst.desktop, dst.desktop->focus);
                } else if (streq("-m", *args) || streq("--to-monitor", *args)) {
                        num--, args++;
@@ -543,10 +533,6 @@ int cmd_monitor(char **args, int num)
                                if (!monitor_from_desc(*args, &trg, &dst))
                                        return MSG_FAILURE;
                        }
-                       if (auto_alternate && dst.monitor == mon) {
-                               monitor_select_t sel = make_monitor_select();
-                               history_find_monitor(HISTORY_OLDER, &trg, &dst, sel);
-                       }
                        focus_node(dst.monitor, dst.monitor->desk, dst.monitor->desk->focus);
                } else if (streq("-d", *args) || streq("--reset-desktops", *args)) {
                        num--, args++;
@@ -1067,8 +1053,6 @@ int set_setting(coordinates_t loc, char *name, char *value)
                SET_BOOL(leaf_monocle)
                SET_BOOL(pointer_follows_focus)
                SET_BOOL(pointer_follows_monitor)
-               SET_BOOL(auto_alternate)
-               SET_BOOL(auto_cancel)
                SET_BOOL(history_aware_focus)
                SET_BOOL(focus_by_distance)
                SET_BOOL(ignore_ewmh_focus)
@@ -1156,8 +1140,6 @@ int get_setting(coordinates_t loc, char *name, FILE* rsp)
        GET_BOOL(focus_follows_pointer)
        GET_BOOL(pointer_follows_focus)
        GET_BOOL(pointer_follows_monitor)
-       GET_BOOL(auto_alternate)
-       GET_BOOL(auto_cancel)
        GET_BOOL(history_aware_focus)
        GET_BOOL(focus_by_distance)
        GET_BOOL(ignore_ewmh_focus)
index 9c3639609fde9daf7f549a988d9bbde23452bf5c..9330e625d4e50d0e2dc2ed43214cfb1f8a000583 100644 (file)
@@ -68,8 +68,6 @@ void load_settings(void)
        focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
        pointer_follows_focus = POINTER_FOLLOWS_FOCUS;
        pointer_follows_monitor = POINTER_FOLLOWS_MONITOR;
-       auto_alternate = AUTO_ALTERNATE;
-       auto_cancel = AUTO_CANCEL;
        history_aware_focus = HISTORY_AWARE_FOCUS;
        ignore_ewmh_focus = IGNORE_EWMH_FOCUS;
        center_pseudo_tiled = CENTER_PSEUDO_TILED;
index b58dac8ef0971484bcff9bfc2e0a1398210e76ca..f373076c854e82a9f380ec443235f333c03f4eb0 100644 (file)
@@ -60,8 +60,6 @@
 #define FOCUS_FOLLOWS_POINTER       false
 #define POINTER_FOLLOWS_FOCUS       false
 #define POINTER_FOLLOWS_MONITOR     false
-#define AUTO_ALTERNATE              false
-#define AUTO_CANCEL                 false
 #define IGNORE_EWMH_FOCUS           false
 #define CENTER_PSEUDO_TILED         true
 #define REMOVE_DISABLED_MONITORS    false
@@ -97,8 +95,6 @@ bool leaf_monocle;
 bool focus_follows_pointer;
 bool pointer_follows_focus;
 bool pointer_follows_monitor;
-bool auto_alternate;
-bool auto_cancel;
 bool history_aware_focus;
 bool focus_by_distance;
 bool ignore_ewmh_focus;