mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 06:24:15 +02:00
fix: snap launch
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from threading import Thread
|
||||
from typing import List, Set, Type
|
||||
@@ -210,3 +211,6 @@ class FlatpakManager(SoftwareManager):
|
||||
|
||||
def is_default_enabled(self) -> bool:
|
||||
return True
|
||||
|
||||
def launch(self, pkg: SoftwarePackage):
|
||||
flatpak.run(pkg.id)
|
||||
|
||||
@@ -278,3 +278,9 @@ def set_default_remotes():
|
||||
|
||||
def has_remotes_set() -> bool:
|
||||
return bool(run_cmd('{} remotes'.format(BASE_CMD)).strip())
|
||||
|
||||
|
||||
def run(app_id: str):
|
||||
subprocess.Popen([BASE_CMD, 'run', app_id])
|
||||
|
||||
|
||||
|
||||
@@ -59,9 +59,6 @@ class FlatpakApplication(SoftwarePackage):
|
||||
if data.get(attr) and not getattr(self, attr):
|
||||
setattr(self, attr, data[attr])
|
||||
|
||||
def get_command(self) -> str:
|
||||
return "flatpak run {}".format(self.id)
|
||||
|
||||
def can_be_run(self) -> bool:
|
||||
return self.installed and not self.runtime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user