projecthamster / hamster-shell-extension

Shell extension for hamster
http://projecthamster.org
GNU General Public License v3.0
217 stars 92 forks source link

Option to display a symbolic(white) icon instead of text #16

Closed 0rAX0 closed 10 years ago

0rAX0 commented 12 years ago

I like your extension, but the text on the panel breaks the uniformity of the icons in the panel and clutters it, especially if you enable the Pomodoro extension. It would be really great if you can add a way to display an icon up there(a la Weather extension).

I'm willing to help if you need someone to make the icon. :)

tstriker commented 12 years ago

ok, let's do that. i'll add a display preference (icon/current activity) to extensions settings. i imagine a state of a task running in such case would be nice.

idiomatically i don't know which way we could go - none of the clocks will do any favors, so perhaps the same original hamster wheel, just stripped to the bare idea and monochrome?

i hope you have experience making icons!

0rAX0 commented 12 years ago

OK, I made the icon! > http://goo.gl/UoRxv After thinking about it, maybe we need two icons. One for 'No Activity' and one for when an activity is begin tracked.

0rAX0 commented 12 years ago

Update:

Active(tweaked): http://goo.gl/Or82K Inactive: http://goo.gl/x12cx

tstriker commented 12 years ago

just pushed update, hope it won't stack-trace on you (didn't check if install works properly, but should).

after install, you can adjust appearance via gsettings key:

gsettings set org.gnome.hamster panel-appearance 0

0 = just label 1 = icon and duration 2 = just icon

you will notice that the idle state is bit too dark - would be lovely if you could fix that. also my inkscape-fu is weak, so i did not know how to turn strokes into paths properly so that it could be lightened up, but that would be preferrable (think matches how symbolic icons are done in gnome too)

0rAX0 commented 12 years ago

Great! Now that I can actually see the icon I can tweak properly. Thank you, I'll send you an update shortly. I think they gave the icons some kind of ID so they can change the color from the CSS afterwards, I'll look into it.

One question though, there is org.gnome.shell.extensions, why don't you put the settings there? is it because of the hamster-applet?

tstriker commented 12 years ago

regards where to store settings - haven't looked into that really and i don't think anybody will write UI for editing those, so it will be up to hamsters, which means we use our own namespace. with blackjack... and hookers... in fact, forget the namespace.

0rAX0 commented 12 years ago

Hi,

I looked into the icon issue, it looks like a problem with your code. The icon should take its color from the .css file, the extension's css or the gnome-shell.css.

To prove my point, I replaced my icon with the default networking icon, which is taking the white color properly with network-manager. And I changed the css in the weather icon to make it red, I tried to do the same with your stylesheet.css file :

.panel-icon { padding-right: 5px; color: #fff; }

Nothing worked, so I'm assuming something is preventing the icon from changing color from the css.

http://goo.gl/0OlRT

tstriker commented 12 years ago

accidental button press!

there indeed seem to be problems with icons initiated from a path rather than name and the color is not working. tried different approaches and failed, so i think the simplest for now would be to adjust the color of the actual icon and be done with it.

0rAX0 commented 12 years ago

OK I think I found the fix, install to /usr/share/icons/hicolor/scalable/status and just call the icons direcly like so:

this._icon = new St.Icon({gicon: Gio.icon_new_for_string("hamster-tracking-symbolic"), icon_type: St.IconType.SYMBOLIC, icon_size: 16, style_class: "panel-icon"})

It seems like the icon itself needs further tweaking, but it's working! Changing the color from the css also works.

http://goo.gl/l3Gx5

tstriker commented 12 years ago

i'm targeting inclusion into the extensions.gnome.org and i believe that that site is limited to installing extensions only under ~/.local. For that reason system-wide installation will be a no-go and thus until they fix this shortcoming, we should stay with icons of defined brightness and color.

0rAX0 commented 12 years ago

Fixed icons: http://goo.gl/hDh1Q ss: http://goo.gl/LsQVb

I will work on the icon even more to make it sharper and more defined. :)

0rAX0 commented 12 years ago

But there is ~/.local/share/icons/hicolor, isn't there? I haven't tried with it but it looks like it will have the same effect.

tstriker commented 12 years ago

thanks for the icons!

regardin .local: it seems to me that for now the extensions are self-contained. i guess it should be technically possible to create folders in the home folder and copy files but that would mean either doing that on each enable/disable, or leaving cruft behind after reinstall (unclean).

0rAX0 commented 12 years ago

Please re-download the .zip file above, it should have the white color hard-coded now. There will be problems for people having gs themes with black icons, though.

0rAX0 commented 12 years ago

BTW, you have a typo in the css file. lat-child > last-child. :)

tstriker commented 12 years ago

the typo was fixed yesterday (please pull).

the enabled icon looks fine, but the idle one is very dark: http://dl.dropbox.com/u/187829/idle.png

tstriker commented 12 years ago

ah yes i wonder if perhaps instead of the opacity change you could add some kind of symbol to it? similar to battery charging indicator - how about snoozing zzz-s emblem?

0rAX0 commented 12 years ago

I took the same value from a default GNOME icon, which is a white color with the opacity set to 35(the battery icon have a part with the same color). I can change it, but it will look different. What do you think?

0rAX0 commented 12 years ago

OK, let's try that. I'll send you the result shortly. :)

tstriker commented 12 years ago

i guess the zip is a live link to your dropbox - just re-downloaded and it looks more visible now. pushed.

tstriker commented 12 years ago

btw i'll add you to the copyleft. could you please provide me with your mail and name you would like to go by? :)

0rAX0 commented 12 years ago

My Github page has all the information you need. :) https://github.com/0rAX0

tstriker commented 12 years ago

implemented a while ago; closing

0rAX0 commented 12 years ago

Hi,

First of all, so sorry about the delay, the files were inside a Dropbox folder and I rarely go there, so it gradually slipped off my mind. :s I only remembered when I received the closing message this morning.

I redrew them and made them sharper(they weren't properly aligned). And also included a 'zzz' version as you suggested. So sorry again. :/

http://dl.dropbox.com/u/8078483/Hamster.zip

tstriker commented 12 years ago

no worries, can't say i remembered anything either :) reopening so i remember to reapply the graphics

tstriker commented 10 years ago

sure hope i reapplied the graphics :) if not, ah well, reopen (the zip is blank now)

0rAX0 commented 10 years ago

Ah, two years later, and I'm able to see the flaws in my icons. They should probably be redone. :P

tstriker commented 10 years ago

i promise to apply the icons sooner than 2 years if you redo them :)

0rAX0 commented 10 years ago

hehehe ok ok :)

0rAX0 commented 10 years ago

Hey @tbaugis

It took me a month, but I redrew them at last. Here: https://dl.dropboxusercontent.com/u/8078483/Hamster_symbolic_icons_improved.zip

tstriker commented 10 years ago

Thanks! I tried out the snoozing one for the idle but that seemed to be bit much, so just picked the other one.

0rAX0 commented 10 years ago

:+1: