Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-request] Tab-bar-mode integration #122

Open
CsBigDataHub opened this issue Dec 15, 2020 · 2 comments
Open

[feature-request] Tab-bar-mode integration #122

CsBigDataHub opened this issue Dec 15, 2020 · 2 comments

Comments

@CsBigDataHub
Copy link

CsBigDataHub commented Dec 15, 2020

allow keeping a distinct set of tabs per-perspective.

from README of https://github.com/nex3/perspective-el

Tab Bar maintains window layouts (with optional names). In this, it is similar to Perspective. Unlike Perspective, it does not support buffer lists. Using Perspective and Tab Bar at the same time is not recommended at this time, since the tab list is global (i.e., will show up in all perspectives) and is likely to cause confusion. It would be an interesting future feature for ?Perspective to adopt the tab bar and allow keeping a distinct set of tabs per-perspective.

Opening a issue similar to nex3/perspective-el#138

@LemonBreezes
Copy link

  (add-hook 'persp-before-deactivate-functions
            (defun +workspaces-save-tab-bar-data-h (_)
              (when (get-current-persp)
                (set-persp-parameter
                 'tab-bar-tabs (tab-bar-tabs)))))

  (add-hook 'persp-activated-functions
            (defun +workspaces-load-tab-bar-data-h (_)
              (tab-bar-tabs-set (persp-parameter 'tab-bar-tabs))
              (tab-bar--update-tab-bar-lines t))))

This snippet has been working for me.

@roife
Copy link
Contributor

roife commented Dec 23, 2022

The snippet saves the configuration of tab-bar to files:

(add-hook 'persp-before-save-state-to-file-functions
              (defun +workspaces-save-tab-bar-data-to-file-h (&rest _)
                (when (get-current-persp)
                  (set-persp-parameter 'tab-bar-tabs (frameset-filter-tabs (tab-bar-tabs) nil nil t))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants