From 318ad103d141bb0315c4304b43d38b73c370a577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20Kocao=C4=9Flu?= Date: Thu, 7 Mar 2024 18:24:03 +0300 Subject: [PATCH] Create sh/util/hotkey/toggle-above --- src/sh/util/hotkey/toggle-above | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 src/sh/util/hotkey/toggle-above diff --git a/src/sh/util/hotkey/toggle-above b/src/sh/util/hotkey/toggle-above new file mode 100755 index 00000000..039eda54 --- /dev/null +++ b/src/sh/util/hotkey/toggle-above @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +. std.sh + +active_id="$(xdotool getactivewindow)" +if xprop -id "$active_id" | grep -q '^_NET_WM_STATE.*\s\+_NET_WM_STATE_ABOVE\s*'; then + # toggle,above does not work + wmctrl -i -r "$active_id" -b remove,above +else + wmctrl -i -r "$active_id" -b add,above +fi