Giter Site home page Giter Site logo

brpaz / quickeys Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 0.0 135 KB

Linux GTK application that provides an overlay window with the list of shortcuts for the current focused application. Its a shortcut for shortcuts.

License: MIT License

Python 98.35% Makefile 1.65%
python gtk3 linux-app appindicator shortcuts-cheat-sheet

quickeys's Introduction

Quickeys

Linux application that provides an overlay window with the list of shortcuts for the current focused application. Inspired by Mac OS applications CheatSheet and pretzel.

screenshot

This was tested on Ubuntu 18.04.

System Requirements

  • Python 3
  • GTK > 3.14
  • AppIndicator3

Install

For now the only way to install this application is installing from source. I would like to provide flatpak, snap, deb support in the future. If you know how to package Python apps in these formats, PRs are welcome ;)

make install

Supported Applications

Right now, this application supports displaying shortcuts for:

  • Gedit
  • Google Chrome
  • Visual Studio Code
  • JetBrains Applications
  • Firefox
  • Pinta

More applications will be added later. Contributions are always welcome.


FAQ

How do I add / change shortcuts?

Shortcuts are configured in YAML files in the data/shortcuts directory of the source code. The files in that directory are copied to ~/.config/quickkeys/shortcuts when starting the application for the first time.

As a user, you can change / add shortcuts directly to the .config directory as the application reads from it at runtime.

The filename should be the name of the executable of the application. In general you can get it from the command line like so:

  • Get the pid of your application. (Ex: ps ax | grep firefox)
  • Run cat /proc/{pid}/comm. The value displayed there should be the name of your shortcuts file.

Some applications like Java applications doesnt work like that and returns a generic "Java" from the previous command. In that case we need to modify the source code to be able to identify the application in other away. Workarounds for Jetbrains and Pinta are already implemented. Please see the function "get_active_application" in "quickeys/application.py" for details.

The yaml file should have the following structure (taken from Gedit shortcuts file):

Tabs:
  - Switch to the next tab to the left: <Control><Alt>Up
  - Switch to the next tab to the right:  <Control><Alt>Right
  - Close tab:  <Control>W
  - Save All tabs: <Control><Shift>L
  - Close All tabs: <Control><Shift>W
  - Reopen the most recently closed tab: <Control><Shift>T
  - Jump to nth tab: <Alt>N
  - New Tab Group: <Contol><Alt>N
  - Previous tab Group: <Shift><Ctrl><Alt>Up
  - Next tab group: <Shift><Control><Alt>Down
  • This format is the same from Pretzel.
  • The shortcut combination should follow a pattern supported by "gtk_accelerator_parse" Ex: “a” or “F1”.

How do I start quickeys at start-up?

  • Create a new startup application and use "quickeys" as command.

Todo

  • Build a proper installer (pip, deb, flatpak).
  • Add more applications. (Contributors welcome)
  • Is there any way in Linux to get an application registered shortcuts automatically??
  • Improve docmentation on accelerators.

Contributing

  • All contributions are welcome. Please read CONTRIBUTING.md for more details.

License

MIT

quickeys's People

Contributors

brpaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

quickeys's Issues

Java based applications not working (Ex: PHPStorm)

The way I am doing to get the active application window doesn't work fine with PHPStorm for example and I guess other JAVA based apps.

Investigate ways to handle it. A possible workaround would be to get the window title and do some mappings for common applications.

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.