mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 22:57:46 +00:00
just a couple tweaks to scripts (#331)
This commit is contained in:
parent
22b4fda3ea
commit
c148f0782d
2 changed files with 17 additions and 15 deletions
|
@ -1,17 +1,19 @@
|
|||
let term_cols = ((term size).columns - 1)
|
||||
export def draw [] {
|
||||
let term_cols = ((term size).columns - 1)
|
||||
|
||||
# let's itertate through each of the columns of our terminal
|
||||
for col in 0..$term_cols {
|
||||
let r = (255 - ($col * 255 / $term_cols) | math round)
|
||||
let g = ($col * 510 / $term_cols | math round)
|
||||
let b = ($col * 255 / $term_cols | math round)
|
||||
if $g > 255 {
|
||||
let g = (510 - $g)
|
||||
build-colorstr $r $g $b $col
|
||||
} else {
|
||||
build-colorstr $r $g $b $col
|
||||
}
|
||||
} | str collect
|
||||
# let's itertate through each of the columns of our terminal
|
||||
for col in 0..$term_cols {
|
||||
let r = (255 - ($col * 255 / $term_cols) | math round)
|
||||
let g = ($col * 510 / $term_cols | math round)
|
||||
let b = ($col * 255 / $term_cols | math round)
|
||||
if $g > 255 {
|
||||
let g = (510 - $g)
|
||||
build-colorstr $r $g $b $col
|
||||
} else {
|
||||
build-colorstr $r $g $b $col
|
||||
}
|
||||
} | str collect
|
||||
}
|
||||
|
||||
def build-colorstr [
|
||||
r:int # Red
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
# display a table with the top 50 rows.
|
||||
# Whether you run in debug_csv mode or not, the output is written to csv files in the
|
||||
# $repos_root_folder/20k folder
|
||||
def get_pr_counts [debug_csv: bool] {
|
||||
def get_pr_counts [debug_csv: bool, repos_root_folder = '/Users/fdncred/src/forks'] {
|
||||
# let repos_root_folder = 'c:\users\dschroeder\source\repos\forks'
|
||||
let repos_root_folder = '/Users/fdncred/src/forks'
|
||||
# let repos_root_folder = '/Users/fdncred/src/forks'
|
||||
let repos = [[name, folder];
|
||||
[nushell, $'($repos_root_folder)(char psep)nushell'],
|
||||
[reedline, $'($repos_root_folder)(char psep)reedline'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue