Giter Club home page Giter Club logo

kitty-hintsconfig's Introduction

kitty-hintsconfig

Summary

Helps you build a centralized config for kitty regarding markers and hints.

There are two lists of items:

  • A list of regular expressions and marker number for markers.
  • A list of regular expressions and actions for hints.

Goal was mainly to be able to handle many hints or markers using only one mapping.

Setup

Clone this project; easiest is to clone in kitty config folder:

cd ~/.config/kitty
git clone https://github.com/Lqp1/kitty-hintsconfig

Prior to its usage, install all dependencies:

pip install --user -r requirements.txt

Markers

Marker regular expressions are case insensitive. You may need to set the colors for the 3 markers slot as you wish in your kitty configuration:

mark1_background green
mark2_background orange
mark3_background red

To use this tool to read markers, you can setup a mapping to toggle its usage:

map f1 toggle_marker function kitty-hintsconfig/kitty-hintsconfig.py

For each marker, you should define a regexp which is Python regexp, and a marker which is the marker number you want to associate.

Hints

Hints regular expressions are case sensitive.

You'll need to add a mapping to open this script:

map ctrl+shift+o kitten hints --customize-processing ~/.config/kitty/kitty-hintsconfig/kitty-hintsconfig.py

For each hint, you should define a regexp which is Python regexp, and an action which can either be:

  • link: to open a link in your browser
  • process: to spawn a process

For the action, {} will be substituted by the first group defined in the regexp.

Config

There is a built in default config, which can be used for testing. For actual usage, create a ~/.config/kitty/hints.yaml file to make your own config. There is an example at the top of this repository.

kitty-hintsconfig's People

Contributors

lqp1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.