Emacs: Only show treemacs in the first frame.

This commit is contained in:
tastytea 2020-11-29 15:50:02 +01:00
parent 8757dfc12b
commit d5fc9af5c8

View File

@ -1,6 +1,6 @@
;;; ui.el --- Configure user interfaces. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-11-29T11:51:57+0100>
;; Time-stamp: <2020-11-29T15:49:11+0100>
;;; Commentary:
;; * treemacs
@ -30,7 +30,8 @@
'hl-line-treemacs-face))
(defun my/treemacs-show-maybe ()
(when (and (>= (frame-width) 120)
(file-exists-p treemacs-persist-file))
(file-exists-p treemacs-persist-file)
(<= (length (frame-list)) 2))
(treemacs-select-window)
(other-window 1))))
:bind (("<f9>" . treemacs-select-window) ; Focus treemacs.