PapirusDevelopmentTeam / papirus-icon-theme

Pixel perfect icon theme for Linux
https://git.io/papirus-icon-theme
GNU General Public License v3.0
6.65k stars 423 forks source link

[Question] Is there a config file generated for Papirus Folders so I can copy and save it? #1853

Closed kevinsmia1939 closed 5 years ago

kevinsmia1939 commented 5 years ago

This sound a bit weird, but I am rolling out my own personal distro based on openSUSE Tumbleweed. I really like papirus icons, but the default is blue color. So when I first boot up the distro, it will be blue.

There is a "Papirus Folders" script to change the system folder color, but I want it to be green at the very beginning. So I though if there is a config files that "Papirus Folders" generated, so I can copy that config files and drop it in its directory which will make the system folders green at the very first boot.

Thanks.

SmartFinn commented 5 years ago

You don't need the papirus-folders script for this. You can use a post-install script like:

color="green"

for size in 22x22 24x24 32x32 48x48 64x64; do
    for prefix in "folder-$color" "user-$color"; do
        for file_path in "/usr/share/icons/$size/places/$prefix"{-*,}.svg; do
            [ -f "$file_path" ] || continue  # is a file
            [ -L "$file_path" ] && continue  # is not a symlink

            file_name="${file_path##*/}"
            symlink_path="${file_path/-$color/}"  # remove color suffix

            ln -sf "$file_name" "$symlink_path"
        done
    done
done

gtk-update-icon-cache -qf /usr/share/icons/Papirus || true
gtk-update-icon-cache -qf /usr/share/icons/ePapirus || true
gtk-update-icon-cache -qf /usr/share/icons/Papirus-Dark || true
gtk-update-icon-cache -qf /usr/share/icons/Papirus-Light || true

or make child themes as Manjaro Team do for their distros https://github.com/Ste74/papirus-maia-icon-theme.