more stuff
This commit is contained in:
parent
e9bd47d83b
commit
1e8e3742f6
43
flake.lock
43
flake.lock
|
|
@ -1,5 +1,47 @@
|
|||
{
|
||||
"nodes": {
|
||||
"ags": {
|
||||
"inputs": {
|
||||
"astal": "astal",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775689345,
|
||||
"narHash": "sha256-tM3s7CX+tgxlYW0Sk3nzVThg2MHn08foIuMxABupxIs=",
|
||||
"owner": "aylur",
|
||||
"repo": "ags",
|
||||
"rev": "bbee2f18939f1ec7ff720e717cf305e73635628f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aylur",
|
||||
"repo": "ags",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"astal": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"ags",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773914523,
|
||||
"narHash": "sha256-GOL+bR30FPImAzy4NNsTMY1gpoINMsLTXR0WJBRSq30=",
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"rev": "41b50290c6a1cdce7b482897c22fe49286912b9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16": {
|
||||
"inputs": {
|
||||
"fromYaml": "fromYaml"
|
||||
|
|
@ -260,6 +302,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"ags": "ags",
|
||||
"elephant": "elephant",
|
||||
"home-manager": "home-manager",
|
||||
"install-system": "install-system",
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
ags = {
|
||||
url = "github:aylur/ags";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
elephant = {
|
||||
url = "github:abenz1267/elephant/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.ags;
|
||||
hyprlandCfg = config.modules.hyprland;
|
||||
|
||||
astalPackages = with inputs.ags.packages.${pkgs.system}; [
|
||||
io
|
||||
astal4
|
||||
battery
|
||||
powerprofiles
|
||||
];
|
||||
|
||||
extraPackages = astalPackages ++ [
|
||||
pkgs.libadwaita
|
||||
pkgs.libsoup_3
|
||||
];
|
||||
|
||||
myShell = pkgs.stdenv.mkDerivation {
|
||||
name = "my-shell";
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
wrapGAppsHook3
|
||||
gobject-introspection
|
||||
inputs.ags.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
buildInputs = extraPackages ++ [ pkgs.gjs ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share
|
||||
cp -r * $out/share
|
||||
ags bundle app.ts $out/bin/my-shell -d "SRC='$out/share'"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ myShell ];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = mkIf hyprlandCfg.enable [
|
||||
"my-shell"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import app from "ags/gtk4/app"
|
||||
import { Astal, Gtk, Gdk } from "ags/gtk4"
|
||||
import { execAsync } from "ags/process"
|
||||
import { createPoll } from "ags/time"
|
||||
import BatteryWidget from "./Battery";
|
||||
|
||||
|
|
@ -19,24 +18,14 @@ export default function Bar(gdkmonitor: Gdk.Monitor) {
|
|||
application={app}
|
||||
>
|
||||
<centerbox cssName="centerbox">
|
||||
<button
|
||||
$type="start"
|
||||
onClicked={() => execAsync("echo hello").then(console.log)}
|
||||
hexpand
|
||||
halign={Gtk.Align.CENTER}
|
||||
>
|
||||
<label label="Welcome to AGS!" />
|
||||
</button>
|
||||
<box $type="center">
|
||||
<menubutton hexpand halign={Gtk.Align.CENTER}>
|
||||
<menubutton $type="center" hexpand halign={Gtk.Align.CENTER}>
|
||||
<label label={time} />
|
||||
<popover>
|
||||
<Gtk.Calendar />
|
||||
</popover>
|
||||
</menubutton>
|
||||
</box>
|
||||
<box $type="end">
|
||||
<BatteryWidget $type="center" />
|
||||
<BatteryWidget />
|
||||
</box>
|
||||
</centerbox>
|
||||
</window>
|
||||
|
|
@ -4,7 +4,7 @@ import { createBinding } from "ags";
|
|||
import { Gtk } from "ags/gtk4";
|
||||
|
||||
export default function BatteryWidget() {
|
||||
const battery = AstalBattery.get_default()
|
||||
const battery = AstalBattery.get_default()
|
||||
const powerprofiles = AstalPowerProfiles.get_default()
|
||||
|
||||
const percent = createBinding(
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
./ags
|
||||
./direnv.nix
|
||||
./discord.nix
|
||||
./firefox.nix
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options.modules.ags = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "Enable the AGS shell";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
./ags.nix
|
||||
./discord.nix
|
||||
./display.nix
|
||||
./gnomeBoxes.nix
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
modules.localsend.enable = true;
|
||||
|
||||
modules.ags.enable = true;
|
||||
|
||||
modules.zsh.enable = true;
|
||||
modules.shell.defaultShell = "zsh";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue