gnome-runcat icon indicating copy to clipboard operation
gnome-runcat copied to clipboard

Add multi icon pack support 🐱

Open JAFB321 opened this issue 3 years ago • 3 comments

Features:

  • Ability to select more icon packs from the extension settings
  • Multi image extension support
  • Change the animation speed for each icon pack (from code)

Now you can go to the settings and select the pack in the combobox: image image

I don't have more cool icons, I just added a dancing parrot and funny walking chicken. But this changes make us able to add more icon packs in a easy way.

How to add more icon packs

  1. Add icons files (same folder structure):

image

  1. Prefs - Add it to settings image image

3.- Then add the IconProvider preset image The getIconProvider function return an instance of IconProvider with the preset of each icon pack. Note that the IconProvider class now has the following params:

  • name: name of the icon pack
  • ext: icons files extension
  • spritesCount
  • speed: is for adjust animation speed (default: 1)

Enjoy!

Any feedback is welcome, I like your project and I can contribute to add more features if you want ! :)

JAFB321 avatar Feb 03 '22 02:02 JAFB321

Hello, @JAFB321! Thanks for awesome PR! The feature you introduced is really cool!

I want to mention the following things:

  1. Image format GIF is a really terrible format. It doesn't support partial (alpha-channel) transparency. These artifacts look awful on white or transparent top bars. PNG is better, but it's not scalable. I'm not sure that PNGs will look nice on 4k/5k monitors.
    Let's use SVGs. It's a standard for graphics in Linux (especially on GNOME Shell's top bar). We can draw an SVGs with Party Parrot, but chicken GIF should be removed, sorry.

  2. Licence We need to have CC-licensed images to be freely published on EOG, repositories, etc.
    About Party Carrot: I found a repo with some source code. For example, parrot.svg is licensed under Creative Commons. Link for inspiration: https://codepen.io/nathangath/pen/RgvzVY/. We need to draw/create all missing states. I can help you with this activity.
    Another suggestion is the following: I think that it would be better if the parrot will be filled with #bebebe color. It's another standard of GNOME top bar icons.

  3. Speed I mentioned that you have introduced a new coefficient runnerSpeedCoef in formula: y = 5000/sqrt(x+30) * runnerSpeedCoef - 400 I want to mention that runnerSpeedCoef could be automatically calculated.
    I suggest the following configuration: runnerSpeedCoef = 5 / spritesCount y = (5000/sqrt(x+30) - 400) * runnerSpeedCoef.
    It will give us the same time limit for playing all sprites. For example, when x (CPU utilization) is 5: spritesCount = 10: y = 222.577127364, spritesCount = 5: y = 445.154254729, etc.

P.S. I've created a branch called feature/different-runners. Could you send this PR to the feature/different-runners, not master branch? Thanks!

win0err avatar Feb 15 '22 17:02 win0err

Hi @win0err Thank you very much for the feedback! I'll work on that soon and make a PR to feature/different-runners branch 👍🏻

JAFB321 avatar Feb 15 '22 17:02 JAFB321

Hi @win0err Thank you very much for the feedback! I'll work on that soon and make a PR to feature/different-runners branch 👍🏻

Thank you! If you have any questions — feel free to ask!

win0err avatar Feb 15 '22 17:02 win0err

Already implemented in #33; fell free to add new runners in different PRs

win0err avatar Oct 31 '22 12:10 win0err

Seems like the functionalities exists only in feature/v22 branch instead of master?

evanslify avatar May 29 '23 18:05 evanslify