Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/8dcc/plumber
Run different commands depending on the text format
https://github.com/8dcc/plumber
plan9 plumber regex utility
Last synced: 23 days ago
JSON representation
Run different commands depending on the text format
- Host: GitHub
- URL: https://github.com/8dcc/plumber
- Owner: 8dcc
- License: gpl-3.0
- Created: 2023-10-03T19:17:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-01T10:11:17.000Z (29 days ago)
- Last Synced: 2025-01-01T22:19:58.183Z (29 days ago)
- Topics: plan9, plumber, regex, utility
- Language: C
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: Plumber
#+AUTHOR: 8dcc
#+OPTIONS: toc:2
#+STARTUP: showeverything*Run different commands depending on the text format.*
This program is inspired by the [[https://st.suckless.org/patches/right_click_to_plumb/][right click to plumb]] patch for the [[https://st.suckless.org/][Simple
Terminal]], and was originally designed to be used with [[https://github.com/8dcc/linux-dotfiles][my build of ST]].I started using the patch with [[https://surf.suckless.org/][surf]] (lighweight suckless browser) as my plumb
command, but after looking at the [[https://9p.io/wiki/plan9/using_plumbing/index.html][Plan9 plumbing page]], I decided to make my own
personal version.* Building
To build the program, simply run =make=.
#+begin_src console
$ git clone https://github.com/8dcc/plumber
$ cd plumber
$ make
...
#+end_srcYou can also install it with the =install= target.
#+begin_src console
$ sudo make install
...
#+end_src* Usage
Note that the commands on the right are the default ones but can be changed from
[[https://github.com/8dcc/plumber/blob/main/src/config.h][src/config.h]].#+begin_src console
$ plumber --help
Usage: plumber [REGEXP]
Examples:
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 (nsxiv)
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)
#+end_src