Coder Social home page Coder Social logo

shellfutures's Introduction

shellfutures

poor men's asynchronous shell

Motivation

fire a launcher. write x <command>. when the command completes, receive the output as notification.

In a few more words: Assuming you run a window manager (dwm recommended) and love to work on a shell but hate to fire a terminal-emulator just to type a command, view the output and close again. It is too much key strokes, it is annoying to go away from the window you are currently working on (e.g. browser) and it's annoying to be blocked waiting until the command returns (while you could go on browsing or editing or whatever).

Here comes shellfutures. Think of it as a subscription to the output of a command. I invoke it as x from dmenu which is bound to alt-p in my dwm. It evals what I provide as command + arguments and when done presents me stdout/stderr in a notification (dunst on my end). Another good think -- you can close the notification or it just takes care of itself and expires, unlike a terminal; or it adheres to whatever notification policy you have.

You might even want a keybinding in dwm to something like x $(alias|cut -d= -f1|dmenu) to save a keystroke of typing x. I don't :o)

Too much words for effectively 10 LOC.

Take a look, adjust to your environment and likings and enjoy.

Usage

  1. fire a launcher (e.g. alt-p in dwm)
  2. write 'x' (or the name of the SHELLFUTURES executable if changed) followed by the shell command, e.g. x ll or x lynx -dump -nolinks -nonumbers reddit.com
  3. if the command takes longer to execute, you can continue undisturbed your workflow
  4. after the command is completed, its output is shown in a notification window

Dependencies

  • notify-send; you may want to use dzen2 or similar instead
  • traditional UNIX userland

shellfutures's People

Contributors

cmapyopc 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.