Skip to content

Commit

Permalink
Fix dbazza#1: don't freeze with Wayland
Browse files Browse the repository at this point in the history
Don't block the shell when showing the terminal with the status of the
OneDrive service.

Additionally launch gnome-terminal not from a command line call, but as
an app.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
  • Loading branch information
Silvanoc committed Mar 28, 2022
1 parent 3504fac commit aa19f27
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ class Indicator extends PanelMenu.Button {
this.itemLogin = itemLogin;

let itemStatus = new PopupMenu.PopupMenuItem(_('Show service status'));
let app = Gio.AppInfo.create_from_commandline(
"systemctl --user status onedrive",
null,
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION |
Gio.AppInfoCreateFlags.NEEDS_TERMINAL);
itemStatus.connect('activate', () => {

GLib.spawn_command_line_sync(
'gnome-terminal --tab --title="Status" --command=\"systemctl --user status onedrive\"');
app.launch([], global.create_app_launch_context(0, -1));
});
this.menu.addMenuItem(itemStatus);

Expand Down

0 comments on commit aa19f27

Please sign in to comment.