/wmii-session

OBSOLOET use github.com/ctx/ws-session

Primary LanguageShell

OBSOLET use github.com/ctx/ws-session

wmii-session

Save the open windows of your favorite programs from one wmii tag to a folder.

Link your sessions to projects or tasks from taskwarrior.

Restore a session on a new wmii tag.


DEPENDENCIES


Needed: wmii, xdotool (only for luakit)

Editor: gvim

Helper: task (taskwarrior.org), surfraw, tabbed

Browser: luakit, patched vimprobable2, surf Chromium (uses ~200MB for every session)

PDF: zathura


INSTALLATION


  • Copy session.sh and wmiirc_local to .wmii-hg. Copy the files from bin to /usr/bin or ~/bin.

  • If you like to use vimprobable2 or zathura you have to apply the patches.


CONFIGURATION


  • Configuration variables ar at the beginning of the file session.sh.

  • Add the following to your shell rc. This makes it possible to save vim sessions and the shell history:

      WI_NAMESPACE="$(wmiir ls / 2>/dev/null)"
    
      if [ $WI_NAMESPACE ];then
          # Separat shell history for each tag
          TAG="$(wmiir cat /tag/sel/ctl | sed '1q')"
          
          mkdir -p $WI_NAMESPACE/$TAG
          export HISTFILE=$WI_NAMESPACE/$TAG/history
          
          # Start vim as server
          alias vim="vim --servername \"$TAG\""
      else
          export HISTFILE=~/.history
      fi
    
      unset WI_NAMESPACE TAG
    

USAGE


  • run wmii-session wmii-browser and wmii-pdf and/or try the sample wmiirc_local

  • If you save two session templates named foo and foo.bar, you can open a task in project foo.bar.baz with no saved session and the session template foo.bar will be loaded. If you open a task in the project foo.baz.blah the template foo will be loaded.

  • Open chromium with the wmii-chromium command. This uses too much hd space.


TODO


  • A "plugin system" that allows easy adding:

      * support for more applications (example vim: 147 to 173 in session.sh)
    
      * and support for other wms (example wmii: 120 to 145 in session.sh).
    
  • use dmtcp

  • bugs