Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numix-folders setting changes with upgrade. #101

Open
Himanshu-Mishr opened this issue Jul 23, 2015 · 35 comments
Open

numix-folders setting changes with upgrade. #101

Himanshu-Mishr opened this issue Jul 23, 2015 · 35 comments

Comments

@Himanshu-Mishr
Copy link

Every time I upgrade numix icons via package manager, settings that I have set for numix-folder gets changed to its default values and colors. How to make my settings permanent ?

@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

@Foggalong I thought about this, and I guess there is a way to do this:

  1. Save the current configuration (colour, style, custom etc.) in a config file somewhere in ~/.config (or somewhere else) by writing it in the end of the script.
  2. Add another flag to the script that reads this config file and applies these values without asking the user on the command line
  3. On numix-base and circle there is somewhere a postinstall method (that's where the gtk-update-icon-cache is done). Add the numix-folder script (using for example which numix-folders) with this new flag.

All that's necessary to do this is that numix-folders is somewhere in $PATH (doesn't matter where exactly)

@dirtydancing
Copy link
Contributor

While this issue is a duplicate of #45, #47 (comment), #64 and #99, we might just address this here. It is apparent that there is a demand for this kind of feature.

I am still not sure whether the method that @wa4557 proposed will work on all distros, or whether this would be specific to updating e.g. via PPA/AUR/copr. How about cloning from GitHub?

An alternative way to address this might be to still have to run the numix-folders script, but to have the script itself provide an option for the last setting, e.g. by entering "lastrun" for the style and be done.

An additional advantage of such an approach would be that Numix base and Numix-Circle stay "independent" of numix-folders in the sense that Numix base and Numix-Circle would not have to include a numix-folders postinstall.

A disadvantage of such an approach would be that the numix-folders script would have to be triggered manually every time Numix base or Numix-Circle updates e.g. via PPA, which can mean on a daily basis.

@bilelmoussaoui
Copy link
Contributor

@dirtydancing @wa4557 i think the best way is to proive a GUI for numix-folders so the user can save the settings in the configuration file

@trmdi
Copy link

trmdi commented Jul 23, 2015

@bil-elmoussaoui @wa4557 @Himanshu-Mishr :
I've had a completely solution for this on my Ubuntu 15.04. You may want to have a look, at https://github.com/idmresettrial/numix-folders-autorun

@Foggalong
Copy link
Contributor

The problem with that script is that it's Ubuntu dependent, so we can't implement that as the solution. As others have mentioned it might be a good idea to implement the save feature along with the GUI as both will require a bit more substance in terms of a proper install method

@trmdi
Copy link

trmdi commented Jul 23, 2015

@Foggalong
Ok, I just let them know about a solution on Ubuntu.
I still wait for an official one from Numix.
^^

@bilelmoussaoui
Copy link
Contributor

I will do that using Python if everyone is ok with that. If anyone have an idea of a possible features or a design of the GUI please share it here.

Le 23 juil. 2015 à 16:10, idmresettrial [email protected] a écrit :

@Foggalong
Ok, I just let them know about a solution on Ubuntu.
I still wait for an official one from Numix.
^^


Reply to this email directly or view it on GitHub.

@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

I guess python is not really necessary here (since the whole script is written in bash), a simple zenity GUI would be sufficient. I'd do it but unfotunately I'm extremely busy at the moment :(

@bilelmoussaoui
Copy link
Contributor

I have no idea how zenity woks, but i will give it a try this weekend.

Le 23 juil. 2015 à 16:28, Andreas Angerer [email protected] a écrit :

I guess python is not really necessary here (since the whole script is written in bash), a simple zenity GUI would be sufficient. I'd do it but unfotunately I'm extremely busy at the moment :(


Reply to this email directly or view it on GitHub.

@Himanshu-Mishr
Copy link
Author

I am not in development of this repo but I would say saving user's settings somewhere ( in ~/.config ) and using it while upgrading, would be better idea. If config file not present then you can go with default settings. Keep it simple.
Btw thank you for wonderful icons.

@Foggalong
Copy link
Contributor

Yeah, decided I'm gonna keep this open. Enough people have requested it now that it's clearly something people want :P

@Foggalong
Copy link
Contributor

CC: @paolorotolo

@ghost
Copy link

ghost commented Sep 20, 2015

A config file in ~/.config seems the best way to handle this, and use each distro's post installation routines to run a script that checks for existing config data, and applies the users preferences. This should allow for distro independence.

And I too am requesting this, I'd prefer not to have to re-assign folder colors several times per week. Thanks!

@andia89
Copy link
Contributor

andia89 commented Sep 24, 2015

@xhn35rq there exists a config file already and running the script with numix-folders -p restores the previous settings.
@Foggalong
Adding this: $(command -v numix-folders) -p >/dev/null 2>&1 to the postinstall routine (of the base numix-icon-theme of course) (the same place where the gtk-update-cache is done) should fix the issue for all non git-clone users, and doesn't do any harm if numix-folders is not installed. I really think this should be added (@paolorotolo is this reasonable?)

@Foggalong
Copy link
Contributor

@paolorotolo ^

@dirtydancing
Copy link
Contributor

Should this then not be added to Numix-Circle as well? Numix base encompasses the folder icons, but Numix-Circle encompasses the file manager icon which also changes according to the folder style.

@andia89
Copy link
Contributor

andia89 commented Sep 24, 2015

True.

@Foggalong
Copy link
Contributor

👍

@Foggalong
Copy link
Contributor

As a note, people using git based installations don't need to worry about this problem anyway since git updates don't cause this problem

@ghost
Copy link

ghost commented Sep 25, 2015

there exists a config file already and running the script with numix-folders -p restores the previous settings.

@wa4557 Thanks for that info, but I don't want to run this script after every apt-get update. I just want my existing settings to stay the same. 😄

@dirtydancing
Copy link
Contributor

@Foggalong I am not sure what you mean with "git based installations don't need to worry about this problem".

E.g. with Arch/GNOME, when I run yaourt -Syua --devel --noconfirm in order to update i.a. all git-based AUR packages (when only the git version has updated without the AUR package itself having been updated), the folder icons are reset to the default as well. (for the Numix base and Numix-Circle AUR packages https://aur.archlinux.org/packages/numix-icon-theme-git/ and https://aur.archlinux.org/packages/numix-circle-icon-theme-git/).

This seems to imply that also the AUR packages would need to include some kind of postinstall routine.

@Foggalong
Copy link
Contributor

woah really? I use raw git for managing my Numix install and it doesn't reset so I assumed AUR would be the same. Unfortunately we don't administrate the AUR packages so it's up to the maintainer there to add it. They do occasionally popup on the GitHub though so they might see this :)

@dirtydancing
Copy link
Contributor

Yeah, I am not really sure at this point if this is about the AUR package itself, because with git-based AUR packages, they often do not update with versionless "rolling" git projects, but you can still update the git version with the --devel flag. To me, this entire situation is not that big of a deal because I can simply run numix-folders (which has saved the previous configuration), and I am done. Anyways, I would agree that for Arch, this is something that the AUR package maintainers would need to address.

@andia89
Copy link
Contributor

andia89 commented Sep 26, 2015

But still, adding $(command -v numix-folders) -p >/dev/null 2>&1

to base and circle postinstall is a good idea, regardless of the situation for arch packages

@Foggalong
Copy link
Contributor

Oh yeah, we'll definitely add it for the PPA :)

@grenzor
Copy link

grenzor commented Nov 24, 2015

+1 folders settings resets to default upon update. any new status on this?

@Foggalong
Copy link
Contributor

No update as of yet. @paolorotolo will probably announce it here when done :)

@palob palob mentioned this issue Jan 12, 2017
@morph027
Copy link
Contributor

morph027 commented Feb 2, 2017

Solved it like this:

/etc/numix-folders.conf

STYLE=6
COLOR=blue

/usr/local/bin/trigger-numix-folders.sh

#!/bin/bash

grep -q '/numix-icon-theme' || exit 0
touch /tmp/trigger-numix-folders-update

/usr/local/bin/numix-folders.sh

#!/bin/bash

numix_folders_apply() {
. /etc/numix-folders.conf
numix-folders --cli << EOF
$STYLE
$COLOR
EOF
rm -f /tmp/trigger-numix-folders-update
}

if [ -f /tmp/trigger-numix-folders-update ]; then
  if [ -f /etc/numix-folders.conf ]; then
    echo "restoring blue Numix icons (style 5)"
    numix_folders_apply
  fi
fi

/etc/apt/apt.conf.d/99numix-folders

DPkg::Pre-Install-Pkgs { "/usr/local/bin/trigger-numix-folders.sh"; }
DPkg::Post-Invoke { "/usr/local/bin/numix-folders.sh"; }

@morph027
Copy link
Contributor

morph027 commented Feb 2, 2017

@TiZ-HugLife
Copy link

TiZ-HugLife commented May 19, 2017

All this talk about package manager hooks and more root entrenchment, when all of this could just be solved by creating a theme in $HOME/.icons with nothing but the customized folders, that inherits Numix. You could call it Numix-Folders. Then you would update Numix derivatives like Circle such that their inherits line inherits Numix-Folders and then Numix.

Is there a reason this method has been so aggressively avoided? Like, not even mentioned by anyone in this thread?

@bilelmoussaoui
Copy link
Contributor

@TiZ-EX1 I'm already working on a new version of Numix Folders that doesn't require root permissions. As with the modifications done to /usr/share we can't really have an official package of it on any distro, netiher a flatpak/snap package.
i can't tell you when it's going to be ready, as i'm so busy with finals right now but should happen this summer !

@TiZ-HugLife
Copy link

TiZ-HugLife commented May 19, 2017

A new version, huh? Well, this current one (at least the part that does all the work) is written in bash, which I am fairly good at (Don't know if that's a good thing). I'll try to grok it and see what it would take to make it just write the customized icons to $HOME/.icons.

@bilelmoussaoui
Copy link
Contributor

It shouldn't be too hard 👍 The new version won't include only this modification, the way the ui was created at first isn't perfect; the code is a little mess and should be cleaned a bit :)

@TiZ-HugLife
Copy link

I just realized that this script modifies Numix-Circle and Numix-Square as well, which makes this a little less straightforward. What would be nice is if user overrides for specific icons could be placed into user directories. I know that userspace apps place icons into "$HOME/.local/share/icons/hicolor", and expand/override parts of the fallback theme that way. If I try to override Numix in that manner (test case is replacing the current oversized wired network icon with the old one), it doesn't seem to work.

@Foggalong
Copy link
Contributor

Foggalong commented May 20, 2017

@TiZ-EX1 Yeah, that's why we'd not just done that :P Inheritance trees are a minefield especially when you're wanting to make modifications to multiple themes

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

No branches or pull requests

10 participants