mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 15:23:11 +02:00
feat: added gamemode and mangohud
This commit is contained in:
parent
05ae7a01d5
commit
5194a668a7
@ -89,6 +89,7 @@ sudo cp /etc/pacman.conf /etc/pacman.conf.bak
|
|||||||
sudo cp ./pacman.conf /etc/pacman.conf
|
sudo cp ./pacman.conf /etc/pacman.conf
|
||||||
# pacman
|
# pacman
|
||||||
pacman_packages=(
|
pacman_packages=(
|
||||||
|
linux
|
||||||
distcc
|
distcc
|
||||||
git
|
git
|
||||||
bluez-utils
|
bluez-utils
|
||||||
@ -287,6 +288,11 @@ pacman_packages=(
|
|||||||
dotnet-sdk
|
dotnet-sdk
|
||||||
godot
|
godot
|
||||||
joyutils
|
joyutils
|
||||||
|
gparted
|
||||||
|
nvidia-open
|
||||||
|
xorg-xinput
|
||||||
|
mangohud
|
||||||
|
lib32-mangohud
|
||||||
)
|
)
|
||||||
|
|
||||||
for pkg in "${pacman_packages[@]}"; do
|
for pkg in "${pacman_packages[@]}"; do
|
||||||
@ -312,6 +318,7 @@ nvm i v18.20.5
|
|||||||
sudo systemctl enable bluetooth.service
|
sudo systemctl enable bluetooth.service
|
||||||
sudo systemctl start bluetooth.service
|
sudo systemctl start bluetooth.service
|
||||||
aur_packages=(
|
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.git qdirstat-git"
|
||||||
"https://aur.archlinux.org/qdirstat.git qdirstat"
|
"https://aur.archlinux.org/qdirstat.git qdirstat"
|
||||||
"https://aur.archlinux.org/thorium-browser-bin.git thorium-browser"
|
"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/nvm-git.git nvm-git"
|
||||||
"https://aur.archlinux.org/unityhub-beta.git unityhub-beta"
|
"https://aur.archlinux.org/unityhub-beta.git unityhub-beta"
|
||||||
# "https://aur.archlinux.org/keepassxc-git.git keepassxc-git"
|
# "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/autorandr-git.git autorandr-git"
|
||||||
"https://aur.archlinux.org/xorg-xrandr-git.git xorg-xrandr-git"
|
"https://aur.archlinux.org/xorg-xrandr-git.git xorg-xrandr-git"
|
||||||
"https://aur.archlinux.org/mpv-plugin-xrandr.git mpv-plugin-xrandr"
|
"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://wiki.archlinux.org/title/Microsoft_fonts
|
||||||
"https://aur.archlinux.org/httpfs2-2gbplus.git httpfs2-2gbplus"
|
"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/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/godot-git.git godot-git"
|
||||||
"https://aur.archlinux.org/icu63.git icu63"
|
"https://aur.archlinux.org/icu63.git icu63"
|
||||||
"https://aur.archlinux.org/github-cli-git.git github-cli-git"
|
"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/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/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
|
git clone https://aur.archlinux.org/unreal-engine.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd unreal-engine
|
#cd unreal-engine
|
||||||
# gh auth login
|
## gh auth login
|
||||||
gh repo clone EpicGames/UnrealEngine -- -b release --single-branch
|
#gh repo clone EpicGames/UnrealEngine -- -b release --single-branch
|
||||||
makepkg -s --nocheck --skipchecksums --skipinteg --skippgpcheck --noconfirm --needed
|
#makepkg -s --nocheck --skipchecksums --skipinteg --skippgpcheck --noconfirm --needed
|
||||||
|
|||||||
47
scripts/toggle_wheel.sh
Executable file
47
scripts/toggle_wheel.sh
Executable 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
|
||||||
Loading…
Reference in New Issue
Block a user