Skip to main content

Command plugin for Plover to run an arbitrary shell command

Project description

Plover Run Shell

Command plugin for Plover to run an arbitrary shell command.

The package is available on GitHub and PyPI.

Usage

In order to use this plugin in Plover you need to create a dictionary entry of the form:

{
    "example_stroke": "{PLOVER:SHELL:command}"
}

Note:

  • The command might be executed synchronously (so you can use & on Linux or start on Windows if you don't want Plover to freeze, in case the called process is long-running).
  • (on UNIX systems) The command may be executed by the sh shell. If you want to use another shell, you can call that shell explicitly: bash -c "command".

Example

These examples are only for X on GNU/Linux systems (it relies on many external tools).

You should be able to construct similar translations by searching for "how to do task X from console/command-line".

If there's none, you can still write an external program with other programming language and call it from Plover. (alternatively, write it in Python and make a command plugin)

Alternatively, if you already have a working binding in the windows manager, you don't have to use this plugin and use Plover's key combination syntax.

  • Shutting down the machine

    "{PLOVER:SHELL:\\{ sleep 2s;poweroff; \\}&}{PLOVER:QUIT}"
    
  • Restart Plover (console GUI, in a new terminal)

    "{PLOVER:SHELL:xterm -e bash -c \"sleep 0.5s; plover --gui console\" &}{PLOVER:QUIT}"
    
  • Change brightness

    "{PLOVER:SHELL:xbacklight -10}"
    "{PLOVER:SHELL:xbacklight +10}"
    
  • Change volume (note that the solution with pactl is not robust because it relies on the sink number being 0)

    "{PLOVER:SHELL:pactl set-sink-volume 0 -5%}"
    "{PLOVER:SHELL:pactl set-sink-volume 0 +5%}"
    "{PLOVER:SHELL:amixer -D pulse sset Master 5%+}"
    "{PLOVER:SHELL:amixer -D pulse sset Master 5%-}"
    
  • Suspend (depends on your GNU/Linux distribution)

    "{PLOVER:SHELL:systemctl suspend}"
    "{PLOVER:SHELL:pm-suspend}"
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plover_run_shell-0.0.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

plover_run_shell-0.0.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file plover_run_shell-0.0.2.tar.gz.

File metadata

  • Download URL: plover_run_shell-0.0.2.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2

File hashes

Hashes for plover_run_shell-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4dc5b60bda5088c750813558c3b5c8a941dc8dd3883c6171f70786c0163e42ba
MD5 e68cfec2db08d859f78e091e37da4e0c
BLAKE2b-256 90dc6b2a098ffdcb78cbd2768abedf8c83fe62c0a9c9650892426e94b050027b

See more details on using hashes here.

File details

Details for the file plover_run_shell-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: plover_run_shell-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2

File hashes

Hashes for plover_run_shell-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf64ec348d25fad5cb999d872f035cbac4fbed1d5a57e26903d279b3389d763e
MD5 761219f35b8666a97459ad92a1e1a7b9
BLAKE2b-256 8ef4be5ed5785a7ea1fc719d3172affd8fb2d3bec6a96ee7e935dbc89df1ada9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page