Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open vimb maximized #483

Closed
mb720 opened this issue May 7, 2018 · 9 comments
Closed

Open vimb maximized #483

mb720 opened this issue May 7, 2018 · 9 comments

Comments

@mb720
Copy link

mb720 commented May 7, 2018

I'm having a great time with vimb! 👍

I notized that new instances of vimb open in a window that occupy only part of the screen, i.e., the window is not maximized.

Since I prefer maximized windows, I use the X shortcut alt-space x to maximize the window after opening it.

Is there a setting I can put into vimb/config to open new instances maximized?

Thanks!

P.S.:
Just to be clear, I'm not talking about vimb's fullscreen mode that can be toggled with set fullscreen!.

P.P.S.: I'm using XFCE on Arch Linux.

@fanglingsu
Copy link
Owner

The size is set during compilation

  1. you can change it in src/config.h by setting WIN_WIDTH and WIN_HEIGHT. Maybe you can also set the default isze for the vimb windows by xfce.
  2. You could use tabbed and maximize this and lunch vimb within tabbed. So each new instance will be as large as possible within tabbed.
  3. Could you please add gtk_window_maximize(GTK_WINDOW(window)); in src/main.c and compile vimb again and check if xfce maximizes the window?
diff --git a/src/main.c b/src/main.c
index 50300de7..38f19d5c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -793,6 +793,7 @@ static GtkWidget *create_window(Client *c)
         window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
         gtk_window_set_role(GTK_WINDOW(window), PROJECT_UCFIRST);
         gtk_window_set_default_size(GTK_WINDOW(window), WIN_WIDTH, WIN_HEIGHT);
+        gtk_window_maximize(GTK_WINDOW(window));
     }

If this works I would add this by default. But I can't test this because I use tailing window manager so all windows will fill the screen without any gap.

@mb720
Copy link
Author

mb720 commented May 8, 2018

Hi Daniel!

I added gtk_window_maximize(GTK_WINDOW(window)); like you suggested and it worked like a charm.

fanglingsu added a commit that referenced this issue May 8, 2018
Set hint to window managers to maximize the browser window.
@fanglingsu
Copy link
Owner

OK, I think this would be a nice default for other users too.

@nickwynja
Copy link

I won't reopen but this would be a nice set option where the default was the current behavior. I have a use case where I don't want vimb opening maximized. I've removed gtk_window_maximize(GTK_WINDOW(window)); from src/main.c and compiled which behaves the way I want but can see other people wanting this as an option without having to build.

@fanglingsu
Copy link
Owner

@nickwynja I'm not sure if this would be possible. Because we have to set the window dimension long before we read the config file. But we could add an command line option to disable the maximazation or to set the requested dimensions. What do you think about that?

@fanglingsu
Copy link
Owner

@nickwynja Which window manager do you use? As I know the maximazation is only a hint for the window manager that the application likes to use alls the space on screen. So you should be able to configure your window/desktop manager to not follow this hint.

@nickwynja
Copy link

@fanglingsu A command line flag would work for me. I’m using vimb primarily on elementary OS which uses Gala for it’s window manager. I’m not very familiar with configuring window managers at all.

@fanglingsu
Copy link
Owner

@nickwynja I've added the option --no-maximize which should disable the maximization request. Can you please test if this works?

@nickwynja
Copy link

@fanglingsu This works great! Thank you for adding the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants