From: Bastien Dejean Date: Mon, 5 May 2014 09:46:55 +0000 (+0200) Subject: Don't remove unplugged monitors by default X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;ds=sidebyside;h=aca232b23ca181caf992b1da144cfd187ef72535;p=bspwm.git Don't remove unplugged monitors by default --- diff --git a/contrib/bash_completion b/contrib/bash_completion index 372918d..82522a8 100644 --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -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=() diff --git a/contrib/zsh_completion b/contrib/zsh_completion index 9f6b167..9038b8c 100644 --- a/contrib/zsh_completion +++ b/contrib/zsh_completion @@ -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 diff --git a/doc/bspwm.1 b/doc/bspwm.1 index f6a50bd..7c0de39 100644 --- a/doc/bspwm.1 +++ b/doc/bspwm.1 @@ -2,12 +2,12 @@ .\" Title: bspwm .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" 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 diff --git a/doc/bspwm.1.txt b/doc/bspwm.1.txt index f2ae038..0f7248f 100644 --- a/doc/bspwm.1.txt +++ b/doc/bspwm.1.txt @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/messages.c b/messages.c index 83dfb8f..f850753 100644 --- a/messages.c +++ b/messages.c @@ -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; diff --git a/monitor.c b/monitor.c index 5b3b6b5..5b2dedb 100644 --- a/monitor.c +++ b/monitor.c @@ -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; diff --git a/settings.c b/settings.c index 443e7a3..3c66977 100644 --- a/settings.c +++ b/settings.c @@ -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; } diff --git a/settings.h b/settings.h index c490c01..62b0c26 100644 --- a/settings.h +++ b/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);