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 | |
| parent | 5ac980dec555c543815d9defc3b7192354539b6c (diff) | |
| download | scripts-a6e7b27fd1df9657acc81ffc81a1c7918650d9df.tar.gz scripts-a6e7b27fd1df9657acc81ffc81a1c7918650d9df.zip | |
Added script to get currently focused window id (using xprop).
| -rw-r--r-- | Makefile | 1 | ||||
| -rwxr-xr-x | xprop-active-window-id | 6 |
2 files changed, 7 insertions, 0 deletions
| @@ -35,6 +35,7 @@ SCRIPTS = addressgrep \ | |||
| 35 | xedit-filter \ | 35 | xedit-filter \ |
| 36 | xkboptions \ | 36 | xkboptions \ |
| 37 | xplumb \ | 37 | xplumb \ |
| 38 | xprop-active-window-id \ | ||
| 38 | xwallpaper-random-notify | 39 | xwallpaper-random-notify |
| 39 | 40 | ||
| 40 | install: | 41 | install: |
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/.* //' | ||
