generated from ublue-os/udev-rules
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(just): add quick options for use in yafti
- Loading branch information
1 parent
b069be4
commit 36654a0
Showing
4 changed files
with
99 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,61 @@ | ||
# vim: set ft=make : | ||
|
||
# Configure gamepad drivers | ||
configure-gamepads: | ||
configure-gamepads ARG="prompt": | ||
#!/usr/bin/env bash | ||
bold=$(tput bold) | ||
normal=$(tput sgr0) | ||
echo "${bold}Configuring gamepad drivers${normal}" | ||
echo 'Which drivers do you want to use?' | ||
echo 'Note: Enabling xone and xpadneo can break some 3rd party controllers' | ||
OPTION=$(ugum choose "Default Fedora drivers" "Enable xone and xpadneo" ) | ||
if [ "$OPTION" == "Enable xone and xpadneo" ]; then | ||
OPTION={{ARG}} | ||
if [ "$OPTION" == "prompt" ]; then | ||
echo "${bold}Configuring gamepad drivers${normal}" | ||
echo 'Which drivers do you want to use?' | ||
echo 'Note: Enabling xone and xpadneo can break some 3rd party controllers' | ||
OPTION=$(ugum choose "Default Fedora drivers" "Enable xone and xpadneo") | ||
elif [ "$OPTION" == "help" ]; then | ||
echo "Usage: ujust configure-gamepads <option>" | ||
echo " <option>: Specify the quick option - 'stock' or 'ublue'" | ||
echo " Use 'stock' to select Default Fedora Drivers" | ||
echo " Use 'ublue' to select Enable xone and xpadneo" | ||
exit 0 | ||
fi | ||
if [ "$OPTION" == "Enable xone and xpadneo" ] || [ "$OPTION" == "ublue" ]; then | ||
sudo rm -f /etc/modprobe.d/xone.conf | ||
sudo rm -f /etc/modprobe.d/xpadneo.conf | ||
sudo rm -f /etc/modprobe.d/xpad-noone-blacklist.conf | ||
sudo rm -f /etc/modules-load.d/xpad-noone.conf | ||
elif [ "$OPTION" == "Default Fedora drivers" ]; then | ||
echo "${bold}Enabled${normal} xone and xpadneo, please reboot for changes to take effect" | ||
elif [ "$OPTION" == "Default Fedora drivers" ] || [ "$OPTION" == "stock" ]; then | ||
sudo bash -c '> /etc/modprobe.d/xone.conf' | ||
sudo bash -c '> /etc/modprobe.d/xpadneo.conf' | ||
sudo bash -c '> /etc/modprobe.d/xpad-noone-blacklist.conf' | ||
sudo bash -c '> /etc/modules-load.d/xpad-noone.conf' | ||
echo "${bold}Disabled${normal} xone and xpadneo, please reboot for changes to take effect" | ||
fi | ||
|
||
# Configure Broadcom WL driver (Enabling WL breaks numerous other Wi-Fi adapters) | ||
configure-broadcom-wl: | ||
configure-broadcom-wl ARG="prompt": | ||
#!/usr/bin/env bash | ||
bold=$(tput bold) | ||
normal=$(tput sgr0) | ||
echo "${bold}Configuring Broadcom Wi-Fi${normal}" | ||
echo 'Enabling Broadcom WL driver will break numerous other Wi-Fi adapters.' | ||
echo 'Enable or Disable Broadcom Wl?' | ||
OPTION=$(ugum choose Enable Disable) | ||
if [ "$OPTION" == "Enable" ]; then | ||
OPTION={{ARG}} | ||
if [ "$OPTION" == "prompt" ]; then | ||
echo "${bold}Configuring Broadcom Wi-Fi${normal}" | ||
echo 'Enabling Broadcom WL driver will break numerous other Wi-Fi adapters.' | ||
echo 'Enable or Disable Broadcom Wl?' | ||
OPTION=$(ugum choose Enable Disable) | ||
elif [ "$OPTION" == "help" ]; then | ||
echo "Usage: ujust configure-broadcom-wl <option>" | ||
echo " <option>: Specify the quick option - 'enable' or 'disable'" | ||
echo " Use 'enable' to select Enable" | ||
echo " Use 'disable' to select Disable" | ||
exit 0 | ||
fi | ||
if [ "${OPTION,,}" == "enable" ]; then | ||
sudo rm -f /etc/modprobe.d/broadcom-wl-blacklist.conf | ||
sudo rm -f /etc/modprobe.d/default-disable-broadcom-wl.conf | ||
elif [ "$OPTION" == "Disable" ]; then | ||
echo "${bold}Enabled${normal} Broadcom Wireless, please reboot for changes to take effect" | ||
elif [ "${OPTION,,}" == "disable" ]; then | ||
sudo bash -c '> /etc/modules-load.d/broadcom-wl-blacklist.conf' | ||
sudo bash -c 'echo "blacklist wl" > /etc/modules-load.d/default-disable-broadcom-wl.conf' | ||
echo "${bold}Disabled${normal} Broadcom Wireless, please reboot for changes to take effect" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters