3 ms·
xeyes 2.0 For those who don't know xeyes. Same thing, little X window widget that looked at the mouse pointer.
by jsymolon 7y ago
xeyes 2.0
For those who don't know xeyes. Same thing, little X window widget that looked at the mouse pointer.
- DonHopkins 7y agoXeyes was inspired by the original NeWS "Big Brother" eye.ps script written in PostScript by Jeremy Huxtable, which were actually in round windows of course, as eyeballs should be. https://www.donhopkins.com/home/archive/news-tape/fun/eye/eye.ps https://www.donhopkins.com/home/archive/news-tape/fun/eye/ey... Keith Packard saw it at SIGGRAPH '88 and made the xeyes knock-off in a rectangular window. It was later extended (with many lines of complex boilerplate code, much more than the NeWS version) to finally make the window round, using the dreadfully byzantine X11 shaped window extension. But even now you can't move them around individually and put them anywhere you wanted without an annoying window frame. https://github.com/xyproto/xeyes/blob/master/Eyes.c#L512 https://github.com/xyproto/xeyes/blob/master/Eyes.c#L512 One fun thing you could do with naked individual NeWS eyes was vandalizing great works of art or photos of people. In 1990, Pat Lashley at Sun automated that process by writing "MonaEyes" for OpenWindows, which made it seem like Mona Lisa was really interested in whatever your cursor was pointing at. https://donhopkins.com/home/archive/NeWS/monaeyes https://donhopkins.com/home/archive/NeWS/monaeyes I made a "recursive" version of eyeball windows for The NeWS Toolkit, integrated with the window manager, whose iris was a separate round canvas that glided around, with a menu that split the eyeball in two along the shortest axis, and which supported drag-and-drop, so you could pick up one eye and drop it inside of the iris of another eye, and nest them arbitrarily! (I still haven't seen an X11 Window Manager that supports that feature of dragging a window inside of another other window!) https://donhopkins.com/home/archive/NeWS/eyes.ps.txt https://donhopkins.com/home/archive/NeWS/eyes.ps.txt It's simply a subclass of ClassBaseWindow, so the white part of the eye is actually the window frame, and the iris is actually the client area, so drag-n-dropping eyes into other eyes is simply implemented by overriding the /MoveStopSub method to look under the mouse for other eyeball containers like irises, and reparent the eyeball window into the first one it finds. /SplitEye { % ctl => - pop gsave Parent setcanvas /bbox self send % x y w h 2 copy ge { exch .5 mul exch % x y w/2 h 4 copy /reshape self send 4 -1 roll % y w/2 h x 2 index add % y w/2 h x+w/2 4 1 roll % x+w/2 y w/2 h } { .5 mul % x y w h/2 4 copy /reshape self send dup 4 -1 roll % x w h/2 h/2 y add % x w h/2 y+h/2 3 1 roll % x y+h/2 w h/2 } ifelse Parent setcanvas /makedemo ClassEyeBall send { /reshape self send /map self send } exch send grestore } def /MoveStopSub { % event => - /MoveStopSub super send TrackHasMoved? { gsave /framebufferof self send setcanvas currentcursorlocation /Mapped false def canvasesunderpoint { dup /EyeBallContainer! known Selected? { SelectedWindows 2 index known not and } if { /active? 1 index send { gsave setcanvas /location self send { /Parent currentcanvas def } stopped { pop pop pop pop } { /move self send exit } ifelse grestore } { pop } ifelse } { pop } ifelse } forall /Mapped true def grestore } if } def