Skip to content

Commit

Permalink
Merge branch 'ublue-os:main' into uupd
Browse files Browse the repository at this point in the history
  • Loading branch information
inffy authored Jan 31, 2025
2 parents 5fba28f + 64f98ce commit c18c844
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions just/aurora-apps.just
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,39 @@ install-openrazer-frontend:
incus:
@ujust install-incus
# Install OpenTabletDriver
# Install OpenTabletDriver, an open source, cross-platform, user-mode tablet driver
[group('Apps')]
install-opentabletdriver:
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
echo "Installing OpenTabletDriver..."
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && \
flatpak --system install -y flathub net.opentabletdriver.OpenTabletDriver && \
mkdir -p $HOME/.config/OpenTabletDriver && \
flatpak override --user --filesystem=xdg-config/OpenTabletDriver net.opentabletdriver.OpenTabletDriver && \
mkdir -p $HOME/.config/systemd/user && \
curl -s https://raw.githubusercontent.com/flathub/net.opentabletdriver.OpenTabletDriver/refs/heads/master/scripts/opentabletdriver.service > $HOME/.config/systemd/user/opentabletdriver.service && \
systemctl --user daemon-reload && \
systemctl enable --user --now opentabletdriver.service
echo "Installer for OpenTabletDriver..."
echo "${bold}Install or Remove OpenTabletDriver${normal}"
OPTION=$(Choose "Install" "Uninstall" "Exit")
if [[ "${OPTION,,}" =~ ^install ]]; then
echo "Installing OpenTabletDriver..."
curl -s https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases/latest \
| jq -r '.assets | sort_by(.created_at) | .[] | select (.name|test("opentabletdriver.*tar.gz$")) | .browser_download_url' \
| wget -qi - -O /tmp/OpenTabletDriver/opentabletdriver.tar.gz && \
tar --strip-components=1 -xvzf /tmp/OpenTabletDriver/opentabletdriver.tar.gz -C /tmp/OpenTabletDriver && \
pkexec cp /tmp/OpenTabletDriver/etc/udev/rules.d/70-opentabletdriver.rules /etc/udev/rules.d/71-opentabletdriver.rules && \
rm -rf /tmp/OpenTabletDriver && \
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && \
flatpak --system install -y flathub net.opentabletdriver.OpenTabletDriver && \
mkdir -p $HOME/.config/OpenTabletDriver && \
flatpak override --user --filesystem=xdg-config/OpenTabletDriver net.opentabletdriver.OpenTabletDriver && \
mkdir -p $HOME/.config/systemd/user && \
curl -s https://raw.githubusercontent.com/flathub/net.opentabletdriver.OpenTabletDriver/refs/heads/master/scripts/opentabletdriver.service > $HOME/.config/systemd/user/opentabletdriver.service && \
systemctl --user daemon-reload && \
systemctl enable --user --now opentabletdriver.service
elif [[ "${OPTION,,}" =~ ^uninstall ]]; then
echo "Uninstalling OpenTabletDriver..."
pkexec rm /etc/udev/rules.d/71-opentabletdriver.rules && \
flatpak --system remove -y flathub net.opentabletdriver.OpenTabletDriver
else
echo "Have a good day :)!"
fi
# Install and configure Incus
[group('Apps')]
Expand Down

0 comments on commit c18c844

Please sign in to comment.