Skip to content

Instantly share code, notes, and snippets.

View tvraman's full-sized avatar

T. V. Raman tvraman

View GitHub Profile
@tvraman
tvraman / readme.org
Created March 25, 2018 03:19
Bash Utils For emacspeak

Bash Utilities For Use With Emacspeak — see bash-utils/Readme.org.

This directory contains useful Bash functions and Bash scripts.

audio-effects
Bash functions to apply audio effects to sound files.
e-askpass
Appropriate for use as the value of environment variable SSH_ASKPASS.
emcloud
Have Emacspeak connect to a remote TTS server.
emlock
Lock screen via a DBus call
emnotify
Notify from outside Emacs.
@tvraman
tvraman / emacspeak-silence-on-focus-lost.txt
Created March 25, 2018 00:55
Silence emacspeak When Emacs Loses Focus
;;; Silence Emacspeak when emacs loses focus:
(add-hook 'focus-out-hook #'dtk-stop)
@tvraman
tvraman / emacspeak-wizards.el
Created February 11, 2018 20:49
Wizard To Generate declare-function calls
(defun emacspeak-wizards-gen-fn-decl (f &optional ext)
"Generate declare-function call for function `f'.
Optional interactive prefix arg ext says this comes from an
external package."
(interactive "SFunction:")
(cl-assert (functionp f) t "Not a valid function")
(let ((file (symbol-file f 'defun))
(arglist (help-function-arglist f 'preserve)))
(cl-assert file t "Function definition not found")
(setq file (file-name-base file))
@tvraman
tvraman / bootstrap.sh
Last active November 16, 2016 03:53
Bootstrap into a running Emacspeak
#!/bin/bash
# Usage: ./bootstrap [version]
# On a well-installed Linux system,
# This should let a user bootstrap into a talking Emacs.
# Not intended for daily use.
# Prerequisites: espeak, libespeak libespeak-dev
# Downloads, builds and runs specified version.
v=$1
@tvraman
tvraman / foo.el
Last active November 13, 2016 03:10
Emacspeak Setup Fragment
;;{{{ Load and customize emacspeak
(unless (featurep 'emacspeak)
(load-file ;;; Specify emacspeak directory below:
(expand-file-name "~/emacs/lisp/emacspeak/lisp/emacspeak-setup.el"))
;;; Set engine below: "mac" for Mac", "espeak" for espaeak
(or (getenv "DTK_PROGRAM")(setq dtk-program "espeak"))
(emacspeak-tts-startup-hook)
(emacspeak-sounds-select-theme "pan-chimes/"))
@tvraman
tvraman / foo.el
Created August 23, 2014 15:25
Advice shell-command and friends to use /bin/bash
(loop
for f in
'(shell-command shell-command-on-region shell-command-as-string)
do
(eval
`(defadvice ,f (around fix-shell pre act comp)
"Use a sane shell"
(let ((shell-file-name "/bin/bash"))
ad-do-it))))