diff options
Diffstat (limited to 'xorg')
| -rw-r--r-- | xorg/.local/share/systemd/user/xbacklightmon.service | 8 | ||||
| -rwxr-xr-x | xorg/.local/usr/bin/xbacklightmon | 17 |
2 files changed, 0 insertions, 25 deletions
diff --git a/xorg/.local/share/systemd/user/xbacklightmon.service b/xorg/.local/share/systemd/user/xbacklightmon.service deleted file mode 100644 index c603974..0000000 --- a/xorg/.local/share/systemd/user/xbacklightmon.service +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Watches /sys/class/backlight/brightness and applies it to xorg-backlight | ||
| 3 | After=graphical.target | ||
| 4 | Wants=graphical.target | ||
| 5 | |||
| 6 | [Service] | ||
| 7 | Type=simple | ||
| 8 | ExecStart=/home/tom/.local/usr/bin/xbacklightmon | ||
diff --git a/xorg/.local/usr/bin/xbacklightmon b/xorg/.local/usr/bin/xbacklightmon deleted file mode 100755 index f5b46c0..0000000 --- a/xorg/.local/usr/bin/xbacklightmon +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | path=/sys/class/backlight/acpi_video0 | ||
| 4 | |||
| 5 | luminance() { | ||
| 6 | read -r level < "$path"/actual_brightness | ||
| 7 | factor=$((max / 100)) | ||
| 8 | printf '%d\n' "$((level / factor))" | ||
| 9 | } | ||
| 10 | |||
| 11 | read -r max < "$path"/max_brightness | ||
| 12 | |||
| 13 | echo xbacklight -set "$(luminance)" | ||
| 14 | |||
| 15 | inotifywait -me modify --format '' "$path"/actual_brightness | while read; do | ||
| 16 | echo xbacklight -set "$(luminance)" | ||
| 17 | done | ||
