mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-05 15:16:23 +01:00
Compare commits
2 commits
6f5884a8a3
...
3d2719f2f7
Author | SHA1 | Date | |
---|---|---|---|
3d2719f2f7 | |||
b23856722c |
|
@ -2,6 +2,8 @@ def "is even" [] {
|
|||
$in mod 2 == 0
|
||||
}
|
||||
|
||||
# TODO: flag stuff as module to be used in other stuff in shell
|
||||
|
||||
const TRANS = [ 5BCEFA F5A9B8 FFFFFF F5A9B8 5BCEFA ];
|
||||
const LESBIAN = [ D52D00 EF7627 FF9A56 FFFFFF D162A4 B55690 A30262 ];
|
||||
const ENBY = [ FCF434 FFFFFF 9C59D1 2C2C2C ];
|
||||
|
@ -17,14 +19,14 @@ def flag [
|
|||
mut cols = $colors | wrap color | insert width $col_size | flatten;
|
||||
let last = ($colors | length) - 1;
|
||||
|
||||
$cols = if not ($rest | is even) {
|
||||
if not ($rest | is even) {
|
||||
$rest = $rest - 1;
|
||||
|
||||
(if not ($colors | length | is even) {
|
||||
$cols = (if not ($colors | length | is even) {
|
||||
$cols | update (($colors | length) / 2 | math floor) { $in | update width {|w| ($w.width + 1)}}
|
||||
} else {
|
||||
$cols | update $last { $in | update width {|w| ($w.width + 1)}}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
std assert ($rest | is even);
|
||||
|
|
Loading…
Reference in a new issue