Skip to content

Instantly share code, notes, and snippets.

@ludamillion
ludamillion / svg-preview.el
Created August 26, 2024 13:51 — forked from jackrusher/svg-preview.el
Automatically updating SVG preview in emacs
;; I wrote up a quick + dirty function to get me a preview of the SVG I'm editing:
(defun refresh-svg-preview ()
(interactive)
(let ((oldbuf (current-buffer)))
(with-current-buffer (get-buffer-create "*svg-preview*")
(fundamental-mode)
(erase-buffer)
(insert-buffer-substring oldbuf)
(image-mode))))
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
@ludamillion
ludamillion / hammerspoon-init.lua
Created October 26, 2016 15:17 — forked from cabrinha/hammerspoon-init.lua
~/.hammerspoon/init.lua
-- Call up the bar
require("bar")
-- Hotkey mash
local mash = {"cmd", "alt", "ctrl"}
local mash_move = {"cmd", "ctrl"}
hs.alert("Reloaded Config")
@ludamillion
ludamillion / fish-prompt.sh
Created October 20, 2015 13:12 — forked from gak/fish-prompt.sh
My custom fish prompt code explained at http://geraldkaszuba.com/tweaking-fish-shell/
function _common_section
printf $c1
printf $argv[1]
printf $c0
printf ":"
printf $c2
printf $argv[2]
printf $argv[3]
printf $c0
printf ", "