Skip to content

Commit

Permalink
feat(just): Introduce basic GUI auth handler using kdialog
Browse files Browse the repository at this point in the history
Keep things simple and straightforward. This handler can be expanded in the
future for compatibility with GNOME
  • Loading branch information
EyeCantCU committed Jul 18, 2023
1 parent 5b95868 commit dd81374
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
19 changes: 11 additions & 8 deletions system_files/deck/usr/share/ublue-os/just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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.'
Expand Down Expand Up @@ -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.'
Expand All @@ -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: "
13 changes: 8 additions & 5 deletions system_files/desktop/usr/share/ublue-os/just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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.'
Expand All @@ -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: "

0 comments on commit dd81374

Please sign in to comment.