Skip to content

Commit

Permalink
Add launcherctl config (#371)
Browse files Browse the repository at this point in the history
* Add launcherctl config

* Update package

* Update system-service.pro

* Add rm2display.ipk
  • Loading branch information
Eeems authored Jun 29, 2024
1 parent e431d9e commit 3c6f886
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
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

0 comments on commit 3c6f886

Please sign in to comment.