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
function ext.utilfns.smartlyPlaceWindow() | |
local win = window.focusedwindow() | |
local winName = win:title() | |
local appName = win:application():title() | |
if (string.match(winName, "started: ")) then -- sametime messaging window | |
positioncurrentwindow(win,{0.01,0.15,0.45,0.65}) | |
elseif (string.match(winName, "IBM Sametime Connect")) then | |
positioncurrentwindow(win,{0,0,0.2,0.9}) | |
elseif (appName == "Adium" and string.match(winName, "Contacts")) then -- Adium contacts window |
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
-- | |
-- Configuration for Hydra <https:--github.com/sdegutis/Hydra> | |
-- | |
-- Haider Rizvi <harizvi@gmail.com> | |
-- Started: Friday, July 25, 2014 6:22 PM | |
-- Update Time-stamp: <2014-09-22 08:56:10 haider> | |
-- | |
notify.show("Hydra", "Started!","","") |
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
// only keep E, R and T from Surfingkeys for gmail.com and twitter.com | |
unmapAllExcept(['E','R','T'], /gmail.com|twitter.com|yahoo.com/); | |
// an example to create a new mapping `ctrl-y` | |
mapkey('<Ctrl-y>', 'Show me the money', function() { | |
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); | |
}); | |
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. | |
map('gt', 'T'); |
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
Homebrew build logs for dunn/emacs/pdf-tools on macOS 10.13.6 | |
Build date: 2018-11-29 14:59:05 |
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
;; user Return key to pull up the page in browser | |
(defun browse-nnrss-url( arg ) | |
(interactive "p") | |
(let ((url (assq nnrss-url-field | |
(mail-header-extra | |
(gnus-data-header | |
(assq (gnus-summary-article-number) | |
gnus-newsgroup-data)))))) | |
(if url |
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
local char_to_hex = function(c) | |
return string.format("%%%02X", string.byte(c)) | |
end | |
local function urlencode(url) | |
if url == nil then | |
return | |
end | |
url = url:gsub("\n", "\r\n") | |
url = url:gsub("([^%w ])", char_to_hex) |
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
;; discussion in reddit about clipping from browser. | |
(defun hr/paste-html-to-org () | |
"Takes the contents of the system clip/paste-board, and uses | |
`pandoc' to convert it to the org-mode format." | |
(interactive) | |
(let* ((clip (if (eq system-type 'darwin) | |
"pbv public.html" | |
"xclip -out -selection 'clipboard' -t text/html")) | |
(format (if (eq major-mode 'org-mode) "org" "markdown")) | |
(pandoc (concat "pandoc -f html -t " format)) |
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
#!/bin/sh | |
# This script lists user defined search engines in Chromium. | |
# It replaces {inputEncoding}, which appears in some search engine definitions, with | |
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens. | |
# can take browser name as first argument. | |
# 'Google Chrome', Chromium, BraveSoftware/Brave-Browser | |
browser=${1:-Vivaldi} |