feat(desktop): Implement Supergfxctl support

This commit is contained in:
RJ Trujillo 2023-08-01 21:21:22 -06:00
parent cfccbf7026
commit 381c09ea28
2 changed files with 19 additions and 0 deletions

View File

@ -80,6 +80,13 @@ screens:
default: true
packages:
- Set SteamOS BTRFS mount flags: sudo -A just --unstable set-btrfs-flags
Supergfxctl:
condition:
run: grep "nvidia" <<< $(rpm-ostree status)
description: A utility for Nvidia GPU switching
default: false
packages:
- Enable supergfxctl: just --unstable enable-supergfxctl
System76 Scheduler:
description: Enables System76 scheduler
default: true

View File

@ -63,6 +63,18 @@ enable-system76-scheduler:
gext install s76-scheduler@mattjakeman.com
fi
enable-supergfxctl:
#!/usr/bin/env bash
status=$(rpm-ostree status)
if grep "nvidia" <<< ${status}; then
systemctl enable --now supergfxd.service
if grep "gnome" <<< ${status}; then
gext install supergfxctl-gex@asus-linux.org
fi
else
echo "This requires an Nvidia image."
fi
enable-wallpaper-engine:
#!/usr/bin/env bash
if grep -v "gnome" <<< $(rpm-ostree status); then