Skip to content

Instantly share code, notes, and snippets.

@amno1
amno1 / Toolbar.el
Created May 17, 2021 10:10 — forked from rougier/Toolbar.el
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)
@amno1
amno1 / gist:b51897bb65e4d5fe8800e525c9536d1b
Created April 30, 2021 17:49
Programmatically add TODO labels in org-mode
(defun org-todo-per-file-keywords (kwds)
"Sets per file TODO labels. Takes as argument a list of strings to be used as
labels."
(let (alist)
(push "TODO" alist)
(dolist (kwd kwds)
(push kwd alist))
(setq alist (list (nreverse alist)))
;; TODO keywords.
(setq-local org-todo-kwd-alist nil)
@amno1
amno1 / open-with.el
Last active May 24, 2020 07:59
open-with.el hacked for my own taste ...
;;; openwith.el --- Open files with external programs -*- lexical-binding: t; -*-
;; <2020-04-10 fre> A. Miller
;; Hacked openwith to not be a minor mode.
;; The handler is now changed to be interactive function so it can be bound
;; to a key and invoked manually when desired instead of being a global handler.
;; Assumes invocation from a dired buffer, so the name is changed
;; to reflect the prefered use case.
;; Copyright (C) 2007 Markus Triska