Skip to content

Commit

Permalink
testing script to format reference links in readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-funderburg committed Sep 16, 2020
1 parent ffaadc3 commit 487ce66
Show file tree
Hide file tree
Showing 11 changed files with 266 additions and 195 deletions.
9 changes: 9 additions & 0 deletions BetterTouchTool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Various scripts for use with [BetterTouchTool](https://folivora.ai/).
## Contents

### [BetterTouchTool Library][ej8172hf]

- This is a AppleScript Library to make scripting BetterTouchTool simpler. The main focus of the library is to simplify the updating/adjusting of triggers.
- The library itself is a `.scptd` bundle which are not readable on GitHub, so the link above is strictly for readability, if you'd like to download the actual file click [this link][jan23nl1].
- For those who are unaware, in order to for the library to function, you must place the `BetterTouchTool.scptd` file in `~/Library/Script Libraries/`

#### Updating triggers

- This is done in one of two ways.
1. Passing a desired `UUID` of a trigger
- By passing a specified `UUID`, this tells the script to perform an action on a specific trigger.
Expand All @@ -35,6 +37,7 @@ Various scripts for use with [BetterTouchTool](https://folivora.ai/).
tell collapse to button()'s setVisible(true)
tell expand to button()'s setVisible(false)
```
2. Passing `missing value`
- Passing `missing value` implies that the trigger you want to adjust is the trigger _currently selected within BTT_. The library will then copy the JSON of the selected trigger and create a script object that allows for easy updating.
- Very useful when making visual changes to the touchbar (especially when mapped to a shortcut key or button) as you can see the result in real time.
Expand Down Expand Up @@ -108,17 +111,23 @@ Various scripts for use with [BetterTouchTool](https://folivora.ai/).
end tell
```
- Heres a screen shot of my touchbar in BTT using these kind of examples
![bttbuttons](../imgs/bttButtons.png)
#### Performing BTT Actions
- If you want to perform a spcific BTT via AppleScript normally, you need to know the predefined action type (example below)
```AppleScript
tell application "BetterTouchTool" to trigger_action "{\"BTTPredefinedActionType\" : 188}"
```

- This works great but I don't like trying to keep track of the numbers so this library has several actions that I commonly used stored so you can execute it by the actions name instead.

```AppleScript
tell script "BetterTouchTool Library" to triggerAction("Toggle BetterTouchTool Touch Bar")
```

[ej8172hf]: ./BetterTouchTool-Library.applescript
[jan23nl1]: ./BetterTouchTool-Library.zip
16 changes: 11 additions & 5 deletions Document-Closers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ These are simple scripts that are incredibly useful. I have been scripting for y

## Contents

- [Close All Un-Saved Documents](./Close-All-Un-Saved-Documents.applescript)&emsp;<kbd>⌘</kbd><kbd>⌥</kbd><kbd>⇧</kbd><kbd>W</kbd>
- [Close All With Saving](./Close-All-With-Saving.applescript)&emsp;<kbd>⌘</kbd><kbd>⌥</kbd><kbd>⇧</kbd><kbd>W</kbd>
- [Close All Without Saving](./Close-All-Without-Saving.applescript)&emsp;<kbd>⌘</kbd><kbd>⌥</kbd><kbd>⇧</kbd><kbd>W</kbd>
- [Close With Saving](./Close-With-Saving.applescript)&emsp;<kbd>⌥</kbd><kbd>W</kbd>
- [Close Without Saving](./Close-Without-Saving.applescript)&emsp;<kbd>⌃</kbd><kbd>W</kbd>
- [Close All Un-Saved Documents][b2e66564]&emsp;<kbd>⌘</kbd><kbd>⌥</kbd><kbd>⇧</kbd><kbd>W</kbd>
- [Close All With Saving][32e368e9]&emsp;<kbd>⌘</kbd><kbd>⌥</kbd><kbd>⇧</kbd><kbd>W</kbd>
- [Close All Without Saving][9835ba43]&emsp;<kbd>⌘</kbd><kbd>⌥</kbd><kbd>⇧</kbd><kbd>W</kbd>
- [Close With Saving][a30d8624]&emsp;<kbd>⌥</kbd><kbd>W</kbd>
- [Close Without Saving][7d9d8849]&emsp;<kbd>⌃</kbd><kbd>W</kbd>

[b2e66564]: ./Close-All-Un-Saved-Documents.applescript
[32e368e9]: ./Close-All-With-Saving.applescript
[9835ba43]: ./Close-All-Without-Saving.applescript
[a30d8624]: ./Close-With-Saving.applescript
[7d9d8849]: ./Close-Without-Saving.applescript
19 changes: 9 additions & 10 deletions Finder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,30 @@ Various scripts for use in Finder.
## Contents

- [Copy Path as Alias][02e5746e]&emsp;<kbd>⌘</kbd><kbd>⌃</kbd><kbd>C</kbd>
- Copies the current Finder selection as a alias for scripting
- Result looks like
- Copies the current Finder selection as a alias for scripting
- Result looks like

```AppleScript
"Macintosh HD:Users:kevinfunderburg:Desktop:README.md" as alias
```
- [Go to Custom Folder][fb40138e]&emsp;<kbd>too many to list</kbd>
- Script that lets you jump to any folder you like in an instant, works exactly like the `Finder` > `Go` menu, but you add your favorite folders.
- I use this script for about 8 different folders that I'm constantly in and out of.
- **How to** - Duplicate the script for each folder you want, and update the `t` variable to the HFS path of the folder you want.
- Script that lets you jump to any folder you like in an instant, works exactly like the `Finder` > `Go` menu, but you add your favorite folders.
- I use this script for about 8 different folders that I'm constantly in and out of.
- **How to** - Duplicate the script for each folder you want, and update the `t` variable to the HFS path of the folder you want.
- [Monthly Cleanups][cfd2fea0]
- Clean up old files in `~/Downloads` or `~/Desktop` by consolidating files > 2 weeks old into a folder with a path like `~/Desktop/Cleanups/[year]/[month].[year] - Monthly Cleanups`.
- I've used this method for years to keep these folders tidy and I love it, here's an example of what the result looks like.
![](../imgs/folderCleaner.png)
![folderClean](../imgs/folderCleaner.png)
- I generally use [Hazel](https://www.noodlesoft.com/) to execute this script automatically, but it can be run via the Script Menu, or through the command line using
```shell
osascript 'Monthly Cleanups.scpt' "desktop"
```
- [Open Selection in iTerm][e928def2]&emsp;<kbd>⌥</kbd><kbd>⇧</kbd><kbd>T</kbd>
- Open [iTerm](https://www.iterm2.com/) and change directory to the current location in Finder. Super useful if you are on the command-line a lot.
- Open [iTerm](https://www.iterm2.com/) and change directory to the current location in Finder. Super useful if you are on the command-line a lot.
![demo](../imgs/finder-iterm.gif)
[02e5746e]: ./Copy-Path-as-Alias.applescript
Expand Down
16 changes: 10 additions & 6 deletions Global/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ Various scripts for Global use.
## Contents

- [Click Script Menu](./Click-Script-Menu.applescript)&emsp;<kbd>⌃</kbd><kbd>⇧</kbd><kbd>S</kbd>
- [Click Script Menu][a34585b1]&emsp;<kbd>⌃</kbd><kbd>⇧</kbd><kbd>S</kbd>
- Simple script that makes viewing to the Script Menu a snap, best when mapped to a shortcut key.

- [Get Keychain Access Passwords][eb8aab1d]
- Useful subroutine to securely access your keychain passwords.

- [Paste Safari URL With Title](./Paste-Safari-URL-With-Title.applescript)&emsp;<kbd>hotkey</kbd><kbd>U</kbd>
- This is great when you want to paste the URL of the front tab, but also want it to display as the name of the site, rather than just the URL. So rather than https://en.wikipedia.org/wiki/AppleScript it would look like [AppleScript - Wikipedia](https://en.wikipedia.org/wiki/AppleScript).
- [Paste Safari URL With Title][da26184d]&emsp;<kbd>hotkey</kbd><kbd>U</kbd>
- This is great when you want to paste the URL of the front tab, but also want it to display as the name of the site, rather than just the URL. So rather than https://en.wikipedia.org/wiki/AppleScript it would look like [AppleScript - Wikipedia][e8811402].

- [Play|Pause Apple TV](./Play|Pause-Apple-TV.applescript)
- [Play|Pause Apple TV][4eb9064d]
- This takes advantage of the Home app that is included with Mojave, so if you have the app and have your Apple TV connected to it, this is a great little tool.
- _NOTE_: This script looks for the name of your Apple TV, mine is "Living Room Apple TV" so if yours is different then change the name in the script.

- [Start|Stop Quicktime Screen Recording](./Start|Stop-Quicktime-Screen-Recording.applescript)&emsp;<kbd>⌃</kbd><kbd>⌥</kbd><kbd>Q</kbd>
- [Start|Stop Quicktime Screen Recording][c0ca3f5d]
- If you make screen recordings with QuickTime, this makes starting and stopping screen recordings much easier, especially when mapped to a shortcut key.

- [Zoom - Toggle Mute][hdjkasdf]
Expand All @@ -28,7 +28,11 @@ Various scripts for Global use.
- [Zoom - Toggle Video][ndhjskas]
- same thing as mute but for video, nifty and quick.


[a34585b1]: ./Click-Script-Menu.applescript
[da26184d]: ./Paste-Safari-URL-With-Title.applescript
[e8811402]: https://en.wikipedia.org/wiki/AppleScript
[4eb9064d]: ./Play|Pause-Apple-TV.applescript
[c0ca3f5d]: ./Start|Stop-Quicktime-Screen-Recording.applescript
[kmapp]: https://www.keyboardmaestro.com/
[alfredapp]: https://www.alfredapp.com/
[anybar]: https://github.com/tonsky/AnyBar
Expand Down
Loading

0 comments on commit 487ce66

Please sign in to comment.