emacs-devel
[Top][All Lists]
Advanced

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

Re: Solution to a proposed FAQ, how to maximize emacs quickly (like `ema


From: Björn Bidar
Subject: Re: Solution to a proposed FAQ, how to maximize emacs quickly (like `emacs --maximize`) for GNU/Linux
Date: Tue, 26 Sep 2023 17:12:03 +0300
User-agent: Gnus/5.13 (Gnus v5.13)

David Hedlund <public@beloved.name> writes:

> As far as I know, this cannot be done entirely with Emacs LISP for
> GNU/Linux, but I found a workaround by combining it with devilspie2.
>
> [1]: Workaround to bug: maximize* commands don't work for Emacs -
> https://savannah.nongnu.org/bugs/index.php?63979

There are a few ways to achieve this on Linux. The Emacs wiki has a some
examples, e.g:

(defun toggle-fullscreen ()
  "Toggle full screen on X11"
  (interactive)
  (when (eq window-system 'x)
    (set-frame-parameter
     nil 'fullscreen
     (when (not (frame-parameter nil 'fullscreen)) 'fullboth))))

Or:
(defun switch-full-screen ()
       (interactive)
       (shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))

The first example also could work with PGTK, but the example only checks for
window system of x build . I'm not sure how exactly fullscreen should be
done on Wayland.

Is the builtin function `toggle-frame-fullscreen` enough?





reply via email to

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