Compare commits
5 Commits
ff6bb86881
...
2cb9042040
Author | SHA1 | Date | |
---|---|---|---|
2cb9042040 | |||
48d8b50b5a | |||
0401ab01bf | |||
6a049c283f | |||
a667c5a237 |
@ -1,43 +1,3 @@
|
|||||||
[colors.bright]
|
import = [
|
||||||
black = "#4C566A"
|
"~/.config/alacritty/themes/themes/nightfox.toml"
|
||||||
blue = "#81A1C1"
|
]
|
||||||
cyan = "#8FBCBB"
|
|
||||||
green = "#A3BE8C"
|
|
||||||
magenta = "#B988B0"
|
|
||||||
red = "#BF616A"
|
|
||||||
white = "#ECEFF4"
|
|
||||||
yellow = "#EBCB8B"
|
|
||||||
|
|
||||||
[colors.hints.end]
|
|
||||||
background = "#4C566A"
|
|
||||||
foreground = "#81A1C1"
|
|
||||||
|
|
||||||
[colors.hints.start]
|
|
||||||
background = "#4C566A"
|
|
||||||
foreground = "#B988B0"
|
|
||||||
|
|
||||||
[colors.normal]
|
|
||||||
black = "#3B4252"
|
|
||||||
blue = "#81A1C1"
|
|
||||||
cyan = "#88C0D0"
|
|
||||||
green = "#A3BE8C"
|
|
||||||
magenta = "#B988B0"
|
|
||||||
red = "#BF616A"
|
|
||||||
white = "#E5E9F0"
|
|
||||||
yellow = "#EBCB8B"
|
|
||||||
|
|
||||||
[colors.primary]
|
|
||||||
background = "#2E3440"
|
|
||||||
foreground = "#C8D0E0"
|
|
||||||
|
|
||||||
[colors.search.focused_match]
|
|
||||||
background = "#4C566A"
|
|
||||||
foreground = "#EBCB8B"
|
|
||||||
|
|
||||||
[colors.search.matches]
|
|
||||||
background = "#4C566A"
|
|
||||||
foreground = "#81A1C1"
|
|
||||||
|
|
||||||
[colors.selection]
|
|
||||||
background = "#3F4758"
|
|
||||||
text = "CellForeground"
|
|
||||||
|
@ -1,43 +1,3 @@
|
|||||||
[colors.bright]
|
import = [
|
||||||
black = "#646A76"
|
"~/.config/alacritty/themes/themes/ayu_light.toml"
|
||||||
blue = "#1B40A6"
|
]
|
||||||
cyan = "#8FBCBB"
|
|
||||||
green = "#5F9E9D"
|
|
||||||
magenta = "#9665AF"
|
|
||||||
red = "#D16366"
|
|
||||||
white = "#ECEFF4"
|
|
||||||
yellow = "#BA793E"
|
|
||||||
|
|
||||||
[colors.hints.end]
|
|
||||||
background = "#646A76"
|
|
||||||
foreground = "#3879C5"
|
|
||||||
|
|
||||||
[colors.hints.start]
|
|
||||||
background = "#646A76"
|
|
||||||
foreground = "#9665AF"
|
|
||||||
|
|
||||||
[colors.normal]
|
|
||||||
black = "#2E3440"
|
|
||||||
blue = "#3879C5"
|
|
||||||
cyan = "#3EA1AD"
|
|
||||||
green = "#48A53D"
|
|
||||||
magenta = "#9F4ACA"
|
|
||||||
red = "#CB4F53"
|
|
||||||
white = "#E5E9F0"
|
|
||||||
yellow = "#EE5E25"
|
|
||||||
|
|
||||||
[colors.primary]
|
|
||||||
background = "#F7F8FA"
|
|
||||||
foreground = "#2E3440"
|
|
||||||
|
|
||||||
[colors.search.focused_match]
|
|
||||||
background = "#646A76"
|
|
||||||
foreground = "#EE5E25"
|
|
||||||
|
|
||||||
[colors.search.matches]
|
|
||||||
background = "#646A76"
|
|
||||||
foreground = "#3879C5"
|
|
||||||
|
|
||||||
[colors.selection]
|
|
||||||
background = "#EAEBED"
|
|
||||||
text = "CellForeground"
|
|
||||||
|
@ -2,12 +2,25 @@ local function cwd()
|
|||||||
return vim.fn.getcwd()
|
return vim.fn.getcwd()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function set_bg()
|
||||||
|
if vim.o.background == 'dark' then
|
||||||
|
vim.cmd.colorscheme("nightfox")
|
||||||
|
else
|
||||||
|
vim.cmd.colorscheme("dayfox")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('OptionSet', {
|
||||||
|
callback = set_bg,
|
||||||
|
pattern = { 'background' },
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- Colorscheme
|
-- Colorscheme
|
||||||
{
|
{
|
||||||
'rmehri01/onenord.nvim',
|
'EdenEast/nightfox.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme("onenord")
|
set_bg()
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -15,8 +15,9 @@ return {
|
|||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
'nvim-orgmode/orgmode', -- as configured together
|
'nvim-orgmode/orgmode', -- as configured together
|
||||||
'vrischmann/tree-sitter-templ',
|
'vrischmann/tree-sitter-templ',
|
||||||
|
"nushell/tree-sitter-nu", -- additional parser
|
||||||
},
|
},
|
||||||
build =
|
build =
|
||||||
':TSUpdate'
|
':TSUpdate'
|
||||||
@ -62,4 +63,9 @@ return {
|
|||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'crusj/hierarchy-tree-go.nvim',
|
||||||
|
dependencies = 'neovim/nvim-lspconfig',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
11
shell/.bashrc
Normal file
11
shell/.bashrc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# ~/.bashrc
|
||||||
|
#
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
which nu >/dev/null && exec nu
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
PS1='[\u@\h \W]\$ '
|
824
shell/.config/nushell/config.nu
Normal file
824
shell/.config/nushell/config.nu
Normal file
@ -0,0 +1,824 @@
|
|||||||
|
# Nushell Config File
|
||||||
|
#
|
||||||
|
# version = "0.89.0"
|
||||||
|
|
||||||
|
# For more information on defining custom themes, see
|
||||||
|
# https://www.nushell.sh/book/coloring_and_theming.html
|
||||||
|
# And here is the theme collection
|
||||||
|
# https://github.com/nushell/nu_scripts/tree/main/themes
|
||||||
|
let dark_theme = {
|
||||||
|
# color for nushell primitives
|
||||||
|
separator: white
|
||||||
|
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
|
||||||
|
header: green_bold
|
||||||
|
empty: blue
|
||||||
|
# Closures can be used to choose colors for specific values.
|
||||||
|
# The value (in this case, a bool) is piped into the closure.
|
||||||
|
# eg) {|| if $in { 'light_cyan' } else { 'light_gray' } }
|
||||||
|
bool: light_cyan
|
||||||
|
int: white
|
||||||
|
filesize: cyan
|
||||||
|
duration: white
|
||||||
|
date: purple
|
||||||
|
range: white
|
||||||
|
float: white
|
||||||
|
string: white
|
||||||
|
nothing: white
|
||||||
|
binary: white
|
||||||
|
cell-path: white
|
||||||
|
row_index: green_bold
|
||||||
|
record: white
|
||||||
|
list: white
|
||||||
|
block: white
|
||||||
|
hints: dark_gray
|
||||||
|
search_result: {bg: red fg: white}
|
||||||
|
shape_and: purple_bold
|
||||||
|
shape_binary: purple_bold
|
||||||
|
shape_block: blue_bold
|
||||||
|
shape_bool: light_cyan
|
||||||
|
shape_closure: green_bold
|
||||||
|
shape_custom: green
|
||||||
|
shape_datetime: cyan_bold
|
||||||
|
shape_directory: cyan
|
||||||
|
shape_external: cyan
|
||||||
|
shape_externalarg: green_bold
|
||||||
|
shape_external_resolved: light_yellow_bold
|
||||||
|
shape_filepath: cyan
|
||||||
|
shape_flag: blue_bold
|
||||||
|
shape_float: purple_bold
|
||||||
|
# shapes are used to change the cli syntax highlighting
|
||||||
|
shape_garbage: { fg: white bg: red attr: b}
|
||||||
|
shape_globpattern: cyan_bold
|
||||||
|
shape_int: purple_bold
|
||||||
|
shape_internalcall: cyan_bold
|
||||||
|
shape_keyword: cyan_bold
|
||||||
|
shape_list: cyan_bold
|
||||||
|
shape_literal: blue
|
||||||
|
shape_match_pattern: green
|
||||||
|
shape_matching_brackets: { attr: u }
|
||||||
|
shape_nothing: light_cyan
|
||||||
|
shape_operator: yellow
|
||||||
|
shape_or: purple_bold
|
||||||
|
shape_pipe: purple_bold
|
||||||
|
shape_range: yellow_bold
|
||||||
|
shape_record: cyan_bold
|
||||||
|
shape_redirection: purple_bold
|
||||||
|
shape_signature: green_bold
|
||||||
|
shape_string: green
|
||||||
|
shape_string_interpolation: cyan_bold
|
||||||
|
shape_table: blue_bold
|
||||||
|
shape_variable: purple
|
||||||
|
shape_vardecl: purple
|
||||||
|
}
|
||||||
|
|
||||||
|
let light_theme = {
|
||||||
|
# color for nushell primitives
|
||||||
|
separator: dark_gray
|
||||||
|
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
|
||||||
|
header: green_bold
|
||||||
|
empty: blue
|
||||||
|
# Closures can be used to choose colors for specific values.
|
||||||
|
# The value (in this case, a bool) is piped into the closure.
|
||||||
|
# eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } }
|
||||||
|
bool: dark_cyan
|
||||||
|
int: dark_gray
|
||||||
|
filesize: cyan_bold
|
||||||
|
duration: dark_gray
|
||||||
|
date: purple
|
||||||
|
range: dark_gray
|
||||||
|
float: dark_gray
|
||||||
|
string: dark_gray
|
||||||
|
nothing: dark_gray
|
||||||
|
binary: dark_gray
|
||||||
|
cell-path: dark_gray
|
||||||
|
row_index: green_bold
|
||||||
|
record: dark_gray
|
||||||
|
list: dark_gray
|
||||||
|
block: dark_gray
|
||||||
|
hints: dark_gray
|
||||||
|
search_result: {fg: white bg: red}
|
||||||
|
shape_and: purple_bold
|
||||||
|
shape_binary: purple_bold
|
||||||
|
shape_block: blue_bold
|
||||||
|
shape_bool: light_cyan
|
||||||
|
shape_closure: green_bold
|
||||||
|
shape_custom: green
|
||||||
|
shape_datetime: cyan_bold
|
||||||
|
shape_directory: cyan
|
||||||
|
shape_external: cyan
|
||||||
|
shape_externalarg: green_bold
|
||||||
|
shape_external_resolved: light_purple_bold
|
||||||
|
shape_filepath: cyan
|
||||||
|
shape_flag: blue_bold
|
||||||
|
shape_float: purple_bold
|
||||||
|
# shapes are used to change the cli syntax highlighting
|
||||||
|
shape_garbage: { fg: white bg: red attr: b}
|
||||||
|
shape_globpattern: cyan_bold
|
||||||
|
shape_int: purple_bold
|
||||||
|
shape_internalcall: cyan_bold
|
||||||
|
shape_keyword: cyan_bold
|
||||||
|
shape_list: cyan_bold
|
||||||
|
shape_literal: blue
|
||||||
|
shape_match_pattern: green
|
||||||
|
shape_matching_brackets: { attr: u }
|
||||||
|
shape_nothing: light_cyan
|
||||||
|
shape_operator: yellow
|
||||||
|
shape_or: purple_bold
|
||||||
|
shape_pipe: purple_bold
|
||||||
|
shape_range: yellow_bold
|
||||||
|
shape_record: cyan_bold
|
||||||
|
shape_redirection: purple_bold
|
||||||
|
shape_signature: green_bold
|
||||||
|
shape_string: green
|
||||||
|
shape_string_interpolation: cyan_bold
|
||||||
|
shape_table: blue_bold
|
||||||
|
shape_variable: purple
|
||||||
|
shape_vardecl: purple
|
||||||
|
}
|
||||||
|
|
||||||
|
# External completer example
|
||||||
|
# let carapace_completer = {|spans|
|
||||||
|
# carapace $spans.0 nushell $spans | from json
|
||||||
|
# }
|
||||||
|
|
||||||
|
# The default config record. This is where much of your global configuration is setup.
|
||||||
|
$env.config = {
|
||||||
|
show_banner: false # true or false to enable or disable the welcome banner at startup
|
||||||
|
|
||||||
|
ls: {
|
||||||
|
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
|
||||||
|
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
|
||||||
|
}
|
||||||
|
|
||||||
|
rm: {
|
||||||
|
always_trash: false # always act as if -t was given. Can be overridden with -p
|
||||||
|
}
|
||||||
|
|
||||||
|
table: {
|
||||||
|
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
|
||||||
|
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
|
||||||
|
show_empty: true # show 'empty list' and 'empty record' placeholders for command output
|
||||||
|
padding: { left: 1, right: 1 } # a left right padding of each column in a table
|
||||||
|
trim: {
|
||||||
|
methodology: wrapping # wrapping or truncating
|
||||||
|
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
|
||||||
|
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
|
||||||
|
}
|
||||||
|
header_on_separator: false # show header text on separator/border line
|
||||||
|
# abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point
|
||||||
|
}
|
||||||
|
|
||||||
|
error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages
|
||||||
|
|
||||||
|
# datetime_format determines what a datetime rendered in the shell would look like.
|
||||||
|
# Behavior without this configuration point will be to "humanize" the datetime display,
|
||||||
|
# showing something like "a day ago."
|
||||||
|
datetime_format: {
|
||||||
|
# normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
|
||||||
|
# table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
|
||||||
|
}
|
||||||
|
|
||||||
|
explore: {
|
||||||
|
status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"},
|
||||||
|
command_bar_text: {fg: "#C4C9C6"},
|
||||||
|
highlight: {fg: "black", bg: "yellow"},
|
||||||
|
status: {
|
||||||
|
error: {fg: "white", bg: "red"},
|
||||||
|
warn: {}
|
||||||
|
info: {}
|
||||||
|
},
|
||||||
|
table: {
|
||||||
|
split_line: {fg: "#404040"},
|
||||||
|
selected_cell: {bg: light_blue},
|
||||||
|
selected_row: {},
|
||||||
|
selected_column: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
history: {
|
||||||
|
max_size: 100_000 # Session has to be reloaded for this to take effect
|
||||||
|
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
|
||||||
|
file_format: "plaintext" # "sqlite" or "plaintext"
|
||||||
|
isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
|
||||||
|
}
|
||||||
|
|
||||||
|
completions: {
|
||||||
|
case_sensitive: false # set to true to enable case-sensitive completions
|
||||||
|
quick: true # set this to false to prevent auto-selecting completions when only one remains
|
||||||
|
partial: true # set this to false to prevent partial filling of the prompt
|
||||||
|
algorithm: "prefix" # prefix or fuzzy
|
||||||
|
external: {
|
||||||
|
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
|
||||||
|
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||||
|
completer: null # check 'carapace_completer' above as an example
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
filesize: {
|
||||||
|
metric: false # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
|
||||||
|
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor_shape: {
|
||||||
|
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
|
||||||
|
vi_insert: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
|
||||||
|
vi_normal: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
|
||||||
|
}
|
||||||
|
|
||||||
|
color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
|
||||||
|
use_grid_icons: true
|
||||||
|
footer_mode: "25" # always, never, number_of_rows, auto
|
||||||
|
float_precision: 2 # the precision for displaying floats in tables
|
||||||
|
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
|
||||||
|
use_ansi_coloring: true
|
||||||
|
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
||||||
|
edit_mode: vi # emacs, vi
|
||||||
|
shell_integration: false # enables terminal shell integration. Off by default, as some terminals have issues with this.
|
||||||
|
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||||
|
use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
|
||||||
|
highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
|
||||||
|
|
||||||
|
hooks: {
|
||||||
|
pre_prompt: [{ null }] # run before the prompt is shown
|
||||||
|
pre_execution: [{ null }] # run before the repl input is run
|
||||||
|
env_change: {
|
||||||
|
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
|
||||||
|
}
|
||||||
|
display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline
|
||||||
|
command_not_found: { null } # return an error message when a command is not found
|
||||||
|
}
|
||||||
|
|
||||||
|
menus: [
|
||||||
|
# Configuration for default nushell menus
|
||||||
|
# Note the lack of source parameter
|
||||||
|
{
|
||||||
|
name: completion_menu
|
||||||
|
only_buffer_difference: false
|
||||||
|
marker: "| "
|
||||||
|
type: {
|
||||||
|
layout: columnar
|
||||||
|
columns: 4
|
||||||
|
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||||
|
col_padding: 2
|
||||||
|
}
|
||||||
|
style: {
|
||||||
|
text: green
|
||||||
|
selected_text: green_reverse
|
||||||
|
description_text: yellow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: history_menu
|
||||||
|
only_buffer_difference: true
|
||||||
|
marker: "? "
|
||||||
|
type: {
|
||||||
|
layout: list
|
||||||
|
page_size: 10
|
||||||
|
}
|
||||||
|
style: {
|
||||||
|
text: green
|
||||||
|
selected_text: green_reverse
|
||||||
|
description_text: yellow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: help_menu
|
||||||
|
only_buffer_difference: true
|
||||||
|
marker: "? "
|
||||||
|
type: {
|
||||||
|
layout: description
|
||||||
|
columns: 4
|
||||||
|
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||||
|
col_padding: 2
|
||||||
|
selection_rows: 4
|
||||||
|
description_rows: 10
|
||||||
|
}
|
||||||
|
style: {
|
||||||
|
text: green
|
||||||
|
selected_text: green_reverse
|
||||||
|
description_text: yellow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
keybindings: [
|
||||||
|
{
|
||||||
|
name: completion_menu
|
||||||
|
modifier: none
|
||||||
|
keycode: tab
|
||||||
|
mode: [emacs vi_normal vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{ send: menu name: completion_menu }
|
||||||
|
{ send: menunext }
|
||||||
|
{ edit: complete }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: history_menu
|
||||||
|
modifier: control
|
||||||
|
keycode: char_r
|
||||||
|
mode: [emacs, vi_insert, vi_normal]
|
||||||
|
event: { send: menu name: history_menu }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: help_menu
|
||||||
|
modifier: none
|
||||||
|
keycode: f1
|
||||||
|
mode: [emacs, vi_insert, vi_normal]
|
||||||
|
event: { send: menu name: help_menu }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: completion_previous_menu
|
||||||
|
modifier: shift
|
||||||
|
keycode: backtab
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: menuprevious }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: next_page_menu
|
||||||
|
modifier: control
|
||||||
|
keycode: char_x
|
||||||
|
mode: emacs
|
||||||
|
event: { send: menupagenext }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: undo_or_previous_page_menu
|
||||||
|
modifier: control
|
||||||
|
keycode: char_z
|
||||||
|
mode: emacs
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{ send: menupageprevious }
|
||||||
|
{ edit: undo }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: escape
|
||||||
|
modifier: none
|
||||||
|
keycode: escape
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: esc } # NOTE: does not appear to work
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: cancel_command
|
||||||
|
modifier: control
|
||||||
|
keycode: char_c
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: ctrlc }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: quit_shell
|
||||||
|
modifier: control
|
||||||
|
keycode: char_d
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: ctrld }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: clear_screen
|
||||||
|
modifier: control
|
||||||
|
keycode: char_l
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: clearscreen }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: search_history
|
||||||
|
modifier: control
|
||||||
|
keycode: char_q
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: searchhistory }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: open_command_editor
|
||||||
|
modifier: control
|
||||||
|
keycode: char_o
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: openeditor }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_up
|
||||||
|
modifier: none
|
||||||
|
keycode: up
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuup}
|
||||||
|
{send: up}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_down
|
||||||
|
modifier: none
|
||||||
|
keycode: down
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menudown}
|
||||||
|
{send: down}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_left
|
||||||
|
modifier: none
|
||||||
|
keycode: left
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuleft}
|
||||||
|
{send: left}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_right_or_take_history_hint
|
||||||
|
modifier: none
|
||||||
|
keycode: right
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintcomplete}
|
||||||
|
{send: menuright}
|
||||||
|
{send: right}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_one_word_left
|
||||||
|
modifier: control
|
||||||
|
keycode: left
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {edit: movewordleft}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_one_word_right_or_take_history_hint
|
||||||
|
modifier: control
|
||||||
|
keycode: right
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintwordcomplete}
|
||||||
|
{edit: movewordright}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_to_line_start
|
||||||
|
modifier: none
|
||||||
|
keycode: home
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {edit: movetolinestart}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_to_line_start
|
||||||
|
modifier: control
|
||||||
|
keycode: char_a
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {edit: movetolinestart}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_to_line_end_or_take_history_hint
|
||||||
|
modifier: none
|
||||||
|
keycode: end
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintcomplete}
|
||||||
|
{edit: movetolineend}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_to_line_end_or_take_history_hint
|
||||||
|
modifier: control
|
||||||
|
keycode: char_e
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintcomplete}
|
||||||
|
{edit: movetolineend}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_to_line_start
|
||||||
|
modifier: control
|
||||||
|
keycode: home
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {edit: movetolinestart}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_to_line_end
|
||||||
|
modifier: control
|
||||||
|
keycode: end
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {edit: movetolineend}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_up
|
||||||
|
modifier: control
|
||||||
|
keycode: char_p
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuup}
|
||||||
|
{send: up}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_down
|
||||||
|
modifier: control
|
||||||
|
keycode: char_t
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menudown}
|
||||||
|
{send: down}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_character_backward
|
||||||
|
modifier: none
|
||||||
|
keycode: backspace
|
||||||
|
mode: [emacs, vi_insert]
|
||||||
|
event: {edit: backspace}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_word_backward
|
||||||
|
modifier: control
|
||||||
|
keycode: backspace
|
||||||
|
mode: [emacs, vi_insert]
|
||||||
|
event: {edit: backspaceword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_character_forward
|
||||||
|
modifier: none
|
||||||
|
keycode: delete
|
||||||
|
mode: [emacs, vi_insert]
|
||||||
|
event: {edit: delete}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_character_forward
|
||||||
|
modifier: control
|
||||||
|
keycode: delete
|
||||||
|
mode: [emacs, vi_insert]
|
||||||
|
event: {edit: delete}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_character_forward
|
||||||
|
modifier: control
|
||||||
|
keycode: char_h
|
||||||
|
mode: [emacs, vi_insert]
|
||||||
|
event: {edit: backspace}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_word_backward
|
||||||
|
modifier: control
|
||||||
|
keycode: char_w
|
||||||
|
mode: [emacs, vi_insert]
|
||||||
|
event: {edit: backspaceword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_left
|
||||||
|
modifier: none
|
||||||
|
keycode: backspace
|
||||||
|
mode: vi_normal
|
||||||
|
event: {edit: moveleft}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: newline_or_run_command
|
||||||
|
modifier: none
|
||||||
|
keycode: enter
|
||||||
|
mode: emacs
|
||||||
|
event: {send: enter}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_left
|
||||||
|
modifier: control
|
||||||
|
keycode: char_b
|
||||||
|
mode: emacs
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuleft}
|
||||||
|
{send: left}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_right_or_take_history_hint
|
||||||
|
modifier: control
|
||||||
|
keycode: char_f
|
||||||
|
mode: emacs
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintcomplete}
|
||||||
|
{send: menuright}
|
||||||
|
{send: right}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: redo_change
|
||||||
|
modifier: control
|
||||||
|
keycode: char_g
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: redo}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: undo_change
|
||||||
|
modifier: control
|
||||||
|
keycode: char_z
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: undo}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: paste_before
|
||||||
|
modifier: control
|
||||||
|
keycode: char_y
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: pastecutbufferbefore}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: cut_word_left
|
||||||
|
modifier: control
|
||||||
|
keycode: char_w
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: cutwordleft}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: cut_line_to_end
|
||||||
|
modifier: control
|
||||||
|
keycode: char_k
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: cuttoend}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: cut_line_from_start
|
||||||
|
modifier: control
|
||||||
|
keycode: char_u
|
||||||
|
mode: [emacs vi_insert]
|
||||||
|
event: {edit: cutfromstart}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: swap_graphemes
|
||||||
|
modifier: control
|
||||||
|
keycode: char_t
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: swapgraphemes}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_one_word_left
|
||||||
|
modifier: alt
|
||||||
|
keycode: left
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: movewordleft}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_one_word_right_or_take_history_hint
|
||||||
|
modifier: alt
|
||||||
|
keycode: right
|
||||||
|
mode: emacs
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintwordcomplete}
|
||||||
|
{edit: movewordright}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_one_word_left
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_b
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: movewordleft}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_one_word_right_or_take_history_hint
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_f
|
||||||
|
mode: emacs
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintwordcomplete}
|
||||||
|
{edit: movewordright}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_word_forward
|
||||||
|
modifier: alt
|
||||||
|
keycode: delete
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: deleteword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_word_backward
|
||||||
|
modifier: alt
|
||||||
|
keycode: backspace
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: backspaceword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: delete_one_word_backward
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_m
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: backspaceword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: cut_word_to_right
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_d
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: cutwordright}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: upper_case_word
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_u
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: uppercaseword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: lower_case_word
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_l
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: lowercaseword}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: capitalize_char
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_c
|
||||||
|
mode: emacs
|
||||||
|
event: {edit: capitalizechar}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_up
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_k
|
||||||
|
mode: [vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuup}
|
||||||
|
{send: up}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_down
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_j
|
||||||
|
mode: [vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menudown}
|
||||||
|
{send: down}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_left
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_h
|
||||||
|
mode: [vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuleft}
|
||||||
|
{send: left}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: move_right_or_take_history_hint
|
||||||
|
modifier: alt
|
||||||
|
keycode: char_l
|
||||||
|
mode: [vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: historyhintcomplete}
|
||||||
|
{send: menuright}
|
||||||
|
{send: right}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
alias v = nvim
|
||||||
|
alias tl = tmux list-sessions
|
||||||
|
alias tn = tmux new -s
|
||||||
|
alias ta = tmux attach -t
|
||||||
|
|
||||||
|
def gst [] {
|
||||||
|
git status -s | detect columns -n | rename status file
|
||||||
|
}
|
||||||
|
|
||||||
|
def glog [] {
|
||||||
|
git log --pretty=%h»¦«%aN»¦«%s»¦«%aD | lines | split column "»¦«" sha1 committer desc merged_at
|
||||||
|
}
|
108
shell/.config/nushell/env.nu
Normal file
108
shell/.config/nushell/env.nu
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
# Nushell Environment Config File
|
||||||
|
#
|
||||||
|
# version = "0.89.0"
|
||||||
|
|
||||||
|
def create_left_prompt [] {
|
||||||
|
let home = $nu.home-path
|
||||||
|
|
||||||
|
# Perform tilde substitution on dir
|
||||||
|
# To determine if the prefix of the path matches the home dir, we split the current path into
|
||||||
|
# segments, and compare those with the segments of the home dir. In cases where the current dir
|
||||||
|
# is a parent of the home dir (e.g. `/home`, homedir is `/home/user`), this comparison will
|
||||||
|
# also evaluate to true. Inside the condition, we attempt to str replace `$home` with `~`.
|
||||||
|
# Inside the condition, either:
|
||||||
|
# 1. The home prefix will be replaced
|
||||||
|
# 2. The current dir is a parent of the home dir, so it will be uneffected by the str replace
|
||||||
|
let dir = (
|
||||||
|
if ($env.PWD | path split | zip ($home | path split) | all { $in.0 == $in.1 }) {
|
||||||
|
($env.PWD | str replace $home "~")
|
||||||
|
} else {
|
||||||
|
$env.PWD
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
|
||||||
|
let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold })
|
||||||
|
let path_segment = $"($path_color)($dir)"
|
||||||
|
|
||||||
|
let base = $path_segment | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)"
|
||||||
|
let branch = do { git rev-parse --abbrev-ref HEAD } | complete
|
||||||
|
if $branch.exit_code == 0 {
|
||||||
|
$"($base) ($separator_color)\((ansi magenta)($branch.stdout | str trim)($separator_color)) "
|
||||||
|
} else {
|
||||||
|
$base
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def create_right_prompt [] {
|
||||||
|
# create a right prompt in magenta with green separators and am/pm underlined
|
||||||
|
let time_segment = ([
|
||||||
|
(ansi reset)
|
||||||
|
(ansi magenta)
|
||||||
|
(date now | format date '%x %X %p') # try to respect user's locale
|
||||||
|
] | str join | str replace --regex --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
|
||||||
|
str replace --regex --all "([AP]M)" $"(ansi magenta_underline)${1}")
|
||||||
|
|
||||||
|
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
|
||||||
|
(ansi rb)
|
||||||
|
($env.LAST_EXIT_CODE)
|
||||||
|
] | str join)
|
||||||
|
} else { "" }
|
||||||
|
|
||||||
|
([$last_exit_code, (char space), $time_segment] | str join)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Use nushell functions to define your right and left prompt
|
||||||
|
$env.PROMPT_COMMAND = {|| create_left_prompt }
|
||||||
|
# FIXME: This default is not implemented in rust code as of 2023-09-08.
|
||||||
|
$env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
||||||
|
|
||||||
|
# The prompt indicators are environmental variables that represent
|
||||||
|
# the state of the prompt
|
||||||
|
$env.PROMPT_INDICATOR = {|| "> " }
|
||||||
|
$env.PROMPT_INDICATOR_VI_INSERT = {|| ": " }
|
||||||
|
$env.PROMPT_INDICATOR_VI_NORMAL = {|| "> " }
|
||||||
|
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
|
||||||
|
|
||||||
|
# If you want previously entered commands to have a different prompt from the usual one,
|
||||||
|
# you can uncomment one or more of the following lines.
|
||||||
|
# This can be useful if you have a 2-line prompt and it's taking up a lot of space
|
||||||
|
# because every command entered takes up 2 lines instead of 1. You can then uncomment
|
||||||
|
# the line below so that previously entered commands show with a single `🚀`.
|
||||||
|
# $env.TRANSIENT_PROMPT_COMMAND = {|| "🚀 " }
|
||||||
|
# $env.TRANSIENT_PROMPT_INDICATOR = {|| "" }
|
||||||
|
# $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" }
|
||||||
|
# $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" }
|
||||||
|
# $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" }
|
||||||
|
# $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" }
|
||||||
|
|
||||||
|
# Specifies how environment variables are:
|
||||||
|
# - converted from a string to a value on Nushell startup (from_string)
|
||||||
|
# - converted from a value back to a string when running external commands (to_string)
|
||||||
|
# Note: The conversions happen *after* config.nu is loaded
|
||||||
|
$env.ENV_CONVERSIONS = {
|
||||||
|
"PATH": {
|
||||||
|
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||||
|
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
|
||||||
|
}
|
||||||
|
"Path": {
|
||||||
|
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||||
|
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Directories to search for scripts when calling source or use
|
||||||
|
# The default for this is $nu.default-config-dir/scripts
|
||||||
|
$env.NU_LIB_DIRS = [
|
||||||
|
($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
|
||||||
|
]
|
||||||
|
|
||||||
|
# Directories to search for plugin binaries when calling register
|
||||||
|
# The default for this is $nu.default-config-dir/plugins
|
||||||
|
$env.NU_PLUGIN_DIRS = [
|
||||||
|
($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
|
||||||
|
]
|
||||||
|
|
||||||
|
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
|
||||||
|
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
|
||||||
|
|
351
zellij/.config/zellij/config.kdl
Normal file
351
zellij/.config/zellij/config.kdl
Normal file
@ -0,0 +1,351 @@
|
|||||||
|
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
|
||||||
|
keybinds {
|
||||||
|
normal {
|
||||||
|
// uncomment this and adjust key if using copy_on_select=false
|
||||||
|
// bind "Alt c" { Copy; }
|
||||||
|
}
|
||||||
|
locked {
|
||||||
|
bind "Ctrl g" { SwitchToMode "Normal"; }
|
||||||
|
}
|
||||||
|
resize {
|
||||||
|
bind "Ctrl n" { SwitchToMode "Normal"; }
|
||||||
|
bind "h" "Left" { Resize "Increase Left"; }
|
||||||
|
bind "j" "Down" { Resize "Increase Down"; }
|
||||||
|
bind "k" "Up" { Resize "Increase Up"; }
|
||||||
|
bind "l" "Right" { Resize "Increase Right"; }
|
||||||
|
bind "H" { Resize "Decrease Left"; }
|
||||||
|
bind "J" { Resize "Decrease Down"; }
|
||||||
|
bind "K" { Resize "Decrease Up"; }
|
||||||
|
bind "L" { Resize "Decrease Right"; }
|
||||||
|
bind "=" "+" { Resize "Increase"; }
|
||||||
|
bind "-" { Resize "Decrease"; }
|
||||||
|
}
|
||||||
|
pane {
|
||||||
|
bind "Ctrl p" { SwitchToMode "Normal"; }
|
||||||
|
bind "h" "Left" { MoveFocus "Left"; }
|
||||||
|
bind "l" "Right" { MoveFocus "Right"; }
|
||||||
|
bind "j" "Down" { MoveFocus "Down"; }
|
||||||
|
bind "k" "Up" { MoveFocus "Up"; }
|
||||||
|
bind "p" { SwitchFocus; }
|
||||||
|
bind "n" { NewPane; SwitchToMode "Normal"; }
|
||||||
|
bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "x" { CloseFocus; SwitchToMode "Normal"; }
|
||||||
|
bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
|
||||||
|
bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
|
||||||
|
bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
|
||||||
|
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
|
||||||
|
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
|
||||||
|
}
|
||||||
|
move {
|
||||||
|
bind "Ctrl h" { SwitchToMode "Normal"; }
|
||||||
|
bind "n" "Tab" { MovePane; }
|
||||||
|
bind "p" { MovePaneBackwards; }
|
||||||
|
bind "h" "Left" { MovePane "Left"; }
|
||||||
|
bind "j" "Down" { MovePane "Down"; }
|
||||||
|
bind "k" "Up" { MovePane "Up"; }
|
||||||
|
bind "l" "Right" { MovePane "Right"; }
|
||||||
|
}
|
||||||
|
tab {
|
||||||
|
bind "Ctrl t" { SwitchToMode "Normal"; }
|
||||||
|
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
|
||||||
|
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
|
||||||
|
bind "l" "Right" "Down" "j" { GoToNextTab; }
|
||||||
|
bind "n" { NewTab; SwitchToMode "Normal"; }
|
||||||
|
bind "x" { CloseTab; SwitchToMode "Normal"; }
|
||||||
|
bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
|
||||||
|
bind "b" { BreakPane; SwitchToMode "Normal"; }
|
||||||
|
bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
|
||||||
|
bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
|
||||||
|
bind "1" { GoToTab 1; SwitchToMode "Normal"; }
|
||||||
|
bind "2" { GoToTab 2; SwitchToMode "Normal"; }
|
||||||
|
bind "3" { GoToTab 3; SwitchToMode "Normal"; }
|
||||||
|
bind "4" { GoToTab 4; SwitchToMode "Normal"; }
|
||||||
|
bind "5" { GoToTab 5; SwitchToMode "Normal"; }
|
||||||
|
bind "6" { GoToTab 6; SwitchToMode "Normal"; }
|
||||||
|
bind "7" { GoToTab 7; SwitchToMode "Normal"; }
|
||||||
|
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
|
||||||
|
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
|
||||||
|
bind "Tab" { ToggleTab; }
|
||||||
|
}
|
||||||
|
scroll {
|
||||||
|
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||||
|
bind "e" { EditScrollback; SwitchToMode "Normal"; }
|
||||||
|
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
|
||||||
|
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
|
||||||
|
bind "j" "Down" { ScrollDown; }
|
||||||
|
bind "k" "Up" { ScrollUp; }
|
||||||
|
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
|
||||||
|
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
|
||||||
|
bind "d" { HalfPageScrollDown; }
|
||||||
|
bind "u" { HalfPageScrollUp; }
|
||||||
|
// uncomment this and adjust key if using copy_on_select=false
|
||||||
|
// bind "Alt c" { Copy; }
|
||||||
|
}
|
||||||
|
search {
|
||||||
|
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||||
|
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
|
||||||
|
bind "j" "Down" { ScrollDown; }
|
||||||
|
bind "k" "Up" { ScrollUp; }
|
||||||
|
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
|
||||||
|
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
|
||||||
|
bind "d" { HalfPageScrollDown; }
|
||||||
|
bind "u" { HalfPageScrollUp; }
|
||||||
|
bind "n" { Search "down"; }
|
||||||
|
bind "p" { Search "up"; }
|
||||||
|
bind "c" { SearchToggleOption "CaseSensitivity"; }
|
||||||
|
bind "w" { SearchToggleOption "Wrap"; }
|
||||||
|
bind "o" { SearchToggleOption "WholeWord"; }
|
||||||
|
}
|
||||||
|
entersearch {
|
||||||
|
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
|
||||||
|
bind "Enter" { SwitchToMode "Search"; }
|
||||||
|
}
|
||||||
|
renametab {
|
||||||
|
bind "Ctrl c" { SwitchToMode "Normal"; }
|
||||||
|
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
|
||||||
|
}
|
||||||
|
renamepane {
|
||||||
|
bind "Ctrl c" { SwitchToMode "Normal"; }
|
||||||
|
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
|
||||||
|
}
|
||||||
|
session {
|
||||||
|
bind "Ctrl o" { SwitchToMode "Normal"; }
|
||||||
|
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||||
|
bind "d" { Detach; }
|
||||||
|
bind "w" {
|
||||||
|
LaunchOrFocusPlugin "zellij:session-manager" {
|
||||||
|
floating true
|
||||||
|
move_to_focused_tab true
|
||||||
|
};
|
||||||
|
SwitchToMode "Normal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tmux {
|
||||||
|
bind "[" { SwitchToMode "Scroll"; }
|
||||||
|
bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
|
||||||
|
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
|
||||||
|
bind "c" { NewTab; SwitchToMode "Normal"; }
|
||||||
|
bind "," { SwitchToMode "RenameTab"; }
|
||||||
|
bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
|
||||||
|
bind "n" { GoToNextTab; SwitchToMode "Normal"; }
|
||||||
|
bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
|
||||||
|
bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
|
||||||
|
bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
|
||||||
|
bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
|
||||||
|
bind "o" { FocusNextPane; }
|
||||||
|
bind "d" { Detach; }
|
||||||
|
bind "Space" { NextSwapLayout; }
|
||||||
|
bind "x" { CloseFocus; SwitchToMode "Normal"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" {
|
||||||
|
bind "Ctrl g" { SwitchToMode "Locked"; }
|
||||||
|
bind "Ctrl q" { Quit; }
|
||||||
|
bind "Alt n" { NewPane; }
|
||||||
|
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||||
|
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
|
||||||
|
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
|
||||||
|
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
|
||||||
|
bind "Alt =" "Alt +" { Resize "Increase"; }
|
||||||
|
bind "Alt -" { Resize "Decrease"; }
|
||||||
|
bind "Alt [" { PreviousSwapLayout; }
|
||||||
|
bind "Alt ]" { NextSwapLayout; }
|
||||||
|
}
|
||||||
|
shared_except "normal" "locked" {
|
||||||
|
bind "Enter" "Esc" { SwitchToMode "Normal"; }
|
||||||
|
}
|
||||||
|
shared_except "pane" "locked" {
|
||||||
|
bind "Ctrl p" { SwitchToMode "Pane"; }
|
||||||
|
}
|
||||||
|
shared_except "resize" "locked" {
|
||||||
|
bind "Ctrl n" { SwitchToMode "Resize"; }
|
||||||
|
}
|
||||||
|
shared_except "scroll" "locked" {
|
||||||
|
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||||
|
}
|
||||||
|
shared_except "session" "locked" {
|
||||||
|
bind "Ctrl o" { SwitchToMode "Session"; }
|
||||||
|
}
|
||||||
|
shared_except "tab" "locked" {
|
||||||
|
bind "Ctrl t" { SwitchToMode "Tab"; }
|
||||||
|
}
|
||||||
|
shared_except "move" "locked" {
|
||||||
|
bind "Ctrl h" { SwitchToMode "Move"; }
|
||||||
|
}
|
||||||
|
shared_except "tmux" "locked" {
|
||||||
|
bind "Ctrl b" { SwitchToMode "Tmux"; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
tab-bar { path "tab-bar"; }
|
||||||
|
status-bar { path "status-bar"; }
|
||||||
|
strider { path "strider"; }
|
||||||
|
compact-bar { path "compact-bar"; }
|
||||||
|
session-manager { path "session-manager"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
||||||
|
// eg. when terminal window with an active zellij session is closed
|
||||||
|
// Options:
|
||||||
|
// - detach (Default)
|
||||||
|
// - quit
|
||||||
|
//
|
||||||
|
// on_force_close "quit"
|
||||||
|
|
||||||
|
// Send a request for a simplified ui (without arrow fonts) to plugins
|
||||||
|
// Options:
|
||||||
|
// - true
|
||||||
|
// - false (Default)
|
||||||
|
//
|
||||||
|
// simplified_ui true
|
||||||
|
|
||||||
|
// Choose the path to the default shell that zellij will use for opening new panes
|
||||||
|
// Default: $SHELL
|
||||||
|
//
|
||||||
|
// default_shell "fish"
|
||||||
|
|
||||||
|
// Choose the path to override cwd that zellij will use for opening new panes
|
||||||
|
//
|
||||||
|
// default_cwd ""
|
||||||
|
|
||||||
|
// Toggle between having pane frames around the panes
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
pane_frames false
|
||||||
|
|
||||||
|
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// auto_layout true
|
||||||
|
|
||||||
|
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// session_serialization false
|
||||||
|
|
||||||
|
// Whether pane viewports are serialized along with the session, default is false
|
||||||
|
// Options:
|
||||||
|
// - true
|
||||||
|
// - false (default)
|
||||||
|
// serialize_pane_viewport true
|
||||||
|
|
||||||
|
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
|
||||||
|
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
|
||||||
|
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
|
||||||
|
//
|
||||||
|
// scrollback_lines_to_serialize 10000
|
||||||
|
|
||||||
|
// Define color themes for Zellij
|
||||||
|
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
|
||||||
|
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
|
||||||
|
//
|
||||||
|
themes {
|
||||||
|
nightfox {
|
||||||
|
bg "#192330"
|
||||||
|
fg "#cdcecf"
|
||||||
|
red "#c94f6d"
|
||||||
|
green "#81b29a"
|
||||||
|
blue "#719cd6"
|
||||||
|
yellow "#dbc074"
|
||||||
|
magenta "#9d79d6"
|
||||||
|
orange "#f4a261"
|
||||||
|
cyan "#63cdcf"
|
||||||
|
black "#29394f"
|
||||||
|
white "#aeafb0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Choose the theme that is specified in the themes section.
|
||||||
|
// Default: default
|
||||||
|
//
|
||||||
|
theme "nightfox"
|
||||||
|
|
||||||
|
// The name of the default layout to load on startup
|
||||||
|
// Default: "default"
|
||||||
|
//
|
||||||
|
default_layout "compact"
|
||||||
|
|
||||||
|
// Choose the mode that zellij uses when starting up.
|
||||||
|
// Default: normal
|
||||||
|
//
|
||||||
|
// default_mode "locked"
|
||||||
|
|
||||||
|
// Toggle enabling the mouse mode.
|
||||||
|
// On certain configurations, or terminals this could
|
||||||
|
// potentially interfere with copying text.
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// mouse_mode false
|
||||||
|
|
||||||
|
// Configure the scroll back buffer size
|
||||||
|
// This is the number of lines zellij stores for each pane in the scroll back
|
||||||
|
// buffer. Excess number of lines are discarded in a FIFO fashion.
|
||||||
|
// Valid values: positive integers
|
||||||
|
// Default value: 10000
|
||||||
|
//
|
||||||
|
// scroll_buffer_size 10000
|
||||||
|
|
||||||
|
// Provide a command to execute when copying text. The text will be piped to
|
||||||
|
// the stdin of the program to perform the copy. This can be used with
|
||||||
|
// terminal emulators which do not support the OSC 52 ANSI control sequence
|
||||||
|
// that will be used by default if this option is not set.
|
||||||
|
// Examples:
|
||||||
|
//
|
||||||
|
// copy_command "xclip -selection clipboard" // x11
|
||||||
|
// copy_command "wl-copy" // wayland
|
||||||
|
// copy_command "pbcopy" // osx
|
||||||
|
|
||||||
|
// Choose the destination for copied text
|
||||||
|
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
||||||
|
// Does not apply when using copy_command.
|
||||||
|
// Options:
|
||||||
|
// - system (default)
|
||||||
|
// - primary
|
||||||
|
//
|
||||||
|
// copy_clipboard "primary"
|
||||||
|
|
||||||
|
// Enable or disable automatic copy (and clear) of selection when releasing mouse
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// copy_on_select false
|
||||||
|
|
||||||
|
// Path to the default editor to use to edit pane scrollbuffer
|
||||||
|
// Default: $EDITOR or $VISUAL
|
||||||
|
//
|
||||||
|
// scrollback_editor "/usr/bin/vim"
|
||||||
|
|
||||||
|
// When attaching to an existing session with other users,
|
||||||
|
// should the session be mirrored (true)
|
||||||
|
// or should each user have their own cursor (false)
|
||||||
|
// Default: false
|
||||||
|
//
|
||||||
|
// mirror_session true
|
||||||
|
|
||||||
|
// The folder in which Zellij will look for layouts
|
||||||
|
//
|
||||||
|
// layout_dir "/path/to/my/layout_dir"
|
||||||
|
|
||||||
|
// The folder in which Zellij will look for themes
|
||||||
|
//
|
||||||
|
// theme_dir "/path/to/my/theme_dir"
|
||||||
|
|
||||||
|
// Enable or disable the rendering of styled and colored underlines (undercurl).
|
||||||
|
// May need to be disabled for certain unsupported terminals
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// styled_underlines false
|
Loading…
x
Reference in New Issue
Block a user