fuhsjr00 / bug.n

Tiling Window Manager for Windows
GNU General Public License v3.0
3.34k stars 214 forks source link

Cannot highlight focussed window #217

Closed blokeley closed 5 years ago

blokeley commented 5 years ago

I need (want) the window with current focus to be obvious by having a coloured border like the top left window in the image below:

Highlighted window

I have tried the following customisations in my Config.ini but they seem to have no effect. I'm guessing that colours are specified in hex RGB so 0000ff should be blue.

; Customise theme
Config_showBorder=1
Config_borderWidth=3
Config_selBorderColor=0000ff

Please could you advise the correct config?

I tried asking a question on superuser but got no answers.

ertwro commented 5 years ago

Highlighting the focused Window is a property of Windows, at least in Windows 10. This is configured in the windows settings. Since Bug.n uses Wini to obtain properties about windows, you can use Winr or run and introduce ms-settings:colors to access the Settings>Personalization>Colors menu. Once there pick a color and select [-]Title bars and window borders.

If you want thick bootilicious borders you need to edit your registry HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics Once there modify BorderWidth The values go from 0 to -750, the units are twips and 12 twips are like 1 pixel. 1px = -12 twips and numbers are rounded to the closest integer in pixels. Is not super consistent and you need to restart for the changes to take effect.

blokeley commented 5 years ago

Thanks for the help. I set the theme to the standard "WIndows 10" one, but dark, turned on the "Title bars and window borders" and set to Blue (which it was already), and set the BorderWidth to -750 but it made no difference...

image

In the image above, it is almost impossible to tell which window is focussed. It's the top right!

I tried Light theme, turning on Transparency and other values for the BorderWidth but nothing seemed to make any difference. The windows don't have borders even with bug.n quitted (standard Windows 10 window manager).

Strangely, the PowerPoint window has massive padding so maybe it has taken on the -750 twirp border?

Any ideas how to get a border?

blokeley commented 5 years ago

It seems that control over border width using HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\BorderWidth has been disabled in Windows 10. I even tried turning on High Contrast themes but the border was even smaller! I doubt that bug.n can do anything about this.

ertwro commented 5 years ago

@blokeley BorderWidth is not universally disabled but is unreliable as I said, since it's configuration and maybe version dependent (in both my machines v20H1 b18917 and v1903 b18362 works). In order for window borders to be differentiated, you need active and inactive properties. In your registry, you can edit these values if personalization didn't work for you.

# Registry Editor path (Copy & paste it in the Registry address bar)
HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM
# Modify the AccentColor
# Add the DWORD (32 bit value) - AccentColorInactive
# The value is a hexadecimal number

If the contrast blur and animation are set properly it even shows the most recent window in a different color from other inactive windows and the active one. Naturally, this is all Windows 10 configuration dependent and not related to bug.n image

blokeley commented 5 years ago

@ertwro thanks for the very helpful tips. I tried the registry changes but no joy :(

isc30 commented 3 years ago

same here, what a pity