diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-22 11:06:46 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-22 11:06:46 +0100 |
| commit | a6e7b27fd1df9657acc81ffc81a1c7918650d9df (patch) | |
| tree | b87dcd072e66a28b859d046c9468a6432475788a /xprop-active-window-id | |
| parent | 5ac980dec555c543815d9defc3b7192354539b6c (diff) | |
| download | scripts-a6e7b27fd1df9657acc81ffc81a1c7918650d9df.tar.gz scripts-a6e7b27fd1df9657acc81ffc81a1c7918650d9df.zip | |
Added script to get currently focused window id (using xprop).
Diffstat (limited to '')
| -rwxr-xr-x | xprop-active-window-id | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xprop-active-window-id b/xprop-active-window-id new file mode 100755 index 0000000..97cf60f --- /dev/null +++ b/xprop-active-window-id | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Get the ID of the current active window (hexadecimal) | ||
| 4 | # Requires: xprop | ||
| 5 | |||
| 6 | xprop -root | grep _NET_ACTIVE_WINDOW | head -1 | sed 's/.* //' | ||
