mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-05 08:37:46 +00:00
refactor: ✨ (#418)
* refactor: ✨ move in one commit Eveything in modules should probably be changed to `exported` defs. The idea is to move everything first to keep proper history. * refactor: 📝 add modules readme (wip) * refactor: ✨ small move * refactor: 📝 changed nestring, updated modules readme * refactor: 📝 to document or not to document * fix: 🐛 themes replaced the template to use `main` and regenerated them from lemnos themes. * Revert "fix: 🐛 themes" This reverts commit 4918d3633c8d2d81950a0ed0cfd9eb84241bc886. * refactor: ✨ introduce sourced - Created a source `root` in which sourcable demos are stored. Some might get converted to modules later on. - Moved some files to bin too. * fix: 🐛 fehbg.nu * fix: 🐛 modules/after.nu * moved some other stuff around --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
parent
382696cd21
commit
c47ccd42b8
128 changed files with 185 additions and 12 deletions
48
modules/base16/README.md
Normal file
48
modules/base16/README.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Base16 themes integration
|
||||
|
||||
This folder contains a couple of files that let you configure Nushell and other terminal tools to use base16 themes.
|
||||
|
||||
## Requirements
|
||||
|
||||
Assumes a Linux system with an X-based window manager.
|
||||
Specific packages and environment variable requirements are listed in each file.
|
||||
|
||||
## Files explanation
|
||||
* **base16.nu** - Main module -- see comments inside
|
||||
* **auto_base16.nu** - Generates a base16 theme from a wallpaper
|
||||
* **alacritty_colors.template** - Template for Alacritty terminal colors
|
||||
|
||||
## Example integration
|
||||
|
||||
Fist, set up base16 theme generation from a wallpaper:
|
||||
```
|
||||
# ~/.xinitrc
|
||||
|
||||
...
|
||||
|
||||
[ -f ~/.auto_base16.nu ] && ~/.auto_base16.nu &
|
||||
```
|
||||
This will generate a base16 theme to a file from a current wallpaper.
|
||||
You can combine this with a random wallpaper generation using the fehbg.nu
|
||||
script for more chaos fun.
|
||||
|
||||
Next, set up Nushell config, assuming the base16 colors are generated
|
||||
```
|
||||
# config.nu
|
||||
|
||||
use ~/.config/nushell/base16.nu
|
||||
|
||||
# File containing base16 colors
|
||||
let-env BASE16_TXT = "/tmp/base16.txt"
|
||||
|
||||
let config = {
|
||||
color_config: (base16 build-nu-config $env.BASE16_TXT)
|
||||
}
|
||||
```
|
||||
|
||||
To select a new wallpaper and regenerate the base16 config:
|
||||
```
|
||||
> base16 new-wallpaper
|
||||
|
||||
> source ~/.config/nushell/config.nu
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue