nushell: update config

This commit is contained in:
notohh 2025-03-13 03:45:35 -04:00
parent a99c9a70ae
commit fb67c6f3fc
Signed by: notohh
GPG key ID: BD47506D475EE86D

View file

@ -18,14 +18,7 @@ alias grep = rg
alias build = nh os boot .
alias switch = nh os switch .
alias clean = sudo nh clean all
alias deploy = nix run github:serokell/deploy-rs -- --targets
alias sakura = nix run github:serokell/deploy-rs ".#sakura"
alias kariru = nix run github:serokell/deploy-rs ".#kariru"
alias yuki = nix run github:serokell/deploy-rs ".#yuki"
alias arashi = nix run github:serokell/deploy-rs ".#arashi"
alias sora = nix run github:serokell/deploy-rs ".#sora"
alias tsuru = nix run github:serokell/deploy-rs ".#tsuru"
alias haru = nix run github:serokell/deploy-rs ".#haru"
alias deploy = nix run github:serokell/deploy-rs -- --skip-checks --targets
alias dl = yt-dlp -P ~/Videos/downloaded
alias dlad = yt-dlp -x --audio-format mp3 --embed-thumbnail
alias dlcd = yt-dlp
@ -34,64 +27,63 @@ alias shorten = rpaste -s "https://i.flake.sh/" -e 1day -u
alias send = croc --relay "100.104.42.96:9009" send
alias receive = croc --relay "100.104.42.96:9009"
alias ps = procs
alias tail = tspin
alias spotify = spotify_player
alias zed = zeditor .
alias ts = tspin
alias generate-topology = nix build ".#topology.x86_64-linux.config.output"
nitch
$env.config = {
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
use_ls_colors: true
clickable_links: true
}
rm: {
always_trash: false # always act as if -t was given. Can be overridden with -p
always_trash: false
}
table: {
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
mode: rounded
index_mode: always
trim: {
methodology: wrapping # wrapping or truncating
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
methodology: wrapping
wrapping_try_keep_words: true
truncating_suffix: "..."
}
}
history: {
max_size: 10000 # Session has to be reloaded for this to take effect
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
file_format: "sqlite" # "sqlite" or "plaintext"
max_size: 10000
sync_on_enter: true
file_format: "sqlite"
}
completions: {
case_sensitive: false # set to true to enable case-sensitive completions
quick: true # set this to false to prevent auto-selecting completions when only one remains
partial: true # set this to false to prevent partial filling of the prompt
algorithm: "prefix" # prefix or fuzzy
case_sensitive: false
quick: true
partial: true
algorithm: "prefix"
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: null # check 'carapace_completer' above as an example
enable: true
max_results: 100
completer: null
}
}
footer_mode: "auto" # always, never, number_of_rows, auto
footer_mode: "auto"
float_precision: 2
# buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
buffer_editor: "hx"
use_ansi_coloring: true
edit_mode: vi # emacs, vi
shell_integration: {} # enables terminal markers and a workaround to arrow keys stop working issue
show_banner: false # true or false to enable or disable the banner
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
edit_mode: vi
shell_integration: {}
show_banner: false
render_right_prompt_on_last_line: false
hooks: {
pre_prompt: [{ ||
null # replace with source code to run before the prompt is shown
null
}]
pre_execution: [{ ||
null # replace with source code to run before the repl input is run
null
}]
env_change: {
PWD: [{|before, after|
null # replace with source code to run if the PWD environment is different since the last repl input
null
}]
}
display_output: { ||
@ -100,8 +92,6 @@ $env.config = {
}
menus: [
# Configuration for default nushell menus
# Note the lack of souce parameter
{
name: completion_menu
only_buffer_difference: false
@ -109,7 +99,7 @@ $env.config = {
type: {
layout: columnar
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_width: 20
col_padding: 2
}
style: {
@ -139,7 +129,7 @@ $env.config = {
type: {
layout: description
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_width: 20
col_padding: 2
selection_rows: 4
description_rows: 10
@ -150,9 +140,6 @@ $env.config = {
description_text: yellow
}
}
# Example of extra menus created using a nushell source
# Use the source field to create a list of records that populates
# the menu
{
name: commands_menu
only_buffer_difference: false
@ -223,7 +210,7 @@ $env.config = {
name: completion_menu
modifier: none
keycode: tab
mode: vi_normal # Options: emacs vi_normal vi_insert
mode: vi_normal
event: {
until: [
{ send: menu name: completion_menu }
@ -235,7 +222,7 @@ $env.config = {
name: completion_previous
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
mode: [emacs, vi_normal, vi_insert]
event: { send: menuprevious }
}
{
@ -297,7 +284,6 @@ $env.config = {
]
}
}
# Keybindings used to trigger the user defined menus
{
name: commands_menu
modifier: control