In Windows placing .icon with this .ini file works-

[.ShellClassInfo]
IconResource=.FolderIcon.ico
IconFile=.FolderIcon.ico
IconIndex=0
InfoTip=
[ViewState]
Mode=
Vid=
  • Sonotsugipaa@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    2 days ago

    Not sure how it works on other file managers (or any DE), but for Dolphin you can create a .directory file with its content like:

    [Desktop Entry]
    Icon=/absolute/path/to/image.png
    

    I think it’s more or less universal.

    Specifically for Dolphin, there may be a way to achieve the same with extended file attributes (getfattr/setfattr) instead of directories, but I don’t know the attr name for icons if it even exists.

    • talkingpumpkin@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 days ago

      OP, you can also use named icons from your theme

      [Desktop Entry]
      Icon=folder-videos
      

      I think you can use any name from stuff inside /usr/share/icons, but I’m not 100% sure