修复默认配置

This commit is contained in:
DreamMaoMao 2025-02-06 08:19:08 +08:00
parent f90f6f35bc
commit a0f72f584b
2 changed files with 44 additions and 24 deletions

View file

@ -17,6 +17,8 @@ static const double animation_curve[4] = {0.46,1.0,0.29,0.99}; // Animation curv
static const unsigned int axis_bind_apply_timeout = 100; // Timeout for wheel binding actions static const unsigned int axis_bind_apply_timeout = 100; // Timeout for wheel binding actions
static const unsigned int focus_on_activate = 1; // Automatically focus on window activation request static const unsigned int focus_on_activate = 1; // Automatically focus on window activation request
static const unsigned int new_is_master = 1; // New windows are inserted at the head static const unsigned int new_is_master = 1; // New windows are inserted at the head
static const unsigned int default_mfact = 0.55f; // Master mfact
static const unsigned int default_nmaster = 1; // Master number
/* logging */ /* logging */
static int log_level = WLR_ERROR; static int log_level = WLR_ERROR;
static const unsigned int numlockon = 1; // Enable numlock static const unsigned int numlockon = 1; // Enable numlock

66
main.c
View file

@ -2337,33 +2337,51 @@ void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) {
focused = focustop(monitor); focused = focustop(monitor);
zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon); zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon);
if ((monitor->tagset[monitor->seltags] & TAGMASK) == TAGMASK) { // if ((monitor->tagset[monitor->seltags] & TAGMASK) == TAGMASK) {
state = 0; // state = 0;
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE;
zdwl_ipc_output_v2_send_tag(ipc_output->resource, 888, state, 1, 1); // zdwl_ipc_output_v2_send_tag(ipc_output->resource, 888, state, 1, 1);
} else { // } else {
for ( tag = 0 ; tag < LENGTH(tags); tag++) { // for ( tag = 0 ; tag < LENGTH(tags); tag++) {
numclients = state = focused_client = 0; // numclients = state = focused_client = 0;
tagmask = 1 << tag; // tagmask = 1 << tag;
if ((tagmask & monitor->tagset[monitor->seltags]) != 0) // if ((tagmask & monitor->tagset[monitor->seltags]) != 0)
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE;
wl_list_for_each(c, &clients, link) { // wl_list_for_each(c, &clients, link) {
if (c->mon != monitor) // if (c->mon != monitor)
continue; // continue;
if (!(c->tags & tagmask)) // if (!(c->tags & tagmask))
continue; // continue;
if (c == focused) // if (c == focused)
focused_client = 1; // focused_client = 1;
if (c->isurgent) // if (c->isurgent)
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT; // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT;
numclients++; // numclients++;
} // }
zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, numclients, focused_client); // zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, numclients, focused_client);
} // }
} // }
for ( tag = 0 ; tag < LENGTH(tags); tag++) {
numclients = state = focused_client = 0;
tagmask = 1 << tag;
if ((tagmask & monitor->tagset[monitor->seltags]) != 0)
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE;
wl_list_for_each(c, &clients, link) {
if (c->mon != monitor)
continue;
if (!(c->tags & tagmask))
continue;
if (c == focused)
focused_client = 1;
if (c->isurgent)
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT;
numclients++;
}
zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, numclients, focused_client);
}
title = focused ? client_get_title(focused) : ""; title = focused ? client_get_title(focused) : "";
appid = focused ? client_get_appid(focused) : ""; appid = focused ? client_get_appid(focused) : "";