Commit Graph

20 Commits

Author SHA1 Message Date
winston
66c76a9dbd
fix: adjust for nushell commandline syntax deprecation (#840)
Fixes for changes introduced by
https://github.com/nushell/nushell/pull/12658
2024-05-19 13:33:08 -05:00
Alexis Praga
74f23a4980
Support for catppuccin-latte (#741)
Complete the support for catppucin-mocha.

It looks like there's work for a better way to manage that (
https://github.com/catppuccin/catppuccin/discussions/2140 ) but this can
help other people.
2024-03-07 06:18:50 -06:00
Antoine Stevan
f04cb445e4
rename package files (#701)
related to
- https://github.com/nushell/nupm/pull/51

depends on
- https://github.com/nushell/nu_scripts/pull/700

> **Important**
> this PR will be rebased once #700 lands and only
a5a6b6f950
is relevant here

## description
this is a simple rename of `package.nuon` files to `nupm.nuon` as per
https://github.com/nushell/nupm/pull/51.
2024-02-18 16:23:47 +01:00
Antoine Stevan
4180ce853c
split the package into nu-themes and nu-hooks (#700)
related to 
- https://github.com/nushell/nupm/pull/50

## description
`nu-scripts` was not really a package but rather a set of two module
packages.
this feature has been removed from Nupm in
https://github.com/nushell/nupm/pull/50 and this PR fixes the
`nu-scripts` packages.

> **Note**
> the files in `nu-hooks/` have been moved to `nu-hooks/nu-hooks/` to
fit into the current model of Nupm

this PR does not change anything from the user point of view, apart from
the install that goes from
```nushell
nupm install --path --force .
```
to
```nushell
for pkg in (ls **/package.nuon | get name | path dirname) {
    nupm install --force --path $pkg
}
```
2024-02-18 16:21:35 +01:00
adrian5
b23755c895
Add tokyo-moon theme variant (#710)
Closes #702. I was wrong in thinking the "night" and "storm" variants
should be much different — they're not. It's the divergent "moon"
variant between them that was missing. Added.

I have slight doubts about the darker gray `#828bb8` being used for e.g.
`ls` columns, but I think that basically correct. The high-contrast
foreground color `#c8d3f5` is the bright variant of that and should show
up in most other contexts I reckon.
2023-12-21 18:08:34 -06:00
Antoine Stevan
8add04deb8
update the nu-themes readme (#652)
related to
-
https://discord.com/channels/601130461678272522/601130461678272524/1167879553918705705

## description
this PR updates the README of the `nu-themes` module in the `nu-scripts`
package:
- fix the path with `themes/nu-themes/` instead of `themes/themes/`
- adds some instructions to use `nupm`

> **Note**
> see the [new README
here](https://github.com/amtoine/nu_scripts/tree/update-nu-themes-readme/themes#use-a-colorscheme)
2023-10-29 07:55:13 -05:00
Antoine Stevan
cc0719bdad
make the themes a module (#648)
related to
- https://github.com/nushell/nupm/pull/33

## description
with https://github.com/nushell/nupm/pull/33, Nupm can now install
separate modules from a single package 🥳

the `nu_scripts` are a package and looks like they contain a few
potential standalone modules:
- the themes
- the hooks
- the custom completions
- ...

this PR is a proposal to move `themes/` to `nu-themes/` and add
`./nu-themes/` as a module to the `nu-scripts` package.
that way when running `nupm install --path .` in the root of the
`nu_scripts`, a `nu-themes` module will be installed in
`$env.NUPM_HOME/modules`.

then one can run
```nushell
use nu-themes/themes/nushell-dark.nu
```
and next get the theme with
```nushell
nushell-dark
```
2023-10-23 18:25:04 +02:00
Zinvoke
c352f26154
FEATURE: add catppuccin-mocha theme (#601)
* FEATURE: add `catppuccin-mocha` theme

* FEATURE: add `catppuccin-mocha` theme
2023-09-12 18:20:16 -05:00
Antoine Stevan
a61256da0e
use $env. instead of let-env (#543)
related to nushell/nushell#9574

Commands used
```nushell
sd --string-mode "let-env " '$env.' **/*
git rst before_v0.60/
```
2023-07-01 10:40:16 +02:00
Darren Schroeder
424e8d61a5
add screenshot link 2023-06-12 12:03:56 -05:00
Darren Schroeder
716129378a
create readme.md with theme previews (#519)
* create readme.md with theme previews

* fix bug, tweak themes

* update themes

* re-add readme.md
2023-06-12 11:57:22 -05:00
Antoine Stevan
6d5afb6a38
add missing colors to the themes (#520)
* add the new `search_result` from nushell/nushell#9326

NOTE: color1 should be red-ish and color7 should be white-ish.

* regenerate all themes with the new `search_result` key

* add missing keys to the Nushell themes

these keys are "background", "foreground" and "cursor".
2023-06-02 13:05:20 -05:00
Antoine Stevan
771586844f
FEATURE: add term-dark and term-light themes from main nushell (#500)
* add `term-dark` and `term-light` themes from main `nushell`

* rename the themes: `{term=>nushell}-{dark,light}`
2023-05-18 07:42:29 -05:00
Antoine Stevan
ac1750246c
add the preview script (#501) 2023-05-17 13:15:04 -05:00
Antoine Stevan
792d8e37f6
FEATURE: allow to run themes/make script from anywhere (#499)
* fix the path

* ignore the `lemnos` base of themes
2023-05-17 13:10:43 -05:00
Antoine Stevan
fe93a6bac7
REFACTOR: make the indentation in the themes more consistent (#498)
* make the indentation consistent (4 spaces) in `themes/make.nu`

* regenerate the themes with `themes/make.nu`
2023-05-17 13:09:18 -05:00
Antoine Stevan
b9ec76b493
rewrite the theme generation (#437)
* remove the template

* update the theme generation script

* fix the local path to the lemnos themes

* use the real `export der main` module template

* remove the empty lines and the comments from theme files

* adapt the default config file theme to the template

This commit uses closures for `filesize`, `date` and `bool`.

* put quotes around all the colors in the template

* fix the `else` of `filesize` => returns a true record now

* use default colors for the filesize

* regenerate all the themes with `./make.nu`
2023-04-05 12:52:15 -05:00
Antoine Stevan
b5b7ae1410
FIX: define a main function to use the themes modules (#402)
* change the main command of the themes to `main`

Command used:
```
sd 'export def .* \[\] \{' 'export def main [] {' themes/themes/**/*
```

This commit mitigates the following equivalent error
```
>_ module spam { export def spam [] { "this is spam::spam" } }
Error: nu::parser::named_as_module

  × Can't export command named same as the module.
   ╭─[entry #74:1:1]
 1 │ module spam { export def spam [] { "this is spam::spam" } }
   ·                          ──┬─
   ·                            ╰── can't export from module spam
   ╰────
  help: Module spam can't export command named the same as the module. Either change the module name, or export `main`
        custom command.
```
when running `use themes/themes/dracula.nu` for instance.

* change the template as well to define a `main` function

* do not use * from the theme modules, they define a `main` function
2023-03-20 08:51:14 -05:00
WindSoilder
106e56f48b
Update README.md (#372) 2023-02-03 06:25:50 -06:00
Antoine Stevan
bdfed700a4
add a collection of colorschemes for nushell (#286)
* add my personal color config files

remove the useless colors.nu script

* add all lemnos theme files as a submodule

* add a template module from the default dark theme

the `map.csv` file:
```csv
code,bold,bash,nushell
0,false,black,black
1,false,red,red
2,false,green,green
3,false,yellow,yellow
4,false,blue,blue
5,false,magenta,purple
6,false,cyan,cyan
7,false,white,light_gray
8,true,black,dark_gray
9,true,red,red_bold
10,true,green,green_bold
11,true,yellow,yellow_bold
12,true,blue,blue_bold
13,true,magenta,purple_bold
14,true,cyan,light_cyan
14,true,cyan,cyan_bold
15,true,white,white
```

the command used was
```nushell
open map.csv |
each {
    |it|
    sed -i $"s/: ($it.nushell)$/: \"{{color($it.code)}}\"/" template.nu
}
```
or as a oneliner
```nushell
open map.csv | each {|it| sed -i $"s/: ($it.nushell)$/: \"{{color($it.code)}}\"/" template.nu}
```

* add a script to make all the scripts at once

* make all the themes

* add a README with some credits to lemnos

* add usage instructions to the README

* add desired values to the template

This commit adds the background, the foreground and the cursor
colors to the themes as commented lines.
These do not fit into any nushell theme as they should be set by the
terminal emulator, but they are included here for completeness.

Addresses https://github.com/nushell/nu_scripts/pull/286#issuecomment-1230814914

* regenerate the themes with the new template

* remove all the occurences of sed by str replace

* remove the lemnos submodule

Co-authored-by: amtoine <44101798+AntoineStevan@users.noreply.github.com>
2022-09-07 13:48:28 -05:00