GithubHelp home page GithubHelp logo

Comments (31)

Foggalong avatar Foggalong commented on August 26, 2024

Having colouring options for folders is something I've looked at, but it doesn't seem possible at the moment without significantly tweaking designs 2 and 3. Also, that program doesn't appear to be following icon location standards - please file an upstream report with them for that.

from numix-folders.

costales avatar costales commented on August 26, 2024

Hi! I'm the Folder-color's developer |o/
I found this: https://plus.google.com/105639894436806258430/posts/cQoejQQiJwF
I really like numix theme. I'll think in this improvement, it's complicate because I have to colorize all the icons by hand. I could do it for 1 theme, but not for a generic user theme.
I'll think on this :) Best regards.

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Hey, thanks for dropping by! A good, long term solution to this would be to make the folders you use themeable - this means that rather than you having to port themes across to your application, icon themes can make icons for your program. Here are the steps needed to make that possible:

  1. Move the icons from /usr/share/folder-color/media to /usr/share/icons/hicolor/48x48/places/. This is the standardised icon location for Linux and is the location icons themes have to work from.
  2. Make the icon names something obvious so we know what we're looking for. Examples would be folder-color-black.svg, folder-color-green.svg and so on...
  3. Promote it! Get other icon themes to make coloured folders to work with your program, and that'll be it. Numix would more than love to do this, and I'm sure Kotus, Nitrux and Moka could easily get on board too.
  4. Done! Now if the user is using an icon theme which has coloured folder icons they'll be seamlessly integrated.

I'd love to hear your thoughts on this :)

from numix-folders.

costales avatar costales commented on August 26, 2024

Sorry, I was trying to set the markdown in my text (sent from an email) and I see your reply.

Hi Joshua! :) Really thank you for your interest in folder-color!

Some questions please (I have just a few concepts of how the themes are
working in a desktop):

  • You said to use this directory: /usr/share/icons/hicolor/48x48/places/
    But it's empty in my system (Lubuntu 14.04). I don't understand why I
    have to change the location to that folder. Could you be more specific
    please? :)
  • How could I know the current user theme? I didn't find a solution.

Now, I see an implementation like this: by example, humanity & numix
theme:

  • Starting Nautilus => Search available themes here:
    /usr/share/icons/folder-color/<available_theme> (another question: are
    those paths OK?). By example:

/usr/share/icons/folder-color/Humanity/black/Folder.svg
/usr/share/icons/folder-color/Humanity/black/Videos.svg
/usr/share/icons/folder-color/Humanity/black/Music.svg
/usr/share/icons/folder-color/Humanity/green/Folder.svg
/usr/share/icons/folder-color/Humanity/green/Videos.svg
/usr/share/icons/folder-color/Humanity/green/Music.svg
...
/usr/share/icons/folder-color/Numix/black/Folder.svg
/usr/share/icons/folder-color/Numix/black/Videos.svg
/usr/share/icons/folder-color/Numix/black/Music.svg
/usr/share/icons/folder-color/Numix/green/Folder.svg
/usr/share/icons/folder-color/Numix/green/Videos.svg
/usr/share/icons/folder-color/Numix/green/Music.svg

  • Read user theme: If user theme = available theme, then get icons from
    the previous folders.

Example: user theme (numix) & available theme numix (because exists
/usr/share/icons/folder-color/Numix), then get icons from:
/usr/share/icons/folder-color/Numix/black/Folder.svg
/usr/share/icons/folder-color/Numix/black/Videos.svg
/usr/share/icons/folder-color/Numix/black/Music.svg
...etc...
/usr/share/icons/folder-color/Numix/green/Folder.svg
/usr/share/icons/folder-color/Numix/green/Videos.svg
/usr/share/icons/folder-color/Numix/green/Music.svg
...etc...

*How could a team add a new theme to folder-color? *creating a folder with
the icons here: /usr/share/icons/folder-color/
/usr/share/icons/folder-color/Numix/black/Folder.svg
/usr/share/icons/folder-color/Numix/black/Videos.svg
/usr/share/icons/folder-color/Numix/black/Music.svg

...etc...
/usr/share/icons/folder-color/Numix-Circle/green/Folder.svg
/usr/share/icons/folder-color/Numix-Circle/green/Videos.svg
/usr/share/icons/folder-color/Numix-Circle/green/Music.svg

...etc...

Issues:

  • For the Humanity theme, I'm parching the vectorial file on fly,
    regenerating a new file with custom color HEX values. With an unknown
    theme, I'll have to remove that menu entry. I think that it'll not be a
    problem.

Well :) How do you see all this?

Best regards!
Costales.

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

No problem! :)

Linux's standard location for storing icons /usr/share/icons/hicolor/. In this directory any additional icons your application uses should be stored. It's setup just like an icon theme, so is split into sizes and categories like apps, status, places, etc. If I look at mine, I see the custom folder that Wine uses.

screenshot - 171014 - 15 07 08

If an icon theme then wants to theme that Wine folder they just have to create an icon in their theme with the same name. (i.e. Numix/48x48/places/folder-wine.svg)

screenshot - 171014 - 15 09 52

Now, if the icon theme which the user has chosen has a folder-wine icon it will use that, otherwise it will fall back on the one in the hicolor directory.

This brilliant system was chosen as the Linux standard because it means that programs only have to worry about providing the default icons and then themes can take care of the rest separately.

from numix-folders.

costales avatar costales commented on August 26, 2024

Hi! Thanks a lot for the explanation! It's really a brilliant implementation!

Uhm... Maybe it's really easy then. I'll do some tests.

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Sure thing! :) I'm more than happy to give any further help if needed?

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

A solution for the custom hex one would be to have an icon with the path /usr/share/icons/hicolor/48x48/places/folder-color-custom.svg, and then only use this icon for that particular task. This has the downside that it won't be themed like the others, but it allows you to keep that functionality inΒ·

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Anyway, let me know how the tests go and I'll get on with making the coloured folders for Numix and promoting :)

from numix-folders.

costales avatar costales commented on August 26, 2024

WIP :) Just playing :P Yes, of course, I'll tell you.
Best regards and thanks a lot!

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

No problem! :)

from numix-folders.

costales avatar costales commented on August 26, 2024

Nothing :( It has to be custom-icon-name for relative path, but the same code is not working with that:

# -*- coding: utf-8 -*-
import os
from gi.repository import Gio

icon = 'folder-color-green-folder'
folder_name = 'test'

try:
    os.makedirs(folder_name)
except:
    pass

folder = Gio.File.new_for_path(folder_name)

info = folder.query_info('metadata::custom-icon-name', 0, None)
info.set_attribute_string('metadata::custom-icon-name', icon)

folder.set_attributes_from_info(info, 0, None)

This or this is not working either:

gvfs-set-attribute ~/test metadata::custom-icon "folder-color-green-folder"
gvfs-set-attribute ~/test metadata::custom-icon-name "folder-color-green-folder"

from numix-folders.

costales avatar costales commented on August 26, 2024

Hey! Good progress. It was working xD
Need to refresh the icons:

sudo gtk-update-icon-cache /usr/share/icons/hicolor/

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Awesome :D what sort of ETA are we looking at, so I know when to fire up the promote-o-matic?

from numix-folders.

costales avatar costales commented on August 26, 2024

Well, after 4 hours I get this!
I need to work a little more, but I can confirm that it works :))
The custom icon will not work (thinking in a solution)...
PS: I think I'll release it in ~1 week.
Cheers!

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

This is amazing! So I can get a head start on making sure Numix has the
folders needed, what are the names you're using in /usr/share/hicolor?

from numix-folders.

costales avatar costales commented on August 26, 2024

Ops, true! the names :$ They are these.

For the custom icon I need to load the file content for rewrite it again to another file:
/usr/share/icons/hicolor/scalable/places/folder_color_custom.svg
Do you know a method for get that file content from the default user theme?

Best regards and thanks a lot for your knowledge!

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Thanks, I've filed that as #208 and I'll get on it asap :)

As far as I know, that isn't easily possible :( An alternative would be to iterate through all the themes in /usr/share/icons/ and apply the process to all of them, that way regardless of what theme is being used the changes will carry across.

No problem, it's been a pleasure working with you :)

from numix-folders.

clefebvre avatar clefebvre commented on August 26, 2024

Hi,

We were sent an adaptation of @costales extension for Nemo under the name "nemo-folder-color". We immediately loved the idea but we decided to only keep the Gio part and redesign the theme management side as it was theme-specific. We also wanted to support other browsers (Caja in particular) so we named that project "folder-color" back in August. That might be problematic but if we can agree on how to go forward before November I'd be delighted to accommodate.

Now, the good news is that we worked on that and designed the extension in such a way that it scans for themes and color variations already. Please feel free to check the code if it helps with this feature.

https://github.com/linuxmint/folder-color

Note: For the scope of this extension, we also took the opportunity to improve the Nemo Menu API (which only allowed traditional menus and menuitems... thus we had to list colors in a sub-menu). We wanted to list the colors with little squares beside each others and so for that we needed the API to let us build our own Gtk widget and feed it to it. Caja doesn't yet support that so the code for the Caja extension is probably more useful than the Nemo one: https://github.com/linuxmint/folder-color/blob/master/caja-extensions/caja-folder-color.py

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

I'm a bit confused about the naming thing. From what I know, Folder Color has been called "Folder Color" for as long as I can remember (at least since april), so I'm not sure why you received it under another name.

As for moving forward, maybe it would be a good idea to merge the two? The Mint fork has the feature of the coloured squares and the original has the feature of the custom hex, so both would benefit from it in terms of features.

from numix-folders.

clefebvre avatar clefebvre commented on August 26, 2024

We can definitely rename. I guess the person who sent it to us simply called it "nemo-folder-color" as most nemo extensions are prefixed that way. At the time we weren't aware of the fact that this had more scope than just a Nautilus extension.

I'm not sure how the custom hex would work without providing icons. We don't want the extension to ship icons at all.. we want it to use existing themes.

For instance if you've Numix-Blue and Numix-Green installed and you're using Numix-Blue, it shows green as an option. There are no Numix icons in the extension itself. It associates a few known themes to a particular color (for instance it knows that "Mint-X" corresponds to green) but that's as far as it goes.

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Custom hex works by using a place holder variable for the main colour. I'm not entirely sure on the specifics, but @costales has a readme floating about on his PPA.

from numix-folders.

costales avatar costales commented on August 26, 2024

Hi @clefebvre. First, congratulations for Mint, I really like it! But I'm really upset with your Folder Color's fork by 2 reasons:

  • You didn't mention the original author (yet): http://segfault.linuxmint.com/2014/08/mint-x-colors There all appears to be (idea|code|implemetation) from Mint team :/ Please, let's us all gentlemen :)
  • It's based on this https://github.com/linuxmint/nemo-extensions, where they started removing one thing: the donation menu entry. Folder Color is taking a lot of work and dedication from 2 years ago and the donations are a little part that encourage me to make it better. I know, it's free software and you can do it, but it's not the right way to do the things.

I tried to adapt Folder Color with your LTS (Mint 13), but it didn't work and I desisted fast. I'd glad if Mint team had asked me for adapting it, but they preferred to fork.

Best regards.

from numix-folders.

clefebvre avatar clefebvre commented on August 26, 2024

Thanks @costales. Don't be upset, what matters most to us is getting things done. Ego, money and code aren't important. Ego is for devs to talk about, money can be raised and spent, code can be kept, adapted, rewriten... these don't matter because they don't matter to users, and users are all that matter to us.

The code is trivial, we're talking about 200 lines here... we retained 20-30 lines of Gio calls (the metadata part mostly) but what was important to us and what I'm grateful for is the original idea itself.

This idea is credit to you, but also to the Elementary project. We were seduced by this very early on:

http://images.maketecheasier.com/2012/02/marlin-color-tagged-folders.png

As you can see their idea was to list color in squares, and when mixed with your idea of providing quick access to custom icons, it gave us something we wanted to work on.

Regarding the post, on the blog.. it talked about a lot of mini-projects, including folder-color, but also emblems, the nemo API, theme derivations and icon theme derivations. It was targeted at users to show them what was coming up, not to list all the people who worked on all of these (and there's many). I'm yet to cover the extension itself, when I do I'll make sure to give you and Elementary proper credit.

Regarding donations, there's a conflict of interest here. You need money but the donation button doesn't have a place within the OS. We can accommodate both. We have a budget for volunteer developers and your work helped us so we're sending you a $200 donation. Don't look at this as a cheap attempt to buy you off. We don't need to work together or disagree on design for an extension that small, that's too small for us to be considered a project. We're always delighted to work with newer people though, especially when they have great ideas. So although I'm not interested in the upstream extension itself I hope we'll get to work together on other things in the future.

Last but not least, we'll rename our github project and packages. It wasn't our intention to create a name conflict here and I'm sorry that happened.

from numix-folders.

costales avatar costales commented on August 26, 2024

Hi Clement. Your reply was really gentleman and honest, thanks for that :)

You're right in all the points. All of us are in this world because we
believe in freedom and talking like here, misunderstandings are clarified :)

Your donation was really generous too. Thank you very much!

If you need something from Folder Color, please, tell me. It'll be a
pleasure.

Best regards!

from numix-folders.

clefebvre avatar clefebvre commented on August 26, 2024

Not at all, thanks to you @costales. Good luck for the future. I look forward to talking with you again.

from numix-folders.

clefebvre avatar clefebvre commented on August 26, 2024

@costales, just a follow up. The source is still available but at https://github.com/linuxmint/folder-color-switcher. We changed the name to "folder-color-switcher" to avoid name conflicts in the future (both for projects, paths, and package names).

from numix-folders.

costales avatar costales commented on August 26, 2024

Hi Clement!
I didn't think about the conflict name, well done! :)
I adapted Folder Color for Nemo & Caja too.
Cheers!

from numix-folders.

clefebvre avatar clefebvre commented on August 26, 2024

Thanks @costales. I saw (I like reading webupd8 too) :)

The conflict had to be prevented, first by respect to your work and not to confuse people (they're already pretty confused.. even Andrew thinks they're more or less the same :), and then also to let Mint users use folder-color without our packages getting in the way.

This is your second time on webupd8 btw. I hope you catch momentum and donations from happy users. I'm yet to blog about the extension itself (I want to credit you and Elementary for the Gio code and most of all for the genius idea, and also I want to touch a bit on the design as I think it might help you with your extension, for instance I heard themes didn't support it, but the way it's designed here makes it support all colored themes as long as they're named ThemeName-Color, they don't need to support anything in particular. I also want to make the MATE guys react a bit... we improved the Nemo API, they'll probably be interested to do the same in Caja but a blog post and screenshot will definitely help. Again, credit to Elementary on that, they had that rolling a long time ago, even though at the time they weren't customizing the icon itself).

from numix-folders.

costales avatar costales commented on August 26, 2024

Hi! I replied :) Yeah, these webUdp8 guys are amazing. They are giving a great articles every days.

Do not worry Clement, you had been very honest and I love that. Besides give all the quality/features of Linux Mint in every versions with so few resources, is really awesome. Chapeau! :D

Folder Color (and our world in general) needs good designers. I don't really like the current colors in Folder Color, but it's the best I can do from the original Humanity icons.
As you say, @Foggalong was very helpful in his explanation and this Folder Color improvement is thanks to him!

Best regards @clefebvre! :)

from numix-folders.

Foggalong avatar Foggalong commented on August 26, 2024

Fixed in ae1b3fafed

from numix-folders.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.