win-vind icon indicating copy to clipboard operation
win-vind copied to clipboard

[Feature] Suppress the program specified by user

Open zzeitt opened this issue 2 years ago • 4 comments

Suppress win-vind for the program specified by user Hi @pit-ray, I am addicted to win-vind ever since I've used this tool.

In my daily work, I use MS Edge Browser with plugin Vimium frequently.

However, it's annoying that I have to switch to 'RESIDENT MODE' manually every time I open an Edge window.

I noticed that there is a suppress_for_vim function built in this tool.

My question is can we implement a function to make win-vind suppress for the program specified by user? Like set suppress_program=msedge.exe.

Related projects (Optional) Here I found the source code of suppress_for_vim: https://github.com/pit-ray/win-vind/blob/2d7c1cda120eef31083ba689e94e855eb31f9bf3/src/opt/suppress_for_vim.cpp#L49 Maybe we could use a variable to replace the constant string 'vim' during string matching.

zzeitt avatar Jun 17 '22 10:06 zzeitt

As mentioned in #89, we must solve this problem.

The plan is to determine this based on the executable name or path (relative or absolute) with a notation similar to arrangewin_ignore option in arrange_windows.

https://github.com/pit-ray/win-vind/blob/2d7c1cda120eef31083ba689e94e855eb31f9bf3/src/bind/window/arrange_win.cpp#L193-L203 If possible, please send a pull request. I will accept any discussions and questions for implementation in the pull request thread, so please feel free to do so. Otherwise, I would like to implement this as v4.5.

Thanks for your contribution.

pit-ray avatar Jun 18 '22 16:06 pit-ray

Oh, sorry for missing the previous issue. I will subscribe this #89..

The feature seems to be feasible since there already has a config arrangewin_ignore running fine. I am still busy in recent days, so maybe I could attempt to modify the source code when I am get more spare time.

Thanks for your great job.

zzeitt avatar Jun 19 '22 08:06 zzeitt

Since there seems to be a lot of requests, I will implement this as a priority. Thanks.

pit-ray avatar Jun 20 '22 13:06 pit-ray

Great to hear that! Can't wait to see the new feature. Thank you for your hard effort.

zzeitt avatar Jun 21 '22 07:06 zzeitt

@zzeitt Implemented in 5.3.0.

pit-ray avatar Aug 11 '23 16:08 pit-ray