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:
parent
80df447c83
commit
c5865e0825
10 changed files with 311 additions and 38 deletions
51
custom-menus/zoxide-menu.nu
Normal file
51
custom-menus/zoxide-menu.nu
Normal 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)])
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue