|
skwire
|
 |
« Reply #25 on: September 28, 2009, 10:54:16 PM » |
|
Is it possible just to hide them, not remove them? I suppose one could write code to watch the mouse cursor and, if it was in the titlebar area, set the window style back to +0x80000 to show the buttons again. Is it possible just to hide some of them, e.g. leaving the close button only? I don't think so, but I don't know for certain.
|
|
|
|
|
Logged
|
|
|
|
|
skwire
|
 |
« Reply #26 on: September 29, 2009, 01:10:25 AM » |
|
Here, try this. When you start up this version, a message box will popup asking if you want to enable the min/max/close tweak. If you choose yes, they will be hidden upon each window's creation and they should appear whenever your mouse is in the titlebar area. It's not perfect but it seems to work fairly well. Also, this version leaves the tray icon in place so you can exit it. All min/max/close buttons should be restored on exit. Formatted for AutoIt with the GeSHI Syntax Highlighter [ copy or print] /* Author: Jody Holmes (Skwire) Date: 2009-08-23 Contact: skwire@skwire.net v0.0.0.3 - 2009-09-29 + Added optional showing/hiding of titlebar min/max/close buttons. v0.0.0.2 - 2009-08-28 * Hook now fires on two additional messages. HSHELL_REDRAW HSHELL_RUDEAPPACTIVATED v0.0.0.1 - 2009-08-23 + Initial build. */ ;#NoTrayIcon #Persistent #NoEnv #SingleInstance, Force SetWorkingDir, %A_ScriptDir% DetectHiddenWindows, Off OnExit, Cleanup Menu, Tray, NoStandard Menu , Tray , Add , Exit, Cleanup Gui +LastFound ; Hook the shell. ; http://www.autohotkey.com/forum/viewtopic.php?p=123323#123323 MsgNum : = DllCall( "RegisterWindowMessage", Str , "SHELLHOOK" )OnMessage( MsgNum, "ShellMessage" ) ; Create a blank cursor for use instead of a blank icon file. ; http://www.autohotkey.com/forum/viewtopic.php?p=220113#220113 VarSetCapacity( AndMask, 32*4, 0xFF ), VarSetCapacity( XorMask, 32*4, 0 ) hIcon : = DllCall( "CreateCursor", Uint , 0, Int, 0, Int, 0, Int, 32, Int, 32, Uint , &AndMask , Uint , &XorMask ) ; Initial loop to blank out existing windows. WinGet, s, List Loop, % s { s := s%A_Index% ;SendMessage, 0x80, 0, hIcon, , % "ahk_id " . s } MsgBox, 36, TBarIconBlanker , Would you like to enable the min /max /close buttons tweak as well? IfMsgBox, Yes { MinMaxCloseOption := 1 SetTimer, WatchCursor, 100 } Return ; End of auto-execute section. ; ------------------------------------------------------------------------ ; Subroutines ------------------------------------------------------------ ; ------------------------------------------------------------------------ Cleanup: { If ( MinMaxCloseOption = 1 ) ; Restore titlebar buttons on close. { WinGet, s, List Loop, % s { s := s%A_Index% WinSet, Style, +0x80000, % "ahk_id " . s ; Restore min/max/close buttons. } } ExitApp } WatchCursor: { If ( yPos >= 0 and yPos < 22 ) { WinSet, Style, +0x80000, % "ahk_id " . CurrID ; Restore min/max/close buttons. } { WinSet, Style, -0x80000, % "ahk_id " . PrevID ; Get rid of min/max/close buttons. WinSet, Style, -0x80000, % "ahk_id " . CurrID ; Get rid of min/max/close buttons. } } ; ------------------------------------------------------------------------ ; Functions -------------------------------------------------------------- ; ------------------------------------------------------------------------ ; Shell hook to blank out windows that are subsequently created. ShellMessage( wParam, lParam ) { Global hIcon , MinMaxCloseOption , PrevID { SendMessage, 0x80, 0, hIcon, , % "ahk_id " . lParam ; Blank out titlebar and taskbar icons. If ( MinMaxCloseOption = 1 ) { WinSet, Style, -0x80000, % "ahk_id " . lParam ; Get rid of min/max/close buttons. } } PrevID := lParam }
|
|
|
|
|
Logged
|
|
|
|
|
tmpusr
|
 |
« Reply #27 on: September 29, 2009, 04:42:39 AM » |
|
Thanks. This is great.  I'll be running this on all my systems forever. If only one could have the same for the Explorer toolbar buttons, the start button, the tray. A universal auto-hide for buttons and other UI elements - the minimalist's dream. Can you make it not restore the window icon along with the buttons when hovering? It sometimes shows them, sometimes doesn't. I'd like to have an INI option for the behavior. Can you restore the icon in the toolbar when hovering, either on the button or in toolbar area? Can you make it work when hovering on background windows? Can you blank out the window borders - make them transparent - in a similar fashion? If not blank out, then fill with some solid color. It would be neat to have borderless windows that only appear when hovering. Can you blank out the right side of the Explorer statusbar (which, I just noticed, in Explorer menu is "Status Bar" which seems inconsistent with the way "Taskbar" is written), the part that has the unnecessary My Computer/Internet or simply fill it with a solid rectangle and remove it when hovering? The user would have to match the color and perhaps the height to the visual style - unless there are system variables for those that you can use. Can you use a system variable to find out the actual height of the titlebar instead of the fixed value, 22? I use a larger title bar and it ony shows when I'm at the top 22. Can you remove the empty space occupied by the invisible icon in front of the taskbar buttons? I'd prefer it to ask nothing upon startup and default to hide buttons and have no tray icon. Bug: Right clicking taskbar button doesn't bring up the menu (though sometimes it does). Bug: Buttons not removed on command line window. Bug-like behavior (due to implementation, if I'm correct): it keeps blinking with TeraCopy and 7-Zip, that update the % done in the titlebar.
|
|
|
|
« Last Edit: September 29, 2009, 06:21:42 AM by tmpusr »
|
Logged
|
|
|
|
|
|
skwire
|
 |
« Reply #28 on: September 29, 2009, 06:46:08 AM » |
|
This version checks the system for titlebar height so it should work better with your system. It also attempts to keep the titlebar icon hidden when restoring the min/max/close buttons. It also does away with the message box at the start and the tray icon. As for your other requests, I really don't want to develop this app any further in all these other directions. There are so many variables at play here and so many different system configurations that I simply have no desire to get knee-deep in trying to troubleshoot/fix/hack/whatever. Feel free to study the code and take it further on your own. There really isn't a whole lot of complex code in this script. Here you go: Formatted for AutoIt with the GeSHI Syntax Highlighter [ copy or print] /* Author: Jody Holmes (Skwire) Date: 2009-08-23 Contact: skwire@skwire.net v0.0.0.3 - 2009-09-29 + Added optional showing/hiding of titlebar min/max/close buttons. v0.0.0.2 - 2009-08-28 * Hook now fires on two additional messages. HSHELL_REDRAW HSHELL_RUDEAPPACTIVATED v0.0.0.1 - 2009-08-23 + Initial build. */ #NoTrayIcon #Persistent #NoEnv #SingleInstance, Force SetWorkingDir, %A_ScriptDir% DetectHiddenWindows, Off OnExit, Cleanup SysGet, TBarHeight, 4 Menu, Tray, NoStandard Menu , Tray , Add , Exit, Cleanup Gui +LastFound ; Hook the shell. ; http://www.autohotkey.com/forum/viewtopic.php?p=123323#123323 MsgNum : = DllCall( "RegisterWindowMessage", Str , "SHELLHOOK" )OnMessage( MsgNum, "ShellMessage" ) ; Create a blank cursor for use instead of a blank icon file. ; http://www.autohotkey.com/forum/viewtopic.php?p=220113#220113 VarSetCapacity( AndMask, 32*4, 0xFF ), VarSetCapacity( XorMask, 32*4, 0 ) hIcon : = DllCall( "CreateCursor", Uint , 0, Int, 0, Int, 0, Int, 32, Int, 32, Uint , &AndMask , Uint , &XorMask ) ; Initial loop to blank out existing windows. WinGet, s, List Loop, % s { s := s%A_Index% ;SendMessage, 0x80, 0, hIcon, , % "ahk_id " . s } ; MsgBox, 36, TBarIconBlanker, Would you like to enable the min/max/close buttons tweak as well? ; IfMsgBox, Yes ; { ; MinMaxCloseOption := 1 ; SetTimer, WatchCursor, 100 ; } MinMaxCloseOption := 1 SetTimer, WatchCursor, 100 Return ; End of auto-execute section. ; ------------------------------------------------------------------------ ; Subroutines ------------------------------------------------------------ ; ------------------------------------------------------------------------ Cleanup: { If ( MinMaxCloseOption = 1 ) ; Restore titlebar buttons on close. { WinGet, s, List Loop, % s { s := s%A_Index% WinSet, Style, +0x80000, % "ahk_id " . s ; Restore min/max/close buttons. } } ExitApp } WatchCursor: { If ( yPos >= 0 and yPos < ( TBarHeight + 3 ) ) { WinSet, Style, +0x80000, % "ahk_id " . CurrID ; Restore min/max/close buttons. SendMessage, 0x80, 0, hIcon, , % "ahk_id " . CurrID ; Blank out titlebar and taskbar icons. } { WinSet, Style, -0x80000, % "ahk_id " . PrevID ; Get rid of min/max/close buttons. WinSet, Style, -0x80000, % "ahk_id " . CurrID ; Get rid of min/max/close buttons. SendMessage, 0x80, 0, hIcon, , % "ahk_id " . CurrID ; Blank out titlebar and taskbar icons. } } ; ------------------------------------------------------------------------ ; Functions -------------------------------------------------------------- ; ------------------------------------------------------------------------ ; Shell hook to blank out windows that are subsequently created. ShellMessage( wParam, lParam ) { Global hIcon , MinMaxCloseOption , PrevID { SendMessage, 0x80, 0, hIcon, , % "ahk_id " . lParam ; Blank out titlebar and taskbar icons. If ( MinMaxCloseOption = 1 ) { WinSet, Style, -0x80000, % "ahk_id " . lParam ; Get rid of min/max/close buttons. } } PrevID := lParam }
|
|
|
|
|
Logged
|
|
|
|
|
tmpusr
|
 |
« Reply #29 on: September 29, 2009, 08:38:33 AM » |
|
Thanks again.
Could you take a look at the changed taskbar button behavior: in many cases you need to click it twice until the window minimizes. And the right click menu is missing.
If you don't want to work on them, do you whether they are possible, like the overlaying of window borders with a solid color unless hovering there?
Without the buttons and icons the system looks much cleaner. I think this should be an option in Win 8 or Win 7 SP1, it's that good.
|
|
|
|
|
Logged
|
|
|
|
|
skwire
|
 |
« Reply #30 on: September 29, 2009, 08:59:37 AM » |
|
Could you take a look at the changed taskbar button behavior: in many cases you need to click it twice until the window minimizes. And the right click menu is missing.
Unfortunately, that's a side-effect of getting rid of the buttons. The 0x80000 style is WM_SYSMENU. So, basically, the code removes the window's system menu (the one you normally see when right-clicking or using the alt-space hotkey). Honestly, for the amount of customisation you want to do, you may want to look into alternate Windows shell. I, for instance, run a branch of the bb4Win shell called bbClean. Using the bbLeanSkin plugin, you can specify which titlebar buttons to show (or none), whether or not icons show in the titlebar, etc. Also, you can make the taskbar and tray icons greyscale, colour-muted, and on and on. Take a look at the screenshots at http://www.boxshots.org for ideas. You can see a screenshot of what my desktop typically looks like in an earlier post in this thread: http://www.donationcoder....19584.msg175110#msg175110
|
|
|
|
|
Logged
|
|
|
|
|
tmpusr
|
 |
« Reply #31 on: September 29, 2009, 09:21:11 AM » |
|
Wouldn't it be fixed simply by detecting that you're hovering over the taskbar and restoring the buttons - and thereby normal functionality - while you're there?
I'm pretty happy with the Explorer shell, but I'll take a look at BB.
I'm interested in the concept of stuff appearing only when you're near it. See nothing unless you're going to use it momentarily. Keep visual clutter to a minimum.
If you or someone could make the "hide window borders or overlay them with color while not near them", there's not much more I could think of improving - except for showing the icons in the taskbar at the same time as you're hovering over them. Which made me wonder, could you show the taskbar icons, but only while hovering over a window title?
Is it possible to show the window icon, too, when the buttons appear?
Is it possible to change the title bar font color and/or background color while you're hovering on it? I'd like to see it dim when I'm not near it, and get bright when hovering. The same goes for the taskbar text.
Is it possible to completely hide the titlebar until you move near it? So that the window actually is smaller and tiles as if it doesn't have the titlebar, but then the titlebar pops up when you're near it. The same for the statusbar too - auto-hide window titlebar and statusbar.
And heaps of thanks for your efforts. This has significantly changed the aesthetics of the OS for the better.
|
|
|
|
« Last Edit: September 29, 2009, 09:33:22 AM by tmpusr »
|
Logged
|
|
|
|
|
tmpusr
|
 |
« Reply #32 on: September 29, 2009, 09:37:17 AM » |
|
Found a great free app to remove all lines and rectangles from the taskbar, and to blank out the start button, leaving just an empty area of the size you can control, and to hide or replace the clock. You can make the taskbar completely flat. http://homepage1.nifty.com/kazubon/tclocklight/
|
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #33 on: April 10, 2010, 01:35:23 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|