Windowless fullscreen

82 views
Skip to first unread message

Nathan Clark

unread,
Oct 10, 2021, 9:28:37 AM10/10/21
to Hammerspoon
Hi,

I am hoping to work out a way to put apps into windowless fullscreen mode. When triggered, the current window's width is set to the screen width and its height is set slightly larger (eg 22px) than the screen height. The window is then positioned negatively on the Y axis (eg -22px) resulting the the contents of the app window filling the enter screen.

Unfortunately, I haven't been able to get it to work. Here's my current code:

require "hs.window"

function hs_test()
  local win = hs.window.focusedWindow()
  win:setSize(2880,1642)
  win:setTopLeft(0,-22)
end

It seems that hs.window's setTopLeft does not allow for negative values. 

If anyone could give any pointers, I'd be very grateful.

Thanks



 

Rémy Tauziac

unread,
Oct 12, 2021, 8:02:21 AM10/12/21
to Hammerspoon
Hi,

I think it’s more of a MacOS limitation. You can’t drag windows under the status bar/your top screen edge, even if you try with your mouse.

Nathan Clark

unread,
Oct 14, 2021, 1:38:50 AM10/14/21
to Hammerspoon
Hey Tauzia, thanks for the response :)

I have a couple apps on my Mac that implement this functionality, here's a little video showing it working. Of course I have no idea how they do it, but it gives me hope this is possible

Reply all
Reply to author
Forward
0 new messages