Skip to content

Latest commit

 

History

History

work

For Developers and Designers

Designing icons for Papirus is easy :)

You only need to draw icons for Papirus and then convert colors for ePapirus, Papirus Dark and Papirus-Light using our scripts.

How to draw icons for Papirus

See the separate Design Notes document, and the Papirus wiki.

System Requirements

The scripts in this folder require the following programs:

  • Inkscape
  • scour

For Debian/Ubuntu/Linux Mint users:

sudo apt update
sudo apt install inkscape python3-scour

If you need a more recent version of scour, please install it with pipx.

Step-by-Step Guide

1. Getting Started

Open the tools/workfolder in a file manager and open a terminal in that location. You can do that from the context menu entry Open in Terminal or Action → Open Terminal Here.

1a. How to create a new icon

You can create a new icon from the provided template using the new-icon.sh script in tools/work. For example,

$ cd tools/work
$ ./new-icon.sh apps abricotine
'./Papirus/apps/[email protected]' -> './Papirus/apps/[email protected]'
'./Papirus/apps/[email protected]' -> './Papirus/apps/[email protected]'
'./Papirus/apps/[email protected]' -> './Papirus/apps/[email protected]'
'./Papirus/apps/[email protected]' -> './Papirus/apps/[email protected]'
'./Papirus/apps/[email protected]' -> './Papirus/apps/[email protected]'
'./Papirus/apps/[email protected]' -> './Papirus/apps/[email protected]'

This command has created six new working files inside the work directory from the template files. For all new icons, please stick to using the template. It is necessary because the template already has some needed objects, like a CSS stylesheet.

1b. How to edit an existing icon

If you want to modify an existing icon, you can do that using the get-from-theme.sh script. For example,

$ cd tools/work
$ ./get-from-theme.sh panel transmission-panel.svg
'./../../Papirus/24x24/panel/transmission-panel.svg' -> './Papirus/panel/[email protected]'
'./../../Papirus/16x16/panel/transmission-panel.svg' -> './Papirus/panel/[email protected]'
'./../../Papirus/22x22/panel/transmission-panel.svg' -> './Papirus/panel/[email protected]'
.svg

1c. How to make symlinks to an existing icon

This is an example of how you might fix issue #354. First, make sure there's an existing icon you can link to:

$ cd tools/work
$ find ../../Papirus -type f -iname '*ardour*' -print
./Papirus/16x16/apps/ardour.svg
./Papirus/22x22/apps/ardour.svg
./Papirus/24x24/apps/ardour.svg
./Papirus/32x32/apps/ardour.svg
./Papirus/48x48/apps/ardour.svg
./Papirus/64x64/apps/ardour.svg

Now you have the filename of an existing icon, ardour.svg, and the name of the new symlink from #354, ardour5. Create the symlinks with the command:

$ cd tools/work
$ ./new-symlink.sh --help   # this shows usage
$ ./new-symlink.sh apps ardour.svg ardour5
'./Papirus/apps/[email protected]' -> 'ardour.svg'
'./Papirus/apps/[email protected]' -> 'ardour.svg'
'./Papirus/apps/[email protected]' -> 'ardour.svg'
'./Papirus/apps/[email protected]' -> 'ardour.svg'
'./Papirus/apps/[email protected]' -> 'ardour.svg'
'./Papirus/apps/[email protected]' -> 'ardour.svg'

NOTE: Symlinks will look like they're broken, but that's OK.

If your symlinks are in apps, emblems or mimetypes you can continue from step 4.3, else continue from step 3.

IMPORTANT: Please don't remove suffixes from the filename, as it's needed for other scripts. Filename extension must be in lowercase.

2. Papirus

IMPORTANT: You should draw icons for the core Papirus theme first.

  1. Open the created/copied file in Inkscape.
  2. Delete any objects you do not need.
  3. Draw new objects.
  4. Save the file with the same filename.
  5. Repeat it for other sizes.

3. Papirus Dark, Papirus Light and ePapirus

  1. Run convert.sh. It copies needed icons from work/Papirus to work/Papirus-Dark, work/Papirus-Light, and work/ePapirus. It then updates the copies' color schemes.

    $ cd tools/work
    
  2. Check the result, and edit manually if needed.

4. Final Steps

  1. Run script tools/work/prepare.sh to clean the created icons:

    $ ./prepare.sh
    
  2. Please check your icons again.

  3. If everything is fine then put the icons into main icon theme folders:

    $ ./put-into-theme.sh
    
  4. Clean the work directory:

    $ ./clean.sh
    
  5. Run tests:

    $ make test
    
  6. Everything is ready now! You can commit the changes to GitHub.