migration

This commit is contained in:
kokopi-dev
2025-10-28 16:23:11 +09:00
commit 2f27c335cf
116 changed files with 8221 additions and 0 deletions

9
X11/acpi/README.md Normal file
View File

@@ -0,0 +1,9 @@
# Fn Keys/Backlight
https://wiki.archlinux.org/title/acpid
`acpi_listen` and press fn keys to see their names and stuff
`chmod +x script_file_names`: some scripts will need executable permissions
- bl = backlight

3
X11/acpi/events/anything Normal file
View File

@@ -0,0 +1,3 @@
# Pass all events to our one handler script
event=.*
action=/etc/acpi/handler.sh %e

2
X11/acpi/events/bl_d Executable file
View File

@@ -0,0 +1,2 @@
event=video/brightnessdown.*
action=/etc/acpi/handlers/bl -

2
X11/acpi/events/bl_u Executable file
View File

@@ -0,0 +1,2 @@
event=video/brightnessup.*
action=/etc/acpi/handlers/bl +

2
X11/acpi/events/volume_d Executable file
View File

@@ -0,0 +1,2 @@
event=button/volumedown.*
action=/etc/acpi/handlers/volume -

2
X11/acpi/events/volume_u Executable file
View File

@@ -0,0 +1,2 @@
event=button/volumeup.*
action=/etc/acpi/handlers/volume +

77
X11/acpi/handler.sh Executable file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
# Default acpi script that takes an entry for all actions
case "$1" in
# button/power)
# case "$2" in
# PBTN|PWRF)
# logger 'PowerButton pressed'
# ;;
# *)
# logger "ACPI action undefined: $2"
# ;;
# esac
# ;;
# button/sleep)
# case "$2" in
# SLPB|SBTN)
# logger 'SleepButton pressed'
# ;;
# *)
# logger "ACPI action undefined: $2"
# ;;
# esac
# ;;
# ac_adapter)
# case "$2" in
# AC|ACAD|ADP0)
# case "$4" in
# 00000000)
# logger 'AC unpluged'
# ;;
# 00000001)
# logger 'AC pluged'
# ;;
# esac
# ;;
# *)
# logger "ACPI action undefined: $2"
# ;;
# esac
# ;;
# battery)
# case "$2" in
# BAT0)
# case "$4" in
# 00000000)
# logger 'Battery online'
# ;;
# 00000001)
# logger 'Battery offline'
# ;;
# esac
# ;;
# CPU0)
# ;;
# *) logger "ACPI action undefined: $2" ;;
# esac
# ;;
# button/lid)
# case "$3" in
# close)
# logger 'LID closed'
# ;;
# open)
# logger 'LID opened'
# ;;
# *)
# logger "ACPI action undefined: $3"
# ;;
# esac
# ;;
# *)
# logger "ACPI group/action undefined: $1 / $2"
# ;;
esac
# vim:set ts=4 sw=4 ft=sh et:

8
X11/acpi/handlers/bl Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
bl_dev=/sys/class/backlight/intel_backlight
step=1900
case $1 in
-) echo $(($(< $bl_dev/brightness) - $step)) >$bl_dev/brightness;;
+) echo $(($(< $bl_dev/brightness) + $step)) >$bl_dev/brightness;;
esac

5
X11/acpi/handlers/volume Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
case $1 in
-) runuser - kokopi -c "pamixer -d 5";;
+) runuser - kokopi -c "pamixer -i 5";;
esac