Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to put elscreen tabs on the top only?

I'm using elscreen in my GNU Emacs 24.2.1 Currently, when i split my window, I have a same tab panel in each half: elscreen http://i.zlowiki.ru/121101_0f30ebba.png/800 Note that the two lower windows have the same tabs as the largest one.

How can I remove these two duplicates, and keep only the top one?

If it is too hard, what another alternative could be used for GNU screen?

like image 245
Necto Avatar asked Nov 01 '12 12:11

Necto


1 Answers

Here's something to technically do what you asked:

(setq elscreen-display-tab nil) ; disable tabs display

;; get-alist was removed somewhere along the line
;; You can try substituting all instances of get-alist with assoc-default
;; instead of using defalias and see if that works; I haven't tried.
(defalias 'get-alist 'assoc-default) ; get-alist is gone

;; Put tabs display in your frame title bar instead.
(defun elscreen-frame-title-update ()
  (when (elscreen-screen-modified-p 'elscreen-frame-title-update)
    (let* ((screen-list (sort (elscreen-get-screen-list) '<))
           (screen-to-name-alist (elscreen-get-screen-to-name-alist))
           (title (concat "| " (mapconcat
                   (lambda (screen)
                     (format "%d%s %s |"
                             screen (elscreen-status-label screen)
                             (get-alist screen screen-to-name-alist)))
                   screen-list " "))))
      (if (fboundp 'set-frame-name)
          (set-frame-name title)
        (setq frame-title-format title)))))

(eval-after-load "elscreen"
  '(add-hook 'elscreen-screen-update-hook 'elscreen-frame-title-update))

enter image description here

I'm sure it's not what you had in mind, but hey, it's at the VERY top now and only at the top.

like image 86
deadghost Avatar answered Sep 30 '22 15:09

deadghost