1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-25 20:47:45 +01:00

fchange: now automatically toggles 1 and 0

This commit is contained in:
TiynGER 2021-04-29 14:54:54 +02:00
parent 96524322f9
commit 7d77deac49

View File

@ -1,3 +1,14 @@
#!/bin/sh
vim /sys/module/hid_apple/parameters/fnmode
## Toggle the state of the fnmode.
## Useful for using keyboards with different fn functionality.
curr=$(cat /sys/module/hid_apple/parameters/fnmode)
if [ "$curr" = "1" ]
then
echo "0" | sudo tee -a /sys/module/hid_apple/parameters/fnmode > /dev/null
elif [ "$curr" = "0" ]
then
echo "1" | sudo tee -a /sys/module/hid_apple/parameters/fnmode > /dev/null
fi