Git Product home page Git Product logo

carrier.spoon's Introduction

Carrier.spoon

Hammerspoon - Carry a set of apps between Spaces.

This uses a hs.spaces.watcher to detect space changes. Then it will automatically "carry" any applications which are configured to the new Space, so that they are available in Mission Control/AltTAb.

Installation

This Spoon depends on two other Spoons being installed, loaded, and configured:

  • EnsureApp.
    • Example app configurations provided below
  • WindowCache
    • No configuration needed other than start

Automated

Carrier can be automatically installed from my Spoon Repository via SpoonInstall. See the repository README or the SpoonInstall docs for more information.

Example init.lua configuration which configures SpoonInstall and uses it to install and start Carrier:

hs.loadSpoon("SpoonInstall")

spoon.SpoonInstall.repos.adammillerio = {
    url = "https://github.com/adammillerio/Spoons",
    desc = "adammillerio Personal Spoon repository",
    branch = "main"
}

spoon.SpoonInstall:andUse("WindowCache", {repo = "adammillerio", start = true})

spoon.SpoonInstall:andUse("EnsureApp", {
    repo = "adammillerio",
    start = true,
    config = {
        apps = {
            ["Discord"] = {app = "Discord", action = "maximize"},
            ["Reminders"] = {app = "Reminders", action = "move"}
        }
    }
})

spoon.SpoonInstall:andUse("Carrier", {
    repo = "adammillerio",
    start = true,
    config = {
        carryDelay = 10,
        apps = {
            ["Discord"] = {carry = true},
            ["Reminders"] = {carry = true}
        }
    }
}

Now, the Discord and Reminders applications will be moved to the current Space whenever it is changed after a delay of 10 seconds. The apps are not focused so they will be behind whatever application was focused last in the Space. The default carryDelay is 5 seconds.

Manual

Download the latest WindowCache release from here.

Download the latest EnsureApp release from here.

Unzip them all and either double click to load the Spoons or place the contents manually in ~/.hammerspoon/Spoons

Then load the Spoons in ~/.hammerspoon/init.lua:

hs.loadSpoon("WindowCache")

hs.spoons.use("WindowCache", {start = true})

hs.loadSpoon("EnsureApp")

hs.spoons.use("EnsureApp", {
    config = {
        apps = {
            ["Discord"] = {app = "Discord", action = "maximize"},
            ["Reminders"] = {app = "Reminders", action = "maximize"}
        }
    },
    start = true
})

hs.loadSpoon("Carrier")

hs.spoons.use("Carrier", {
    start = true,
    config = {
        carryDelay = 10,
        apps = {
            ["Discord"] = {carry = true},
            ["Reminders"] = {carry = true}
        }
    }
})

Usage

Refer to the hosted documentation for information on usage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.