diff --git a/.config/ags/config.js b/.config/ags/config.js index e69de29..ce201a8 100644 --- a/.config/ags/config.js +++ b/.config/ags/config.js @@ -0,0 +1,20 @@ +function Bar(monitor = 0) { + const myLabel = Widget.Label({ + label: 'some example content', + }) + + return Widget.Window({ + monitor, + name: `bar${monitor}`, // this name has to be unique + anchor: ['top', 'left', 'right'], + child: myLabel, + }) +} + +App.config({ + windows: [ + Bar(0), // can be instantiated for each monitor + Bar(1), + Bar(2), + ], +}) diff --git a/flake.lock b/flake.lock index 9b6a202..1fcc065 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "ags": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715703984, + "narHash": "sha256-0BZkMui6aCqswMCouvp0G90tAxDOxVnxTvG6TDZsDaI=", + "owner": "Aylur", + "repo": "ags", + "rev": "11150225e62462bcd431d1e55185e810190a730a", + "type": "github" + }, + "original": { + "owner": "Aylur", + "repo": "ags", + "type": "github" + } + }, "anyrun": { "inputs": { "flake-parts": "flake-parts", @@ -614,6 +634,7 @@ }, "root": { "inputs": { + "ags": "ags", "anyrun": "anyrun", "emacs": "emacs", "eww": "eww", diff --git a/flake.nix b/flake.nix index d70cc4e..285c623 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,10 @@ url = "github:elkowar/eww"; inputs.nixpkgs.follows = "nixpkgs"; }; + ags = { + url = "github:Aylur/ags"; + inputs.nixpkgs.follows = "nixpkgs"; + }; emacs = { url = "github:nix-community/emacs-overlay"; inputs.nixpkgs.follows = "nixpkgs"; @@ -56,6 +60,7 @@ nix-bitcoin, libre-presenter, eww, + ags, rust-overlay, ... }: let system = "x86_64-linux"; @@ -101,6 +106,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit ags; }; home-manager.users.chris = import ./home/home.nix; } ]; diff --git a/home/home.nix b/home/home.nix index fec6828..804ab96 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, ags, ... }: let laptop = builtins.readFile "/etc/hostname" == "syl\n"; @@ -6,6 +6,7 @@ in { imports = [ ./modules/hyprland.nix + ags.homeManagerModules.default ]; # Home Manager needs a bit of information about you and the # paths it should manage. @@ -183,6 +184,9 @@ in source = ../.config/mpv; }; + home.file.".config/ags" = { + source = ../.config/ags; + }; # services.kdeconnect.enable = true; services = { @@ -654,6 +658,15 @@ tooltip label { source = ../.config/fish/functions; }; + programs.ags = { + enable = true; + extraPackages = with pkgs; [ + gtksourceview + webkitgtk + accountsservice + ]; + }; + programs.fish = { enable = true; interactiveShellInit = ''