Code Monkey home page Code Monkey logo

xpander's Introduction

xpander

About

Xpander is a text expander for Linux written in python.

You type an abbreviation and it's automatically expanded to a predefined block of text called a phrase. This is useful when filling out forms, coding and whenever else you need to write the same block of text over and over. Each phrase is stored as JSON file in a user configurable directory, default is ~/.phrases.

Xpander features full support for multiple keyboard layouts (up to 4), filtering by window and token expansion:

  • $| marks where cursor will be placed after expansion;
  • $C is replaced by clipboard contents;

You can also mark a phrase as a command. In this case phrase contents are interpreted as command line and it's output pasted instead.

When putting tabs in phrase body and setting sending method as keyboard actual Tab keypresses are sent. This means you can fill several form fields in one go, simply by separating with tabs.

Background

I've been using AutoHotkey's hotstrings quite a bit on Windows and been looking for something similar on Linux.

All I found was Autokey which doesn't appear to be maintened anymore and does not play nice with multiple keyboard layouts, so I set out to write my own text expander.

Installation and Dependencies

For multiple keyboard layout support Xpander relies on xkb-switch, I compiled it and packaged for debian, you can find it here.

Other dependencies should be in the repositories for your distro:

sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-glib-2.0 python3-xlib

(You probably have most of these installed already if you're on a gnome based distro.)

Recommended way to install is to skip installation and run from source. (I suck at packaging.)

If you must install there's a deb in the releases.

You can also run sudo pip3 install https://github.com/OzymandiasTheGreat/xpander/archive/master.zip

xpander's People

Watchers

 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.