|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
From 992ec6cae35803aeda3d4481c673fd3fc67c12a2 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From b7a7c46b2abfba68977a87bb0badff699ed76a09 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: bakkeby <bakkeby@gmail.com>
|
|
|
|
|
Date: Thu, 11 Feb 2021 11:08:32 +0100
|
|
|
|
|
Subject: [PATCH] Adding rio-like draw-to-resize windows.
|
|
|
|
@ -8,26 +8,27 @@ slop to be installed.
|
|
|
|
|
|
|
|
|
|
Contributed by jzbor.
|
|
|
|
|
---
|
|
|
|
|
config.def.h | 5 ++
|
|
|
|
|
config.def.h | 6 ++
|
|
|
|
|
config.mk | 6 +-
|
|
|
|
|
dwm.c | 237 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
|
|
|
|
3 files changed, 242 insertions(+), 6 deletions(-)
|
|
|
|
|
3 files changed, 243 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/config.def.h b/config.def.h
|
|
|
|
|
index 1c0b587..d727f3f 100644
|
|
|
|
|
index 1c0b587..ffa0f5c 100644
|
|
|
|
|
--- a/config.def.h
|
|
|
|
|
+++ b/config.def.h
|
|
|
|
|
@@ -5,6 +5,9 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
|
|
|
|
|
@@ -5,6 +5,10 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
|
|
|
|
|
static const unsigned int snap = 32; /* snap pixel */
|
|
|
|
|
static const int showbar = 1; /* 0 means no bar */
|
|
|
|
|
static const int topbar = 1; /* 0 means bottom bar */
|
|
|
|
|
+static const char slopspawnstyle[] = "-t 0 -c 0.92,0.85,0.69,0.3 -o"; /* do NOT define -f (format) here */
|
|
|
|
|
+static const char slopresizestyle[] = "-t 0 -c 0.92,0.85,0.69,0.3"; /* do NOT define -f (format) here */
|
|
|
|
|
+static const int riodraw_borders = 0; /* 0 or 1, indicates whether the area drawn using slop includes the window borders */
|
|
|
|
|
+static const int riodraw_matchpid = 1; /* 0 or 1, indicates whether to match the PID of the client that was spawned with riospawn */
|
|
|
|
|
static const char *fonts[] = { "monospace:size=10" };
|
|
|
|
|
static const char dmenufont[] = "monospace:size=10";
|
|
|
|
|
static const char col_gray1[] = "#222222";
|
|
|
|
|
@@ -63,6 +66,8 @@ static Key keys[] = {
|
|
|
|
|
@@ -63,6 +67,8 @@ static Key keys[] = {
|
|
|
|
|
/* modifier key function argument */
|
|
|
|
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
|
|
|
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
|
|
|
@ -57,7 +58,7 @@ index 6d36cb7..e65c09a 100644
|
|
|
|
|
# flags
|
|
|
|
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
|
|
|
|
diff --git a/dwm.c b/dwm.c
|
|
|
|
|
index 4465af1..78fb7cc 100644
|
|
|
|
|
index 4465af1..2fe3162 100644
|
|
|
|
|
--- a/dwm.c
|
|
|
|
|
+++ b/dwm.c
|
|
|
|
|
@@ -40,6 +40,12 @@
|
|
|
|
@ -234,7 +235,7 @@ index 4465af1..78fb7cc 100644
|
|
|
|
|
unfocus(selmon->sel, 0);
|
|
|
|
|
c->mon->sel = c;
|
|
|
|
|
+
|
|
|
|
|
+ if (riopid && isdescprocess(riopid, c->pid)) {
|
|
|
|
|
+ if (riopid && (!riodraw_matchpid || isdescprocess(riopid, c->pid))) {
|
|
|
|
|
+ if (riodimensions[3] == -1) {
|
|
|
|
|
+ c->isfloating = 1;
|
|
|
|
|
+ rioclient = c;
|
|
|
|
|