mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-03-22 00:41:30 +00:00
Adding config.def.h keybinding
This commit is contained in:
parent
ce4ffdd6af
commit
10f6bb1ac5
55
patches/dwindle/#README.md#
Normal file
55
patches/dwindle/#README.md#
Normal file
@ -0,0 +1,55 @@
|
||||
### Description
|
||||
Adds a dwindle (fibonacci-style) layout to dwl.
|
||||
Windows are arranged by recursively splitting the remaining space,
|
||||
alternating between horizontal and vertical splits
|
||||
|
||||
With two windows:
|
||||
```
|
||||
┌───────────────┬────────────────┐
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
└───────────────┴────────────────┘
|
||||
```
|
||||
|
||||
With three windows:
|
||||
```
|
||||
┌───────────────┬────────────────┐
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ ├────────────────┤
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
└───────────────┴────────────────┘
|
||||
```
|
||||
|
||||
With four windows:
|
||||
```
|
||||
┌───────────────┬─────────────────┐
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ ├────────┬────────┤
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
└───────────────┴────────┴────────┘
|
||||
```
|
||||
### Download
|
||||
|
||||
- [0.8](/dwl/dwl-patches/raw/branch/main/patches/dwindle/dwindle.patch)
|
||||
|
||||
### Authors
|
||||
[cana cronica](https://codeberg.org/cana)
|
||||
@ -1,26 +1,34 @@
|
||||
From 3240c7fdfb12403d75a06ce567357a0df74b280f Mon Sep 17 00:00:00 2001
|
||||
From 9be9c310cd546c22bd486f11c21e7ffcc09b1e8a Mon Sep 17 00:00:00 2001
|
||||
From: C4FE1 <heitorcdesousa13@gmail.com>
|
||||
Date: Fri, 20 Mar 2026 21:30:41 -0300
|
||||
Subject: [PATCH] dwl: add dwindle layout
|
||||
|
||||
dwl: add dwindle layout
|
||||
---
|
||||
config.def.h | 1 +
|
||||
config.def.h | 2 ++
|
||||
dwl.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
2 files changed, 55 insertions(+)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 8a6eda0..e1b823e 100644
|
||||
index 8a6eda0..96bb1c0 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -31,6 +31,7 @@ static const Rule rules[] = {
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
@@ -33,6 +33,7 @@ static const Layout layouts[] = {
|
||||
{ "[]=", tile },
|
||||
+ { "[\\]", dwindle },
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
+ { "[\\]", dwindle },
|
||||
};
|
||||
|
||||
/* monitors */
|
||||
@@ -135,6 +136,7 @@ static const Key keys[] = {
|
||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
||||
+ { MODKEY, XKB_KEY_r, setlayout, {.v = &layouts[3]} },
|
||||
{ MODKEY, XKB_KEY_space, setlayout, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
||||
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 101a45f..5f1b762 100644
|
||||
--- a/dwl.c
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user