summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2022-08-01 10:19:03 +0200
committerbakkeby <[email protected]>2022-08-01 10:37:19 +0200
commit2e496ed931b93c46ea89ee4f14f4c0ae2e68533f (patch)
treebaff717e7d6ff6cafeface02c4a0ed24aab4f225
parentd9f79bea73894e1fe1b2a0342dafcfc818d4c0ee (diff)
downloaddwm-flexipatch-2e496ed931b93c46ea89ee4f14f4c0ae2e68533f.tar.gz
dwm-flexipatch-2e496ed931b93c46ea89ee4f14f4c0ae2e68533f.zip
dwmc: adding string support ref. #284
-rw-r--r--config.def.h3
-rwxr-xr-xpatch/dwmc3
-rw-r--r--patch/dwmc.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index c193308..7a71119 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1368,6 +1368,9 @@ static Signal signals[] = {
#if STACKER_PATCH
{ "pushstack", pushstack },
#endif // STACKER_PATCH
+ #if FLOATPOS_PATCH
+ { "floatpos", floatpos },
+ #endif // FLOATPOS_PATCH
#if FOCUSURGENT_PATCH
{ "focusurgent", focusurgent },
#endif // FOCUSURGENT_PATCH
diff --git a/patch/dwmc b/patch/dwmc
index 3880428..9536367 100755
--- a/patch/dwmc
+++ b/patch/dwmc
@@ -100,6 +100,9 @@ case $# in
setmfact)
signal $1 f $2
;;
+ floatpos)
+ signal $1 v $2
+ ;;
*)
echo "Unknown command ($1) or too many arguments"
exit 1
diff --git a/patch/dwmc.c b/patch/dwmc.c
index 374944c..17f226f 100644
--- a/patch/dwmc.c
+++ b/patch/dwmc.c
@@ -83,6 +83,8 @@ fake_signal(void)
#endif // IPC_PATCH
else if (strncmp(param, "f", n - len_str_sig) == 0)
sscanf(fsignal + len_indicator + n, "%f", &(arg.f));
+ else if (strncmp(param, "v", n - len_str_sig) == 0)
+ arg.v = &(fsignal[len_indicator + n + 1]);
else return 1;
// Check if a signal was found, and if so handle it