feat: added gamemode and mangohud

This commit is contained in:
Krzysztof kuhy Rudnicki 2025-01-11 13:35:06 +01:00
parent 05ae7a01d5
commit 5194a668a7
2 changed files with 66 additions and 7 deletions

View File

@ -89,6 +89,7 @@ sudo cp /etc/pacman.conf /etc/pacman.conf.bak
sudo cp ./pacman.conf /etc/pacman.conf
# pacman
pacman_packages=(
linux
distcc
git
bluez-utils
@ -287,6 +288,11 @@ pacman_packages=(
dotnet-sdk
godot
joyutils
gparted
nvidia-open
xorg-xinput
mangohud
lib32-mangohud
)
for pkg in "${pacman_packages[@]}"; do
@ -312,6 +318,7 @@ nvm i v18.20.5
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
aur_packages=(
"https://aur.archlinux.org/mkinitcpio-git.git mkinitcpio-git"
# "https://aur.archlinux.org/qdirstat-git.git qdirstat-git"
"https://aur.archlinux.org/qdirstat.git qdirstat"
"https://aur.archlinux.org/thorium-browser-bin.git thorium-browser"
@ -583,7 +590,7 @@ aur_packages=(
"https://aur.archlinux.org/nvm-git.git nvm-git"
"https://aur.archlinux.org/unityhub-beta.git unityhub-beta"
# "https://aur.archlinux.org/keepassxc-git.git keepassxc-git"
"https://aur.archlinux.org/nvidia-open-git.git nvidia-open-git"
#"https://aur.archlinux.org/nvidia-open-git.git nvidia-open-git"
"https://aur.archlinux.org/autorandr-git.git autorandr-git"
"https://aur.archlinux.org/xorg-xrandr-git.git xorg-xrandr-git"
"https://aur.archlinux.org/mpv-plugin-xrandr.git mpv-plugin-xrandr"
@ -597,7 +604,7 @@ aur_packages=(
# https://wiki.archlinux.org/title/Microsoft_fonts
"https://aur.archlinux.org/httpfs2-2gbplus.git httpfs2-2gbplus"
"https://aur.archlinux.org/ttf-ms-win10-auto.git ttf-ms-win10-auto"
"https://aur.archlinux.org/httpdirfs-git. git httpdirfs-git"
# "https://aur.archlinux.org/httpdirfs-git. git httpdirfs-git"
# "https://aur.archlinux.org/godot-git.git godot-git"
"https://aur.archlinux.org/icu63.git icu63"
"https://aur.archlinux.org/github-cli-git.git github-cli-git"
@ -610,7 +617,12 @@ aur_packages=(
"https://aur.archlinux.org/xpadneo-dkms-git.git xpadneo-dkms-git"
"https://aur.archlinux.org/xpadneo-dkms-git.git xpadneo-dkms-git"
"https://aur.archlinux.org/xone-dongle-firmware.git xone-dongle-firmware"
# "https://aur.archlinux.org/gparted-git.git gparted-git"
"https://aur.archlinux.org/ferdium-git.git ferdium-git"
"https://aur.archlinux.org/gamemode-git.git gamemode-git"
"https://aur.archlinux.org/gamemode-git.git gamemode-git"
#"https://aur.archlinux.org/mangohud-git.git mangohud-git"
#"https://aur.archlinux.org/lib32-mangohud-git.git lib32-mangohud-git"
)
@ -637,7 +649,7 @@ if [ ! -d "$(basename https://aur.archlinux.org/unreal-engine.git .git)" ]; then
git clone https://aur.archlinux.org/unreal-engine.git
fi
cd unreal-engine
# gh auth login
gh repo clone EpicGames/UnrealEngine -- -b release --single-branch
makepkg -s --nocheck --skipchecksums --skipinteg --skippgpcheck --noconfirm --needed
#cd unreal-engine
## gh auth login
#gh repo clone EpicGames/UnrealEngine -- -b release --single-branch
#makepkg -s --nocheck --skipchecksums --skipinteg --skippgpcheck --noconfirm --needed

47
scripts/toggle_wheel.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/bash
# Replace these with your device's vendor and product IDs
VENDOR_ID="c24f"
PRODUCT_ID="046d"
ACTION=$1
# Check if script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please run with sudo."
exit 1
fi
# Check if action parameter is provided
if [[ "$ACTION" != "on" && "$ACTION" != "off" ]]; then
echo "Usage: $0 [on|off]"
exit 1
fi
DEVICE_PATH=""
# Find the device path in sysfs
for sysdevpath in $(find /sys/bus/usb/devices/ -name idVendor); do
if [[ $(cat "$sysdevpath") == "$VENDOR_ID" ]]; then
parentdir="$(dirname "$sysdevpath")"
if [[ $(cat "$parentdir/idProduct") == "$PRODUCT_ID" ]]; then
DEVICE_PATH="$parentdir"
break
fi
fi
done
# Check if device was found
if [ -z "$DEVICE_PATH" ]; then
echo "Device with Vendor ID $VENDOR_ID and Product ID $PRODUCT_ID not found."
exit 1
fi
# Enable or disable the device
if [ "$ACTION" == "off" ]; then
echo '0' > "$DEVICE_PATH/authorized"
echo "Device turned off."
elif [ "$ACTION" == "on" ]; then
echo '1' > "$DEVICE_PATH/authorized"
echo "Device turned on."
fi