all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Maximize frame
@ 2009-05-14  7:44 Decebal
  2009-05-14  8:36 ` Pascal J. Bourguignon
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Decebal @ 2009-05-14  7:44 UTC (permalink / raw
  To: help-gnu-emacs

I would like to maximize my Emacs on startup. I did find:
  (defun fullscreen ()
    (interactive)
    (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
	    		 '(2 "_NET_WM_STATE_FULLSCREEN" 0)))

But that does a fullscreen, which loses the taskbar. Is there a way to
do a maximize instead of a fullscreen?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14  7:44 Maximize frame Decebal
@ 2009-05-14  8:36 ` Pascal J. Bourguignon
  2009-05-14 10:30   ` Decebal
  2009-05-14  8:49 ` Nurullah Akkaya
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-14  8:36 UTC (permalink / raw
  To: help-gnu-emacs

Decebal <CLDWesterhof@gmail.com> writes:

> I would like to maximize my Emacs on startup. I did find:
>   (defun fullscreen ()
>     (interactive)
>     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
> 	    		 '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>
> But that does a fullscreen, which loses the taskbar. Is there a way to
> do a maximize instead of a fullscreen?

Have a look at full-frame in http://darcs.informatimago.com/public/emacs/pjb-emacs.el

-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14  7:44 Maximize frame Decebal
  2009-05-14  8:36 ` Pascal J. Bourguignon
@ 2009-05-14  8:49 ` Nurullah Akkaya
       [not found] ` <mailman.7143.1242291118.31690.help-gnu-emacs@gnu.org>
  2009-05-14 11:39 ` Michael Heerdegen
  3 siblings, 0 replies; 15+ messages in thread
From: Nurullah Akkaya @ 2009-05-14  8:49 UTC (permalink / raw
  Cc: help-gnu-emacs

Decebal wrote:
> I would like to maximize my Emacs on startup. I did find:
>   (defun fullscreen ()
>     (interactive)
>     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
> 	    		 '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
> 
> But that does a fullscreen, which loses the taskbar. Is there a way to
> do a maximize instead of a fullscreen?

you can use the following function and call it in your .emacs
set the height and width according to your screen.
This works on os x , linux and windows.

(defun na-resize-frame-big ()
  "Set size"
  (interactive)
  (set-frame-width (selected-frame) 178)
  (set-frame-height (selected-frame) 55 )
  (set-frame-position (selected-frame) 0 1))

-- 
Nurullah Akkaya
http://nakkaya.com/




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14  8:36 ` Pascal J. Bourguignon
@ 2009-05-14 10:30   ` Decebal
  0 siblings, 0 replies; 15+ messages in thread
From: Decebal @ 2009-05-14 10:30 UTC (permalink / raw
  To: help-gnu-emacs

On 14 mei, 10:36, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Decebal <CLDWester...@gmail.com> writes:
> > I would like to maximize my Emacs on startup. I did find:
> >   (defun fullscreen ()
> >     (interactive)
> >     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
> >                     '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>
> > But that does a fullscreen, which loses the taskbar. Is there a way to
> > do a maximize instead of a fullscreen?
>
> Have a look at full-frame inhttp://darcs.informatimago.com/public/emacs/pjb-emacs.el

I found severall functions which did something like that, but that is
only an aproximation. There is not a maximize screen equivalent for
_NET_WM_STATE_FULLSCREEN?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
       [not found] ` <mailman.7143.1242291118.31690.help-gnu-emacs@gnu.org>
@ 2009-05-14 10:32   ` Decebal
  2009-05-14 11:26     ` Lennart Borgman
       [not found]     ` <mailman.7148.1242300429.31690.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Decebal @ 2009-05-14 10:32 UTC (permalink / raw
  To: help-gnu-emacs

On 14 mei, 10:49, Nurullah Akkaya <nurul...@nakkaya.com> wrote:
> Decebal wrote:
> > I would like to maximize my Emacs on startup. I did find:
> >   (defun fullscreen ()
> >     (interactive)
> >     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
> >                     '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>
> > But that does a fullscreen, which loses the taskbar. Is there a way to
> > do a maximize instead of a fullscreen?
>
> you can use the following function and call it in your .emacs
> set the height and width according to your screen.
> This works on os x , linux and windows.
>
> (defun na-resize-frame-big ()
>   "Set size"
>   (interactive)
>   (set-frame-width (selected-frame) 178)
>   (set-frame-height (selected-frame) 55 )
>   (set-frame-position (selected-frame) 0 1))

I did something like this in the past with my .Xdefaults. But when
your screen resolution changes, it does not work anymore. Also I would
prefer one .emacs for all my systems and they have different
resolutions.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 10:32   ` Decebal
@ 2009-05-14 11:26     ` Lennart Borgman
       [not found]     ` <mailman.7148.1242300429.31690.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Lennart Borgman @ 2009-05-14 11:26 UTC (permalink / raw
  To: Decebal; +Cc: help-gnu-emacs

On Thu, May 14, 2009 at 12:32 PM, Decebal <CLDWesterhof@gmail.com> wrote:
> On 14 mei, 10:49, Nurullah Akkaya <nurul...@nakkaya.com> wrote:
>> Decebal wrote:
>> > I would like to maximize my Emacs on startup. I did find:
>> >   (defun fullscreen ()
>> >     (interactive)
>> >     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
>> >                     '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>>
>> > But that does a fullscreen, which loses the taskbar. Is there a way to
>> > do a maximize instead of a fullscreen?

Unfortunately there is no function in Emacs to make a frame
fullscreen. What platform do you use Emacs on?




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14  7:44 Maximize frame Decebal
                   ` (2 preceding siblings ...)
       [not found] ` <mailman.7143.1242291118.31690.help-gnu-emacs@gnu.org>
@ 2009-05-14 11:39 ` Michael Heerdegen
  2009-05-14 12:03   ` Decebal
  3 siblings, 1 reply; 15+ messages in thread
From: Michael Heerdegen @ 2009-05-14 11:39 UTC (permalink / raw
  To: help-gnu-emacs

On http://ubuntuforums.org/showthread.php?t=782196 I found:


(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))
  )


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 11:39 ` Michael Heerdegen
@ 2009-05-14 12:03   ` Decebal
  2009-05-14 12:14     ` Decebal
  0 siblings, 1 reply; 15+ messages in thread
From: Decebal @ 2009-05-14 12:03 UTC (permalink / raw
  To: help-gnu-emacs

On 14 mei, 13:39, Michael Heerdegen <ab...@127.0.0.1> wrote:
> Onhttp://ubuntuforums.org/showthread.php?t=782196I found:
>
> (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))
>   )

I tried that and it did not work. But now it works, so I think I made
an input mistake when I tried that.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
       [not found]     ` <mailman.7148.1242300429.31690.help-gnu-emacs@gnu.org>
@ 2009-05-14 12:07       ` Decebal
  2009-05-14 12:33       ` Pascal J. Bourguignon
  1 sibling, 0 replies; 15+ messages in thread
From: Decebal @ 2009-05-14 12:07 UTC (permalink / raw
  To: help-gnu-emacs

On 14 mei, 13:26, Lennart Borgman <lennart.borg...@gmail.com> wrote:
> On Thu, May 14, 2009 at 12:32 PM, Decebal <CLDWester...@gmail.com> wrote:
> > On 14 mei, 10:49, Nurullah Akkaya <nurul...@nakkaya.com> wrote:
> >> Decebal wrote:
> >> > I would like to maximize my Emacs on startup. I did find:
> >> >   (defun fullscreen ()
> >> >     (interactive)
> >> >     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
> >> >                     '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>
> >> > But that does a fullscreen, which loses the taskbar. Is there a way to
> >> > do a maximize instead of a fullscreen?
>
> Unfortunately there is no function in Emacs to make a frame
> fullscreen. What platform do you use Emacs on?

I am working with Linux:
    GNU Emacs 22.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2009-05-08 on Traian

Michael had an option that almost does what I want.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 12:03   ` Decebal
@ 2009-05-14 12:14     ` Decebal
  2009-05-14 12:37       ` Pascal J. Bourguignon
  2009-05-14 13:20       ` Decebal
  0 siblings, 2 replies; 15+ messages in thread
From: Decebal @ 2009-05-14 12:14 UTC (permalink / raw
  To: help-gnu-emacs

On 14 mei, 14:03, Decebal <CLDWester...@gmail.com> wrote:
> On 14 mei, 13:39, Michael Heerdegen <ab...@127.0.0.1> wrote:
>
> > Onhttp://ubuntuforums.org/showthread.php?t=782196Ifound:
>
> > (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))
> >   )
>
> I tried that and it did not work. But now it works, so I think I made
> an input mistake when I tried that.

There is one little problem with the toggle fullscreen. If for example
vert is allready maximized and horz not, I would like vert untouched
and horz maximized. Is this possible, or am I asking to much? (This
will not happen often and then I could use <ALT>+<F3> followed by x,
but I like to get rid of loose ends. ;-} )


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
       [not found]     ` <mailman.7148.1242300429.31690.help-gnu-emacs@gnu.org>
  2009-05-14 12:07       ` Decebal
@ 2009-05-14 12:33       ` Pascal J. Bourguignon
  2009-05-14 13:25         ` Lennart Borgman
  1 sibling, 1 reply; 15+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-14 12:33 UTC (permalink / raw
  To: help-gnu-emacs

Lennart Borgman <lennart.borgman@gmail.com> writes:

> On Thu, May 14, 2009 at 12:32 PM, Decebal <CLDWesterhof@gmail.com> wrote:
>> On 14 mei, 10:49, Nurullah Akkaya <nurul...@nakkaya.com> wrote:
>>> Decebal wrote:
>>> > I would like to maximize my Emacs on startup. I did find:
>>> >   (defun fullscreen ()
>>> >     (interactive)
>>> >     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
>>> >                     '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>>>
>>> > But that does a fullscreen, which loses the taskbar. Is there a way to
>>> > do a maximize instead of a fullscreen?
>
> Unfortunately there is no function in Emacs to make a frame
> fullscreen. What platform do you use Emacs on?

This is a little strong a statement!  Obviously, the function 
   (lambda () (full-frame))
is a function in emacs to make a frame full screen (given my
full-frame function whose URI I mentionned previously), and it exists!

-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 12:14     ` Decebal
@ 2009-05-14 12:37       ` Pascal J. Bourguignon
  2009-05-14 13:52         ` Richard Riley
  2009-05-14 13:20       ` Decebal
  1 sibling, 1 reply; 15+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-14 12:37 UTC (permalink / raw
  To: help-gnu-emacs

Decebal <CLDWesterhof@gmail.com> writes:

> On 14 mei, 14:03, Decebal <CLDWester...@gmail.com> wrote:
>> On 14 mei, 13:39, Michael Heerdegen <ab...@127.0.0.1> wrote:
>>
>> > Onhttp://ubuntuforums.org/showthread.php?t=782196Ifound:
>>
>> > (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))
>> >   )
>>
>> I tried that and it did not work. But now it works, so I think I made
>> an input mistake when I tried that.
>
> There is one little problem with the toggle fullscreen. If for example
> vert is allready maximized and horz not, I would like vert untouched
> and horz maximized. Is this possible, or am I asking to much? (This
> will not happen often and then I could use <ALT>+<F3> followed by x,
> but I like to get rid of loose ends. ;-} )

An alternative solution would be to use ratpoison or clumpwm.

-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 12:14     ` Decebal
  2009-05-14 12:37       ` Pascal J. Bourguignon
@ 2009-05-14 13:20       ` Decebal
  1 sibling, 0 replies; 15+ messages in thread
From: Decebal @ 2009-05-14 13:20 UTC (permalink / raw
  To: help-gnu-emacs

On 14 mei, 14:14, Decebal <CLDWester...@gmail.com> wrote:
> > > Onhttp://ubuntuforums.org/showthread.php?t=782196Ifound:
>
> > > (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))
> > >   )
>
> > I tried that and it did not work. But now it works, so I think I made
> > an input mistake when I tried that.
>
> There is one little problem with the toggle fullscreen. If for example
> vert is allready maximized and horz not, I would like vert untouched
> and horz maximized. Is this possible, or am I asking to much? (This
> will not happen often and then I could use <ALT>+<F3> followed by x,
> but I like to get rid of loose ends. ;-} )

There is another little problem. I put (toggle-fullscreen) into
my .emacs. And the frame is maximized. But later on it is made a
little smaller again. What could be happening here?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 12:33       ` Pascal J. Bourguignon
@ 2009-05-14 13:25         ` Lennart Borgman
  0 siblings, 0 replies; 15+ messages in thread
From: Lennart Borgman @ 2009-05-14 13:25 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

On Thu, May 14, 2009 at 2:33 PM, Pascal J. Bourguignon
<pjb@informatimago.com> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> On Thu, May 14, 2009 at 12:32 PM, Decebal <CLDWesterhof@gmail.com> wrote:
>>> On 14 mei, 10:49, Nurullah Akkaya <nurul...@nakkaya.com> wrote:
>>>> Decebal wrote:
>>>> > I would like to maximize my Emacs on startup. I did find:
>>>> >   (defun fullscreen ()
>>>> >     (interactive)
>>>> >     (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
>>>> >                     '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
>>>>
>>>> > But that does a fullscreen, which loses the taskbar. Is there a way to
>>>> > do a maximize instead of a fullscreen?
>>
>> Unfortunately there is no function in Emacs to make a frame
>> fullscreen. What platform do you use Emacs on?
>
> This is a little strong a statement!  Obviously, the function
>   (lambda () (full-frame))
> is a function in emacs to make a frame full screen (given my
> full-frame function whose URI I mentionned previously), and it exists!


Maybe I should have written "maximize"? Emacs have no built in
functions to handle maximize. And you can not really add them from
elisp.

On w32 you can maximize a frame from within Emacs, but there is no way
to check if the frame is maxmized (since there is no built in function
for that) and the maximizing happens asynchronously (since you send a
w32 message to the w32 window manager and you can not wait in Emacs
for that message to be handled).




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Maximize frame
  2009-05-14 12:37       ` Pascal J. Bourguignon
@ 2009-05-14 13:52         ` Richard Riley
  0 siblings, 0 replies; 15+ messages in thread
From: Richard Riley @ 2009-05-14 13:52 UTC (permalink / raw
  To: help-gnu-emacs

pjb@informatimago.com (Pascal J. Bourguignon) writes:

> Decebal <CLDWesterhof@gmail.com> writes:
>
>> On 14 mei, 14:03, Decebal <CLDWester...@gmail.com> wrote:
>>> On 14 mei, 13:39, Michael Heerdegen <ab...@127.0.0.1> wrote:
>>>
>>> > Onhttp://ubuntuforums.org/showthread.php?t=782196Ifound:
>>>
>>> > (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))
>>> >   )
>>>
>>> I tried that and it did not work. But now it works, so I think I made
>>> an input mistake when I tried that.
>>
>> There is one little problem with the toggle fullscreen. If for example
>> vert is allready maximized and horz not, I would like vert untouched
>> and horz maximized. Is this possible, or am I asking to much? (This
>> will not happen often and then I could use <ALT>+<F3> followed by x,
>> but I like to get rid of loose ends. ;-} )
>
> An alternative solution would be to use ratpoison or clumpwm.

wmctrl is an option.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-05-14 13:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14  7:44 Maximize frame Decebal
2009-05-14  8:36 ` Pascal J. Bourguignon
2009-05-14 10:30   ` Decebal
2009-05-14  8:49 ` Nurullah Akkaya
     [not found] ` <mailman.7143.1242291118.31690.help-gnu-emacs@gnu.org>
2009-05-14 10:32   ` Decebal
2009-05-14 11:26     ` Lennart Borgman
     [not found]     ` <mailman.7148.1242300429.31690.help-gnu-emacs@gnu.org>
2009-05-14 12:07       ` Decebal
2009-05-14 12:33       ` Pascal J. Bourguignon
2009-05-14 13:25         ` Lennart Borgman
2009-05-14 11:39 ` Michael Heerdegen
2009-05-14 12:03   ` Decebal
2009-05-14 12:14     ` Decebal
2009-05-14 12:37       ` Pascal J. Bourguignon
2009-05-14 13:52         ` Richard Riley
2009-05-14 13:20       ` Decebal

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.