backlight: use brightnessctl instead of removed light binary
nixpkgs 26.05 dropped the 'light' package. Switch BacklightService to brightnessctl and bundle it in the wrapper PATH. Bump flake nixpkgs to nixos-26.05.
This commit is contained in:
parent
628ae67b7d
commit
0d0a3fd718
4 changed files with 9 additions and 7 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -17,16 +17,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1776169885,
|
||||
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
|
||||
"lastModified": 1780902259,
|
||||
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
|
||||
"rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
description = "nova-shell - minimal Quickshell bar for niri";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
|
||||
quickshell = {
|
||||
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
nova-shaders,
|
||||
nova-plugin,
|
||||
glib,
|
||||
brightnessctl,
|
||||
}:
|
||||
let
|
||||
shellSrc = lib.cleanSourceWith {
|
||||
|
|
@ -53,6 +54,7 @@ symlinkJoin {
|
|||
lib.makeBinPath [
|
||||
nova-stats
|
||||
glib
|
||||
brightnessctl
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ QtObject {
|
|||
|
||||
function adjust(delta) {
|
||||
const step = NS.ModulesService.backlightStep || 5;
|
||||
_adjProc.cmd = delta > 0 ? "light -A " + step : "light -U " + step;
|
||||
_adjProc.cmd = delta > 0 ? "brightnessctl set " + step + "%+" : "brightnessctl set " + step + "%-";
|
||||
_adjProc.running = true;
|
||||
}
|
||||
|
||||
function setPercent(pct) {
|
||||
_adjProc.cmd = "light -S " + Math.round(Math.max(0, Math.min(100, pct)));
|
||||
_adjProc.cmd = "brightnessctl set " + Math.round(Math.max(0, Math.min(100, pct))) + "%";
|
||||
_adjProc.running = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue