Skip to content

Instantly share code, notes, and snippets.

@PurpleBooth
PurpleBooth / README-Template.md
Last active July 18, 2024 23:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@FrancisMurillo
FrancisMurillo / 2017-01-11 - w3m-vlc.el
Created January 10, 2017 14:18
2017-01-11 - w3m with vlc
(defcustom fn/w3m-video-executable "vlc"
"The executable that can run a network video stream.")
(defcustom fn/w3m-video-args
(list
;; This skews how the process is managed for vlc
;; "--one-instance"
;; "--play-and-exit"
)
"Extra arguments to run `fn/w3m-video-executable'")
@bsless
bsless / yt-mpv.el
Created February 5, 2019 10:58
Opening YouTube Links In MPV from Emacs
(defun mpv-play-url (url &rest args)
""
(interactive)
(start-process "mpv" nil "mpv" url))
(setq browse-url-browser-function
(quote
(("youtu\\.?be" . mpv-play-url)
("." . eww-browse-url))))
@kepi
kepi / org-archive-subtree-hierarchical.el
Last active June 23, 2024 09:34
Hierarchical archiving for Org-mode
;; org-archive-subtree-hierarchical.el
;;
;; version 0.2
;; modified from https://lists.gnu.org/archive/html/emacs-orgmode/2014-08/msg00109.html
;; modified from https://stackoverflow.com/a/35475878/259187
;; In orgmode
;; * A
;; ** AA
;; *** AAA
@progfolio
progfolio / Emacs-as-an-Org-capture-server.org
Last active April 3, 2024 16:02
Emacs as an Org capture server

Emacs as an Org capture server

The Concept

The general idea is to run an Emacs server as a daemon which clients can quickly connect to via a bash script. The client executes org-capture and the frame closes upon finalizing or aborting the capture.

Running a server daemon

The first step is to get an Emacs daemon running as a server with your name of choice. For this example, I’m going to use “capture” as the server name.

@mlabbe
mlabbe / i3_config
Created April 30, 2020 18:12
Run Emacsclient on i3wm scratchpad workspace
# launch scratchpad frame in existing emacs daemon
exec --no-startup-id /usr/local/bin/pad.sh
# when scratchpad frame is launched, move it to the scratchpad workspace
for_window [title="_emacs scratchpad_" class="Emacs"] move scratchpad
@jn64
jn64 / ncmpcpp_notify.sh
Created May 19, 2020 12:40
ncmpcpp notifications with album art
#!/bin/bash
# Send notification with album art when ncmpcpp plays a new song
# execute_on_song_change must be set in ncmpcpp config
readonly MUSIC_DIR="${HOME}/Music/Library"
readonly SONG_PATH="$(mpc --format '%file%' current)"
readonly SONG_DIR="$(dirname "${SONG_PATH}")"
readonly ALBUM_ART_PATH="${MUSIC_DIR}/${SONG_DIR}/cover.jpg"
;;; Patching Citar
;; Prerequisites
(require 'org)
(require 'ol-bibtex)
(require 'citeproc-bibtex)
(require 'citar)
;; Make org-bibtex work with biblatex fields, not needed for BibTeX
(setq org-bibtex-export-arbitrary-fields t