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>
5ba9382 parent: ed528b2 modified
CLAUDE.md +4 -3 | @@ -51,10 +51,11 @@ because every backend that APK could paint with is retired. | ||
| 51 | 51 | `just flutter-desktop`, out of `.#flutter-desktop` (the same clojure and |
| 52 | 52 | flutter, with cmake, ninja, pkg-config and gtk3 where the JDK and the SDK are). |
| 53 | 53 | 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` 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 | |
| 58 | 59 | `frq.hiccup`. Same screens out of `common/frq/screens/`, two renderers. jvui and |
| 59 | 60 | Vidya were experiments and are gone; libcosmic is a desktop window and does not |
| 60 | 61 | 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 and | 51 | `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, since | 53 | 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` is | 56 | +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 over | 57 | +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 and | 59 | `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 not | 60 | 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. | ||
| 54 | 54 | The app: |
| 55 | 55 | |
| 56 | 56 | ```bash |
| 57 | -just run | |
| 57 | +just cosmic run | |
| 58 | 58 | ``` |
| 59 | 59 | |
| 60 | 60 | 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. | |
| 64 | 64 | |
| 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 | |
| 66 | 66 | `LD_LIBRARY_PATH` pointed at the shell's `JOLT_NATIVE_LIB` — the flake's build |
| 67 | 67 | of [jolt-native](https://gitlab.com/nandithebull/jolt-native), which carries |
| 68 | 68 | 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 | 133 | window's row is 34 points and a terminal's is one cell. `chrome-row` is where |
| 134 | 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: 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 | |
| 138 | 139 | carries both native libraries and both Jolt sides — glimmer-cosmic for the |
| 139 | 140 | window, glimmer-tui for the terminal — so one input answers for either, and |
| 140 | 141 | nothing here needs a checkout beside the tree. |
| @@ -54,15 +54,15 @@ Android is logcat. | |||
| 54 | The app: | 54 | The app: |
| 55 | 55 | ||
| 56 | ```bash | 56 | ```bash |
| 57 | -just run | 57 | +just cosmic run |
| 58 | ``` | 58 | ``` |
| 59 | 59 | ||
| 60 | Every recipe lives in the `justfile` itself. Each one that runs frq re-enters | 60 | 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 | 61 | +`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 has | 62 | +`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`, with | 65 | +`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 build | 66 | `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 carries | 67 | of [jolt-native](https://gitlab.com/nandithebull/jolt-native), which carries |
| 68 | the shared objects this client loads: `libjoltcosmic`, the retained-tree ABI | 68 | 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 where | 133 | 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: this | 136 | +`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-native | 137 | +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 the | 139 | 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, and | 140 | 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 @@ | ||
| 15 | 15 | a face, the grace period for crossing from the face to the card, and the card |
| 16 | 16 | reporting its own pointer. That used to be jolt's alone, on the reading that |
| 17 | 17 | 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, | |
| 20 | 20 | and `frq.io/after!` is where that went. Whether there is a pointer at all is |
| 21 | 21 | still the host's answer: `actions/desktop?`. |
| 22 | 22 | |
| @@ -15,8 +15,8 @@ | |||
| 15 | a face, the grace period for crossing from the face to the card, and the card | 15 | 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 that | 16 | 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 a | 17 | 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 | 18 | + 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 is | 20 | 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 @@ | ||
| 33 | 33 | ;; libopus, H.264 from openh264 through a shim, and the devices from V4L2 |
| 34 | 34 | ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj. |
| 35 | 35 | ;; |
| 36 | - ;; just run | |
| 36 | + ;; just cosmic run | |
| 37 | 37 | :jolt/native [;; The transport half of a call: MoQ over QUIC, the one |
| 38 | 38 | ;; piece with no C implementation anywhere. Fetched from |
| 39 | 39 | ;; 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 V4L2 | 33 | ;; 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 run | 36 | + ;; just cosmic run |
| 37 | :jolt/native [;; The transport half of a call: MoQ over QUIC, the one | 37 | :jolt/native [;; The transport half of a call: MoQ over QUIC, the one |
| 38 | ;; piece with no C implementation anywhere. Fetched from | 38 | ;; piece with no C implementation anywhere. Fetched from |
| 39 | ;; moq-ffi's release rather than built — building it means a | 39 | ;; moq-ffi's release rather than built — building it means a |
modified
flake.nix +13 -12 | @@ -39,7 +39,7 @@ | ||
| 39 | 39 | |
| 40 | 40 | # The source half of jolt-native: the Jolt code under glimmer-backends/ that |
| 41 | 41 | # 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 | 44 | # It carries both backends that are left — glimmer-cosmic over |
| 45 | 45 | # libjoltcosmic for the window, glimmer-tui over libjolttui for the |
| @@ -645,8 +645,8 @@ | ||
| 645 | 645 | # The Flutter desktop GUI, built rather than run out of the tree. |
| 646 | 646 | # |
| 647 | 647 | # `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 | |
| 650 | 650 | # a sandbox with no network. It is the first thing here that builds |
| 651 | 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 it | |
| 762 | + # Where `just cosmic run` runs, and — because entering it realises what it | |
| 763 | 763 | # names — what builds the half of frq that is not this working tree. |
| 764 | 764 | # |
| 765 | 765 | # The two halves, and the split is the whole point of the shell. The frq |
| @@ -779,7 +779,7 @@ | ||
| 779 | 779 | # this shell hands a builder are the same derivation. |
| 780 | 780 | # |
| 781 | 781 | # 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 | |
| 783 | 783 | # the shell with --max-jobs 0, which is what sends it to the `builders` |
| 784 | 784 | # entry rather than compiling egui on a laptop. |
| 785 | 785 | devShells = forEachSystem (pkgs: |
| @@ -794,13 +794,13 @@ | ||
| 794 | 794 | # jolt, because the runtime frq is run by should be the flake's |
| 795 | 795 | # too. nixGL for the same reason the launcher reaches for it — see |
| 796 | 796 | # 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. | |
| 799 | 799 | packages = [ jolt pkgs.just (nixGLFor pkgs) ]; |
| 800 | 800 | |
| 801 | 801 | # 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. | |
| 804 | 804 | # Naming these is also what makes the shell build them. |
| 805 | 805 | JOLT_NATIVE_LIB = "${nativeAll}/lib"; |
| 806 | 806 | # Spelled out rather than shared with the packages block, which |
| @@ -959,9 +959,10 @@ | ||
| 959 | 959 | # pure Dart over the XDG directories. |
| 960 | 960 | buildInputs = [ pkgs.gtk3 pkgs.glib ]; |
| 961 | 961 | |
| 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. | |
| 965 | 966 | NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel"; |
| 966 | 967 | |
| 967 | 968 | # 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/ that | 40 | # 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 is | 41 | # 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 over | 44 | # It carries both backends that are left — glimmer-cosmic over |
| 45 | # libjoltcosmic for the window, glimmer-tui over libjolttui for the | 45 | # 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 its | 647 | # `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 | 648 | + # 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 is | 649 | + # 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 builds | 650 | # 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 it | 762 | + # 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 frq | 765 | # 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, and | 781 | # 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 |
| 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's | 794 | # 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 — see | 795 | # too. nixGL for the same reason the launcher reaches for it — see |
| 796 | # frqScript. just so the recipe runner comes from here too rather | 796 | # 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 | 797 | + # 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 frq | 801 | # 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 | 802 | + # 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, which | 806 | # 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 through | 962 | + # 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, not | 963 | + # 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 the | 968 | # 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 | ||
| 93 | 93 | ### The desktop one |
| 94 | 94 | |
| 95 | 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 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 | |
| 98 | 98 | renderers — `glimmer-cosmic` walks the hiccup on one side and `frq.hiccup` |
| 99 | 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 | 111 | writable-`ANDROID_HOME` dance, since nothing here writes into the store — so |
| 112 | 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: | |
| 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. | |
| 116 | 116 | |
| 117 | 117 | `linux/` is the Flutter template's GTK runner, renamed — `frq` rather than |
| 118 | 118 | `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 one | 93 | ### 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 tree | 96 | +`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/`, two | 97 | +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 — so | 111 | 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 than | 117 | `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`, so | 118 | `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 @@ | ||
| 3 | 3 | |
| 4 | 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` | |
| 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." | |
| 10 | 10 | (:require ["package:flutter/material.dart" :as m])) |
| 11 | 11 | |
| 12 | 12 | ;; 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 difference | 8 | + 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 @@ | ||
| 7 | 7 | # it and come back to this same recipe; inside, hand jolt the deps overrides and |
| 8 | 8 | # the library path the shell exported. The re-entry test is JOLT_NATIVE_LIB, |
| 9 | 9 | # 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 | 12 | set shell := ["bash", "-euo", "pipefail", "-c"] |
| 13 | 13 | |
| @@ -35,8 +35,8 @@ default: | ||
| 35 | 35 | # Re-read the COSMIC theme into the APK. |
| 36 | 36 | # |
| 37 | 37 | # 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 | |
| 40 | 40 | # that has them, and compiled in. That is the one real difference between the |
| 41 | 41 | # two, and it is why the generated file is in git rather than gitignored: a |
| 42 | 42 | # checkout on a machine with no COSMIC still builds. |
| @@ -179,12 +179,22 @@ apk action="build": | ||
| 179 | 179 | # window is libcosmic and the terminal is libjolttui, and those are the two. |
| 180 | 180 | # |
| 181 | 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 | 188 | #!/usr/bin/env bash |
| 184 | 189 | set -euo pipefail |
| 185 | 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 | 196 | 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 | 198 | fi |
| 189 | 199 | |
| 190 | 200 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| @@ -197,11 +207,11 @@ run *args: | ||
| 197 | 207 | |
| 198 | 208 | exec "${runner[@]}" jolt -Sdeps "$deps" -m frq.cosmic "$@" |
| 199 | 209 | |
| 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 | |
| 201 | 211 | # backend at all any more, and `frq.tui` requires glimmer-tui so the one |
| 202 | 212 | # installed is the terminal. |
| 203 | 213 | # |
| 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 | |
| 205 | 215 | # driver, which is the reason this output exists on machines that have none. |
| 206 | 216 | # |
| 207 | 217 | # What may appear in common/, checked — the half of the tree both backends |
| @@ -256,7 +266,8 @@ nrepl *args: | ||
| 256 | 266 | # `jolt` in the repo root does not work on its own: deps.edn carries |
| 257 | 267 | # :jolt/native, so every invocation here loads libvidya and libjoltmoq before it |
| 258 | 268 | # 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 | |
| 260 | 271 | # extra care about the GL driver. |
| 261 | 272 | # |
| 262 | 273 | # A jolt with the native libraries under it: a REPL, or `just repl nrepl-server`. |
| @@ -323,8 +334,8 @@ gen-moq lib="": | ||
| 323 | 334 | # The other desktop GUI: the same screens, painted by Flutter instead of |
| 324 | 335 | # libcosmic. |
| 325 | 336 | # |
| 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 | |
| 328 | 339 | # screens, the cells, `frq.io` — is shared; what differs is who paints it and |
| 329 | 340 | # who answers the host. So this recipe is `just apk` with the Android half |
| 330 | 341 | # taken out: the same `clojure -M:cljd compile` over the same flutter/src, |
| @@ -336,7 +347,7 @@ gen-moq lib="": | ||
| 336 | 347 | # writable-ANDROID_HOME dance — nothing here writes into the store — so there |
| 337 | 348 | # is no `flutter/.home` on this path. |
| 338 | 349 | # |
| 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 | |
| 340 | 351 | # through GL, and off NixOS the driver is the host's. |
| 341 | 352 | # |
| 342 | 353 | # 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 and | 7 | # 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 for | 9 | # 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, so | 37 | # 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 | 38 | +# `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 machine | 39 | +# 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 the | 40 | # 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: a | 41 | # 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 bash | 188 | #!/usr/bin/env bash |
| 184 | set -euo pipefail | 189 | 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:-}" ]; then | 196 | 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 | fi | 198 | 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 no | 210 | +# `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 one | 211 | # 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 GL | 214 | +# 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 backends | 217 | # 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 carries | 266 | # `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 it | 267 | # :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. So | 268 | # 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 | ||
| 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 of | 334 | # 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 is | 337 | +# `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/` — the | 338 | +# 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 and | 339 | # 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 half | 340 | # 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 there | 347 | # 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 paints | 350 | +# 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 bundle | 353 | # just flutter-desktop build the debug bundle |
modified
src/frq/cosmic.clj +1 -1 | @@ -15,7 +15,7 @@ | ||
| 15 | 15 | and keeps it, so glimmer's loop runs on a worker. The timers handed to |
| 16 | 16 | `start!` are glimmer-cosmic's, which run on that worker. |
| 17 | 17 | |
| 18 | - just run" | |
| 18 | + just cosmic run" | |
| 19 | 19 | (:require [frq.app :as app] |
| 20 | 20 | [frq.platform :as platform] |
| 21 | 21 | [frq.state :as s] |
| @@ -15,7 +15,7 @@ | |||
| 15 | and keeps it, so glimmer's loop runs on a worker. The timers handed to | 15 | 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 @@ | ||
| 1 | 1 | #!/usr/bin/env python3 |
| 2 | 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` | |
| 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. | |
| 6 | 6 | A phone has no cosmic-config, so the APK cannot ask — the values are read here |
| 7 | 7 | instead, on the machine that has them, and compiled in. |
| 8 | 8 | |
| @@ -94,10 +94,10 @@ def main() -> None: | ||
| 94 | 94 | "", |
| 95 | 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`", | |
| 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."', | |
| 101 | 101 | ' (:require ["package:flutter/material.dart" :as m]))', |
| 102 | 102 | "", |
| 103 | 103 | f";; {mode} theme, from ~/.config/cosmic.", |
| @@ -1,8 +1,8 @@ | |||
| 1 | #!/usr/bin/env python3 | 1 | #!/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 here | 6 | 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.", |