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
# Uncomment this line to define a global platform for your project | |
# platform :ios, '6.0' | |
source 'https://github.com/CocoaPods/Specs.git' | |
target 'Hammerspoon' do | |
pod 'lua', '~> 5.2.3' | |
post_install do |installer_representation| | |
installer_representation.project.targets.each do |target| | |
if (target.name == 'Pods-Hammerspoon-lua') then |
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
#import <Cocoa/Cocoa.h> | |
#import <Carbon/Carbon.h> | |
#import <lauxlib.h> | |
/// === hs.drawing === | |
/// | |
/// Primitives for drawing on the screen in various ways | |
// Useful definitions | |
#define USERDATA_TAG "hs.drawing" |
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
--- | |
- name: Ensure dotfiles repo is up to date | |
action: git repo=ssh://git@bitbucket.org/cmsj/dotfiles.git dest=~/.dotfiles version=master recursive=no | |
tags: | |
- dotfiles | |
- name: Ensure Hammerspoon repo is up to date | |
action: git repo=ssh://git@github.com/cmsj/hammerspoon-config.git dest=~/.hammerspoon version=master recursive=no | |
when: ansible_hostname == "pixukipa" | |
tags: |
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
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
#import <IOKit/IOKitLib.h> | |
#import <IOKit/IOMessage.h> | |
#import <IOKit/IOCFPlugIn.h> | |
#import <IOKit/usb/IOUSBLib.h> | |
#import <lauxlib.h> | |
/// === hs.usb.watcher === | |
/// |
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
--[[ | |
# Install dependencies. | |
brew update | |
brew install lua | |
brew install luarocks | |
brew install blueutil | |
wget https://github.com/sdegutis/mjolnir/releases/download/0.4.3/Mjolnir-0.4.3.tgz | |
mkdir -p ~/.luarocks | |
mkdir -p ~/.mjolnir/ | |
echo 'rocks_servers = { "http://rocks.moonscript.org" }' > ~/.luarocks/config.lua |
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 application = require "hs.application" | |
local tiling = require "hs.tiling" -- git clone https://github.com/dsanson/hs.tiling $HOME/.hammerspoon/hs/tiling | |
local hotkey = require "hs.hotkey" | |
local mash = {"ctrl", "cmd"} | |
local safari = nil | |
-- settings | |
hs.window.animationDuration = 0 -- disable window animations | |
-- tiling |
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
<?xml version="1.0"?> | |
<root> | |
<replacementdef> | |
<replacementname>HYPER</replacementname> | |
<replacementvalue>COMMAND_R, ModifierFlag::OPTION_R | ModifierFlag::SHIFT_R | ModifierFlag::CONTROL_R | ModifierFlag::NONE</replacementvalue> | |
</replacementdef> | |
<vkopenurldef> | |
<name>KeyCode::VK_OPEN_URL_HS_fnv</name> |
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
-- Trying to make a status bar | |
-- Internaught 11/11/15 | |
-- Something about the screens ... | |
-- I guess this draws a border? | |
-- local boxBorder = 2 | |
-- Lets draw the box, on as many screens as we have, across the top | |
for _,screen in ipairs(hs.screen.allScreens()) do |
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
-- Trying to make a status bar | |
-- Internaught 11/11/15 | |
-- Something about the screens ... | |
-- I guess this draws a border? | |
-- local boxBorder = 2 | |
local bars = {} | |
local iTunesBoxes = {} |
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
diff --git a/extensions/audiodevice/internal.m b/extensions/audiodevice/internal.m | |
index 5584112..0066093 100644 | |
--- a/extensions/audiodevice/internal.m | |
+++ b/extensions/audiodevice/internal.m | |
@@ -48,6 +48,9 @@ static int audiodevice_watcherStop(lua_State *L); | |
#pragma mark - CoreAudio helper functions | |
OSStatus audiodevice_callback(AudioDeviceID deviceID, UInt32 numAddresses, const AudioObjectPropertyAddress addressList[], void *clientData) { | |
+ for (UInt32 j = 0; j < numAddresses; j++) { | |
+ NSLog(@"audiodevice_callback received event %d/%d: %@", j, numAddresses, (__bridge_transfer NSString *)UTCreateStringForOSType(addressList[j].mSelector)); |