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
| (defun org-calendar-face (date) | |
| 'default) | |
| (defun org-calendar-generate-month (year month) | |
| (let* ((first (calendar-day-of-week (list month 1 year))) | |
| (first (+ (mod (+ (- first 1) 7) 7) 1)) ;; Week starts on Monday | |
| (last (+ first (calendar-last-day-of-month month year))) | |
| (days "")) | |
| (dotimes (row 6) | |
| (dotimes (col 7) |
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
| ;;; init-mastodon.el --- Mastodon layout mockup -*- lexical-binding: t -*- | |
| ;; Copyright (C) 2022 Nicolas P. Rougier | |
| ;; 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) | |
| ;; any later version. |
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
| ;;; init-mastodon.el --- Mastodon layout mockup -*- lexical-binding: t -*- | |
| ;; Copyright (C) 2022 Nicolas P. Rougier | |
| ;; 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) | |
| ;; any later version. |
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
| (defface quick-command-face | |
| `((t :foreground ,(face-foreground 'default) | |
| :background ,(face-background 'highlight nil t) | |
| :height ,(face-attribute 'default :height) | |
| :box '(:line-width (1 . 1) | |
| :color ,(face-foreground 'default) | |
| :style none))) | |
| "Face for quick command") |
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
| ;; Open scratch buffer, evalute code below and drag and drop some files onto the scratch buffer. | |
| ;; Code by Ivan Tadeu Ferreira Antunes Filho | |
| ;; https://ivanaf.com/emacs_drag-drop_pdfs_paste_html_custom_templates.html | |
| (defun scratch--file-insert (uri) | |
| (message "%s" uri)) | |
| (defun scratch--file-dnd-fallback (uri action) | |
| (let ((dnd-protocol-alist | |
| (rassq-delete-all 'scratch--file-dnd-protocol |
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 '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)) |
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 '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)) |
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
| ;; 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 |
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
| ;; 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 |