fix(ags applauncher): only execute the actual executable

This commit is contained in:
matt1432 2023-11-02 16:49:38 -04:00
parent cd876745e7
commit ba571f697e

View file

@ -2,7 +2,7 @@ import App from 'resource:///com/github/Aylur/ags/app.js';
import Applications from 'resource:///com/github/Aylur/ags/service/applications.js'; import Applications from 'resource:///com/github/Aylur/ags/service/applications.js';
import { Label, Box, Icon, Button, Scrollable, Entry } from 'resource:///com/github/Aylur/ags/widget.js'; import { Label, Box, Icon, Button, Scrollable, Entry } from 'resource:///com/github/Aylur/ags/widget.js';
import { exec } from 'resource:///com/github/Aylur/ags/utils.js'; import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
import Separator from '../misc/separator.js'; import Separator from '../misc/separator.js';
import PopupWindow from '../misc/popup.js'; import PopupWindow from '../misc/popup.js';
@ -23,7 +23,7 @@ const AppItem = (app, window) => {
className: 'app', className: 'app',
connections: [['clicked', () => { connections: [['clicked', () => {
App.closeWindow(window); App.closeWindow(window);
exec(`hyprctl dispatch exec ${app.executable}`); execAsync(['hyprctl', 'dispatch', 'exec', app.executable.split(' ')[0]]);
// TODO: focus on new client. Is this only needed after launch? // TODO: focus on new client. Is this only needed after launch?
++app.frequency; ++app.frequency;
}]], }]],