Compare commits

..

No commits in common. "1e8e3742f6433bc2799ff711d35a42a997ba2ba2" and "d34ce8f4b23ae7f63b316c845d040658b034bd22" have entirely different histories.

17 changed files with 0 additions and 412 deletions

View File

@ -1,47 +1,5 @@
{ {
"nodes": { "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": { "base16": {
"inputs": { "inputs": {
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
@ -302,7 +260,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"ags": "ags",
"elephant": "elephant", "elephant": "elephant",
"home-manager": "home-manager", "home-manager": "home-manager",
"install-system": "install-system", "install-system": "install-system",

View File

@ -18,11 +18,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
elephant = { elephant = {
url = "github:abenz1267/elephant/master"; url = "github:abenz1267/elephant/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@ -1,2 +0,0 @@
node_modules/
@girs/

View File

@ -1,10 +0,0 @@
import app from "ags/gtk4/app"
import style from "./style.scss"
import Bar from "./widget/Bar"
app.start({
css: style,
main() {
app.get_monitors().map(Bar)
},
})

View File

@ -1,57 +0,0 @@
{
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"
];
};
}

View File

@ -1,21 +0,0 @@
declare const SRC: string
declare module "inline:*" {
const content: string
export default content
}
declare module "*.scss" {
const content: string
export default content
}
declare module "*.blp" {
const content: string
export default content
}
declare module "*.css" {
const content: string
export default content
}

View File

@ -1,70 +0,0 @@
{
"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": 1782062955,
"narHash": "sha256-FGZHls4eQJ8y3pvf5h3b83PfXlve3vD/Gj3g1qoAK6o=",
"owner": "aylur",
"repo": "astal",
"rev": "11842ae3045c1367fb3a62a2302dba0d9ccb4a33",
"type": "github"
},
"original": {
"owner": "aylur",
"repo": "astal",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1782467914,
"narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e73de5be04e0eff4190a1432b946d469c794e7b4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"ags": "ags",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,74 +0,0 @@
{
description = "My Awesome Desktop Shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
ags,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pname = "my-shell";
entry = "app.ts";
astalPackages = with ags.packages.${system}; [
io
astal4 # or astal3 for gtk3
battery
powerprofiles
# notifd tray wireplumber
];
extraPackages =
astalPackages
++ [
pkgs.libadwaita
pkgs.libsoup_3
];
in {
packages.${system} = {
default = pkgs.stdenv.mkDerivation {
name = pname;
src = ./.;
nativeBuildInputs = with pkgs; [
wrapGAppsHook3
gobject-introspection
ags.packages.${system}.default
];
buildInputs = extraPackages ++ [pkgs.gjs];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share
cp -r * $out/share
ags bundle ${entry} $out/bin/${pname} -d "SRC='$out/share'"
runHook postInstall
'';
};
};
devShells.${system} = {
default = pkgs.mkShell {
buildInputs = [
(ags.packages.${system}.default.override {
inherit extraPackages;
})
];
};
};
};
}

View File

@ -1,10 +0,0 @@
{
"dependencies": {
"ags": "*",
"gnim": "*"
},
"prettier": {
"semi": false,
"tabWidth": 2
}
}

View File

@ -1,20 +0,0 @@
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss
$fg-color: #{"@theme_fg_color"};
$bg-color: #{"@theme_bg_color"};
window.Bar {
background: transparent;
color: $fg-color;
font-weight: bold;
> centerbox {
background: $bg-color;
border-radius: 10px;
margin: 8px;
}
button {
border-radius: 8px;
margin: 2px;
}
}

View File

@ -1,14 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"strict": true,
"module": "ES2022",
"target": "ES2020",
"lib": ["ES2023"],
"moduleResolution": "Bundler",
// "checkJs": true,
// "allowJs": true,
"jsx": "react-jsx",
"jsxImportSource": "ags/gtk4"
}
}

View File

@ -1,33 +0,0 @@
import app from "ags/gtk4/app"
import { Astal, Gtk, Gdk } from "ags/gtk4"
import { createPoll } from "ags/time"
import BatteryWidget from "./Battery";
export default function Bar(gdkmonitor: Gdk.Monitor) {
const time = createPoll("", 1000, "date '+%a %b %d %l:%M:%S %p'");
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;
return (
<window
visible
name="bar"
class="Bar"
gdkmonitor={gdkmonitor}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
anchor={TOP | LEFT | RIGHT}
application={app}
>
<centerbox cssName="centerbox">
<menubutton $type="center" hexpand halign={Gtk.Align.CENTER}>
<label label={time} />
<popover>
<Gtk.Calendar />
</popover>
</menubutton>
<box $type="end">
<BatteryWidget />
</box>
</centerbox>
</window>
)
}

View File

@ -1,36 +0,0 @@
import AstalBattery from "gi://AstalBattery";
import AstalPowerProfiles from "gi://AstalPowerProfiles";
import { createBinding } from "ags";
import { Gtk } from "ags/gtk4";
export default function BatteryWidget() {
const battery = AstalBattery.get_default()
const powerprofiles = AstalPowerProfiles.get_default()
const percent = createBinding(
battery,
"percentage",
)((p) => `${Math.floor(p * 100)}%`)
const setProfile = (profile: string) => {
powerprofiles.set_active_profile(profile)
}
return (
<menubutton visible={createBinding(battery, "isPresent")}>
<box>
<image iconName={createBinding(battery, "iconName")} />
<label label={percent} />
</box>
<popover>
<box orientation={Gtk.Orientation.VERTICAL}>
{powerprofiles.get_profiles().map(({ profile }) => (
<button onClicked={() => setProfile(profile)}>
<label label={profile} xalign={0} />
</button>
))}
</box>
</popover>
</menubutton>
)
}

View File

@ -3,7 +3,6 @@
}: }:
{ {
imports = [ imports = [
./ags
./direnv.nix ./direnv.nix
./discord.nix ./discord.nix
./firefox.nix ./firefox.nix

View File

@ -1,13 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.ags = {
enable = mkEnableOption {
default = false;
description = "Enable the AGS shell";
};
};
}

View File

@ -3,7 +3,6 @@
}: }:
{ {
imports = [ imports = [
./ags.nix
./discord.nix ./discord.nix
./display.nix ./display.nix
./gnomeBoxes.nix ./gnomeBoxes.nix

View File

@ -15,8 +15,6 @@
modules.localsend.enable = true; modules.localsend.enable = true;
modules.ags.enable = true;
modules.zsh.enable = true; modules.zsh.enable = true;
modules.shell.defaultShell = "zsh"; modules.shell.defaultShell = "zsh";