mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-05 23:26:23 +01:00
Compare commits
No commits in common. "6f5884a8a39517d98f9f92d1ce2f7a8fce58bc83" and "1b802a90de117e0f2c5fd7ef4997487d83547d80" have entirely different histories.
6f5884a8a3
...
1b802a90de
|
@ -6,7 +6,7 @@
|
||||||
}: let
|
}: let
|
||||||
addNuShebang = path:
|
addNuShebang = path:
|
||||||
builtins.concatStringsSep "\n\n" [
|
builtins.concatStringsSep "\n\n" [
|
||||||
"#!${pkgs.nushell}/bin/nu"
|
"#!${pkgs.nushellFull}/bin/nu"
|
||||||
(builtins.readFile path)
|
(builtins.readFile path)
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
plugin use query;
|
plugin use query;
|
||||||
plugin use polars;
|
plugin use polars;
|
||||||
plugin use formats;
|
plugin use formats;
|
||||||
|
|
||||||
nu ${../../other/scripts/desktop/shell-startup.nu};
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
programs.starship.enableNushellIntegration = true;
|
programs.starship.enableNushellIntegration = true;
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
def "is even" [] {
|
|
||||||
$in mod 2 == 0
|
|
||||||
}
|
|
||||||
|
|
||||||
const TRANS = [ 5BCEFA F5A9B8 FFFFFF F5A9B8 5BCEFA ];
|
|
||||||
const LESBIAN = [ D52D00 EF7627 FF9A56 FFFFFF D162A4 B55690 A30262 ];
|
|
||||||
const ENBY = [ FCF434 FFFFFF 9C59D1 2C2C2C ];
|
|
||||||
|
|
||||||
def flag [
|
|
||||||
colors: list<string>
|
|
||||||
] {
|
|
||||||
use std;
|
|
||||||
|
|
||||||
let col_size = (term size | get columns) / ($colors | length) | math floor;
|
|
||||||
mut rest = (term size | get columns) - ($col_size * ($colors | length));
|
|
||||||
|
|
||||||
mut cols = $colors | wrap color | insert width $col_size | flatten;
|
|
||||||
let last = ($colors | length) - 1;
|
|
||||||
|
|
||||||
$cols = if not ($rest | is even) {
|
|
||||||
$rest = $rest - 1;
|
|
||||||
|
|
||||||
(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);
|
|
||||||
|
|
||||||
let amount = $rest / 2;
|
|
||||||
|
|
||||||
$cols = ($cols | update 0 { $in | update width {|w| ($w.width + $amount) } } | update $last { $in | update width {|w| ($w.width + $amount) } });
|
|
||||||
|
|
||||||
print ($cols | each {|col|
|
|
||||||
"=" | std repeat $col.width | prepend (ansi {fg: $"#($col.color)" }) | str join
|
|
||||||
} | prepend (ansi attr_bold) | append (ansi reset) | str join)
|
|
||||||
}
|
|
||||||
|
|
||||||
def main [] {
|
|
||||||
flag $TRANS;
|
|
||||||
print $"(ansi attr_bold) Hi jade, you're on HRT for ((date now) - ('2024-02-18T20:53' | into datetime) | format duration month)s now!";
|
|
||||||
flag $LESBIAN;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue