linux observer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add install-tray CLI command for autostart and icon setup

+149 -1
+7 -1
INSTALL.md
··· 71 71 solstone-linux install-service 72 72 ``` 73 73 74 - 6. verify it's running and connected: 74 + 6. install the system tray indicator (optional): 75 + ``` 76 + solstone-linux install-tray 77 + ``` 78 + this installs status icons and an XDG autostart entry so the tray app launches on login. to start it immediately: `solstone-tray &` 79 + 80 + 7. verify it's running and connected: 75 81 ``` 76 82 systemctl --user status solstone-linux 77 83 sol remote list
+7
contrib/solstone-tray.desktop
··· 1 + [Desktop Entry] 2 + Type=Application 3 + Name=Solstone Tray 4 + Comment=System tray status for solstone observer 5 + Exec=solstone-tray 6 + Icon=solstone-recording 7 + NoDisplay=true
+66
src/solstone_linux/cli.py
··· 7 7 run Start capture loop + sync service (default) 8 8 setup Interactive configuration 9 9 install-service Write systemd user unit, enable, start 10 + install-tray Install tray icons and XDG autostart entry 10 11 status Show capture and sync state 11 12 """ 12 13 ··· 192 193 return 0 193 194 194 195 196 + def cmd_install_tray(args: argparse.Namespace) -> int: 197 + """Install tray icons and XDG autostart desktop entry.""" 198 + binary = shutil.which("solstone-tray") 199 + if not binary: 200 + print("Error: solstone-tray not found on PATH", file=sys.stderr) 201 + print( 202 + "Install with: pipx install --system-site-packages solstone-linux", 203 + file=sys.stderr, 204 + ) 205 + return 1 206 + 207 + # Source icons from the installed package 208 + icon_source = Path(__file__).resolve().parent / "icons" / "hicolor" 209 + if not icon_source.is_dir(): 210 + print(f"Error: bundled icons not found at {icon_source}", file=sys.stderr) 211 + return 1 212 + 213 + # Install icons to ~/.local/share/icons/hicolor/ 214 + icon_dest = Path.home() / ".local" / "share" / "icons" / "hicolor" 215 + status_dir = icon_dest / "scalable" / "status" 216 + status_dir.mkdir(parents=True, exist_ok=True) 217 + 218 + for svg in sorted((icon_source / "scalable" / "status").iterdir()): 219 + if svg.suffix == ".svg": 220 + shutil.copy2(svg, status_dir / svg.name) 221 + print(f"Installed {status_dir / svg.name}") 222 + 223 + # Copy index.theme only if one doesn't already exist 224 + index_dest = icon_dest / "index.theme" 225 + if not index_dest.exists(): 226 + shutil.copy2(icon_source / "index.theme", index_dest) 227 + print(f"Wrote {index_dest}") 228 + 229 + # Update icon cache (non-fatal if gtk-update-icon-cache is missing) 230 + try: 231 + subprocess.run(["gtk-update-icon-cache", str(icon_dest)], check=False) 232 + except FileNotFoundError: 233 + print("Warning: gtk-update-icon-cache not found. Icon cache not updated.") 234 + 235 + # Write autostart desktop entry 236 + autostart_dir = Path.home() / ".config" / "autostart" 237 + autostart_dir.mkdir(parents=True, exist_ok=True) 238 + desktop_path = autostart_dir / "solstone-tray.desktop" 239 + 240 + desktop_content = f"""\ 241 + [Desktop Entry] 242 + Type=Application 243 + Name=Solstone Tray 244 + Comment=System tray status for solstone observer 245 + Exec={binary} 246 + Icon=solstone-recording 247 + NoDisplay=true 248 + """ 249 + 250 + desktop_path.write_text(desktop_content) 251 + print(f"Wrote {desktop_path}") 252 + print("Tray will auto-start on next login.") 253 + 254 + return 0 255 + 256 + 195 257 def cmd_status(args: argparse.Namespace) -> int: 196 258 """Show capture and sync state.""" 197 259 config = load_config() ··· 291 353 # install-service 292 354 subparsers.add_parser("install-service", help="Install systemd user service") 293 355 356 + # install-tray 357 + subparsers.add_parser("install-tray", help="Install tray icons and autostart entry") 358 + 294 359 # status 295 360 subparsers.add_parser("status", help="Show capture and sync state") 296 361 ··· 304 369 "run": cmd_run, 305 370 "setup": cmd_setup, 306 371 "install-service": cmd_install_service, 372 + "install-tray": cmd_install_tray, 307 373 "status": cmd_status, 308 374 } 309 375
+12
src/solstone_linux/icons/hicolor/index.theme
··· 1 + [Icon Theme] 2 + Name=solstone 3 + Comment=solstone observer tray icons 4 + Inherits=hicolor 5 + Directories=scalable/status 6 + 7 + [scalable/status] 8 + Size=32 9 + Type=Scalable 10 + MinSize=16 11 + MaxSize=256 12 + Context=Status
+17
src/solstone_linux/icons/hicolor/scalable/status/solstone-error.svg
··· 1 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="2.5 2.5 27 27" 2 + role="img" aria-label="Solstone icon error state"> 3 + <title>Solstone icon -- error</title> 4 + <defs> 5 + <mask id="ixko" maskUnits="userSpaceOnUse"> 6 + <rect x="2.5" y="2.5" width="27.0" height="27.0" fill="white"/> 7 + <path d="M7 7 L25 25 M25 7 L7 25" fill="none" stroke="black" 8 + stroke-width="5.5" stroke-linecap="round"/> 9 + </mask> 10 + </defs> 11 + <g mask="url(#ixko)"> 12 + <path fill="#F5C740" d="M16.0 2.5 L18.6 7.3 A9.1 9.1 0 0 0 13.4 7.3 Z M23.9 5.1 L23.2 10.5 A9.1 9.1 0 0 0 19.0 7.4 Z M28.8 11.8 L25.1 15.8 A9.1 9.1 0 0 0 23.5 10.9 Z M28.8 20.2 L23.5 21.1 A9.1 9.1 0 0 0 25.1 16.2 Z M23.9 26.9 L19.0 24.6 A9.1 9.1 0 0 0 23.2 21.5 Z M16.0 29.5 L13.4 24.7 A9.1 9.1 0 0 0 18.6 24.7 Z M8.1 26.9 L8.8 21.5 A9.1 9.1 0 0 0 13.0 24.6 Z M3.2 20.2 L6.9 16.2 A9.1 9.1 0 0 0 8.5 21.1 Z M3.2 11.8 L8.5 10.9 A9.1 9.1 0 0 0 6.9 15.8 Z M8.1 5.1 L13.0 7.4 A9.1 9.1 0 0 0 8.8 10.5 Z"/> 13 + <circle cx="16.0" cy="16.0" r="6.5" fill="none" stroke="#E8923A" stroke-width="1.7"/> 14 + </g> 15 + <path d="M7 7 L25 25 M25 7 L7 25" fill="none" stroke="#E8923A" 16 + stroke-width="2.5" stroke-linecap="round"/> 17 + </svg>
+17
src/solstone_linux/icons/hicolor/scalable/status/solstone-paused.svg
··· 1 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="2.5 2.5 27 27" 2 + role="img" aria-label="Solstone icon paused state"> 3 + <title>Solstone icon -- paused</title> 4 + <defs> 5 + <mask id="icko" maskUnits="userSpaceOnUse"> 6 + <rect x="2.5" y="2.5" width="27.0" height="27.0" fill="white"/> 7 + <path d="M 8.50 21.50 A 4.5 4.5 0 0 1 12.02 18.00 A 5.2 5.2 0 0 1 21.35 13.65 A 4.0 4.0 0 0 1 26.91 18.89 C 28 22, 27.5 25.5, 23 25.5 C 20 28.8, 16 28.8, 13 25.5 C 10 26.5, 8 23.5, 8.50 21.50 Z" fill="black" stroke="black" 8 + stroke-width="4.4" stroke-linejoin="round"/> 9 + </mask> 10 + </defs> 11 + <g mask="url(#icko)"> 12 + <path fill="#F5C740" d="M16.0 2.5 L18.6 7.3 A9.1 9.1 0 0 0 13.4 7.3 Z M23.9 5.1 L23.2 10.5 A9.1 9.1 0 0 0 19.0 7.4 Z M28.8 11.8 L25.1 15.8 A9.1 9.1 0 0 0 23.5 10.9 Z M28.8 20.2 L23.5 21.1 A9.1 9.1 0 0 0 25.1 16.2 Z M23.9 26.9 L19.0 24.6 A9.1 9.1 0 0 0 23.2 21.5 Z M16.0 29.5 L13.4 24.7 A9.1 9.1 0 0 0 18.6 24.7 Z M8.1 26.9 L8.8 21.5 A9.1 9.1 0 0 0 13.0 24.6 Z M3.2 20.2 L6.9 16.2 A9.1 9.1 0 0 0 8.5 21.1 Z M3.2 11.8 L8.5 10.9 A9.1 9.1 0 0 0 6.9 15.8 Z M8.1 5.1 L13.0 7.4 A9.1 9.1 0 0 0 8.8 10.5 Z"/> 13 + <circle cx="16.0" cy="16.0" r="6.5" fill="none" stroke="#E8923A" stroke-width="1.7"/> 14 + </g> 15 + <path d="M 8.50 21.50 A 4.5 4.5 0 0 1 12.02 18.00 A 5.2 5.2 0 0 1 21.35 13.65 A 4.0 4.0 0 0 1 26.91 18.89 C 28 22, 27.5 25.5, 23 25.5 C 20 28.8, 16 28.8, 13 25.5 C 10 26.5, 8 23.5, 8.50 21.50 Z" fill="none" stroke="#999" 16 + stroke-width="1.4" stroke-linejoin="round"/> 17 + </svg>
+7
src/solstone_linux/icons/hicolor/scalable/status/solstone-recording.svg
··· 1 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="2.5 2.5 27 27" role="img" aria-label="Solstone sun"> 2 + <title>Solstone sun</title> 3 + <!-- Sun rays: 10 floating wedges with curved inner arc matching the ring --> 4 + <path fill="#F5C740" d="M16.0 2.5 L18.6 7.3 A9.1 9.1 0 0 0 13.4 7.3 Z M23.9 5.1 L23.2 10.5 A9.1 9.1 0 0 0 19.0 7.4 Z M28.8 11.8 L25.1 15.8 A9.1 9.1 0 0 0 23.5 10.9 Z M28.8 20.2 L23.5 21.1 A9.1 9.1 0 0 0 25.1 16.2 Z M23.9 26.9 L19.0 24.6 A9.1 9.1 0 0 0 23.2 21.5 Z M16.0 29.5 L13.4 24.7 A9.1 9.1 0 0 0 18.6 24.7 Z M8.1 26.9 L8.8 21.5 A9.1 9.1 0 0 0 13.0 24.6 Z M3.2 20.2 L6.9 16.2 A9.1 9.1 0 0 0 8.5 21.1 Z M3.2 11.8 L8.5 10.9 A9.1 9.1 0 0 0 6.9 15.8 Z M8.1 5.1 L13.0 7.4 A9.1 9.1 0 0 0 8.8 10.5 Z"/> 5 + <!-- Sun ring: open annulus --> 6 + <circle cx="16" cy="16" r="6.5" fill="none" stroke="#E8923A" stroke-width="1.7"/> 7 + </svg>
+16
src/solstone_linux/icons/hicolor/scalable/status/solstone-syncing.svg
··· 1 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="2.5 2.5 27 27" 2 + role="img" aria-label="Solstone icon partial state"> 3 + <title>Solstone icon -- partial</title> 4 + <!-- Top 5 rays only (no clip path needed) --> 5 + <path fill="#F5C740" d="M16.0 2.5 L18.6 7.3 A9.1 9.1 0 0 0 13.4 7.3 Z"/> 6 + <path fill="#F5C740" d="M23.9 5.1 L23.2 10.5 A9.1 9.1 0 0 0 19.0 7.4 Z"/> 7 + <path fill="#F5C740" d="M28.8 11.8 L25.1 15.8 A9.1 9.1 0 0 0 23.5 10.9 Z"/> 8 + <path fill="#F5C740" d="M3.2 11.8 L8.5 10.9 A9.1 9.1 0 0 0 6.9 15.8 Z"/> 9 + <path fill="#F5C740" d="M8.1 5.1 L13.0 7.4 A9.1 9.1 0 0 0 8.8 10.5 Z"/> 10 + <!-- Top arc of the ring --> 11 + <path fill="none" stroke="#E8923A" stroke-width="1.7" 12 + d="M 9.5 16.0 A 6.5 6.5 0 0 1 22.5 16.0"/> 13 + <!-- Horizon line --> 14 + <line x1="4.5" y1="16.0" x2="27.5" y2="16.0" 15 + stroke="#E8923A" stroke-width="1.7" stroke-linecap="round"/> 16 + </svg>