emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/logos ddf1040e29: Add docs on how to auto-toggle menu a


From: ELPA Syncer
Subject: [elpa] externals/logos ddf1040e29: Add docs on how to auto-toggle menu and tool bars
Date: Fri, 19 Aug 2022 22:57:55 -0400 (EDT)

branch: externals/logos
commit ddf1040e2964c121cb2448deef04b7abaa827b05
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Add docs on how to auto-toggle menu and tool bars
    
    This is in response to a request by Ypot in issue 2 on the GitHub
    mirror: <https://github.com/protesilaos/logos/issues/2>.
---
 README.org | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/README.org b/README.org
index ba4782021e..5c2ead1d95 100644
--- a/README.org
+++ b/README.org
@@ -486,6 +486,33 @@ not needed, the following will suffice:
 (add-hook 'logos-focus-mode-extra-functions #'my-logos-org-indent)
 #+end_src
 
+*** Disable menu-bar and tool-bar
+:PROPERTIES:
+:CUSTOM_ID: h:8914f8fc-e6e9-440e-b037-f934e08ee1ae
+:END:
+
+Continuing with the examples in this section of the manual, this is how
+to disable the ~menu-bar-mode~ and ~tool-bar-mode~ when activating the
+~logos-focus-mode~.
+
+#+begin_src emacs-lisp
+;; Assuming the `menu-bar-mode' is enabled by default...
+(defun my-logos-hide-menu-bar ()
+  (logos--mode 'menu-bar-mode -1))
+
+(add-hook 'logos-focus-mode-extra-functions #'my-logos-hide-menu-bar)
+
+;; Assuming the `tool-bar-mode' is enabled by default...
+(defun my-logos-hide-tool-bar ()
+  (logos--mode 'tool-bar-mode -1))
+
+(add-hook 'logos-focus-mode-extra-functions #'my-logos-hide-tool-bar)
+#+end_src
+
+If those modes are already disabled, the following have no effect.
+Otherwise they toggle the bars off while ~logos-focus-mode~ is enabled
+and then restore them back on when ~logos-focus-mode~ is disabled.
+
 ** Update fringe color on theme switch
 :PROPERTIES:
 :CUSTOM_ID: h:6a254fa0-5706-4032-8a8b-233ffb1f0e6b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]