mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-05 14:59:29 -05:00
version: fix pacman + use shell version helper
This commit is contained in:
@@ -7,7 +7,7 @@ from caelestia.utils.paths import config_dir
|
|||||||
def print_version() -> None:
|
def print_version() -> None:
|
||||||
if shutil.which("pacman"):
|
if shutil.which("pacman"):
|
||||||
print("Packages:")
|
print("Packages:")
|
||||||
pkgs = ["caelestia-shell-git", "caelestia-cli-git", "caelestia-meta"]
|
pkgs = ["caelestia-shell", "caelestia-cli", "caelestia-meta"]
|
||||||
versions = subprocess.run(
|
versions = subprocess.run(
|
||||||
["pacman", "-Q", *pkgs], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True
|
["pacman", "-Q", *pkgs], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True
|
||||||
).stdout
|
).stdout
|
||||||
@@ -31,6 +31,14 @@ def print_version() -> None:
|
|||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print("Caelestia: not installed")
|
print("Caelestia: not installed")
|
||||||
|
|
||||||
|
print()
|
||||||
|
try:
|
||||||
|
shell_ver = subprocess.check_output(["/usr/lib/caelestia/version", "-s"], text=True).strip()
|
||||||
|
print("Shell:")
|
||||||
|
print(" ", shell_ver)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
print("Shell: version helper not available")
|
||||||
|
|
||||||
print()
|
print()
|
||||||
if shutil.which("qs"):
|
if shutil.which("qs"):
|
||||||
print("Quickshell:")
|
print("Quickshell:")
|
||||||
|
|||||||
Reference in New Issue
Block a user