Skip to content
Merged
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
70 changes: 35 additions & 35 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
#
altgraph==0.17.4
# via pyinstaller
bandit==1.8.3
bandit==1.8.6
# via -r requirements-dev.in
black==25.1.0
# via -r requirements-dev.in
build==1.2.2.post1
build==1.3.0
# via pip-tools
certifi==2025.4.26
certifi==2025.8.3
# via requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.4.2
charset-normalizer==3.4.3
# via requests
click==8.1.8
click==8.2.1
# via
# black
# pip-tools
Expand All @@ -28,19 +28,19 @@ colorama==0.4.6
# build
# click
# pytest
distlib==0.3.9
distlib==0.4.0
# via virtualenv
docutils==0.21.2
docutils==0.22
# via flit
filelock==3.18.0
filelock==3.19.1
# via virtualenv
flake8==7.2.0
flake8==7.3.0
# via -r requirements-dev.in
flit==3.12.0
# via -r requirements-dev.in
flit-core==3.12.0
# via flit
identify==2.6.12
identify==2.6.13
# via pre-commit
idna==3.10
# via requests
Expand All @@ -50,13 +50,13 @@ invoke==2.2.0
# via -r requirements-dev.in
isort==6.0.1
# via -r requirements-dev.in
markdown-it-py==3.0.0
markdown-it-py==4.0.0
# via rich
mccabe==0.7.0
# via flake8
mdurl==0.1.2
# via markdown-it-py
mypy==1.16.0
mypy==1.17.1
# via -r requirements-dev.in
mypy-extensions==1.1.0
# via
Expand All @@ -75,83 +75,83 @@ pathspec==0.12.1
# via
# black
# mypy
pbr==6.1.1
# via stevedore
pefile==2023.2.7
# via pyinstaller
pip-tools==7.4.1
pip-tools==7.5.0
# via -r requirements-dev.in
platformdirs==4.3.8
platformdirs==4.4.0
# via
# black
# virtualenv
pluggy==1.6.0
# via
# pytest
# pytest-qt
pre-commit==4.2.0
pre-commit==4.3.0
# via -r requirements-dev.in
pycodestyle==2.13.0
pycodestyle==2.14.0
# via flake8
pyflakes==3.3.2
pyflakes==3.4.0
# via flake8
pygments==2.19.1
pygments==2.19.2
# via
# pytest
# rich
pyinstaller==6.14.0
pyinstaller==6.15.0
# via -r requirements-dev.in
pyinstaller-hooks-contrib==2025.4
pyinstaller-hooks-contrib==2025.8
# via pyinstaller
pyproject-hooks==1.2.0
# via
# build
# pip-tools
pyside6==6.9.1
pyside6==6.9.2
# via -r requirements.txt
pyside6-addons==6.9.1
pyside6-addons==6.9.2
# via
# -r requirements.txt
# pyside6
pyside6-essentials==6.9.1
pyside6-essentials==6.9.2
# via
# -r requirements.txt
# pyside6
# pyside6-addons
pytest==8.4.0
pytest==8.4.1
# via
# -r requirements-dev.in
# pytest-params
# pytest-qt
pytest-params==0.3.0
# via -r requirements-dev.in
pytest-qt==4.4.0
pytest-qt==4.5.0
# via -r requirements-dev.in
pywin32-ctypes==0.2.3
# via pyinstaller
pyyaml==6.0.2
# via
# bandit
# pre-commit
requests==2.32.3
requests==2.32.5
# via flit
rich==14.0.0
rich==14.1.0
# via bandit
shiboken6==6.9.1
shiboken6==6.9.2
# via
# -r requirements.txt
# pyside6
# pyside6-addons
# pyside6-essentials
stevedore==5.4.1
stevedore==5.5.0
# via bandit
tomli-w==1.2.0
# via flit
typing-extensions==4.14.0
# via mypy
urllib3==2.4.0
typing-extensions==4.15.0
# via
# mypy
# pytest-qt
urllib3==2.5.0
# via requests
virtualenv==20.31.2
virtualenv==20.34.0
# via pre-commit
wheel==0.45.1
# via pip-tools
Expand Down
23 changes: 12 additions & 11 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@
#
babel==2.17.0
# via mkdocs-material
backrefs==5.8
backrefs==5.9
# via mkdocs-material
certifi==2025.4.26
certifi==2025.8.3
# via
# -c requirements-dev.txt
# requests
charset-normalizer==3.4.2
charset-normalizer==3.4.3
# via
# -c requirements-dev.txt
# requests
click==8.1.8
click==8.2.1
# via
# -c requirements-dev.txt
# mkdocs
# mkdocs-material
colorama==0.4.6
# via
# -c requirements-dev.txt
Expand All @@ -36,7 +37,7 @@ jinja2==3.1.6
# via
# mkdocs
# mkdocs-material
markdown==3.8
markdown==3.8.2
# via
# mdx-truly-sane-lists
# mkdocs
Expand All @@ -60,7 +61,7 @@ mkdocs-get-deps==0.2.0
# via mkdocs
mkdocs-glightbox==0.4.0
# via -r requirements-docs.in
mkdocs-material==9.6.14
mkdocs-material==9.6.18
# via -r requirements-docs.in
mkdocs-material-extensions==1.3.1
# via mkdocs-material
Expand All @@ -74,15 +75,15 @@ pathspec==0.12.1
# via
# -c requirements-dev.txt
# mkdocs
platformdirs==4.3.8
platformdirs==4.4.0
# via
# -c requirements-dev.txt
# mkdocs-get-deps
pygments==2.19.1
pygments==2.19.2
# via
# -c requirements-dev.txt
# mkdocs-material
pymdown-extensions==10.15
pymdown-extensions==10.16.1
# via mkdocs-material
python-dateutil==2.9.0.post0
# via ghp-import
Expand All @@ -95,13 +96,13 @@ pyyaml==6.0.2
# pyyaml-env-tag
pyyaml-env-tag==1.1
# via mkdocs
requests==2.32.3
requests==2.32.5
# via
# -c requirements-dev.txt
# mkdocs-material
six==1.17.0
# via python-dateutil
urllib3==2.4.0
urllib3==2.5.0
# via
# -c requirements-dev.txt
# requests
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# pip-compile requirements.in
#
pyside6==6.9.1
pyside6==6.9.2
# via -r requirements.in
pyside6-addons==6.9.1
pyside6-addons==6.9.2
# via pyside6
pyside6-essentials==6.9.1
pyside6-essentials==6.9.2
# via
# pyside6
# pyside6-addons
shiboken6==6.9.1
shiboken6==6.9.2
# via
# pyside6
# pyside6-addons
Expand Down
10 changes: 9 additions & 1 deletion src/hd_active/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import sys
from pathlib import Path

from PySide6 import QtGui, QtWidgets

from .ui.system_tray_icon import SystemTrayIcon
from .ui.system_tray_icon import DEFAULT_HD_ACTIVE_FILE_NAME, SystemTrayIcon
from .utils import get_asset


Expand All @@ -12,10 +13,17 @@ def main():
"""
app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget()
hd_active_file_name = (
Path(sys.argv[1]).expanduser().resolve()
if len(sys.argv) > 1
else DEFAULT_HD_ACTIVE_FILE_NAME
)

tray_icon = SystemTrayIcon(
# Icon from https://icon-icons.com/icon/drive-harddisk-usb/36212 (GPL v3)
icon=QtGui.QIcon(str(get_asset('images', 'hard_drive_icon.png'))),
parent=widget,
hd_active_file_name=hd_active_file_name,
)
tray_icon.show()
tray_icon.showMessage('HD Active started', 'The message')
Expand Down
4 changes: 3 additions & 1 deletion src/hd_active/ui/system_tray_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
If truthy, HDs are not accessed. Used for testing purposes.
"""

DEFAULT_HD_ACTIVE_FILE_NAME = 'hd_active.ini'


class SystemTrayIcon(QSystemTrayIcon):
def __init__(self, icon, parent=None, hd_active_file_name: str = 'hd_active.ini'):
def __init__(self, icon, parent=None, hd_active_file_name: str = DEFAULT_HD_ACTIVE_FILE_NAME):
super().__init__(icon=icon, parent=parent)

self.hd_active_file_name = hd_active_file_name
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ def pip_package(c, requirements, package):


@task(help=REQUIREMENTS_TASK_HELP)
def pip_upgrade(c, requirements):
def pip_upgrade(c, requirements=None):
"""
Try to upgrade all dependencies to their latest versions.
"""
Expand Down
Loading