Skip to content

Commit

Permalink
feat: Add 'ujust restore-original-terminal' to restore the default te…
Browse files Browse the repository at this point in the history
…rminal for KDE/GNOME that was hidden when we switched to prompt
  • Loading branch information
KyleGospo committed Jan 10, 2024
1 parent db3a110 commit 9529cf2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions system_files/deck/shared/usr/share/ublue-os/just/60-custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ toggle-autologin:
sudo touch $DESKTOP_AUTOLOGIN
fi

# Restore the default Terminal
restore-original-terminal:
#!/usr/bin/bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
rm -f $HOME/.local/share/applications/org.gnome.Terminal.desktop
cp /usr/share/applications/org.gnome.Terminal.desktop $HOME/.local/share/applications/org.gnome.Terminal.desktop
sed -i '/NoDisplay=true/d' $HOME/.local/share/applications/org.gnome.Terminal.desktop
else
rm -f $HOME/.local/share/applications/org.kde.konsole.desktop
cp /usr/share/applications/org.gnome.Terminal.desktop $HOME/.local/share/applications/org.kde.konsole.desktop
sed -i '/NoDisplay=true/d' $HOME/.local/share/applications/org.kde.konsole.desktop
fi

# Remove all waydroid-related files in your user folders
reset-waydroid:
bash -c 'sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid'
Expand Down
15 changes: 15 additions & 0 deletions system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# vim: set ft=make :

# Restore the default Terminal
restore-original-terminal:
#!/usr/bin/bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
rm -f $HOME/.local/share/applications/org.gnome.Terminal.desktop
cp /usr/share/applications/org.gnome.Terminal.desktop $HOME/.local/share/applications/org.gnome.Terminal.desktop
sed -i '/NoDisplay=true/d' $HOME/.local/share/applications/org.gnome.Terminal.desktop
else
rm -f $HOME/.local/share/applications/org.kde.konsole.desktop
cp /usr/share/applications/org.gnome.Terminal.desktop $HOME/.local/share/applications/org.kde.konsole.desktop
sed -i '/NoDisplay=true/d' $HOME/.local/share/applications/org.kde.konsole.desktop
fi

# Remove all waydroid-related files in your user folders
reset-waydroid:
bash -c 'sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid'
Expand Down

0 comments on commit 9529cf2

Please sign in to comment.