Skip to content

Commit

Permalink
at least program can draw one key cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanwang-wf committed Apr 9, 2024
1 parent 4404d00 commit 7349f6e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
3 changes: 3 additions & 0 deletions circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions maLiang/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# cabal
dist
dist-*
cabal.project.local
cabal.project.local~
*.hi
*.o
# nix
result
result-*

# direnv
.direnv
22 changes: 17 additions & 5 deletions maLiang/app/DiagramsTutorial.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@
>
> import Diagrams.Prelude
> import Diagrams.Backend.SVG.CmdLine
>
> myCircle :: Diagram B
> myCircle = circle 1
>
> main = mainWith myCircle
> minorKey = square 0.2 # scaleY 0.3
> centerKey :: Diagram B
> centerKey = square 0.2
> west :: Diagram B
> west = vMinorKey
> east :: Diagram B
> east = vMinorKey
> row :: Diagram B
> vMinorKey = square 0.2 # scaleX 0.3
> row = hcat [west, centerKey, east]
> northKey :: Diagram B
> northKey = minorKey
> southKey :: Diagram B
> southKey = minorKey
> example :: Diagram B
> example = (hcat [strutX 0.2 # scaleX 0.3, northKey]) === ( hcat . map alignT $ [west, centerKey, east]) === (hcat [strutX 0.2 # scaleX 0.3, southKey])
> main = mainWith example
2 changes: 1 addition & 1 deletion readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ the app to generate keymap svg based on qmk c2json result
~❯ nix build --option system x86_64-darwin~
* how to draw
~nix build .#drawer .#firmware~

~nix run .#maLiang -- -o circle.svg -w 400 -l -s ./maLiang/app/DiagramsTutorial.lhs~
* Reference
- https://github.com/manna-harbour/miryoku/blob/master/docs/reference/readme.org
- https://github.com/Bastardkb/bastardkb-qmk/tree/d77f807d78bf19b6fd834b049103e127b5c760a9/keyboards/bastardkb/charybdis/3x5/keymaps/via
Expand Down

0 comments on commit 7349f6e

Please sign in to comment.