Giter Club home page Giter Club logo

vimac's Introduction

Announcement

Vimac is now Homerow. Homerow is a refined, sleeker, more performant successor of Vimac, incorporating lessons learned from it's predecessor.

Vimac - Productive macOS keyboard-driven navigation

Vimac is a macOS productivity application that provides keyboard-driven navigation and control of the macOS Graphical User Interface (GUI).

Vimac is heavily inspired by Vimium.

Getting Started

You can download Vimac here. Unzip the file and move Vimac.app to Applications/.

You can refer to the manual here.

How does Vimac work?

The current Vimac workflow works like this:

  1. Activate a mode (Hold Space to activate Hint-mode is the default)
  2. Perform actions within the activated mode
  3. Exit the mode, either manually or automatically when the mode's task is complete

Hint-mode

Activating Hint-mode allows one to perform a click, double-click, or right-click on an actionable UI element

Upon activation, "hints" will be generated for each actionable element on the frontmost window:

Simply type the assigned "hint-text" (eg. "ka") to perform a click at the location!

Scroll-mode

Activating Scroll-mode allows one to scroll through the scrollable areas of the frontmost window.

Upon activation, a red border surrounds the active scroll area:

HJKL keys can be used to scroll within the scroll area.

Building

pod install
carthage build
open Vimac.xcworkspace

Modify the Signing and Capabilities to the following (note the Disable Library Validation option):

Add Vimac and Xcode (for running AppleScript) to the list of Accessibility apps under System Preferences > Security & Privacy > Accessibility:

Keep System Preferences open under this section during development with the settings unlocked. This is because the grant-accessibility-permission-dev.scpt AppleScript is scheduled to run after each build to re-grant Accessibility permissions.

The AppleScript simply checks and unchecks Vimac to re-grant permissions which are lost after a cleanbuild.

Build Vimac now! You may have to build it several times as the AppleScript may not run well the first time.

At this point running git status would bring up:

modified:   ViMac-Swift/ViMac_Swift.entitlements
modified:   Vimac.xcodeproj/project.pbxproj
modified:   grant-accessibility-permission-dev.scpt

Avoid committing them.

Contributing

Feel free to contribute to Vimac. Make sure to open an issue / ask to work on something first!

vimac's People

Contributors

colossatr0n avatar dexterleng avatar kiding avatar orthodox avatar storrence88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimac's Issues

Alerts not mapping

It seemed natural to me to just dismiss an alert with Vimac, but then I realised, oops:

Screenshot 2020-03-11 at 10 43 18

@dexterleng Is it possible to map the alerts, since they are persistent on the screen?

Add support for numeric hints

Thanks for the great app! As a Vimium user this is fantastic, but I noticed that switching the hints to only numbers 0-9 doesn't seem to work. I do this for Vimium as well because I find it easier to press number combinations that change regularly compared to character combinations. In vimac however, number hints show up just fine, but inputting the numeric responses don't do anything. Works fine for letters and symbols though. Maybe there aren't any keyboard listeners setup for numbers?

Thanks again!

Show hints on context menu

Currently if you hit the Hint Mode hotkey a new window (OverlayWindow) will pop up and become active. This causes the existing (if any) context menu to close.

We need to look into a flow that allows Hint Mode to work after right-clicking.

Adjusting page scrolling speed and step size

Hey Dexter!

First of all, phenomenal job on vimac - it's a true pleasure to use. I was wondering if options in preferences could be implemented to customise both the page scrolling speed with J/K keys after scroll mode is set and step size. It feels a bit slow and dizzying relative to the chrome vimium extension. If that's not possible, how does one customise his own vimac to incorporate this functionality?

I am keen to contribute if you are open (would appreciate if you could point me to the implementation point in the code).

Find a way to cut down on the amount of hints shown

There is a bit too much "redundant" hints right now. Unfortunately we cannot just show hints for elements with "actions" because apps by even Apple themselves have clickable groups/elements that do not have actions 🤷‍♀.

Suggestions:

  1. If there are multiple hints with the same position, show only one of them.

Minimal functionality on chrome tools

When I try to use vimac on chrome dev tools, I get weird results.

Version: 0.3.10
OS X version: 10.15.5 (19F101)
Desired Behavior: Tabs and other interactive objects have hint associated with them.
Actual behavior: Minimal hints; lots of to tabbing.

See the attached screenshot. I've had it work maybe one time very effectively on chrome tools before, but I can't figure out why it would do it in one case not the other.

Screen Shot 2020-07-09 at 9 37 03 AM

Add <G> and <gg> to scrolling (?)

How does the scrolling work? Does it detect the scrolling boundaries? How difficult would it be to implement "jump to beginning/end"? This would be handy for apps like Preview.

Right click doesn't work in odd cases

Right click (or other clicks) doesn't work sometimes due to the overlay window.

To replicate:

Try right clicking the bookmark link in Chrome with Vimac. You will notice similar behaviour when right clicking the bookmark link when Spotlight Search is active.

Suggestion: option to not exit hint mode until ESC

Thanks for the amazing app.

I have a suggestion to add an option to allow "persistent hint mode". Currently, it goes back to "normal mode" after selecting a hint. But I find more operations I want to do require multiple clicks. E.g. going to the setting page of Chrome requires 2 clicks.

Hide in menubar

Hello,

I would appreciate to be able, to select the visibility of the icon on the menu-bar in the preferences. Since every App is showing there and it looks kind of messy.

Nice work by the way!

install via homebrew

I added it to my tap for now, so anyone can install using brew cask install pvinis/pvinis/vimac.

For a more "official" thing, you can make a repo called homebrew-something, make a dir called Casks, and in there make a file called vimac.rb. In that file put what I have https://github.com/pvinis/homebrew-pvinis/blob/master/Casks/vimac.rb here.

Then anyone can install it using brew cask install dexterleng/something/vimac.

Replace something with something more meaningful I guess :p

Getting an error message when I attempt to run the applicaiton

Any idea why I am getting the following error message when I attempt to run the application:

"Vimac" can't be opened because Apple cannot check it for malicious software.
This software needs to be updated. Contact the developer for more information."

Why can NOT run on macOS 10.13?

The minimal supported OS of Vimac is macOS 10.14, but I'm using macOS 10.13 as a develop machine. So is there any way to run Vimac on macOS 10.13? Can I build Vimac on macOS 10.13 myself?

Thanks for bringing such fantastic Application to us!

Faster alternative to eagerConcat

eagerConcat is used to merge observables while preserving their order, unlike RxSwift's merge. This is so that hint text is consistent when the element tree is unchanged.

however, for each element, you have to sort it's direct children, which means time complexity is O(n * (c log c)) where n is number of elements in the tree and c is no. of direct children of a element. This is assuming each element has the same amount of children.

Rotate hints z-index non-randomly

Currently Vimac rotates hints z-index randomly by:

  1. Remove HintViews from superview (HintViewController)
  2. Shuffle the HintView array
  3. Iterate and add the HintViews back to superview.

Ideally we would do it like Vimium:

  1. Group HintViews by intersecting clusters
  2. Move the hint at the bottom of the cluster to the top.

This way we can minimize the no. of times the user has to press SPACE to rotate.

AFAIK there is no documented method to get the z-index of an NSView. It appears in the order that you add them to the superview.

Brew vimac?

Is it possible to download vimac via terminal? I’d love to add it to my dotfiles?

I don’t know how hard it is to distr somethinf via brew so my apologies if its a dumb question..

Non unique labels presented in macOS Catalina

  1. Press the shortcommand to get the yellow lables.
  2. Select the label for what i want to click by typing it, in this case "OT"
  3. I get presented with two instances of OT, how do i select the one i want?

Screenshot 2020-06-02 at 12 40 21

Disable Shortcut in some app.

I want to bind vimac shortcut to more general key, however, it may conflict with some app shortcut.(e.g. iterm2, emacs). It would be much appreciated if vimac supports disable in some app.

Keep the mouse where it was initially after Scroll Mode is done

I have an issue where say I am in Discord app. I have a binding to centre my mouse to middle of the app. In Discord if I do that and then activate Scroll Mode, I can start scrolling with J and K. The problem is that the mouse moves to the bottom left corner of the screen during the process and after the process stays there.

I do like the fact that the mouse moves out of the way during scroll mode. However I propose to move the mouse back to original position it was in before activating scroll mode once the scroll mode is turned off (hotkey is pressed again or app was switched).

That would be wonderful. The use case is that it's annoying as sometimes in say above Discord app case. I move mouse to middle, scroll mode activate. Then disable. Then if I enable again, I am scrolling the left sidebar, not the middle of the screen as I wanted to.

Thank you.

Customize hints font size.

It would be great to be able to make the hints bigger and maybe have the ability to change their background color too. I have a bad eyesight and it can be hard to see those tiny hints

Feature Request: Limit Hints to Active App Only

Thank you for such a wonderful donation to the vim loving community.

I've recently started using vimacs. I'll often run into cases where there are so many hints it's difficult to know which one correspond to the desired control. Perhaps there could be an alternate command that only shows hint for the active application? i.e. shift+

Quite possible this is just a new user issue and there is a better way to deal with large numbers of hints in a small area.

Long lag (5+ seconds) before hints show up on latest upgrade?

Thanks for such an awesome piece of software (do you have a donation page anywhere? I'd love to donate to the project to keep it going!).

On the latest upgrade of Vimac I've noticed a huge slowdown in when the links show up. I am really not sure what's causing it. :( Since the links take 5+ seconds to show up, it's now almost always faster to just use a mouse to click on things. Any way we can speed up the link hints or are there things I can do on my end to speed them up? It's not the hardware, I've got a pretty great Macbook Pro.

About This Mac 2020-07-12 12-48-58

Is there a cache I need to flush or anything else I can do to speed this up again?

Right mouse click emulation

I noticed that for ToothFairy menubar item for example, has bound actions to both left and right click. On the left click it connects to the device and on right click it's shows the dialog with status and preferences:

Screenshot 2020-03-11 at 12 00 19

@dexterleng Did you consider maybe of adding a right mouse click emulation as a feature?

Request: double click hint mode?

Would like to be able to double click on icons--is this possible already? If not, could an option be added for it?

(Didn't see this when searching issues)

Chrome/Chromium/Firefox support

Chromium and Firefox and other non-native applications do not enable Accessibility by default for performance reasons. You need a way to tell them to enable accessibility, and preferably not keep it on all the time. Ideally, you would only enable it right before querying for elements.

The AXEnhancedUserInterface attribute is used by VoiceOver to tell applications that VoiceOver is enabled. Chromium waits for this to be set to true before enabling its Accessibility features. See (https://www.chromium.org/developers/design-documents/accessibility)

Chromium support through AXEnhancedUserInterface was removed in PR #62 because the AXEnhancedUserInterface attribute when set to 1 on an AXWindow breaks window positioning (sluggish too) with window managers like Magnet.

Electron allows you to enable accessibility through the AXManualAccessibility attribute, which does not have that window side-effect. Vimac currently sets this attribute to true on frontmost windows.

However, if you would like Vimac to work with Chrome, you can enable Accessibility at all times by enabling it at chrome://accessibility/:

Screenshot 2020-12-06 at 3 17 46 PM

EDIT:

I have filed issues with Apple, Chromium, and Firefox:

https://developer.apple.com/forums/thread/659755
https://bugs.chromium.org/p/chromium/issues/detail?id=1127357
https://bugzilla.mozilla.org/show_bug.cgi?id=1664992

Far more hints than Vimari?

Hi— thanks for making such a powerful tool.

For the last few months I've been using Vimari https://github.com/televator-apps/vimari (Safari port of Vimium).

I noticed that Vimac creates far more hint options than Vimari, given the same page.

It seems like there is a ton of extra noise in there, which makes it not as easy to use.

Vimari:

Screen Shot 2020-07-16 at 3 50 53 PM

Vimac:

Screen Shot 2020-07-16 at 3 50 42 PM

Animated:

ezgif-6-156dbf0e8427

Missing / mis-prioritized hints in Discord (and maybe other electron apps)

As an example, in this picture vimac highlight's some random spots on the top bar instead of hinting the channel icons which would be actually useful.
Screenshot 2020-03-29 at 9 47 37

Is this because vimac uses some accessibility hints or something for figuring out what to hintify? Vimium etc. can give much more useful hints on web pages like discord's or slacks. I don't know if this is reproducable on vimac side but it would be the desirable behaviour for me as a user.

Text filtering

Is there any way to filter the hints according to underlying text?
Like enter Hint Mode => type characters => hints filter out only the relevant elements based on query

Customizable navigation keys

Dvorak typist here. It would be nice to be able to customize navigation keys. HJKL isn't exactly friendly on a Dvorak keyboard.

vim-like text input fields possible?

I was wondering if it was possible to add a simple vim-like text edit mode with insert and normal mode for system-wide text fields. So that you could basically use vim movements in any text field. I am already using an edit in vim automator action to edit long text but for simple text input fields (e.g. iMessage) having the basic movement and edit keys would be very nice.

Something akin to the vimode.py script for the weechat IRC client would suffice imo, it simulates most basic editing commands you'd use in a single line which really isn't as complicated as it sounds (or a whole VIM emulation would be).

So the question goes to you having the experience with the MacOS accessibility options - do you think this would be possible/feasible? If you have some pointers but no time to look at an implementation - I have some limited experience with MacOS / Swift development so I could take a stab.

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.