nextcloud / nextcloud/desktop

Folder/Sidebar Icons on Linux

Open
#2,950 0 comments 5 reactions 0 assignees View on GitHub
os: :penguin: Linux
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

Description

### Expected behaviour
* Any folder named "Nextcloud" in the top level of a user's home directory should have a distinctive icon.
* When this folder is placed in the Nautilus/Nemo sidebar, it should have a distinctive icon there, too (this is ostensibly a feature on macOS, but it hasn't worked recently for me).

### Actual behaviour
In both the main view and the sidebar, the folder named "Nextcloud" has the same icon as any other folder.

### Client configuration
Client version: 3.1.3
Operating system: Ubuntu 20.10
OS language: English (United States)

Qt version used by client package (Linux only, see also Settings dialog): ??? (it doesn't say)

Client package (Linux only): Flathub

Installation path of client: Fluthub

### Potential Fix
I was looking into how folder icons work on Linux, and the norm appears to be assigning them with `gio`. I checked the icons of several folders and got the following output:
```
$ gio info ~/Nextcloud | grep icon
standard::icon: inode-directory, folder, inode-directory-symbolic, folder-symbolic
standard::symbolic-icon: inode-directory-symbolic, folder-symbolic, inode-directory, folder
$ gio info ~/Documents | grep icon
standard::icon: folder-documents, folder, folder-documents-symbolic, folder-symbolic
standard::symbolic-icon: folder-documents-symbolic, folder-symbolic, folder-documents, folder
```
Basically, `~/Nextcloud` could be assigned the following values:
```
standard::icon: folder-nextcloud, folder, folder-nextcloud-symbolic, folder-symbolic
standard::symbolic-icon: folder-nextcloud-symbolic, folder-symbolic, folder-nextcloud, folder
```
And then the icon theme could do the rest. My recommendation would be to submit Nextcloud folder icons to as many themes as possible, though it would make sense for `folder-nextcloud-symbolic` to ship with Nextcloud Desktop because it isn't themed. (This would just be the Nextcloud logo, not a folder with the Nextcloud logo like the large version.)

I did a quick Nextcloudification of the default Ubuntu folder icon, and this is what I got:
![folder-nextcloud](https://gist.github.com/elsiehupp/839b35a664223a30851bb0f784c2ee1d/raw/4616b93725f3214eced537d38f065c889bef54c6/folder-nextcloud.svg)

Doing a blue icon with the Nextcloud logo seems preferable to doing a default-colored icon with a Nextcloud-icon badge because that way it doesn't have to be recolored for variations on the icon theme. Also it's just a bit less cluttered. FWIW there should probably be a small-size version of the icon, as well, based on the corresponding small-size folder icon from a given icon theme.

This approach—letting the Linux theming engine know that it should look for a special icon—also seems relatively easy to theme for OEM providers, given that you could just use values like `folder-${APPLICATION_EXECUTABLE}` and `folder-${APPLICATION_EXECUTABLE}-symbolic`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.