Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add launcherctl config #371

Merged
merged 4 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
wget https://github.com/Eeems-Org/sysfs_preload/releases/download/1.0.0/packages.zip -O /tmp/packages.zip
unzip /tmp/packages.zip -d /tmp
opkg install /tmp/rmall/sysfs_preload_1.0.0-1_rmall.ipk
wget https://github.com/timower/rM2-stuff/releases/download/v0.1.2/rm2display.ipk -O /tmp/rm2display.ipk
opkg install /tmp/rm2display.ipk
echo "src/gz local-rmall file:///opt/tmp/src" > /opt/etc/opkg.conf.d/16-local.conf
run: |
set -ex
Expand Down
4 changes: 4 additions & 0 deletions applications/system-service/system-service.pro
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ keyd.files = ../../assets/opt/etc/keyd/oxide.conf
keyd.path = /opt/etc/keyd/
INSTALLS += keyd

launcherctl.files = ../../assets/opt/share/launcherctl/oxide
launcherctl.path = /opt/share/launcherctl/
INSTALLS += launcherctl

applications.files = ../../assets/opt/usr/share/applications/xochitl.oxide
applications.path = /opt/usr/share/applications/
INSTALLS += applications
Expand Down
57 changes: 57 additions & 0 deletions assets/opt/share/launcherctl/oxide
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
set -e
case "$1" in
is-active)
systemctl is-active --quiet tarnish.service
;;
is-enabled)
systemctl is-enabled --quiet tarnish.service
;;
logs)
if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then
journalctl --follow --all --unit tarnish.service
else
journalctl --no-pager --all --unit tarnish.service
fi
;;
start)
systemctl start tarnish.service
;;
stop)
systemctl stop tarnish.service
;;
enable)
systemctl enable tarnish.service
;;
disable)
systemctl disable tarnish.service
;;
apps)
rot apps get applications | jq -r 'keys | .[]'
;;
running)
rot apps get runningApplications | jq -r 'keys | .[]'
;;
paused)
rot apps get pausedApplications | jq -r 'keys | .[]'
;;
launch | resume)
rot apps get applications \
| jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \
| xargs -I {} rot --object Application:{} apps call launch
;;
close)
rot apps get applications \
| jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \
| xargs -I {} rot --object Application:{} apps call stop
;;
pause)
rot apps get applications \
| jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \
| xargs -I {} rot --object Application:{} apps call pause
;;
*)
echo "Oxide does not support this method"
exit 1
;;
esac
2 changes: 2 additions & 0 deletions package
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ oxide() {
# Task switcher
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/corrupt
install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.corrupt.oxide
# launcherctl registration
install -D -T -m 755 "$srcdir"/release/opt/share/launcherctl/oxide "$pkgdir"/opt/share/launcherctl/oxide
}

configure() {
Expand Down