Skip to main content

Control your computer from a web interface

Project description

Preview of webcon.

Control your computer through shell commands from a barebones web interface.

Simple YAML-based configuration.


pip3 install webcon

Tab completion

sudo activate-global-python-argcomplete

If you installed via pip, you may need to run the following before autocompletion works:

grep 'PYTHON_ARGCOMPLETE_OK' "$(which webcon)" &>/dev/null || sudo sed -i "1a # PYTHON_ARGCOMPLETE_OK" "$(which webcon)"


usage: webcon [-h] [--host HOST] [-p PORT] [config_file]

Control your computer through shell commands from a barebones web interface.

Configuration goes in ~/.config/webcon/config.yaml, or an alternate location
may be provided by command line argument.

Configuration format:

- Throughout the configuration, order of each mapping is taken into account to
  ensure the layout does not deviate from expectations.
- The top level of the configuration is a mapping.
- Variables in the top-level key `__variables__` will be substituted once via
  `str.format` throughout the entire file. This may be used to extract long
  constants, etc.
- Every other top-level key will define a service, and its value shall be a
  mapping of the actions it supports.
- Each action shall define a label/command pair, in the the form of
  `label: command`.

Example configuration:

        mpvfifo: ~/.local/share/mpv/fifo
        rewind: echo seek -5 > {mpvfifo}
        play/pause: echo cycle pause > {mpvfifo}
        fast forward: echo seek 5 > {mpvfifo}
        greet: say hello
        part: say farewell


- Define `mpvfifo` as a variable holding the location of a mpv fifo.
- Define a service `mpv`.
    - This service exports the actions `rewind`, `play/pause`, and
      `fast forward`. The actions are different echoes to `mpvffo`.
- Define a service `announcer`.
    - This service exports the actions `greet` and `part`. The actions are
    different phrases which will be synthesized through `say`.

positional arguments:
  config_file           The config file to use. Default:

optional arguments:
  -h, --help            show this help message and exit
  --host HOST           The server host. Default:
  -p PORT, --port PORT  The server port. Default: 8080

Project details

Download files

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

Files for webcon, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size webcon-0.0.5-py36-none-any.whl (15.3 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size webcon-0.0.5.tar.gz (12.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page