iso with touchbar fixed

This commit is contained in:
Aditya Garg 2022-02-03 18:46:56 +05:30
parent b165a5a890
commit de315a1fb4
3 changed files with 23 additions and 3 deletions

View File

@ -46,6 +46,6 @@ jobs:
files: ${{ github.workspace }}/*.iso
tag_name: v20.04-${{ steps.tag.outputs.tag }}
draft: false
prerelease: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -5,8 +5,8 @@ ROOT_PATH=$(pwd)
WORKING_PATH=/root/work
CHROOT_PATH="${WORKING_PATH}/chroot"
IMAGE_PATH="${WORKING_PATH}/image"
KERNEL_VERSION=5.15.16
PKGREL=1
KERNEL_VERSION=5.16.5
PKGREL=2
sed -i "s/KVER/${KERNEL_VERSION}/g" $(pwd)/files/chroot_build.sh
sed -i "s/PREL/${PKGREL}/g" $(pwd)/files/chroot_build.sh

View File

@ -117,6 +117,26 @@ printf '\n### apple-bce start ###\nhid-apple\nsnd-seq\napple-bce\n### apple-bce
printf '\n### applespi start ###\napple_ibridge\napple_ib_tb\napple_ib_als\n### applespi end ###' >>/etc/modules-load.d/applespi.conf
printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=1\n' >> /etc/modprobe.d/apple-tb.conf
printf '\n# delay loading of the touchbar driver\ninstall apple-ib-tb /bin/sleep 7; /sbin/modprobe --ignore-install apple-ib-tb' >> /etc/modprobe.d/delay-tb.conf
echo '
#!/usr/bin/env bash
echo "Select Touch Bar mode"
echo
echo "0: Only show F1-F12"
echo "1: Show media and brightness controls, use the fn key to switch to F1-12"
echo "2: Show F1-F12, use the fn key to switch to media and brightness controls"
echo "3: Only show media and brightness controls"
echo "4: Only show the escape key"
read tb
echo "Changing default mode ..."
echo "# display f* key in touchbar" > /etc/modprobe.d/apple-tb.conf
echo "options apple-ib-tb fnmode=$tb" >> /etc/modprobe.d/apple-tb.conf
bash -c "echo $tb > /sys/class/input/*/device/fnmode"
echo "Done!"' | tee /usr/local/bin/touchbar >/dev/null
chmod a+x /usr/local/bin/touchbar
chown root:root /usr/local/bin/touchbar
echo >&2 "===]> Info: Update initramfs... "