diff --git a/devices/wim/config/ags/js/webkit.js b/devices/wim/config/ags/js/webkit.js new file mode 100644 index 00000000..78de0b27 --- /dev/null +++ b/devices/wim/config/ags/js/webkit.js @@ -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], + }), + }); +}; diff --git a/modules/ags/default.nix b/modules/ags/default.nix index 95c15dac..7e4dccf0 100644 --- a/modules/ags/default.nix +++ b/modules/ags/default.nix @@ -24,7 +24,10 @@ in { enable = true; configDir = symlink "${config.vars.configDir}/ags"; package = ags.packages.${pkgs.system}.default; - extraPackages = [pkgs.libgudev]; + extraPackages = with pkgs; [ + libgudev + webkitgtk + ]; }; home.packages =