Skip to content

Conversation

@Souravgoswami
Copy link
Contributor

@Souravgoswami Souravgoswami commented Oct 4, 2020

Add capability to generate user defined sizes.

In the past (master)

  1. Add convert.rb to Makefile.
  2. Readme added ruby 2.4+ as a dependency.

In the recent past (oreo-bordered)

  1. We have added borders.
  2. Changed syntax for the colours.conf config file.
  3. Notable changes in the convert.rb ruby script.

In this recent branch (oreo-multisize)

  1. We have modified README.
  2. We have named colours.conf to cursors.conf, which is now available in the project root path.
  3. Most importantly, we can generate sizes from configuration file.

The way multisize works is simple. We have some defined file names mapped to the cursors size (pasted from the original config file). Then it generates new config files out of that.

There are other small yet notable changes.

More tests are needed.

User's note

The building is simple. You don't need a gazillion dependencies. We have kept it simple as always.
Just modify cursors.conf with the given simple syntax that looks like JSON. And run make build to start building.

Happy theming!

@SmartFinn
Copy link

SmartFinn commented Oct 4, 2020

The reason why we provide only 32px and 64px sizes because source SVGs is 32px. To support all declared sizes you need to draw new cursors for 24px, 40px, and 56px otherwise it will be blurred.

@Souravgoswami
Copy link
Contributor Author

Souravgoswami commented Oct 4, 2020

@SmartFinn, the cursors actually work flawlessly (with a rounded value of x and y coordinates).
Check it out!

A 32x32 svg maybe downscaled or upscaled without any problem. I have tested 16, 24, 32, 40, 48 pixel cursors. which just works nicely.

The file changed are:

  1. build.sh

  2. all the files in config/

  3. build.sh runs a ruby script to check for the file sizes, which writes the values to standard output in this format:
    16 32 48 64

Here are the major changes:
https://github.com/Souravgoswami/oreo-cursors/blob/90c949547d17f31b260eef4d55f99eb8152bd704/build.sh#L15
https://github.com/Souravgoswami/oreo-cursors/blob/90c949547d17f31b260eef4d55f99eb8152bd704/build.sh#L24

Building takes really long time now, with the default configuration file (cursors.conf), it takes 62 minutes on my laptop to build the cursors. But once it's built, I am facing 0 issues.

  1. config files are calculated from the configuration hardcoded into the script, and then it runs some simple elementary maths to convert one size to another.

https://github.com/Souravgoswami/oreo-cursors/blob/oreo-multisize/generator/checksizes.rb
https://github.com/Souravgoswami/oreo-cursors/blob/oreo-multisize/generator/configs.rb

ezgif com-video-to-gif

I will really appreciate people testing out this version along with the borders and finding issues with the built cursors and the scripts, etc.

@dontdieych
Copy link

If anyone got build error like this,

terminate called after throwing an instance of 'Gio::DBus::Error'

refer to this, https://forum.manjaro.org/t/cannot-build-volantes-cursors-gio-error/148126/9

DBUS_SESSION_BUS_ADDRESS="" make build

got me successful build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants