graphical-ssh 0.1.1__tar.gz → 0.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphical-ssh
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Graphical SSH client connection and configuration manager for Debian
5
5
  Keywords: ssh,terminal,config,gui,pyqt,debian
6
6
  Author: Greg Grace
@@ -56,15 +56,15 @@ A graphical SSH client connection and configuration manager for Debian/Linux. Ma
56
56
  ### From PyPI (recommended)
57
57
 
58
58
  ```bash
59
- pip install gssh
60
- gssh
59
+ pip install graphical-ssh
60
+ gssh # or: graphical-ssh (both commands are installed)
61
61
  ```
62
62
 
63
63
  Or run without installing:
64
64
 
65
65
  ```bash
66
- uvx gssh # via uv
67
- pipx run gssh # via pipx
66
+ uvx graphical-ssh # via uv
67
+ pipx run graphical-ssh # via pipx
68
68
  ```
69
69
 
70
70
  ### From source
@@ -28,15 +28,15 @@ A graphical SSH client connection and configuration manager for Debian/Linux. Ma
28
28
  ### From PyPI (recommended)
29
29
 
30
30
  ```bash
31
- pip install gssh
32
- gssh
31
+ pip install graphical-ssh
32
+ gssh # or: graphical-ssh (both commands are installed)
33
33
  ```
34
34
 
35
35
  Or run without installing:
36
36
 
37
37
  ```bash
38
- uvx gssh # via uv
39
- pipx run gssh # via pipx
38
+ uvx graphical-ssh # via uv
39
+ pipx run graphical-ssh # via pipx
40
40
  ```
41
41
 
42
42
  ### From source
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "graphical-ssh"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = "Graphical SSH client connection and configuration manager for Debian"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -44,6 +44,7 @@ dev = [
44
44
 
45
45
  [project.scripts]
46
46
  gssh = "gssh.__main__:main"
47
+ graphical-ssh = "gssh.__main__:main"
47
48
 
48
49
  [build-system]
49
50
  requires = ["uv_build>=0.12.5,<0.13.0"]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "graphical-ssh"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = "Graphical SSH client connection and configuration manager for Debian"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -36,6 +36,11 @@ dev = [
36
36
 
37
37
  [project.scripts]
38
38
  gssh = "gssh.__main__:main"
39
+ # Alias matching the PyPI distribution name so `uvx graphical-ssh` and
40
+ # `pipx run graphical-ssh` work without --from (uvx/pipx look for a console
41
+ # script named after the package). The PyPI name `gssh` is taken, so the dist
42
+ # is `graphical-ssh`; this keeps both command names available after install.
43
+ graphical-ssh = "gssh.__main__:main"
39
44
 
40
45
  [build-system]
41
46
  requires = ["uv_build>=0.12.5,<0.13.0"]
@@ -1,3 +1,3 @@
1
1
  """gssh — Graphical SSH client connection and configuration manager."""
2
2
 
3
- __version__ = "0.1.1"
3
+ __version__ = "0.1.2"
@@ -133,8 +133,6 @@ class TerminalWidget(QAbstractScrollArea):
133
133
  if self._pid is not None:
134
134
  self.stop()
135
135
 
136
- self._set_pty_size()
137
-
138
136
  pid, master_fd = pty.fork()
139
137
  if pid == 0:
140
138
  try:
@@ -146,6 +144,10 @@ class TerminalWidget(QAbstractScrollArea):
146
144
  else:
147
145
  self._master_fd = master_fd
148
146
  self._pid = pid
147
+ # Size the PTY now that the master fd exists — doing this before
148
+ # pty.fork() was a no-op (self._master_fd was still None), leaving
149
+ # the child at the kernel default winsize.
150
+ self._set_pty_size()
149
151
  self._notifier = QSocketNotifier(master_fd, QSocketNotifier.Type.Read, self)
150
152
  self._notifier.activated.connect(self._read_pty)
151
153
  self._notifier.setEnabled(True)
@@ -365,14 +367,12 @@ class TerminalWidget(QAbstractScrollArea):
365
367
  super().resizeEvent(event)
366
368
  cw = self.char_width
367
369
  ch = self.char_height
368
- # Account for scrollbar width
369
- vbar_w = 0
370
- vbar = self.verticalScrollBar()
371
- if vbar.isVisible():
372
- vbar_w = vbar.width()
373
- avail_w = self.width() - vbar_w
374
- new_cols = max(1, avail_w // cw)
375
- new_rows = max(1, self.height() // ch)
370
+ # Compute the grid from the viewport (the paintable area), not the whole
371
+ # scroll area — the scroll area includes the scrollbar and frame, which
372
+ # would overestimate cols/rows and clip content.
373
+ vp = self.viewport()
374
+ new_cols = max(1, vp.width() // cw)
375
+ new_rows = max(1, vp.height() // ch)
376
376
  if new_cols != self._cols or new_rows != self._rows:
377
377
  self._cols = new_cols
378
378
  self._rows = new_rows
@@ -401,7 +401,9 @@ class TerminalWidget(QAbstractScrollArea):
401
401
  # We want the last (hist - scroll) history lines, then all screen lines
402
402
  start = max(0, hist - scroll)
403
403
  visible_hist = history_lines[start:]
404
- screen_lines = list(self._screen.buffer)
404
+ # pyte's Screen.buffer is a dict keyed by row index — iterate by key
405
+ # to get the row objects (list() would yield the integer keys).
406
+ screen_lines = [self._screen.buffer[y] for y in range(self._rows)]
405
407
 
406
408
  all_lines = visible_hist + screen_lines
407
409
  # How many lines from the top of the viewport are "scrolled back"
@@ -409,7 +411,7 @@ class TerminalWidget(QAbstractScrollArea):
409
411
  total = len(all_lines)
410
412
  render_start = max(0, total - self._rows)
411
413
  else:
412
- all_lines = list(self._screen.buffer)
414
+ all_lines = [self._screen.buffer[y] for y in range(self._rows)]
413
415
  render_start = 0
414
416
 
415
417
  # Render each line
File without changes