FlorianWoelki / obsidian-iconize

Simply add icons to anything you want in Obsidian.
https://florianwoelki.github.io/obsidian-iconize/
MIT License
904 stars 62 forks source link

"Toggle icon in title" feature always enabled when restarting Obsidian + wrong icon in title #357

Open ycardon opened 9 months ago

ycardon commented 9 months ago

Describe the bug in v2.10.0

I don't use the "Toggle icon in title" feature so I've disabled it in the Iconize configuration screen

Screenshots

image image
Drakemoor commented 9 months ago

I have the same issue.

I turn the option(Toggle icon in title) off, and the icon disappears from the file. Then, in 30 seconds, it returns by itself.

I go to the options again, and the toggle is in the off position, as it should be, but the icon is visible in the title. If I turn it on and off again, the icon disappears from the note for a bit before it returns again.

If I look in the data.json in .obsidian\plugins\obsidian-icon-folder when I turn off the option I see this: "iconInTitleEnabled": false, but then if I wait a bit, somehow, it magically turns into "iconInTitleEnabled": true,

Drakemoor commented 8 months ago

Did anyone find a solution or a workaround to this issue?

FlorianWoelki commented 8 months ago

heyhey, thanks for the report. would it be possible that you guys could add some minimal reproduction config (including custom rules, etc.), so that i can reproduce it locally.

Drakemoor commented 8 months ago

here is my data.json:

{
  "settings": {
    "migrated": 4,
    "iconPacksPath": ".obsidian/plugins/obsidian-icon-folder/icons",
    "fontSize": 18,
    "emojiStyle": "none",
    "iconColor": null,
    "recentlyUsedIcons": [
      "RiStarFill",
      "MiZzSpaceRocket.04",
      "MiZzSpaceRocket.02",
      "MiFaceSick",
      "MiAccessoriesDictionary",
      "MiZIdea",
      "MiZdFldFolder.01",
      "BoBxMoviePlay",
      "BoBxTv",
      "RiTempColdLine",
      "BoBxsCalendarCheck",
      "RaMeat",
      "RaRoastChicken",
      "MiHumanGoHome",
      "BoBxsDog"
    ],
    "recentlyUsedIconsSize": 15,
    "rules": [
      {
        "icon": "MiFeatherPenSvgrepoCom",
        "rule": ".*/*.*10 [Ww]riting.*",
        "for": "everything",
        "order": 1,
        "useFilePath": true
      },
      {
        "icon": "MiIcons8Bucket500",
        "rule": ".*/*.*\\b[Ee]lements?\\b.*",
        "for": "everything",
        "order": 2,
        "useFilePath": true
      },
      {
        "icon": "MiGNOMEDevhelpIcon",
        "rule": "(.*/*.*\\b[Ww]ords?\\b.*)|(.*/*.*\\b[Dd]ictionary\\b.*)",
        "for": "everything",
        "order": 3,
        "useFilePath": true
      },
      {
        "icon": "MiIcons8Puzzle500",
        "rule": ".*/*.*\\b[Bb]its?\\b.*",
        "for": "everything",
        "order": 4,
        "useFilePath": true
      },
      {
        "icon": "RaSpeechBubble",
        "rule": ".*/*.*\\b[Aa]ccents?\\b.*",
        "for": "everything",
        "order": 5,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Bb]rainstorming?\\b.*",
        "icon": "MiZPlotBrainstorming.01",
        "for": "everything",
        "order": 6,
        "useFilePath": true
      },
      {
        "rule": "(.*[Ss]park.*)|(/.*[Ss]park.*)|(.*/.*[Ss]park.*)",
        "icon": "MiZSpark.01",
        "for": "everything",
        "order": 7,
        "useFilePath": true
      },
      {
        "rule": "(.*[Cc]haracter.*)|(/.*[Cc]haracter.*)|(.*/.*[Cc]haracter.*)",
        "icon": "MiIcons8AnonymousMask5002Minco",
        "for": "everything",
        "order": 8,
        "useFilePath": true
      },
      {
        "rule": "05 Writing/14 Books and Stories.*",
        "icon": "MiZBKBook.04",
        "for": "everything",
        "order": 9,
        "useFilePath": true
      },
      {
        "rule": ".*_aboutFolder_.*",
        "icon": "MiZdFldFolder.01",
        "for": "everything",
        "order": 10,
        "useFilePath": true
      },
      {
        "icon": "MiZSciScience.18",
        "rule": ".*/*.*\\b[Ss]cience?\\b.*",
        "for": "everything",
        "order": 11,
        "useFilePath": true
      },
      {
        "icon": "MiGnomeSubtitlesIcon",
        "rule": ".*/*.*\\b[Ss]ayings?\\b.*",
        "for": "everything",
        "order": 12,
        "useFilePath": true
      },
      {
        "rule": "(.*[Ss]ettings.*)|(/.*[Ss]ettings.*)|(.*/.*[Ss]ettings.*)|(.*[Ll]ocations.*)|(/.*[Ll]ocations.*)|(.*/.*[Ll]ocations.*)|(.*[Mm]ap.*)|(/.*[Mm]ap.*)|(.*/.*[Ll]ap.*)|(.*/*.*\\b[Pp]laces?\\b.*)",
        "icon": "MiZLocMap.02",
        "for": "everything",
        "order": 13,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Pp]oetry\\b.*",
        "icon": "RaSproutEmblem",
        "for": "everything",
        "order": 14,
        "useFilePath": true
      },
      {
        "rule": "(05 Writing/02 Stories Ideas.*)|(.*[Ii]dea.*)|(/.*[Ii]dea.*)|(.*/.*[Ii]dea.*)",
        "icon": "MiZIdea",
        "for": "everything",
        "order": 15,
        "useFilePath": true
      },
      {
        "rule": "05 Writing/01 WIPs(/[^/]+)?/?$",
        "icon": "MiZBKBook.08",
        "for": "folders",
        "order": 16,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*[Rr]eligion.*",
        "icon": "MiZBChurch.01",
        "for": "everything",
        "order": 17,
        "useFilePath": true
      },
      {
        "icon": "MiZWGun.01",
        "rule": ".*/*.*[Ww]eapons?.*",
        "for": "everything",
        "order": 18,
        "useFilePath": true
      },
      {
        "rule": ".*[Hh]ealth.*",
        "icon": "RiHealthBookFill",
        "for": "everything",
        "order": 19,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*[Ii]mages?.*)|(.*/*.*[Pp]otos?.*)|(.*/*.*[Pp]ictures?.*)",
        "icon": "MiZdFldFolder.04",
        "for": "folders",
        "order": 20,
        "useFilePath": true
      },
      {
        "icon": "MiZSceneClapperboard.04",
        "rule": "(.*[Ss]cene.*)|(/.*[Ss]cene.*)|(.*/.*[Ss]cene.*)",
        "for": "everything",
        "order": 21,
        "useFilePath": true
      },
      {
        "rule": "(.*[Tt]echnology.*)|(/.*[Tt]echnology.*)|(.*/.*[Tt]echnology.*)|(.*[Oo]bject.*)|(/.*[Oo]bject.*)|(.*/.*[Oo]bject.*)",
        "icon": "RiRobot2Fill",
        "for": "everything",
        "order": 22,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*[Pp]hilosophy.*)|(.*/*.*[Pp]hilosophers?.*)",
        "icon": "MiIcons8Philosophy64",
        "for": "everything",
        "order": 23,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*[Rr]rocket.*)|(.*/*.*[Ss]paceShips?.*)",
        "icon": "MiZzSpaceRocket.02",
        "for": "everything",
        "order": 24,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Ff]ashion\\b.*",
        "icon": "MiZFSkirt",
        "for": "everything",
        "order": 25,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*\\b[Ff]amily\\b.*)|(.*/*.*\\b[Ff]amilies\\b.*)",
        "icon": "MiZUFamily",
        "for": "everything",
        "order": 26,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*\\b[Ee]vents?\\b.*)",
        "icon": "MiIcons8Flag500",
        "for": "everything",
        "order": 27,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*\\b[Cc]ountries\\b.*)|(.*/*.*\\b[Cc]ountry\\b.*)|(.*/*.*\\b[Nn]ations?\\b.*)",
        "icon": "RaCastleFlag",
        "for": "everything",
        "order": 28,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Oo]rganizations?\\b.*",
        "icon": "MiZUOrganization.01",
        "for": "everything",
        "order": 29,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Mm]ythology?\\b.*",
        "icon": "MiZLightningBolt.02",
        "for": "everything",
        "order": 30,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Mm]onsters?\\b.*",
        "icon": "RaSpiderFace",
        "for": "everything",
        "order": 31,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Ss]nippets?\\b.*",
        "icon": "RiScissorsFill",
        "for": "everything",
        "order": 32,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*\\b[Pp]lot?\\b.*)|(.*/*.*\\b[Pp]lotting?\\b.*)",
        "icon": "MiZPlotBlueprint.03",
        "for": "everything",
        "order": 33,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Dd]raft\\b.*",
        "icon": "MiZSceneClapperboard.04",
        "for": "files",
        "order": 34,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Dd]raft\\b.*",
        "icon": "MiZBKBook.01",
        "for": "folders",
        "order": 35,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Rr]esearch\\b.*",
        "icon": "MiZdFldFolder.05",
        "for": "folders",
        "order": 36,
        "useFilePath": false
      },
      {
        "rule": ".*/*.*\\b[Aa]uthors?\\b.*",
        "icon": "MiIcons8HarryPotter500",
        "for": "everything",
        "order": 37,
        "useFilePath": true
      },
      {
        "rule": ".*/*.*\\b[Pp]roject [Nn]otes?\\b.*",
        "icon": "MiZdFldFolder.07",
        "for": "folders",
        "order": 38,
        "useFilePath": true
      },
      {
        "rule": ".*\\.(pdf)$",
        "icon": "BoBxsFilePdf",
        "for": "everything",
        "order": 39,
        "useFilePath": true,
        "color": "#ffa3a3"
      },
      {
        "rule": ".*\\.(txt)$",
        "icon": "BoBxsFileTxt",
        "for": "everything",
        "order": 40,
        "useFilePath": true,
        "color": "#fedb9f"
      },
      {
        "rule": ".*\\.(xlsx|xls)$",
        "icon": "RiFileExcel2Fill",
        "for": "everything",
        "order": 41,
        "useFilePath": true,
        "color": "#7fe47c"
      },
      {
        "rule": ".*\\.(docx|doc)$",
        "icon": "BoBxsFileDoc",
        "for": "everything",
        "order": 42,
        "useFilePath": true,
        "color": "#cfccff"
      },
      {
        "rule": ".*\\.(ps1|py)$",
        "icon": "RiFileCodeFill",
        "for": "everything",
        "order": 43,
        "useFilePath": true,
        "color": "#e4b3ff"
      },
      {
        "rule": ".*\\.(md)$",
        "icon": "BoBxsFileMd",
        "for": "everything",
        "order": 44,
        "color": "#ffffff"
      },
      {
        "rule": ".*\\.(jpg|png|webp|gif|avif)$",
        "icon": "MiZPicLandscape.01",
        "for": "files",
        "order": 44,
        "useFilePath": true
      },
      {
        "rule": "09 Misc/09.2 Templates",
        "icon": "MiZPlotBlueprint.05",
        "for": "folders",
        "order": 45,
        "useFilePath": true
      },
      {
        "rule": "09 Misc/09.2 Templates",
        "icon": "MiZPlotBlueprint.02",
        "for": "files",
        "order": 46,
        "useFilePath": true
      },
      {
        "rule": "(.*/*.*\\b[Mm]isc\\b.*)|(.*/*.*\\b[Mm]iscellaneous?\\b.*)",
        "icon": "RaDiceThree",
        "for": "folders",
        "order": 47,
        "useFilePath": true
      }
    ],
    "extraMargin": {
      "top": -1,
      "right": 4,
      "bottom": 0,
      "left": 0
    },
    "iconInTabsEnabled": true,
    "iconsBackgroundCheckEnabled": false,
    "iconInTitleEnabled": false,
    "iconInFrontmatterEnabled": true,
    "iconsInNotesEnabled": true,
    "iconIdentifier": ":"
  },
  "05 Writing/10 Writing/Abbreviations/_aboutFolder_.md": "MiZdFldFolder.01",
  "04 How To/Obsidian/Plugins/Map View/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/10 Writing/Resources/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/10 Writing/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/11 Accents/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/12 Sayings/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/13 Words/Dictionary/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/14 Books and Stories/Excerpts/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/15 Bits/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/16 Elements/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/17 Philosophy/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/18 Religion/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/_aboutFolder_.md": "MiZdFldFolder.01",
  "05 Writing/05 Settings/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2024/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2023/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2021/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2020/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2019/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2018/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/03.08 Car Journal/2017/_aboutFolder_.md": "MiZdFldFolder.01",
  "03 Notes/Locations/_aboutFolder_.md": "MiZdFldFolder.01"
}

The following is info from the console you may find relevant.

Total plugin setup: 2,498ms
obsidian-linter: 285ms
obisidian-note-linker: 284ms
image-converter: 204ms
obsidian-map-view: 156ms
copilot: 150ms
cm-editor-syntax-highlight-obsidian: 97ms
better-word-count: 90ms
obsidian-folder-focus-mode: 85ms
obsidian-footnotes: 79ms
obsidian-google-lookup: 72ms
writing-goals: 61ms
obsidian-icon-folder: 59ms
text-extractor: 56ms
obsidian-tasks-plugin: 48ms
longform: 46ms
obsidian-admonition: 43ms
obsidian-pandoc: 43ms
obsidian-outliner: 43ms
obsidian-quiet-outline: 40ms
global-search-and-replace: 35ms
note-refactor-obsidian: 33ms
obsidian-hover-editor: 31ms
omnisearch: 31ms
obsidian-importer: 27ms
templater-obsidian: 26ms
obsidian-dictionary-plugin: 25ms
obsidian-style-settings: 22ms
obsidian-task-archiver: 22ms
footlinks: 20ms
obsidian-image-toolkit: 19ms
folder-notes: 18ms
various-complements: 17ms
obsidian-minimal-settings: 15ms
periodic-notes: 14ms
novel-word-count: 13ms
obsidian-advanced-uri: 13ms
obsidian-read-it-later: 12ms
tag-wrangler: 12ms
obsidian42-brat: 11ms
obsidian-trash-explorer: 10ms
cmdr: 9ms
obsidian-book-search-plugin: 8ms
calendar: 8ms
typewriter-mode: 8ms
search-on-internet: 7ms
obsidian-smart-typography: 7ms
customizable-page-header-buttons: 7ms
obsidian-auto-link-title: 7ms
obsidian-query-control: 7ms
quick-explorer: 6ms
obsidian-reading-time: 6ms
shortcuts-extender: 6ms
obsidian-hider: 6ms
url-into-selection: 6ms
lapel: 6ms
obsidian-file-info-plugin: 5ms
obsidian-sentence-navigator: 4ms
obsidian-glossary: 4ms
txt-as-md-obsidian: 3ms
settings-search: 3ms
obsidian-custom-attachment-location: 3ms
obsidian-copy-search-url: 3ms
hotkey-helper: 2ms
obsidian-fullscreen-plugin: 2ms
icon-pack-manager.ts:441 loaded icon pack mincho (533)
icon-pack-manager.ts:455 loaded icon pack boxicons (1634)
icon-pack-manager.ts:455 loaded icon pack font-awesome-brands (0)
icon-pack-manager.ts:455 loaded icon pack remix-icons (2537)
icon-pack-manager.ts:455 loaded icon pack rpg-awesome (495)

let me know if you need anything more specific.