swadhinbiswas Add sysmon bar widget (CPU/RAM/Disk/GPU-temp/network), vendor default/omarchy menu definition, migrate-host-binds.sh, fix app drawer+notifications+file manager · 8/22/2026
2b98552
19 lines · 472 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# Turn off keyboard backlight before hibernate to prevent hang on power-off.
# The ASUS keyboard controller can block S4 shutdown if LEDs are active.

if [[ $1 == "pre" && $2 == "hibernate" ]]; then
  device=""
  for candidate in /sys/class/leds/*kbd_backlight*; do
    if [[ -e "$candidate" ]]; then
      device="$(basename "$candidate")"
      break
    fi
  done

  if [[ -n "$device" ]]; then
    brightnessctl -d "$device" set 0 >/dev/null 2>&1
  fi
fi