GithubHelp home page GithubHelp logo

toware's People

Contributors

sinarf avatar

Watchers

 avatar  avatar

toware's Issues

Create a tmux helper

In my dot files I use some helper scripts make my life easy.

This is a example I use for ssh, that allow me to create a new window for each server that have the name of the server:

#!/usr/bin/env bash

server=${1}

if [ -z \"$TMUX\" ]; then
  ssh -o RemoteCommand='bash -o vi' -o RequestTTY=yes ${server}
else
  tmux new-window \"ssh -o RemoteCommand='bash -o vi' -o RequestTTY=yes ${server}\"
  short_name=$(echo \"${server}\" | cut -f1 -d'.')
  tmux rename-window \"${short_name}\"
fi

And I have an alias that overrides the ssh commands.

And I would like to have a way of instead of creating a script for every tools, having a tool that allow me to specify how new tmux window should be created and named, and maybe having a way to generate aliases.

The config file could look like this (format not chosen yet)

command = ssh   # command to override with an alias
naming_rules = {}  # Optional, by default should be the command itself. Could be a functionthat parse the paramters, in the example extract the base server name.

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.