We are going to take the default configuration as an starting point. First, we make a directory for the configuration files in or home folder:
mkdir -p ~/.icewm
Then, we copy de default configuration files to that directory.
cp /usr/share/icewm/preferences ~/.icewm/preferences
cp /usr/share/icewm/toolbar ~/.icewm/toolbar
cp /usr/share/icewm/keys ~/.icewm/keys
cp /usr/share/icewm/winoptions ~/.icewm/winoptions
cp /usr/share/icewm/programs ~/.icewm/programs
cp /usr/share/icewm/theme ~/.icewm/theme
cp /usr/share/icewm/menu ~/.icewm/menu
/etc/X11/xorg.conf.d/40-libinput.conf
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "on"
Option "NaturalScrolling" "true"
EndSection
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
First, we enable the acpid service:
# ln -sf /etc/sv/acpid /var/service/
# sudo sv restart acpid
Then, we execute acpi_listen and take note of the response when we press "F5" and "F6" keys.
If we press F5: video/brightnessdown BRTDN 00000087 00000000
If we press F6: video/brightnessup BRTUP 00000086 00000000
We reate a configuration directory and configuration file for the handlers:
# mkdir -p /etc/acpi/handlers
# /etc/acpi/handlers/thinkpad_backlight.sh
We edit this file:
#!/bin/sh
SYS_PATH="/sys/class/backlight/intel_backlight"
CURRENT=$(cat "$SYS_PATH/brightness")
MAX=$(cat "$SYS_PATH/max_brightness")
# Calculation of one step of 10% of MAX
STEP=$((MAX / 10))
case "$1" in
up)
NEW=$((CURRENT + STEP))
[ "$NEW" -gt "$MAX" ] && NEW=$MAX
echo "$NEW" > "$SYS_PATH/brightness"
;;
down)
NEW=$((CURRENT - STEP))
[ "$NEW" -lt 0 ] && NEW=0
echo "$NEW" > "$SYS_PATH/brightness"
;;
esac
Execution permission: # chmod +x /etc/acpi/handlers/thinkpad_backlight.sh
We need an event file that detects the pressing of the F5 key:
/etc/acpi/events/thinkpad_br_down
With the content:
event=video/brightnessdown BRTDN 00000087
action=/etc/acpi/handlers/thinkpad_backlight.sh down
And we need an event file that detects the pressing of the F6 key:
/etc/acpi/events/thinkpad_br_up
With the content:
event=video/brightnessup BRTUP 00000086
action=/etc/acpi/handlers/thinkpad_backlight.sh up
Then sudo sv restart acpid