Code Monkey home page Code Monkey logo

swmipc's Introduction

StumpWM IPC

A simple IPC server for StumpWM

Description

This is a simple IPC server for StumpWM, with an accompanying C client. This was written mainly to make myself familiar with unix domain sockets; StumpWM already has an IPC method based upon X11 atoms.

Building

The lisp server can be quickloaded, and the server started with the function #'simple-ipc-server:start-server. The client can be built by the usual ./autogen.sh ./configure make make install. After building, run swmipc --help for a list of options and their descriptions.

Usage

The swmipc executable can send commands to be executed as well as lisp forms to be evaluated. To evaluate lisp forms the variable simple-ipc-server:*allow-evaluation* must be T. There is also an interactive mode which reads input from the user and sends the appropriate request.

When reading commands from stdin every line is treated as a single command invocation.

During evaluation, standard output is bound to the socket stream, and printing to standard output will print back to swmipc.

Examples

$ swmipc -c echo-date "gnew mygroup"
Tue May 17 2022  7:18:05
$ swmipc -fi
swmipc> echo-windows
 0*St
swmipc> echo ^1Hi
Hi
swmipc> ^D
$ swmipc -fi
swmipc> swmipc quit
$ cat forms.lisp | swmipc -e -
...
$ cat one-cmd-per-line.txt | swmipc -c "echo Running commands from file" -

Notification Script

An example notification script:

#!/bin/sh
txt="^[^3NOTIFICATION:^] $@"
swmipc -fc "echo $txt"

swmipc's People

Contributors

szos avatar

Stargazers

 avatar

Watchers

 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.