This file contains hidden or 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 events = hs.uielement.watcher | |
watchers = {} | |
function init() | |
appsWatcher = hs.application.watcher.new(handleGlobalAppEvent) | |
appsWatcher:start() | |
-- Watch any apps that already exist | |
local apps = hs.application.runningApplications() |
This file contains hidden or 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
// Move windows between monitors, taken from jakemcc's config | |
function moveToScreen(win, screen) { | |
if (!screen) { | |
return; | |
} | |
var frame = win.frame(); | |
var oldScreenRect = win.screen().frameWithoutDockOrMenu(); | |
var newScreenRect = screen.frameWithoutDockOrMenu(); |
This file contains hidden or 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
% Breadth-first search with a list of possible destinations (picks the closest first.) | |
bfs(Dests, [[Target,Path,Cost]|_], Target, Path, Cost):- member(Target, Dests). | |
bfs(Dests, [[N,P,C]|Queue], Target, Path, Cost):- | |
setof([Child,Pp,Cp], child(N, P, C, Child, Pp, Cp), Children), | |
append(Queue, Children, NextQueue), | |
bfs(Dests, NextQueue, Target, Path, Cost). | |
child(N0, P0, C0, N, P, C):- | |
arc(N0, N, Len), | |
append(P0, [N], P), | |
C is C0 + Len. |
This file contains hidden or 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
--- /tmp/java/src/configure 2012-07-25 11:34:49.000000000 -0500 | |
+++ configure 2013-04-21 22:56:40.000000000 -0500 | |
@@ -1,4 +1,4 @@ | |
-#! /bin/sh | |
+#! /bin/bash | |
# Guess values for system-dependent variables and create Makefiles. | |
# Generated by GNU Autoconf 2.65. | |
# | |
@@ -3252,9 +3252,10 @@ | |
java_version=`$JAVA -version 2>&1 | sed -n -e 's/^java version[^0-9"]*"\([^"]*\)"/\1/p'` |
NewerOlder