feat(ags): add webkit proof of concept

This commit is contained in:
matt1432 2023-12-09 10:25:11 -05:00
parent 75842b6e11
commit c6cd289046
2 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,25 @@
import { Widget, Box } from 'resource:///com/github/Aylur/ags/widget.js';
import WebKit2 from 'gi://WebKit2';
import PopupWindow from './misc/popup.js';
const WebView = Widget.subclass(WebKit2.WebView);
export default () => {
const view = WebView({
hexpand: true,
});
view.load_uri('https://search.nixos.org');
return PopupWindow({
name: 'browser',
visible: true,
focusable: true,
layer: 'top',
child: Box({
css: 'min-height: 600px; min-width: 800px;',
children: [view],
}),
});
};

View file

@ -24,7 +24,10 @@ in {
enable = true; enable = true;
configDir = symlink "${config.vars.configDir}/ags"; configDir = symlink "${config.vars.configDir}/ags";
package = ags.packages.${pkgs.system}.default; package = ags.packages.${pkgs.system}.default;
extraPackages = [pkgs.libgudev]; extraPackages = with pkgs; [
libgudev
webkitgtk
];
}; };
home.packages = home.packages =