Skip to content

Commit

Permalink
Create sh/util/hotkey/toggle-above
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Mar 7, 2024
1 parent ab3bc52 commit 318ad10
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sh/util/hotkey/toggle-above
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 318ad10

Please sign in to comment.