feat(ags): add webkit proof of concept
This commit is contained in:
parent
75842b6e11
commit
c6cd289046
2 changed files with 29 additions and 1 deletions
25
devices/wim/config/ags/js/webkit.js
Normal file
25
devices/wim/config/ags/js/webkit.js
Normal 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],
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
};
|
|
@ -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 =
|
||||||
|
|
Loading…
Reference in a new issue