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 / 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 / bibliography.org
Created December 29, 2021 14:29
Literate & annotated bibliography using NANO Emacs & orgmode

Unsorted

To Read

Neuroscience needs evolution [cite:@Cisek:2021] |PDF|

@article{Cisek:2021,
  title =        {Neuroscience needs evolution},
@rougier
rougier / drop-shadows.el
Last active December 2, 2021 06:23
Emacs drop shadows
(require 'xml)
(require 'svg)
(let* ((text "Hello world!")
(font (query-font (font-at (point-min))))
(font-size (elt font 2))
(family (face-attribute 'default :family))
(descent (elt font 4))
(ascent (elt font 5))
(svg-height (+ ascent descent))
@rougier
rougier / init-agenda.el
Created November 28, 2021 17:38
Org agenda with dynamics icons
(require 'svg-lib)
(defun org-agenda-custom-date ()
(interactive)
(let* ((timestamp (org-entry-get nil "TIMESTAMP"))
(timestamp (or timestamp (org-entry-get nil "DEADLINE"))))
(if timestamp
(let* ((timestamp (ts-parse-org timestamp))
(delta (/ (ts-diff timestamp (ts-now)) (* 24 60 60)))
(delta (/ (+ 1 delta) 30))
@rougier
rougier / mu4e-mockup.el
Created September 26, 2021 09:37
Emacs / Mu4e configuration for threaded view (with folding)
;; mu4e setup -*- lexical-binding: t; -*-
;; 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.
;;
;; This program is distributed in the hope that it will be useful, but
@rougier
rougier / mu4e-fast-folding.el
Last active October 10, 2022 18:23
Blazing fast mu4e thread folding
;; mu4e thread fast folding -*- lexical-binding: t; -*-
;; 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.
;;
;; This program is distributed in the hope that it will be useful, but
@rougier
rougier / style.css
Created June 23, 2021 10:00
Jupyter stylesheet
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400&family=Source+Code+Pro:wght@300;400&display=swap');
.rendered_html h1,
.rendered_html h2,
.rendered_html h3,
.rendered_html h4 {
color: #000099;
font-weight: 400;
}
@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 / Toolbar.el
Created November 30, 2020 12:05
Emacs SVG Toolbar
;; An experiment for an SVG toolbar using icons from material.io
;;
;; Example usage: (toolbar 48 "black" "white" t t)
;; Material icons freely available (Apache 2 license) from
;; - https://material.io/resources/icons/?style=outline
;; - https://github.com/google/material-design-icons
(require 'xml) (require 'svg)
(defun toobar-item (label icon fg-color bg-color size with-icon with-label)
@rougier
rougier / tag.el
Last active May 29, 2024 15:51
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,