Add cli utils and improve zstatus

main
Julius Riegel 7 months ago
parent 70369fed4c
commit d46c38b9f0

@ -449,3 +449,8 @@ source {{dirs.data}}/scripts/ytdl.nu
# broot # broot
source {{dirs.config}}/broot/launcher/nushell/br source {{dirs.config}}/broot/launcher/nushell/br
{{/if-installed}} {{/if-installed}}
{{#if-installed zoxide}}
source ~/.zoxide.nu
{{/if-installed}}

@ -78,3 +78,6 @@ if $env.NIX_PATH? != null {
$env.NIX_PATH = $"{{dirs.home}}/.nix-defexpr/channels:($env.NIX_PATH)" $env.NIX_PATH = $"{{dirs.home}}/.nix-defexpr/channels:($env.NIX_PATH)"
} }
{{/if-installed}} {{/if-installed}}
{{#if-installed zoxide}}
zoxide init nushell | save -f ~/.zoxide.nu
{{/if-installed}}

@ -10,37 +10,40 @@ layout {
children children
pane size=1 borderless=true { pane size=1 borderless=true {
plugin location="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" { plugin location="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" {
format_left "#[fg=#6C7086]{command_pwd} [{command_git_branch}]" format_left "{mode}#[fg=#181825,bg=#4b0082]{command_pwd}#[fg=#4b0082,bg=blue]{command_git_branch}#[fg=blue,bg=#181825]{tabs}"
format_center "{tabs}" format_right "{command_cpuusage}#[fg=cyan,bg=green]{command_memusage}#[fg=green,bg=#b1bbfa]{datetime}"
format_right "{command_cpuusage}#[fg=#6C7086] ∙ {command_memusage}#[fg=#6C7086] | {datetime}" format_space "#[bg=#181825]"
format_space ""
hide_frame_for_single_pane "true" hide_frame_for_single_pane "true"
tab_normal "#[fg=white,dim] {name} " tab_normal "#[fg=#181825,bg=#4C4C59] #[fg=#000000,bg=#4C4C59]{index}  {name} #[fg=#4C4C59,bg=#181825]"
tab_active "#[fg=purple,bold] {name} " tab_normal_fullscreen "#[fg=#6C7086,bg=#181825] {index} {name} [] "
tab_normal_sync "#[fg=#6C7086,bg=#181825] {index} {name} <> "
tab_active "#[fg=#181825,bg=#ffffff,bold,italic] {index} {name} #[fg=#ffffff,bg=#181825]"
tab_active_fullscreen "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} [] "
tab_active_sync "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} <> "
command_git_branch_command "git rev-parse --abbrev-ref HEAD" command_git_branch_command "git rev-parse --abbrev-ref HEAD"
command_git_branch_format "#[fg=blue] {stdout} " command_git_branch_format "#[fg=#181825,bg=blue] {stdout} "
command_git_branch_interval "10" command_git_branch_interval "10"
command_git_branch_rendermode "static" command_git_branch_rendermode "static"
command_pwd_command "nu -c '$env.PWD | path relative-to $env.HOME'" command_pwd_command "nu -c '$env.PWD | path relative-to $env.HOME'"
command_pwd_format "#[fg=#6C7086,bold]{stdout}" command_pwd_format "#[fg=#ffffff,bg=#4b0082] {stdout} "
command_pwd_interval "1" command_pwd_interval "1"
command_pwd_interval "static" command_pwd_interval "static"
command_cpuusage_command "nu -c 'sys | get cpu | get cpu_usage | math avg | math round -p 2 | $\"($in) %\"'" command_cpuusage_command "nu -c 'sys | get cpu | get cpu_usage | math avg | math round -p 2 | $\"($in) %\"'"
command_cpuusage_format "#[fg=cyan]{stdout}" command_cpuusage_format "#[fg=#181825,bg=cyan]{stdout} "
command_cpuusage_interval "10" command_cpuusage_interval "10"
command_cpuusage_interval "static" command_cpuusage_interval "static"
command_memusage_command "nu -c 'sys | get mem.used'" command_memusage_command "nu -c 'sys | get mem.used'"
command_memusage_format "#[fg=green]{stdout}" command_memusage_format "#[fg=#181825,bg=green] {stdout} "
command_memusage_interval "10" command_memusage_interval "10"
command_memusage_interval "static" command_memusage_interval "static"
datetime "#[fg=#6C7086,bold]{format} " datetime "#[fg=#181825,bg=#b1bbfa] {format} "
datetime_format "%A, %d %b %Y %H:%M" datetime_format "%A, %d %b %Y %H:%M"
datetime_timezone "Europe/Berlin" datetime_timezone "Europe/Berlin"
} }

@ -41,10 +41,17 @@ config.modules = {
'tealdeer', 'tealdeer',
'jq', 'jq',
'nodePackages.bash-language-server', 'nodePackages.bash-language-server',
'gh',
'glab',
'shellcheck', 'shellcheck',
'shfmt', 'shfmt',
'tree',
'yq',
'zoxide',
'dogdns',
'ouch',
'tailspin',
'topgrade',
'skim',
'pastel',
}, },
gui = mod { gui = mod {
'kdePackages.breeze-icons', 'kdePackages.breeze-icons',

Loading…
Cancel
Save