something-x-dev 1.5.0.dev8__py3-none-any.whl → 1.5.0.dev9__py3-none-any.whl

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.
@@ -499,6 +499,13 @@ switch:checked slider {
499
499
  }
500
500
  .connecting-button label { color: rgba(255, 255, 255, 0.22); }
501
501
 
502
+ /* compact variant for inline row buttons (home page quick connect) */
503
+ .row-action {
504
+ padding: 7px 16px;
505
+ font-size: 10px;
506
+ letter-spacing: 1.2px;
507
+ }
508
+
502
509
  /* ── Empty state ─────────────────────────────────────────────────────────── */
503
510
 
504
511
  .empty-title {
nothing_app/pages/home.py CHANGED
@@ -7,10 +7,11 @@ from ..bluetooth import BluetoothDevice, BluetoothManager, device_icon_name
7
7
 
8
8
 
9
9
  class DeviceRow(Gtk.Box):
10
- def __init__(self, device: BluetoothDevice):
10
+ def __init__(self, device: BluetoothDevice, on_action=None):
11
11
  super().__init__(orientation=Gtk.Orientation.HORIZONTAL, spacing=14)
12
12
  self.add_css_class("device-card")
13
13
  self.device = device
14
+ self._on_action = on_action
14
15
  self._build()
15
16
 
16
17
  def _build(self):
@@ -55,9 +56,22 @@ class DeviceRow(Gtk.Box):
55
56
  text_box.append(bottom_row)
56
57
  self.append(text_box)
57
58
 
58
- arrow = Gtk.Image.new_from_icon_name("go-next-symbolic")
59
- arrow.set_opacity(0.3)
60
- self.append(arrow)
59
+ if self._on_action is not None:
60
+ action_btn = Gtk.Button(label="DISCONNECT" if self.device.connected else "CONNECT")
61
+ action_btn.add_css_class("disconnect-button" if self.device.connected else "connect-button")
62
+ action_btn.add_css_class("row-action")
63
+ action_btn.set_valign(Gtk.Align.CENTER)
64
+ action_btn.connect("clicked", self._on_action_clicked)
65
+ self.append(action_btn)
66
+ else:
67
+ arrow = Gtk.Image.new_from_icon_name("go-next-symbolic")
68
+ arrow.set_opacity(0.3)
69
+ self.append(arrow)
70
+
71
+ def _on_action_clicked(self, btn: Gtk.Button):
72
+ btn.set_sensitive(False)
73
+ btn.set_label("…")
74
+ self._on_action(self.device)
61
75
 
62
76
 
63
77
  class HomePage(Gtk.Box):
@@ -176,7 +190,11 @@ class HomePage(Gtk.Box):
176
190
  self._other_label.set_visible(bool(others))
177
191
  self._empty_box.set_visible(not devices)
178
192
 
179
- def _make_row(self, device: BluetoothDevice) -> Gtk.Button:
193
+ def _make_row(self, device: BluetoothDevice) -> Gtk.Widget:
194
+ # Only Nothing devices have a detail page; other devices get an inline
195
+ # connect/disconnect button instead of navigation.
196
+ if not device.is_nothing:
197
+ return DeviceRow(device, on_action=self._on_quick_action)
180
198
  btn = Gtk.Button()
181
199
  btn.set_has_frame(False)
182
200
  btn.add_css_class("device-row-btn")
@@ -185,6 +203,12 @@ class HomePage(Gtk.Box):
185
203
  btn.connect("clicked", lambda _b, d=device: self.emit("device-selected", d))
186
204
  return btn
187
205
 
206
+ def _on_quick_action(self, device: BluetoothDevice):
207
+ if device.connected:
208
+ self._bt.disconnect_device(device.path)
209
+ else:
210
+ self._bt.connect_device(device.path, on_error=self._refresh_list)
211
+
188
212
  def _on_devices_changed(self, _manager):
189
213
  self._refresh_list()
190
214
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: something-x-dev
3
- Version: 1.5.0.dev8
3
+ Version: 1.5.0.dev9
4
4
  Summary: Something X device manager for Omarchy / Linux
5
5
  Author: Raphael
6
6
  License: MIT
@@ -8,13 +8,13 @@ nothing_app/tray.py,sha256=ofT4nIoAIoAz2JWK36_AkxmHdW2fqtcrzrVE-c1kXXo,5826
8
8
  nothing_app/window.py,sha256=pk6LTcqR6mcPMVYx2zagEngXnK8vlcw7zpKWj7ue7pA,4114
9
9
  nothing_app/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  nothing_app/data/com.something.x.omarchy.desktop,sha256=Uet1FGwgMDvHlejxNuhR8cTWNrYEqnJlTvipl2ztFp8,362
11
- nothing_app/data/style.css,sha256=I-IlEidE8hY6lC18gmPkNNAytEAsYxmxWrs6RG5jHkc,16214
11
+ nothing_app/data/style.css,sha256=jUGlObQoSBqe9uBltxPRtq0gjXfwfW7kqPc2KznGi1U,16373
12
12
  nothing_app/pages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  nothing_app/pages/device.py,sha256=MvFarW7zHF45jHobjR2pzK9eLJ-Q-9-2k7c5y2aGiBE,22845
14
- nothing_app/pages/home.py,sha256=IGzYHpfIcllc2hcCIxqS6Lpo-43_dwkO2gIZ1cywQGE,7350
15
- something_x_dev-1.5.0.dev8.dist-info/licenses/LICENSE,sha256=f82aGY-Qd4Huw5T9EsynF6CJhVPdcnsTSuuaskxc1ak,1064
16
- something_x_dev-1.5.0.dev8.dist-info/METADATA,sha256=pDB06TZnlXHnvWh1SAqebGcXKVgUdM_64Fuq22L03rM,7237
17
- something_x_dev-1.5.0.dev8.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
18
- something_x_dev-1.5.0.dev8.dist-info/entry_points.txt,sha256=HpMQVOiNSmzNKoa2Fb65XtbK7NWTfxMDBrBNlk9WHi8,65
19
- something_x_dev-1.5.0.dev8.dist-info/top_level.txt,sha256=yERYCJXvIBXR40iWxixVVZI3z-B4gNYXEdXFiiWa7KI,12
20
- something_x_dev-1.5.0.dev8.dist-info/RECORD,,
14
+ nothing_app/pages/home.py,sha256=n4gj-aaKObFNwrASki2Sway6trIvZvSUCn9iHbhyjqY,8499
15
+ something_x_dev-1.5.0.dev9.dist-info/licenses/LICENSE,sha256=f82aGY-Qd4Huw5T9EsynF6CJhVPdcnsTSuuaskxc1ak,1064
16
+ something_x_dev-1.5.0.dev9.dist-info/METADATA,sha256=rG8HF32cDEl2-flWy5kKeyZtVLVjxGaMLgW2snuaVkE,7237
17
+ something_x_dev-1.5.0.dev9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
18
+ something_x_dev-1.5.0.dev9.dist-info/entry_points.txt,sha256=HpMQVOiNSmzNKoa2Fb65XtbK7NWTfxMDBrBNlk9WHi8,65
19
+ something_x_dev-1.5.0.dev9.dist-info/top_level.txt,sha256=yERYCJXvIBXR40iWxixVVZI3z-B4gNYXEdXFiiWa7KI,12
20
+ something_x_dev-1.5.0.dev9.dist-info/RECORD,,