/plumber

Launch application depending on regex

Primary LanguageCGNU General Public License v3.0GPL-3.0

Plumber

Pass messages between applications. Designed to use with my build of ST.

Description

This program is inspired by the right click to plumb patch for the Simple Terminal.

I started using the patch with surf (lighweight suckless browser) as my plumb command, but after looking at the Plan9 plumbing page, I decided to make my own personal version.

Building

$ git clone https://github.com/8dcc/plumber
$ cd plumber
$ make
...

$ sudo make install
...

Usage

Note that the commands on the right are the default ones but can be changed from src/config.h

$ plumber --help
    plumber https://example.com  - Open in browser (firefox)
    plumber file.pdf             - Open in PDF viewer (firefox)
    plumber cmd(1)               - Open man page (man)
    plumber image.png            - Open in image viewer (feh)
    plumber video.mkv            - Open in video player (mpv)
    plumber file.txt             - Open in text editor (nvim)
    plumber source.c:13:5        - Open at line and column (nvim)