PapirusDevelopmentTeam / papirus-folders

a script that lets you change the colors of folders in Papirus icon theme
https://git.io/papirus-folders
MIT License
628 stars 32 forks source link

Different colors for light/dark variants #33

Closed jvzr closed 1 year ago

jvzr commented 1 year ago

Is there a way to specify two different colors for light/dark variants? Say palebrown for light, and brown for dark

I've tried -t Papirus-Light -C palebrown, followed by -t Papirus-Dark -C brown, but it just overwrites itself. I've tried -t Papirus-Light -C palebrown -t Papirus-Dark -C brown but it just uses the last entry in the command. I've tried editing the keep file, but it doesn't seem to have a notion of multiple themes.

It seemed to me that it would work because I could specify the theme to be targeted, but it appears that it doesn't. Or am I missing something?

SmartFinn commented 1 year ago

This is a limitation of papirus-icon-theme because Papirus-Light/*/places are symlinks to Papirus/*/places. That helps to save disk space.

To make possible to set individual folder color to Papirus-Light (or Papirus-Dark) the theme should contain places icons like Papirus.

In case papirus-icon-theme is installed system-wide (/usr/share/icons/Papirus) there is an easy way to change this behavior by cloning theme to user's home:

# create a directory for future clone
# NOTE: if you are a KDE user you should change this and next paths from
# ~/.icons/Papirus-Light to ~/.local/share/icons/Papirus-Light
mkdir -p ~/.icons/Papirus-Light

# copy all directories, files, and symlinks from Papirus to Papirus-Light
# NOTE: slash (/) in the end of the paths is required
rsync --recursive --links /usr/share/icons/Papirus/ ~/.icons/Papirus-Light/

# copy only files (ignoring symlinks) from system Papirus-Light theme to user's
rsync --info=ALL --no-links --recursive --force /usr/share/icons/Papirus-Light/ ~/.icons/Papirus-Light/

# update icon cache
gtk-update-icon-cache -f ~/.icons/Papirus-Light/

# now you can set individual folder color for Papirus-Light
papirus-folders -v -C palebrown --theme Papirus-Light
jvzr commented 1 year ago

Thank you @SmartFinn for the wholesome reply! I've adapted it to my needs and am satisfied :-)