adding ags stuff

This commit is contained in:
Chris Cochrun 2024-06-17 11:25:35 -05:00
parent 88dbdc172a
commit 1599875a5c
7 changed files with 142 additions and 14 deletions

View file

@ -0,0 +1,8 @@
(ns ags-config)
(defn bar [monitor]
(let [my-label (Widget.Label.
(clj->js {
:label "some example content"
}))])
)

20
.config/ags/config.js.bak Normal file
View file

@ -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),
],
})

1
.config/ags/deps.edn Normal file
View file

@ -0,0 +1 @@
{:deps {org.clojure/clojurescript {:mvn/version "1.11.54"}}}

61
.config/ags/flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1718318537,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -7,19 +7,35 @@
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, ... }:
{
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
outputs = inputs: with inputs;
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
};
nativeBuildInputs = with pkgs; [
];
buildInputs = with pkgs; [
stdenv
clojure
clojure-lsp
clj-kondo
leiningen
];
nativeLibs = with pkgs; [
];
in rec
{
devShell = pkgs.mkShell {
nativeBuildInputs = nativeBuildInputs;
buildInputs = buildInputs;
nativeLibs = nativeLibs;
};
in rec
{
devShell = import ./shell.nix { inherit pkgs; };
defaultPackage = pkgs.libsForQt5.callPackage ./default.nix { };
}
);
};
defaultPackage = pkgs.libsForQt5.callPackage ./default.nix { };
}
);
}

14
.config/ags/project.clj Normal file
View file

@ -0,0 +1,14 @@
(defproject ags-config "0.0.1"
:dependencies [[org.clojure/clojurescript "1.11.54"]
[org.clojure/clojure "1.11.3"]]
:plugins [[lein-cljsbuild "1.1.8"]]
:cljsbuild {
:builds [{
; The path to the top-level ClojureScript source directory:
:source-paths ["src"]
; The standard ClojureScript compiler options:
; (See the ClojureScript compiler documentation for details.)
:compiler {
:output-to "config.js" ; default: target/cljsbuild-main.js
:optimizations :simple
:pretty-print true}}]})

View file

@ -0,0 +1,8 @@
(ns ags)
(defn bar [monitor]
(let [my-label (Widget.Label.
(clj->js {
:label "some example content"
}))])
)