LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to open Emacs in maximized window? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-open-emacs-in-maximized-window-803168/)

cola 04-20-2010 08:09 PM

How to open Emacs in maximized window?
 
Every time i open Emacs window,it opens with a
width=(monitor-width)/2;
height=(3/4)*(monitor-height)

I click the maximized icon every time.
How can i set the maximized emacs window as default?

Tinkster 04-20-2010 08:18 PM

Let me google this for you ...

cola 04-20-2010 08:33 PM

Done adding these lines in .emacs
Code:

(defun toggle-fullscreen ()
  (interactive)
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                        '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                        '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
)
(toggle-fullscreen)


metaposter 10-19-2010 07:23 PM

Quote:

Originally Posted by cola (Post 3942060)
Done adding these lines in .emacs
Code:

(defun toggle-fullscreen ()
  (interactive)
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                        '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                        '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
)
(toggle-fullscreen)


The above code used to work perfectly, but in emacs 23.1 it somehow conflicts with the option to turn off the toolbar.

Any suggestions? (and there's no need to google it for me, I have)

sycamorex 10-19-2010 08:46 PM

Quote:

Originally Posted by metaposter (Post 4132994)
The above code used to work perfectly, but in emacs 23.1 it somehow conflicts with the option to turn off the toolbar.

Any suggestions? (and there's no need to google it for me, I have)

What's wrong with simple "emacs -fs"?

or actually you need "emacs -mm"


All times are GMT -5. The time now is 07:50 PM.