Skip to content

Commit

Permalink
feat: add opentablet just recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamyukii committed Jan 31, 2025
1 parent 841d877 commit bbbdc98
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions just/bluefin-apps.just
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,40 @@ install-jetbrains-toolbox:
incus:
@ujust install-incus


# 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 "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')]
install-incus:
Expand Down

0 comments on commit bbbdc98

Please sign in to comment.