If you had a chance to look at the Hammerspoon documentation, you might've seen that they already provide extensions to interact with Spotify but unfortunately it doesn't have a method to save the currently playing song. If you're unfamiliar with Lua, check out the Learn X in Y minutes tutorial for a quick introduction. I would highly recommend checking out their Getting Started guide to get a feel of the API and some sample use cases. It's an automation framework for macOS that provides a Lua scripting environment and extensions to interact with the operating system and few common applications. The solution was to build a global hotkey to save the song and that's when I discovered Hammerspoon. I tend to listen to the playlist when I'm programming and having to switch to the app to save the song breaks my flow state. If I find a song I like, I want to save the song to my library but I don't want to switch to the Spotify app to do so. The Discover weekly playlist is one of my favorite ways to explore new music on Spotify. bind (, function ( object ) definitions = function () application. Here’s an example from the Mjolnir homepage of binding a key that just nudges a window right: hotkey. Generally the way you want to start is by binding actions (really just Lua functions) to keys using the mjolnir.hotkey. Like a fancy Linux tiling window manager would do. Mjolnir.tiling which automatically organize your windows To move windows around and resize on a grid. Mjolnir.bg.grid use to provide things like the ability That module provides basic access to running applications and their windows, which modules like Mjolnir makes managing windows really easy with great modules to help you with this most of which are built upon the basicįunctionality found in mjolnir.application. The basic install you get can’t do much so you’ll have to use some of the many Mjolnir modules.īefore you use a module you have to install it first, to install mjolnir.hotkey you would run You’ll need to get luarocks working and then create an a file, which isn’t very hard. The instructions on Mjolnir’s homepage are pretty good as far as getting Mjolnir installed goes. Here I’ll describe how I use Mjolnir and my experience with it so far. There have been attempts to revive it,īut there were still some rough edges and I decided to try something new. However, the maintainer hasn’t worked on Slate in years and there are dozens of pull requests sitting around without merge and comment. Two years ago I wrote a blog post about configuring Slate, the configurable window manager Unmounting your USB drives when you switch to battery power. The most common useįor Mjolnir is managing Windows but there are all sorts of modules that allow you to use it for doing things like Has a constellation of modules that allow you to configure all sorts of computer control tasks. Recently I started using the amazing and highly configurable window manager called Mjolnir.īut really it isn’t a window manager, it’s an OSX wrapper around a Lua configuration file and event loop that Using Mjolnir: An Extensible OSX Window ManagerĮdit: I am now using Hammerspoon which is a fork of Mjolnir that is basically the same except it comes with the modules (no luarocks), it’s under active development and the naming is slightly different and more consistent.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |