diff --git a/README.md b/README.md index a31c033..960a9c9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ # eufon > *euphony*: _noun_ Harmonious arrangement of sounds in composition; a smooth and agreeable combination of articulate elements in any piece of writing. + +A mostly Fennel-based graphical environment tailored for the Pinephone +(other Linux-based mobile devices exist). The principles we aspire to are + +* "habitable software" - build the system in such a way that a + technically competent user may change it to serve their needs, + potentially even in ways that weren't anticipated in the original + design. Emacs has this quality. + +* optimised for touchscreens. My phone has no hardware keyboard and few + hardware buttons, let's play to its strengths instead of compensating for + its weaknesses + +As of 2022 these principles are more aspirational than actual. + +## Running it + + $ nix-shell build.nix + nix-shell$ lua -e 'os.execute("kiwmi -c init.lua")' + +This is suboptimally hairy, at least for the moment: Nix makes a +wrapper script for the Lua executable that has appropriate `LUA_PATH` +and `LUA_CPATH` settings, but it doesn't do the same for kiwmi diff --git a/default.nix b/default.nix index 82cfdf9..d0fa895 100644 --- a/default.nix +++ b/default.nix @@ -1,14 +1,19 @@ { stdenv , callPackage +, fennel , lua5_3 - } : let - kiwmi = callPackage ./kiwmi.nix { lua = lua5_3; }; + fennel_ = (fennel.override { lua = lua5_3; }); + luaWithPackages = lua5_3.withPackages (ps: with ps; [ + (toLuaModule fennel_) + busted + ]); + kiwmi = callPackage ./kiwmi.nix { lua = luaWithPackages; }; in stdenv.mkDerivation { pname = "eufon"; version = "0.1"; - buildInputs = [ kiwmi ]; + buildInputs = [ luaWithPackages kiwmi ]; src = ./.; } diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..4dbadcc --- /dev/null +++ b/init.lua @@ -0,0 +1,6 @@ +print(os.getenv("LUA_PATH")) +print(os.getenv("LUA_CPATH")) + +local fennel = require("fennel") +table.insert(package.loaders or package.searchers, fennel.searcher) +fennel.dofile("rc.fnl") diff --git a/rc.fnl b/rc.fnl new file mode 100644 index 0000000..9038d26 --- /dev/null +++ b/rc.fnl @@ -0,0 +1,4 @@ +(kiwmi:on "output" #(doto $1 (: :set_mode 360 720 0))) + +(kiwmi:spawn "swaybg -c '#ff00ff'") +(kiwmi:spawn "foot")