Added org-timeblock for agenda visualization

This commit is contained in:
Emmet 2023-10-12 20:49:37 -05:00
parent 4a478d8298
commit 8f093cf3cd
6 changed files with 89 additions and 3 deletions

View file

@ -589,6 +589,22 @@
"type": "github"
}
},
"org-timeblock": {
"flake": false,
"locked": {
"lastModified": 1696926758,
"narHash": "sha256-EtFnMyXoZN+BRzPcHzqJ53q94xY/WwmnB25dENju3IY=",
"owner": "ichernyshovvv",
"repo": "org-timeblock",
"rev": "0c7bd445800569a87eff5284ceef1ebcf13f281b",
"type": "github"
},
"original": {
"owner": "ichernyshovvv",
"repo": "org-timeblock",
"type": "github"
}
},
"org-yaap": {
"flake": false,
"locked": {
@ -680,6 +696,7 @@
"nixpkgs": "nixpkgs_2",
"org-nursery": "org-nursery",
"org-side-tree": "org-side-tree",
"org-timeblock": "org-timeblock",
"org-yaap": "org-yaap",
"phscroll": "phscroll",
"rust-overlay": "rust-overlay",

View file

@ -1,7 +1,7 @@
{
description = "Flake of LibrePhoenix";
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, org-nursery, org-yaap, phscroll, blocklist-hosts, rust-overlay, hyprland-plugins, ... }@inputs:
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, org-nursery, org-yaap, org-timeblock, phscroll, blocklist-hosts, rust-overlay, hyprland-plugins, ... }@inputs:
let
# ---- SYSTEM SETTINGS ---- #
system = "x86_64-linux"; # system arch
@ -79,6 +79,7 @@
inherit (inputs) org-nursery;
inherit (inputs) org-yaap;
inherit (inputs) org-side-tree;
inherit (inputs) org-timeblock;
inherit (inputs) phscroll;
inherit (inputs) hyprland-plugins;
};
@ -133,6 +134,10 @@
url = "github:localauthor/org-side-tree";
flake = false;
};
org-timeblock = {
url = "github:ichernyshovvv/org-timeblock";
flake = false;
};
phscroll = {
url = "github:misohena/phscroll";
flake = false;

View file

@ -1045,6 +1045,25 @@ tasks."
(setq org-yaap-daemon-idle-time 30)
(org-yaap-mode 1)
(add-load-path! "~/.emacs.d/org-timeblock")
(require 'org-timeblock)
(map! :leader :desc "Open org timeblock"
"O c" 'org-timeblock)
(map! :desc "Next day"
:map org-timeblock-mode-map
:nvmeg "l" 'org-timeblock-day-later)
(map! :desc "Previous day"
:map org-timeblock-mode-map
:nvmeg "h" 'org-timeblock-day-earlier)
(map! :desc "Schedule event"
:map org-timeblock-mode-map
:nvmeg "m" 'org-timeblock-schedule)
(map! :desc "Event duration"
:map org-timeblock-mode-map
:nvmeg "d" 'org-timeblock-set-duration)
;;;------ magit configuration ------;;;
;; Need the following two blocks to make magit work with git bare repos

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }:
{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, org-timeblock, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }:
let
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt"));
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
@ -80,6 +80,11 @@ in
recursive = true;
};
home.file.".emacs.d/org-timeblock" = {
source = "${org-timeblock}";
recursive = true;
};
home.file.".emacs.d/eaf/app/browser" = {
source = "${eaf-browser}";
recursive = true;
@ -90,17 +95,21 @@ in
popd;
";
};
home.file.".emacs.d/org-nursery" = {
source = "${org-nursery}";
};
home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo;
home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = {
source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh;
executable = true;
};
home.file.".emacs.d/phscroll" = {
source = "${phscroll}";
};
home.file.".emacs.d/system-vars.el".text = ''
;;; ~/.emacs.d/config.el -*- lexical-binding: t; -*-

View file

@ -1208,6 +1208,28 @@ On Wayland, EAF doesn't work.
(setq org-yaap-daemon-idle-time 30)
(org-yaap-mode 1)
#+END_SRC
*** Org Timeblock
#+begin_src emacs-lisp :tangle config.el
(add-load-path! "~/.emacs.d/org-timeblock")
(require 'org-timeblock)
(map! :leader :desc "Open org timeblock"
"O c" 'org-timeblock)
(map! :desc "Next day"
:map org-timeblock-mode-map
:nvmeg "l" 'org-timeblock-day-later)
(map! :desc "Previous day"
:map org-timeblock-mode-map
:nvmeg "h" 'org-timeblock-day-earlier)
(map! :desc "Schedule event"
:map org-timeblock-mode-map
:nvmeg "m" 'org-timeblock-schedule)
(map! :desc "Event duration"
:map org-timeblock-mode-map
:nvmeg "d" 'org-timeblock-set-duration)
#+end_src
** Magit Configuration
#+BEGIN_SRC emacs-lisp :tangle config.el
;;;------ magit configuration ------;;;
@ -1532,6 +1554,7 @@ EAF doesn't work on Wayland :(
(elfeed-update))
(map! :map 'elfeed-search-mode-map :desc "Update elfeed" :n "g R" #'elfeed-full-update)
#+END_SRC
* My init.el
This section is the [[./init.el][init.el]] section, which controls which Doom modules are loaded.
@ -1765,11 +1788,13 @@ Any git package can be configured for a particular commit or branch:
(package! elfeed)
(package! elfeed-protocol)
(package! docker-tramp :disable t)
(package! org-ql)
(package! persist)
#+END_SRC
* 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, org-side-tree, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }:
{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, org-timeblock, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }:
let
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt"));
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
@ -1851,6 +1876,11 @@ in
recursive = true;
};
home.file.".emacs.d/org-timeblock" = {
source = "${org-timeblock}";
recursive = true;
};
home.file.".emacs.d/eaf/app/browser" = {
source = "${eaf-browser}";
recursive = true;
@ -1861,17 +1891,21 @@ in
popd;
";
};
home.file.".emacs.d/org-nursery" = {
source = "${org-nursery}";
};
home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo;
home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = {
source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh;
executable = true;
};
home.file.".emacs.d/phscroll" = {
source = "${phscroll}";
};
home.file.".emacs.d/system-vars.el".text = ''
;;; ~/.emacs.d/config.el -*- lexical-binding: t; -*-

View file

@ -25,3 +25,5 @@
(package! elfeed)
(package! elfeed-protocol)
(package! docker-tramp :disable t)
(package! org-ql)
(package! persist)