mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
carbon: script control external monitor control
This commit is contained in:
parent
11a5b54398
commit
f759789fcc
6 changed files with 36 additions and 8 deletions
16
nix/custom/xbrightness.nix
Normal file
16
nix/custom/xbrightness.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
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