From b8a4eea53b2e243f7aa8b0e89ff3d6e0826ff8e6 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 27 Apr 2023 14:33:00 -0500 Subject: [PATCH] trying out nushell --- alacritty/alacritty.yml | 2 +- user/home.nix | 54 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index fcfdbc7..f98459f 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -357,7 +357,7 @@ colors: # - (Linux/BSD) user login shell # - (Windows) powershell shell: - program: fish + program: nu # args: # - --login diff --git a/user/home.nix b/user/home.nix index 0833999..8630676 100644 --- a/user/home.nix +++ b/user/home.nix @@ -412,6 +412,27 @@ programs.nushell = { enable = true; + shellAliases = { + # ls = "exa -l"; + la = "exa -la"; + mpf = "mpv --profile=fast"; + mps = "mpv --profile=slow"; + ec = "emacsclient -t"; + ecc = "emacsclient -c"; + # mkdir = "mkdir -p"; + nupd = "update-nix"; + nupg = "upgrade-nix"; + suspend = "systemctl suspend"; + sysuse = "systemctl --user"; + myip = "curl icanhazip.com"; + nixs = "nix search nixpkgs"; + ytd = "yt-dlp -o '~/Videos/%(title)s.%(ext)s'"; + }; + extraConfig = '' + let-env config = { + show_banner: false + } + ''; }; home.file.".config/dunst" = { @@ -505,6 +526,37 @@ programs.starship = { enable = true; enableBashIntegration = true; + settings = { + format = '' + \[(dimmed gray) $username$hostname$directory\](dimmed gray) + $character + ''; + right_format = '' + $git_branch$git_status$rust$nix_shell + ''; + scan_timeout = 10; + rust = { + format = "[$symbol($version )]($style)"; + }; + cmake = { + format = ""; + disabled = true; + }; + nix_shell = { + format = "[$symbol$state( \($name\))]($style) "; + impure_msg = " "; + pure_msg = " "; + }; + hostname = { + format = "@[$ssh_symbol$hostname]($style) > '"; + }; + git_branch = { + format = "[$symbol$branch(:$remote_branch)]($style) "; + }; + git_status = { + format = "[\\[$all_status$ahead_behind\\]]($style) |(dimmed gray) "; + }; + }; }; programs.bash = { @@ -513,7 +565,6 @@ # export ENV_EFI_CODE_SECURE=/run/libvirt/nix-ovmf/OVMF_CODE.fd ENV_EFI_VARS_SECURE=/run/libvirt/nix-ovmf/OVMF_VARS.fd source $(blesh-share)/ble.sh ble-face auto_complete="fg=238" - # eval "$(starship init bash)" # export LESS_TERMCAP_mb=$'\e[1;32m' # export LESS_TERMCAP_md=$'\e[1;32m' # export LESS_TERMCAP_me=$'\e[0m' @@ -521,6 +572,7 @@ # export LESS_TERMCAP_so=$'\e[01;33m' # export LESS_TERMCAP_ue=$'\e[0m' # export LESS_TERMCAP_us=$'\e[1;4;31m' + eval "$(starship init bash)" ''; };