aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-05-30 21:56:27 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-05-30 21:56:27 +0200
commit2698cfe338cabdad5e78e4031222a4a6b369551c (patch)
treee0bd20b2acd85d6ae0fa8b018db367a145d7113d
parent9397658a86d1281e097b47489f58a7d907fef886 (diff)
downloadjwm-2698cfe338cabdad5e78e4031222a4a6b369551c.tar.gz
Add 'sendto#' action
-rw-r--r--src/event.c3
-rw-r--r--src/key.c1
-rw-r--r--src/key.h7
-rw-r--r--src/parse.c1
4 files changed, 9 insertions, 3 deletions
diff --git a/src/event.c b/src/event.c
index 8bd5ba8..a1cc943 100644
--- a/src/event.c
+++ b/src/event.c
@@ -354,6 +354,9 @@ void HandleKeyPress(const XKeyEvent *event) {
NextDesktop();
}
break;
+ case KEY_SENDTO:
+ SetClientDesktop(np, (key >> 8) - 1);
+ break;
case KEY_NEXT:
FocusNext();
break;
diff --git a/src/key.c b/src/key.c
index 52d3df2..1bf443b 100644
--- a/src/key.c
+++ b/src/key.c
@@ -254,6 +254,7 @@ int ShouldGrab(KeyType key) {
case KEY_ROOT:
case KEY_WIN:
case KEY_DESKTOP:
+ case KEY_SENDTO:
case KEY_EXEC:
case KEY_RESTART:
case KEY_EXIT:
diff --git a/src/key.h b/src/key.h
index 4386720..cd89fd5 100644
--- a/src/key.h
+++ b/src/key.h
@@ -34,9 +34,10 @@ typedef enum {
KEY_ROOT = 18,
KEY_WIN = 19,
KEY_DESKTOP = 20,
- KEY_EXEC = 21,
- KEY_RESTART = 22,
- KEY_EXIT = 23
+ KEY_SENDTO = 21,
+ KEY_EXEC = 22,
+ KEY_RESTART = 23,
+ KEY_EXIT = 24
} KeyType;
void InitializeKeys();
diff --git a/src/parse.c b/src/parse.c
index 08dd70c..5c6cece 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -63,6 +63,7 @@ static const KeyMapType KEY_MAP[] = {
{ "exit", KEY_EXIT },
{ "desktop", KEY_DESKTOP },
{ "desktop#", KEY_DESKTOP },
+ { "sendto#", KEY_SENDTO },
{ NULL, KEY_NONE }
};