Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omarchy GPU Switch

An Omarchy bar plugin for routing selected applications to an NVIDIA discrete GPU while keeping the integrated GPU as the system default.

The panel shows the NVIDIA runtime power state, lists persistent NVIDIA exceptions, and lets you add or remove applications through the native Omarchy menu. Changes take effect the next time the application is started.

Features

  • Native Omarchy bar widget and popup
  • Per-application NVIDIA PRIME render offload
  • Persistent, reversible .desktop overrides
  • Automatic backup and restoration of existing user launchers
  • Support for every Exec action in a desktop entry
  • No dependency on switcheroo-control
  • Built-in pending entries for Blender and FreeCAD

Requirements

  • Omarchy with plugin support
  • Python 3
  • A hybrid Linux system using the proprietary NVIDIA driver
  • The integrated GPU configured as the desktop/session default

The plugin does not choose the GPU used by the compositor. It manages application exceptions on a system whose normal session already runs on the integrated GPU.

Install

omarchy plugin add https://github.com/f-iacono/omarchy-gpu-switch.git --enable

omarchy plugin install is an alias, so this works too:

omarchy plugin install https://github.com/f-iacono/omarchy-gpu-switch.git --enable

Omarchy clones the repository into the correct plugin directory, validates its manifest, asks where to place the widget, and enables it. No manual chmod or shell rescan is required.

Click the GPU icon in the bar, then choose Aggiungi applicazione. To return an application to the integrated GPU, click Integrata next to its name.

Update and remove

omarchy plugin update azatropix.gpu-router
omarchy plugin remove azatropix.gpu-router

How it works

For an NVIDIA exception, the helper creates a user-level desktop override in ~/.local/share/applications. It prefixes all launch actions with the bundled runner, which sets the official NVIDIA PRIME render-offload environment:

__NV_PRIME_RENDER_OFFLOAD=1
__VK_LAYER_NV_optimus=NVIDIA_only
__GLX_VENDOR_LIBRARY_NAME=nvidia
VK_LOADER_DRIVERS_SELECT=nvidia_icd.json

State and backups are stored in ~/.local/state/omarchy-gpu-router. Removing an exception restores the original local launcher, when one existed; otherwise it removes only the override generated by the plugin.

Command line

# Show current assignments
~/.config/omarchy/plugins/azatropix.gpu-router/bin/omarchy-gpu-router status --json

# Assign an application to NVIDIA
~/.config/omarchy/plugins/azatropix.gpu-router/bin/omarchy-gpu-router set steam.desktop nvidia

# Return it to the session default (integrated GPU)
~/.config/omarchy/plugins/azatropix.gpu-router/bin/omarchy-gpu-router set steam.desktop integrated

License

MIT

About

Per-application NVIDIA GPU routing for Omarchy

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages