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
Feature: option to hide title bar (frameless/borderless) #3199
Comments
I've tried that before, but it means you can't move/resize the window anymore, which isn't really acceptable. |
I didn't know about that, but wouldn't this be ok if the option description explained it? The user could revert this option to move/resize the window, or use an external tool. |
Hmm, I guess it could work - however, the window needs to be hidden and re-shown to change those flags, so I'm not sure if moving/resizing like that would work. Out of curiosity, what window manager / DE do you use? |
I use macOS's default wm and betterSnapTool for moving/resizing windows. Another option would be to use a command line argument for this behavior. There'd be no need to re-show the title bar, qb would be started as frameless and stay like that. |
If you re-open qutebrowser, then do from PyQt5.QtCore import Qt
win = objreg.get('main-window', scope='window', window=0)
win.setWindowFlags(Qt.Window | Qt.FramelessWindowHint)
win.hide()
win.show() it should be frameless, right? Can you then still resize/move it using betterSnapTool? |
It is frameless. I'm able to move it using betterSnapTool, but can't resize it. |
What if you call |
It stays with the new position/size. The only issue that I noticed is that if I set the window to occupy the entire screen, after setting |
I use chunkwm to manage windows on a mac, and would also like this feature. When I tested the above, I could neither resize the resulting frameless window nor move it with chunkwm. Using the Accessibilty Inspector, I was able to figure out that the role of the window is AXWindow and the subrole is AXUnknown. With that, I was able to get chunkwm to move the window around. But it doesn't seem to be able to resize it. |
@dsanson adding
(additional cool tip: add The forced tiling rule for Python is not ideal, but maybe it is possible to change qutebrowser title to something other than "Python". I'm fine regardless as I don't really use any other Python apps anyway. Now, if anyone could tell me how to apply these flags at start (preferably without compiling from source myself) that would be of great help. |
@rien333 Neat! That worked for me too! |
If you are willing to run from source (or compile from source), adding the line self.setWindowFlags(Qt.Window | Qt.CustomizeWindowHint) to qutebrowser/mainwindow/mainwindow.py seems to do the trick.
|
@dsanson I've been running a similar built like that for a bit now, and it's been working great. Thanks anyway! Would be cool if this were to become an official option maybe (@The-Compiler), so that I don't have to deal with multiple python versions/binaries and virtual environments and the like. Oh and, an additional stupid quirk of this method is that tool tips will be floated as well due to chunkwm forcing all Python windows to be floated, which can be really annoying. EDIT: (I think building qutebrowser as an .app fixes this, but this has been quite a pain so far)
|
Hmm, still not sure how an option for this would look. I suppose there could just be an option to set any window type/flags, but I'm not looking forward to the issues people will get themselves into with that 😉 What I don't really understand so far: What's the difference between |
I wasn't really suggesting an option to set any QT window flags, but more something along the lines of The difference between those two types of window hints is that the QT documentation states
The
In practice, a window with |
Hm, I like the more general @rien333, also let me note that you linked to some ~2009 version of Qt Jambi (Qt for Java) documentation there 😉 The up-to-date docs are here: http://doc.qt.io/qt-5/qt.html#WindowType-enum |
I'm picking this up, but I have some questions. As this is relatively easy I hope answering my questions doesn't take you longer than implementing it yourself. Firstly, does migrating the old settings entail that the old value for Secondly, I don't think it makes much sense conceptually to have window shadows when using tiling window managers, which I think make up the fair majority of the people hiding window decorations given that (most) other types of window managers lack the options to deal with borderless windows. Is it a good idea to disable window shadows when the user wants to hide window decorations? iTerm and mpv (at least on non macOS systems, and on older versions) for example also have this behavior when the window decorations are hidden. Borderless windows can look a bit odd under some circumstances though, so it might also be a possibility to add another config item which determines window shadow visibility. Or just always leave shadows on, it's your call. (I'm pretty sure most people would prefer hiding shadows though) |
Argh, something went wrong when trying to write my answer before, let's try again.
That happens from time to time (with reviews and all), but it's not necessarily bad - I like getting people to contribute to open source (and qutebrowser) - and some of those people stick around and become regular contributors 😄
Indeed - this would be in
Let's just hide them for borderless windows and see if someone complains 😉 |
Just giving a data point for the discussion, I was searching for this option and found the issue. I have |
It would be great if there was an option to hide qute's title bar. I know that usually this is a task for the window manager but it would be a nice addition and would be great for people (like me) that doesn't use a window manager with support for this kind of customization.
Taking from this stackoverflow question it looks simple to implement. All we'd have to do is set this window flag:
The text was updated successfully, but these errors were encountered: