Some changes from minitoninux

This commit is contained in:
Debucquoy
2024-01-06 18:02:00 +01:00
parent f306afddb8
commit 71b5d1313a
6 changed files with 33 additions and 19 deletions

10
bin/.bin/DidIClickDesktop.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Did I just click the desktop?
#Get the window id of the window that is under the pointer and set variable WINDOW to it
eval $(xdotool getmouselocation --shell)
#Get the window id of the rootwindow aka desktop and convert the id into decimal form that xdotool uses so we can easily compare the values
rootwindowid=$(($(lsw | head -1)))
#Compare window ids to see if window under mouse is the rootwindow. Returns false if not.
[ "$WINDOW" = "$rootwindowid" ]