1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

powerline : NU_POWER_MODE and NU_POWER_BENCHMARK (#464)

* powerline : NU_POWER_MODE and NU_POWER_BENCHMARK

* zoxide-menu

* direnv

* dynamic-load

* logtime

---------

Co-authored-by: agent <agent@nuc>
This commit is contained in:
fj0r 2023-04-27 02:36:55 +08:00 committed by GitHub
parent 80df447c83
commit c5865e0825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 311 additions and 38 deletions

View file

@ -0,0 +1,51 @@
def __zoxide_menu [] {
{
name: zoxide_menu
only_buffer_difference: true
marker: "| "
type: {
layout: columnar
page_size: 20
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
source: { |buffer, position|
zoxide query -ls $buffer
| parse -r '(?P<description>[0-9]+) (?P<value>.+)'
}
}
}
def __zoxide_keybinding [] {
{
name: zoxide_menu
modifier: control
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: [
{ send: menu name: zoxide_menu }
]
}
}
def __edit_keybinding [] {
{
name: edit
modifier: alt
keycode: char_e
mode: [emacs, vi_normal, vi_insert]
event: [
{ send: OpenEditor }
]
}
}
export-env {
let-env config = ($env.config
| upsert menus ($env.config.menus | append (__zoxide_menu))
| upsert keybindings ($env.config.keybindings | append [(__zoxide_keybinding) (__edit_keybinding)])
)
}