vinceliuice / Tela-circle-icon-theme

Tela-circle-icon-theme
714 stars 50 forks source link

[question] Help in adding a new file/mime icon #46

Closed yozachar closed 6 months ago

yozachar commented 3 years ago

Hi, I was trying to add a icon for .nim files.


/Tela-circle-blue/16/mimetypes/


/Tela-circle-blue/16/mimetypes/


/Tela-circle-blue/scalable/mimetypes/


/Tela-circle-blue/scalable/apps/


But when I put them in icons folder (/usr/share/icons/Tela-circle-blue) I see no difference:

image

Can you please help me to figure out what's missing?

PS: I have the svg files, and am happy to provide them whenever needed.

vinceliuice commented 3 years ago

Open this file properties, and tell me the file type introduction like this: Screenshot_20210704_124245

yozachar commented 3 years ago

image

I'm using Thunar, but I think your looking for kind of the file. It says plain text.

~/Templates/prog 
➜ file python.py 
python.py: Python script, ASCII text executable

~/Templates/prog 
➜ file nim.nim 
nim.nim: ASCII text

Hmm.. interesting, so the system doesn't know it's a .nim file yet.

vinceliuice commented 3 years ago

Linux distinguishes the file type according to the content of the file, and has nothing to do with the file name suffix

yozachar commented 3 years ago

Yes, that's correct, let me ask about this in nim community.

yozachar commented 3 years ago

Update: A patch as been made to identify nim-lang. I'll comment once I'm able to test it.

yozachar commented 3 years ago

Hi, I tested the patch but it's not working. Here's the directory structure:

nim.zip

~
➜ tree
.
├── 16
│   └── mimetypes
│       ├── application-x-nim.svg
│       └── text-nim.svg
├── 22
│   └── mimetypes
│       ├── application-x-nim.svg
│       └── text-nim.svg
└── scalable
    ├── apps
    │   └── nim.svg
    └── mimetypes
        └── text-nim.svg

I tried this:

~/Downloads
➜ cat abc.js  
alert("Hello");

~/Downloads
➜ cat abc.nim 
proc Hello =
  echo "Hello"

Hello()

~/Downloads
➜ file abc.js 
abc.js: ASCII text

~/Downloads
➜ file abc.nim 
abc.nim: ASCII text

But... image

Why would that be so?

ghost commented 2 years ago

@joe733 if you're still curious - that's because the patch that "added" Nim support to file was wrong - it was specifically made for one single file and wasn't checked thoroughly, I've opened another issue, see https://bugs.astron.com/view.php?id=293