mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-03-13 00:22:49 +00:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
21
dot_config/nushell/nu_scripts/modules/prompt/shell_space.nu
Normal file
21
dot_config/nushell/nu_scripts/modules/prompt/shell_space.nu
Normal file
@@ -0,0 +1,21 @@
|
||||
# use shells to to show workspaces
|
||||
def workspaces [] {
|
||||
shells | each {|item index|
|
||||
if $item.active {
|
||||
$"(ansi green)($index) "
|
||||
} else {
|
||||
$"(ansi blue)($index) "
|
||||
}
|
||||
}| str join
|
||||
}
|
||||
|
||||
def create_right_prompt [] {
|
||||
let time_segment = ([
|
||||
(date now | format date '%r'),
|
||||
" ",
|
||||
(workspaces)
|
||||
] | str join)
|
||||
$time_segment
|
||||
}
|
||||
|
||||
$env.PROMPT_COMMAND_RIGHT = { create_right_prompt }
|
||||
Reference in New Issue
Block a user