TrilbyWhite / alopex

A tabbed tiling window manager, with fur.
36 stars 4 forks source link

[icons] Weather icons #43

Closed HalosGhost closed 11 years ago

HalosGhost commented 11 years ago

I've been thinking about putting together a weather icons pack. For anyone that uses something like weatherman, this might be helpful for integration into the status bar.

I haven't even started mocking these up, so I imagine some will be much harder than others (what would I do for "partly cloudy" for instance?), but I might be able to come up with something.

Would anyone use this or be interested in having them? Trilby, if I got them looking alright, would you be interested in having them included upstream?

TrilbyWhite commented 11 years ago

That'd be awesome. I look forward to seeing them.

I'd be happy to have them included in the repo, but perhaps a separate file.

In fact I'll have to think of a good way to manage icons. We could have a skeleton icons.h for the default, which could "#include" other icon files. But then there could be a bunch of files. Some brainstorming is needed.

HalosGhost commented 11 years ago

Alright, I'll get to work on mocking them up.

As for having the icons separated into multiple files, I've actually been hoping for something like this for a while.

I would recommend having the default icons.h include no direct icon definitions, but rather just have it include several other files with the icons defined (organized by the category of icon).

Personally, I would prefer there to be a directory like $XDG_CONFIG_HOME/alopex/icons.d/. In this hypothetical, if I wanted to add a new category of icons to the pack, I would write the new file and then place it in this directory, and upon rebuilding alopex, the new icons would be included.

TrilbyWhite commented 11 years ago

The icons.d wouldn't really work unless there was a separate tool to "pre-pre-compile" the icons.h. This would be fairly easy, except then how would you refer to the icons in your status tool? You need to use the numbers that you assign in icons.h - if an automated tool were assigning those numbers you'd have to at least check them yourself.

HalosGhost commented 11 years ago

Yeah, that's a good point. Well, having an icons.h that just serves as an index wouldn't be bad.

HalosGhost commented 11 years ago

Update. Here's an initial draft of the first few icons I've been working on. They are (from left to right): sunny, mostly/partly sunny, overcast, mostly/partly cloudy, rain/storms, thunderstorms weather_icons_initial

mostly/partly sunny, I think, is still fairly understandable, but I think mostly/partly cloudy could use some work. So, any comments, suggestions or feedback would be great!

P.S., I'm also working on misty and snowy; and I'm likely to add something for a Tornado-warning. Are there any others that people would like to see?

HalosGhost commented 11 years ago

Also, new idea for the icons.d thing. I imagine you'll dislike this. What about having an individual file per icon? Then, each icon would follow a naming convention like ##-icnname.h where ## is the desired number for the icon in the array.

Pros:

Cons

Thoughts?

TrilbyWhite commented 11 years ago

A long time coming, but my plan is for the user to create only an icons.conf which will simply be a list of icon names with optional file names. So, if the user includes "raining" on the list, all *.icon files will be searched in the source directory for a variable named icon_raining and that variable definition will be copied to a generated icons.h. The user could also specify a file name: "HGs_weather/raining" so different icon sets could provide icons with the same name; this would then look in HGs_weather.icon for the definition of raining.

This has a big advantage that no unused icon definitions will be included in the compiled binary. User's don't have to pick and choose icon sets, rather they can specify the exact icons they want. This also means we can be much more liberal in including a wide range of icon sets with the source code without burdening any user who has no interest in the icons.

I'll get to work on the icons.h generator tool.

HalosGhost commented 11 years ago

That sounds awesome! I'm super excited to see how this works out.

HalosGhost commented 11 years ago

Hey Trilby, have you made any progress on the icons.h generator? I'm planning on waiting to submit the weather icons pack until the generator is done (or, at least, available to test). When the time comes, I'll also be opening a new issue with a to-do list of separating each of the current icons into a separate file and update it with my progress.

TrilbyWhite commented 11 years ago

Actually I'm going a very different direction with alopex 3. I'll still do any bug fixes for alopex 2 (Which is now the "version2" branch) but I won't work on new features.

v3 has similar goals, but very different implementation from the start which will make these icons much easier. We will not need pixel arrays, we'll just use image files (I may restrict it to png for simplicity.) These images will only need to be made once, then can be scaled for any bar size.

So ... I guess that's a 'no' to your real question.

HalosGhost commented 11 years ago

Good enough for me. I'll go ahead and close this then.

When the time comes, let me know how I should start on the icons (or if you need/want me to).