mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -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_default_proportion=0.8
|
||||
scoller_focus_center=0
|
||||
focus_cross_monitor=0
|
||||
scroller_proportion_preset=0.5,0.8,1.0
|
||||
|
||||
# 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) {
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1703,7 +1703,7 @@ Client *direction_select(const Arg *arg) {
|
|||
// 第二次遍历,填充 tempClients
|
||||
last = -1;
|
||||
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++;
|
||||
tempClients[last] = c;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ typedef struct {
|
|||
int scroller_structs;
|
||||
float scroller_default_proportion;
|
||||
int scoller_focus_center;
|
||||
int focus_cross_monitor;
|
||||
float *scroller_proportion_preset;
|
||||
int scroller_proportion_preset_count;
|
||||
|
||||
|
|
@ -552,6 +553,8 @@ void parse_config_line(Config *config, const char *line) {
|
|||
config->scroller_default_proportion = atof(value);
|
||||
} else if (strcmp(key, "scoller_focus_center") == 0) {
|
||||
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) {
|
||||
// 1. 统计 value 中有多少个逗号,确定需要解析的浮点数个数
|
||||
int count = 0; // 初始化为 0
|
||||
|
|
@ -1130,6 +1133,7 @@ void override_config(void) {
|
|||
scroller_structs = config.scroller_structs;
|
||||
scroller_default_proportion = config.scroller_default_proportion;
|
||||
scoller_focus_center = config.scoller_focus_center;
|
||||
focus_cross_monitor = config.focus_cross_monitor;
|
||||
|
||||
new_is_master = config.new_is_master;
|
||||
default_mfact = config.default_mfact;
|
||||
|
|
@ -1208,6 +1212,7 @@ void set_value_default() {
|
|||
config.scroller_structs = 20;
|
||||
config.scroller_default_proportion = 0.9;
|
||||
config.scoller_focus_center = 0;
|
||||
config.focus_cross_monitor = 0;
|
||||
|
||||
config.bypass_surface_visibility =
|
||||
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;
|
||||
float scroller_default_proportion = 0.9;
|
||||
int scoller_focus_center = 0;
|
||||
int focus_cross_monitor = 0;
|
||||
|
||||
int bypass_surface_visibility =
|
||||
0; /* 1 means idle inhibitors will disable idle tracking even if it's
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue