Add support for noether and modeline

This commit is contained in:
Sameer Rahmani 2024-04-05 20:54:36 +01:00
parent 581bc30a50
commit 23365a55cc
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
5 changed files with 177 additions and 46 deletions

View File

@ -21,6 +21,27 @@
"type": "github"
}
},
"emacs-overlay_2": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1707815184,
"narHash": "sha256-WFoDXgaPdhjgQB3ut+ZN+VT7e60Yw+KUyvUkOSu5Wto=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "0f7f3b39157419f3035a2dad39fbaf8a4ba0448d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "0f7f3b39157419f3035a2dad39fbaf8a4ba0448d",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -57,6 +78,42 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1707689078,
@ -89,6 +146,22 @@
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1707650010,
"narHash": "sha256-dOhphIA4MGrH4ElNCy/OlwmN24MsnEqFjRR6+RY7jZw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1707451808,
@ -105,11 +178,65 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1707689078,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1707451808,
"narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "442d407992384ed9c0e6d352de75b69079904e4e",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "442d407992384ed9c0e6d352de75b69079904e4e",
"type": "github"
}
},
"noether": {
"inputs": {
"emacs-overlay": "emacs-overlay_2",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1712346647,
"narHash": "sha256-flVg6BjO8umCjYpjRhCmvXeJxF7OoQ+bdh1ZZt2gvUM=",
"ref": "refs/heads/main",
"rev": "17e766cb320eea770ae169745d2e47bfbe80fdfe",
"revCount": 45,
"type": "git",
"url": "https://devheroes.codes/lxsameer/noether"
},
"original": {
"rev": "17e766cb320eea770ae169745d2e47bfbe80fdfe",
"type": "git",
"url": "https://devheroes.codes/lxsameer/noether"
}
},
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"noether": "noether"
}
},
"systems": {
@ -141,6 +268,36 @@
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@ -17,6 +17,7 @@
description = "FG42 - Emacs Editor for advance users";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/442d407992384ed9c0e6d352de75b69079904e4e";
inputs.noether.url = "git+https://devheroes.codes/lxsameer/noether?rev=17e766cb320eea770ae169745d2e47bfbe80fdfe";
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay/0f7f3b39157419f3035a2dad39fbaf8a4ba0448d";
inputs.flake-utils.url = "github:numtide/flake-utils";
@ -52,7 +53,9 @@
inherit elispDepsFile;
};
ourPackages = pkgs.callPackage ./nix/packages.nix {};
ourPackages = {
noether-mode = inputs.noether.outputs.packages.${system}.default;
};
fg42 = pkgs.callPackage ./nix/fg42.nix {
inherit elispPkgs ourPackages;

View File

@ -322,6 +322,8 @@ shipped with Emacs."
;; git changes in the fringe
(global-diff-hl-mode)
(noether-global-mode)
;; Rectangular select
(cua-selection-mode t)

View File

@ -28,6 +28,8 @@
(defvar fg42/modeline-views nil
"A list of Noether views to use for modeline.")
(defvar fg42/additional-views nil
"A list of Noether views to be added to the default views.")
(defface fg42/-disabled-modeline-active-border
'((t
@ -48,6 +50,7 @@
to Emacs modeline."
:if (display-graphic-p)
:after projectile
:config
;;(require 'noether)
(require 'noether-views)
@ -55,19 +58,17 @@ to Emacs modeline."
;; Disable the default modeline
(setq-default mode-line-format "")
(let ((face-remaps (default-value 'face-remapping-alist)))
(setf (alist-get 'mode-line face-remaps)
'fg42/-disabled-modeline-active-border
(alist-get 'mode-line-inactive face-remaps)
'fg42/-disabled-modeline-dective-border
(default-value 'face-remapping-alist) face-remaps))
(setf (alist-get 'mode-line face-remaps)
'fg42/-disabled-modeline-active-border
(alist-get 'mode-line-inactive face-remaps)
'fg42/-disabled-modeline-dective-border
(default-value 'face-remapping-alist) face-remaps))
(let ((vs (or fg42/modeline-views
(list
noether-minimal-mode-line
noether-minimal-location
noether-minimal-exwm))))
(setq noether-views vs)
(noether-global-mode)))
(setq-default noether-views (or fg42/modeline-views
(list
noether-minimal-mode-line
noether-minimal-location
noether-minimal-exwm))))
(provide 'fg42/modeline)
;;; modeline.el ends here

View File

@ -1,32 +0,0 @@
# Fg42 - Emacs Editor for advance users
#
# Copyright (c) 2010-2024 Sameer Rahmani <lxsameer@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{ lib, stdenv, emacsPackages, fetchFromGitea }:
{
noether-mode = emacsPackages.trivialBuild {
pname = "noether-mode";
version = "0.1.0";
buildInputs = [ emacsPackages.posframe ];
src = fetchFromGitea {
domain = "devheroes.codes";
owner = "lxsameer";
repo = "noether";
rev = "849712fa91f097c69b00b2ffc9165b4baa852ee6";
sha256 = "2ha/hiUZj+Ga1b9njhuoqV7QF2kCiocWtLQGPI3Yv58=";
};
};
}