fuhsjr00 / bug.n

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

Stop managing a window, particularly the ShareX screenshot application. #197

Closed ertwro closed 5 years ago

ertwro commented 5 years ago

I use a screenshot application that's amazing called ShareX. When I launch it and there are any windows active different from the explorer window (this is anything different to clicking somewhere on the empty desktop) it manages them like this:

Config_rule=WindowsForms10.Window.8.app.0.b71fd5_r6_ad1;ShareX - Screen recording;;1;1;2;0;0;0;

This is super bad as it creates a tiled section to screenshot that can't be modified in size and renders the program unusable.

This is the desired behavior:

Config_rule=WindowsForms10.Window.8.app.0.b71fd5_r6_ad1;ShareX - Region capture;;0;;;;;0;

I've tried many combinations of rules but nothing different to clicking on the empty desktop and then using the app screenshot function, and not clicking another window works. So I want a way to avoid managing the program windows at all or a way to select the explorer(Desktop) before launching it automatically.

P.S: Does the regex . work after a partial class or title? eg, ```; Shar.;;0;;;;;0; instad of: ; .*;;0;;;;;0; or ; ShareX - Region capture;;1;1;2;;;0; ; ShareX - Screen recording;;1;0;;;1;0;``` ... etc

JamesLarkinWhite commented 5 years ago

I have a (what i believe) similar problem with the Texstudio (https://www.texstudio.org/) application. Texstduio is completely ignored by bug.n. It is maximized and active in any Tag( virtual desktop) no matter in which one it was originally opened. I need to manually minimize it every time.The same is true for the internal pdf app of Texstudio. I use the bug.n exe in the standard configuration and have no clue how to change the Config.ini. I tried to copy one of the examples from the wiki to "C:\Users\User\AppData\Roaming\bug.n", but it seems like this file is ignored.

If there would be any way for a direct conversation with a more experienced user this would be very nice.

ertwro commented 5 years ago

@JamesLarkinWhite I'm afraid our problems are actually the opposite. I don't use TeXstudio (emacs guy) but I downloaded the portable version and the class is Qt5Q.* and I had a similar problem with another of those classes. This is the solution I used back then that works for this:

Config_rule_#18=Qt5QWindowIcon;.*;1;0;0;0;0;1;0;

This will manage all the windows of the same class. Or if you want to decide rules on a case by case basis just change the .* for TeXstudio like this:

Config_rule_#18=Qt5QWindowIcon;TeXstudio;1;0;0;0;0;1;0;
JamesLarkinWhite commented 5 years ago

Thank you for your help. This did solve my problem . Texstudio is still available in the background of each virtual desktop though. I know that this is not a forum where i can ask my questions.... But i think bug.n is incredible nice. But i only have limited experience with i3 under Linux and would really appreciate some help to change the configureation of bug.n On my TN screen the top bar is hard to read for example and i would like to configure the color and the content. Is there a tutorial somewhere that goes beyond the wiki, as this is not document well enough for my limited level of experience. For example: I would have guessed that: Config_selBorderColor=0x0080ff Would change the color of the actives windows color... but it does not have any effect?

Is there a description on how these config_rules work somewhere?

ertwro commented 5 years ago

Not really. Aside from this document https://github.com/fuhsjr00/bug.n/blob/master/doc/Configuring_rules.md am afraid no. Although you can see the rule to solve your problem was already there. Another thing I almost forgot is to try to introduce 1 instead of 0 in the view/tag place holder and put that rule in the config rule 4 instead of the number I had. All you had to do was use the key combination WinI in order to obtain the information like class and the current rule about that window in focus or something like WinLister(http://www.nirsoft.net/utils/winlister.html) to obtain the properties of that window. Finally check past issues here or open an issue if everything else fails.

ertwro commented 5 years ago

I solved my own issue. The main problem was with a regex in conflict (still don't know why?) with a previous rule for snipping tool. So All I did was changing the order of those rules so that the snipping tool rules come after the one for sharex and ended up looking like this:

Config_rule_#18=WindowsForms10.Window.8.app.0.b71fd5_r6_ad1;ShareX -.*;;1;0;0;1;1;0;
Config_rule_#19=Microsoft-Windows-Snipper.*;Snipping Tool;;1;0;0;1;1;0;

Thanks for this really awesome tool.