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"
_bspc() {
local commands='window desktop monitor query pointer rule restore control config quit'
_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'
_bspc() {
local -a commands settings
commands=('window' 'desktop' 'monitor' 'query' 'pointer' 'rule' 'restore' 'control' 'config' 'quit')
_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
if (( CURRENT == 2 )) ; then
_values 'command' "$commands[@]"
elif (( CURRENT == 3 )) ; then
When focusing a monitor, put the pointer at its center\&.
.RE
.PP
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\&.
\fIignore_ewmh_focus\fR
.RS 4
Ignore EWMH focus requests coming from applications\&.
'pointer_follows_monitor'::
When focusing a monitor, put the pointer at its center.
'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.
'ignore_ewmh_focus'::
Ignore EWMH focus requests coming from applications.
if (sscanf(*args, "%lf", &rat) != 1 || rat <= 0 || rat >= 1)
return MSG_FAILURE;
}
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;
window_draw_border(trg.node, trg.desktop->focus == trg.node, mon == trg.monitor);
} else {
return MSG_FAILURE;
if (!desktop_from_desc(*args, &trg, &dst))
return MSG_FAILURE;
}
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++;
focus_node(dst.monitor, dst.desktop, dst.desktop->focus);
} else if (streq("-m", *args) || streq("--to-monitor", *args)) {
num--, args++;
if (!monitor_from_desc(*args, &trg, &dst))
return MSG_FAILURE;
}
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++;
focus_node(dst.monitor, dst.monitor->desk, dst.monitor->desk->focus);
} else if (streq("-d", *args) || streq("--reset-desktops", *args)) {
num--, args++;
SET_BOOL(leaf_monocle)
SET_BOOL(pointer_follows_focus)
SET_BOOL(pointer_follows_monitor)
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)
SET_BOOL(history_aware_focus)
SET_BOOL(focus_by_distance)
SET_BOOL(ignore_ewmh_focus)
GET_BOOL(focus_follows_pointer)
GET_BOOL(pointer_follows_focus)
GET_BOOL(pointer_follows_monitor)
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)
GET_BOOL(history_aware_focus)
GET_BOOL(focus_by_distance)
GET_BOOL(ignore_ewmh_focus)
focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
pointer_follows_focus = POINTER_FOLLOWS_FOCUS;
pointer_follows_monitor = POINTER_FOLLOWS_MONITOR;
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;
history_aware_focus = HISTORY_AWARE_FOCUS;
ignore_ewmh_focus = IGNORE_EWMH_FOCUS;
center_pseudo_tiled = CENTER_PSEUDO_TILED;
#define FOCUS_FOLLOWS_POINTER false
#define POINTER_FOLLOWS_FOCUS false
#define POINTER_FOLLOWS_MONITOR false
#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
#define IGNORE_EWMH_FOCUS false
#define CENTER_PSEUDO_TILED true
#define REMOVE_DISABLED_MONITORS false
bool focus_follows_pointer;
bool pointer_follows_focus;
bool pointer_follows_monitor;
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;
bool history_aware_focus;
bool focus_by_distance;
bool ignore_ewmh_focus;