feat(just): Introduce basic GUI auth handler using kdialog

Keep things simple and straightforward. This handler can be expanded in the
future for compatibility with GNOME
This commit is contained in:
RJ Trujillo 2023-07-17 23:46:46 -06:00
parent 5b9586833d
commit dd8137413c
2 changed files with 19 additions and 13 deletions

View File

@ -15,19 +15,19 @@ create-steam-shortcuts:
cp /usr/share/applications/steam.desktop ~/Desktop
cp /etc/skel.d/Desktop/Return.desktop ~/Desktop
get-decky:
curl -L https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/install_release.sh | sh
get-decky: _auth
sudo curl -L https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/install_release.sh | sh
get-emudeck:
echo 'Retrieving EmuDeck...'
wget https://www.emudeck.com/EmuDeck.desktop -P ~/Desktop
chmod +x ~/Desktop/EmuDeck.desktop
install-nix:
curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/silverblue-nix-installer.sh | bash
install-nix: _auth
sudo curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/silverblue-nix-installer.sh | bash
remove-nix:
curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/uninstaller-scripts/silverblue-nix-uninstaller.sh | bash
remove-nix: _auth
sudo curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/uninstaller-scripts/silverblue-nix-uninstaller.sh | bash
get-greenlight:
echo 'Retrieving Greenlight'
@ -72,7 +72,7 @@ resize-deckswap:
NEW_SIZE=1
fi
if ((${NEW_SIZE} >= 1 && ${NEW_SIZE} <= 16)); then
sudo sed -i 's/SWAP_SIZE='${CURRENT_SIZE}'G/SWAP_SIZE='${NEW_SIZE}'G/g' ${CONFIG}
just --unstable _auth | sudo sed -i 's/SWAP_SIZE='${CURRENT_SIZE}'G/SWAP_SIZE='${NEW_SIZE}'G/g' ${CONFIG}
echo 'Current size: '${NEW_SIZE}'G. Please reboot.'
else
echo 'Error: Input out of range (1-16). Running again.'
@ -111,7 +111,7 @@ resize-zram:
NEW_SIZE=1024
fi
if ((${NEW_SIZE} >= 512 && ${NEW_SIZE} <= 4096)); then
sudo sed -i 's/zram-size='${CURRENT_SIZE}'/zram-size='${NEW_SIZE}'/g' ${CONFIG}
just --unstable _auth | sudo sed -i 's/zram-size='${CURRENT_SIZE}'/zram-size='${NEW_SIZE}'/g' ${CONFIG}
echo 'Current size: '${NEW_SIZE}'. Please reboot.'
else
echo 'Error: Input out of range (512-4096). Running again.'
@ -121,3 +121,6 @@ resize-zram:
echo 'Error: Input is not an integer. Running again.'
just resize-zram
fi
_auth:
kdialog --password "Please enter your password: "

View File

@ -14,11 +14,11 @@ install-corectrl:
rpm-ostree install corectrl
rpm-ostree kargs --append="amdgpu.ppfeaturemask=0xffffffff"
install-nix:
curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/silverblue-nix-installer.sh | bash
install-nix: _auth
sudo curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/silverblue-nix-installer.sh | bash
remove-nix:
curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/uninstaller-scripts/silverblue-nix-uninstaller.sh | bash
remove-nix: _auth
sudo curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/uninstaller-scripts/silverblue-nix-uninstaller.sh | bash
get-greenlight:
echo 'Retrieving Greenlight'
@ -66,7 +66,7 @@ resize-zram:
NEW_SIZE=1024
fi
if ((${NEW_SIZE} >= 512 && ${NEW_SIZE} <= 4096)); then
sudo sed -i 's/zram-size='${CURRENT_SIZE}'/zram-size='${NEW_SIZE}'/g' ${CONFIG}
just --unstable _auth | sudo sed -i 's/zram-size='${CURRENT_SIZE}'/zram-size='${NEW_SIZE}'/g' ${CONFIG}
echo 'Current size: '${NEW_SIZE}'. Please reboot.'
else
echo 'Error: Input out of range (512-4096). Running again.'
@ -76,3 +76,6 @@ resize-zram:
echo 'Error: Input is not an integer. Running again.'
just resize-zram
fi
_auth:
kdialog --password "Please enter your password: "