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
| { | |
| "title": "Caps Lock To Command/Escape", | |
| "author": "Caleb Porzio(calebporzio.com)", | |
| "homepage": "https://gist.github.com/calebporzio/2d07cd0e3013e7eaf16f5a2ea4f594ae", | |
| "import_url": "karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/calebporzio/2d07cd0e3013e7eaf16f5a2ea4f594ae/raw/08c397b09fbaa5ec90cf161e5bca97bdb43e8c55/caps_lock_to_command_escape.json", | |
| "rules": [ | |
| { | |
| "description": "Caps Lock to Command/Escape", | |
| "manipulators": [ | |
| { |
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
| { | |
| "title": "DB66 - Neues Finder-Fenster (konfluenzpunkt)", | |
| "rules": [ | |
| { | |
| "description": "Global ⌘+N → Neues Finderfenster im Vordergrund", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "n", | |
| "modifiers": { |
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
| {:main [{:des "mb3-layer" | |
| :rules [ | |
| ;; set the action for double press first | |
| [{:pkey :button3} [:!Sgrave_accent_and_tilde :slash ] ["mb3-q" 1] ] | |
| ;; set the variable initializer for single press,longpress and allow pass throw on doublepress ? | |
| ;;[{:pkey :button3} [["mb3-layer" 1]["mb3-q" 1]{:pkey :button3}] nil | |
| [{:pkey :button3} [["mb3-layer" 1]["mb3-q" 1]] nil | |
| {:afterup ["mb3-layer" 0] | |
| :alone {:pkey :button3} | |
| :delayed {:invoked ["mb3-q" 0] :canceled ["mb3-q" 0]} |
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
| #! /usr/bin/env bash | |
| set -e -u -o pipefail | |
| #Usage | |
| usage="Usage: ./generate_json.sh [options] <edn_config_file> <rule_title>" | |
| show_help() { | |
| cat << EOF | |
| $usage |
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
| {:layers {:homerow {:key :caps_lock :alone {:key :escape}} | |
| :symbols {:key :tab}} | |
| :main [{:des "multitouch" | |
| :rules [:multitouch_extension_finger_count_total | |
| [:spacebar :button1] | |
| [:f :button1] | |
| [:d :button2] | |
| [:s :button3] | |
| [:z [:button1 :!Cz]] |
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
| -- This script uses Acorn (tested with version 6.6.4) | |
| -- to add a light border around a window screenshot. | |
| -- | |
| -- Screenshots (without the huge macOS shadows) are made by shift-cmd-4, then space bar, | |
| -- then option-click on window (see https://apple.stackexchange.com/a/120017/17533) | |
| -- | |
| -- Before use, you need to create a Preset Filter for this, once: | |
| -- With an image opened, use from menu: Filter / Stylize / Drop Shadow… | |
| -- Set its options as you prefer (e.g. X/Y offset 0, Blur Radius 2, Opacity 80%), | |
| -- then save it by clicking the gear icon, choose "Save Filter Preset…" and |
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
| { | |
| ;; :!Ca is keycode :a and prefix a with !C | |
| ;; C | left_command | |
| ;; T | left_control | |
| ;; O | left_option | |
| ;; S | left_shift | |
| ;; F | fn | |
| ;; Q | right_command | |
| ;; W | right_control |
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
| function saveWindowsLayout(args) | |
| local layout = {} | |
| for _, w in pairs(hs.window.allWindows()) do | |
| layout[tostring(w:id())] = { | |
| frame = w:frame().table, | |
| title = w:title(), | |
| } | |
| end | |
| hs.settings.set("zWindowsLayout", hs.json.encode(layout)) | |
| end |
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
| #!/bin/bash | |
| # Usage: | |
| # | |
| # 1. Create a `apple-news` file somewhere in your $PATH with the content of this file | |
| # 2. That’s it! You can now use the `apple-news` utility: | |
| # | |
| # ``` | |
| # $ apple-news https://apple.news/AKoDCWtVEQP2w7Ld657lgIg | |
| # https://www.theguardian.com/technology/2022/mar/30/dyson-launches-zone-air-purifying-bluetooth-headphones-with-visor |
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 qStartTime = 0.0 | |
| local qDuration = 1.5 | |
| hs.hotkey.bind({"cmd"}, "Q", function() | |
| qStartTime = hs.timer.secondsSinceEpoch() | |
| end, function() | |
| local qEndTime = hs.timer.secondsSinceEpoch() | |
| local duration = qEndTime - qStartTime | |
| if duration >= qDuration then hs.application.frontmostApplication():kill() end | |
| end) |