mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
xbrightness: migrate to by-name
This commit is contained in:
parent
e8d40e36ed
commit
a67f69e126
2 changed files with 0 additions and 1 deletions
14
nix/packages/by-name/xbrightness/package.nix
Normal file
14
nix/packages/by-name/xbrightness/package.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
writeShellApplication,
|
||||
bc,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "xbrightness";
|
||||
runtimeInputs = [bc];
|
||||
text = ''
|
||||
device=$1
|
||||
rel=$2
|
||||
brightness=$(xrandr --verbose | grep Brightness | cut -d':' -f 2)
|
||||
xrandr --output "$device" --brightness "$(echo "$brightness $rel" | bc -l)"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue