This file contains 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
(defparameter *org-clock-current-task* "[N/A]") | |
(defparameter *dropbox-current-status* "[Dropbox current status here]") | |
;;; (...) | |
(defun current-dropbox () | |
;; TODO colors | |
(first-line-only (run-external-program "dropbox" '("status")))) | |
;;; mode line | |
(setf *mode-line-timeout* 1) |
This file contains 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
(defvar my/file-server nil "Is the file server running? Holds an instance if so.") | |
(defalias 'my/send-directory-list 'ws-send-directory-list) | |
(defun my/ws-start (handlers port &optional log-buffer &rest network-args) | |
"Like `ws-start', but unbroken for Emacs 25+." | |
(let ((server (make-instance 'ws-server :handlers handlers :port port)) | |
(log (when log-buffer (get-buffer-create log-buffer)))) | |
(setf (process server) | |
(apply |
This file contains 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
(defhydra hydra-host-os (:color teal :hint nil) | |
" | |
^Shell^ ^Other^ | |
^^^^-------------------------------------- | |
_e_: eshell _q_: quit | |
_E_: eshell here | |
_s_: shell command | |
_S_: shell command on region | |
_a_: async shell command |
This file contains 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
(define-key *top-map* (kbd "s-f") "fselect") ; for faster access to select frame by number | |
;;; This is like fnext, but restricted to current head only. | |
(defun focus-next-frame-on-current-head (group) | |
"Focus next frame, limited to current head." | |
(let ((current-head (group-current-head group))) | |
(focus-frame-after group | |
(remove-if-not (lambda (frame) | |
(eql (frame-head group frame) | |
current-head)) |
This file contains 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
;;; Remember to set `slime-enable-evaluate-in-emacs' to t in Emacs. | |
;;; Also remember that it basically allows your Lisp to execute any code in your Emacs. | |
(defmacro with-output-to-emacs-buffer ((stream buffer-name) &body body) | |
`(let ((results (with-output-to-string (,stream) | |
,@body))) | |
(swank:eval-in-emacs `(with-current-buffer (get-buffer-create ,,buffer-name) | |
(erase-buffer) | |
(insert ,results))))) | |
;;; Use example: |
This file contains 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
;;;; A webserver in Emacs, because why not. | |
;;;; Basically a fast replacement for serve_this in Fish. | |
(use-package web-server | |
:config | |
(defvar my/file-server nil "Is the file server running? Holds an instance if so.") | |
(defun my/ws-start (handlers port &optional log-buffer &rest network-args) |
This file contains 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
;;; Volume control | |
(defun current-volume-settings () | |
"Return current volume settings as multiple values (`MUTEDP', `VOLUME-LEFT-%', `VOLUME-RIGHT-%')." | |
(let* ((raw-output (run-shell-command "pactl list sinks" t)) | |
(raw-mute (nth-value 1 (cl-ppcre:scan-to-strings "Mute: ([a-z]+)" raw-output))) | |
(raw-volume (nth-value 1 (cl-ppcre:scan-to-strings "Volume: .+/\\s+(\\d+).+/.+/\\s+(\\d+).+/" raw-output))) | |
(mutedp (string= (svref raw-mute 0) "yes")) | |
(vol%-l (parse-integer (svref raw-volume 0))) | |
(vol%-r (parse-integer (svref raw-volume 1)))) |
This file contains 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
(in-package :sdl2-ttf) | |
;;This file contains function definitions that could not be correctly wrapped by cl-autowrap (mainly due to no support for pass by value as of writing 6-22-2015) | |
(cffi:defcstruct (sdl-color) | |
(r :uint8) | |
(g :uint8) | |
(b :uint8) | |
(a :uint8)) |
This file contains 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
(define-module (my packages) | |
#:use-module ((guix licenses) #:prefix license:) | |
#:use-module (gnu packages linux) | |
#:use-module (guix build-system trivial) | |
#:use-module (gnu) | |
#:use-module (guix download) | |
#:use-module (guix git-download) | |
#:use-module (guix packages)) | |
(define (linux-nonfree-urls version) |
This file contains 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
#F2:: | |
WinGetClass, class, A | |
Gui, Emojiwin: New, +ToolWindow , Emoji Picker (%class%) | |
Gui, Font, s12, Segoe UI | |
Gui, Add, Text,, Pick an emoji: | |
Gui, Add, Button, gEFacepalm, &1. 🤦 Facepalm | |
Gui, Add, Button, gEPizza, &2. 🍕 Pizza | |
Gui, Add, Button, gEParty, &3. 🎉 Party | |
Gui, Show | |
Return |
NewerOlder