Skip to content

Instantly share code, notes, and snippets.

View rougier's full-sized avatar
:octocat:

Nicolas P. Rougier rougier

:octocat:
View GitHub Profile
@rougier
rougier / tag.el
Last active March 11, 2024 05:33
Rounded boxed tags for Emacs
;; ---------------------------------------------------------------------
;; Tag minor mode
;; Copyright (C) 2020 Nicolas .P Rougier
;;
;; 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, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
@rougier
rougier / nano-minibuffer.el
Created March 25, 2022 09:54
Minibuffer frame for Nano Emacs
;; 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))
@rougier
rougier / init-tab-line.el
Created February 17, 2024 13:16
Tab line styling for emacs
(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)
@rougier
rougier / nano-font-stack.org
Created February 1, 2022 16:49
NΛNO Emacs font stack

NΛNO Emacs font stack

  • Default font: Roboto Mono , 14pt, Light
  • Italic font: Victor Mono , 14pt, Semilight
  • Bold font: Roboto Mono , 14pt, Regular
  • Unicode font: Inconsolata , 16pt, Light
  • Icon font: Roboto Mono Nerd , 12pt, Light

Text excerpt using a gorgeous and true italic font (Victor Mono), chosen to really stand out from the default font (Roboto Mono).

@rougier
rougier / agenda.py
Last active December 14, 2023 19:47
org-mode agenda calendar in the terminal
#!/usr/bin/env python3
# Copyright 2020 Nicolas P. Rougier - BSD License
#
# from reading org-mode emacs files, display a formated calendar in the
# terminal showing holidays and busy days and upcomiing events.
import holidays # https://pypi.org/project/holidays/
import calendar
import datetime
import orgparse # https://pypi.org/project/orgparse
@rougier
rougier / mu4e-side-dashboard.el
Created May 11, 2021 17:19
Mu4e side dashboard
(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))
@rougier
rougier / fractal-dimension.py
Last active October 18, 2023 12:37
Fractal dimension computing
# -----------------------------------------------------------------------------
# From https://en.wikipedia.org/wiki/Minkowski–Bouligand_dimension:
#
# In fractal geometry, the Minkowski–Bouligand dimension, also known as
# Minkowski dimension or box-counting dimension, is a way of determining the
# fractal dimension of a set S in a Euclidean space Rn, or more generally in a
# metric space (X, d).
# -----------------------------------------------------------------------------
import scipy.misc
import numpy as np
@rougier
rougier / echo-line.el
Created August 11, 2020 10:58
An extension of the echo area to display static messages (emacs)
;; -------------------------------------------------------------------
;; An extension of the echo area to display static messages
;; Copyright 2020 Nicolas P. Rougier
;; -------------------------------------------------------------------
;; This file is not part of GNU Emacs.
;;
;; 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, either version 3 of the
;; License, or (at your option) any later version.
@rougier
rougier / imshow-3d.py
Last active August 27, 2023 08:22
Matplotlib 3D imshow
# Copyright 2023 Nicolas P. Rougier - BSD 2 Clauses licence
# This is an example of 3D projected images with matplotlib using imshow
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from matplotlib.path import Path
from mpl_toolkits.mplot3d import proj3d
from matplotlib.patches import PathPatch
import matplotlib.transforms as mtransforms
@rougier
rougier / nano-agenda.el
Created July 17, 2023 17:33
NANO Agenda
;;; nano-agenda.el --- N Λ N O agenda -*- lexical-binding: t -*-
;; Copyright (C) 2021-2023 Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; URL: https://github.com/rougier/nano-agenda
;; Version: 0.4.0
;; Package-Requires: ((emacs "27.1"))
;; Keywords: applications, org-mode, org-agenda