From 5a1252da4b5f021106d82c4603432500dc92cd85 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Wed, 12 Jun 2024 13:26:34 +0200 Subject: [PATCH] update nushell stuff --- common.nix | 3 ++- modules/shell/nu.nix | 5 +++++ other/config.nu | 38 +++++++++++++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/common.nix b/common.nix index 2d1320d..dafa9d7 100644 --- a/common.nix +++ b/common.nix @@ -116,6 +116,7 @@ with builtins; { }; hardware.gpgSmartcards.enable = true; + time.timeZone = "Europe/Berlin"; home-manager.users.jade = { @@ -156,5 +157,5 @@ with builtins; { algorithm = "zstd"; }; - users.defaultUserShell = pkgs.nushellFull; + users.defaultUserShell = pkgs.nushell; } diff --git a/modules/shell/nu.nix b/modules/shell/nu.nix index 24d3e6a..f338d7e 100644 --- a/modules/shell/nu.nix +++ b/modules/shell/nu.nix @@ -11,6 +11,11 @@ }; home.packages = [ pkgs.pueue + pkgs.nushellPlugins.net + pkgs.nushellPlugins.query + pkgs.nushellPlugins.gstat + pkgs.nushellPlugins.polars + pkgs.nushellPlugins.formats ]; programs.nushell = { enable = true; diff --git a/other/config.nu b/other/config.nu index 0f359b5..9435b28 100644 --- a/other/config.nu +++ b/other/config.nu @@ -42,6 +42,7 @@ let dark_theme = { shape_directory: cyan shape_external: cyan shape_externalarg: green_bold + shape_external_resolved: light_cyan_bold shape_filepath: cyan shape_flag: blue_bold shape_float: purple_bold @@ -238,7 +239,36 @@ $env.config = { use_ansi_coloring: true bracketed_paste: true # enable bracketed paste, currently useless on windows edit_mode: vi # emacs, vi - shell_integration: true # enables terminal shell integration. Off by default, as some terminals have issues with this. + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - NOT IMPLEMENTED - Explicitly set the command line with an optional nonce + # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: false + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } + use_kitty_protocol: false + highlight_resolved_externals: true 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. hooks: { @@ -781,6 +811,12 @@ def start_zellij [] { start_zellij +# plugin add nu_plugin_net +# plugin add nu_plugin_gstat +# plugin add nu_plugin_query +# plugin add nu_plugin_polars +# plugin add nu_plugin_formats + def nsp [ ...programs: string ] {