Skip to content

A powershell script that overrides the titlebar style of all currently open windows to remove them.

Notifications You must be signed in to change notification settings

akkiirah/TitlelessWindows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TitlelessWindows - Remove Windows11 title bars

This PowerShell script overrides the window style of all windows to remove the title bar, using the WinAPI to constantly monitor.
Please note that this script only works with standard Windows 11 title bars and might create unwanted side effects with windows that use a custom title bar.

Before:
Title bar visible

After:
Title bar invisible

I want to address that I'm not an expert programmer, nor do I have much experience in scripting with PowerShell.
If you want to improve my code, feel free to do so!
Since I've been wanting to disable the title bar for a while now, I hacked together something that seems to work, at least for me.


Prerequisites

  • PowerShell
  • Any kind of text editor.
  • Administrator rights on your user.
  • A burning desire to delete title bars.

Installation

  • Download the ZIP file and unpack its contents to a location of your choice.
  • Open the DeleteTitlebar.bat file with the text editor of your choice and change C:\Users\akkiirah\.glaze-wm\scripts\Deletetitle bar.ps1 to the path where you unpacked the files.

This current version disables Window borders to perfectly cut the title bar.
If you want to have a border in exchange for an about 2-3px thick title bar,
open the ps1 file in any texteditor and change $styleToRemove = 0x00C00000 -bor 0x00040000 to $styleToRemove = 0x00C00000
Save the file and continue.


How to use:

  • Rightclick the Bat file and create a shortcut.
  • Rightclick that shortcut, go to Properties.
  • Under the “Shortcut” tab, change the “Run” dropdown to “Minimized". This will ensure that no cmd prompt will show up.
  • If don't want to remove the titlebar for certain windows, you can just add the process name to the ExcludedProcesses.txt file.
  • You can now simply run the created shortcut, which will remove all standard Windows 11 title bars.

One more tip:

This is for if you haven't changed $styleToRemove during the installation part!

If you're running GlazeWM with GAPS, deleting WS_BORDER seems to make all standard window containers not adjust acording to your set gap.
To fix this, I apply the window rule to resize borders left, right and bottom minus your gap size and match it to every process.
However you can also adjust the match_process_name to the windows that are making issues. I was to lazy for that so far.

  - command: 'resize borders 0px [your gap+1]px [your gap+1]px [your gap+1]px'
    match_process_name: '.*'

TODO:

  • Find a way to supress opening a powershell window when running the script.
  • Let the script run in the background and update the title bar of newly opend windows automatically.
  • Find a way to completly hide the title bar. No single pixel shall live.
  • Find a way to restore or create a custom border.
  • find a way to subscribe to window creation/style change events.

About

A powershell script that overrides the titlebar style of all currently open windows to remove them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published