From c0afbb94f192c29ef324a8550728db37f3420058 Mon Sep 17 00:00:00 2001 From: Emmet Date: Thu, 5 Oct 2023 14:57:44 -0500 Subject: [PATCH] Added org-side-tree, very useful! --- flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ user/app/doom-emacs/config.el | 11 +++++++++++ user/app/doom-emacs/doom.nix | 7 ++++++- user/app/doom-emacs/doom.org | 20 +++++++++++++++++++- 5 files changed, 58 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index fd309d4..385e613 100644 --- a/flake.lock +++ b/flake.lock @@ -573,6 +573,22 @@ "type": "github" } }, + "org-side-tree": { + "flake": false, + "locked": { + "lastModified": 1696520645, + "narHash": "sha256-ywuBB1/VYreMCy+8DMjJEU9YCzSKFLVBh3IDcW8od6k=", + "owner": "localauthor", + "repo": "org-side-tree", + "rev": "6933c186388304602344b83ceae77769f0673e63", + "type": "github" + }, + "original": { + "owner": "localauthor", + "repo": "org-side-tree", + "type": "github" + } + }, "org-yaap": { "flake": false, "locked": { @@ -663,6 +679,7 @@ "nix-doom-emacs": "nix-doom-emacs", "nixpkgs": "nixpkgs_2", "org-nursery": "org-nursery", + "org-side-tree": "org-side-tree", "org-yaap": "org-yaap", "phscroll": "phscroll", "rust-overlay": "rust-overlay", diff --git a/flake.nix b/flake.nix index 47f85d8..5440bd2 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,7 @@ inherit (inputs) eaf-browser; inherit (inputs) org-nursery; inherit (inputs) org-yaap; + inherit (inputs) org-side-tree; inherit (inputs) phscroll; inherit (inputs) hyprland-plugins; }; @@ -128,6 +129,10 @@ url = "gitlab:tygrdev/org-yaap"; flake = false; }; + org-side-tree = { + url = "github:localauthor/org-side-tree"; + flake = false; + }; phscroll = { url = "github:misohena/phscroll"; flake = false; diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index 02302df..6ab5236 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -289,6 +289,17 @@ (require 'org-phscroll)) (setq phscroll-calculate-in-pixels t) +;; Org side tree outline +(add-load-path! "~/.emacs.d/org-side-tree") +(require 'org-side-tree) +(setq org-side-tree-persistent nil) +(setq org-side-tree-fontify t) +(setq org-side-tree-enable-folding t) +(map! :leader + "O t" #'org-side-tree-toggle) +(map! :map org-side-tree-mode-map + "SPC" nil) + (require 'org-download) ;; Drag-and-drop to `dired` diff --git a/user/app/doom-emacs/doom.nix b/user/app/doom-emacs/doom.nix index a3df0ec..f8ace0c 100644 --- a/user/app/doom-emacs/doom.nix +++ b/user/app/doom-emacs/doom.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: +{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; @@ -75,6 +75,11 @@ in recursive = true; }; + home.file.".emacs.d/org-side-tree" = { + source = "${org-side-tree}"; + recursive = true; + }; + home.file.".emacs.d/eaf/app/browser" = { source = "${eaf-browser}"; recursive = true; diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 13802d9..bce70f3 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -358,8 +358,21 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu (require 'org-phscroll)) (setq phscroll-calculate-in-pixels t) +;; Org side tree outline +(add-load-path! "~/.emacs.d/org-side-tree") +(require 'org-side-tree) +(setq org-side-tree-persistent nil) +(setq org-side-tree-fontify t) +(setq org-side-tree-enable-folding t) +(map! :leader + "O t" #'org-side-tree-toggle) +(map! :map org-side-tree-mode-map + "SPC" nil) + #+END_SRC +#+RESULTS: + *** Org Download and Image Capture #+BEGIN_SRC emacs-lisp :tangle config.el (require 'org-download) @@ -1747,7 +1760,7 @@ Any git package can be configured for a particular commit or branch: * Nix Integration In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]]. #+BEGIN_SRC nix :tangle doom.nix -{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: +{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; @@ -1824,6 +1837,11 @@ in recursive = true; }; + home.file.".emacs.d/org-side-tree" = { + source = "${org-side-tree}"; + recursive = true; + }; + home.file.".emacs.d/eaf/app/browser" = { source = "${eaf-browser}"; recursive = true;