Ported Gnome extension: Glasa => Cinn'r eyes

About programming and getting involved with Linux Mint development
Post Reply
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Cinn'r eyes (read sinner eyes) is a Cinnamon applet. Useless at first but maybe funny. At least for somebody.
It's the old Eyes extension in Gnome, the eyeballs that seem to follow the mouse pointer.
Originally Glasa by Markus Pawellek AKA lyrahgames. License is GPL v3.
More details (if needed) on my blog here.

Default appearance:
Sinner_eyes_0100.png
Spooky mode:
Sinner_eyes_0300_spooky.png
Sinner_eyes_0300_spooky.png (7.79 KiB) Viewed 48 times
Download:
cinn-r-eyes@drugwash 0.3.0.0.zip
(19.74 KiB) Downloaded 1 time
All previous versions can be found on my blog (link above).
Last edited by Drugwash on Wed Jun 22, 2022 8:03 pm, edited 4 times in total.
User avatar
xenopeek
Level 25
Level 25
Posts: 27199
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by xenopeek »

Are they always that big or do they scale to the panel height and you have set it very high?
Image
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

A few settings are customizable. Icon/image size is one of them. The default setting follows the panel icon size, while the custom setting can be set from 12px to 48px height.
The screenshot was taken with a custom setting of 32px.

By the way, the size can be adjusted on-the-fly by mouse scrolling over the image, but it won't obey to the limits set in the JSON file because I didn't find a way to read the values (settings.get_property(option, property) doesn't work). As such it can go very low or very high.

Screenshot from 2022-06-17 18-08-42.png
User avatar
xenopeek
Level 25
Level 25
Posts: 27199
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by xenopeek »

Nice, that's very customizable.
Image
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Thanks. I always try to remember we are not all the same - we have different tastes, different visions, different hardware/software etc, and we should all be given the opportunity to customize whatever can be customized in order to suit our needs and/or desires.
That said, most of the settings here don't make too much of a difference unless the image size varies substantially.
Also the ranges were chosen somehow arbitrarily, but I believe it's better like this than with fixed values as it originally was. There may still be room for improvement though.

Any idea how to programmatically read the min/max values from a spinbutton's settings? The get_property() function does work in Python but not in JS. I'd hate to use hardcoded values, that's bad programming.
User avatar
xenopeek
Level 25
Level 25
Posts: 27199
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by xenopeek »

I'm not up with Cinnamon applets coding or JavaScript so I don't know but maybe somebody else.
Image
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Hopefully. But it's not that big of a deal anyway. An unusual size should make people stop pushing and maybe upon reloading Cinnamon (reboot, log out/in, replace) the value will come back within limits by itself. Haven't tested that theory though.

I am however fairly worried that a supposedly tiny thing such as an x-let can - and sometimes does - bring Cinnamon completely to its knees. There is no automatic safeguard and withdrawal (disabling) in Cinnamon upon a critical failure in an x-let. But that's a completely different topic.

Going to sleep now. Hope those eyes won't follow me in bedroom. :D
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Updated to v0.2.0.0.

Changes from previous version:
- added hardcoded limits for icon size
- added ability to show Expo and Overview (click / Ctrl+click)
- added ability to switch workplaces (Ctrl + mouse scroll)
- added tooltip info when changing icon size or switching workspaces
- added 'spooky' mode

Download link in first post.

EDIT:
Just noticed the spooky mode works correctly only when icon is placed in a top-sided panel. Been using such configuration for almost 25 years and failed to check other panel configurations. My bad. :oops:

Anyway, that mode is just the accidental byproduct of a failed attempt at getting the cross-eyed feature. Until I get some proper fix - if ever - please enable that mode only in top-sided panels. Sorry for the inconvenience.
Last edited by Drugwash on Mon Jun 20, 2022 7:22 pm, edited 1 time in total.
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Bugfix version v0.2.0.1.

Changes:
- fixed accidentally duplicated timer name

Screenshot for the spooky mode:
Sinner_eyes_0201_spooky.png
Updated screenshot for the settings window:
Screenshot from 2022-06-20 03-46-12.png
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Bugfix version v0.2.0.2.

Changes:
- attempted fix at wrong spooky mode behavior in panels other than top-sided
User avatar
Drugwash
Level 4
Level 4
Posts: 439
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Ported Gnome extension: Glasa => Cinn'r eyes

Post by Drugwash »

Updated to v0.3.0.0.

Changes:
– refactored the Settings window
– added option to show workspace name in tooltip (only when workspace switching is enabled)
– added a ‘panic button’ that resets all drawing (icon) values to default

New Settings window appearance:
Sinner_eyes_0300_settings.png
As usual, download link in first post.
Post Reply

Return to “Programming & Development”