mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-29 22:20:21 +00:00
feat(just): combine install decky and get alt handheld recipes to setup-decky
This commit is contained in:
parent
9ec3dcfaee
commit
4ad5e4023d
@ -1,37 +1,58 @@
|
|||||||
# vim: set ft=make :
|
# vim: set ft=make :
|
||||||
|
|
||||||
# Install Decky Loader (https://github.com/SteamDeckHomebrew/decky-loader)
|
# Install and configure Decky Loader (https://github.com/SteamDeckHomebrew/decky-loader) and plugins for alternative handhelds
|
||||||
get-decky:
|
setup-decky ACTION="":
|
||||||
#!/usr/bin/bash
|
#!/bin/bash
|
||||||
export HOME=$(getent passwd ${SUDO_USER:-$USER} | cut -d: -f6)
|
source /usr/lib/ujust/ujust.sh
|
||||||
curl -L https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/install_release.sh | sh
|
DECKY_STATE="${b}${red}Not Installed${n}"
|
||||||
sudo chcon -R -t bin_t $HOME/homebrew/services/PluginLoader
|
|
||||||
|
|
||||||
# Install SimpleDeckyTDP, a simple TDP plugin for alternative PC handhelds
|
|
||||||
get-simpledeckytdp:
|
|
||||||
#!/usr/bin/bash
|
|
||||||
if [[ -d $HOME/homebrew/plugins ]]; then
|
if [[ -d $HOME/homebrew/plugins ]]; then
|
||||||
sudo rm -rf $HOME/homebrew/plugins/SimpleDeckyTDP
|
DECKY_STATE="${b}${green}Installed${n}"
|
||||||
curl -L $(curl -s https://api.github.com/repos/aarron-lee/SimpleDeckyTDP/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o /tmp/SimpleDeckyTDP.tar.gz
|
|
||||||
sudo tar -xzf /tmp/SimpleDeckyTDP.tar.gz -C $HOME/homebrew/plugins
|
|
||||||
rm /tmp/SimpleDeckyTDP.tar.gz
|
|
||||||
sudo sed -i 's/ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE=0/ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE=1/g' /etc/default/steam-hardware-control
|
|
||||||
echo 'Installed. Please reboot to apply needed changes.'
|
|
||||||
else
|
|
||||||
echo 'Please install Decky Loader by running ujust get-decky first.'
|
|
||||||
fi
|
fi
|
||||||
|
OPTION={{ ACTION }}
|
||||||
# Install HHD Decky Plugin for controlling input on the Lenovo Legion Go and ASUS Ally
|
if [ "$OPTION" == "help" ]; then
|
||||||
get-hhd-decky:
|
echo "Usage: ujust configure-watchdog <option>"
|
||||||
#!/usr/bin/bash
|
echo " <option>: Specify the quick option to skip the prompt"
|
||||||
if [[ -d $HOME/homebrew/plugins ]]; then
|
echo " Use 'install' to select Install Decky"
|
||||||
sudo rm -rf $HOME/homebrew/plugins/hhd-decky
|
echo " Use 'simpledeckytdp' to select Get SimpleDeckyTDP"
|
||||||
curl -L $(curl -s https://api.github.com/repos/hhd-dev/hhd-decky/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o /tmp/hhd-decky.tar.gz
|
echo " Use 'hhd-decky' to select Get HHD-decky"
|
||||||
sudo tar -xzf /tmp/hhd-decky.tar.gz -C $HOME/homebrew/plugins
|
exit 0
|
||||||
rm /tmp/hhd-decky.tar.gz
|
elif [ "$OPTION" == "" ]; then
|
||||||
echo 'Installed.'
|
echo "${bold}Setup Decky Loader${normal}"
|
||||||
else
|
echo "This lets you setup decky and install some decky plugins for alternative handhelds"
|
||||||
echo 'Please install Decky Loader by running ujust get-decky first.'
|
echo "Tip: CTRL+Click on the plugin name to visit the project page for more info"
|
||||||
|
echo "Decky Loader is $DECKY_STATE"
|
||||||
|
OPTION=$(
|
||||||
|
Choose \
|
||||||
|
"Install Decky" \
|
||||||
|
"Get $(Urllink "https://github.com/aarron-lee/SimpleDeckyTDP" SimpleDeckyTDP)${n}" \
|
||||||
|
"Get $(Urllink "https://github.com/hhd-dev/hhd-decky" HHD-Decky)${n}"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
if [[ "${OPTION,,}" =~ install ]]; then
|
||||||
|
export HOME=$(getent passwd ${SUDO_USER:-$USER} | cut -d: -f6)
|
||||||
|
curl -L https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/install_release.sh | sh
|
||||||
|
sudo chcon -R -t bin_t $HOME/homebrew/services/PluginLoader
|
||||||
|
elif [[ "${OPTION,,}" =~ simpledeckytdp ]]; then
|
||||||
|
if [[ -d $HOME/homebrew/plugins ]]; then
|
||||||
|
sudo rm -rf $HOME/homebrew/plugins/SimpleDeckyTDP
|
||||||
|
curl -L $(curl -s https://api.github.com/repos/aarron-lee/SimpleDeckyTDP/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o /tmp/SimpleDeckyTDP.tar.gz
|
||||||
|
sudo tar -xzf /tmp/SimpleDeckyTDP.tar.gz -C $HOME/homebrew/plugins
|
||||||
|
rm /tmp/SimpleDeckyTDP.tar.gz
|
||||||
|
sudo sed -i 's/ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE=0/ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE=1/g' /etc/default/steam-hardware-control
|
||||||
|
echo 'Installed. Please reboot to apply needed changes.'
|
||||||
|
else
|
||||||
|
echo 'Please install Decky Loader by running "ujust setup-decky install" first.'
|
||||||
|
fi
|
||||||
|
elif [[ "${OPTION,,}" =~ hhd-decky ]]; then
|
||||||
|
if [[ -d $HOME/homebrew/plugins ]]; then
|
||||||
|
sudo rm -rf $HOME/homebrew/plugins/hhd-decky
|
||||||
|
curl -L $(curl -s https://api.github.com/repos/hhd-dev/hhd-decky/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o /tmp/hhd-decky.tar.gz
|
||||||
|
sudo tar -xzf /tmp/hhd-decky.tar.gz -C $HOME/homebrew/plugins
|
||||||
|
rm /tmp/hhd-decky.tar.gz
|
||||||
|
echo 'Installed.'
|
||||||
|
else
|
||||||
|
echo 'Please install Decky Loader by running "ujust setup-decky install" first.'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install ROG Ally Theme for CSS Loader (https://github.com/semakusut/SBP-ROG-Ally)
|
# Install ROG Ally Theme for CSS Loader (https://github.com/semakusut/SBP-ROG-Ally)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user