something-x-dev 1.2.3.dev1__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.
- nothing_app/__init__.py +2 -0
- nothing_app/application.py +244 -0
- nothing_app/bluetooth.py +212 -0
- nothing_app/data/__init__.py +0 -0
- nothing_app/data/com.something.x.omarchy.desktop +13 -0
- nothing_app/data/style.css +530 -0
- nothing_app/pages/__init__.py +0 -0
- nothing_app/pages/device.py +599 -0
- nothing_app/pages/home.py +210 -0
- nothing_app/profiles.py +41 -0
- nothing_app/protocol.py +650 -0
- nothing_app/splash.py +181 -0
- nothing_app/window.py +89 -0
- something_x_dev-1.2.3.dev1.dist-info/METADATA +201 -0
- something_x_dev-1.2.3.dev1.dist-info/RECORD +19 -0
- something_x_dev-1.2.3.dev1.dist-info/WHEEL +5 -0
- something_x_dev-1.2.3.dev1.dist-info/entry_points.txt +2 -0
- something_x_dev-1.2.3.dev1.dist-info/licenses/LICENSE +21 -0
- something_x_dev-1.2.3.dev1.dist-info/top_level.txt +1 -0
nothing_app/splash.py
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import math
|
|
2
|
+
import time
|
|
3
|
+
import cairo
|
|
4
|
+
import gi
|
|
5
|
+
|
|
6
|
+
gi.require_version("Gtk", "4.0")
|
|
7
|
+
gi.require_version("Adw", "1")
|
|
8
|
+
from gi.repository import Gtk, Adw, GLib
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
_DURATION_MS = 2300
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _ease_out(t: float) -> float:
|
|
15
|
+
return 1.0 - (1.0 - t) ** 3
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _ease_in_out(t: float) -> float:
|
|
19
|
+
if t < 0.5:
|
|
20
|
+
return 4 * t * t * t
|
|
21
|
+
p = -2 * t + 2
|
|
22
|
+
return 1 - p * p * p / 2
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _p(t: float, start: float, end: float) -> float:
|
|
26
|
+
if t <= start:
|
|
27
|
+
return 0.0
|
|
28
|
+
if t >= end:
|
|
29
|
+
return 1.0
|
|
30
|
+
return (t - start) / (end - start)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SplashScreen(Adw.Window):
|
|
34
|
+
def __init__(self, on_done):
|
|
35
|
+
super().__init__()
|
|
36
|
+
self._on_done = on_done
|
|
37
|
+
self._start: float | None = None
|
|
38
|
+
self._done = False
|
|
39
|
+
|
|
40
|
+
self.set_default_size(420, 780)
|
|
41
|
+
self.set_resizable(False)
|
|
42
|
+
self.set_decorated(False)
|
|
43
|
+
self.add_css_class("splash-window")
|
|
44
|
+
|
|
45
|
+
area = Gtk.DrawingArea()
|
|
46
|
+
area.set_draw_func(self._draw)
|
|
47
|
+
area.set_hexpand(True)
|
|
48
|
+
area.set_vexpand(True)
|
|
49
|
+
self.set_content(area)
|
|
50
|
+
self._area = area
|
|
51
|
+
|
|
52
|
+
def start(self):
|
|
53
|
+
self._start = time.monotonic()
|
|
54
|
+
GLib.timeout_add(16, self._frame)
|
|
55
|
+
|
|
56
|
+
def _frame(self) -> bool:
|
|
57
|
+
if self._done:
|
|
58
|
+
return False
|
|
59
|
+
elapsed = (time.monotonic() - self._start) * 1000
|
|
60
|
+
self._area.queue_draw()
|
|
61
|
+
if elapsed >= _DURATION_MS + 80:
|
|
62
|
+
self._done = True
|
|
63
|
+
GLib.idle_add(self._on_done)
|
|
64
|
+
return False
|
|
65
|
+
return True
|
|
66
|
+
|
|
67
|
+
def _draw(self, _area, cr, width, height):
|
|
68
|
+
if self._start is None:
|
|
69
|
+
cr.set_source_rgb(0, 0, 0)
|
|
70
|
+
cr.paint()
|
|
71
|
+
return
|
|
72
|
+
|
|
73
|
+
t = (time.monotonic() - self._start) * 1000
|
|
74
|
+
cx, cy = width / 2, height / 2
|
|
75
|
+
|
|
76
|
+
cr.set_source_rgb(0, 0, 0)
|
|
77
|
+
cr.paint()
|
|
78
|
+
|
|
79
|
+
# global fade out 1750 → 2300ms
|
|
80
|
+
fade = 1.0 - _ease_in_out(_p(t, 1750, 2300))
|
|
81
|
+
if fade < 0.004:
|
|
82
|
+
return
|
|
83
|
+
|
|
84
|
+
dot_cy = cy - 62
|
|
85
|
+
title_y = cy + 4
|
|
86
|
+
sub_y = cy + 38
|
|
87
|
+
|
|
88
|
+
# ── red dot ──────────────────────────────────────────────────────────
|
|
89
|
+
dot_in = _ease_out(_p(t, 0, 380))
|
|
90
|
+
if dot_in > 0:
|
|
91
|
+
pulse = 1.0 + math.sin(t / 380 * math.pi * 2) * 0.18
|
|
92
|
+
glow_r = 22 * pulse
|
|
93
|
+
rg = cairo.RadialGradient(cx, dot_cy, 0, cx, dot_cy, glow_r)
|
|
94
|
+
rg.add_color_stop_rgba(0, 0.91, 0.21, 0.21, 0.32 * dot_in * fade)
|
|
95
|
+
rg.add_color_stop_rgba(1, 0.91, 0.21, 0.21, 0)
|
|
96
|
+
cr.set_source(rg)
|
|
97
|
+
cr.arc(cx, dot_cy, glow_r, 0, 2 * math.pi)
|
|
98
|
+
cr.fill()
|
|
99
|
+
|
|
100
|
+
cr.set_source_rgba(0.91, 0.21, 0.21, dot_in * fade)
|
|
101
|
+
cr.arc(cx, dot_cy, 4.5 * dot_in, 0, 2 * math.pi)
|
|
102
|
+
cr.fill()
|
|
103
|
+
|
|
104
|
+
# ── ripple rings ─────────────────────────────────────────────────────
|
|
105
|
+
for i, delay in enumerate((0, 190, 380)):
|
|
106
|
+
rp = _p(t, 80 + delay, 900 + delay)
|
|
107
|
+
if 0 < rp < 1:
|
|
108
|
+
r = 5 + _ease_out(rp) * 85
|
|
109
|
+
alpha = ((1 - rp) ** 1.4) * (0.55 - i * 0.12) * fade
|
|
110
|
+
cr.set_source_rgba(0.91, 0.21, 0.21, alpha)
|
|
111
|
+
cr.set_line_width(1.0 + (1 - rp) * 0.6)
|
|
112
|
+
cr.arc(cx, dot_cy, r, 0, 2 * math.pi)
|
|
113
|
+
cr.stroke()
|
|
114
|
+
|
|
115
|
+
# ── "SOMETHING X" typewriter ─────────────────────────────────────────
|
|
116
|
+
title = "SOMETHING X"
|
|
117
|
+
n_visible = min(int(_p(t, 450, 1020) * (len(title) + 1)), len(title))
|
|
118
|
+
|
|
119
|
+
cr.select_font_face("JetBrains Mono", cairo.FontSlant.NORMAL, cairo.FontWeight.BOLD)
|
|
120
|
+
cr.set_font_size(32)
|
|
121
|
+
|
|
122
|
+
# stable centering from full string measurement
|
|
123
|
+
full_te = cr.text_extents(title)
|
|
124
|
+
px = cx - full_te.width / 2 - full_te.x_bearing
|
|
125
|
+
|
|
126
|
+
for i, ch in enumerate(title[:n_visible]):
|
|
127
|
+
is_x = ch == "X" and i == len(title) - 1
|
|
128
|
+
r, g, b = (0.91, 0.21, 0.21) if is_x else (1.0, 1.0, 1.0)
|
|
129
|
+
cr.set_source_rgba(r, g, b, fade)
|
|
130
|
+
te = cr.text_extents(ch)
|
|
131
|
+
cr.move_to(px - te.x_bearing, title_y)
|
|
132
|
+
cr.show_text(ch)
|
|
133
|
+
px += te.x_advance
|
|
134
|
+
|
|
135
|
+
# cursor: blinks after typing (400ms cycle), gone after 1600ms
|
|
136
|
+
cursor_visible = n_visible < len(title) or (
|
|
137
|
+
t < 1600 and int((_p(t, 1020, 1600) * 1000) / 420) % 2 == 0
|
|
138
|
+
)
|
|
139
|
+
if cursor_visible:
|
|
140
|
+
cr.set_source_rgba(0.91, 0.21, 0.21, 0.85 * fade)
|
|
141
|
+
cr.rectangle(px + 3, title_y - 27, 2, 31)
|
|
142
|
+
cr.fill()
|
|
143
|
+
|
|
144
|
+
# ── "FOR LINUX" with letter-spacing ──────────────────────────────────
|
|
145
|
+
sub_p = _ease_out(_p(t, 880, 1200)) * fade
|
|
146
|
+
if sub_p > 0.004:
|
|
147
|
+
cr.select_font_face("JetBrains Mono", cairo.FontSlant.NORMAL, cairo.FontWeight.NORMAL)
|
|
148
|
+
cr.set_font_size(11)
|
|
149
|
+
sub = "FOR LINUX"
|
|
150
|
+
spacing = 5.5
|
|
151
|
+
advances = [cr.text_extents(ch).x_advance for ch in sub]
|
|
152
|
+
total_w = sum(advances) + spacing * (len(sub) - 1)
|
|
153
|
+
lx = cx - total_w / 2
|
|
154
|
+
for ch, adv in zip(sub, advances, strict=True):
|
|
155
|
+
te = cr.text_extents(ch)
|
|
156
|
+
cr.set_source_rgba(1.0, 1.0, 1.0, 0.32 * sub_p)
|
|
157
|
+
cr.move_to(lx - te.x_bearing, sub_y)
|
|
158
|
+
cr.show_text(ch)
|
|
159
|
+
lx += adv + spacing
|
|
160
|
+
|
|
161
|
+
# ── thin horizontal rule under subtitle ──────────────────────────────
|
|
162
|
+
rule_p = _ease_out(_p(t, 1050, 1350)) * fade
|
|
163
|
+
if rule_p > 0.004:
|
|
164
|
+
rule_y = sub_y + 18
|
|
165
|
+
rule_half = 28 * rule_p
|
|
166
|
+
cr.set_source_rgba(0.91, 0.21, 0.21, 0.22 * rule_p)
|
|
167
|
+
cr.set_line_width(1)
|
|
168
|
+
cr.move_to(cx - rule_half, rule_y)
|
|
169
|
+
cr.line_to(cx + rule_half, rule_y)
|
|
170
|
+
cr.stroke()
|
|
171
|
+
|
|
172
|
+
# ── bottom caption ────────────────────────────────────────────────────
|
|
173
|
+
cap_p = _ease_out(_p(t, 1150, 1500)) * fade
|
|
174
|
+
if cap_p > 0.004:
|
|
175
|
+
cr.select_font_face("JetBrains Mono", cairo.FontSlant.NORMAL, cairo.FontWeight.NORMAL)
|
|
176
|
+
cr.set_font_size(8)
|
|
177
|
+
cap = "OPEN SOURCE · MADE FOR OMARCHY"
|
|
178
|
+
te = cr.text_extents(cap)
|
|
179
|
+
cr.set_source_rgba(1.0, 1.0, 1.0, 0.09 * cap_p)
|
|
180
|
+
cr.move_to(cx - te.width / 2 - te.x_bearing, height - 52)
|
|
181
|
+
cr.show_text(cap)
|
nothing_app/window.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import gi
|
|
2
|
+
|
|
3
|
+
gi.require_version("Gtk", "4.0")
|
|
4
|
+
gi.require_version("Adw", "1")
|
|
5
|
+
from gi.repository import Gtk, Adw
|
|
6
|
+
|
|
7
|
+
from .bluetooth import BluetoothDevice, BluetoothManager
|
|
8
|
+
from .pages.home import HomePage
|
|
9
|
+
from .pages.device import DevicePage
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SomethingXWindow(Adw.ApplicationWindow):
|
|
13
|
+
def __init__(self, bt_manager: BluetoothManager, **kwargs):
|
|
14
|
+
super().__init__(**kwargs)
|
|
15
|
+
self.set_default_size(420, 780)
|
|
16
|
+
self.set_resizable(True)
|
|
17
|
+
self._bt = bt_manager
|
|
18
|
+
self._build()
|
|
19
|
+
|
|
20
|
+
def _build(self):
|
|
21
|
+
nav = Adw.NavigationView()
|
|
22
|
+
self.set_content(nav)
|
|
23
|
+
self._nav = nav
|
|
24
|
+
nav.push(self._make_home_nav_page())
|
|
25
|
+
|
|
26
|
+
def _make_home_nav_page(self) -> Adw.NavigationPage:
|
|
27
|
+
nav_page = Adw.NavigationPage()
|
|
28
|
+
nav_page.set_tag("home")
|
|
29
|
+
nav_page.set_title("Something X")
|
|
30
|
+
|
|
31
|
+
toolbar_view = Adw.ToolbarView()
|
|
32
|
+
|
|
33
|
+
header = Adw.HeaderBar()
|
|
34
|
+
header.add_css_class("nothing-header")
|
|
35
|
+
header.set_show_title(True)
|
|
36
|
+
|
|
37
|
+
bt_btn = Gtk.Button.new_from_icon_name("bluetooth-symbolic")
|
|
38
|
+
bt_btn.set_tooltip_text("Bluetooth settings")
|
|
39
|
+
bt_btn.connect("clicked", self._open_bt_settings)
|
|
40
|
+
header.pack_end(bt_btn)
|
|
41
|
+
|
|
42
|
+
refresh_btn = Gtk.Button.new_from_icon_name("view-refresh-symbolic")
|
|
43
|
+
refresh_btn.set_tooltip_text("Refresh devices")
|
|
44
|
+
refresh_btn.connect("clicked", lambda _: self._bt.refresh())
|
|
45
|
+
header.pack_end(refresh_btn)
|
|
46
|
+
|
|
47
|
+
toolbar_view.add_top_bar(header)
|
|
48
|
+
|
|
49
|
+
home_page = HomePage(bt_manager=self._bt)
|
|
50
|
+
home_page.connect("device-selected", self._on_device_selected)
|
|
51
|
+
toolbar_view.set_content(home_page)
|
|
52
|
+
|
|
53
|
+
nav_page.set_child(toolbar_view)
|
|
54
|
+
return nav_page
|
|
55
|
+
|
|
56
|
+
def _make_device_nav_page(self, bt_device: BluetoothDevice) -> Adw.NavigationPage:
|
|
57
|
+
nav_page = Adw.NavigationPage()
|
|
58
|
+
nav_page.set_tag("device")
|
|
59
|
+
nav_page.set_title(bt_device.name)
|
|
60
|
+
|
|
61
|
+
toolbar_view = Adw.ToolbarView()
|
|
62
|
+
|
|
63
|
+
header = Adw.HeaderBar()
|
|
64
|
+
header.add_css_class("nothing-header")
|
|
65
|
+
toolbar_view.add_top_bar(header)
|
|
66
|
+
|
|
67
|
+
device_page = DevicePage(bt_device=bt_device, bt_manager=self._bt)
|
|
68
|
+
toolbar_view.set_content(device_page)
|
|
69
|
+
|
|
70
|
+
nav_page.set_child(toolbar_view)
|
|
71
|
+
nav_page.connect("hidden", lambda _: device_page.cleanup())
|
|
72
|
+
return nav_page
|
|
73
|
+
|
|
74
|
+
def _on_device_selected(self, _home, bt_device: BluetoothDevice):
|
|
75
|
+
self._nav.push(self._make_device_nav_page(bt_device))
|
|
76
|
+
|
|
77
|
+
def _open_bt_settings(self, _btn):
|
|
78
|
+
import subprocess
|
|
79
|
+
|
|
80
|
+
for cmd in (
|
|
81
|
+
["blueman-manager"],
|
|
82
|
+
["gnome-control-center", "bluetooth"],
|
|
83
|
+
["xdg-open", "settings://bluetooth"],
|
|
84
|
+
):
|
|
85
|
+
try:
|
|
86
|
+
subprocess.Popen(cmd, start_new_session=True)
|
|
87
|
+
return
|
|
88
|
+
except FileNotFoundError:
|
|
89
|
+
continue
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: something-x-dev
|
|
3
|
+
Version: 1.2.3.dev1
|
|
4
|
+
Summary: Something X device manager for Omarchy / Linux
|
|
5
|
+
Author: Raphael
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: nothing,bluetooth,gtk4,linux,omarchy,ear
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: X11 Applications :: GTK
|
|
10
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Utilities
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: PyGObject>=3.42
|
|
19
|
+
Requires-Dist: dbus-python>=1.3
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: ruff; extra == "dev"
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# Something X — for Linux
|
|
25
|
+
|
|
26
|
+
> A Linux-native companion app for **Nothing** and **CMF** Bluetooth devices.
|
|
27
|
+
> Built for [Omarchy](https://omarchy.org) (Hyprland / Wayland) — pure black, JetBrains Mono, Nothing Red.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
● SOMETHING X
|
|
31
|
+
FOR LINUX
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[](https://pypi.org/project/something-x/)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
[](https://github.com/SoaOaoS/something-x)
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- **Animated splash screen** — Nothing-branded intro with typewriter effect and ripple rings
|
|
43
|
+
- **Earbud visual** — Cairo-rendered glowing battery rings with radial gradients for L / R / Case
|
|
44
|
+
- **ANC control** — Off · Noise Cancellation · Transparency (real RFCOMM protocol)
|
|
45
|
+
- **EQ presets** — Balanced · More Bass · More Treble · Voice
|
|
46
|
+
- **Volume slider** — controls the PulseAudio/PipeWire A2DP sink directly
|
|
47
|
+
- **Per-device profiles** — ANC and EQ saved per device, restored automatically on reconnect
|
|
48
|
+
- **Background mode** — closing the window keeps the app running; relaunch to reopen
|
|
49
|
+
- **CLI quick-toggles** — control your earbuds without opening the GUI (see [CLI usage](#cli-usage))
|
|
50
|
+
- **Low battery notifications** — `notify-send` alert when any bud drops below 20 %
|
|
51
|
+
- **Firmware version & serial number** — read from the device over RFCOMM
|
|
52
|
+
- **In-ear detection toggle**
|
|
53
|
+
- **Device discovery** — BlueZ D-Bus; Nothing/CMF devices highlighted with a badge
|
|
54
|
+
- **Scan for new devices** — 30 s BlueZ discovery window
|
|
55
|
+
- **Glass morphism UI** — pure black base, frosted glass cards, red gradient accents
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Device support
|
|
60
|
+
|
|
61
|
+
| Device | Discovery | Battery | ANC | EQ | Volume | Firmware |
|
|
62
|
+
|---|---|---|---|---|---|---|
|
|
63
|
+
| Nothing Ear (1) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
64
|
+
| Nothing Ear (2) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
65
|
+
| Nothing Ear (a) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
66
|
+
| Nothing Ear (stick) | ✅ | ✅ | — | ✅ | ✅ | ✅ |
|
|
67
|
+
| CMF Buds / Buds Pro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
68
|
+
| Nothing Phone (1/2) | ✅ | — | — | — | — | — |
|
|
69
|
+
| Other BT devices | ✅ | ✅* | — | — | ✅ | — |
|
|
70
|
+
|
|
71
|
+
\* via BlueZ `Battery1` interface · RFCOMM features require the device to be connected
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Requirements
|
|
76
|
+
|
|
77
|
+
### System packages (Arch / Omarchy)
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
sudo pacman -S python-gobject python-dbus python-cairo gtk4 libadwaita
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
| Package | Purpose |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `python-gobject` | GTK4, libadwaita, GLib bindings |
|
|
86
|
+
| `python-dbus` | BlueZ D-Bus access |
|
|
87
|
+
| `python-cairo` | Cairo drawing (earbud visual, splash) |
|
|
88
|
+
| `gtk4` | UI toolkit |
|
|
89
|
+
| `libadwaita` | Navigation, dark theme |
|
|
90
|
+
|
|
91
|
+
> `pactl` (from `libpulse` / `pipewire-pulse`) is used for volume control — already present on any PulseAudio/PipeWire system.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Installation
|
|
96
|
+
|
|
97
|
+
### Recommended — pip (after system packages above)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pip install something-x
|
|
101
|
+
something-x
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Run from source
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
git clone https://github.com/SoaOaoS/something-x
|
|
108
|
+
cd something-x
|
|
109
|
+
./somethingx
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Desktop launcher (Walker / Rofi / app menu)
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cp nothing_app/data/com.something.x.omarchy.desktop ~/.local/share/applications/
|
|
116
|
+
update-desktop-database ~/.local/share/applications/
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Usage
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
./somethingx # from source
|
|
125
|
+
something-x # if installed via pip
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
1. **Splash** — animated intro, main window opens after ~2.3 s
|
|
129
|
+
2. **Home** — all paired BT devices; Nothing/CMF get a `NOTHING` badge
|
|
130
|
+
3. **Scan** — "SCAN FOR DEVICES" runs 30 s BlueZ discovery
|
|
131
|
+
4. **Device page** — tap a card to open controls:
|
|
132
|
+
- Battery rings (L / R / Case) update in real time
|
|
133
|
+
- ANC and EQ apply immediately over RFCOMM; settings saved automatically
|
|
134
|
+
- Volume slider controls the A2DP sink via `pactl`
|
|
135
|
+
- Firmware and serial number shown after connection
|
|
136
|
+
5. **Disconnect** — red button sends a clean BlueZ disconnect
|
|
137
|
+
6. **Close** — hides to background; run `something-x` again to reopen
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## CLI usage
|
|
142
|
+
|
|
143
|
+
After connecting to a device at least once via the GUI, you can control it from the terminal:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
something-x --battery # print battery levels
|
|
147
|
+
something-x --anc off|on|transparency # set ANC mode
|
|
148
|
+
something-x --eq balanced|bass|treble|voice # set EQ preset
|
|
149
|
+
something-x --anc on --eq bass # combine actions
|
|
150
|
+
something-x --device AA:BB:CC:DD:EE:FF --battery # target a specific device
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Releases & versioning
|
|
156
|
+
|
|
157
|
+
This project uses **Conventional Commits**. Pushing to `main` triggers automatic versioning and a PyPI release:
|
|
158
|
+
|
|
159
|
+
| Commit prefix | Version bump | Example |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| `feat!:` / `BREAKING CHANGE` | Major (`x.0.0`) | `feat!: new protocol engine` |
|
|
162
|
+
| `feat:` | Minor (`1.x.0`) | `feat: add Ear (open) support` |
|
|
163
|
+
| `fix:` / `perf:` / `refactor:` | Patch (`1.0.x`) | `fix: ANC off not applying` |
|
|
164
|
+
| `docs:` / `chore:` / `style:` / `ci:` | — (no release) | `chore: update readme` |
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Architecture
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
nothing_app/
|
|
172
|
+
├── application.py Adw.Application — CSS, dark theme, splash, background mode, CLI
|
|
173
|
+
├── splash.py Animated splash screen (Cairo, typewriter, ripples)
|
|
174
|
+
├── window.py AdwNavigationView — home ↔ device routing
|
|
175
|
+
├── bluetooth.py BlueZ D-Bus manager (discovery, connect/disconnect signals)
|
|
176
|
+
├── protocol.py Nothing Ear RFCOMM 0x55 binary protocol (reverse-engineered)
|
|
177
|
+
├── profiles.py Per-device ANC/EQ profile persistence (~/.config/something-x/)
|
|
178
|
+
├── data/
|
|
179
|
+
│ └── style.css Nothing X glass-morphism CSS theme
|
|
180
|
+
└── pages/
|
|
181
|
+
├── home.py Device list + scan button
|
|
182
|
+
└── device.py ANC / EQ / volume / settings + Cairo earbud visual
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Protocol notes
|
|
186
|
+
|
|
187
|
+
Frame format: `[SOF=0x55][ctrl:2 LE][cmd:2 LE][len:2 LE][FSN:1][payload][crc16:2 LE]`
|
|
188
|
+
|
|
189
|
+
All outgoing frames use `ctrl=0x0160` with CRC16-ARC — the device silently drops SET commands if any frame in the session was sent without CRC.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Contributing
|
|
194
|
+
|
|
195
|
+
The RFCOMM protocol in [nothing_app/protocol.py](nothing_app/protocol.py) is reverse-engineered from the official Android APK. If your device uses different command IDs or channel numbers, patches are very welcome.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
MIT
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
nothing_app/__init__.py,sha256=Z68l9J3zMyCa6M1dmudJgClgEwEuUyxETe9C5bv24XY,57
|
|
2
|
+
nothing_app/application.py,sha256=4o9hDtpwtPA8NOz63ZW7c6KOa9UeHjqXizoVIjTdUy8,7444
|
|
3
|
+
nothing_app/bluetooth.py,sha256=pfwfU-7oxZRCRFtDN8goBqMEgET_eWW0NS9lp1pTEac,7609
|
|
4
|
+
nothing_app/profiles.py,sha256=eop3-VXnjkmvlAmIxPlE7CWiS3OxHiQKruCDGiEgXqk,1088
|
|
5
|
+
nothing_app/protocol.py,sha256=MNeBw2VkZClAdKf0BCN11ZdP7eQ4-JBXDl6T8pjomdA,25813
|
|
6
|
+
nothing_app/splash.py,sha256=8GhwQ4F2B9tsxu23VpragjLgxdMKVsg3ZQIlzRC2dY8,6811
|
|
7
|
+
nothing_app/window.py,sha256=saH4pTR8eKAVB_z9Y7rP-AWkKnAZjEfDY9O2h2_hbWU,2885
|
|
8
|
+
nothing_app/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
nothing_app/data/com.something.x.omarchy.desktop,sha256=Uet1FGwgMDvHlejxNuhR8cTWNrYEqnJlTvipl2ztFp8,362
|
|
10
|
+
nothing_app/data/style.css,sha256=I-IlEidE8hY6lC18gmPkNNAytEAsYxmxWrs6RG5jHkc,16214
|
|
11
|
+
nothing_app/pages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
nothing_app/pages/device.py,sha256=mN5FU9vX4oELyq8aYuCkujmtfBg7okHLkM3LYA59gnk,21309
|
|
13
|
+
nothing_app/pages/home.py,sha256=2Mg7HleCM8qcg9giHM2FSPoKc1o6an_fNhVP4wxiI-0,7563
|
|
14
|
+
something_x_dev-1.2.3.dev1.dist-info/licenses/LICENSE,sha256=f82aGY-Qd4Huw5T9EsynF6CJhVPdcnsTSuuaskxc1ak,1064
|
|
15
|
+
something_x_dev-1.2.3.dev1.dist-info/METADATA,sha256=qCMu2wXCpkBKekfG8LaopzewR98wxStrp7iUU-6Me20,7019
|
|
16
|
+
something_x_dev-1.2.3.dev1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
17
|
+
something_x_dev-1.2.3.dev1.dist-info/entry_points.txt,sha256=1GFpyZMwyA0nk1swIfywPADzWXZ4wd0o0N4mIDB5R1I,61
|
|
18
|
+
something_x_dev-1.2.3.dev1.dist-info/top_level.txt,sha256=yERYCJXvIBXR40iWxixVVZI3z-B4gNYXEdXFiiWa7KI,12
|
|
19
|
+
something_x_dev-1.2.3.dev1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SoaOaoS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nothing_app
|