Update config_explorer()
This should hopefully prevent new explorer windows from being opened and instead just reload the shell
This commit is contained in:
parent
709ceef2b7
commit
8dcbcfc6cb
1 changed files with 7 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ from wk.cfg.setup import (
|
||||||
REG_WINDOWS_EXPLORER,
|
REG_WINDOWS_EXPLORER,
|
||||||
UBLOCK_ORIGIN_URLS,
|
UBLOCK_ORIGIN_URLS,
|
||||||
)
|
)
|
||||||
from wk.exe import kill_procs, run_program, popen_program
|
from wk.exe import get_procs, kill_procs, run_program, popen_program
|
||||||
from wk.io import case_insensitive_path, get_path_obj
|
from wk.io import case_insensitive_path, get_path_obj
|
||||||
from wk.kit.tools import (
|
from wk.kit.tools import (
|
||||||
ARCH,
|
ARCH,
|
||||||
|
|
@ -688,7 +688,12 @@ def config_explorer() -> None:
|
||||||
"""Configure Windows Explorer and restart the process."""
|
"""Configure Windows Explorer and restart the process."""
|
||||||
reg_write_settings(REG_WINDOWS_EXPLORER)
|
reg_write_settings(REG_WINDOWS_EXPLORER)
|
||||||
kill_procs('explorer.exe', force=True)
|
kill_procs('explorer.exe', force=True)
|
||||||
popen_program(['explorer.exe'])
|
popen_program([fr'{SYSTEMDRIVE}\Windows\explorer.exe'])
|
||||||
|
sleep(3)
|
||||||
|
for _ in range(30):
|
||||||
|
if get_procs('explorer.exe'):
|
||||||
|
break
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
|
|
||||||
def config_open_shell() -> None:
|
def config_open_shell() -> None:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue