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: David Hedlund
Subject: Re: Solution to a proposed FAQ, how to maximize emacs quickly (like `emacs --maximize`) for GNU/Linux
Date: Wed, 27 Sep 2023 13:21:59 +0200
User-agent: Mozilla Thunderbird


On 9/27/23 00:33, Emanuel Berg wrote:
David Hedlund wrote:

Thank you, but none of the solutions worked in Trisquel 11
(X11)
$ wmctrl -r :ACTIVE: -b toggle,maximized_horz,maximized_vert

To always set, use 'add' instead of 'toggle'. To always unset,
use 'remove'.

Thank you, this is exactly what I want! It expands the window quickly (like emacs -mm) from the terminal.


* This works from the terminal with an open emacs Window: $ wmctrl -i -r "0x06400142" -b toggle,maximized_vert,maximized_horz


* However     shell-command "wmctrl... doesn't not run from ~/.emacs (tried it in a fresh Trisquel 11 installation from a virtual machine), the window size is opened in the default size:

---
Failed the settings suggested by Björn Bidar (as I mentioned earlier):

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

---


Failed with the command that is working from the terminal (escaped double quotes, and made sure that the window is open and that the window ID is correct):

(defun switch-full-screen ()
       (interactive)
       (shell-command "wmctrl -i -r \"0x06400142\" -b toggle,maximized_vert,maximized_horz"))

---


Failed:

(defun switch-full-screen ()
       (interactive)
       (shell-command "wmctrl -r :ACTIVE: -b toggle,maximized_horz,maximized_vert"))


---

Any idea why shell-command is not executed?

reply via email to

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