Git Product home page Git Product logo

dot-hammerspoon's Introduction

.hammerspoon

These are my configuration files for Hammerspoon.

Install

  1. Install Hammerspoon.
  2. `git clone https://github.com/thelastnode/dot-hammerspoon ~/.hammerspoon
  3. Restart Hammerspoon.

Features

Launch mode lets you quickly get to an app by hitting a key chord (ctrl + + a). For example, ctrl + + a followed by v will open Visual Studio Code.

Special handling for the browser

Google Chrome has some special handling for multiple profiles. Assuming there are two profiles (Work and Ankit), 1 will switch to the Work window and 2 will switch to the Ankit (personal) window.

You can also configure shortcuts to get to pinned tabs in different profiles.

Special handling for Figma

Figma desktop has a feature to open a file URL from the clipboard - this is bound to ctrl + + a followed by shift + f.

This module lets you snap windows using your keyboard with vim-style directions (hjkl).

Start with ctrl + + 2 to enable window mode, then any of the following:

  • space: snap to fill the screen
  • hjkl: snap to the left, down, up, or right half of the screen
  • uom.: snap to the the corners of the screen
  • + hl: snap to left or right 70% of the screen
  • ctrl + hjkl: move to the left, down, up, or right screen (does not exit window mode, so can be followed by one of the above snapping commands)

This module captures which window is active to a SQLite database located at ~/.hammerspoon/data/timetracker.sqlite3. It has special handling for Google Chrome to capture URLs.

It also includes a datasette metadata file to see usage in Datasette. This can be run with:

datasette ~/.hammerspoon/data/timetracker.sqlite3 --metadata ~/.hammerspoon/timetracker/datasette-metadata.yml

After Datasette is running, you can see usage for the day by opening this link (by default).

This automation turns on an Elgato key light via Home Assistant when a camera is detected via USB. This requires a Home Assistant token in ~/.hammerspoon/homeassistant. If the token is missing, the automation will not register.

The ScreenRecordingMode function is a convenience utility to center a window on screen and resize it to 1080p. To use it, run ScreenRecordingMode() in the Hammerspoon console, then click a window to center it on screen, resize it to 1080p, and open CleanShot X's all-in-one capture mode.

You can also pass in a custom width and height for the window, e.g.: ScreenRecordingMode{ w = 800, h = 600 }.

dot-hammerspoon's People

Contributors

ankitshankar avatar

Watchers

Ankit Shankar avatar

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.