Expand description
Runtime path resolution for system vs user mode
Provides FHS/XDG-compliant path resolution based on execution context:
- Root/system service:
/run/hyprstream/ - User service:
$XDG_RUNTIME_DIR/hyprstream/ - Fallback:
/tmp/hyprstream-<uid>/
Functions§
- bin_dir
- User’s executable directory (
~/.local/bin) - current_
uid - Get the current user’s UID
- data_
dir - Hyprstream data directory (
~/.local/share/hyprstream) - ensure_
events_ dir - Ensure events directory exists with correct permissions
- ensure_
runtime_ dir - Ensure runtime directory exists with correct permissions
- event_
socket - EventService IPC socket
- events_
dir - Socket directory for EventService
- events_
pub_ socket - Publisher socket path for EventService
- events_
sub_ socket - Subscriber socket path for EventService
- executable_
path - Get the stable executable path for spawning subprocesses.
- installed_
executable_ path - Get the path where hyprstream is installed (if installed)
- is_root
- Check if running as root
- nydus_
dir - Nydus runtime directory
- pid_
file - PID file location for main process
- policy_
socket - PolicyService IPC socket
- registry_
socket - RegistryService IPC socket
- runtime_
dir - Get the appropriate runtime directory based on execution context
- sandboxes_
dir - Sandbox runtime directory
- service_
pid_ file - PID file for a named service (subprocess mode)
- try_
data_ dir - Resolve the data directory while reporting an invalid instance namespace.
- version_
binary - Path to installed binary in version directory
- version_
dir - Version-specific directory (
~/.local/share/hyprstream/versions/$VERSION) - versions_
dir - Versions directory (
~/.local/share/hyprstream/versions) - worker_
socket - WorkerService IPC socket
- workflow_
socket - WorkflowService IPC socket