This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*- | |
| ;; Copyright (c) 2025 Nicolas P. Rougier | |
| ;; Released under the GNU General Public License 3.0 | |
| ;; Author: Nicolas P. Rougier <nicolas.rougier@inria.fr> | |
| ;; URL: https://github.com/rougier/nano-emacs | |
| ;; This is NANO Emacs in 256 lines, without any dependency | |
| ;; Usage (command line): emacs -Q -l nano.el -[light|dark] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Nicolas .P Rougier emacs configuration - mini-frame configuration | |
| ;; --------------------------------------------------------------------- | |
| (require 'vertico) | |
| (require 'marginalia) | |
| (require 'mini-frame) | |
| (defun minibuffer-setup () | |
| ;; This prevents the header line to spill over second line | |
| (let ((inhibit-message t)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; hl-block.el --- Highlight logical block at point -*- lexical-binding: t -*- | |
| ;; Copyright (C) 2025 Nicolas P. Rougier | |
| ;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr> | |
| ;; Package-Requires: ((emacs "27.1")) | |
| ;; Keywords: convenience | |
| ;; This file is not part of GNU Emacs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Dual header line is possible by exploiting the tab-bar line that | |
| ;; sits on top of the header line and is generally hidden. For the | |
| ;; icon, it has to be precisely cut in top and bottom part and each | |
| ;; part is concatenated with either the tab-line or header-line. | |
| (defun dual-header (top bottom) | |
| "This installs a double line header in current buffer using both tab line (TOP) and header line (BOTTOM)." | |
| (set-face-attribute 'tab-line (selected-frame) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; nano-org-wip.el --- N Λ N O org mode -*- lexical-binding: t -*- | |
| ;; Copyright (C) 2024 Nicolas P. Rougier | |
| ;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr> | |
| ;; This file is not part of GNU Emacs. | |
| ;; This file 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; either version 3, or (at your option) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require 'org) | |
| (setq-default indent-tabs-mode nil) | |
| (setq org-display-inline-images t) | |
| (setq org-redisplay-inline-images t) | |
| (setq org-startup-with-inline-images "inlineimages") | |
| (setq default-frame-alist | |
| (append (list '(width . 72) '(height . 40)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require 'mu4e) | |
| (require 'mu4e-dashboard) | |
| (setq mu4e-sidebar-frame nil) | |
| (setq mu4e-sidebar-dashboard-file "~/.emacs.d/lisp/dashboard.org") | |
| (defun mu4e-sidebar-create (dashboard-file) | |
| (let ((width (frame-pixel-width)) | |
| (height (frame-pixel-height)) | |
| (frame (make-frame `((parent-frame . ,(window-frame)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; make-tab-box.el --- Box with tabs -*- lexical-binding: t -*- | |
| ;; Copyright (C) 2024 Nicolas P. Rougier | |
| ;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr> | |
| ;; Version: 0.1.0 | |
| ;; Package-Requires: ((emacs "27.1")) | |
| ;; Keywords: convenience | |
| ;; This file is not part of GNU Emacs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require 'tab-line) | |
| (require 'nano-theme) | |
| ;; Face for inactive tabs and when window not selected | |
| ;; (set-face-attribute 'mode-line nil | |
| ;; :foreground (face-foreground 'default) | |
| ;; :overline (face-foreground 'default) | |
| ;; :height (face-attribute 'default :height) | |
| ;; :box nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ----------------------------------------------------------------------------- | |
| # Copyright (c) 2016, Nicolas P. Rougier | |
| # Distributed under the (new) BSD License. | |
| # ----------------------------------------------------------------------------- | |
| import sys, math | |
| def progress(value, length=40, title = " ", vmin=0.0, vmax=1.0): | |
| """ | |
| Text progress bar |
NewerOlder