w0lfschild / winBuddy

:open_file_folder: MacForge plugin to give windows some extra functionality on macOS
https://www.macenhance.com/mflink?macforge://github.com/w0lfschild/myRepo/raw/master/mytweaks/org.w0lf.winBuddy
96 stars 19 forks source link

Hide window title bar #17

Open Worie opened 7 years ago

Worie commented 7 years ago

Hi, I use a lot of mySIMBL plugins made by you, great work, thanks!

I've got a feature request: Recently I've encouraged a pretty uncommon case I guess, I'd like to hide window title bar ( https://i.stack.imgur.com/G3sRt.png ). Is that even possible and if so, is it worth an effort? What do you think?

w0lfschild commented 7 years ago

Yeah that would probably be possible.

WatermelonDriveway commented 7 years ago

if you could make this happen i'd be eternally grateful. I've been looking for a way to do this for years.

<3

w0lfschild commented 7 years ago

The problem with this is that then you can not really move the window around unless you're using a window manager.

Worie commented 7 years ago

Yeah, I suggested this feature as i no longer drag windows around by mouse and it would save some space on my desktop.

Perhaps, if it wasnt a default config that'd be alright for wider audience?

WatermelonDriveway commented 7 years ago

For sure, but I feel like anybody who'd be interested in this would be the type of person to use a WM. Also I remember hearing people say the same thing when people were requesting a titlebar-less iTerm, but every build I've used of iTerm without a title bar is still able to be moved around with the mouse by clicking and dragging at an angle. Not sure if that would work with regular windows though.

termdrag

w0lfschild commented 7 years ago

Okay build 0.3.4 is up : Download

Edit: 0.3.4 has fix for hiding titlebar on applications with a toolbar

WatermelonDriveway commented 7 years ago

Wow, didn't expect that so soon. Awesome.

I know this is your first build w/ this fix, and I'm not sure how much you care about that feature, but I figure I'll give you some feedback anyway.

This is my Finder window w/o the titlebar hidden:

screen shot 2017-05-30 at 7 41 43 pm 2

and this is it with it hidden:

screen shot 2017-05-30 at 7 41 56 pm 2

There really isn't much difference there, although definitely a step in the right direction. With most other apps I tried, it hides the titlebar perfectly, but is then impossible to resize the window. I can move it around with my window manager, but it won't resize it from when I checked the 'hide titlebar' setting.

I can't speak for @Worie but the effect I was hoping for was something like this:

edit

Not sure how possible that might be to accomplish, or if the window resizing issue is possible to fix, but either way, thanks a lot for your work. Winbuddy is essential to my setup.

Worie commented 7 years ago

0.3.4 works like a charm, thank you. I actually have toolbar enabled so it does not affect me that much, but it would probably make sense to hide it completely in that specific case.

Anyway, thank you very much for this feature :) Respect!

net commented 7 years ago

This seems to make a lot of windows unresizable. It gives me resizing issues with almost every non-native app.

net commented 7 years ago

Regarding dragging issues, on macOS you can move windows around without a titlebar by moving the cursor over the edge of the window so the resize arrow appears, then dragging perpendicular to the direction of the resize arrow. (For example, when hovering over the left or right edge, drag vertically instead of horizontally.)

(This is broken by the resizing issue above.)

net commented 7 years ago

A way to hide traffic lights would be nice, if possible.

w0lfschild commented 7 years ago

Okay another update is up 0.3.5 : Download

Should fix not being able to drag windows and fully hiding the title in Finder.

All together it will never be ideal to hide the titlebar because a lot of different apps are going to behave differently with it hidden.

net commented 7 years ago

That fixed the resizing issue, but it restored the titlebar for most windows.

Perhaps the issue was caused by this?

A window that uses NSBorderlessWindowMask can’t become key or main, unless the value of canBecomeKeyWindow or canBecomeMainWindow is YES.

https://developer.apple.com/documentation/appkit/nsborderlesswindowmask

Also, I wonder how feasible it would be to make windows display as if they were in fullscreen mode (square corners, no traffic lights, whatever toolbar the application displays in fullscreen mode), although windowed in this case. That would be ideal for window managers.

net commented 7 years ago

The resizing issue can be fixed for 7e20d3f with NSWindowStyleMaskResizable.

self.styleMask = NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable;
hpppxl commented 7 years ago

I'm running 0.3.5 right now, and hiding the title bar works for most of the apps for me. However, it does not work for the Terminal, which would be very nice to have! Do you think, you can have a look at that?