glazewm
glazewm copied to clipboard
Hide the bar (or auto-hide)
Hi,
It would be great if we could hide the bar. An auto-hide function or binding to hide would enable the use of more space on the screen.
Regards
i made something like that with autohotkey its useable
- uses autohotkey v1.3
- download autohotkey
- then just compile this file that's it
ModifyConfig.ahk
; Define a function to toggle the "height" value in the config.yaml file
ToggleHeightValue() {
; Set the path to the config file
configFile := "C:\Users\<yourname>\.glaze-wm\config.yaml"
; Read the contents of the config file
FileRead, configContent, %configFile%
; Toggle the "height" value between "0px" and "30px"
IfInString, configContent, height: "0px"
StringReplace, modifiedConfig, configContent, height: "0px", height: "30px"
Else
StringReplace, modifiedConfig, configContent, height: "30px", height: "0px"
; Write the modified content back to the config file
FileDelete, %configFile%
FileAppend, %modifiedConfig%, %configFile%
; Send Alt+Shift+R to reload the configuration
ReloadConfig()
}
; Define a function to reload the config using Alt+Shift+R
ReloadConfig() {
; Bring GlazeWM to the front
WinActivate, ahk_exe GlazeWM.exe
WinWaitActive, ahk_exe GlazeWM.exe,, 2
; Wait for a moment to give focus back to GlazeWM
Sleep, 0.01
; Send Alt+Shift+R to reload the configuration
SendInput, !+r
}
; Define a hotkey (Alt+Ctrl+]) to trigger the toggle
!^]::ToggleHeightValue()
; Trigger the config reload when the script starts
ReloadConfig()
I hope there they add a official keystroke to the code
It would be really nice to hide the bar when something is launched in full screen or a full-size borderless window. Many games fight with the bar, and YouTube just gives up the screen estate.
i made something like that with autohotkey its useable
- uses autohotkey v1.3
- download autohotkey
- then just compile this file that's it
ModifyConfig.ahk
; Define a function to toggle the "height" value in the config.yaml file ToggleHeightValue() { ; Set the path to the config file configFile := "C:\Users\<yourname>\.glaze-wm\config.yaml" ; Read the contents of the config file FileRead, configContent, %configFile% ; Toggle the "height" value between "0px" and "30px" IfInString, configContent, height: "0px" StringReplace, modifiedConfig, configContent, height: "0px", height: "30px" Else StringReplace, modifiedConfig, configContent, height: "30px", height: "0px" ; Write the modified content back to the config file FileDelete, %configFile% FileAppend, %modifiedConfig%, %configFile% ; Send Alt+Shift+R to reload the configuration ReloadConfig() } ; Define a function to reload the config using Alt+Shift+R ReloadConfig() { ; Bring GlazeWM to the front WinActivate, ahk_exe GlazeWM.exe WinWaitActive, ahk_exe GlazeWM.exe,, 2 ; Wait for a moment to give focus back to GlazeWM Sleep, 0.01 ; Send Alt+Shift+R to reload the configuration SendInput, !+r } ; Define a hotkey (Alt+Ctrl+]) to trigger the toggle !^]::ToggleHeightValue() ; Trigger the config reload when the script starts ReloadConfig()
I hope there they add a official keystroke to the code
Thank you for your contribution. It is a nice solution and I will try using it.
Still, I believe it would be great to have this as a builtin feature.
just came here to comment to make this an official! please @lars-berger would love the ability to hide the top bar whenever an application has entered full screen. This would really help for playing games or having transparent fullscreen terminals. Thanks!
something like hiding the top bar when there is a fullscreen application IN THAT workspace. would work wonders. <3