-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a VHS tape for demo. Still working on finding a track in Music wi…
…th JXA.
- Loading branch information
Showing
10 changed files
with
177 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
kef-virtual-hub | ||
bin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"humao.rest-client", | ||
"golang.go" | ||
"golang.go", | ||
"idleberg.applescript" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"label": "go: build kefw2 cli", | ||
"command": "task", | ||
"args": [ | ||
"build" | ||
], | ||
"problemMatcher": [ | ||
"$go" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"detail": "cd ${workspaceFolder}; task build" | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "vhs: Create gif from tape file", | ||
"command": "task", | ||
"args": [ | ||
"record" | ||
], | ||
"problemMatcher": [ | ||
"$go" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"detail": "cd ${workspaceFolder}; task build" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3' | ||
# This is a Taskfile. See https://taskfile.dev | ||
|
||
tasks: | ||
build: | ||
cmds: | ||
- go build -o bin/kefw2 cmd/kefw2/kefw2.go | ||
|
||
record: | ||
cmds: | ||
- rm -f ~/.config/kefw2/kefw2.yaml | ||
- vhs docs/kefw2.tape |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env osascript -l JavaScript | ||
// Using osascript, JavaScript edition, to control Apple Music | ||
// Finds the speaker defined in speakerToPlayOn and plays a song on it | ||
// via AirPlay whilst disabling all other speakers (For your own sanity) | ||
|
||
speakerToPlayOn = "Hillis Desk" | ||
|
||
Music = Application('Music') | ||
// Music.activate() | ||
console.log("Music is running: ", Music.running()) | ||
airplayDevices = Music.airplayDevices; | ||
console.log("Airplay devices count:", airplayDevices.length) | ||
|
||
for (player in airplayDevices) { | ||
plr = airplayDevices[player] | ||
// console.log(" - ", airplayDevices[player].name()) | ||
if (plr.name() == speakerToPlayOn) { | ||
console.log("Found speaker we want:", speakerToPlayOn) | ||
console.log("Enabling", plr.name(), "as AirPlay target...") | ||
plr.selected = true | ||
} else { | ||
console.log("Disabling", plr.name() ,"as AirPlay target...") | ||
plr.selected = false | ||
} | ||
} | ||
|
||
trackURL = "itmss://music.apple.com/dk/album/vamp/679279852?i=679280169" | ||
// Music.openLocation("itmss://music.apple.com/dk/album/vamp/679279852?i=679280169") | ||
// Music.sources.byId(73).urlTracks.byId(679280169) | ||
// console.log("Current track: ", Music.currentTrack.name()) | ||
// props = Music.properties() | ||
|
||
// console.log(props) | ||
|
||
// sel = app.selection(); | ||
// sel[0].duplicate({to: pl}); | ||
|
||
// const pl = Music.UserPlaylist.make() | ||
// pl.name = "kefw2-test" | ||
// pl.shuffleEnabled = true | ||
// pl.repeatEnabled = false | ||
|
||
// console.log("Current track: ", Music.currentTrack.name()) | ||
|
||
// Music.stop() | ||
// Music.nextTrack() | ||
// Music.play() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Set Shell zsh | ||
Output kefw2.gif | ||
Require kefw2 | ||
Set FontSize 14 | ||
|
||
#Type "kefw2 completion zsh > /tmp/cmpzsh && source /tmp/cmpzsh" | ||
#Enter | ||
#Sleep 500ms | ||
Type "kefw2 --help" | ||
Enter | ||
Sleep 2.5s | ||
Type "kefw2 config speaker add 10.0.0.149" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 config speaker add 10.0.0.93" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 config speaker list" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 --help" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 status" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 source usb" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 source" | ||
Enter | ||
Sleep 500ms | ||
Type" kefw2 source wifi" | ||
Enter | ||
Sleep 500ms | ||
Type "echo Playing some music from somewhere else..." | ||
Enter | ||
Sleep 2s | ||
Type "kefw2 status" | ||
Enter | ||
Sleep 5s | ||
Type "kefw2 pause" | ||
Enter | ||
Sleep 1s | ||
Type "kefw2 vol 30" | ||
Enter | ||
Sleep 1s | ||
Type "kefw2 vol" | ||
Enter | ||
Sleep 500ms | ||
Type "kefw2 off" | ||
Enter | ||
Sleep 2s |
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