Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/build instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ All scripts pass the `--active` flag to make sure the active environment is used
## Install and Build steps

- Run `./scripts/install.ps1` to create/update a virtual environment and install all dependencies.
- Run the app directly with `./scripts/start.ps1 [--auto-controlled]`.
- Run the app directly with `./scripts/start.ps1 [--auto-controlled] [--minimized]`.
- Or debug by pressing `F5` in VSCode.
- The `--auto-controlled` flag is passed when AutoSplit is started by LiveSplit.
- The `--minimized` flag starts the app minimized to the taskbar. Also intended for use with the LiveSplit integration.
- Run `./scripts/build.ps1` or press `CTRL+Shift+B` in VSCode to build an executable.
- Optional: Recompile resources after modifications by running `./scripts/compile_resources.ps1`.
- This should be done automatically by other scripts
9 changes: 8 additions & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ The size of the selected rectangle can also impact the CPU load (bigger = more C
- All of these actions can also be handled by their corresponding buttons.
- Note that pressing your Pause Hotkey does not serve any function in AutoSplit itself and is strictly used for the Pause flag.

#### LiveSplit Integration
### LiveSplit Integration

See the [usage instructions](https://github.com/Toufool/LiveSplit.AutoSplitIntegration#openingclosing-autosplit).

## Command-line options

AutoSplit accepts the following command-line flags:

- `--auto-controlled` is reserved for timer integrations and is passed automatically when AutoSplit is started by LiveSplit. You should not need to set it manually.
- `--minimized` starts AutoSplit minimized to the taskbar, so it stays out of the way. Mainly intended for use with a timer integration.
6 changes: 5 additions & 1 deletion src/AutoSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def do_nothing(*_): ...
class AutoSplit(QMainWindow, design.Ui_MainWindow):
# Parse command line args
is_auto_controlled = "--auto-controlled" in sys.argv
start_minimized = "--minimized" in sys.argv

# Signals
start_auto_splitter_signal = QtCore.Signal()
Expand Down Expand Up @@ -264,7 +265,10 @@ def _update_checker_widget_signal_slot(latest_version: str, check_on_open: bool)
# Automatic timer start
self.timer_start_image.timeout.connect(self.__compare_capture_for_auto_start)

self.show()
if self.start_minimized:
self.showMinimized()
else:
self.show()

# https://pyinstaller.org/en/stable/advanced-topics.html#module-pyi_splash
# doc implies calling `pyi_splash.is_alive()` should return false should be enough, but in
Expand Down
Loading