Git Product home page Git Product logo

rofi-i3-shortcut-help's Introduction

Rofi i3 Shortcut Help

Summary

This is a small shell modi script for rofi for presenting keybinding hints. It is intended for use with the i3 window manager but it's also able to display keybindings from any suitably formatted config file.

The program functions by scanning and parsing comments in a specific format (use by regolith remontoire tool and described directly below), then displaying them in rofi.

Screenshot of the rofi helper running

Model

This script utilizes the concept of a category to group items, action to denote the human description, and keybinding to define the specific keys corresponding to the action. The format is designed to be both easily parsable by program but also readable in it's native form by people:

## <category> // <action> // <keybinding> ## <reserved for user notes>

Text within <category>, <action>, and <keybinding> must not contain the sequences ##, //, or line feeds.

Examples:

...
## Navigate // Relative Window // <Super> ↑ ↓ ← → ##
bindsym $mod+Left focus left
...
## Launch // Application // <Super> Space ## some extra notes that are ignored by Remontoire but maybe of interest to those reading the config file.
bindsym $mod+space exec $i3-wm.program.launcher.app

Any line that doesn't contain the structure listed here will be ignored.

Requirements

You need:

  • rofi >= 1.6.0
  • xmlstarlet package (use to escape input for pango markup).
  • i3-msg binary from i3 in order to launch the command associated to the shortcut.

Usage

Update the CACHE_FILE and CONFIG variable to your need or set and export them before calling the rofi command.

Launch the script with:

rofi -modi shortcut:~/full/path/to/shortcut.sh -show shortcut

You may add the following bindsym in you i3 config file:

# For french keyboard
## System // Shortcut help //  ? ##
bindsym $mod+shift+comma exec rofi -modi shortcut:~/.config/rofi/scripts/shortcut.sh -show shortcut

Selecting a shortcut launch the associated command via i3-msg.

rofi-i3-shortcut-help's People

Contributors

aloispichler avatar matclab avatar

Stargazers

Logan Linn avatar Cedric avatar Wesley Jr. avatar  avatar Chinmay  avatar  avatar

Watchers

James Cloos avatar  avatar Kostas Georgiou avatar  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.