exit
fi
-winequal() {
- [[ $1 =~ "," ]] && return 1
- if [ "$(wincomp $1)" = "$(wincomp $2)" ]; then
- return 0
- else
- return 1
- fi
-}
-
-currentwin() {
- xprop -root | head -1 | grep -o '0x.*' | sed 's/0x/0x0/'
-}
-
-wincomp() {
- grep -Eo '.{7}$' <<<"$1"
-}
-
getmonitor() {
XPOS=$(xdotool getwindowfocus getwindowgeometry | grep -Eoi 'position.*,' | grep -o '[0-9]*')
if [ "$XPOS" -gt "1919" ]; then
fi
}
-OLDWID=$(currentwin)
-echo "oldwid $OLDWID"
-OLDMONITOR=$(getmonitor)
+OLDWID=$(pfw)
focuswin "$WID"
-if winequal "$(currentwin)" "$WID"; then
- echo "success current $(currentwin)"
-
- if ! [ "$(getmonitor)" = "$OLDMONITOR" ]; then
- xdotool key "super+comma"
- if ! winequal $(currentwin) "$OLDWID"; then
+if [ "$(pfw)" = "$WID" ]; then
+ exit
+else
+ if ! [ "$(pfw)" = "$OLDWID" ]; then
+ if ! [ "$OLDWID" = "0x000001e1" ]; then
xdotool key "super+Tab"
fi
- xdotool key "super+comma"
-
- else
- echo "not on any active window"
fi
- echo "success"
- exit
-else
- echo "not successful"
- focuswin "$OLDWID" || xdotool key "super+Tab"
xdotool key "super+comma"
- echo $(currentwin)
focuswin "$WID"
fi
-
-# xdotool key "super+comma"
-# xdotool key "super+comma"
-# xdotool key "super+Tab"
rm -rf dragon
fi
+if ! command -v lsw &>/dev/null; then
+ test -e core && (echo "core dir existing" && exit 1)
+ git clone --depth=1 https://github.com/wmutils/core.git
+ cd core
+ make
+ sudo make install
+ cd ..
+ rm -rf core
+fi
+
mkdir ~/paperbenni &>/dev/null
# automatic wallpaper changer