version: fix pacman + use shell version helper

This commit is contained in:
2 * r + 2 * t
2025-09-14 00:12:42 +10:00
parent 6f8e5849cb
commit 62e7911864
+9 -1
View File
@@ -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:")