diff --git a/README.md b/README.md index 519b790..744996d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# gpu-mode-tray +# Legion GPU Mode Switcher A lightweight KDE system tray application for switching GPU modes on Lenovo Legion laptops running the [lenovolegionlinux](https://github.com/johnfanv2/LenovoLegionLinux) driver. @@ -44,20 +44,20 @@ Not Arch or KDE specific — works on any systemd-based distro (Ubuntu, Fedora, ## Installation ```bash -git clone https://github.com/pongsn/gpu-mode-tray.git -cd gpu-mode-tray +git clone https://github.com/pongsn/legion-gpu-mode-switcher.git +cd legion-gpu-mode-switcher sudo bash install.sh ``` `install.sh` will: 1. Install the polkit policy to `/usr/share/polkit-1/actions/` (enables passwordless switching for the active session) -2. Install the app to `/usr/local/bin/gpu-mode-tray` +2. Install the app to `/usr/local/bin/legion-gpu-mode-switcher` 3. Install the autostart entry to `~/.config/autostart/` (starts on next login) ## Usage ```bash -gpu-mode-tray & +legion-gpu-mode-switcher & ``` Right-click the tray icon to switch GPU mode. A reboot is required for any mode change to take effect — this is a hardware MUX limitation, same as on Windows. diff --git a/install.sh b/install.sh index 427c3ff..413e13c 100644 --- a/install.sh +++ b/install.sh @@ -3,9 +3,9 @@ set -euo pipefail POLICY_FILE="com.lenovolegion.gpumodetray.policy" POLICY_DST="/usr/share/polkit-1/actions/$POLICY_FILE" -APP_DST="/usr/local/bin/gpu-mode-tray" +APP_DST="/usr/local/bin/legion-gpu-mode-switcher" AUTOSTART_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/autostart" -DESKTOP_FILE="gpu-mode-tray.desktop" +DESKTOP_FILE="legion-gpu-mode-switcher.desktop" echo "Installing polkit policy -> $POLICY_DST" sudo install -m 644 "$POLICY_FILE" "$POLICY_DST" @@ -17,5 +17,5 @@ echo "Installing autostart entry -> $AUTOSTART_DIR/$DESKTOP_FILE" mkdir -p "$AUTOSTART_DIR" install -m 644 "$DESKTOP_FILE" "$AUTOSTART_DIR/$DESKTOP_FILE" -echo "Done. Run now with: gpu-mode-tray" +echo "Done. Run now with: legion-gpu-mode-switcher" echo "Will autostart on next login." diff --git a/gpu-mode-tray.desktop b/legion-gpu-mode-switcher.desktop similarity index 64% rename from gpu-mode-tray.desktop rename to legion-gpu-mode-switcher.desktop index d1b5bfb..ebb22f8 100644 --- a/gpu-mode-tray.desktop +++ b/legion-gpu-mode-switcher.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Type=Application -Name=GPU Mode Tray +Name=Legion GPU Mode Switcher Comment=GPU mode switcher for Lenovo Legion -Exec=/usr/local/bin/gpu-mode-tray +Exec=/usr/local/bin/legion-gpu-mode-switcher Icon=preferences-desktop-display X-KDE-autostart-after=panel