Giter Club home page Giter Club logo

tmux-save-sessions's Introduction

tmux-save-sessions

Save and restore tmux sessions in bash

There are many ways to tmuxinate, but I just want a bash script of my tmux sessions.

Usage

./tmux-save-sessions

All sessions, windows, panes, running commands and layouts get saved as a bash script in the current directory named sessions-${timestamp}.sh

To restore a session, execute the generated script.

  ./sessions-2014-08-12-4423.sh

Run ./tmux-save-sessions multiple times to save different snapshots of your sessions.

Requirements

tmux 1.9
bash




Inspired by all the other scripts out there and this snippet from the tmux manpage:

In addition, select-layout may be used to apply a previously used layout
 - the list-windows command displays the layout of each window in a form
 suitable for use with select-layout.  For example:

       $ tmux list-windows
       0: ksh [159x48]
           layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
       $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}

 tmux automatically adjusts the size of the layout for the current window
 size.  Note that a layout cannot be applied to a window with more panes
 than that from which the layout was originally defined.

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.