mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-24 06:59:54 -05:00
feat: scroller layout and alt-tab switch like gnome
Update README.md Update README.md Update README.md
This commit is contained in:
parent
f2b0d45098
commit
793bd1bd1a
3 changed files with 274 additions and 103 deletions
61
config.def.h
61
config.def.h
|
|
@ -17,43 +17,54 @@ 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 const unsigned int ov_tab_mode = 1; // Enable switch window like gnome alt+tab
|
||||
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
||||
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);
|
||||
static const float focuscolor[] = COLOR(0xad741fff);
|
||||
static const float fakefullscreencolor[] = COLOR(0x89aa61ff);
|
||||
static const float maxmizescreencolor[] = COLOR(0x89aa61ff);
|
||||
static const float urgentcolor[] = COLOR(0xad401fff);
|
||||
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",
|
||||
|
|
@ -94,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
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -178,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} },
|
||||
|
|
@ -214,11 +225,13 @@ 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, togglefakefullscreen, {0} },
|
||||
{ MODKEY, XKB_KEY_a, togglemaxmizescreen, {0} },
|
||||
{ MODKEY, XKB_KEY_f, togglefullscreen, {0} },
|
||||
{ WLR_MODIFIER_LOGO, XKB_KEY_i, minized, {0} }, // Minimize, move to scratchpad
|
||||
{ WLR_MODIFIER_LOGO|WLR_MODIFIER_SHIFT, XKB_KEY_I, restore_minized, {0} },
|
||||
|
|
@ -250,7 +263,7 @@ static const Key keys[] = {
|
|||
|
||||
static const Button buttons[] = {
|
||||
{ WLR_MODIFIER_LOGO, BTN_LEFT, moveresize, {.ui = CurMove } },
|
||||
{ 0, BTN_MIDDLE, togglefakefullscreen, {0} }, // Middle button triggers fake fullscreen
|
||||
{ 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, {.i = -1 } },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue