Add the support for org-mode
This commit is contained in:
parent
4966e99079
commit
722a020352
12
flake.lock
12
flake.lock
|
@ -253,16 +253,16 @@
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712846008,
|
"lastModified": 1713211987,
|
||||||
"narHash": "sha256-0739q1QSpprLrlqdmQeSM9ynqmuqHagmRLnyMEy47Xc=",
|
"narHash": "sha256-0Yx5n40Q6BymSRDxv4Bq/JRoXuDD4VJ/fTw2A55UbK8=",
|
||||||
"ref": "refs/tags/v0.1.8",
|
"ref": "refs/tags/v0.1.9",
|
||||||
"rev": "e53688bcc79e5e3142bb2c912d59965c086dafe4",
|
"rev": "f10112787fdf3e68b9dccf233c49d37b9e4b7d08",
|
||||||
"revCount": 49,
|
"revCount": 50,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://devheroes.codes/lxsameer/noether"
|
"url": "https://devheroes.codes/lxsameer/noether"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"ref": "refs/tags/v0.1.8",
|
"ref": "refs/tags/v0.1.9",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://devheroes.codes/lxsameer/noether"
|
"url": "https://devheroes.codes/lxsameer/noether"
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
description = "FG42 - Emacs Editor for advance users";
|
description = "FG42 - Emacs Editor for advance users";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/442d407992384ed9c0e6d352de75b69079904e4e";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/442d407992384ed9c0e6d352de75b69079904e4e";
|
||||||
inputs.noether.url = "git+https://devheroes.codes/lxsameer/noether?ref=refs/tags/v0.1.8";
|
inputs.noether.url = "git+https://devheroes.codes/lxsameer/noether?ref=refs/tags/v0.1.9";
|
||||||
|
|
||||||
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay/0f7f3b39157419f3035a2dad39fbaf8a4ba0448d";
|
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay/0f7f3b39157419f3035a2dad39fbaf8a4ba0448d";
|
||||||
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
@ -50,9 +50,10 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
#noether = inputs.noether.outputs.packages.${system}.default;
|
|
||||||
fg42 = pkgs.callPackage ./nix/fg42 {
|
fg42 = pkgs.callPackage ./nix/fg42 {
|
||||||
#extraModules = inputs.noether.outputs.fg42Modules.default;
|
extraPackages = {
|
||||||
|
noether = inputs.noether.outputs.packages.${system}.default;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
run-test-wm = pkgs.writeShellApplication {
|
run-test-wm = pkgs.writeShellApplication {
|
||||||
|
|
|
@ -80,6 +80,10 @@
|
||||||
(defvar build-state '()
|
(defvar build-state '()
|
||||||
"A list of expressions that will dump in the output at the end.")
|
"A list of expressions that will dump in the output at the end.")
|
||||||
|
|
||||||
|
(defvar vars ())
|
||||||
|
(defvar requires ())
|
||||||
|
|
||||||
|
|
||||||
(defvar build-output (cadr command-line-args-left))
|
(defvar build-output (cadr command-line-args-left))
|
||||||
|
|
||||||
;;; Build related stuff
|
;;; Build related stuff
|
||||||
|
@ -98,14 +102,14 @@
|
||||||
"Generate a list of `require' forms of ELISP-PKGS for compile time."
|
"Generate a list of `require' forms of ELISP-PKGS for compile time."
|
||||||
(when (> (length elisp-pkgs) 0)
|
(when (> (length elisp-pkgs) 0)
|
||||||
(add-to-list
|
(add-to-list
|
||||||
'build-state
|
'requires
|
||||||
`(eval-when-compile
|
`(eval-when-compile
|
||||||
,@(mapcar (lambda (pkg) `(require ',(intern pkg))) elisp-pkgs)))))
|
,@(mapcar (lambda (pkg) `(require ',(intern pkg))) elisp-pkgs)))))
|
||||||
|
|
||||||
|
|
||||||
(defun generate-generic-vars (k v doc)
|
(defun generate-generic-vars (k v doc)
|
||||||
"Generate a list of vars for K and value V with docstring DOC."
|
"Generate a list of vars for K and value V with docstring DOC."
|
||||||
(add-to-list 'build-state `(defvar ,(intern (format "fg42/config/%s" k)) ,v ,doc)))
|
(add-to-list 'vars `(defvar ,(intern (format "fg42/config/%s" k)) ,v ,doc)))
|
||||||
|
|
||||||
|
|
||||||
(defun fg42-config-key-handler (config)
|
(defun fg42-config-key-handler (config)
|
||||||
|
@ -146,7 +150,10 @@ CONFIG maps to the collective `config' value of Nix modules."
|
||||||
(maphash #'handle-top-level j)
|
(maphash #'handle-top-level j)
|
||||||
(with-temp-file build-output
|
(with-temp-file build-output
|
||||||
(insert file-header)
|
(insert file-header)
|
||||||
(mapc (lambda (x) (print x (current-buffer))) build-state)
|
(insert ";; Vars ======")
|
||||||
|
(mapc (lambda (x) (print x (current-buffer))) vars)
|
||||||
|
(insert ";; Requires ======")
|
||||||
|
(mapc (lambda (x) (print x (current-buffer))) requires)
|
||||||
(insert file-footer))
|
(insert file-footer))
|
||||||
(message "[build.el]: Done!"))
|
(message "[build.el]: Done!"))
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,12 @@
|
||||||
# This is the home manager module that exposes FG42. It differs
|
# This is the home manager module that exposes FG42. It differs
|
||||||
# from FG42 modules that are structurally the same but used in
|
# from FG42 modules that are structurally the same but used in
|
||||||
# different context
|
# different context
|
||||||
{ pkgs, lib ? pkgs.lib, modules ? null, extraModules ? [ ] }:
|
{ pkgs
|
||||||
|
, lib ? pkgs.lib
|
||||||
|
, modules ? null
|
||||||
|
, extraModules ? [ ]
|
||||||
|
, extraPackages ? { }
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
fg42Modules =
|
fg42Modules =
|
||||||
if modules != null
|
if modules != null
|
||||||
|
@ -36,6 +41,7 @@ let
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit utils;
|
inherit utils;
|
||||||
inherit (utils) makeFG42Drv;
|
inherit (utils) makeFG42Drv;
|
||||||
|
inherit extraPackages;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# different context
|
# different context
|
||||||
|
|
||||||
# A list of default FG42 modules to build FG42 with.
|
# A list of default FG42 modules to build FG42 with.
|
||||||
{ lib, config, pkgs, makeFG42Drv, ... }:
|
{ lib, config, pkgs, makeFG42Drv, extraPackages, ... }:
|
||||||
let
|
let
|
||||||
deps =
|
deps =
|
||||||
(with pkgs.emacsPackages; [
|
(with pkgs.emacsPackages; [
|
||||||
|
@ -42,17 +42,23 @@ let
|
||||||
vertico
|
vertico
|
||||||
orderless
|
orderless
|
||||||
ctrlf
|
ctrlf
|
||||||
|
consult
|
||||||
marginalia
|
marginalia
|
||||||
magit
|
magit
|
||||||
forge
|
forge
|
||||||
diff-hl
|
diff-hl
|
||||||
svg-tag-mode
|
svg-tag-mode
|
||||||
all-the-icons
|
all-the-icons
|
||||||
|
org
|
||||||
|
org-super-agenda
|
||||||
|
org-ql
|
||||||
|
org-modern
|
||||||
base16-theme
|
base16-theme
|
||||||
] ++ lib.optionals (config.fg42.emojify) [
|
] ++ lib.optionals (config.fg42.emojify) [
|
||||||
emojify
|
emojify
|
||||||
] ++ lib.optionals (config.fg42.modeline == "noether") [
|
] ++ lib.optionals (config.fg42.modeline == "noether") [
|
||||||
noether
|
posframe
|
||||||
|
extraPackages.noether
|
||||||
]);
|
]);
|
||||||
|
|
||||||
drv = makeFG42Drv {
|
drv = makeFG42Drv {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
(defmacro with-config (name &rest body)
|
(defmacro with-config (name &rest body)
|
||||||
"Run the BODY only if the config NAME is set to t."
|
"Run the BODY only if the config NAME is set to t."
|
||||||
(declare (indent defun))
|
(declare (indent defun))
|
||||||
`(when (fg42/config-get-or ,name)
|
`(when (string= (format "%s" (fg42/config-get-or ,name "")) "t")
|
||||||
,@body))
|
,@body))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
(require 'fg42/git)
|
(require 'fg42/git)
|
||||||
;; (require 'fg42/wm)
|
;; (require 'fg42/wm)
|
||||||
(require 'fg42/org)
|
(require 'fg42/organize)
|
||||||
(require 'fg42/minibuffer)
|
(require 'fg42/minibuffer)
|
||||||
(require 'fg42/graphics)
|
(require 'fg42/graphics)
|
||||||
(require 'fg42/modeline))
|
(require 'fg42/modeline))
|
||||||
|
|
|
@ -55,6 +55,7 @@ to Emacs modeline."
|
||||||
:if (display-graphic-p)
|
:if (display-graphic-p)
|
||||||
;;:after projectile
|
;;:after projectile
|
||||||
:commands noether-global-mode
|
:commands noether-global-mode
|
||||||
|
:hook (emacs-startup . noether-global-mode)
|
||||||
:config
|
:config
|
||||||
(require 'noether-views)
|
(require 'noether-views)
|
||||||
(require 'fg42/modeline/views)
|
(require 'fg42/modeline/views)
|
||||||
|
@ -79,5 +80,6 @@ to Emacs modeline."
|
||||||
(when-wm
|
(when-wm
|
||||||
(setq-default noether-views nil)))
|
(setq-default noether-views nil)))
|
||||||
|
|
||||||
(provide 'fg42/modeline-noether.el)
|
|
||||||
|
(provide 'fg42/modeline-noether)
|
||||||
;;; modeline-noether.el ends here
|
;;; modeline-noether.el ends here
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
(require 'fg42/utils)
|
(require 'fg42/utils)
|
||||||
|
|
||||||
|
|
||||||
(if (string= (fg42/config-get-or modeline "") "noether")
|
(if (string= (fg42/config-get-or modeline "") "noether")
|
||||||
(require 'fg42/modeline-noether)
|
(require 'fg42/modeline-noether)
|
||||||
(progn
|
(progn
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'fpkg))
|
(require 'fpkg))
|
||||||
|
|
||||||
|
|
||||||
(defvar fg42/org-super-agenda-groups nil)
|
(defvar fg42/org-super-agenda-groups nil)
|
||||||
|
|
||||||
(defvar fg42/org-home "~/.orgs"
|
(defvar fg42/org-home "~/.orgs"
|
||||||
|
@ -153,5 +154,5 @@ For more info on ~org-mode~ check out `https://orgmode.org/'"
|
||||||
(org-agenda-finalize . org-modern-mode)))
|
(org-agenda-finalize . org-modern-mode)))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/org)
|
(provide 'fg42/organize)
|
||||||
;;; org.el ends here
|
;;; organize.el ends here
|
Loading…
Reference in New Issue