GithubHelp home page GithubHelp logo

sylvianhemus / workgroups2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pashinin/workgroups2

0.0 0.0 0.0 578 KB

Workgroups2 - Emacs session manager

Home Page: http://workgroups2.rtfd.org/

License: GNU General Public License v3.0

Shell 0.30% Emacs Lisp 99.05% Makefile 0.65%

workgroups2's Introduction

Workgroups2

https://github.com/pashinin/workgroups2/actions/workflows/test.yml/badge.svg http://melpa.org/packages/workgroups2-badge.svg http://stable.melpa.org/packages/workgroups2-badge.svg

This program can save&load multiple named workspaces (or “workgroups”),

  • Save all opened buffers, their location and sizes on disk to restore later
  • Restore special buffers as: org-agenda, shell, magit-status, help, pdf-tools
  • Users can set up to support any special buffer (restoring the page number and notes of pdf file, for example)

Fork it, add more special buffers support. Or even better - fix bugs.

Install

Just install “workgroups2” from Melpa and activate it with

(require 'workgroups2)

Usage

Quick Start

Use M-x wg-create-workgroup to save save window&buffer layout as a work group.

Use M-x wg-open-workgroup to open an existing work group.

Use M-x wg-kill-workgroup to delete an existing work group.

Enable minor mode workgroups-mode (OPTIONAL)

Put below line at the bottom of .emacs,

(workgroups-mode 1)

Most commands are bound to both <prefix> <key> and <prefix> C-<key>.

By default prefix is: “C-c z” (To change it - see settings below)

<prefix> <key>
<prefix> C-c    - create a new workgroup
<prefix> C-v    - open an existing workgroup
<prefix> C-k    - delete an existing workgroup

If you want to set up this minor mode further:

(require 'workgroups2)
;; Change prefix key (before activating WG)
(setq wg-prefix-key "C-c z")

(workgroups-mode 1)   ; put this one at the bottom of .emacs

Tips (OPTIONAL)

Change workgroups session file

Use below code

(setq wg-session-file "~/.emacs.d/.emacs_workgroups")

Support special buffer

Here is minimum sample code to support ivy-occur-grep-mode,

(with-eval-after-load 'workgroups2
  ;; provide major mode, package to require, and functions
  (wg-support 'ivy-occur-grep-mode 'ivy
              `((serialize . ,(lambda (_buffer)
                                (list (base64-encode-string (buffer-string) t))))
                (deserialize . ,(lambda (buffer _vars)
                                  (switch-to-buffer (wg-buf-name buffer))
                                  (insert (base64-decode-string (nth 0 _vars)))
                                  ;; easier than `ivy-occur-grep-mode' to set up
                                  (grep-mode)
                                  ;; need return current buffer at the end of function
                                  (current-buffer))))))

FAQ

Simon Michael (AKA) has written a nice FAQ.

License

workgroups2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

workgroups2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

This extension is based on experimental branch of the original repo.

workgroups2's People

Contributors

pashinin avatar abstraktnull avatar tumashu avatar fishyfriend avatar builtinnya avatar ju-sh avatar syohex avatar simonmichael avatar pitometsu avatar il-k avatar tangxinfa 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.