Last active
March 23, 2017 19:03
-
-
Save budRich/0d8a14c81c35c9276c2300e0d6815904 to your computer and use it in GitHub Desktop.
i3ass-rcl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
eval $(xdotool getmouselocation --shell) | |
wname="$(xdotool getwindowname $WINDOW)" | |
if [ "$wname" = "i3" ]; then | |
notify-send "hello" | |
fi | |
# getmouselocation [--shell] | |
# Outputs the x, y, screen, and window id of the mouse cursor. Screen | |
# numbers will be nonzero if you have multiple monitors and are not | |
# using Xinerama. | |
# --shell | |
# This makes getmouselocation output shell data you can eval. | |
# Example: | |
# % xdotool getmouselocation --shell | |
# X=880 | |
# Y=443 | |
# SCREEN=0 | |
# WINDOW=16777250 | |
# % eval $(xdotool getmouselocation --shell) | |
# % echo $X,$Y | |
# 714,324 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment