Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cosmic-applet-scx

A panel applet for switching sched_ext schedulers on COSMIC (pop-os/cosmic-epoch), without touching the terminal or the CachyOS scheduler GUI.

Built because I wanted to flip between bpfland, cake, lavd etc. directly through a panel button.

image image

Visual depend on your Cosmic themeing.

What it does

  • Click the panel icon, get a popup listing every scheduler your system actually supports (pulled live from scxctl list, not hardcoded, so it stays correct as CachyOS adds more)
  • Click a scheduler or a mode (auto, gaming, powersave, lowlatency, server) and it applies immediately
  • Shows a checkmark next to whatever's actually running, confirmed against scxctl get after every change, not just assumed
  • Stop button kills the running scheduler and hands control back to the default kernel scheduler
  • If something goes wrong, the popup shows the real error from scxctl instead of just doing nothing

Requirements

  • COSMIC desktop (cosmic-epoch)
  • scx-tools (provides scxctl and scx_loader) - on CachyOS: sudo pacman -S scx-scheds scx-tools
  • A working polkit agent. scxctl/scx_loader need admin privileges to switch schedulers, and without sudo they go through polkit. COSMIC ships one by default.
  • Rust and just to build: sudo pacman -S rust just

Building

git clone https://github.com/fernbacher/cosmic-applet-scx
cd cosmic-applet-scx
just install

That builds a release binary and installs it plus the desktop entry. Then add it from COSMIC Settings > Desktop > Panel > Applets.

If you'd rather build without installing system-wide first:

cargo build --release
./target/release/cosmic-applet-scx

Why scxctl and not raw D-Bus

scx_loader exposes a D-Bus interface, and I could've talked to it directly, but shelling out to scxctl is simpler, easier to debug (you can run the exact same command by hand in a terminal if the applet misbehaves), and scx_loader already validates and authorizes each call through polkit regardless of which path you use. Not the fastest option, but for something you click a few times an hour it doesn't matter.

Known quirks

  • scxctl get prints scheduler and mode names in Title Case (Cake, Gaming) for display, but scxctl switch/start expect lowercase (cake, gaming). The applet lowercases everything internally before comparing or resubmitting, but if a future scxctl version changes this format again, that's the first place to look.
  • If a switch fails silently for you, check the popup, it surfaces scxctl's actual stderr instead of eating it.

License

MIT, do whatever you want with it.

About

A panel applet for switching sched_ext schedulers on COSMIC (pop-os/cosmic-epoch), without touching the terminal or the CachyOS scheduler GUI.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages