Giter Club home page Giter Club logo

yakuake-sessions's Introduction

Yakuake session management

Updated in November 2022 to work with newer Python and Yakuake version!

Requires: yakuake, qdbus (libqt4-dbus), pwdx (procps), ps (procps)

Tested on: Fedora 36 with Python 3.10.8 and Yakuake 22.08.1

Does not support old versions of yakuake that use DCOP instead of DBUS.

ysess is a script that gathers as much info as possible from a running yakuake instance and saves it out in INI format. It can then take this same INI file as input and (destructively! *) reconstruct the yakuake session.

* As part of the reconstruction process, ysess destroys all current tabs in yakuake before restoring from the INI file.

Currently, ysess will save the following information:

  • tab order
  • tab title
  • active tab
  • per-tab working directory
  • per-tab active command

Per-tab active command is supported to allow resuming long-running commands, like top.

$ ysess --help Usage: ysess [options]

Save and load yakuake sessions. Settings are exported in INI format. Default action is to print the current setup to stdout in INI format.

Options:
-h, --help show this help message and exit
-i FILE, --in-file=FILE
 File to read from, or "-" for stdin
-o FILE, --out-file=FILE
 File to write to, or "-" for stdout
--force-overwrite
 Do not prompt for confirmation if out-file exists

To use in your crontab -- and I have no clue why this works -- prepend the command with DISPLAY=:0.0:

* * * * * DISPLAY=:0.0 ysess -o ~/yakuake.ini --force-overwrite

In the future...

I hope to add some features:

  • Save per-tab shell environment (so, for example, virtualenvs can be restored)
  • Allow a whitelist or blacklist for which active commands to save
  • Maybe, eventually, DCOP support for users stick with older yakuake versions

yakuake-sessions's People

Contributors

eternicode avatar martin-1997 avatar nekmo avatar

Stargazers

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