nandi/frqpublic Fork 0
5ba9382
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Name the libcosmic recipe for its backend: `just cosmic run`

`just run` was the only recipe named for the verb rather than for what it
puts on screen, from when it was the only GUI. `just flutter-desktop` is the
other desktop frontend now and neither is the default, so the window's recipe
takes the same shape the other two already have: an action argument, `run`
its only value, and a usage line for anything else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T09:54:42-07:00 Browse files
5ba9382 parent: ed528b2
modified CLAUDE.md +4 -3
@@ -51,10 +51,11 @@ because every backend that APK could paint with is retired.
5151 `just flutter-desktop`, out of `.#flutter-desktop` (the same clojure and
5252 flutter, with cmake, ninja, pkg-config and gtk3 where the JDK and the SDK are).
5353 Impure for the network half of the same reasons and no writable-SDK dance, since
54-nothing writes into the store. nixGL off NixOS, like `just run`.
54+nothing writes into the store. nixGL off NixOS, like `just cosmic run`.
5555
56-So there are two desktop GUIs and they are both first-class: `just run` is
57-libcosmic under jolt, `just flutter-desktop` is Flutter's Linux target over
56+So there are two desktop GUIs and they are both first-class: `just cosmic
57+run` is libcosmic under jolt, `just flutter-desktop` is Flutter's Linux target
58+over
5859 `frq.hiccup`. Same screens out of `common/frq/screens/`, two renderers. jvui and
5960 Vidya were experiments and are gone; libcosmic is a desktop window and does not
6061 cross to a phone, which is what the Flutter half is for.
@@ -51,10 +51,11 @@ because every backend that APK could paint with is retired.
51 `just flutter-desktop`, out of `.#flutter-desktop` (the same clojure and51 `just flutter-desktop`, out of `.#flutter-desktop` (the same clojure and
52 flutter, with cmake, ninja, pkg-config and gtk3 where the JDK and the SDK are).52 flutter, with cmake, ninja, pkg-config and gtk3 where the JDK and the SDK are).
53 Impure for the network half of the same reasons and no writable-SDK dance, since53 Impure for the network half of the same reasons and no writable-SDK dance, since
54-nothing writes into the store. nixGL off NixOS, like `just run`.54+nothing writes into the store. nixGL off NixOS, like `just cosmic run`.
55 55
56-So there are two desktop GUIs and they are both first-class: `just run` is56+So there are two desktop GUIs and they are both first-class: `just cosmic
57-libcosmic under jolt, `just flutter-desktop` is Flutter's Linux target over57+run` is libcosmic under jolt, `just flutter-desktop` is Flutter's Linux target
58+over
58 `frq.hiccup`. Same screens out of `common/frq/screens/`, two renderers. jvui and59 `frq.hiccup`. Same screens out of `common/frq/screens/`, two renderers. jvui and
59 Vidya were experiments and are gone; libcosmic is a desktop window and does not60 Vidya were experiments and are gone; libcosmic is a desktop window and does not
60 cross to a phone, which is what the Flutter half is for.61 cross to a phone, which is what the Flutter half is for.
modified README.md +8 -7
@@ -54,15 +54,15 @@ Android is logcat.
5454 The app:
5555
5656 ```bash
57-just run
57+just cosmic run
5858 ```
5959
6060 Every recipe lives in the `justfile` itself. Each one that runs frq re-enters
61-`nix develop` and comes back to the same recipe, so `just run` and
62-`nix develop --command just run` are one code path rather than two. Nothing has
63-to be installed for that but Nix.
61+`nix develop` and comes back to the same recipe, so `just cosmic run` and
62+`nix develop --command just cosmic run` are one code path rather than two.
63+Nothing has to be installed for that but Nix.
6464
65-`just run` is `jolt -m frq.cosmic` inside `nix develop`, with
65+`just cosmic run` is `jolt -m frq.cosmic` inside `nix develop`, with
6666 `LD_LIBRARY_PATH` pointed at the shell's `JOLT_NATIVE_LIB` — the flake's build
6767 of [jolt-native](https://gitlab.com/nandithebull/jolt-native), which carries
6868 the shared objects this client loads: `libjoltcosmic`, the retained-tree ABI
@@ -133,8 +133,9 @@ answer, because they are counted in rows of chrome rather than in lengths: a
133133 window's row is 34 points and a terminal's is one cell. `chrome-row` is where
134134 that is said, and `frq.tui` sets it.
135135
136-`just tui` is `just run`'s two halves with the other backend under them: this
137-tree's source on the flake's everything-else, in the dev shell. jolt-native
136+`just tui` is `just cosmic run`'s two halves with the other backend under
137+them: this tree's source on the flake's everything-else, in the dev shell.
138+jolt-native
138139 carries both native libraries and both Jolt sides — glimmer-cosmic for the
139140 window, glimmer-tui for the terminal — so one input answers for either, and
140141 nothing here needs a checkout beside the tree.
@@ -54,15 +54,15 @@ Android is logcat.
54 The app:54 The app:
55 55
56 ```bash56 ```bash
57-just run57+just cosmic run
58 ```58 ```
59 59
60 Every recipe lives in the `justfile` itself. Each one that runs frq re-enters60 Every recipe lives in the `justfile` itself. Each one that runs frq re-enters
61-`nix develop` and comes back to the same recipe, so `just run` and61+`nix develop` and comes back to the same recipe, so `just cosmic run` and
62-`nix develop --command just run` are one code path rather than two. Nothing has62+`nix develop --command just cosmic run` are one code path rather than two.
63-to be installed for that but Nix.63+Nothing has to be installed for that but Nix.
64 64
65-`just run` is `jolt -m frq.cosmic` inside `nix develop`, with65+`just cosmic run` is `jolt -m frq.cosmic` inside `nix develop`, with
66 `LD_LIBRARY_PATH` pointed at the shell's `JOLT_NATIVE_LIB` — the flake's build66 `LD_LIBRARY_PATH` pointed at the shell's `JOLT_NATIVE_LIB` — the flake's build
67 of [jolt-native](https://gitlab.com/nandithebull/jolt-native), which carries67 of [jolt-native](https://gitlab.com/nandithebull/jolt-native), which carries
68 the shared objects this client loads: `libjoltcosmic`, the retained-tree ABI68 the shared objects this client loads: `libjoltcosmic`, the retained-tree ABI
@@ -133,8 +133,9 @@ answer, because they are counted in rows of chrome rather than in lengths: a
133 window's row is 34 points and a terminal's is one cell. `chrome-row` is where133 window's row is 34 points and a terminal's is one cell. `chrome-row` is where
134 that is said, and `frq.tui` sets it.134 that is said, and `frq.tui` sets it.
135 135
136-`just tui` is `just run`'s two halves with the other backend under them: this136+`just tui` is `just cosmic run`'s two halves with the other backend under
137-tree's source on the flake's everything-else, in the dev shell. jolt-native137+them: this tree's source on the flake's everything-else, in the dev shell.
138+jolt-native
138 carries both native libraries and both Jolt sides — glimmer-cosmic for the139 carries both native libraries and both Jolt sides — glimmer-cosmic for the
139 window, glimmer-tui for the terminal — so one input answers for either, and140 window, glimmer-tui for the terminal — so one input answers for either, and
140 nothing here needs a checkout beside the tree.141 nothing here needs a checkout beside the tree.
modified common/frq/profile.cljc +2 -2
@@ -15,8 +15,8 @@
1515 a face, the grace period for crossing from the face to the card, and the card
1616 reporting its own pointer. That used to be jolt's alone, on the reading that
1717 a pointer meant libcosmic — but `just flutter-desktop` is a window with a
18- mouse in it as much as `just run` is, and the machine is a few atoms and a
19- timer with nothing host-shaped in it. The timer is the one thing that was,
18+ mouse in it as much as `just cosmic run` is, and the machine is a few atoms
19+ and a timer with nothing host-shaped in it. The timer is the one thing that was,
2020 and `frq.io/after!` is where that went. Whether there is a pointer at all is
2121 still the host's answer: `actions/desktop?`.
2222
@@ -15,8 +15,8 @@
15 a face, the grace period for crossing from the face to the card, and the card15 a face, the grace period for crossing from the face to the card, and the card
16 reporting its own pointer. That used to be jolt's alone, on the reading that16 reporting its own pointer. That used to be jolt's alone, on the reading that
17 a pointer meant libcosmic — but `just flutter-desktop` is a window with a17 a pointer meant libcosmic — but `just flutter-desktop` is a window with a
18- mouse in it as much as `just run` is, and the machine is a few atoms and a18+ mouse in it as much as `just cosmic run` is, and the machine is a few atoms
19- timer with nothing host-shaped in it. The timer is the one thing that was,19+ and a timer with nothing host-shaped in it. The timer is the one thing that was,
20 and `frq.io/after!` is where that went. Whether there is a pointer at all is20 and `frq.io/after!` is where that went. Whether there is a pointer at all is
21 still the host's answer: `actions/desktop?`.21 still the host's answer: `actions/desktop?`.
22 22
modified deps.edn +1 -1
@@ -33,7 +33,7 @@
3333 ;; libopus, H.264 from openh264 through a shim, and the devices from V4L2
3434 ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj.
3535 ;;
36- ;; just run
36+ ;; just cosmic run
3737 :jolt/native [;; The transport half of a call: MoQ over QUIC, the one
3838 ;; piece with no C implementation anywhere. Fetched from
3939 ;; moq-ffi's release rather than built — building it means a
@@ -33,7 +33,7 @@
33 ;; libopus, H.264 from openh264 through a shim, and the devices from V4L233 ;; libopus, H.264 from openh264 through a shim, and the devices from V4L2
34 ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj.34 ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj.
35 ;;35 ;;
36- ;; just run36+ ;; just cosmic run
37 :jolt/native [;; The transport half of a call: MoQ over QUIC, the one37 :jolt/native [;; The transport half of a call: MoQ over QUIC, the one
38 ;; piece with no C implementation anywhere. Fetched from38 ;; piece with no C implementation anywhere. Fetched from
39 ;; moq-ffi's release rather than built — building it means a39 ;; moq-ffi's release rather than built — building it means a
modified flake.nix +13 -12
@@ -39,7 +39,7 @@
3939
4040 # The source half of jolt-native: the Jolt code under glimmer-backends/ that
4141 # binds the native objects, and the flake that builds them. This input is
42- # what `just run` builds against.
42+ # what `just cosmic run` builds against.
4343 #
4444 # It carries both backends that are left — glimmer-cosmic over
4545 # libjoltcosmic for the window, glimmer-tui over libjolttui for the
@@ -645,8 +645,8 @@
645645 # The Flutter desktop GUI, built rather than run out of the tree.
646646 #
647647 # `just flutter-desktop` is the working-tree loop and this is its
648- # opposite number, the same way `nix build .#frq` is `just run`'s: the
649- # source is the flake's, the output is a store path, and the build is
648+ # opposite number, the same way `nix build .#frq` is `just cosmic
649+ # run`'s: the source is the flake's, the output is a store path, and the build is
650650 # a sandbox with no network. It is the first thing here that builds
651651 # purely — the APK cannot, because Gradle fetches as it goes.
652652 #
@@ -759,7 +759,7 @@
759759 '';
760760 });
761761
762- # Where `just run` runs, and because entering it realises what it
762+ # Where `just cosmic run` runs, and because entering it realises what it
763763 # names what builds the half of frq that is not this working tree.
764764 #
765765 # The two halves, and the split is the whole point of the shell. The frq
@@ -779,7 +779,7 @@
779779 # this shell hands a builder are the same derivation.
780780 #
781781 # Nothing here says "nixbuild", though: it is a plain derivation, and
782- # where it gets built is the machine's business. The `run` recipe asks for
782+ # where it gets built is the machine's business. The `cosmic` recipe asks for
783783 # the shell with --max-jobs 0, which is what sends it to the `builders`
784784 # entry rather than compiling egui on a laptop.
785785 devShells = forEachSystem (pkgs:
@@ -794,13 +794,13 @@
794794 # jolt, because the runtime frq is run by should be the flake's
795795 # too. nixGL for the same reason the launcher reaches for it see
796796 # frqScript. just so the recipe runner comes from here too rather
797- # than the host `nix develop` and then `just run` is the whole of
798- # what a machine with nix needs.
797+ # than the host `nix develop` and then `just cosmic run` is the
798+ # whole of what a machine with nix needs.
799799 packages = [ jolt pkgs.just (nixGLFor pkgs) ];
800800
801801 # Read by the recipes rather than baked into a wrapper: the frq
802- # source `just run` runs is the working tree, so the launcher has
803- # to live in that tree and the shell has to hand it its answers.
802+ # source `just cosmic run` runs is the working tree, so the
803+ # launcher has to live in that tree and the shell has to hand it its answers.
804804 # Naming these is also what makes the shell build them.
805805 JOLT_NATIVE_LIB = "${nativeAll}/lib";
806806 # Spelled out rather than shared with the packages block, which
@@ -959,9 +959,10 @@
959959 # pure Dart over the XDG directories.
960960 buildInputs = [ pkgs.gtk3 pkgs.glib ];
961961
962- # Same reason `just run` reaches for it: Flutter paints through
963- # GL, and off NixOS the driver that can do that is the host's, not
964- # the store's. The recipe reads this exactly as `run` does.
962+ # Same reason `just cosmic run` reaches for it: Flutter paints
963+ # through GL, and off NixOS the driver that can do that is the
964+ # host's, not the store's. The recipe reads this exactly as
965+ # `cosmic` does.
965966 NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel";
966967
967968 # The `flutter` shell's, deliberately the same one and for the
@@ -39,7 +39,7 @@
39 39
40 # The source half of jolt-native: the Jolt code under glimmer-backends/ that40 # The source half of jolt-native: the Jolt code under glimmer-backends/ that
41 # binds the native objects, and the flake that builds them. This input is41 # binds the native objects, and the flake that builds them. This input is
42- # what `just run` builds against.42+ # what `just cosmic run` builds against.
43 #43 #
44 # It carries both backends that are left — glimmer-cosmic over44 # It carries both backends that are left — glimmer-cosmic over
45 # libjoltcosmic for the window, glimmer-tui over libjolttui for the45 # libjoltcosmic for the window, glimmer-tui over libjolttui for the
@@ -645,8 +645,8 @@
645 # The Flutter desktop GUI, built rather than run out of the tree.645 # The Flutter desktop GUI, built rather than run out of the tree.
646 #646 #
647 # `just flutter-desktop` is the working-tree loop and this is its647 # `just flutter-desktop` is the working-tree loop and this is its
648- # opposite number, the same way `nix build .#frq` is `just run`'s: the648+ # opposite number, the same way `nix build .#frq` is `just cosmic
649- # source is the flake's, the output is a store path, and the build is649+ # run`'s: the source is the flake's, the output is a store path, and the build is
650 # a sandbox with no network. It is the first thing here that builds650 # a sandbox with no network. It is the first thing here that builds
651 # purely — the APK cannot, because Gradle fetches as it goes.651 # purely — the APK cannot, because Gradle fetches as it goes.
652 #652 #
@@ -759,7 +759,7 @@
759 '';759 '';
760 });760 });
761 761
762- # Where `just run` runs, and because entering it realises what it762+ # Where `just cosmic run` runs, and because entering it realises what it
763 # names what builds the half of frq that is not this working tree.763 # names what builds the half of frq that is not this working tree.
764 #764 #
765 # The two halves, and the split is the whole point of the shell. The frq765 # The two halves, and the split is the whole point of the shell. The frq
@@ -779,7 +779,7 @@
779 # this shell hands a builder are the same derivation.779 # this shell hands a builder are the same derivation.
780 #780 #
781 # Nothing here says "nixbuild", though: it is a plain derivation, and781 # Nothing here says "nixbuild", though: it is a plain derivation, and
782- # where it gets built is the machine's business. The `run` recipe asks for782+ # where it gets built is the machine's business. The `cosmic` recipe asks for
783 # the shell with --max-jobs 0, which is what sends it to the `builders`783 # the shell with --max-jobs 0, which is what sends it to the `builders`
784 # entry rather than compiling egui on a laptop.784 # entry rather than compiling egui on a laptop.
785 devShells = forEachSystem (pkgs:785 devShells = forEachSystem (pkgs:
@@ -794,13 +794,13 @@
794 # jolt, because the runtime frq is run by should be the flake's794 # jolt, because the runtime frq is run by should be the flake's
795 # too. nixGL for the same reason the launcher reaches for it see795 # too. nixGL for the same reason the launcher reaches for it see
796 # frqScript. just so the recipe runner comes from here too rather796 # frqScript. just so the recipe runner comes from here too rather
797- # than the host `nix develop` and then `just run` is the whole of797+ # than the host `nix develop` and then `just cosmic run` is the
798- # what a machine with nix needs.798+ # whole of what a machine with nix needs.
799 packages = [ jolt pkgs.just (nixGLFor pkgs) ];799 packages = [ jolt pkgs.just (nixGLFor pkgs) ];
800 800
801 # Read by the recipes rather than baked into a wrapper: the frq801 # Read by the recipes rather than baked into a wrapper: the frq
802- # source `just run` runs is the working tree, so the launcher has802+ # source `just cosmic run` runs is the working tree, so the
803- # to live in that tree and the shell has to hand it its answers.803+ # launcher has to live in that tree and the shell has to hand it its answers.
804 # Naming these is also what makes the shell build them.804 # Naming these is also what makes the shell build them.
805 JOLT_NATIVE_LIB = "${nativeAll}/lib";805 JOLT_NATIVE_LIB = "${nativeAll}/lib";
806 # Spelled out rather than shared with the packages block, which806 # Spelled out rather than shared with the packages block, which
@@ -959,9 +959,10 @@
959 # pure Dart over the XDG directories.959 # pure Dart over the XDG directories.
960 buildInputs = [ pkgs.gtk3 pkgs.glib ];960 buildInputs = [ pkgs.gtk3 pkgs.glib ];
961 961
962- # Same reason `just run` reaches for it: Flutter paints through962+ # Same reason `just cosmic run` reaches for it: Flutter paints
963- # GL, and off NixOS the driver that can do that is the host's, not963+ # through GL, and off NixOS the driver that can do that is the
964- # the store's. The recipe reads this exactly as `run` does.964+ # host's, not the store's. The recipe reads this exactly as
965+ # `cosmic` does.
965 NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel";966 NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel";
966 967
967 # The `flutter` shell's, deliberately the same one and for the968 # The `flutter` shell's, deliberately the same one and for the
modified flutter/README.md +4 -4
@@ -93,8 +93,8 @@ just flutter-desktop run # and the window
9393 ### The desktop one
9494
9595 There are two desktop GUIs now, and they are not a fallback for each other:
96-`just run` is libcosmic under jolt, and `just flutter-desktop` is this tree
97-under Flutter's Linux target. Same screens out of `common/frq/screens/`, two
96+`just cosmic run` is libcosmic under jolt, and `just flutter-desktop` is this
97+tree under Flutter's Linux target. Same screens out of `common/frq/screens/`, two
9898 renderers — `glimmer-cosmic` walks the hiccup on one side and `frq.hiccup`
9999 emits Flutter widgets on the other.
100100
@@ -111,8 +111,8 @@ Flutter's engine artifacts are network. What it does *not* need is the
111111 writable-`ANDROID_HOME` dance, since nothing here writes into the store — so
112112 there is no `flutter/.home` on this path.
113113
114-nixGL off NixOS, for the reason `just run` needs it and `just tui` does not:
115-Flutter paints through GL and the driver that can do that is the host's.
114+nixGL off NixOS, for the reason `just cosmic run` needs it and `just tui` does
115+not: Flutter paints through GL and the driver that can do that is the host's.
116116
117117 `linux/` is the Flutter template's GTK runner, renamed — `frq` rather than
118118 `cljd_flutter`, and `uk.nandi.frq` rather than `com.example.cljd_flutter`, so
@@ -93,8 +93,8 @@ just flutter-desktop run # and the window
93 ### The desktop one93 ### The desktop one
94 94
95 There are two desktop GUIs now, and they are not a fallback for each other:95 There are two desktop GUIs now, and they are not a fallback for each other:
96-`just run` is libcosmic under jolt, and `just flutter-desktop` is this tree96+`just cosmic run` is libcosmic under jolt, and `just flutter-desktop` is this
97-under Flutter's Linux target. Same screens out of `common/frq/screens/`, two97+tree under Flutter's Linux target. Same screens out of `common/frq/screens/`, two
98 renderers — `glimmer-cosmic` walks the hiccup on one side and `frq.hiccup`98 renderers — `glimmer-cosmic` walks the hiccup on one side and `frq.hiccup`
99 emits Flutter widgets on the other.99 emits Flutter widgets on the other.
100 100
@@ -111,8 +111,8 @@ Flutter's engine artifacts are network. What it does *not* need is the
111 writable-`ANDROID_HOME` dance, since nothing here writes into the store — so111 writable-`ANDROID_HOME` dance, since nothing here writes into the store — so
112 there is no `flutter/.home` on this path.112 there is no `flutter/.home` on this path.
113 113
114-nixGL off NixOS, for the reason `just run` needs it and `just tui` does not:114+nixGL off NixOS, for the reason `just cosmic run` needs it and `just tui` does
115-Flutter paints through GL and the driver that can do that is the host's.115+not: Flutter paints through GL and the driver that can do that is the host's.
116 116
117 `linux/` is the Flutter template's GTK runner, renamed — `frq` rather than117 `linux/` is the Flutter template's GTK runner, renamed — `frq` rather than
118 `cljd_flutter`, and `uk.nandi.frq` rather than `com.example.cljd_flutter`, so118 `cljd_flutter`, and `uk.nandi.frq` rather than `com.example.cljd_flutter`, so
modified flutter/src/frq/theme/cosmic.cljd +4 -4
@@ -3,10 +3,10 @@
33
44 GENERATED by tools/cosmic2cljd.py `just theme`. Do not edit.
55
6- libcosmic asks cosmic-config for these at run time, so `just run`
7- follows COSMIC Settings as it changes. A phone has no cosmic-config,
8- so the APK carries them instead. That is the one real difference
9- between the two, and it is why this file is in git."
6+ libcosmic asks cosmic-config for these at run time, so `just cosmic run`
7+ follows COSMIC Settings as it changes. A phone has no cosmic-config, so
8+ the APK carries them instead. That is the one real difference between
9+ the two, and it is why this file is in git."
1010 (:require ["package:flutter/material.dart" :as m]))
1111
1212 ;; Dark theme, from ~/.config/cosmic.
@@ -3,10 +3,10 @@
3 3
4 GENERATED by tools/cosmic2cljd.py `just theme`. Do not edit.4 GENERATED by tools/cosmic2cljd.py `just theme`. Do not edit.
5 5
6- libcosmic asks cosmic-config for these at run time, so `just run`6+ libcosmic asks cosmic-config for these at run time, so `just cosmic run`
7- follows COSMIC Settings as it changes. A phone has no cosmic-config,7+ follows COSMIC Settings as it changes. A phone has no cosmic-config, so
8- so the APK carries them instead. That is the one real difference8+ the APK carries them instead. That is the one real difference between
9- between the two, and it is why this file is in git."9+ the two, and it is why this file is in git."
10 (:require ["package:flutter/material.dart" :as m]))10 (:require ["package:flutter/material.dart" :as m]))
11 11
12 ;; Dark theme, from ~/.config/cosmic.12 ;; Dark theme, from ~/.config/cosmic.
modified justfile +22 -11
@@ -7,7 +7,7 @@
77 # it and come back to this same recipe; inside, hand jolt the deps overrides and
88 # the library path the shell exported. The re-entry test is JOLT_NATIVE_LIB,
99 # which only the shell sets — no flag to forget, and no second code path for
10-# someone who runs `nix develop --command just run` by hand.
10+# someone who runs `nix develop --command just cosmic run` by hand.
1111
1212 set shell := ["bash", "-euo", "pipefail", "-c"]
1313
@@ -35,8 +35,8 @@ default:
3535 # Re-read the COSMIC theme into the APK.
3636 #
3737 # libcosmic asks cosmic-config for the accent and the surfaces at run time, so
38-# `just run` already follows COSMIC Settings as it changes. A phone has no
39-# cosmic-config, so the APK carries them instead — read here, on the machine
38+# `just cosmic run` already follows COSMIC Settings as it changes. A phone has
39+# no cosmic-config, so the APK carries them instead — read here, on the machine
4040 # that has them, and compiled in. That is the one real difference between the
4141 # two, and it is why the generated file is in git rather than gitignored: a
4242 # checkout on a machine with no COSMIC still builds.
@@ -179,12 +179,22 @@ apk action="build":
179179 # window is libcosmic and the terminal is libjolttui, and those are the two.
180180 #
181181 # The app: this tree's source on the flake's everything-else, in the dev shell.
182-run *args:
182+#
183+# Named for the backend rather than for the verb, the way `flutter-desktop`
184+# is: two desktop GUIs, neither of them the default one.
185+#
186+# just cosmic run [args...] open the window
187+cosmic action="run" *args:
183188 #!/usr/bin/env bash
184189 set -euo pipefail
185190 cd "{{justfile_directory()}}"
191+ if [ "{{action}}" != "run" ]; then
192+ echo "usage: just cosmic run [args...]" >&2
193+ exit 1
194+ fi
195+ shift
186196 if [ -z "${JOLT_NATIVE_LIB:-}" ]; then
187- exec {{nix}} develop . --max-jobs {{jobs}} --command just run "$@"
197+ exec {{nix}} develop . --max-jobs {{jobs}} --command just cosmic run "$@"
188198 fi
189199
190200 deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}"
@@ -197,11 +207,11 @@ run *args:
197207
198208 exec "${runner[@]}" jolt -Sdeps "$deps" -m frq.cosmic "$@"
199209
200-# `run` with the other backend under it. Only libjolttui: `frq.app` names no
210+# `cosmic` with the other backend under it. Only libjolttui: `frq.app` names no
201211 # backend at all any more, and `frq.tui` requires glimmer-tui so the one
202212 # installed is the terminal.
203213 #
204-# No nixGL here, unlike `run`: a terminal wants nothing from the host's GL
214+# No nixGL here, unlike `cosmic`: a terminal wants nothing from the host's GL
205215 # driver, which is the reason this output exists on machines that have none.
206216 #
207217 # What may appear in common/, checked — the half of the tree both backends
@@ -256,7 +266,8 @@ nrepl *args:
256266 # `jolt` in the repo root does not work on its own: deps.edn carries
257267 # :jolt/native, so every invocation here loads libvidya and libjoltmoq before it
258268 # reads a line, and dies naming the library if the loader cannot find them. So
259-# this is `run` without the app — and `run` is this with a window's worth of
269+# this is `cosmic` without the app — and `cosmic` is this with a window's
270+# worth of
260271 # extra care about the GL driver.
261272 #
262273 # A jolt with the native libraries under it: a REPL, or `just repl nrepl-server`.
@@ -323,8 +334,8 @@ gen-moq lib="":
323334 # The other desktop GUI: the same screens, painted by Flutter instead of
324335 # libcosmic.
325336 #
326-# `just run` and this one are two frontends over one tree, and the split is
327-# the same one the APK already draws. Everything under `common/` — the
337+# `just cosmic run` and this one are two frontends over one tree, and the
338+# split is the same one the APK already draws. Everything under `common/` — the
328339 # screens, the cells, `frq.io` — is shared; what differs is who paints it and
329340 # who answers the host. So this recipe is `just apk` with the Android half
330341 # taken out: the same `clojure -M:cljd compile` over the same flutter/src,
@@ -336,7 +347,7 @@ gen-moq lib="":
336347 # writable-ANDROID_HOME dance — nothing here writes into the store — so there
337348 # is no `flutter/.home` on this path.
338349 #
339-# nixGL for the reason `run` needs it and `tui` does not: Flutter paints
350+# nixGL for the reason `cosmic` needs it and `tui` does not: Flutter paints
340351 # through GL, and off NixOS the driver is the host's.
341352 #
342353 # just flutter-desktop build the debug bundle
@@ -7,7 +7,7 @@
7 # it and come back to this same recipe; inside, hand jolt the deps overrides and7 # it and come back to this same recipe; inside, hand jolt the deps overrides and
8 # the library path the shell exported. The re-entry test is JOLT_NATIVE_LIB,8 # the library path the shell exported. The re-entry test is JOLT_NATIVE_LIB,
9 # which only the shell sets — no flag to forget, and no second code path for9 # which only the shell sets — no flag to forget, and no second code path for
10-# someone who runs `nix develop --command just run` by hand.10+# someone who runs `nix develop --command just cosmic run` by hand.
11 11
12 set shell := ["bash", "-euo", "pipefail", "-c"]12 set shell := ["bash", "-euo", "pipefail", "-c"]
13 13
@@ -35,8 +35,8 @@ default:
35 # Re-read the COSMIC theme into the APK.35 # Re-read the COSMIC theme into the APK.
36 #36 #
37 # libcosmic asks cosmic-config for the accent and the surfaces at run time, so37 # libcosmic asks cosmic-config for the accent and the surfaces at run time, so
38-# `just run` already follows COSMIC Settings as it changes. A phone has no38+# `just cosmic run` already follows COSMIC Settings as it changes. A phone has
39-# cosmic-config, so the APK carries them instead — read here, on the machine39+# no cosmic-config, so the APK carries them instead — read here, on the machine
40 # that has them, and compiled in. That is the one real difference between the40 # that has them, and compiled in. That is the one real difference between the
41 # two, and it is why the generated file is in git rather than gitignored: a41 # two, and it is why the generated file is in git rather than gitignored: a
42 # checkout on a machine with no COSMIC still builds.42 # checkout on a machine with no COSMIC still builds.
@@ -179,12 +179,22 @@ apk action="build":
179 # window is libcosmic and the terminal is libjolttui, and those are the two.179 # window is libcosmic and the terminal is libjolttui, and those are the two.
180 #180 #
181 # The app: this tree's source on the flake's everything-else, in the dev shell.181 # The app: this tree's source on the flake's everything-else, in the dev shell.
182-run *args:182+#
183+# Named for the backend rather than for the verb, the way `flutter-desktop`
184+# is: two desktop GUIs, neither of them the default one.
185+#
186+# just cosmic run [args...] open the window
187+cosmic action="run" *args:
183 #!/usr/bin/env bash188 #!/usr/bin/env bash
184 set -euo pipefail189 set -euo pipefail
185 cd "{{justfile_directory()}}"190 cd "{{justfile_directory()}}"
191+ if [ "{{action}}" != "run" ]; then
192+ echo "usage: just cosmic run [args...]" >&2
193+ exit 1
194+ fi
195+ shift
186 if [ -z "${JOLT_NATIVE_LIB:-}" ]; then196 if [ -z "${JOLT_NATIVE_LIB:-}" ]; then
187- exec {{nix}} develop . --max-jobs {{jobs}} --command just run "$@"197+ exec {{nix}} develop . --max-jobs {{jobs}} --command just cosmic run "$@"
188 fi198 fi
189 199
190 deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}"200 deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}"
@@ -197,11 +207,11 @@ run *args:
197 207
198 exec "${runner[@]}" jolt -Sdeps "$deps" -m frq.cosmic "$@"208 exec "${runner[@]}" jolt -Sdeps "$deps" -m frq.cosmic "$@"
199 209
200-# `run` with the other backend under it. Only libjolttui: `frq.app` names no210+# `cosmic` with the other backend under it. Only libjolttui: `frq.app` names no
201 # backend at all any more, and `frq.tui` requires glimmer-tui so the one211 # backend at all any more, and `frq.tui` requires glimmer-tui so the one
202 # installed is the terminal.212 # installed is the terminal.
203 #213 #
204-# No nixGL here, unlike `run`: a terminal wants nothing from the host's GL214+# No nixGL here, unlike `cosmic`: a terminal wants nothing from the host's GL
205 # driver, which is the reason this output exists on machines that have none.215 # driver, which is the reason this output exists on machines that have none.
206 #216 #
207 # What may appear in common/, checked — the half of the tree both backends217 # What may appear in common/, checked — the half of the tree both backends
@@ -256,7 +266,8 @@ nrepl *args:
256 # `jolt` in the repo root does not work on its own: deps.edn carries266 # `jolt` in the repo root does not work on its own: deps.edn carries
257 # :jolt/native, so every invocation here loads libvidya and libjoltmoq before it267 # :jolt/native, so every invocation here loads libvidya and libjoltmoq before it
258 # reads a line, and dies naming the library if the loader cannot find them. So268 # reads a line, and dies naming the library if the loader cannot find them. So
259-# this is `run` without the app — and `run` is this with a window's worth of269+# this is `cosmic` without the app — and `cosmic` is this with a window's
270+# worth of
260 # extra care about the GL driver.271 # extra care about the GL driver.
261 #272 #
262 # A jolt with the native libraries under it: a REPL, or `just repl nrepl-server`.273 # A jolt with the native libraries under it: a REPL, or `just repl nrepl-server`.
@@ -323,8 +334,8 @@ gen-moq lib="":
323 # The other desktop GUI: the same screens, painted by Flutter instead of334 # The other desktop GUI: the same screens, painted by Flutter instead of
324 # libcosmic.335 # libcosmic.
325 #336 #
326-# `just run` and this one are two frontends over one tree, and the split is337+# `just cosmic run` and this one are two frontends over one tree, and the
327-# the same one the APK already draws. Everything under `common/` — the338+# split is the same one the APK already draws. Everything under `common/` — the
328 # screens, the cells, `frq.io` — is shared; what differs is who paints it and339 # screens, the cells, `frq.io` — is shared; what differs is who paints it and
329 # who answers the host. So this recipe is `just apk` with the Android half340 # who answers the host. So this recipe is `just apk` with the Android half
330 # taken out: the same `clojure -M:cljd compile` over the same flutter/src,341 # taken out: the same `clojure -M:cljd compile` over the same flutter/src,
@@ -336,7 +347,7 @@ gen-moq lib="":
336 # writable-ANDROID_HOME dance — nothing here writes into the store — so there347 # writable-ANDROID_HOME dance — nothing here writes into the store — so there
337 # is no `flutter/.home` on this path.348 # is no `flutter/.home` on this path.
338 #349 #
339-# nixGL for the reason `run` needs it and `tui` does not: Flutter paints350+# nixGL for the reason `cosmic` needs it and `tui` does not: Flutter paints
340 # through GL, and off NixOS the driver is the host's.351 # through GL, and off NixOS the driver is the host's.
341 #352 #
342 # just flutter-desktop build the debug bundle353 # just flutter-desktop build the debug bundle
modified src/frq/cosmic.clj +1 -1
@@ -15,7 +15,7 @@
1515 and keeps it, so glimmer's loop runs on a worker. The timers handed to
1616 `start!` are glimmer-cosmic's, which run on that worker.
1717
18- just run"
18+ just cosmic run"
1919 (:require [frq.app :as app]
2020 [frq.platform :as platform]
2121 [frq.state :as s]
@@ -15,7 +15,7 @@
15 and keeps it, so glimmer's loop runs on a worker. The timers handed to15 and keeps it, so glimmer's loop runs on a worker. The timers handed to
16 `start!` are glimmer-cosmic's, which run on that worker.16 `start!` are glimmer-cosmic's, which run on that worker.
17 17
18- just run"18+ just cosmic run"
19 (:require [frq.app :as app]19 (:require [frq.app :as app]
20 [frq.platform :as platform]20 [frq.platform :as platform]
21 [frq.state :as s]21 [frq.state :as s]
modified tools/cosmic2cljd.py +6 -6
@@ -1,8 +1,8 @@
11 #!/usr/bin/env python3
22 """Read the COSMIC theme out of cosmic-config and write it as ClojureDart.
33
4-libcosmic asks cosmic-config for the user's theme at run time, so `just run`
5-already paints frq in whatever accent and surfaces are set in COSMIC Settings.
4+libcosmic asks cosmic-config for the user's theme at run time, so
5+`just cosmic run` already paints frq in whatever accent and surfaces are set in COSMIC Settings.
66 A phone has no cosmic-config, so the APK cannot ask — the values are read here
77 instead, on the machine that has them, and compiled in.
88
@@ -94,10 +94,10 @@ def main() -> None:
9494 "",
9595 " GENERATED by tools/cosmic2cljd.py — `just theme`. Do not edit.",
9696 "",
97- " libcosmic asks cosmic-config for these at run time, so `just run`",
98- " follows COSMIC Settings as it changes. A phone has no cosmic-config,",
99- " so the APK carries them instead. That is the one real difference",
100- f' between the two, and it is why this file is in git."',
97+ " libcosmic asks cosmic-config for these at run time, so `just cosmic run`",
98+ " follows COSMIC Settings as it changes. A phone has no cosmic-config, so",
99+ " the APK carries them instead. That is the one real difference between",
100+ f' the two, and it is why this file is in git."',
101101 ' (:require ["package:flutter/material.dart" :as m]))',
102102 "",
103103 f";; {mode} theme, from ~/.config/cosmic.",
@@ -1,8 +1,8 @@
1 #!/usr/bin/env python31 #!/usr/bin/env python3
2 """Read the COSMIC theme out of cosmic-config and write it as ClojureDart.2 """Read the COSMIC theme out of cosmic-config and write it as ClojureDart.
3 3
4-libcosmic asks cosmic-config for the user's theme at run time, so `just run`4+libcosmic asks cosmic-config for the user's theme at run time, so
5-already paints frq in whatever accent and surfaces are set in COSMIC Settings.5+`just cosmic run` already paints frq in whatever accent and surfaces are set in COSMIC Settings.
6 A phone has no cosmic-config, so the APK cannot ask — the values are read here6 A phone has no cosmic-config, so the APK cannot ask — the values are read here
7 instead, on the machine that has them, and compiled in.7 instead, on the machine that has them, and compiled in.
8 8
@@ -94,10 +94,10 @@ def main() -> None:
94 "",94 "",
95 " GENERATED by tools/cosmic2cljd.py — `just theme`. Do not edit.",95 " GENERATED by tools/cosmic2cljd.py — `just theme`. Do not edit.",
96 "",96 "",
97- " libcosmic asks cosmic-config for these at run time, so `just run`",97+ " libcosmic asks cosmic-config for these at run time, so `just cosmic run`",
98- " follows COSMIC Settings as it changes. A phone has no cosmic-config,",98+ " follows COSMIC Settings as it changes. A phone has no cosmic-config, so",
99- " so the APK carries them instead. That is the one real difference",99+ " the APK carries them instead. That is the one real difference between",
100- f' between the two, and it is why this file is in git."',100+ f' the two, and it is why this file is in git."',
101 ' (:require ["package:flutter/material.dart" :as m]))',101 ' (:require ["package:flutter/material.dart" :as m]))',
102 "",102 "",
103 f";; {mode} theme, from ~/.config/cosmic.",103 f";; {mode} theme, from ~/.config/cosmic.",