mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-04-03 01:21:27 +00:00
feat(waydroid): add force waydroid restart shortcut (#2131)
Co-authored-by: Aarron Lee <aarron-lee@users.noreply.github.com>
This commit is contained in:
parent
f636184f50
commit
e1a531cf8d
system_files/desktop/shared/usr
libexec
share
applications
polkit-1
ublue-os/just
3
system_files/desktop/shared/usr/libexec/waydroid-container-restart
Executable file
3
system_files/desktop/shared/usr/libexec/waydroid-container-restart
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
sudo waydroid container restart
|
8
system_files/desktop/shared/usr/share/applications/waydroid-container-restart.desktop
Executable file
8
system_files/desktop/shared/usr/share/applications/waydroid-container-restart.desktop
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Force Restart Waydroid
|
||||||
|
Exec=pkexec /usr/libexec/waydroid-container-restart
|
||||||
|
Categories=X-WayDroid-App;
|
||||||
|
X-Purism-FormFactor=Workstation;Mobile;
|
||||||
|
Icon=waydroid
|
||||||
|
NoDisplay=false
|
@ -28,6 +28,17 @@
|
|||||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/waydroid-container-stop</annotate>
|
<annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/waydroid-container-stop</annotate>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
<action id="org.bazzite.policykit.waydroid.container.restart">
|
||||||
|
<description>Restart Waydroid Container</description>
|
||||||
|
<icon_name>package-x-generic</icon_name>
|
||||||
|
<defaults>
|
||||||
|
<allow_any>yes</allow_any>
|
||||||
|
<allow_inactive>yes</allow_inactive>
|
||||||
|
<allow_active>yes</allow_active>
|
||||||
|
</defaults>
|
||||||
|
<annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/waydroid-container-restart</annotate>
|
||||||
|
</action>
|
||||||
|
|
||||||
<action id="org.bazzite.policykit.waydroid.fix.controllers">
|
<action id="org.bazzite.policykit.waydroid.fix.controllers">
|
||||||
<description>Fix Controllers in Waydroid</description>
|
<description>Fix Controllers in Waydroid</description>
|
||||||
<icon_name>package-x-generic</icon_name>
|
<icon_name>package-x-generic</icon_name>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
polkit.addRule(function(action, subject) {
|
polkit.addRule(function(action, subject) {
|
||||||
if ((action.id == "org.bazzite.policykit.waydroid.container.start" ||
|
if ((action.id == "org.bazzite.policykit.waydroid.container.start" ||
|
||||||
action.id == "org.bazzite.policykit.waydroid.container.stop" ||
|
action.id == "org.bazzite.policykit.waydroid.container.stop" ||
|
||||||
|
action.id == "org.bazzite.policykit.waydroid.container.restart" ||
|
||||||
action.id == "org.bazzite.policykit.waydroid.fix.controllers") &&
|
action.id == "org.bazzite.policykit.waydroid.fix.controllers") &&
|
||||||
subject.isInGroup("wheel")) {
|
subject.isInGroup("wheel")) {
|
||||||
return polkit.Result.YES;
|
return polkit.Result.YES;
|
||||||
|
@ -29,6 +29,7 @@ setup-waydroid ACTION="":
|
|||||||
fi
|
fi
|
||||||
sudo waydroid init -c 'https://ota.waydro.id/system' -v 'https://ota.waydro.id/vendor'
|
sudo waydroid init -c 'https://ota.waydro.id/system' -v 'https://ota.waydro.id/vendor'
|
||||||
sudo restorecon -R /var/lib/waydroid
|
sudo restorecon -R /var/lib/waydroid
|
||||||
|
cp /usr/share/applications/waydroid-container-restart.desktop ~/.local/share/applications
|
||||||
echo "Waydroid has been initialized, please run waydroid once before you Configure Waydroid"
|
echo "Waydroid has been initialized, please run waydroid once before you Configure Waydroid"
|
||||||
elif [[ "${OPTION,,}" =~ ^configure ]]; then
|
elif [[ "${OPTION,,}" =~ ^configure ]]; then
|
||||||
git clone https://github.com/ublue-os/waydroid_script.git --depth 1 /tmp/waydroid_script
|
git clone https://github.com/ublue-os/waydroid_script.git --depth 1 /tmp/waydroid_script
|
||||||
|
Loading…
x
Reference in New Issue
Block a user