change eww to ags

This commit is contained in:
JuliaLange 2024-02-16 21:32:55 -08:00
parent 7b32e3330c
commit 48c4277b9d
7 changed files with 144 additions and 16 deletions

86
flake.lock generated
View file

@ -1,5 +1,23 @@
{
"nodes": {
"ags": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1708045757,
"narHash": "sha256-UDFJzw2MJcd4oHk+xOPkmyM3u+UwrNuKBFsKAVQaoQQ=",
"owner": "Aylur",
"repo": "ags",
"rev": "4ac0dbb473918eda325143c2053bdd428f9708d4",
"type": "github"
},
"original": {
"owner": "Aylur",
"repo": "ags",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -23,17 +41,17 @@
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"systems": "systems",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1705782792,
"narHash": "sha256-AnNvfQK3BQtri7JUmTsaAWAOBzCxEf5t3VaGm0Kezjk=",
"lastModified": 1708138027,
"narHash": "sha256-xTOrKOamqdVtW+v7j0bUTed8nqfijEMahJ7edgFtWL0=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "4d403dac3244aab217fb9bf17a68e9a009fcadd8",
"rev": "cdcc5aba06f20005842cf966b23af50456dc7142",
"type": "github"
},
"original": {
@ -42,6 +60,26 @@
"type": "github"
}
},
"hyprland-contrib": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1706198673,
"narHash": "sha256-bHlxFd+3QHy6eXtTzzhwVNcyxBSOxTvBuJGNUzI4C4M=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "16884001b26e6955ff4b88b4dfe4c8986e20f153",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "contrib",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
@ -91,11 +129,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1705133751,
"narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=",
"lastModified": 1705496572,
"narHash": "sha256-rPIe9G5EBLXdBdn9ilGc0nq082lzQd0xGGe092R/5QE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b19f5e77dd906cb52dade0b7bd280339d2a1f3d",
"rev": "842d9d80cfd4560648c785f8a4e6f3b096790e19",
"type": "github"
},
"original": {
@ -106,6 +144,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1707546158,
"narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1701902328,
"narHash": "sha256-3tiiSEgQRPps0aV40belvLk1k4Max7oRh/+hZGLtfGc=",
@ -123,9 +177,11 @@
},
"root": {
"inputs": {
"ags": "ags",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2"
"hyprland-contrib": "hyprland-contrib",
"nixpkgs": "nixpkgs_3"
}
},
"systems": {
@ -147,18 +203,18 @@
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1703963193,
"narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=",
"lastModified": 1706359063,
"narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "f81c3d93cd6f61b20ae784297679283438def8df",
"rev": "00b869c1a96f300a8f25da95d624524895e0ddf2",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "f81c3d93cd6f61b20ae784297679283438def8df",
"rev": "00b869c1a96f300a8f25da95d624524895e0ddf2",
"type": "gitlab"
}
},
@ -179,11 +235,11 @@
]
},
"locked": {
"lastModified": 1704659450,
"narHash": "sha256-3lyoUVtUWz1LuxbltAtkJSK2IlVXmKhxCRU2/0PYCms=",
"lastModified": 1706521509,
"narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "6a5de92769d5b7038134044053f90e7458f6a197",
"rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8",
"type": "github"
},
"original": {

View file

@ -15,6 +15,7 @@
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
ags.url = "github:Aylur/ags";
};
outputs = { nixpkgs, home-manager, hyprland, ... }@inputs:

View file

@ -6,10 +6,11 @@
home.homeDirectory = "/home/pan";
imports = [
# ./programs/eww
./programs/ags
./programs/alacritty
./programs/discord
./programs/dunst
./programs/eww
./programs/fish
./programs/git
./programs/hypr

View file

@ -0,0 +1,7 @@
import { Switch } from "./modules/workspace-switch.js";
export default {
windows: [
Switch(1)
]
}

View file

@ -0,0 +1,22 @@
export const Clock = (monitor = 0) => {
return Widget.Window({
monitor,
name: `switch${monitor}`,
anchor: ['top', 'left', 'right'],
margins: [864, 1030],
css: 'background: transparent;',
child: container,
});
};
const container = Widget.Box({
css: `
min-height: 110px;
min-width: 500px;
border: 4px solid #f4d80a;
border-radius: 50px;
margin: 3px;
box-shadow: 0 0 0 3px white;
`,
});

View file

@ -0,0 +1,22 @@
export const Switch = (monitor = 0) => {
return Widget.Window({
monitor,
name: `switch${monitor}`,
anchor: ['top', 'left', 'right'],
margins: [864, 1030],
css: 'background: transparent;',
child: container,
});
};
const container = Widget.Box({
css: `
min-height: 110px;
min-width: 500px;
border: 4px solid #f4d80a;
border-radius: 50px;
margin: 3px;
box-shadow: 0 0 0 3px white;
`,
});

19
programs/ags/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ inputs, pkgs, ... }:
{
# add the home manager module
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags = {
enable = true;
# null or path, leave as null if you don't want hm to manage the config
configDir = ./config;
# additional packages to add to gjs's runtime
extraPackages = with pkgs; [
gtksourceview
webkitgtk
accountsservice
];
};
}