This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
generated from blue-build/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: opentabletdriver setup + kde-wallpaper-engine
- Loading branch information
1 parent
26cfeab
commit fbc2a58
Showing
12 changed files
with
97 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: script-nu | ||
scripts: | ||
- kde-wallpaper-engine.nu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
use lib/std.nu [user_prompt, fancy_prompt_message] | ||
use lib/distrobox.nu [DISTROBOX_DOWNLOAD_URL, distroboxes] | ||
|
||
const opentabletdriver_service = " | ||
[Unit] | ||
Description=OpenTabletDriver Daemon | ||
PartOf=graphical-session.target | ||
After=graphical-session.target | ||
ConditionEnvironment=|WAYLAND_DISPLAY | ||
ConditionEnvironment=|DISPLAY | ||
[Service] | ||
ExecStart=/usr/bin/distrobox-enter -n archbox -- ' /usr/bin/otd-daemon' | ||
Restart=always | ||
RestartSec=3 | ||
[Install] | ||
WantedBy=graphical-session.target | ||
" | ||
|
||
# Setup Atomic Studio supported apps | ||
export def "main setup" [] { | ||
echo "Usage setup <subcommand>." | ||
} | ||
|
||
# Install Davinci Resolve in a compatible distrobox | ||
export def "main setup opentabletdriver" [ | ||
--yes (-y) # Skip all confirmation prompts | ||
] { | ||
if (which distrobox | length) == 0 { | ||
fancy_prompt_message "Distrobox" | ||
if not (user_prompt $yes) { | ||
return | ||
} | ||
curl -s $DISTROBOX_DOWNLOAD_URL | pkexec sh | ||
} | ||
|
||
let archbox_entry = ($distroboxes | select aliases name image | where aliases == arch).0 | ||
|
||
try { distrobox ls | grep ($archbox_entry.name) } catch { | ||
fancy_prompt_message "The Arch Linux subsystem" | ||
if not (user_prompt $yes) { | ||
return | ||
} | ||
distrobox create -i $archbox_entry.image --name $archbox_entry.name -Y --pull | ||
} | ||
|
||
distrobox enter -n $archbox_entry.name -- ' paru -S opentabletdriver --noconfirm' | ||
mkdir $"($env.HOME)/.config/systemd/user" | ||
try { rm -f $"($env.HOME)/.config/systemd/user/($archbox_entry.name)-opentabletdriver.service" } catch { } | ||
|
||
$opentabletdriver_service | save -f $"($env.HOME)/.config/systemd/user/($archbox_entry.name)-opentabletdriver.service" | ||
|
||
systemctl --user daemon-reload | ||
systemctl enable --user --now $"($archbox_entry.name)-opentabletdriver.service" | ||
|
||
distrobox enter -n $archbox_entry.name -- 'distrobox-export --app otd-gui' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env -S nu | ||
let FEDORA_MAJOR_VERSION = (run-external --redirect-combine rpm '-E' '%fedora' | complete).stdout | ||
const COPR_FILE = "/etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo" | ||
|
||
http get $"https://copr.fedorainfracloud.org/coprs/kylegospo/wallpaper-engine-kde-plugin/repo/fedora-($FEDORA_MAJOR_VERSION)/kylegospo-wallpaper-engine-kde-plugin-fedora-($FEDORA_MAJOR_VERSION).repo" | save -f $COPR_FILE | ||
|
||
rpm-ostree install wallpaper-engine-kde-plugin | ||
|
||
rm -f $COPR_FILE | ||
|
||
git clone https://github.com/catsout/wallpaper-engine-kde-plugin.git --depth 1 /tmp/wallpaper-engine-kde-plugin && \ | ||
|
||
kpackagetool5 --type=Plasma/Wallpaper --global --install /tmp/wallpaper-engine-kde-plugin/plugin | ||
|
||
rm -rf /tmp/wallpaper-engine-kde-plugin |