aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-12-22 11:06:46 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-12-22 11:06:46 +0100
commita6e7b27fd1df9657acc81ffc81a1c7918650d9df (patch)
treeb87dcd072e66a28b859d046c9468a6432475788a
parent5ac980dec555c543815d9defc3b7192354539b6c (diff)
downloadscripts-a6e7b27fd1df9657acc81ffc81a1c7918650d9df.tar.gz
scripts-a6e7b27fd1df9657acc81ffc81a1c7918650d9df.zip
Added script to get currently focused window id (using xprop).
Diffstat (limited to '')
-rw-r--r--Makefile1
-rwxr-xr-xxprop-active-window-id6
2 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 827f0bd..756862b 100644
--- a/Makefile
+++ b/Makefile
@@ -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
40install: 41install:
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
6xprop -root | grep _NET_ACTIVE_WINDOW | head -1 | sed 's/.* //'

Generated with cgit - Back to sebastiano.tronto.net