Can toggle windows ALIAS be centered?

If you've had any problems with Nexuiz, or would like to report bugs, post here.

Moderators: Nexuiz Moderators, Moderators

Can toggle windows ALIAS be centered?

Postby Oat » Mon Jun 23, 2008 3:48 pm

I use this alias for toggling between fullscreen and windowed mode.

alias +fullscreen "fullscreen_01"
alias fullscreen_01 "vid_width 768 ; vid_height 576 ; vid_fullscreen 0 ; vid_restart ; alias -fullscreen fullscreen_02"
alias fullscreen_02 "vid_width 1024 ; vid_height 768 ; vid_fullscreen 1 ; vid_restart ; alias -fullscreen fullscreen_01"

bind F9 "+fullscreen"

This bind is very useful for toggling the screen, but it's annoying to see the window mode shifted to the left hand corner. Everytime, I had to click on the screen and move it to the center to my comfort. Any idea how to make it centers of the screen automatically?
Oat
Advanced member
 
Posts: 74
Joined: Mon May 12, 2008 3:40 pm

Postby morfar » Mon Jun 23, 2008 4:22 pm

I don't know. But let me know when you find out. :P
morfar
Site Admin
 
Posts: 938
Joined: Tue Feb 28, 2006 6:08 pm
Location: The Island

Postby dIM » Mon Jun 23, 2008 5:51 pm

You could try to use devilspie, it sets windows properties as they are created, maybe it triggers on window state changes too.
"It's a long story kid. You don't wanna hear it. I don't wanna tell it."
dIM
Alien
 
Posts: 160
Joined: Wed Mar 01, 2006 4:10 am
Location: DD ger

Postby Oat » Mon Jun 23, 2008 7:20 pm

devilspie are already running on my Ubuntu 7.10

I don't know how to use it, it's running in the background
Oat
Advanced member
 
Posts: 74
Joined: Mon May 12, 2008 3:40 pm

Postby dIM » Mon Jun 23, 2008 11:51 pm

Actually basic devilspie functionality is sufficient:

- create a file "nex.ds" in "~/devilspie/" (maybe you have to create that dir)
- if you are _not_ using Compiz (I believe it is just called desktop effects in Ubuntu) nex.ds may look like this:
Code: Select all
(if
    (matches (window_class) "nexuiz.*")
    (center)
)


- else:
Code: Select all
(if
    (matches (window_class) "nexuiz.*")
    (geometry "+300+400")
)


The latter solution works in any case but you have to sort out the offset so the window ends up centered yourself.
Have a look here for more information on devilspie.
"It's a long story kid. You don't wanna hear it. I don't wanna tell it."
dIM
Alien
 
Posts: 160
Joined: Wed Mar 01, 2006 4:10 am
Location: DD ger

Postby morfar » Tue Jun 24, 2008 7:31 am

Works for me. Thanks.
morfar
Site Admin
 
Posts: 938
Joined: Tue Feb 28, 2006 6:08 pm
Location: The Island

Postby Oat » Tue Jun 24, 2008 4:36 pm

Works for me too thanks!

Although I have 2 workspaces, therefore (center) shifted the Nexuiz to central of both workspaces thus only see half of it on the right - switching to other workspace will result in seeing nexuiz on the left :)

So i had to adjust my geometry.

Code: Select all
(if
(matches(window_class)"nexuiz*")
(geometry "+130+100")
)


Oh and I should mention this. You need to restart X for it to take effect (CTRL+ALT+BACKSPACE)

Thanks :D
Oat
Advanced member
 
Posts: 74
Joined: Mon May 12, 2008 3:40 pm

Postby dIM » Tue Jun 24, 2008 6:15 pm

No need to restart the X-server, just restarting devilspie so it can parse the new expression file will suffice ;)
"It's a long story kid. You don't wanna hear it. I don't wanna tell it."
dIM
Alien
 
Posts: 160
Joined: Wed Mar 01, 2006 4:10 am
Location: DD ger


Return to Nexuiz - Support / Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron