diff --git a/flake.nix b/flake.nix index 5b4dfbf..797804d 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,6 @@ }; niri.url = "github:sodiboo/niri-flake"; - ags.url = "github:Aylur/ags"; nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; }; @@ -25,7 +24,6 @@ home-manager, stylix, niri, - ags, nix-vscode-extensions, ... }: diff --git a/homeManagerModules/niri/ags/.gitignore b/homeManagerModules/niri/ags/.gitignore deleted file mode 100644 index 6850183..0000000 --- a/homeManagerModules/niri/ags/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -@girs/ -node_modules/ \ No newline at end of file diff --git a/homeManagerModules/niri/ags/ags.nix b/homeManagerModules/niri/ags/ags.nix deleted file mode 100644 index 40530dd..0000000 --- a/homeManagerModules/niri/ags/ags.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ inputs, pkgs, ... }: -{ - programs.ags = { - enable = true; - - configDir = ../ags; - - # additional packages to add to gjs's runtime - extraPackages = [ - inputs.ags.packages.${pkgs.system}.battery - inputs.ags.packages.${pkgs.system}.mpris - inputs.ags.packages.${pkgs.system}.wireplumber - inputs.ags.packages.${pkgs.system}.network - inputs.ags.packages.${pkgs.system}.tray - ]; - }; - - home.packages = [ - inputs.ags.packages.${pkgs.system}.io - inputs.ags.packages.${pkgs.system}.battery - inputs.ags.packages.${pkgs.system}.mpris - inputs.ags.packages.${pkgs.system}.wireplumber - inputs.ags.packages.${pkgs.system}.network - inputs.ags.packages.${pkgs.system}.tray - ]; -} diff --git a/homeManagerModules/niri/ags/app.ts b/homeManagerModules/niri/ags/app.ts deleted file mode 100644 index 2561bba..0000000 --- a/homeManagerModules/niri/ags/app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { App } from "astal/gtk3"; -import style from "./style.scss"; -import Bar from "./widget/Bar"; - -App.start({ - css: style, - instanceName: "js", - requestHandler(request, res) { - print(request); - res("ok"); - }, - main: () => App.get_monitors().map(Bar), -}); \ No newline at end of file diff --git a/homeManagerModules/niri/ags/env.d.ts b/homeManagerModules/niri/ags/env.d.ts deleted file mode 100644 index 831bffe..0000000 --- a/homeManagerModules/niri/ags/env.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -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; -} diff --git a/homeManagerModules/niri/ags/style.scss b/homeManagerModules/niri/ags/style.scss deleted file mode 100644 index 8830a32..0000000 --- a/homeManagerModules/niri/ags/style.scss +++ /dev/null @@ -1,88 +0,0 @@ -$bg: #212223; -$fg: #f1f1f1; -$accent: #378DF7; -$radius: 7px; - -window.Bar { - border: none; - box-shadow: none; - background-color: $bg; - color: $fg; - font-size: 1.1em; - font-weight: bold; - - button { - all: unset; - background-color: transparent; - - &:hover label { - background-color: transparentize($fg, 0.84); - border-color: transparentize($accent, 0.8); - } - - &:active label { - background-color: transparentize($fg, 0.8) - } - } - - label { - transition: 200ms; - padding: 0 8px; - margin: 2px; - border-radius: $radius; - border: 1pt solid transparent; - } - - .Workspaces .focused label { - color: $accent; - border-color: $accent; - } - - .FocusedClient { - color: $accent; - } - - .Media .Cover { - min-height: 1.2em; - min-width: 1.2em; - border-radius: $radius; - background-position: center; - background-size: contain; - } - - .Battery label { - padding-left: 0; - margin-left: 0; - } - - .AudioSlider { - * { - all: unset; - } - - icon { - margin-right: .6em; - } - - margin: 0 1em; - - trough { - background-color: transparentize($fg, 0.8); - border-radius: $radius; - } - - highlight { - background-color: $accent; - min-height: .8em; - border-radius: $radius; - } - - slider { - background-color: $fg; - border-radius: $radius; - min-height: 1em; - min-width: 1em; - margin: -.2em; - } - } -} \ No newline at end of file diff --git a/homeManagerModules/niri/ags/tsconfig.json b/homeManagerModules/niri/ags/tsconfig.json deleted file mode 100644 index c4c90c5..0000000 --- a/homeManagerModules/niri/ags/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "experimentalDecorators": true, - "strict": true, - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "Bundler", - // "checkJs": true, - // "allowJs": true, - "jsx": "react-jsx", - "jsxImportSource": "/home/fedfer/.local/share/ags/gtk3", - "paths": { - "astal": [ - "/home/fedfer/.local/share/ags" - ], - "astal/*": [ - "/home/fedfer/.local/share/ags/*" - ] - }, - } -} diff --git a/homeManagerModules/niri/ags/widget/Bar.tsx b/homeManagerModules/niri/ags/widget/Bar.tsx deleted file mode 100644 index bb20789..0000000 --- a/homeManagerModules/niri/ags/widget/Bar.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import { App } from "astal/gtk3"; -import { Variable, GLib, bind } from "astal"; -import { Astal, Gtk, Gdk } from "astal/gtk3"; -import Mpris from "gi://AstalMpris"; -import Battery from "gi://AstalBattery"; -import Wp from "gi://AstalWp"; -import Network from "gi://AstalNetwork"; -import Tray from "gi://AstalTray"; - -function SysTray() { - const tray = Tray.get_default(); - - return - {bind(tray, "items").as(items => items.map(item => { - if (item.iconThemePath) - App.add_icons(item.iconThemePath); - - const menu = item.create_menu(); - - return ; - }))} - ; -} - -function Wifi() { - const { wifi } = Network.get_default(); - - return ; -} - -function AudioSlider() { - const speaker = Wp.get_default()?.audio.defaultSpeaker!; - - return - - speaker.volume = value} - value={bind(speaker, "volume")} - /> - ; -} - -function BatteryLevel() { - const bat = Battery.get_default(); - - return - - ; -} - -function Media() { - const mpris = Mpris.get_default(); - - return - {bind(mpris, "players").as(ps => ps[0] ? ( - - - `background-image: url('${cover}');` - )} - /> - - ) : ( - "Nothing Playing" - ))} - ; -} - -function Time({ format = "%H:%M - %A %e." }) { - const time = Variable("").poll(1000, () => - GLib.DateTime.new_now_local().format(format)!); - - return