Giter VIP home page Giter VIP logo

mjolnir.th.hints's Introduction

Mjolnir Window Hints Module

Provides a fancy method of window switching for Mjolnir. Pressing a shortcut brings up "hints" which are app icons with a letter, typing that letter focuses the corresponding window.

Currently it is in a very hacky state, it works for me but is not packaged for use by others.

Installation

You can install from luarocks by running the command below. You'll need to install Mjolnir and luarocks beforehand.

luarocks install mjolnir.th.hints

You can also install from source. You'll need to install Mjolnir and possibly moonrocks (luarocks install --server=http://rocks.moonscript.org moonrocks).

Then just run luarocks make in a clone of this git repo and it should install.

Usage

Bind the function mjolnir.th.hints.windowHints in your init.lua to a key like this:

local hints = require "mjolnir.th.hints"
hotkey.bind({"cmd"},"e",hints.windowHints)

By default, the hint keys used are: A O E U I D H T N S P G M W V J K X B Y F. To customize the hint keys, change the hints.HINTCHARS value to the prefered keys before declaring any bindings:

local hints = require "mjolnir.th.hints"
hints.HINTCHARS = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}

You can also use hints.appHints to switch between windows in an app:

-- This switches between windows of the focused app
hotkey.bind({"ctrl","cmd"},"j",function() hints.appHints(window.focusedwindow():application()) end)

-- You can also use this with appfinder to switch to windows of a specific app
local appfinder = require "mjolnir.cmsj.appfinder"
hotkey.bind({"ctrl","cmd"},"k",function() hints.appHints(appfinder.app_from_name("Emacs")) end)

Screenshot

Screenshot

Hints are centered on the window they will switch to and have a unique key.

Note that the hints still show for hidden windows, this means you can switch to ANY currently open window in 2 key strokes.

Also note the vertical line of hints in the center, these are all maximized windows but the hints are spread out so they don't collide.

App switching

You can also switch windows within an app, in this case the window titles are also shown.

mjolnir.th.hints's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mjolnir.th.hints's Issues

Keybinding for opening the window

I have the hints properly setup, but I can't seem to find information about which keys you actually press in order to open the app.

I have HYPER e bound to hints.windowHints... This will show all of the windows, now what do I do to open a window? For example, a window with the modal tag A

User defined hint characters

Please allow the user to define the characters to use for the hints.

I've never written any Lua before, but I'll fork to attempt and add this feature.

Huge lag when switching windows

I'm experiencing several seconds of lag after pressing my window hints hotkey. Other Mjolnir hotkeys work instantly. This obviously makes window switching unusable. Am I doing something wrong?

Hints across workspaces

I'm guessing there might be some OS X limitation here but it would be nice if you could hint through all workspaces so that you can select any open application, not just the ones on your current, active screen.

No hint for Slack app.

Hi,
there's a weird issue where I see no hint for the https://slack.com/ desktop app.
Not sure if I can provide more info somehow, there's no Mjolnir error.
Any clues?

Thanks,
Nick

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.