Git Product home page Git Product logo

screen-dialog's Introduction

screen-dialog

Dialog for launching GNU screen sessions

The default action for each menuitem is to treat it as host and open a corresponding ssh session.

USAGE

Append to your .screenrc configuration file:

screen -t menu 0 ${HOME}/bin/s-dialog.pl

(Alter the path to where you placed the script accordingly.)

CONFIG

Configuration items will be loaded from $HOME/.s.conf in simple yaml format:

---
screen: /usr/bin/screen
ssh: /usr/bin/ssh
sshproxyhost: jump-server.example.com
hostsfile: /home/username/.hosts

MENUITEMS

HOSTS

The script is fairly flexible in what format it will parse.

plain hostsname: server01.example.com

hostname with username: [email protected]

hostname with username and a tag comment: [email protected] # mail server

hostname and port with username and a tag comment: [email protected]:2222 # lab server

See the included example .hosts file.

NON-HOSTS

Not everything in the hosts file necessarily has to be a plain host. Other actions are available, but currently this is hard-coded into the script. Near the top, there is a dispatch table "$do" where handling for other items can be placed.

For example, the 'corelist' key refers to the screenopenlist function, passing the filename ${HOME}/.hosts.coreservers as a parameter. This means that if you add an entry to your hosts file called 'corelist', choosing that menu item will cause the s-dialog script read the file $HOME/.hosts.coreservers file and beginning acting on every line in the file. This can be used to keep a default set of screen windows that you wish to open automatically after choosing the 'corelist' menuitem.

KEY BINDINGS

Searching is accomplished by simply starting to type on the keyboard. The list of entries will begin reflecting the pared down list of hosts immediately in an incremental search fashion.

Acceptable keys for searching:

  • a-z
  • 0-9
  • .
  • Backspace also behaves as expected.

Other keys:

  • F9 or CTRL-x - Menu
  • Spacebar - Instead of creating a new window for the selected menu item, try switching to an existing instance.
  • / - Show an actual search filter dialog box

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.