Git Product home page Git Product logo

spicy-strings's Introduction

spicy-strings

This program is under development. Expect breaking changes. This readme file may not be up to date.

This repository is based on the hotstrings script from cryzed/bin.

There might be better ways to do some of the things I wrote these scripts for, or even already existing solutions I simply didn't know about; if you think you know of either one please let me know.

Usage

$ hotstrings --help
usage: hotstrings [-h] [path]

positional arguments:
  path        Path to JSON file containing hotstring definitions

optional arguments:
  -h, --help  show this help message and exit

This script is a much lighter version of AutoKey, specifically the AutoKey-py3 fork. Since there was a recent update to the official python-xlib which breaks compatibility with the fork, and the fork also doesn't seem to be actively maintained anymore, I wanted to preemptively find another solution before AutoKey-py3 eventually stops working entirely on my system.

This pretty much implements only the functionality I actually use: replacing hotstrings and running commands; basically you type text and it is either replaced by the given replacement string or a specified command is run (optionally replacing the hotstring with its stdout output). Dependencies are Python 3 and the the official python-xlib or LiuLang's fork which is used by AutoKey-py3.

An example configuration file might look like this:

$ cat ~/.config/hotstrings.json
{
    "first": ["replace", "replacement 1"],
    "second": ["replace", "replacement 2"],
    "third": ["run", "sh", "-c", "touch ~/Desktop/hello_world.txt"],
    "fourth": ["run-replace", "date"],

    // doesn't strip whitespace at the beginning and end of the output
    "five": ["run-replace-raw", "date"]
}

spicy-strings's People

Contributors

cryzed avatar leosanvieira avatar mtnakayama avatar pentix avatar

Forkers

hitomi-nakayama

spicy-strings's Issues

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.