diff --git a/SwarselSystems.org b/SwarselSystems.org index f5e95c2..3d1bd75 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -14530,142 +14530,155 @@ This service changes the screen hue at night. I am not sure if that really does #+begin_src nix-ts :tangle modules/home/common/obsidian.nix { lib, config, pkgs, nixosConfig ? config, ... }: - let - moduleName = "obsidian"; - inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters; - name = "Main"; - in - { - options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} with settings"; - config = lib.mkIf config.swarselmodules.${moduleName} { + let + moduleName = "obsidian"; + inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters; + name = "Main"; + in + { + options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} with settings"; + config = lib.mkIf config.swarselmodules.${moduleName} { - home.file = { - "${config.programs.obsidian.vaults.${name}.target}/.obsidian/app.json".force = true; - "${config.programs.obsidian.vaults.${name}.target}/.obsidian/appearance.json".force = true; - "${config.programs.obsidian.vaults.${name}.target}/.obsidian/core-plugins.json".force = true; - }; + home.file = { + "${config.programs.obsidian.vaults.${name}.target}/.obsidian/app.json".force = true; + "${config.programs.obsidian.vaults.${name}.target}/.obsidian/appearance.json".force = true; + "${config.programs.obsidian.vaults.${name}.target}/.obsidian/core-plugins.json".force = true; + }; - programs.obsidian = - { - enable = true; - package = pkgs.obsidian; - defaultSettings = { - app = { - attachmentFolderPath = "attachments"; - alwaysUpdateLinks = true; - spellcheck = false; - inherit userIgnoreFilters; - vimMode = false; - newFileLocation = "current"; - }; - corePlugins = [ - "backlink" - "bookmarks" - "canvas" - "command-palette" - "daily-notes" - "editor-status" - "file-explorer" - "file-recovery" - "global-search" - "graph" - "note-composer" - "outgoing-link" - "outline" - "page-preview" - "properties" - "slides" - "switcher" - "tag-pane" - "templates" - "word-count" - ]; - communityPlugins = with pkgs.swarsel-nix; [ - advanced-tables - calendar - file-hider - linter - omnisearch - sort-and-permute-lines - tag-wrangler - tray - ]; + programs.obsidian = + { + enable = true; + package = pkgs.obsidian; + defaultSettings = { + app = { + attachmentFolderPath = "attachments"; + alwaysUpdateLinks = true; + spellcheck = false; + inherit userIgnoreFilters; + vimMode = false; + newFileLocation = "current"; }; - vaults = { - ${name} = { - target = "./Obsidian/${name}"; - settings = { - appearance = { - baseFontSize = lib.mkForce 19; - }; - communityPlugins = with pkgs.swarsel-nix; [ - { - pkg = advanced-tables; - enable = true; - } - { - pkg = calendar; - enable = true; - } - { - pkg = sort-and-permute-lines; - enable = true; - } - { - pkg = tag-wrangler; - enable = true; - } - { - pkg = tray; - enable = true; - settings = { - launchOnStartup = false; - hideOnLaunch = true; - runInBackground = true; - hideTaskbarIcon = false; - createTrayIcon = true; - }; - } - { - pkg = file-hider; - enable = true; - settings = - { - hidden = true; - hiddenList = [ - "attachments" - "images" - "ltximg" - "logseq" - ]; - }; - } - { - pkg = linter; - enable = true; - settings = { - auto-correct-common-misspellings = { - skip-words-with-multiple-capitals = true; - }; - convert-bullet-list-markers = { - enabled = true; - }; - }; - } - { - pkg = omnisearch; - enable = true; - settings = { - hideExcluded = true; - }; - } + hotkeys = { + "graph:open" = [ ]; + "omnisearch:show-modal" = [ + { + modifiers = [ + "Mod" ]; + key = "S"; + } + ]; + "editor:save-file" = [ ]; + "editor:delete-paragraph" = [ ]; + }; + corePlugins = [ + "backlink" + "bookmarks" + "canvas" + "command-palette" + "daily-notes" + "editor-status" + "file-explorer" + "file-recovery" + "global-search" + "graph" + "note-composer" + "outgoing-link" + "outline" + "page-preview" + "properties" + "slides" + "switcher" + "tag-pane" + "templates" + "word-count" + ]; + communityPlugins = with pkgs.swarsel-nix; [ + advanced-tables + calendar + file-hider + linter + omnisearch + sort-and-permute-lines + tag-wrangler + tray + ]; + }; + vaults = { + ${name} = { + target = "./Obsidian/${name}"; + settings = { + appearance = { + baseFontSize = lib.mkForce 19; }; + communityPlugins = with pkgs.swarsel-nix; [ + { + pkg = advanced-tables; + enable = true; + } + { + pkg = calendar; + enable = true; + } + { + pkg = sort-and-permute-lines; + enable = true; + } + { + pkg = tag-wrangler; + enable = true; + } + { + pkg = tray; + enable = true; + settings = { + launchOnStartup = false; + hideOnLaunch = true; + runInBackground = true; + hideTaskbarIcon = false; + createTrayIcon = true; + }; + } + { + pkg = file-hider; + enable = true; + settings = + { + hidden = true; + hiddenList = [ + "attachments" + "images" + "ltximg" + "logseq" + ]; + }; + } + { + pkg = linter; + enable = true; + settings = { + auto-correct-common-misspellings = { + skip-words-with-multiple-capitals = true; + }; + convert-bullet-list-markers = { + enabled = true; + }; + }; + } + { + pkg = omnisearch; + enable = true; + settings = { + hideExcluded = true; + }; + } + ]; }; }; }; - }; - } + }; + }; + } #+end_src **** Anki diff --git a/modules/home/common/obsidian.nix b/modules/home/common/obsidian.nix index 0e2e7f4..4baa813 100644 --- a/modules/home/common/obsidian.nix +++ b/modules/home/common/obsidian.nix @@ -27,6 +27,19 @@ in vimMode = false; newFileLocation = "current"; }; + hotkeys = { + "graph:open" = [ ]; + "omnisearch:show-modal" = [ + { + modifiers = [ + "Mod" + ]; + key = "S"; + } + ]; + "editor:save-file" = [ ]; + "editor:delete-paragraph" = [ ]; + }; corePlugins = [ "backlink" "bookmarks"