mirror of
https://github.com/vale981/bspwm
synced 2025-03-04 17:31:39 -05:00
Don't remove unplugged monitors by default
This commit is contained in:
parent
ab6b6c5e36
commit
aca232b23c
8 changed files with 24 additions and 24 deletions
|
@ -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 borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus ignore_ewmh_focus remove_disabled_monitor persistent_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 borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus ignore_ewmh_focus remove_disabled_monitor remove_unplugged_monitors'
|
||||
|
||||
COMPREPLY=()
|
||||
|
||||
|
|
|
@ -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' 'borderless_monocle' 'gapless_monocle' 'focus_follows_pointer' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'ignore_ewmh_focus' 'remove_disabled_monitor' 'persistent_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' 'borderless_monocle' 'gapless_monocle' 'focus_follows_pointer' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'ignore_ewmh_focus' 'remove_disabled_monitor' 'remove_unplugged_monitors')
|
||||
if (( CURRENT == 2 )) ; then
|
||||
_values 'command' "$commands[@]"
|
||||
elif (( CURRENT == 3 )) ; then
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
.\" Title: bspwm
|
||||
.\" Author: [see the "Author" section]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 04/29/2014
|
||||
.\" Date: 05/05/2014
|
||||
.\" Manual: Bspwm Manual
|
||||
.\" Source: Bspwm 0.8.8
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "BSPWM" "1" "04/29/2014" "Bspwm 0\&.8\&.8" "Bspwm Manual"
|
||||
.TH "BSPWM" "1" "05/05/2014" "Bspwm 0\&.8\&.8" "Bspwm Manual"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
|
@ -1116,9 +1116,9 @@ Ignore EWMH focus requests coming from applications\&.
|
|||
Consider disabled monitors as disconnected\&.
|
||||
.RE
|
||||
.PP
|
||||
\fIpersistent_monitors\fR
|
||||
\fIremove_unplugged_monitors\fR
|
||||
.RS 4
|
||||
Don\(cqt remove unplugged monitors\&.
|
||||
Remove unplugged monitors\&.
|
||||
.RE
|
||||
.SS "Monitor and Desktop Settings"
|
||||
.PP
|
||||
|
|
|
@ -679,8 +679,8 @@ Global Settings
|
|||
'remove_disabled_monitor'::
|
||||
Consider disabled monitors as disconnected.
|
||||
|
||||
'persistent_monitors'::
|
||||
Don't remove unplugged monitors.
|
||||
'remove_unplugged_monitors'::
|
||||
Remove unplugged monitors.
|
||||
|
||||
Monitor and Desktop Settings
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -998,7 +998,7 @@ int set_setting(coordinates_t loc, char *name, char *value)
|
|||
SETBOOL(history_aware_focus)
|
||||
SETBOOL(ignore_ewmh_focus)
|
||||
SETBOOL(remove_disabled_monitor)
|
||||
SETBOOL(persistent_monitors)
|
||||
SETBOOL(remove_unplugged_monitors)
|
||||
#undef SETBOOL
|
||||
} else {
|
||||
return MSG_FAILURE;
|
||||
|
@ -1072,7 +1072,7 @@ int get_setting(coordinates_t loc, char *name, FILE* rsp)
|
|||
GETBOOL(history_aware_focus)
|
||||
GETBOOL(ignore_ewmh_focus)
|
||||
GETBOOL(remove_disabled_monitor)
|
||||
GETBOOL(persistent_monitors)
|
||||
GETBOOL(remove_unplugged_monitors)
|
||||
#undef GETBOOL
|
||||
else
|
||||
return MSG_FAILURE;
|
||||
|
|
|
@ -411,7 +411,7 @@ bool update_monitors(void)
|
|||
}
|
||||
|
||||
/* merge and remove disconnected monitors */
|
||||
if (!persistent_monitors) {
|
||||
if (remove_unplugged_monitors) {
|
||||
m = mon_head;
|
||||
while (m != NULL) {
|
||||
monitor_t *next = m->next;
|
||||
|
|
|
@ -73,5 +73,5 @@ void load_settings(void)
|
|||
history_aware_focus = HISTORY_AWARE_FOCUS;
|
||||
ignore_ewmh_focus = IGNORE_EWMH_FOCUS;
|
||||
remove_disabled_monitor = REMOVE_DISABLED_MONITOR;
|
||||
persistent_monitors = PERSISTENT_MONITORS;
|
||||
remove_unplugged_monitors = REMOVE_UNPLUGGED_MONITORS;
|
||||
}
|
||||
|
|
24
settings.h
24
settings.h
|
@ -54,17 +54,17 @@
|
|||
|
||||
#define SPLIT_RATIO 0.5
|
||||
|
||||
#define HISTORY_AWARE_FOCUS false
|
||||
#define BORDERLESS_MONOCLE false
|
||||
#define GAPLESS_MONOCLE false
|
||||
#define FOCUS_FOLLOWS_POINTER false
|
||||
#define POINTER_FOLLOWS_MONITOR false
|
||||
#define AUTO_ALTERNATE false
|
||||
#define AUTO_CANCEL false
|
||||
#define APPLY_FLOATING_ATOM false
|
||||
#define IGNORE_EWMH_FOCUS false
|
||||
#define REMOVE_DISABLED_MONITOR false
|
||||
#define PERSISTENT_MONITORS false
|
||||
#define HISTORY_AWARE_FOCUS false
|
||||
#define BORDERLESS_MONOCLE false
|
||||
#define GAPLESS_MONOCLE false
|
||||
#define FOCUS_FOLLOWS_POINTER false
|
||||
#define POINTER_FOLLOWS_MONITOR false
|
||||
#define AUTO_ALTERNATE false
|
||||
#define AUTO_CANCEL false
|
||||
#define APPLY_FLOATING_ATOM false
|
||||
#define IGNORE_EWMH_FOCUS false
|
||||
#define REMOVE_DISABLED_MONITOR false
|
||||
#define REMOVE_UNPLUGGED_MONITORS false
|
||||
|
||||
char external_rules_command[MAXLEN];
|
||||
char status_prefix[MAXLEN];
|
||||
|
@ -96,7 +96,7 @@ bool auto_cancel;
|
|||
bool history_aware_focus;
|
||||
bool ignore_ewmh_focus;
|
||||
bool remove_disabled_monitor;
|
||||
bool persistent_monitors;
|
||||
bool remove_unplugged_monitors;
|
||||
|
||||
void run_config(void);
|
||||
void load_settings(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue