mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
feat: add option focus_cross_monitor
This commit is contained in:
parent
e0de9a8fc1
commit
1129be616d
4 changed files with 9 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ animation_curve_close=0.08,0.92,0,1
|
||||||
scroller_structs=20
|
scroller_structs=20
|
||||||
scroller_default_proportion=0.8
|
scroller_default_proportion=0.8
|
||||||
scoller_focus_center=0
|
scoller_focus_center=0
|
||||||
|
focus_cross_monitor=0
|
||||||
scroller_proportion_preset=0.5,0.8,1.0
|
scroller_proportion_preset=0.5,0.8,1.0
|
||||||
|
|
||||||
# Master-Stack Layout Setting (tile,spiral,dwindle)
|
# Master-Stack Layout Setting (tile,spiral,dwindle)
|
||||||
|
|
|
||||||
4
maomao.c
4
maomao.c
|
|
@ -1684,7 +1684,7 @@ Client *direction_select(const Arg *arg) {
|
||||||
|
|
||||||
// 第一次遍历,计算客户端数量
|
// 第一次遍历,计算客户端数量
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (c && (c->tags & c->mon->tagset[c->mon->seltags])) {
|
if (c && (focus_cross_monitor || c->mon == selmon) && (c->tags & c->mon->tagset[c->mon->seltags])) {
|
||||||
last++;
|
last++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1703,7 +1703,7 @@ Client *direction_select(const Arg *arg) {
|
||||||
// 第二次遍历,填充 tempClients
|
// 第二次遍历,填充 tempClients
|
||||||
last = -1;
|
last = -1;
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (c && (c->tags & c->mon->tagset[c->mon->seltags])) {
|
if (c && (focus_cross_monitor || c->mon == selmon) && (c->tags & c->mon->tagset[c->mon->seltags])) {
|
||||||
last++;
|
last++;
|
||||||
tempClients[last] = c;
|
tempClients[last] = c;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ typedef struct {
|
||||||
int scroller_structs;
|
int scroller_structs;
|
||||||
float scroller_default_proportion;
|
float scroller_default_proportion;
|
||||||
int scoller_focus_center;
|
int scoller_focus_center;
|
||||||
|
int focus_cross_monitor;
|
||||||
float *scroller_proportion_preset;
|
float *scroller_proportion_preset;
|
||||||
int scroller_proportion_preset_count;
|
int scroller_proportion_preset_count;
|
||||||
|
|
||||||
|
|
@ -552,6 +553,8 @@ void parse_config_line(Config *config, const char *line) {
|
||||||
config->scroller_default_proportion = atof(value);
|
config->scroller_default_proportion = atof(value);
|
||||||
} else if (strcmp(key, "scoller_focus_center") == 0) {
|
} else if (strcmp(key, "scoller_focus_center") == 0) {
|
||||||
config->scoller_focus_center = atoi(value);
|
config->scoller_focus_center = atoi(value);
|
||||||
|
} else if (strcmp(key, "focus_cross_monitor") == 0) {
|
||||||
|
config->focus_cross_monitor = atoi(value);
|
||||||
} else if (strcmp(key, "scroller_proportion_preset") == 0) {
|
} else if (strcmp(key, "scroller_proportion_preset") == 0) {
|
||||||
// 1. 统计 value 中有多少个逗号,确定需要解析的浮点数个数
|
// 1. 统计 value 中有多少个逗号,确定需要解析的浮点数个数
|
||||||
int count = 0; // 初始化为 0
|
int count = 0; // 初始化为 0
|
||||||
|
|
@ -1130,6 +1133,7 @@ void override_config(void) {
|
||||||
scroller_structs = config.scroller_structs;
|
scroller_structs = config.scroller_structs;
|
||||||
scroller_default_proportion = config.scroller_default_proportion;
|
scroller_default_proportion = config.scroller_default_proportion;
|
||||||
scoller_focus_center = config.scoller_focus_center;
|
scoller_focus_center = config.scoller_focus_center;
|
||||||
|
focus_cross_monitor = config.focus_cross_monitor;
|
||||||
|
|
||||||
new_is_master = config.new_is_master;
|
new_is_master = config.new_is_master;
|
||||||
default_mfact = config.default_mfact;
|
default_mfact = config.default_mfact;
|
||||||
|
|
@ -1208,6 +1212,7 @@ void set_value_default() {
|
||||||
config.scroller_structs = 20;
|
config.scroller_structs = 20;
|
||||||
config.scroller_default_proportion = 0.9;
|
config.scroller_default_proportion = 0.9;
|
||||||
config.scoller_focus_center = 0;
|
config.scoller_focus_center = 0;
|
||||||
|
config.focus_cross_monitor = 0;
|
||||||
|
|
||||||
config.bypass_surface_visibility =
|
config.bypass_surface_visibility =
|
||||||
0; /* 1 means idle inhibitors will disable idle tracking even if it's
|
0; /* 1 means idle inhibitors will disable idle tracking even if it's
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ unsigned int gappov = 10; /* vert outer gap between windows and screen edge */
|
||||||
int scroller_structs = 20;
|
int scroller_structs = 20;
|
||||||
float scroller_default_proportion = 0.9;
|
float scroller_default_proportion = 0.9;
|
||||||
int scoller_focus_center = 0;
|
int scoller_focus_center = 0;
|
||||||
|
int focus_cross_monitor = 0;
|
||||||
|
|
||||||
int bypass_surface_visibility =
|
int bypass_surface_visibility =
|
||||||
0; /* 1 means idle inhibitors will disable idle tracking even if it's
|
0; /* 1 means idle inhibitors will disable idle tracking even if it's
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue