From 1be4c63c4495b3f584d5bf75d95f483074abb114 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 9 Feb 2025 15:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.def.h | 58 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/config.def.h b/config.def.h index 1741d8ca..d8576ba0 100644 --- a/config.def.h +++ b/config.def.h @@ -17,24 +17,41 @@ static const uint32_t animation_duration_tag = 300; // Animation tag speed // static const double animation_curve[4] = {0.05,0.9,0.1,1.05}; // Animation curve static const double animation_curve[4] = {0.46,1.0,0.29,0.99}; // Animation curve -/* appearance */ -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 +/* scroller layout setting*/ +static const int scroller_structs = 20; +static const float scroller_default_proportion = 0.8; +static bool scoller_foucs_center = false; +static const float scroller_proportion_preset[] = {0.5,0.8,1.0}; + +/* master-stack layout setting*/ 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 */ -static int log_level = WLR_ERROR; -static const unsigned int numlockon = 1; // Enable numlock + +/* overview setting*/ static const unsigned int hotarea_size = 10; // Hot area size, 10x10 static const unsigned int enable_hotarea = 1; // Enable mouse hot area -static int smartgaps = 0; /* 1 means no outer gap when there is only one window */ +static const unsigned int ov_tab_mode = 1; // Enable switch window like gnome alt+tab +static const int overviewgappi = 5; /* Gap between windows and edges in overview mode */ +static const int overviewgappo = 30; /* Gap between windows in overview mode */ + +/* misc */ +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 numlockon = 1; // Enable numlock +static int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if the surface isn't visible */ static int sloppyfocus = 1; /* Focus follows mouse */ +static int warpcursor = 1; /* Warp cursor to focused client */ + +/* logging */ +static int log_level = WLR_ERROR; + +/* appearance */ +static int smartgaps = 0; /* 1 means no outer gap when there is only one window */ static unsigned int gappih = 5; /* Horizontal inner gap between windows */ static unsigned int gappiv = 5; /* Vertical inner gap between windows */ static unsigned int gappoh = 10; /* Horizontal outer gap between windows and screen edge */ static unsigned int gappov = 10; /* Vertical outer gap between windows and screen edge */ -static int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if the surface isn't visible */ static unsigned int borderpx = 5; /* Border pixel of windows */ static const float rootcolor[] = COLOR(0x323232ff); static const float bordercolor[] = COLOR(0x444444ff); @@ -45,14 +62,9 @@ static const float scratchpadcolor[] = COLOR(0x516c93ff); static const float globalcolor[] = COLOR(0xb153a7ff); // static const char *cursor_theme = "Bibata-Modern-Ice"; -static const int overviewgappi = 5; /* Gap between windows and edges in overview mode */ -static const int overviewgappo = 30; /* Gap between windows in overview mode */ - /* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; -static int warpcursor = 1; /* Warp cursor to focused client */ - /* Autostart */ static const char *const autostart[] = { "/bin/sh", @@ -93,8 +105,8 @@ static const Layout overviewlayout = { "󰃇", overview }; static const Layout layouts[] = { // At least two layouts, cannot delete less than two /* symbol arrange function */ - { "󱞬", tile }, // Stack layout - { "﩯", grid }, // Grid layout + { "󱞬", tile, "tile" }, // master-stack layout + { "", scroller, "scroller" }, // scroller layout }; @@ -177,14 +189,14 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -// static const char *termcmd[] = { "foot", NULL }; -// static const char *menucmd[] = { "wofi --conf ~/.config/maomao/wofi/config_menu", NULL }; +static const char *termcmd[] = { "foot", NULL }; +static const char *menucmd[] = { "wofi", NULL }; static const Key keys[] = { /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */ /* modifier key function argument */ - { MODKEY, XKB_KEY_space, spawn, SHCMD("wofi") }, - { MODKEY, XKB_KEY_Return, spawn, SHCMD("foot") }, + { MODKEY, XKB_KEY_space, spawn, {.v = menucmd} }, + { MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} }, { WLR_MODIFIER_LOGO, XKB_KEY_Tab, focusstack, {.i = +1} }, @@ -213,8 +225,10 @@ static const Key keys[] = { { WLR_MODIFIER_CTRL|WLR_MODIFIER_LOGO, XKB_KEY_Left, tagtoleft, {0} }, /* ctrl alt left | Move current window to the left tag */ { WLR_MODIFIER_CTRL|WLR_MODIFIER_LOGO, XKB_KEY_Right, tagtoright, {0} }, { MODKEY, XKB_KEY_q, killclient, {0} }, - { WLR_MODIFIER_CTRL|WLR_MODIFIER_LOGO, XKB_KEY_t, setlayout, {.v = &layouts[0]} }, - { WLR_MODIFIER_CTRL|WLR_MODIFIER_LOGO, XKB_KEY_g, setlayout, {.v = &layouts[1]} }, + { MODKEY, XKB_KEY_e, set_proportion, {.f = 1.0} }, /* set scroller layout window to maxsize */ + { MODKEY, XKB_KEY_w, switch_proportion_preset, {0}}, /* switch scroller layout window to preset size */ + { WLR_MODIFIER_CTRL|WLR_MODIFIER_LOGO, XKB_KEY_i, setlayout, {.v = &layouts[0]} }, + { WLR_MODIFIER_CTRL|WLR_MODIFIER_LOGO, XKB_KEY_l, setlayout, {.v = &layouts[1]} }, { WLR_MODIFIER_LOGO, XKB_KEY_n, switch_layout, {0} }, { WLR_MODIFIER_ALT, XKB_KEY_backslash, togglefloating, {0} }, { MODKEY, XKB_KEY_a, togglemaxmizescreen, {0} }, @@ -252,7 +266,7 @@ static const Button buttons[] = { { 0, BTN_MIDDLE, togglemaxmizescreen, {0} }, // Middle button triggers fake fullscreen { WLR_MODIFIER_LOGO, BTN_RIGHT, moveresize, {.ui = CurResize } }, { WLR_MODIFIER_ALT|WLR_MODIFIER_CTRL, BTN_LEFT, spawn, SHCMD("bash ~/tool/shotTranslate.sh shot")}, - { 0, BTN_LEFT, toggleoverview, {0} }, + { 0, BTN_LEFT, toggleoverview, {.i = -1 } }, { 0, BTN_RIGHT, killclient, {0} }, };