You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the rename command with open_while_renaming: True in data.yaml, each time a file is opened, the subprocess takes the focus and one has to ctrl + tab back to the terminal to write the file's new name. It's not a big deal but it slows down the renaming process an can be a bit annoying when dealing with a lot of files.
one solution may be to use win32gui, but it is only available on Windows;
another one may be to use a workaround using xdotool for Linux, as suggested here. It seems that there is a Windows version, xdotool-for-windows, so it may be a solution that would work for both OS.
At the risk of disappointing you all 😉, I do not plan to implement this enhancement for now.
The text was updated successfully, but these errors were encountered:
I don't have a copy of Windows available, but I think this might be because of the start command.
I had inferred that start runs the given command in a new shell, but from what you are saying it might be that it actually runs into a new graphical terminal 💻
Because internally you are trying to run a file that is not executable, my guess is that the process crashes before the terminal has time for visually appear, and the only artifact of its existence is that the focus has moved to the now defunct window.
I might be wrong though, as I don't have Windows to test it I cannot tell for sure 😄
Maybe that running the file directly in the subprocess (without the start command) would solve this?
# So changing from thisPopen("start /WAIT $file", shell=True)
# To thisPopen("$file", shell=True)
When using the
rename
command withopen_while_renaming: True
indata.yaml
, each time a file is opened, the subprocess takes the focus and one has toctrl + tab
back to the terminal to write the file's new name. It's not a big deal but it slows down the renaming process an can be a bit annoying when dealing with a lot of files.At the risk of disappointing you all 😉, I do not plan to implement this enhancement for now.
The text was updated successfully, but these errors were encountered: