update udev
This commit is contained in:
parent
44a2bb360e
commit
8cd8a99866
3 changed files with 21 additions and 2 deletions
19
.config/scripts/udev.sh
Executable file
19
.config/scripts/udev.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/zsh
|
||||||
|
|
||||||
|
performance() {
|
||||||
|
|
||||||
|
echo '128' >/sys/class/leds/system76_acpi::kbd_backlight/brightness
|
||||||
|
/usr/bin/system76-power profile performance
|
||||||
|
}
|
||||||
|
|
||||||
|
battery() {
|
||||||
|
|
||||||
|
echo '128' >/sys/class/leds/system76_acpi::kbd_backlight/brightness
|
||||||
|
/usr/bin/system76-power profile battery
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
performance) performance ;;
|
||||||
|
battery) battery ;;
|
||||||
|
*) echo "Please enter an action" ;;
|
||||||
|
esac
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
# Rule for when switching to battery
|
# Rule for when switching to battery
|
||||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0",RUN+="/usr/bin/system76-power profile battery"
|
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0",RUN+="/home/user/.config/scripts/udev.sh battery"
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
# Rule for when switching to power supply
|
# Rule for when switching to power supply
|
||||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1",RUN+="/usr/bin/system76-power profile performance"
|
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1",RUN+="/home/user/.config/scripts/udev.sh performance"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue