: Idle (default)
powershell -command " Write-Host -NoNewline ([char]27 + \"]9;4;3\" + [char]7) "
: WIP (rotation)
powershell -command " Write-Host -NoNewline ([char]27 + \"]9;4;0\" + [char]7) "
: Idle (default)
pwsh -command " Write-Host -NoNewline (\"`e]9;4;3`a\") "
: WIP (rotation)
pwsh -command " Write-Host -NoNewline (\"`e]9;4;0`a\") "
for /F %%E in ('forfiles /m "%~nx0" /c "cmd /c echo 0x1b"') do set "_ESC=%%E"
for /F %%E in ('forfiles /m "%~nx0" /c "cmd /c echo 0x07"') do set "_BELL=%%E"
echo WIP (rotation)
echo %_ESC%]9;4;3%_BELL%
pause
echo Idle (default)
echo %_ESC%]9;4;0%_BELL%
See also