ixlab-sshui 1.2.1__tar.gz → 1.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/PKG-INFO +9 -1
  2. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/README.md +8 -0
  3. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/ixlab_sshui.egg-info/PKG-INFO +9 -1
  4. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/pyproject.toml +1 -1
  5. ixlab_sshui-1.2.3/sshui/__init__.py +123 -0
  6. ixlab_sshui-1.2.1/sshui/__init__.py +0 -69
  7. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/LICENSE +0 -0
  8. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/ixlab_sshui.egg-info/SOURCES.txt +0 -0
  9. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/ixlab_sshui.egg-info/dependency_links.txt +0 -0
  10. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/ixlab_sshui.egg-info/entry_points.txt +0 -0
  11. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/ixlab_sshui.egg-info/requires.txt +0 -0
  12. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/ixlab_sshui.egg-info/top_level.txt +0 -0
  13. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/setup.cfg +0 -0
  14. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/about_dialog.py +0 -0
  15. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/constants.py +0 -0
  16. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/host_panel.py +0 -0
  17. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/key_content_dialog.py +0 -0
  18. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/key_dialog.py +0 -0
  19. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/key_panel.py +0 -0
  20. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/main_window.py +0 -0
  21. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/option_dialog.py +0 -0
  22. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/sshui.svg +0 -0
  23. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/tag_dialog.py +0 -0
  24. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/terminal_window.py +0 -0
  25. {ixlab_sshui-1.2.1 → ixlab_sshui-1.2.3}/sshui/text_prompt_dialog.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ixlab-sshui
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: PyQt6 UI for browsing and tagging SSH configs via sshcore.
5
5
  Author-email: Iacopo Palazzi <iacopo.palazzi@gmail.com>
6
6
  License: MIT
@@ -19,6 +19,14 @@ Dynamic: license-file
19
19
 
20
20
  `sshui` is a PyQt6-based graphical frontend for the `sshcore` engine. It gives you a fast, tag-aware explorer for SSH configuration files, complete with host grouping, editing dialogs, and quick copy of SSH commands—without touching the command line.
21
21
 
22
+ ## What's New in 1.2.3
23
+
24
+ - **macOS app name** — the menu-bar application name now shows ">SSH" instead of the Python interpreter name (set via `CFBundleName` before the Qt menu is built).
25
+
26
+ ## What's New in 1.2.2
27
+
28
+ - **macOS Dock icon** — the app icon now also shows in the macOS Dock (set via AppKit at startup), not just the menu-bar tray.
29
+
22
30
  ## What's New in 1.2.1
23
31
 
24
32
  - **Application icon** — the app now ships and displays its own icon (window, dock/taskbar, and system tray).
@@ -2,6 +2,14 @@
2
2
 
3
3
  `sshui` is a PyQt6-based graphical frontend for the `sshcore` engine. It gives you a fast, tag-aware explorer for SSH configuration files, complete with host grouping, editing dialogs, and quick copy of SSH commands—without touching the command line.
4
4
 
5
+ ## What's New in 1.2.3
6
+
7
+ - **macOS app name** — the menu-bar application name now shows ">SSH" instead of the Python interpreter name (set via `CFBundleName` before the Qt menu is built).
8
+
9
+ ## What's New in 1.2.2
10
+
11
+ - **macOS Dock icon** — the app icon now also shows in the macOS Dock (set via AppKit at startup), not just the menu-bar tray.
12
+
5
13
  ## What's New in 1.2.1
6
14
 
7
15
  - **Application icon** — the app now ships and displays its own icon (window, dock/taskbar, and system tray).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ixlab-sshui
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: PyQt6 UI for browsing and tagging SSH configs via sshcore.
5
5
  Author-email: Iacopo Palazzi <iacopo.palazzi@gmail.com>
6
6
  License: MIT
@@ -19,6 +19,14 @@ Dynamic: license-file
19
19
 
20
20
  `sshui` is a PyQt6-based graphical frontend for the `sshcore` engine. It gives you a fast, tag-aware explorer for SSH configuration files, complete with host grouping, editing dialogs, and quick copy of SSH commands—without touching the command line.
21
21
 
22
+ ## What's New in 1.2.3
23
+
24
+ - **macOS app name** — the menu-bar application name now shows ">SSH" instead of the Python interpreter name (set via `CFBundleName` before the Qt menu is built).
25
+
26
+ ## What's New in 1.2.2
27
+
28
+ - **macOS Dock icon** — the app icon now also shows in the macOS Dock (set via AppKit at startup), not just the menu-bar tray.
29
+
22
30
  ## What's New in 1.2.1
23
31
 
24
32
  - **Application icon** — the app now ships and displays its own icon (window, dock/taskbar, and system tray).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ixlab-sshui"
3
- version = "1.2.1"
3
+ version = "1.2.3"
4
4
  description = "PyQt6 UI for browsing and tagging SSH configs via sshcore."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -0,0 +1,123 @@
1
+ """PyQt UI package for sshcli."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ from PyQt6.QtCore import QTimer, QBuffer, QByteArray
9
+ from PyQt6.QtGui import QIcon, QAction
10
+ from PyQt6.QtWidgets import QApplication, QSystemTrayIcon, QMenu
11
+
12
+ from .constants import APP_NAME, APP_TITLE
13
+ from .main_window import MainWindow
14
+
15
+ __all__ = ["MainWindow", "main"]
16
+
17
+
18
+ def _set_macos_app_name(name: str) -> None:
19
+ """Set the macOS menu-bar application name (the bold first menu item).
20
+
21
+ That name comes from the process ``CFBundleName``; for a console-script app
22
+ it defaults to the interpreter (e.g. ``python3.14``). Patching the bundle's
23
+ info dictionary must happen *before* ``QApplication`` builds the menu.
24
+ """
25
+ if sys.platform != "darwin":
26
+ return
27
+ try:
28
+ from Foundation import NSBundle
29
+
30
+ bundle = NSBundle.mainBundle()
31
+ if bundle is None:
32
+ return
33
+ info = bundle.localizedInfoDictionary() or bundle.infoDictionary()
34
+ if info is not None:
35
+ info["CFBundleName"] = name
36
+ except Exception as exc: # pragma: no cover - platform/runtime guard
37
+ print(f"[sshui] could not set macOS app name: {exc}", file=sys.stderr)
38
+
39
+
40
+ def _patch_macos_app_menu(name: str) -> None:
41
+ """Rename the macOS application menu (the 'Python' entry in the menu bar)."""
42
+ try:
43
+ from AppKit import NSApplication
44
+ ns_app = NSApplication.sharedApplication()
45
+ if ns_app is None:
46
+ return
47
+ menu = ns_app.mainMenu()
48
+ if menu is None or menu.numberOfItems() == 0:
49
+ return
50
+ item = menu.itemAtIndex_(0)
51
+ item.setTitle_(name)
52
+ if item.submenu() is not None:
53
+ item.submenu().setTitle_(name)
54
+ except Exception as exc:
55
+ import sys
56
+ print(f"[sshui] could not patch macOS app menu: {exc}", file=sys.stderr)
57
+
58
+
59
+ def _set_macos_dock_icon(icon: QIcon) -> None:
60
+ """Set the macOS Dock icon.
61
+
62
+ ``QApplication.setWindowIcon`` does not affect the Dock for a console-script
63
+ app, so we hand the icon to AppKit explicitly. The SVG is rendered through
64
+ Qt to PNG bytes because ``NSImage`` does not read SVG reliably.
65
+ """
66
+ if sys.platform != "darwin":
67
+ return
68
+ try:
69
+ from AppKit import NSApplication, NSImage
70
+
71
+ pixmap = icon.pixmap(512, 512)
72
+ if pixmap.isNull():
73
+ return
74
+ data = QByteArray()
75
+ buffer = QBuffer(data)
76
+ buffer.open(QBuffer.OpenModeFlag.WriteOnly)
77
+ pixmap.save(buffer, "PNG")
78
+ buffer.close()
79
+
80
+ ns_image = NSImage.alloc().initWithData_(bytes(data))
81
+ if ns_image is None:
82
+ return
83
+ NSApplication.sharedApplication().setApplicationIconImage_(ns_image)
84
+ except Exception as exc: # pragma: no cover - platform/runtime guard
85
+ print(f"[sshui] could not set macOS dock icon: {exc}", file=sys.stderr)
86
+
87
+
88
+ def main() -> int:
89
+ """Entry point used by the `sshui` console script."""
90
+ _set_macos_app_name(APP_NAME)
91
+
92
+ app = QApplication(sys.argv)
93
+ app.setApplicationName(APP_NAME)
94
+ app.setApplicationDisplayName(APP_NAME)
95
+
96
+ icon_path = Path(__file__).parent / "sshui.svg"
97
+ icon = QIcon(str(icon_path))
98
+ app.setWindowIcon(icon)
99
+ _set_macos_dock_icon(icon)
100
+
101
+ window = MainWindow()
102
+ window.setWindowIcon(icon)
103
+ window.setWindowTitle(APP_TITLE)
104
+
105
+ tray_icon = QSystemTrayIcon(icon, app)
106
+ tray_icon.setToolTip(APP_TITLE)
107
+
108
+ menu = QMenu()
109
+ show_action = QAction("Show", app)
110
+ quit_action = QAction("Quit", app)
111
+ show_action.triggered.connect(window.show)
112
+ quit_action.triggered.connect(app.quit)
113
+ menu.addAction(show_action)
114
+ menu.addAction(quit_action)
115
+
116
+ tray_icon.setContextMenu(menu)
117
+ tray_icon.show()
118
+ tray_icon.activated.connect(window.show)
119
+
120
+ window.show()
121
+ QTimer.singleShot(0, lambda: _patch_macos_app_menu(APP_NAME))
122
+
123
+ return app.exec()
@@ -1,69 +0,0 @@
1
- """PyQt UI package for sshcli."""
2
-
3
- from __future__ import annotations
4
-
5
- import sys
6
- from pathlib import Path
7
-
8
- from PyQt6.QtCore import QTimer
9
- from PyQt6.QtGui import QIcon, QAction
10
- from PyQt6.QtWidgets import QApplication, QSystemTrayIcon, QMenu
11
-
12
- from .constants import APP_NAME, APP_TITLE
13
- from .main_window import MainWindow
14
-
15
- __all__ = ["MainWindow", "main"]
16
-
17
-
18
- def _patch_macos_app_menu(name: str) -> None:
19
- """Rename the macOS application menu (the 'Python' entry in the menu bar)."""
20
- try:
21
- from AppKit import NSApplication
22
- ns_app = NSApplication.sharedApplication()
23
- if ns_app is None:
24
- return
25
- menu = ns_app.mainMenu()
26
- if menu is None or menu.numberOfItems() == 0:
27
- return
28
- item = menu.itemAtIndex_(0)
29
- item.setTitle_(name)
30
- if item.submenu() is not None:
31
- item.submenu().setTitle_(name)
32
- except Exception as exc:
33
- import sys
34
- print(f"[sshui] could not patch macOS app menu: {exc}", file=sys.stderr)
35
-
36
-
37
- def main() -> int:
38
- """Entry point used by the `sshui` console script."""
39
- app = QApplication(sys.argv)
40
- app.setApplicationName(APP_NAME)
41
- app.setApplicationDisplayName(APP_NAME)
42
-
43
- icon_path = Path(__file__).parent / "sshui.svg"
44
- icon = QIcon(str(icon_path))
45
- app.setWindowIcon(icon)
46
-
47
- window = MainWindow()
48
- window.setWindowIcon(icon)
49
- window.setWindowTitle(APP_TITLE)
50
-
51
- tray_icon = QSystemTrayIcon(icon, app)
52
- tray_icon.setToolTip(APP_TITLE)
53
-
54
- menu = QMenu()
55
- show_action = QAction("Show", app)
56
- quit_action = QAction("Quit", app)
57
- show_action.triggered.connect(window.show)
58
- quit_action.triggered.connect(app.quit)
59
- menu.addAction(show_action)
60
- menu.addAction(quit_action)
61
-
62
- tray_icon.setContextMenu(menu)
63
- tray_icon.show()
64
- tray_icon.activated.connect(window.show)
65
-
66
- window.show()
67
- QTimer.singleShot(0, lambda: _patch_macos_app_menu(APP_NAME))
68
-
69
- return app.exec()
File without changes
File without changes
File without changes