Emacs: Only open treemacs automatically if window-width is >= 120.

This commit is contained in:
tastytea 2020-03-27 00:05:09 +01:00
parent b26dcdb2dd
commit 7660013ead
1 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-03-18T14:58:25+0100>
;; Time-stamp: <2020-03-27T00:04:55+0100>
;;; Commentary:
@ -110,9 +110,10 @@ collapse other projects."
(if (member 'counsel-projectile-mode minor-mode-list)
(counsel-projectile-find-file)
(projectile-find-file))
(treemacs-add-and-display-current-project)
(treemacs-collapse-other-projects)
(other-window 1))
(when (>= (window-total-width) 120)
(treemacs-add-and-display-current-project)
(treemacs-collapse-other-projects)
(other-window 1)))
(defun my/projectile-kill-buffers ()
"Kill project buffers and delete other windows."