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 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 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 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
0x00000935: DW_TAG_namespace | |
DW_AT_name ("generator_simple") | |
0x0000093a: DW_TAG_namespace | |
DW_AT_name ("example") | |
0x0000093f: DW_TAG_structure_type | |
DW_AT_name ("generator-0") | |
DW_AT_byte_size (0x20) | |
DW_AT_alignment (8) |
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
var observer: Observer! | |
func stuff() { | |
guard let database = UserDefaults.init(suiteName: "com.apple.spaces") else { | |
fatalError("cannot read spaces data") | |
} | |
print(String(describing: database.object(forKey: "SpacesDisplayConfiguration"))) | |
observer = Observer(object: database) | |
} | |
class Observer: NSObject { |
OlderNewer