mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2025-11-17 17:19:41 +01:00
Compare commits
No commits in common. "3d2719f2f7dbba1ad806734228271394116bcb5e" and "6f5884a8a39517d98f9f92d1ce2f7a8fce58bc83" have entirely different histories.
3d2719f2f7
...
6f5884a8a3
1 changed files with 3 additions and 5 deletions
|
|
@ -2,8 +2,6 @@ def "is even" [] {
|
||||||
$in mod 2 == 0
|
$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 TRANS = [ 5BCEFA F5A9B8 FFFFFF F5A9B8 5BCEFA ];
|
||||||
const LESBIAN = [ D52D00 EF7627 FF9A56 FFFFFF D162A4 B55690 A30262 ];
|
const LESBIAN = [ D52D00 EF7627 FF9A56 FFFFFF D162A4 B55690 A30262 ];
|
||||||
const ENBY = [ FCF434 FFFFFF 9C59D1 2C2C2C ];
|
const ENBY = [ FCF434 FFFFFF 9C59D1 2C2C2C ];
|
||||||
|
|
@ -19,14 +17,14 @@ def flag [
|
||||||
mut cols = $colors | wrap color | insert width $col_size | flatten;
|
mut cols = $colors | wrap color | insert width $col_size | flatten;
|
||||||
let last = ($colors | length) - 1;
|
let last = ($colors | length) - 1;
|
||||||
|
|
||||||
if not ($rest | is even) {
|
$cols = if not ($rest | is even) {
|
||||||
$rest = $rest - 1;
|
$rest = $rest - 1;
|
||||||
|
|
||||||
$cols = (if not ($colors | length | is even) {
|
(if not ($colors | length | is even) {
|
||||||
$cols | update (($colors | length) / 2 | math floor) { $in | update width {|w| ($w.width + 1)}}
|
$cols | update (($colors | length) / 2 | math floor) { $in | update width {|w| ($w.width + 1)}}
|
||||||
} else {
|
} else {
|
||||||
$cols | update $last { $in | update width {|w| ($w.width + 1)}}
|
$cols | update $last { $in | update width {|w| ($w.width + 1)}}
|
||||||
});
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
std assert ($rest | is even);
|
std assert ($rest | is even);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue