nix/home/program/bash/module/Brightness.nix

24 lines
420 B
Nix
Raw Normal View History

{ ... }:
{
text = ''
# Set display brightness to a minimum.
function brmin() {
light -S 0.01
}
2024-04-06 03:03:58 +03:00
# Set display brightness to a maximum.
function brmax() {
light -S 100
}
2024-04-06 03:03:58 +03:00
# Set display brightness in percent, 50% default.
# Usage: brset [LEVEL]
function brset() {
local level=''${1}
[[ "''${level}" = "" ]] && level=50
2024-04-06 03:03:58 +03:00
light -S ''${level}
}
'';
2024-04-06 03:03:58 +03:00
}