diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..fd9d50c
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "dot_config/nushell/nu_scripts"]
+ path = dot_config/nushell/nu_scripts
+ url = https://github.com/nushell/nu_scripts
diff --git a/dot_config/Kvantum/KvArcTokyoNight/KvArcTokyoNight.kvconfig b/dot_config/Kvantum/KvArcTokyoNight/KvArcTokyoNight.kvconfig
new file mode 100644
index 0000000..0ffdf99
--- /dev/null
+++ b/dot_config/Kvantum/KvArcTokyoNight/KvArcTokyoNight.kvconfig
@@ -0,0 +1,485 @@
+[%General]
+author=Tsu Jan (Modified by ObsidianChickenz)
+comment=A minimalistic dark theme inspired by the Arc GTK theme
+x11drag=menubar_and_primary_toolbar
+alt_mnemonic=true
+left_tabs=true
+attach_active_tab=true
+mirror_doc_tabs=true
+group_toolbar_buttons=false
+toolbar_item_spacing=1
+toolbar_interior_spacing=3
+spread_progressbar=true
+composite=true
+menu_shadow_depth=5
+menu_separator_height=6
+tooltip_shadow_depth=6
+splitter_width=4
+scroll_width=9
+scroll_arrows=false
+scroll_min_extent=60
+slider_width=6
+slider_handle_width=18
+slider_handle_length=18
+center_toolbar_handle=true
+check_size=14
+textless_progressbar=false
+progressbar_thickness=3font
+menubar_mouse_tracking=true
+toolbutton_style=1
+click_behavior=0
+translucent_windows=false
+blurring=false
+popup_blurring=false
+vertical_spin_indicators=false
+spin_button_width=32
+fill_rubberband=false
+merge_menubar_with_toolbar=true
+small_icon_size=16
+large_icon_size=32
+button_icon_size=16
+toolbar_icon_size=22
+combo_as_lineedit=true
+animate_states=false
+button_contents_shift=false
+combo_menu=true
+hide_combo_checkboxes=true
+combo_focus_rect=true
+groupbox_top_label=true
+inline_spin_indicators=false
+joined_inactive_tabs=false
+layout_spacing=6
+layout_margin=9
+scrollbar_in_view=true
+transient_scrollbar=true
+transient_groove=true
+submenu_overlap=3
+tooltip_delay=-1
+tree_branch_line=true
+dark_titlebar=true
+contrast=1.00
+dialog_button_layout=0
+drag_from_buttons=false
+intensity=1.00
+menu_blur_radius=0
+no_inactiveness=false
+no_window_pattern=false
+opaque=kaffeine,kmplayer,subtitlecomposer,kdenlive,vlc,smplayer,smplayer2,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,VirtualBoxVM,trojita,dragon,digikam,lyx
+reduce_menu_opacity=0
+reduce_window_opacity=0
+respect_DE=true
+saturation=1.00
+scrollable_menu=true
+shadowless_popup=false
+submenu_delay=250
+tooltip_blur_radius=0
+
+[GeneralColors]
+window.color=#16161e
+base.color=#1a1b26
+alt.base.color=#1a1b26
+button.color=#1d1f2b
+light.color=#3e415c
+mid.light.color=#313131
+dark.color=black
+mid.color=#191919
+highlight.color=#7aa2f7
+inactive.highlight.color=#7aa2f7
+text.color=#c0caf5
+window.text.color=#c0caf5
+button.text.color=#c0caf5
+disabled.text.color=#c0caf5
+tooltip.text.color=#c0caf5
+highlight.text.color=#1a1b26
+link.color=#d8e4fd
+link.visited.color=#a8c2fa
+progress.indicator.text.color=#c0caf5
+
+[Hacks]
+transparent_ktitle_label=true
+transparent_dolphin_view=false
+transparent_pcmanfm_sidepane=true
+blur_translucent=false
+transparent_menutitle=true
+respect_darkness=true
+force_size_grip=true
+iconless_pushbutton=true
+iconless_menu=false
+disabled_icon_opacity=100
+lxqtmainmenu_iconsize=22
+normal_default_pushbutton=true
+single_top_toolbar=true
+tint_on_mouseover=0
+transparent_pcmanfm_view=false
+blur_only_active_window=false
+centered_forms=false
+kinetic_scrolling=false
+middle_click_scroll=false
+no_selection_tint=false
+noninteger_translucency=false
+style_vertical_toolbars=false
+
+[PanelButtonCommand]
+frame=true
+frame.element=button
+frame.top=3
+frame.bottom=3
+frame.left=3
+frame.right=3
+interior=true
+interior.element=button
+indicator.size=9
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.press.color=#c0caf5
+text.toggle.color=#c0caf5
+text.shadow=0
+text.margin=1
+text.iconspacing=4
+indicator.element=arrow
+text.margin.top=2
+text.margin.bottom=2
+text.margin.left=2
+text.margin.right=2
+min_width=+0.3font
+min_height=+0.3font
+frame.expansion=6
+
+[PanelButtonTool]
+inherits=PanelButtonCommand
+
+[Dock]
+inherits=PanelButtonCommand
+interior.element=dock
+frame.element=dock
+frame.top=1
+frame.bottom=1
+frame.left=1
+frame.right=1
+text.normal.color=#c0caf5
+
+[DockTitle]
+inherits=PanelButtonCommand
+frame=false
+interior=false
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.bold=true
+
+[IndicatorSpinBox]
+inherits=PanelButtonCommand
+frame=true
+interior=true
+frame.left=1
+indicator.element=spin
+indicator.size=10
+text.normal.color=#c0caf5
+
+[RadioButton]
+inherits=PanelButtonCommand
+frame=false
+interior.element=radio
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+
+[CheckBox]
+inherits=PanelButtonCommand
+frame=false
+interior.element=checkbox
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+
+[Focus]
+inherits=PanelButtonCommand
+frame=true
+frame.element=focus
+frame.top=1
+frame.bottom=1
+frame.left=1
+frame.right=1
+frame.patternsize=20
+
+[GenericFrame]
+inherits=PanelButtonCommand
+frame=true
+interior=false
+frame.element=common
+interior.element=common
+frame.top=3
+frame.bottom=3
+frame.left=3
+frame.right=3
+
+[LineEdit]
+inherits=PanelButtonCommand
+frame.element=lineedit
+interior.element=lineedit
+text.margin.left=1
+text.margin.right=1
+
+[DropDownButton]
+inherits=PanelButtonCommand
+indicator.element=arrow-down
+
+[IndicatorArrow]
+indicator.element=arrow
+indicator.size=9
+
+[ToolboxTab]
+inherits=PanelButtonCommand
+text.normal.color=#c0caf5
+text.press.color=#c0caf5
+text.focus.color=#c0caf5
+
+[Tab]
+inherits=PanelButtonCommand
+interior.element=tab
+text.margin.left=8
+text.margin.right=8
+text.margin.top=2
+text.margin.bottom=2
+frame.element=tab
+indicator.element=tab
+frame.top=4
+frame.bottom=4
+frame.left=4
+frame.right=4
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.toggle.color=#c0caf5
+frame.expansion=0
+
+[TabFrame]
+inherits=PanelButtonCommand
+frame.element=tabframe
+interior.element=tabframe
+frame.top=4
+frame.bottom=4
+frame.left=4
+frame.right=4
+
+[TreeExpander]
+inherits=PanelButtonCommand
+indicator.size=12
+indicator.element=tree
+
+[HeaderSection]
+inherits=PanelButtonCommand
+interior.element=header
+frame.element=header
+frame.top=3
+frame.bottom=3
+frame.left=1
+frame.right=1
+text.bold=true
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.toggle.color=#c0caf5
+frame.expansion=0
+
+[SizeGrip]
+indicator.element=resize-grip
+
+[Toolbar]
+inherits=PanelButtonCommand
+indicator.element=toolbar
+indicator.size=5
+text.margin=0
+frame=false
+interior.element=menubar
+frame.element=menubar
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+frame.bottom=0
+frame.expansion=0
+
+[Slider]
+inherits=PanelButtonCommand
+frame.element=slider
+interior.element=slider
+frame.top=3
+frame.bottom=3
+frame.left=3
+frame.right=3
+
+[SliderCursor]
+inherits=PanelButtonCommand
+frame=false
+interior.element=slidercursor
+
+[Progressbar]
+inherits=PanelButtonCommand
+frame.element=progress
+interior.element=progress
+text.margin=0
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.press.color=#c0caf5
+text.toggle.color=#c0caf5
+text.bold=false
+frame.expansion=8
+
+[ProgressbarContents]
+inherits=PanelButtonCommand
+frame=true
+frame.element=progress-pattern
+interior.element=progress-pattern
+
+[ItemView]
+inherits=PanelButtonCommand
+text.margin=0
+frame.element=itemview
+interior.element=itemview
+frame.top=2
+frame.bottom=2
+frame.left=2
+frame.right=2
+text.margin.top=2
+text.margin.bottom=2
+text.margin.left=4
+text.margin.right=4
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.press.color=#c0caf5
+text.toggle.color=#c0caf5
+frame.expansion=0
+
+[Splitter]
+indicator.size=48
+
+[Scrollbar]
+inherits=PanelButtonCommand
+indicator.element=arrow
+indicator.size=10
+
+[ScrollbarSlider]
+inherits=PanelButtonCommand
+frame.element=scrollbarslider
+interior=false
+frame.left=6
+frame.right=6
+frame.top=6
+frame.bottom=6
+indicator.element=grip
+indicator.size=13
+frame.expansion=48
+
+[ScrollbarGroove]
+inherits=PanelButtonCommand
+interior=false
+frame=false
+
+[MenuItem]
+inherits=PanelButtonCommand
+frame=true
+frame.element=menuitem
+interior.element=menuitem
+indicator.element=menuitem
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.margin.top=1
+text.margin.bottom=1
+text.margin.left=15
+text.margin.right=5
+frame.top=3
+frame.bottom=3
+frame.left=3
+frame.right=3
+frame.expansion=0
+
+[MenuBar]
+inherits=PanelButtonCommand
+frame.element=menubar
+interior.element=menubar
+frame.bottom=0
+frame.expansion=0
+
+[MenuBarItem]
+inherits=PanelButtonCommand
+interior=true
+interior.element=menubaritem
+frame.element=menubaritem
+frame.top=2
+frame.bottom=2
+frame.left=2
+frame.right=2
+text.margin.left=4
+text.margin.right=4
+text.margin.top=0
+text.margin.bottom=0
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+frame.expansion=0
+
+[TitleBar]
+inherits=PanelButtonCommand
+frame=false
+interior.element=titlebar
+indicator.size=12
+indicator.element=mdi
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.bold=true
+text.italic=true
+frame.expansion=0
+
+[ComboBox]
+inherits=PanelButtonCommand
+interior.element=combo
+frame.element=combo
+text.press.color=#c0caf5
+indicator.element=carrow
+
+[Menu]
+inherits=PanelButtonCommand
+frame.top=1
+frame.bottom=1
+frame.left=1
+frame.right=1
+frame.element=menu
+interior.element=menu
+text.normal.color=#c0caf5
+text.shadow=false
+frame.expansion=0
+
+[GroupBox]
+inherits=GenericFrame
+frame=false
+text.shadow=0
+text.margin=0
+text.normal.color=#c0caf5
+text.focus.color=#c0caf5
+text.bold=true
+frame.expansion=0
+
+[TabBarFrame]
+inherits=GenericFrame
+frame=true
+frame.element=tabBarFrame
+interior=false
+frame.top=4
+frame.bottom=4
+frame.left=4
+frame.right=4
+
+[ToolTip]
+inherits=GenericFrame
+frame.top=3
+frame.bottom=3
+frame.left=3
+frame.right=3
+interior=true
+text.shadow=0
+text.margin=0
+interior.element=tooltip
+frame.element=tooltip
+frame.expansion=0
+
+[StatusBar]
+inherits=GenericFrame
+frame=false
+interior=false
+
+[Window]
+interior=true
+interior.element=window
diff --git a/dot_config/Kvantum/KvArcTokyoNight/KvArcTokyoNight.svg b/dot_config/Kvantum/KvArcTokyoNight/KvArcTokyoNight.svg
new file mode 100644
index 0000000..fcf3c39
--- /dev/null
+++ b/dot_config/Kvantum/KvArcTokyoNight/KvArcTokyoNight.svg
@@ -0,0 +1,5172 @@
+
+
diff --git a/dot_config/Kvantum/kvantum.kvconfig b/dot_config/Kvantum/kvantum.kvconfig
new file mode 100644
index 0000000..c229972
--- /dev/null
+++ b/dot_config/Kvantum/kvantum.kvconfig
@@ -0,0 +1,2 @@
+[General]
+theme=KvArcTokyoNight
diff --git a/dot_config/ghostty/config b/dot_config/ghostty/config
new file mode 100644
index 0000000..f299329
--- /dev/null
+++ b/dot_config/ghostty/config
@@ -0,0 +1,13 @@
+theme = dark:tokyonight,light:tokyonight-day
+font-family = MonaspiceNe Nerd Font Mono
+font-size = 16.0
+desktop-notifications = false
+
+keybind = ctrl+n=new_window
+keybind = ctrl+t=new_tab
+keybind = ctrl+h=previous_tab
+keybind = ctrl+left=previous_tab
+keybind = ctrl+l=next_tab
+keybind = ctrl+right=next_tab
+keybind = ctrl+space=toggle_quick_terminal
+keybind = global:ctrl+space=toggle_quick_terminal
diff --git a/dot_config/git/config b/dot_config/git/config
index c1ea46f..c92bcde 100644
--- a/dot_config/git/config
+++ b/dot_config/git/config
@@ -1,16 +1,16 @@
[user]
- name = Cian Hughes
- email = chughes000@gmail.com
+ name = Cian Hughes
+ email = chughes000@gmail.com
[init]
- defaultBranch = "main"
+ defaultBranch = "main"
[credential]
- helper = manager
+ helper = manager
credentialStore = gpg
[filter "lfs"]
- clean = git-lfs clean -- %f
- smudge = git-lfs smudge -- %f
- process = git-lfs filter-process
- required = true
+ clean = git-lfs clean -- %f
+ smudge = git-lfs smudge -- %f
+ process = git-lfs filter-process
+ required = true
[core]
pager = delta
[diff]
diff --git a/dot_config/just/justfile b/dot_config/just/justfile
index 0b312fe..9e75084 100644
--- a/dot_config/just/justfile
+++ b/dot_config/just/justfile
@@ -2,3 +2,10 @@ mod? nix "~/.config/nix"
default:
@just -g --list
+
+update-homeserver:
+ ssh homeserver just -g nix prebuild
+ ssh root@homeserver chown -R root:nixcfg /home/cianh/.config/nix/
+ ssh root@homeserver just -g update-root
+ ssh root@homeserver chown -R cianh:nixcfg /home/cianh/.config/nix/
+ ssh homeserver just -g nix _update-home
diff --git a/dot_config/kitty/config/keybindings.conf b/dot_config/kitty/config/keybindings.conf
index 034eb25..03df086 100644
--- a/dot_config/kitty/config/keybindings.conf
+++ b/dot_config/kitty/config/keybindings.conf
@@ -8,29 +8,20 @@ map ctrl+shift+[ discard_event
map ctrl+shift+] discard_event
map ctrl+shift+n discard_event
map ctrl+shift+q discard_event
-# I like the zellij bindings so lets make something similar here
-map alt+n new_window
-map alt+shift+n launch --cwd=current
-map ctrl+alt+n new_os_window
-map ctrl+alt+shift+n new_os_window_with_cwd
-map alt+q close_window
-map alt+l next_window
-map alt+right next_window
-map alt+h previous_window
-map alt+left previous_window
-map alt+shift+l move_window_forward
-map alt+shift+right move_window_forward
-map alt+shift+h move_window_backward
-map alt+shift+left move_window_backward
-map alt+r start_resizing_window
-# Lets fill in the gaps with tab controls that make sense
-map alt+t new_tab
-map alt+shift+t set_tab_title
-map alt+k next_tab
-map alt+up next_tab
-map alt+j previous_tab
-map alt+down previous_tab
-map alt+shift+k move_tab_forward
-map alt+shift+up move_tab_forward
-map alt+shift+j move_tab_backward
-map alt+shift+down move_tab_backward
+# Next, lets bind my usual keys, with ctrl as the modifier key
+map ctrl+h new_window
+map ctrl+shift+h launch --cwd=current
+map ctrl+n new_os_window
+map ctrl+shift+n new_os_window_with_cwd
+map ctrl+q close_window
+map ctrl+right next_window
+map ctrl+left previous_window
+map ctrl+shift+right move_window_forward
+map ctrl+shift+left move_window_backward
+map ctrl+space start_resizing_window
+map ctrl+t new_tab
+map ctrl+shift+t set_tab_title
+map ctrl+l next_tab
+map ctrl+h previous_tab
+map alt+shift+l move_tab_forward
+map alt+shift+h move_tab_backward
diff --git a/dot_config/nushell/aliases.nu b/dot_config/nushell/aliases.nu
index 6e123a2..bb455f5 100644
--- a/dot_config/nushell/aliases.nu
+++ b/dot_config/nushell/aliases.nu
@@ -33,9 +33,6 @@ export alias bashpoem = poetry run bash
export alias nupoem = poetry run nu
export alias jupyterpoem = poetry run jupyter
-# Aliases for custom git commands
-export alias git-ammend = git commit -a --amend -C HEAD
-
# Who even uses vim or *especially* vi in this day and age?
export alias vim = nvim
export alias vi = nvim
diff --git a/dot_config/nushell/completions/nu_scripts.nu b/dot_config/nushell/completions/nu_scripts.nu
index a816f8e..95843fd 100644
--- a/dot_config/nushell/completions/nu_scripts.nu
+++ b/dot_config/nushell/completions/nu_scripts.nu
@@ -12,7 +12,6 @@ source ~/.config/nushell/nu_scripts/custom-completions/man/man-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/mix/mix-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/nano/nano-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/nix/nix-completions.nu
-source ~/.config/nushell/nu_scripts/custom-completions/pass/pass-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/poetry/poetry-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/pre-commit/pre-commit-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/pytest/pytest-completions.nu
diff --git a/dot_config/nushell/config.nu b/dot_config/nushell/config.nu
index 125ec21..8c0224c 100644
--- a/dot_config/nushell/config.nu
+++ b/dot_config/nushell/config.nu
@@ -11,7 +11,5 @@ source ~/.config/nushell/nu_scripts.nu
source ~/.config/nushell/completions/atuin.nu
source ~/.config/nushell/completions/zoxide.nu
source ~/.config/nushell/completions/nu_scripts.nu
-# import nushell libs
-use task.nu
# Finally, we run a system info fetch
sysfetch
diff --git a/dot_config/nushell/env.nu b/dot_config/nushell/env.nu
index f353f2a..d772486 100644
--- a/dot_config/nushell/env.nu
+++ b/dot_config/nushell/env.nu
@@ -71,10 +71,6 @@ $env.LESS_TERMCAP_so = (ansi --escape "01;44;36m") # begin standout-mode (botto
$env.LESS_TERMCAP_se = (ansi --escape "0m") # end standout-mode
$env.LESS_TERMCAP_us = (ansi --escape "00;36m") # begin underline
$env.LESS_TERMCAP_ue = (ansi --escape "0m") # end underline
-# Set a custom copy of TERM so that shells under multiplexors behave correctly
-if not ("MAIN_TERM" in $env) {
- $env.MAIN_TERM = $env.TERM
-}
# Finally, add session path variables
$env.PATH = (
diff --git a/dot_config/nushell/my_config.nu b/dot_config/nushell/my_config.nu
index 6a585a3..317e3a0 100644
--- a/dot_config/nushell/my_config.nu
+++ b/dot_config/nushell/my_config.nu
@@ -29,7 +29,7 @@ export def main [] {
PWD: [
{|before, after| # This hook runs onefetch when the current directory is a git repository
if ".git\n" in ($after | ls -a | str join) {
- print (^onefetch)
+ print (^onefetch --nerd-fonts)
}
},
{||
diff --git a/dot_config/nushell/nu_scripts b/dot_config/nushell/nu_scripts
new file mode 160000
index 0000000..fd686c0
--- /dev/null
+++ b/dot_config/nushell/nu_scripts
@@ -0,0 +1 @@
+Subproject commit fd686c0b0c10e284b1da72d6c3c42ab28c7504a7
diff --git a/dot_config/nushell/prompt.nu b/dot_config/nushell/prompt.nu
index cb562c9..0917ba4 100644
--- a/dot_config/nushell/prompt.nu
+++ b/dot_config/nushell/prompt.nu
@@ -1,62 +1,45 @@
-export def create_left_prompt [] -> string {
- canonicalize_linefeeds (
- ^starship prompt
- --cmd-duration $env.CMD_DURATION_MS
- $"--status=($env.LAST_EXIT_CODE)"
- --terminal-width (term size).columns
- )
+def get_env [s: string]: string -> string {
+ try { $env | get --ignore-errors $s } catch { "" }
}
-export def create_right_prompt [] -> string {
- canonicalize_linefeeds (
- ^starship prompt
- --right
- --cmd-duration $env.CMD_DURATION_MS
- $"--status=($env.LAST_EXIT_CODE)"
- --terminal-width (term size).columns
- )
+export def create_left_prompt []: nothing -> string {
+ ^starship prompt --cmd-duration (get_env "CMD_DURATION_MS") --status (get_env "LAST_EXIT_CODE") --terminal-width (term size).columns
}
-export def create_continuation_prompt [] -> string {
- canonicalize_linefeeds (
- ^starship prompt
- --continuation
- --cmd-duration $env.CMD_DURATION_MS
- $"--status=($env.LAST_EXIT_CODE)"
- --terminal-width (term size).columns
- )
+export def create_right_prompt []: nothing -> string {
+ ^starship prompt --right --cmd-duration (get_env "CMD_DURATION_MS") --status (get_env "LAST_EXIT_CODE") --terminal-width (term size).columns
}
-def parse_ms_to_human_readable [ms: string] -> string {
- let $time_in_ms = $ms | into int;
- if $time_in_ms < 1000 {
- $"($time_in_ms | into string)ms"
- } else if $time_in_ms < 1000 * 60 {
- $"(($time_in_ms / 1000) | into string --decimals 2)s"
- } else if $time_in_ms < 1000 * 60 * 60 {
- $"(($time_in_ms / (1000 * 60)) | into string --decimals 2)m"
- } else if $time_in_ms < 1000 * 60 * 60 * 24 {
- $"(($time_in_ms / (1000 * 60 * 60)) | into string --decimals 2)h"
+export def create_continuation_prompt []: nothing -> string {
+ ^starship prompt --continuation --cmd-duration (get_env "CMD_DURATION_MS") --status (get_env "LAST_EXIT_CODE") --terminal-width (term size).columns
+}
+
+def parse_ms_to_human_readable [ms: string]: string -> string {
+ if $ms == "" {
+ $ms
} else {
- $"(($time_in_ms // (1000 * 60 * 60 * 24)) | into string)d/(parse_ms_to_human_readable ($time_in_ms mod (1000 * 60 * 60 * 24)))"
- } | into string
-}
-
-export def create_transient_prompt_left [] -> string {
- if $env.LAST_EXIT_CODE == 0 {
- $"(ansi green_bold)├(ansi reset)"
- } else {
- $"(ansi red_bold)┬(ansi reset)"
+ let $time_in_ms = $ms | into int;
+ if $time_in_ms < 1000 {
+ $"($time_in_ms | into string)ms"
+ } else if $time_in_ms < 1000 * 60 {
+ $"(($time_in_ms / 1000) | into string --decimals 2)s"
+ } else if $time_in_ms < 1000 * 60 * 60 {
+ $"(($time_in_ms / (1000 * 60)) | into string --decimals 2)m"
+ } else if $time_in_ms < 1000 * 60 * 60 * 24 {
+ $"(($time_in_ms / (1000 * 60 * 60)) | into string --decimals 2)h"
+ } else {
+ $"(($time_in_ms // (1000 * 60 * 60 * 24)) | into string)d/(parse_ms_to_human_readable ($time_in_ms mod (1000 * 60 * 60 * 24)))"
+ } | into string
}
}
-export def create_transient_prompt_indicator [] -> string {
- $"(ansi blue_bold) ⏲(parse_ms_to_human_readable $env.CMD_DURATION_MS) (if $env.LAST_EXIT_CODE == 0 { ansi green_bold } else { ansi red_bold })➜(ansi reset) "
-}
-def canonicalize_linefeeds (x: string) -> string {
- if ("OS" in $env) and ($env.OS == "Windows_NT") {
- $x | str replace "\n" "\r\n"
+export def create_transient_prompt_left []: nothing -> string {
+ if (get_env "LAST_EXIT_CODE") == 0 {
+ $"(ansi green_bold)(ansi reset)"
} else {
- $x
+ $"(ansi red_bold)(ansi reset)"
}
}
+export def create_transient_prompt_indicator []: nothing -> string {
+ $"(ansi blue_bold) (parse_ms_to_human_readable (get_env "CMD_DURATION_MS")) (if (get_env "LAST_EXIT_CODE") == 0 { ansi green_bold } else { ansi red_bold })(ansi reset) "
+}
diff --git a/dot_config/nushell/scripts/task.nu b/dot_config/nushell/scripts/task.nu
deleted file mode 100644
index 419bccd..0000000
--- a/dot_config/nushell/scripts/task.nu
+++ /dev/null
@@ -1,458 +0,0 @@
-export module mod {
- export def main [] {"
- Subcommands:
- clean: Remove tasks from the status list.
- edit: Edit the command, path or label of a stashed or queued task.
- group: Add or remove groups.
- kill: Kill specific running tasks or whole task groups.
- log: Display the output of tasks.
- pause: Either pause a running tasks or a specific groups of tasks.
- queue: Queue stashed tasks for execution.
- remove: Remove tasks from the queue.
- restart: Restart failed or successful task(s).
- send: Send something to a task. Useful for sending confirmations such as 'y' or 'n'.
- set-parallel-limit: Set the maximum parallel tasks for a group.
- shutdown: Shutdown pueue and thus this module.
- spawn: Spawn a task to run in the background, even when the shell is closed.
- start: Resume operation of specific tasks or groups of tasks.
- stash: Stash a task that is not currently running.
- status: Display the current status of all tasks.
- switch: Switches the queue position of two tasks.
- wait: Wait until the provided tasks are finished.
- "}
-
-# Spawn a task to run in the background, even when the shell is closed.
-#
-# Note that a fresh Nushell interpreter is spawned to execute the
-# given task, so it won't inherit the current scope's variables,
-# custom commands and alias definitions.
-#
-# It will only inherit environment variables which can be converted to a string.
-#
-# Note that the closure can't take arguments.
-#
-# Example usage: task spawn { echo "Hello, World!" }
- export def spawn [
- command: closure # The closure to run.
- --working-directory (-w): directory # Specify the working directory the task will be run in.
- --immediate (-i) # Immediately start the task.
- --stashed (-s) # Create the task in Stashed state. Useful to avoid immediate execution if the queue is empty
- --delay (-d): duration # Queue the task for execution only after the duration.
- --group (-g): string # The group to spawn the task under.
- --after (-a): int # Start the task once all specified tasks have successfully finished. As soon as one of the dependencies fails, this task will fail as well.
- --priority (-o): string # Start this task with a higher priority. The higher the number, the faster it will be processed.
- --label (-l): string # Label the task. This string will be shown in the `status` column of `task status`.
- ] -> int {
- mut args = []
-
- if $working_directory != null {
- $args = ($args | prepend ["--working-directory", $working_directory])
- }
- if $immediate {
- $args = ($args | prepend "--immediate")
- }
- if $stashed {
- $args = ($args | prepend "--stashed")
- }
- if $delay != null {
- $args = ($args | prepend ["--delay" ($delay | format duration sec | parse "{secs} {_}" | get 0.secs)])
- }
- if $group != null {
- $args = ($args | prepend ["--group" $group])
- }
- if $after != null {
- $args = ($args | prepend ["--after" $after])
- }
- if $priority != null {
- $args = ($args | prepend ["--priority" $priority])
- }
- if $label != null {
- $args = ($args | prepend ["--label" $label])
- }
-
- let source_path = mktemp --tmpdir --suffix "-nu-task"
-
- (
- view source $command
- | str trim --left --char "{"
- | str trim --right --char "}"
- )
- | save --force $source_path
-
- (pueue add --print-task-id ...$args $"nu --config '($nu.config-path)' --env-config '($nu.env-path)' ($source_path)")
- }
-
-# Remove tasks from the queue.
-# Running or paused tasks need to be killed first.
- export def remove [
- ...ids: int # IDs of the tasks to remove from the status list.
- ] {
- pueue remove ...$ids
- }
-
-# Switches the queue position of two tasks.
-# Only works for queued or stashed tasks.
- export def switch [
- task_id_1: int # The first task ID.
- task_id_2: int # The second task ID.
- ] {
- pueue switch $task_id_1 $task_id_2
- }
-
-# Stash a task that is not currently running.
-#
-# Stashed tasks won't be automatically started.
-# You will have to queue them or start them by hand.
- export def stash [
- ...ids: int # IDs of the tasks to stash.
- ] {
- pueue stash ...$ids
- }
-
-# Queue stashed tasks for execution.
- export def queue [
- ...ids: int # IDs of the tasks to queue.
- --delay (-d): duration # Queue only after the specified delay.
- ] {
- let args = if $delay != null {
- ["--delay" ($delay | format duration sec | parse '{secs} {_}' | get 0.secs)]
- } else {
- []
- }
-
- pueue enqueue ...$args ...$ids
- }
-
-# Resume operation of specific tasks or groups of tasks.
-#
-# By default, this resumes the default group and all its tasks.
-# It can also be used force-start specific tasks or start whole groups.
- export def start [
- ...ids: int # IDs of the tasks to start. By default all the tasks in the default group will be started.
- --group (-g): string # Resume a specific group and all paused tasks in it. The group will be set to running and its paused tasks will be resumed.
- --all (-a) # Resume all groups. All groups will be set to running and paused tasks will be resumed.
- ] {
- mut args = []
-
- if $group != null {
- $args = ($args | prepend ["--group" $group])
- }
- if $all {
- $args = ($args | prepend "--all")
- }
-
- pueue start ...$args
- }
-
-# Restart failed or successful task(s).
-#
-# By default, identical tasks will be created and
-# enqueued, but it's possible to restart in-place.
-#
-# You can also edit a few properties, such as
-# the path and the command of the task, before restarting.
- export def restart [
- ...ids: int # IDs of the tasks to restart.
- --all-failed (-a) # Restart all failed tasks across all groups. Nice to use in combination with `--in-place/i`.
- --failed-in-group (-g): string # Like `--all-failed`, but only restart tasks failed tasks of a specific group. The group will be set to running and its paused tasks will be resumed.
- --start-immediately (-k) # Immediately start the tasks, no matter how many open slots there are. This will ignore any dependencies tasks may have.
- --stashed (-s) # Set the restarted task to a "Stashed" state. Useful to avoid immediate execution.
- --in-place (-i) # Restart the tasks by reusing the already existing tasks.
- --not-in-place (-n) # Opposite of `--in-place`. This is already the default unless you have `restart_in_place` set to true.
- --edit (-e) # Edit the tasks' commands before restarting
- --edit-path (-p) # Edit the tasks' paths before restarting
- --edit-label (-l) # Edit the tasks' labels before restarting
- ] {
- mut args = []
-
- if $all_failed {
- $args = ($args | prepend "--all-failed")
- }
- if $failed_in_group != null {
- $args = ($args | prepend "--failed-in-group")
- }
- if $start_immediately {
- $args = ($args | prepend "--start-immediately")
- }
- if $stashed {
- $args = ($args | prepend "--stashed")
- }
- if $in_place {
- $args = ($args | prepend "--in-place")
- }
- if $not_in_place {
- $args = ($args | prepend "--not-in-place")
- }
- if $edit {
- $args = ($args | prepend "--edit")
- }
- if $edit_path {
- $args = ($args | prepend "--edit-path")
- }
- if $edit_label {
- $args = ($args | prepend "--edit-label")
- }
-
- pueue restart ...$args ...$ids
- }
-
-# Either pause a running tasks or a specific groups of tasks.
-#
-# By default, pauses the default group and all its tasks.
-#
-# A paused group won't start any new tasks automatically.
- export def pause [
- ...ids: int # IDs of the tasks to pause.
- --group (-g) # Pause a specific group
- --all (-a) # Pause all groups.
- --wait (-w) # Only pause the specified group and let already running tasks finish by themselves
- ] {
- mut args = []
-
- if $group != null {
- $args = ($args | prepend "--group")
- }
- if $all != null {
- $args = ($args | prepend "--all")
- }
- if $wait != null {
- $args = ($args | prepend "--wait")
- }
-
- pueue pause ...$args ...$ids
- }
-
-# Kill specific running tasks or whole task groups.
-#
-# Kills all tasks of the default group when no ids or a specific group are provided.
- export def kill [
- ...ids: int # IDs of the tasks to kill.
- --group (-g): string # Kill all running tasks in a group. This also pauses the group.
- --all (-a) # Kill all running tasks across ALL groups. This also pauses all groups.
- --signal (-s): string # Send a UNIX signal instead of simply killing the process. DISCLAIMER: This bypasses Pueue's process handling logic! You might enter weird invalid states, use at your own descretion.
- ] {
- mut args = []
-
- if $group != null {
- $args = ($args | prepend ["--group" $group])
- }
- if $all {
- $args = ($args | prepend "--all")
- }
- if $signal != null {
- $args = ($args | prepend ["--signal" $signal])
- }
-
- pueue kill ...$args ...$ids
- }
-
-# Send something to a task. Useful for sending confirmations such as "y\n".
- export def send [
- id: int # ID of the task to send something to.
- input: string # The input that should be sent to the process.
- ] {
- pueue send $id $input
- }
-
-# Edit the command, path or label of a stashed or queued task.
-#
-# By default only the command is edited.
-#
-# Multiple properties can be added in one go.
- export def edit [
- id: int # ID of the task to edit.
- --command (-c) # Edit the task's command
- --path (-p) # Edit the task's path
- --label (-l) # Edit the task's label
- ] {
- mut args = []
-
- if $command {
- $args = ($args | prepend "--command")
- }
- if $path {
- $args = ($args | prepend "--path")
- }
- if $label {
- $args = ($args | prepend "--label")
- }
-
- pueue edit ...$args $id
- }
-
-# Use this to add or remove groups.
-#
-# By default, this will simply display all known groups.
- export def group [] {
- pueue group --json | from json
- }
-
-# Create a new group with a name.
- export def "group add" [
- name: string # The name of the new group.
- --parallel (-p): int # The amount of parallel tasks the group can run at one time.
- ] {
- let args = if $parallel != null {
- ["--parallel" $parallel]
- } else {
- []
- }
-
- pueue group add ...$args $name
- }
-
-# Remove a group with a name.
- export def "group remove" [
- name: string # The name of the group to be removed.
- ] {
- pueue group remove $name
- }
-
-# Display the current status of all tasks.
- export def status [
- --detailed (-d) # Return a table with more detailed information.
- ] {
- let output = (
- pueue status --json
- | from json
- | get tasks
- | transpose --ignore-titles status
- | flatten
- )
-
- # TODO: Rename the Done column to done.
- if not $detailed {
- $output | select id label group Done? status? start? end?
- } else {
- $output
- }
- }
-
-# Display the output of tasks.
-#
-# Only the last few lines will be shown by default for multiple tasks.
-# If you want to follow the output, use `--tail/-t`.
- export def log [
- ...ids: int # The tasks to check the outputs of.
- --last (-l): int # Only print the last N lines of each task's output. This is done by default if you're looking at multiple tasks.
- --tail (-t) # Follow the output as it is printing. Only works with 1 task. When used in conjunction with `--last`, the last N lines will be printed before starting to wait for output.
- --detailed (-d) # Include all fields, don't simplify output.
- ] {
- def process_raw [raw: string] {
- let full = (
- $raw
- | from json
- | transpose -i info
- | flatten --all
- | flatten --all
- )
-
- if $detailed {
- $full
- } else {
- $full | select id label group Done? status? start? end?
- }
- }
-
- if (($ids | length) == 1) {
- if $tail {
- let args = if $last != null {
- ["--lines" $last]
- } else {
- []
- }
-
- pueue follow ...$ids
- } else {
- let args = if $last != null {
- ["--lines" $last]
- } else {
- []
- }
-
- process_raw (pueue log --full --json ...$args ...$ids)
- | first
- }
- } else {
- if $tail {
- echo $"(ansi red)--tail can only be used with one task.(ansi reset)"
- return
- }
-
- let args = if $last != null {
- ["--lines" $last]
- } else {
- []
- }
-
- process_raw (pueue log --full --json ...$args ...$ids)
- }
- }
-
-# Wait until the provided tasks are finished.
-#
-# This is like join() or await in many languages.
- export def wait [
- ...ids: int # IDs of the tasks to wait for.
- --group (-g): string # Wait for all tasks in a specific group.
- --all (-a) # Wait for all tasks across all groups and the default group.
- --quiet (-q) # Don't show any log output while waiting.
- --status (-s): string # Wait for tasks to reach a specific task status.
- ] {
- mut args = []
-
- if $group != null {
- $args = ($args | prepend ["--group" $group])
- }
- if $all {
- $args = ($args | prepend $all)
- }
- if $quiet {
- $args = ($args | prepend $quiet)
- }
- if $status != null {
- $args = ($args | prepend ["--status" $status])
- }
-
- pueue wait ...$args ...$ids
- }
-
-# Remove tasks from the status list.
- export def clean [
- --successful-only (-s) # Only clean tasks that finished successfully
- --group (-g): string # Only clean tasks of a specific group
- ] {
- mut args = []
-
- if $successful_only {
- $args = ($args | prepend "--successful-only")
- }
- if $group != null {
- $args = ($args | prepend ["--group" $group])
- }
-
- pueue clean ...$args
- }
-
-# Shutdown pueue and thus this module.
- export def shutdown [] {
- pueue shutdown
- }
-
-# Set the maximum parallel tasks for a group.
-#
-# Note that no tasks will be stopped if the number is lowered.
-# The limit only applies when schelduing.
- export def set-parallel-limit [
- max: int # The maximum parallel tasks allowed for a group when schelduing.
- --group (-g): string # The group to set the limit for. By default this is `default`.
- ] {
- let args = if $group != null {
- ["--group" $group]
- } else {
- []
- }
-
- pueue parallel ...$args $max
- }
-}
diff --git a/dot_config/nushell/utils.nu b/dot_config/nushell/utils.nu
index be542e0..d032392 100644
--- a/dot_config/nushell/utils.nu
+++ b/dot_config/nushell/utils.nu
@@ -1,10 +1,10 @@
-export def 'exists' [ app: string ] -> bool {
+export def 'exists' [ app ]: string -> bool {
not (which $app | is-empty)
}
-export def 'sysfetch' [] {
+export def 'sysfetch' []: nothing -> nothing {
if (exists fastfetch) {
- if ("MAIN_TERM" in $env) and ("kitty" in $env.MAIN_TERM) and ($"($env.HOME)/.config/fastfetch/kitty.jsonc" | path exists) {
+ if (("kitty" in $env.TERM) or ("ghostty" in $env.TERM)) and ($"($env.HOME)/.config/fastfetch/kitty.jsonc" | path exists) {
fastfetch --load-config $"($env.HOME)/.config/fastfetch/kitty.jsonc"
} else {
fastfetch
@@ -23,7 +23,7 @@ export def 'sysfetch' [] {
}
}
-export def 'register-plugins' [] {
+export def 'register-plugins' []: nothing -> nothing {
for plugin_dir in $env.NU_PLUGIN_DIRS {
for plugin_path in (ls $"($env.NU_PLUGIN_DIRS.0)/nu_plugin_*").name {
nu -c $"register ($plugin_path)"
@@ -31,7 +31,7 @@ export def 'register-plugins' [] {
}
}
-export def 'build-plugins' [] {
+export def 'build-plugins' []: nothing -> nothing {
let curdir = pwd
let plugin_dir = $env.NU_PLUGIN_DIRS.0
cd $plugin_dir
@@ -40,7 +40,7 @@ export def 'build-plugins' [] {
register-plugins
}
-export def 'install-default-plugins' [] {
+export def 'install-default-plugins' []: nothing -> nothing {
[ nu_plugin_inc
nu_plugin_polars
# nu_plugin_gstat
diff --git a/dot_config/nvim/ftplugin/elixir.lua b/dot_config/nvim/ftplugin/elixir.lua
new file mode 100644
index 0000000..1b5bef9
--- /dev/null
+++ b/dot_config/nvim/ftplugin/elixir.lua
@@ -0,0 +1,2 @@
+vim.bo.tabstop = 2
+vim.bo.shiftwidth = 2
diff --git a/dot_config/nvim/ftplugin/go.lua b/dot_config/nvim/ftplugin/go.lua
new file mode 100644
index 0000000..1b5bef9
--- /dev/null
+++ b/dot_config/nvim/ftplugin/go.lua
@@ -0,0 +1,2 @@
+vim.bo.tabstop = 2
+vim.bo.shiftwidth = 2
diff --git a/dot_config/nvim/ftplugin/nix.lua b/dot_config/nvim/ftplugin/nix.lua
new file mode 100644
index 0000000..1b5bef9
--- /dev/null
+++ b/dot_config/nvim/ftplugin/nix.lua
@@ -0,0 +1,2 @@
+vim.bo.tabstop = 2
+vim.bo.shiftwidth = 2
diff --git a/dot_config/nvim/ftplugin/rust.lua b/dot_config/nvim/ftplugin/rust.lua
new file mode 100644
index 0000000..40b1976
--- /dev/null
+++ b/dot_config/nvim/ftplugin/rust.lua
@@ -0,0 +1 @@
+vim.keymap.set("i", "'", "'", { buffer = 0 })
diff --git a/dot_config/nvim/lua/config/keys.lua b/dot_config/nvim/lua/config/keys.lua
index 55a356f..6c0cd23 100644
--- a/dot_config/nvim/lua/config/keys.lua
+++ b/dot_config/nvim/lua/config/keys.lua
@@ -7,6 +7,7 @@ return {
{ "r", group = "[R]ename" },
{ "w", group = "[W]orkspace" },
{ "t", group = "[T]ree" },
+ { "l", group = "[L]azyGit" },
{ "o", group = "[O]verseer" },
{ "h", group = "[H]arpoon" },
{ "x", group = "[X] Trouble" },
@@ -41,7 +42,7 @@ return {
mode = "n",
},
{
- "",
+ "",
function()
require("harpoon"):list():select(1)
end,
@@ -49,7 +50,7 @@ return {
mode = "n",
},
{
- "",
+ "",
function()
require("harpoon"):list():select(2)
end,
@@ -57,7 +58,7 @@ return {
mode = "n",
},
{
- "",
+ "",
function()
require("harpoon"):list():select(3)
end,
@@ -65,7 +66,7 @@ return {
mode = "n",
},
{
- "",
+ "",
function()
require("harpoon"):list():select(4)
end,
@@ -74,7 +75,30 @@ return {
},
},
lazygit = {
- { "l", "LazyGit", desc = "[L]azyGit", mode = "n" },
+ {
+ "lg",
+ function()
+ vim.api.nvim_command("lua Snacks.lazygit()")
+ end,
+ desc = "[L]azy[G]it",
+ mode = "n",
+ },
+ {
+ "ll",
+ function()
+ vim.api.nvim_command("lua Snacks.lazygit.log()")
+ end,
+ desc = "[L]azyGit [L]og",
+ mode = "n",
+ },
+ {
+ "lf",
+ function()
+ vim.api.nvim_command("lua Snacks.lazygit.log_file()")
+ end,
+ desc = "[L]azyGit [F]ile Log",
+ mode = "n",
+ },
},
neogen = {
{
diff --git a/dot_config/nvim/lua/keybindings.lua b/dot_config/nvim/lua/keybindings.lua
index 7c74b31..8c33a17 100644
--- a/dot_config/nvim/lua/keybindings.lua
+++ b/dot_config/nvim/lua/keybindings.lua
@@ -1,19 +1,19 @@
--- vim.keymap.set("n", "", "h", { noremap = true, silent = true })
--- vim.keymap.set("n", "", "j", { noremap = true, silent = true })
--- vim.keymap.set("n", "", "k", { noremap = true, silent = true })
--- vim.keymap.set("n", "", "l", { noremap = true, silent = true })
-vim.keymap.set("n", "", "h", { noremap = true, silent = true })
-vim.keymap.set("n", "", "j", { noremap = true, silent = true })
-vim.keymap.set("n", "", "k", { noremap = true, silent = true })
-vim.keymap.set("n", "", "l", { noremap = true, silent = true })
-vim.keymap.set("n", "", "+", { noremap = true, silent = true })
-vim.keymap.set("n", "", "-", { noremap = true, silent = true })
-vim.keymap.set("n", "", ">", { noremap = true, silent = true })
-vim.keymap.set("n", "", "<", { noremap = true, silent = true })
-vim.keymap.set("n", "", "s", { noremap = true, silent = true })
+vim.keymap.set("n", "", "h", { noremap = true, silent = true })
+vim.keymap.set("n", "", "j", { noremap = true, silent = true })
+vim.keymap.set("n", "", "k", { noremap = true, silent = true })
+vim.keymap.set("n", "", "l", { noremap = true, silent = true })
+vim.keymap.set("n", "", "h", { noremap = true, silent = true })
+vim.keymap.set("n", "", "j", { noremap = true, silent = true })
+vim.keymap.set("n", "", "k", { noremap = true, silent = true })
+vim.keymap.set("n", "", "l", { noremap = true, silent = true })
+vim.keymap.set("n", "", "+", { noremap = true, silent = true })
+vim.keymap.set("n", "", "-", { noremap = true, silent = true })
+vim.keymap.set("n", "", ">", { noremap = true, silent = true })
+vim.keymap.set("n", "", "<", { noremap = true, silent = true })
+vim.keymap.set("n", "", "s", { noremap = true, silent = true })
-- This keymap isn't ideal but its the best i can figure out right now
-vim.keymap.set("n", "", "x", { noremap = true, silent = true })
-vim.keymap.set("n", "", ":q", { noremap = true, silent = true })
+vim.keymap.set("n", "", "x", { noremap = true, silent = true })
+vim.keymap.set("n", "", ":q", { noremap = true, silent = true })
-- Non standard key mappings are here
vim.keymap.set("n", "d", vim.diagnostic.open_float, { desc = "[D]iagnostics" })
vim.keymap.set("n", "f", vim.lsp.buf.format, { desc = "[F]ormat" })
diff --git a/dot_config/nvim/lua/plugins/mini.lua b/dot_config/nvim/lua/plugins/mini.lua
index c140463..447aa7e 100644
--- a/dot_config/nvim/lua/plugins/mini.lua
+++ b/dot_config/nvim/lua/plugins/mini.lua
@@ -17,29 +17,14 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
-- - sr)' - [S]urround [R]eplace [)] [']
require("mini.surround").setup()
- -- Simple and easy statusline.
- -- You could remove this setup call if you don't like it,
- -- and try some other statusline plugin
- -- local statusline = require("mini.statusline")
- -- set use_icons to true if you have a Nerd Font
- -- statusline.setup({ use_icons = vim.g.have_nerd_font })
-
- -- You can configure sections in the statusline by overriding their
- -- default behavior. For example, here we set the section for
- -- cursor location to LINE:COLUMN
- ---@diagnostic disable-next-line: duplicate-set-field
- -- statusline.section_location = function()
- -- return "%2l:%-2v"
- -- end
-
-- Setup of mini.notify
- -- local notify = require("mini.notify")
- -- notify.setup()
- -- vim.notify = notify.make_notify({
- -- ERROR = { duration = 5000 },
- -- WARN = { duration = 4000 },
- -- INFO = { duration = 3000 },
- -- })
+ local notify = require("mini.notify")
+ notify.setup()
+ vim.notify = notify.make_notify({
+ ERROR = { duration = 5000 },
+ WARN = { duration = 4000 },
+ INFO = { duration = 3000 },
+ })
-- Some other mini.nvim plugins that look useful to me
require("mini.clue").setup()
@@ -51,28 +36,68 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
require("mini.trailspace").setup()
-- My custom mini.starter config
-
- -- This function runs a vim command then exits the buffer that called it
- function _Launch_Vim_Cmd(cmd)
- local startbuf = vim.api.nvim_get_current_buf()
- vim.cmd(cmd)
- vim.api.nvim_buf_delete(startbuf, {})
- end
-
- local custom_items = {
+ local starter_items = {
{
- name = "Status",
- action = "Git status",
- section = "Git",
+ action = "Telescope file_browser",
+ name = "Tree",
+ section = "Telescope",
+ },
+ {
+ action = "Telescope live_grep",
+ name = "Live grep",
+ section = "Telescope",
+ },
+ {
+ action = "Telescope find_files",
+ name = "File grep",
+ section = "Telescope",
+ },
+ {
+ action = "Telescope command_history",
+ name = "Command history",
+ section = "Telescope",
+ },
+ {
+ action = "Telescope help_tags",
+ name = "Help tags",
+ section = "Telescope",
},
{
name = "Log",
- action = [[lua _Launch_Vim_Cmd("Git log --graph --pretty=oneline --abbrev-commit")]],
+ action = [[lua Snacks.lazygit.log()]],
section = "Git",
},
{
name = "Lazygit",
- action = "LazyGit",
+ action = [[lua Snacks.lazygit()]],
+ section = "Git",
+ },
+ {
+ name = "Browser",
+ action = function()
+ local handle = io.popen("git remote show")
+ if handle == nil then
+ vim.notify("Failed to find remote", vim.log.levels.ERROR)
+ return
+ end
+ local result = handle:read("*a")
+ handle:close()
+ local remote = vim.split(result, "\n")[1]
+ handle = io.popen("git remote get-url " .. remote)
+ if handle == nil then
+ vim.notify("Failed to get url for " .. remote, vim.log.levels.ERROR)
+ return
+ end
+ local url = handle:read("*a")
+ handle:close()
+ handle = io.popen("xdg-open " .. url)
+ if handle == nil then
+ vim.notify("Failed to open " .. url, vim.log.levels.ERROR)
+ return
+ end
+ result = handle:read("*a")
+ handle:close()
+ end,
section = "Git",
},
{
@@ -96,11 +121,8 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣷⡀⠀⠀⠀⠀⢹⣿⣆⠀⠀⠀⠀⠀\
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⡇⠀⠀⠀⠀⠸⣿⣿⡄⠀⠀⠀⠀\
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⡿⣿⣿⠀⠀⠀⠀\
-⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠀⠀⠀⠀⠀",
- items = {
- require("mini.starter").sections.telescope(),
- custom_items,
- },
+⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠈⠙⠀⠀⠀⠀⠀",
+ items = starter_items,
footer = "",
})
end,
diff --git a/dot_config/nvim/lua/plugins/snacks.lua b/dot_config/nvim/lua/plugins/snacks.lua
new file mode 100644
index 0000000..558bb68
--- /dev/null
+++ b/dot_config/nvim/lua/plugins/snacks.lua
@@ -0,0 +1,14 @@
+return {
+ {
+ "folke/snacks.nvim",
+ priority = 1000,
+ lazy = false,
+ ---@type snacks.Config
+ opts = {
+ bigfile = { enabled = true },
+ lazygit = { enabled = true },
+ quickfile = { enabled = true },
+ },
+ keys = require("config.keys").lazygit,
+ },
+}
diff --git a/dot_config/nvim/lua/plugins/ui.lua b/dot_config/nvim/lua/plugins/ui.lua
index 98e09dd..b2f75a1 100644
--- a/dot_config/nvim/lua/plugins/ui.lua
+++ b/dot_config/nvim/lua/plugins/ui.lua
@@ -98,12 +98,12 @@ return { -- UI components and other visual elements are declared here
{
"harpoon2",
icon = "",
- indicators = { "H", "J", "K", "L" },
+ indicators = { "A", "S", "D", "F" },
active_indicators = {
- "%#LualineHarpoonActive#H%*",
- "%#LualineHarpoonActive#J%*",
- "%#LualineHarpoonActive#K%*",
- "%#LualineHarpoonActive#L%*",
+ "%#LualineHarpoonActive#A%*",
+ "%#LualineHarpoonActive#S%*",
+ "%#LualineHarpoonActive#D%*",
+ "%#LualineHarpoonActive#F%*",
},
_separator = "∙",
no_harpoon = "Harpoon not loaded",
diff --git a/dot_config/nvim/lua/plugins/utils.lua b/dot_config/nvim/lua/plugins/utils.lua
index 908806f..30c065b 100644
--- a/dot_config/nvim/lua/plugins/utils.lua
+++ b/dot_config/nvim/lua/plugins/utils.lua
@@ -42,21 +42,6 @@ return { -- General programming utilities go here
},
"tpope/vim-fugitive", -- Also want to add fugitive, since it's apparently a great git plugin
"jlfwong/vim-mercenary", -- Mercenary is the mercurial equivalent of fugitive
- {
- "kdheepak/lazygit.nvim",
- cmd = {
- "LazyGit",
- "LazyGitConfig",
- "LazyGitCurrentFile",
- "LazyGitFilter",
- "LazyGitFilterCurrentFile",
- },
- -- optional for floating window border decoration
- dependencies = {
- "nvim-lua/plenary.nvim",
- },
- keys = require("config.keys").lazygit,
- },
{ -- Oil is a very nice buffer-based filetree editor
"stevearc/oil.nvim",
event = "VeryLazy",
@@ -167,19 +152,19 @@ return { -- General programming utilities go here
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert({
-- Select the [n]ext item
- [""] = cmp.mapping.select_next_item(),
+ [""] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
- [""] = cmp.mapping.select_prev_item(),
+ [""] = cmp.mapping.select_prev_item(),
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
- [""] = cmp.mapping.confirm({ select = true }),
+ [""] = cmp.mapping.confirm({ select = true }),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
- [""] = cmp.mapping.complete({}),
+ [""] = cmp.mapping.complete({}),
-- Think of as moving to the right of your snippet expansion.
-- So if you have a snippet that's like:
@@ -189,12 +174,12 @@ return { -- General programming utilities go here
--
-- will move you to the right of each of the expansion locations.
-- is similar, except moving you backwards.
- [""] = cmp.mapping(function()
+ [""] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { "i", "s" }),
- [""] = cmp.mapping(function()
+ [""] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
diff --git a/dot_config/starship.toml b/dot_config/starship.toml
index 5b7872f..14cffcf 100644
--- a/dot_config/starship.toml
+++ b/dot_config/starship.toml
@@ -1,17 +1,23 @@
+"$schema" = 'https://starship.rs/config-schema.json'
+
# Inserts a blank line between shell prompts
add_newline = true
-continuation_prompt = "[:::](yellow)"
+continuation_prompt = "[━ ](yellow)"
[character]
-success_symbol = "[➜](bold green) "
-error_symbol = "[✖](bold red) "
+success_symbol = "[](bold green) "
+error_symbol = "[](bold red) "
[cmd_duration]
-min_time = 2_000 # Show command duration over 2 sec
-format = " took [$duration]($style)"
+min_time = 0
+show_milliseconds = true
+show_notifications = true
+min_time_to_notify = 30_000
+format = " [ $duration]($style)"
[hostname]
ssh_only = false
+ssh_symbol = " "
format = "[$hostname]($style) "
style = "bold dimmed blue"
disabled = false
@@ -23,4 +29,170 @@ show_always = true
# Disable the package module, hiding it from the prompt completely
[package]
-disabled = true
\ No newline at end of file
+disabled = true
+
+# Finally, manually add slightly modified swttings from the nerdfonts preset config
+[aws]
+symbol = " "
+
+[buf]
+symbol = " "
+
+[c]
+symbol = " "
+
+[conda]
+symbol = " "
+
+[crystal]
+symbol = " "
+
+[dart]
+symbol = " "
+
+[directory]
+read_only = " "
+
+[docker_context]
+symbol = " "
+
+[elixir]
+symbol = " "
+
+[elm]
+symbol = " "
+
+[fennel]
+symbol = " "
+
+[fossil_branch]
+symbol = " "
+
+[git_branch]
+symbol = " "
+
+[git_commit]
+tag_symbol = ' '
+
+[golang]
+symbol = " "
+
+[guix_shell]
+symbol = " "
+
+[haskell]
+symbol = " "
+
+[haxe]
+symbol = " "
+
+[hg_branch]
+symbol = " "
+
+[java]
+symbol = " "
+
+[julia]
+symbol = " "
+
+[kotlin]
+symbol = " "
+
+[lua]
+symbol = " "
+
+[memory_usage]
+symbol = " "
+
+[meson]
+symbol = " "
+
+[nim]
+symbol = " "
+
+[nix_shell]
+symbol = " "
+
+[nodejs]
+symbol = " "
+
+[ocaml]
+symbol = " "
+
+[os.symbols]
+Alpaquita = " "
+Alpine = " "
+AlmaLinux = " "
+Amazon = " "
+Android = " "
+Arch = " "
+Artix = " "
+CentOS = " "
+Debian = " "
+DragonFly = " "
+Emscripten = " "
+EndeavourOS = " "
+Fedora = " "
+FreeBSD = " "
+Garuda = " "
+Gentoo = " "
+HardenedBSD = " "
+Illumos = " "
+Kali = " "
+Linux = " "
+Mabox = " "
+Macos = " "
+Manjaro = " "
+Mariner = " "
+MidnightBSD = " "
+Mint = " "
+NetBSD = " "
+NixOS = " "
+OpenBSD = " "
+openSUSE = " "
+OracleLinux = " "
+Pop = " "
+Raspbian = " "
+Redhat = " "
+RedHatEnterprise = " "
+RockyLinux = " "
+Redox = " "
+Solus = " "
+SUSE = " "
+Ubuntu = " "
+Unknown = " "
+Void = " "
+Windows = " "
+
+[perl]
+symbol = " "
+
+[php]
+symbol = " "
+
+[pijul_channel]
+symbol = " "
+
+[python]
+symbol = " "
+
+[rlang]
+symbol = " "
+
+[ruby]
+symbol = " "
+
+[rust]
+symbol = " "
+
+[scala]
+symbol = " "
+
+[swift]
+symbol = " "
+
+[zig]
+symbol = " "
+
+[gradle]
+symbol = " "
diff --git a/dot_config/yazi/keymap.toml b/dot_config/yazi/keymap.toml
index 46daf66..253ec02 100644
--- a/dot_config/yazi/keymap.toml
+++ b/dot_config/yazi/keymap.toml
@@ -1,9 +1,491 @@
+"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
+
+[manager]
+
+keymap = [
+ { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
+ { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
+ { on = "q", run = "quit", desc = "Quit the process" },
+ { on = "Q", run = "quit --no-cwd-file", desc = "Quit the process without outputting cwd-file" },
+ { on = "", run = "close", desc = "Close the current tab, or quit if it's last" },
+ { on = "", run = "suspend", desc = "Suspend the process" },
+
+ # Hopping
+ { on = "k", run = "arrow -1", desc = "Move cursor up" },
+ { on = "j", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -50%", desc = "Move cursor up half page" },
+ { on = "", run = "arrow 50%", desc = "Move cursor down half page" },
+ { on = "", run = "arrow -100%", desc = "Move cursor up one page" },
+ { on = "", run = "arrow 100%", desc = "Move cursor down one page" },
+
+ { on = "", run = "arrow -50%", desc = "Move cursor up half page" },
+ { on = "", run = "arrow 50%", desc = "Move cursor down half page" },
+ { on = "", run = "arrow -100%", desc = "Move cursor up one page" },
+ { on = "", run = "arrow 100%", desc = "Move cursor down one page" },
+
+ { on = [
+ "g",
+ "g",
+ ], run = "arrow -99999999", desc = "Move cursor to the top" },
+ { on = "G", run = "arrow 99999999", desc = "Move cursor to the bottom" },
+
+ # Navigation
+ { on = "h", run = "leave", desc = "Go back to the parent directory" },
+ { on = "l", run = "enter", desc = "Enter the child directory" },
+
+ { on = "", run = "leave", desc = "Go back to the parent directory" },
+ { on = "", run = "enter", desc = "Enter the child directory" },
+
+ { on = "H", run = "back", desc = "Go back to the previous directory" },
+ { on = "L", run = "forward", desc = "Go forward to the next directory" },
+
+ # Toggle
+ { on = "", run = [
+ "toggle",
+ "arrow 1",
+ ], desc = "Toggle the current selection state" },
+ { on = "", run = "toggle_all --state=on", desc = "Select all files" },
+ { on = "", run = "toggle_all", desc = "Invert selection of all files" },
+
+ # Visual mode
+ { on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" },
+ { on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
+
+ # Seeking
+ { on = "K", run = "seek -5", desc = "Seek up 5 units in the preview" },
+ { on = "J", run = "seek 5", desc = "Seek down 5 units in the preview" },
+
+ # Spotting
+ { on = "", run = "spot", desc = "Spot hovered file" },
+
+ # Operation
+ { on = "o", run = "open", desc = "Open selected files" },
+ { on = "O", run = "open --interactive", desc = "Open selected files interactively" },
+ { on = "", run = "open", desc = "Open selected files" },
+ { on = "", run = "open --interactive", desc = "Open selected files interactively" },
+ { on = "y", run = "yank", desc = "Yank selected files (copy)" },
+ { on = "x", run = "yank --cut", desc = "Yank selected files (cut)" },
+ { on = "p", run = "paste", desc = "Paste yanked files" },
+ { on = "P", run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" },
+ { on = "-", run = "link", desc = "Symlink the absolute path of yanked files" },
+ { on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" },
+ { on = "", run = "hardlink", desc = "Hardlink yanked files" },
+ { on = "Y", run = "unyank", desc = "Cancel the yank status" },
+ { on = "X", run = "unyank", desc = "Cancel the yank status" },
+ { on = "d", run = "remove", desc = "Trash selected files" },
+ { on = "D", run = "remove --permanently", desc = "Permanently delete selected files" },
+ { on = "a", run = "create", desc = "Create a file (ends with / for directories)" },
+ { on = "r", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" },
+ { on = ";", run = "shell --interactive", desc = "Run a shell command" },
+ { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" },
+ { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" },
+ { on = "s", run = "search --via=fd", desc = "Search files by name via fd" },
+ { on = "S", run = "search --via=rg", desc = "Search files by content via ripgrep" },
+ { on = "", run = "escape --search", desc = "Cancel the ongoing search" },
+ { on = "z", run = "plugin zoxide", desc = "Jump to a directory via zoxide" },
+ { on = "Z", run = "plugin fzf", desc = "Jump to a file/directory via fzf" },
+
+ # Linemode
+ { on = [
+ "m",
+ "s",
+ ], run = "linemode size", desc = "Linemode: size" },
+ { on = [
+ "m",
+ "p",
+ ], run = "linemode permissions", desc = "Linemode: permissions" },
+ { on = [
+ "m",
+ "b",
+ ], run = "linemode btime", desc = "Linemode: btime" },
+ { on = [
+ "m",
+ "m",
+ ], run = "linemode mtime", desc = "Linemode: mtime" },
+ { on = [
+ "m",
+ "o",
+ ], run = "linemode owner", desc = "Linemode: owner" },
+ { on = [
+ "m",
+ "n",
+ ], run = "linemode none", desc = "Linemode: none" },
+
+ # Copy
+ { on = [
+ "c",
+ "c",
+ ], run = "copy path", desc = "Copy the file path" },
+ { on = [
+ "c",
+ "d",
+ ], run = "copy dirname", desc = "Copy the directory path" },
+ { on = [
+ "c",
+ "f",
+ ], run = "copy filename", desc = "Copy the filename" },
+ { on = [
+ "c",
+ "n",
+ ], run = "copy name_without_ext", desc = "Copy the filename without extension" },
+
+ # Filter
+ { on = "f", run = "filter --smart", desc = "Filter files" },
+
+ # Find
+ { on = "/", run = "find --smart", desc = "Find next file" },
+ { on = "?", run = "find --previous --smart", desc = "Find previous file" },
+ { on = "n", run = "find_arrow", desc = "Goto the next found" },
+ { on = "N", run = "find_arrow --previous", desc = "Goto the previous found" },
+
+ # Sorting
+ { on = [
+ ",",
+ "m",
+ ], run = [
+ "sort mtime --reverse=no",
+ "linemode mtime",
+ ], desc = "Sort by modified time" },
+ { on = [
+ ",",
+ "M",
+ ], run = [
+ "sort mtime --reverse",
+ "linemode mtime",
+ ], desc = "Sort by modified time (reverse)" },
+ { on = [
+ ",",
+ "b",
+ ], run = [
+ "sort btime --reverse=no",
+ "linemode btime",
+ ], desc = "Sort by birth time" },
+ { on = [
+ ",",
+ "B",
+ ], run = [
+ "sort btime --reverse",
+ "linemode btime",
+ ], desc = "Sort by birth time (reverse)" },
+ { on = [
+ ",",
+ "e",
+ ], run = "sort extension --reverse=no", desc = "Sort by extension" },
+ { on = [
+ ",",
+ "E",
+ ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" },
+ { on = [
+ ",",
+ "a",
+ ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" },
+ { on = [
+ ",",
+ "A",
+ ], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" },
+ { on = [
+ ",",
+ "n",
+ ], run = "sort natural --reverse=no", desc = "Sort naturally" },
+ { on = [
+ ",",
+ "N",
+ ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" },
+ { on = [
+ ",",
+ "s",
+ ], run = [
+ "sort size --reverse=no",
+ "linemode size",
+ ], desc = "Sort by size" },
+ { on = [
+ ",",
+ "S",
+ ], run = [
+ "sort size --reverse",
+ "linemode size",
+ ], desc = "Sort by size (reverse)" },
+ { on = [
+ ",",
+ "r",
+ ], run = "sort random --reverse=no", desc = "Sort randomly" },
+
+ # Goto
+ { on = [
+ "g",
+ "h",
+ ], run = "cd ~", desc = "Go home" },
+ { on = [
+ "g",
+ "c",
+ ], run = "cd ~/.config", desc = "Goto ~/.config" },
+ { on = [
+ "g",
+ "d",
+ ], run = "cd ~/Downloads", desc = "Goto ~/Downloads" },
+ { on = [
+ "g",
+ "",
+ ], run = "cd --interactive", desc = "Jump interactively" },
+
+ # Tabs
+ { on = "t", run = "tab_create --current", desc = "Create a new tab with CWD" },
+
+ { on = "1", run = "tab_switch 0", desc = "Switch to the first tab" },
+ { on = "2", run = "tab_switch 1", desc = "Switch to the second tab" },
+ { on = "3", run = "tab_switch 2", desc = "Switch to the third tab" },
+ { on = "4", run = "tab_switch 3", desc = "Switch to the fourth tab" },
+ { on = "5", run = "tab_switch 4", desc = "Switch to the fifth tab" },
+ { on = "6", run = "tab_switch 5", desc = "Switch to the sixth tab" },
+ { on = "7", run = "tab_switch 6", desc = "Switch to the seventh tab" },
+ { on = "8", run = "tab_switch 7", desc = "Switch to the eighth tab" },
+ { on = "9", run = "tab_switch 8", desc = "Switch to the ninth tab" },
+
+ { on = "[", run = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
+ { on = "]", run = "tab_switch 1 --relative", desc = "Switch to the next tab" },
+
+ { on = "{", run = "tab_swap -1", desc = "Swap current tab with previous tab" },
+ { on = "}", run = "tab_swap 1", desc = "Swap current tab with next tab" },
+
+ # Tasks
+ { on = "w", run = "tasks_show", desc = "Show task manager" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[tasks]
+
+keymap = [
+ { on = "", run = "close", desc = "Close task manager" },
+ { on = "", run = "close", desc = "Close task manager" },
+ { on = "", run = "close", desc = "Close task manager" },
+ { on = "w", run = "close", desc = "Close task manager" },
+
+ { on = "k", run = "arrow -1", desc = "Move cursor up" },
+ { on = "j", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "inspect", desc = "Inspect the task" },
+ { on = "x", run = "cancel", desc = "Cancel the task" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[spot]
+
+keymap = [
+ { on = "", run = "close", desc = "Close the spot" },
+ { on = "", run = "close", desc = "Close the spot" },
+ { on = "", run = "close", desc = "Close the spot" },
+ { on = "", run = "close", desc = "Close the spot" },
+
+ { on = "k", run = "arrow -1", desc = "Move cursor up" },
+ { on = "j", run = "arrow 1", desc = "Move cursor down" },
+ { on = "h", run = "swipe -1", desc = "Swipe to the next file" },
+ { on = "l", run = "swipe 1", desc = "Swipe to the previous file" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+ { on = "", run = "swipe -1", desc = "Swipe to the next file" },
+ { on = "", run = "swipe 1", desc = "Swipe to the previous file" },
+
+ # Copy
+ { on = ["c", "c"], run = "copy cell", desc = "Copy selected cell" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[pick]
+
+keymap = [
+ { on = "", run = "close", desc = "Cancel pick" },
+ { on = "", run = "close", desc = "Cancel pick" },
+ { on = "", run = "close", desc = "Cancel pick" },
+ { on = "", run = "close --submit", desc = "Submit the pick" },
+
+ { on = "k", run = "arrow -1", desc = "Move cursor up" },
+ { on = "j", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[input]
+
+keymap = [
+ { on = "", run = "close", desc = "Cancel input" },
+ { on = "", run = "close --submit", desc = "Submit input" },
+ { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" },
+ { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" },
+
+ # Mode
+ { on = "i", run = "insert", desc = "Enter insert mode" },
+ { on = "a", run = "insert --append", desc = "Enter append mode" },
+ { on = "I", run = [
+ "move -999",
+ "insert",
+ ], desc = "Move to the BOL, and enter insert mode" },
+ { on = "A", run = [
+ "move 999",
+ "insert --append",
+ ], desc = "Move to the EOL, and enter append mode" },
+ { on = "v", run = "visual", desc = "Enter visual mode" },
+ { on = "V", run = [
+ "move -999",
+ "visual",
+ "move 999",
+ ], desc = "Enter visual mode and select all" },
+
+ # Character-wise movement
+ { on = "h", run = "move -1", desc = "Move back a character" },
+ { on = "l", run = "move 1", desc = "Move forward a character" },
+ { on = "", run = "move -1", desc = "Move back a character" },
+ { on = "", run = "move 1", desc = "Move forward a character" },
+ { on = "", run = "move -1", desc = "Move back a character" },
+ { on = "", run = "move 1", desc = "Move forward a character" },
+
+ # Word-wise movement
+ { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" },
+ { on = "w", run = "forward", desc = "Move forward to the start of the next word" },
+ { on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
+ { on = "", run = "backward", desc = "Move back to the start of the current or previous word" },
+ { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
+
+ # Line-wise movement
+ { on = "0", run = "move -999", desc = "Move to the BOL" },
+ { on = "$", run = "move 999", desc = "Move to the EOL" },
+ { on = "", run = "move -999", desc = "Move to the BOL" },
+ { on = "", run = "move 999", desc = "Move to the EOL" },
+ { on = "", run = "move -999", desc = "Move to the BOL" },
+ { on = "", run = "move 999", desc = "Move to the EOL" },
+
+ # Delete
+ { on = "", run = "backspace", desc = "Delete the character before the cursor" },
+ { on = "", run = "backspace --under", desc = "Delete the character under the cursor" },
+ { on = "", run = "backspace", desc = "Delete the character before the cursor" },
+ { on = "", run = "backspace --under", desc = "Delete the character under the cursor" },
+
+ # Kill
+ { on = "", run = "kill bol", desc = "Kill backwards to the BOL" },
+ { on = "", run = "kill eol", desc = "Kill forwards to the EOL" },
+ { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" },
+ { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" },
+
+ # Cut/Yank/Paste
+ { on = "d", run = "delete --cut", desc = "Cut the selected characters" },
+ { on = "D", run = [
+ "delete --cut",
+ "move 999",
+ ], desc = "Cut until the EOL" },
+ { on = "c", run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" },
+ { on = "C", run = [
+ "delete --cut --insert",
+ "move 999",
+ ], desc = "Cut until the EOL, and enter insert mode" },
+ { on = "x", run = [
+ "delete --cut",
+ "move 1 --in-operating",
+ ], desc = "Cut the current character" },
+ { on = "y", run = "yank", desc = "Copy the selected characters" },
+ { on = "p", run = "paste", desc = "Paste the copied characters after the cursor" },
+ { on = "P", run = "paste --before", desc = "Paste the copied characters before the cursor" },
+
+ # Undo/Redo
+ { on = "u", run = "undo", desc = "Undo the last operation" },
+ { on = "", run = "redo", desc = "Redo the last operation" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[confirm]
+
+keymap = [
+ { on = "", run = "close", desc = "Cancel the confirm" },
+ { on = "", run = "close", desc = "Cancel the confirm" },
+ { on = "", run = "close", desc = "Cancel the confirm" },
+ { on = "", run = "close --submit", desc = "Submit the confirm" },
+
+ { on = "n", run = "close", desc = "Cancel the confirm" },
+ { on = "y", run = "close --submit", desc = "Submit the confirm" },
+
+ { on = "k", run = "arrow -1", desc = "Move cursor up" },
+ { on = "j", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[completion]
+
+keymap = [
+ { on = "", run = "close", desc = "Cancel completion" },
+ { on = "", run = "close --submit", desc = "Submit the completion" },
+ { on = "", run = [
+ "close --submit",
+ "close_input --submit",
+ ], desc = "Submit the completion and input" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ # Help
+ { on = "~", run = "help", desc = "Open help" },
+ { on = "", run = "help", desc = "Open help" },
+]
+
+[help]
+
+keymap = [
+ { on = "", run = "escape", desc = "Clear the filter, or hide the help" },
+ { on = "", run = "escape", desc = "Clear the filter, or hide the help" },
+ { on = "", run = "close", desc = "Hide the help" },
+
+ # Navigation
+ { on = "k", run = "arrow -1", desc = "Move cursor up" },
+ { on = "j", run = "arrow 1", desc = "Move cursor down" },
+
+ { on = "", run = "arrow -1", desc = "Move cursor up" },
+ { on = "", run = "arrow 1", desc = "Move cursor down" },
+
+ # Filtering
+ { on = "f", run = "filter", desc = "Apply a filter for the help items" },
+]
+
+
[[manager.prepend_keymap]]
-on = [ "c", "m" ]
-run = "plugin chmod"
+on = ["c", "m"]
+run = "plugin chmod"
desc = "Chmod on selected files"
[[manager.prepend_keymap]]
-on = "T"
-run = "plugin --sync max-preview"
+on = "T"
+run = "plugin --sync max-preview"
desc = "Maximize or restore preview"
diff --git a/dot_config/yazi/package.toml b/dot_config/yazi/package.toml
index b333983..57b9b17 100644
--- a/dot_config/yazi/package.toml
+++ b/dot_config/yazi/package.toml
@@ -1,5 +1,5 @@
[plugin]
-deps = [{ use = "Reledia/glow", rev = "f52b382" }, { use = "Reledia/hexyl", rev = "ccc0a4a" }, { use = "Rolv-Apneseth/starship", rev = "77a65f5" }, { use = "yazi-rs/plugins:git", rev = "4f1d0ae" }, { use = "yazi-rs/plugins:full-border", rev = "4f1d0ae" }, { use = "yazi-rs/plugins:chmod", rev = "4f1d0ae" }, { use = "yazi-rs/plugins:max-preview", rev = "4f1d0ae" }, { use = "yazi-rs/plugins:mime-ext", rev = "4f1d0ae" }]
+deps = [{ use = "Reledia/glow", rev = "5ce76dc" }, { use = "Reledia/hexyl", rev = "39d3d4e" }, { use = "Rolv-Apneseth/starship", rev = "9c37d37" }, { use = "yazi-rs/plugins:git", rev = "71c4fc2" }, { use = "yazi-rs/plugins:full-border", rev = "71c4fc2" }, { use = "yazi-rs/plugins:chmod", rev = "71c4fc2" }, { use = "yazi-rs/plugins:max-preview", rev = "71c4fc2" }, { use = "yazi-rs/plugins:mime-ext", rev = "71c4fc2" }]
[flavor]
deps = []
diff --git a/dot_config/yazi/plugins/chmod.yazi/init.lua b/dot_config/yazi/plugins/chmod.yazi/init.lua
index 7bae41a..183c31e 100644
--- a/dot_config/yazi/plugins/chmod.yazi/init.lua
+++ b/dot_config/yazi/plugins/chmod.yazi/init.lua
@@ -1,47 +1,39 @@
local selected_or_hovered = ya.sync(function()
- local tab, paths = cx.active, {}
- for _, u in pairs(tab.selected) do
- paths[#paths + 1] = tostring(u)
- end
- if #paths == 0 and tab.current.hovered then
- paths[1] = tostring(tab.current.hovered.url)
- end
- return paths
+ local tab, paths = cx.active, {}
+ for _, u in pairs(tab.selected) do
+ paths[#paths + 1] = tostring(u)
+ end
+ if #paths == 0 and tab.current.hovered then
+ paths[1] = tostring(tab.current.hovered.url)
+ end
+ return paths
end)
return {
- entry = function()
- ya.manager_emit("escape", { visual = true })
+ entry = function()
+ ya.manager_emit("escape", { visual = true })
- local urls = selected_or_hovered()
- if #urls == 0 then
- return ya.notify({
- title = "Chmod",
- content = "No file selected",
- level = "warn",
- timeout = 5,
- })
- end
+ local urls = selected_or_hovered()
+ if #urls == 0 then
+ return ya.notify { title = "Chmod", content = "No file selected", level = "warn", timeout = 5 }
+ end
- local value, event = ya.input({
- title = "Chmod:",
- position = { "top-center", y = 3, w = 40 },
- })
- if event ~= 1 then
- return
- end
+ local value, event = ya.input {
+ title = "Chmod:",
+ position = { "top-center", y = 3, w = 40 },
+ }
+ if event ~= 1 then
+ return
+ end
- local status, err = Command("chmod"):arg(value):args(urls):spawn():wait()
- if not status or not status.success then
- ya.notify({
- title = "Chmod",
- content = string.format(
- "Chmod with selected files failed, exit code %s",
- status and status.code or err
- ),
- level = "error",
- timeout = 5,
- })
- end
- end,
+ local status, err = Command("chmod"):arg(value):args(urls):spawn():wait()
+ if not status or not status.success then
+ ya.notify {
+ title = "Chmod",
+ content = string.format("Chmod on selected files failed, error: %s", status and status.code or err),
+ level = "error",
+ timeout = 5,
+ }
+ end
+ end,
}
diff --git a/dot_config/yazi/plugins/full-border.yazi/init.lua b/dot_config/yazi/plugins/full-border.yazi/init.lua
index 958ae67..233ebf0 100644
--- a/dot_config/yazi/plugins/full-border.yazi/init.lua
+++ b/dot_config/yazi/plugins/full-border.yazi/init.lua
@@ -1,12 +1,3 @@
--- TODO: remove this once v0.4 is released
-local v4 = function(typ, area, ...)
- if typ == "bar" then
- return ui.Table and ui.Bar(...):area(area) or ui.Bar(area, ...)
- else
- return ui.Table and ui.Border(...):area(area) or ui.Border(area, ...)
- end
-end
-
local function setup(_, opts)
local type = opts and opts.type or ui.Border.ROUNDED
local old_build = Tab.build
@@ -14,14 +5,14 @@ local function setup(_, opts)
Tab.build = function(self, ...)
local bar = function(c, x, y)
if x <= 0 or x == self._area.w - 1 then
- return v4("bar", ui.Rect.default, ui.Bar.TOP)
+ return ui.Bar(ui.Bar.TOP)
end
- return v4(
- "bar",
- ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) },
- ui.Bar.TOP
- ):symbol(c)
+ return ui.Bar(ui.Bar.TOP)
+ :area(
+ ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) }
+ )
+ :symbol(c)
end
local c = self._chunks
@@ -33,9 +24,9 @@ local function setup(_, opts)
local style = THEME.manager.border_style
self._base = ya.list_merge(self._base or {}, {
- v4("border", self._area, ui.Border.ALL):type(type):style(style),
- v4("bar", self._chunks[1], ui.Bar.RIGHT):style(style),
- v4("bar", self._chunks[3], ui.Bar.LEFT):style(style),
+ ui.Border(ui.Border.ALL):area(self._area):type(type):style(style),
+ ui.Bar(ui.Bar.RIGHT):area(self._chunks[1]):style(style),
+ ui.Bar(ui.Bar.LEFT):area(self._chunks[3]):style(style),
bar("┬", c[1].right - 1, c[1].y),
bar("┴", c[1].right - 1, c[1].bottom - 1),
diff --git a/dot_config/yazi/plugins/git.yazi/README.md b/dot_config/yazi/plugins/git.yazi/README.md
index fad9ce4..f17d7b3 100644
--- a/dot_config/yazi/plugins/git.yazi/README.md
+++ b/dot_config/yazi/plugins/git.yazi/README.md
@@ -1,7 +1,7 @@
# git.yazi
> [!NOTE]
-> Yazi v0.3.3 or later is required for this plugin to work.
+> Yazi v0.4.1 or later is required for this plugin to work.
Show the status of Git file changes as linemode in the file list.
@@ -37,9 +37,6 @@ run = "git"
## Advanced
-> [!NOTE]
-> This section currently requires Yazi nightly that includes https://github.com/sxyazi/yazi/pull/1637
-
You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with:
- `THEME.git.modified`
diff --git a/dot_config/yazi/plugins/git.yazi/init.lua b/dot_config/yazi/plugins/git.yazi/init.lua
index 7a7cfc6..64c3e8e 100644
--- a/dot_config/yazi/plugins/git.yazi/init.lua
+++ b/dot_config/yazi/plugins/git.yazi/init.lua
@@ -1,161 +1,171 @@
local WIN = ya.target_family() == "windows"
local PATS = {
- { "[MT]", 6 }, -- Modified
- { "[AC]", 5 }, -- Added
- { "?$", 4 }, -- Untracked
- { "!$", 3 }, -- Ignored
- { "D", 2 }, -- Deleted
- { "U", 1 }, -- Updated
- { "[AD][AD]", 1 }, -- Updated
+ { "[MT]", 6 }, -- Modified
+ { "[AC]", 5 }, -- Added
+ { "?$", 4 }, -- Untracked
+ { "!$", 3 }, -- Ignored
+ { "D", 2 }, -- Deleted
+ { "U", 1 }, -- Updated
+ { "[AD][AD]", 1 }, -- Updated
}
local function match(line)
- local signs = line:sub(1, 2)
- for _, p in ipairs(PATS) do
- local path
- if signs:find(p[1]) then
- path = line:sub(4, 4) == '"' and line:sub(5, -2) or line:sub(4)
- path = WIN and path:gsub("/", "\\") or path
- end
- if not path then
- elseif path:find("[/\\]$") then
- return p[2] == 3 and 30 or p[2], path:sub(1, -2)
- else
- return p[2], path
- end
- end
+ local signs = line:sub(1, 2)
+ for _, p in ipairs(PATS) do
+ local path
+ if signs:find(p[1]) then
+ path = line:sub(4, 4) == '"' and line:sub(5, -2) or line:sub(4)
+ path = WIN and path:gsub("/", "\\") or path
+ end
+ if not path then
+ elseif path:find("[/\\]$") then
+ return p[2] == 3 and 30 or p[2], path:sub(1, -2)
+ else
+ return p[2], path
+ end
+ end
end
local function root(cwd)
- repeat
- local cha = fs.cha(cwd:join(".git"))
- if cha and cha.is_dir then
- return tostring(cwd)
- end
- cwd = cwd:parent()
- until not cwd
+ local is_worktree = function(url)
+ local file, head = io.open(tostring(url)), nil
+ if file then
+ head = file:read(8)
+ file:close()
+ end
+ return head == "gitdir: "
+ end
+
+ repeat
+ local next = cwd:join(".git")
+ local cha = fs.cha(next)
+ if cha and (cha.is_dir or is_worktree(next)) then
+ return tostring(cwd)
+ end
+ cwd = cwd:parent()
+ until not cwd
end
local function bubble_up(changed)
- local new, empty = {}, Url("")
- for k, v in pairs(changed) do
- if v ~= 3 and v ~= 30 then
- local url = Url(k):parent()
- while url and url ~= empty do
- local s = tostring(url)
- new[s] = (new[s] or 0) > v and new[s] or v
- url = url:parent()
- end
- end
- end
- return new
+ local new, empty = {}, Url("")
+ for k, v in pairs(changed) do
+ if v ~= 3 and v ~= 30 then
+ local url = Url(k):parent()
+ while url and url ~= empty do
+ local s = tostring(url)
+ new[s] = (new[s] or 0) > v and new[s] or v
+ url = url:parent()
+ end
+ end
+ end
+ return new
end
local function propagate_down(ignored, cwd, repo)
- local new, rel = {}, cwd:strip_prefix(repo)
- for k, v in pairs(ignored) do
- if v == 30 then
- if rel:starts_with(k) then
- new[tostring(repo:join(rel))] = 30
- elseif cwd == repo:join(k):parent() then
- new[k] = 3
- end
- end
- end
- return new
+ local new, rel = {}, cwd:strip_prefix(repo)
+ for k, v in pairs(ignored) do
+ if v == 30 then
+ if rel:starts_with(k) then
+ new[tostring(repo:join(rel))] = 30
+ elseif cwd == repo:join(k):parent() then
+ new[k] = 3
+ end
+ end
+ end
+ return new
end
local add = ya.sync(function(st, cwd, repo, changed)
- st.dirs[cwd] = repo
- st.repos[repo] = st.repos[repo] or {}
- for k, v in pairs(changed) do
- if v == 0 then
- st.repos[repo][k] = nil
- elseif v == 30 then
- st.dirs[k] = ""
- else
- st.repos[repo][k] = v
- end
- end
- ya.render()
+ st.dirs[cwd] = repo
+ st.repos[repo] = st.repos[repo] or {}
+ for k, v in pairs(changed) do
+ if v == 0 then
+ st.repos[repo][k] = nil
+ elseif v == 30 then
+ st.dirs[k] = ""
+ else
+ st.repos[repo][k] = v
+ end
+ end
+ ya.render()
end)
local remove = ya.sync(function(st, cwd)
- local dir = st.dirs[cwd]
- if not dir then
- return
- end
+ local dir = st.dirs[cwd]
+ if not dir then
+ return
+ end
- ya.render()
- st.dirs[cwd] = nil
- if not st.repos[dir] then
- return
- end
+ ya.render()
+ st.dirs[cwd] = nil
+ if not st.repos[dir] then
+ return
+ end
- for _, r in pairs(st.dirs) do
- if r == dir then
- return
- end
- end
- st.repos[dir] = nil
+ for _, r in pairs(st.dirs) do
+ if r == dir then
+ return
+ end
+ end
+ st.repos[dir] = nil
end)
local function setup(st, opts)
- st.dirs = {}
- st.repos = {}
+ st.dirs = {}
+ st.repos = {}
- opts = opts or {}
- opts.order = opts.order or 1500
+ opts = opts or {}
+ opts.order = opts.order or 1500
- -- Chosen by ChatGPT fairly, PRs are welcome to adjust them
- local t = THEME.git or {}
- local styles = {
- [6] = t.modified and ui.Style(t.modified) or ui.Style():fg("#ffa500"),
- [5] = t.added and ui.Style(t.added) or ui.Style():fg("#32cd32"),
- [4] = t.untracked and ui.Style(t.untracked) or ui.Style():fg("#a9a9a9"),
- [3] = t.ignored and ui.Style(t.ignored) or ui.Style():fg("#696969"),
- [2] = t.deleted and ui.Style(t.deleted) or ui.Style():fg("#ff4500"),
- [1] = t.updated and ui.Style(t.updated) or ui.Style():fg("#1e90ff"),
- }
- local signs = {
- [6] = t.modified_sign and t.modified_sign or "",
- [5] = t.added_sign and t.added_sign or "",
- [4] = t.untracked_sign and t.untracked_sign or "",
- [3] = t.ignored_sign and t.ignored_sign or "",
- [2] = t.deleted_sign and t.deleted_sign or "",
- [1] = t.updated_sign and t.updated_sign or "U",
- }
+ -- Chosen by ChatGPT fairly, PRs are welcome to adjust them
+ local t = THEME.git or {}
+ local styles = {
+ [6] = t.modified and ui.Style(t.modified) or ui.Style():fg("#ffa500"),
+ [5] = t.added and ui.Style(t.added) or ui.Style():fg("#32cd32"),
+ [4] = t.untracked and ui.Style(t.untracked) or ui.Style():fg("#a9a9a9"),
+ [3] = t.ignored and ui.Style(t.ignored) or ui.Style():fg("#696969"),
+ [2] = t.deleted and ui.Style(t.deleted) or ui.Style():fg("#ff4500"),
+ [1] = t.updated and ui.Style(t.updated) or ui.Style():fg("#1e90ff"),
+ }
+ local signs = {
+ [6] = t.modified_sign and t.modified_sign or "",
+ [5] = t.added_sign and t.added_sign or "",
+ [4] = t.untracked_sign and t.untracked_sign or "",
+ [3] = t.ignored_sign and t.ignored_sign or "",
+ [2] = t.deleted_sign and t.deleted_sign or "",
+ [1] = t.updated_sign and t.updated_sign or "U",
+ }
- Linemode:children_add(function(self)
- local url = self._file.url
- local dir = st.dirs[tostring(url:parent())]
- local change
- if dir then
- change = dir == "" and 3 or st.repos[dir][tostring(url):sub(#dir + 2)]
- end
+ Linemode:children_add(function(self)
+ local url = self._file.url
+ local dir = st.dirs[tostring(url:parent())]
+ local change
+ if dir then
+ change = dir == "" and 3 or st.repos[dir][tostring(url):sub(#dir + 2)]
+ end
- if not change or signs[change] == "" then
- return ui.Line("")
- elseif self._file:is_hovered() then
- return ui.Line({ ui.Span(" "), ui.Span(signs[change]) })
- else
- return ui.Line({ ui.Span(" "), ui.Span(signs[change]):style(styles[change]) })
- end
- end, opts.order)
+ if not change or signs[change] == "" then
+ return ui.Line("")
+ elseif self._file:is_hovered() then
+ return ui.Line { ui.Span(" "), ui.Span(signs[change]) }
+ else
+ return ui.Line { ui.Span(" "), ui.Span(signs[change]):style(styles[change]) }
+ end
+ end, opts.order)
end
-local function fetch(self)
- local cwd = self.files[1].url:parent()
- local repo = root(cwd)
- if not repo then
- remove(tostring(cwd))
- return 1
- end
+local function fetch(_, job)
+ local cwd = job.files[1].url:parent()
+ local repo = root(cwd)
+ if not repo then
+ remove(tostring(cwd))
+ return 1
+ end
- local paths = {}
- for _, f in ipairs(self.files) do
- paths[#paths + 1] = tostring(f.url)
- end
+ local paths = {}
+ for _, f in ipairs(job.files) do
+ paths[#paths + 1] = tostring(f.url)
+ end
-- stylua: ignore
local output, err = Command("git")
@@ -164,35 +174,35 @@ local function fetch(self)
:args(paths)
:stdout(Command.PIPED)
:output()
- if not output then
- ya.err("Cannot spawn git command, error code " .. tostring(err))
- return 0
- end
+ if not output then
+ ya.err("Cannot spawn git command, error: " .. err)
+ return 0
+ end
- local changed, ignored = {}, {}
- for line in output.stdout:gmatch("[^\r\n]+") do
- local sign, path = match(line)
- if sign == 30 then
- ignored[path] = sign
- else
- changed[path] = sign
- end
- end
+ local changed, ignored = {}, {}
+ for line in output.stdout:gmatch("[^\r\n]+") do
+ local sign, path = match(line)
+ if sign == 30 then
+ ignored[path] = sign
+ else
+ changed[path] = sign
+ end
+ end
- if self.files[1].cha.is_dir then
- ya.dict_merge(changed, bubble_up(changed))
- ya.dict_merge(changed, propagate_down(ignored, cwd, Url(repo)))
- else
- ya.dict_merge(changed, propagate_down(ignored, cwd, Url(repo)))
- end
+ if job.files[1].cha.is_dir then
+ ya.dict_merge(changed, bubble_up(changed))
+ ya.dict_merge(changed, propagate_down(ignored, cwd, Url(repo)))
+ else
+ ya.dict_merge(changed, propagate_down(ignored, cwd, Url(repo)))
+ end
- for _, p in ipairs(paths) do
- local s = p:sub(#repo + 2)
- changed[s] = changed[s] or 0
- end
- add(tostring(cwd), repo, changed)
+ for _, p in ipairs(paths) do
+ local s = p:sub(#repo + 2)
+ changed[s] = changed[s] or 0
+ end
+ add(tostring(cwd), repo, changed)
- return 3
+ return 3
end
return { setup = setup, fetch = fetch }
diff --git a/dot_config/yazi/plugins/glow.yazi/README.md b/dot_config/yazi/plugins/glow.yazi/README.md
index abcacac..c67f7cc 100644
--- a/dot_config/yazi/plugins/glow.yazi/README.md
+++ b/dot_config/yazi/plugins/glow.yazi/README.md
@@ -16,3 +16,15 @@ prepend_previewers = [
```
Make sure you have [glow](https://github.com/charmbracelet/glow) installed, and can be found in `PATH`.
+
+## Feature
+
++ You can modify line wrap in `init.lua`, the current value is 55.
++ You can press `ctrl+e` to scroll up and `ctrl+y` to scroll down the readme file in preview panel in yazi: (add this to `keymap.toml`)
+```toml
+prepend_keymap = [
+ # glow.yazi
+ { on = [""], run = "seek 5" },
+ { on = [""], run = "seek -5" },
+]
+```
diff --git a/dot_config/yazi/plugins/glow.yazi/init.lua b/dot_config/yazi/plugins/glow.yazi/init.lua
index da5fdfd..cc813e9 100644
--- a/dot_config/yazi/plugins/glow.yazi/init.lua
+++ b/dot_config/yazi/plugins/glow.yazi/init.lua
@@ -1,75 +1,76 @@
local M = {}
-function M:peek()
- local child = Command("/usr/bin/env glow")
- :args({
- "--style",
- "dark",
- "--width",
- tostring(self.area.w),
- tostring(self.file.url),
- })
- :env("CLICOLOR_FORCE", "1")
- :stdout(Command.PIPED)
- :stderr(Command.PIPED)
- :spawn()
+function M:peek(job)
+ -- Set a fixed width of 55 characters for the preview
+ local preview_width = 55
- if not child then
- return self:fallback_to_builtin()
- end
+ local child = Command("glow")
+ :args({
+ "--style",
+ "dark",
+ "--width",
+ tostring(preview_width), -- Use fixed width instead of job.area.w
+ tostring(job.file.url),
+ })
+ :env("CLICOLOR_FORCE", "1")
+ :stdout(Command.PIPED)
+ :stderr(Command.PIPED)
+ :spawn()
- local limit = self.area.h
- local i, lines = 0, ""
- repeat
- local next, event = child:read_line()
- if event == 1 then
- return self:fallback_to_builtin()
- elseif event ~= 0 then
- break
- end
+ if not child then
+ return require("code").peek(job)
+ end
- i = i + 1
- if i > self.skip then
- lines = lines .. next
- end
- until i >= self.skip + limit
+ local limit = job.area.h
+ local i, lines = 0, ""
+ repeat
+ local next, event = child:read_line()
+ if event == 1 then
+ return require("code").peek(job)
+ elseif event ~= 0 then
+ break
+ end
- child:start_kill()
- if self.skip > 0 and i < self.skip + limit then
- ya.manager_emit(
- "peek",
- {
- tostring(math.max(0, i - limit)),
- only_if = tostring(self.file.url),
- upper_bound = "",
- }
- )
- else
- lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
- ya.preview_widgets(self, { ui.Text.parse(lines):area(self.area) })
- end
+ i = i + 1
+ if i > job.skip then
+ lines = lines .. next
+ end
+ until i >= job.skip + limit
+
+ child:start_kill()
+ if job.skip > 0 and i < job.skip + limit then
+ ya.manager_emit("peek", {
+ tostring(math.max(0, i - limit)),
+ only_if = job.file.url,
+ upper_bound = true
+ })
+ else
+ lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
+ ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
+ end
end
-function M:seek(units)
- local h = cx.active.current.hovered
- if h and h.url == self.file.url then
- local step = math.floor(units * self.area.h / 10)
- ya.manager_emit("peek", {
- tostring(math.max(0, cx.active.preview.skip + step)),
- only_if = tostring(self.file.url),
- })
- end
-end
+function M:seek(job)
+ local h = cx.active.current.hovered
+ if not h or h.url ~= job.file.url then
+ return
+ end
-function M:fallback_to_builtin()
- local err, bound = ya.preview_code(self)
- if bound then
- ya.manager_emit("peek", { bound, only_if = self.file.url, upper_bound = true })
- elseif err and not err:find("cancelled", 1, true) then
- ya.preview_widgets(self, {
- ui.Text({ ui.Line(err):reverse() }):area(self.area),
- })
- end
+ local scroll_amount = 1
+ local scroll_offset = job.units
+
+ if job.key == "ctrl-e" then
+ scroll_offset = scroll_amount
+ elseif job.key == "ctrl-y" then
+ scroll_offset = -scroll_amount
+ else
+ scroll_offset = job.units
+ end
+
+ ya.manager_emit('peek', {
+ math.max(0, cx.active.preview.skip + scroll_offset),
+ only_if = job.file.url,
+ })
end
return M
diff --git a/dot_config/yazi/plugins/hexyl.yazi/init.lua b/dot_config/yazi/plugins/hexyl.yazi/init.lua
index bd9a70a..6fe0990 100644
--- a/dot_config/yazi/plugins/hexyl.yazi/init.lua
+++ b/dot_config/yazi/plugins/hexyl.yazi/init.lua
@@ -1,67 +1,57 @@
local M = {}
-function M:peek()
- local child
- local l = self.file.cha.len
- if l == 0 then
- child = Command("hexyl")
- :args({
- tostring(self.file.url),
- })
- :stdout(Command.PIPED)
- :stderr(Command.PIPED)
- :spawn()
- else
- child = Command("hexyl")
- :args({
- "--border",
- "none",
- "--terminal-width",
- tostring(self.area.w),
- tostring(self.file.url),
- })
- :stdout(Command.PIPED)
- :stderr(Command.PIPED)
- :spawn()
- end
+function M:peek(job)
+ local child
+ local l = self.file.cha.len
+ if l == 0 then
+ child = Command("hexyl")
+ :args({
+ tostring(job.file.url),
+ })
+ :stdout(Command.PIPED)
+ :stderr(Command.PIPED)
+ :spawn()
+ else
+ child = Command("hexyl")
+ :args({
+ "--border",
+ "none",
+ "--terminal-width",
+ tostring(job.area.w),
+ tostring(job.file.url),
+ })
+ :stdout(Command.PIPED)
+ :stderr(Command.PIPED)
+ :spawn()
+ end
- local limit = self.area.h
- local i, lines = 0, ""
- repeat
- local next, event = child:read_line()
- if event == 1 then
- ya.err(tostring(event))
- elseif event ~= 0 then
- break
- end
+ local limit = job.area.h
+ local i, lines = 0, ""
+ repeat
+ local next, event = child:read_line()
+ if event == 1 then
+ ya.err(tostring(event))
+ elseif event ~= 0 then
+ break
+ end
- i = i + 1
- if i > self.skip then
- lines = lines .. next
- end
- until i >= self.skip + limit
+ i = i + 1
+ if i > job.skip then
+ lines = lines .. next
+ end
+ until i >= job.skip + limit
- child:start_kill()
- if self.skip > 0 and i < self.skip + limit then
- ya.manager_emit(
- "peek",
- { math.max(0, i - limit), only_if = self.file.url, upper_bound = true }
- )
- else
- lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
- ya.preview_widgets(self, { ui.Text.parse(lines):area(self.area) })
- end
+ child:start_kill()
+ if job.skip > 0 and i < job.skip + limit then
+ ya.manager_emit("peek", { math.max(0, i - limit), only_if = job.file.url, upper_bound = true })
+ else
+ lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
+ ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
+ end
end
function M:seek(units)
- local h = cx.active.current.hovered
- if h and h.url == self.file.url then
- local step = math.floor(units * self.area.h / 10)
- ya.manager_emit("peek", {
- tostring(math.max(0, cx.active.preview.skip + step)),
- only_if = tostring(self.file.url),
- })
- end
+ require("code").seek(job, units)
end
return M
diff --git a/dot_config/yazi/plugins/max-preview.yazi/README.md b/dot_config/yazi/plugins/max-preview.yazi/README.md
index 439309a..73b9058 100644
--- a/dot_config/yazi/plugins/max-preview.yazi/README.md
+++ b/dot_config/yazi/plugins/max-preview.yazi/README.md
@@ -17,7 +17,7 @@ Add this to your `~/.config/yazi/keymap.toml`:
```toml
[[manager.prepend_keymap]]
on = "T"
-run = "plugin --sync max-preview"
+run = "plugin max-preview"
desc = "Maximize or restore preview"
```
diff --git a/dot_config/yazi/plugins/max-preview.yazi/init.lua b/dot_config/yazi/plugins/max-preview.yazi/init.lua
index ae4efe6..64edfed 100644
--- a/dot_config/yazi/plugins/max-preview.yazi/init.lua
+++ b/dot_config/yazi/plugins/max-preview.yazi/init.lua
@@ -1,3 +1,5 @@
+--- @sync entry
+
local function entry(st)
if st.old then
Tab.layout, st.old = st.old, nil
diff --git a/dot_config/yazi/plugins/mime-ext.yazi/README.md b/dot_config/yazi/plugins/mime-ext.yazi/README.md
index 05d6d74..85511b4 100644
--- a/dot_config/yazi/plugins/mime-ext.yazi/README.md
+++ b/dot_config/yazi/plugins/mime-ext.yazi/README.md
@@ -17,7 +17,7 @@ Add this to your `~/.config/yazi/yazi.toml`:
```toml
[[plugin.prepend_fetchers]]
id = "mime"
-if = "!mime"
+if = "!(mime|dummy)"
name = "*"
run = "mime-ext"
prio = "high"
@@ -31,13 +31,13 @@ You can also customize it in your `~/.config/yazi/init.lua` with:
require("mime-ext"):setup {
-- Expand the existing filename database (lowercase), for example:
with_files = {
- makefile = "text/x-makefile",
+ makefile = "text/makefile",
-- ...
},
-- Expand the existing extension database (lowercase), for example:
with_exts = {
- mk = "text/x-makefile",
+ mk = "text/makefile",
-- ...
},
@@ -50,7 +50,6 @@ require("mime-ext"):setup {
## TODO
- Add more file types (PRs welcome!).
-- Eliminating `x-` as part of Yazi v0.4 as it's discouraged as per [rfc6838#section-3.4](https://datatracker.ietf.org/doc/html/rfc6838#section-3.4)
- Compress mime-type tables.
## License
diff --git a/dot_config/yazi/plugins/mime-ext.yazi/init.lua b/dot_config/yazi/plugins/mime-ext.yazi/init.lua
index 3724308..f2747a0 100644
--- a/dot_config/yazi/plugins/mime-ext.yazi/init.lua
+++ b/dot_config/yazi/plugins/mime-ext.yazi/init.lua
@@ -1,374 +1,383 @@
local FILES = {
- license = "text/plain",
+ [".envrc"] = "text/plain",
+ [".gitconfig"] = "text/plain",
+ [".gitignore"] = "text/plain",
+ [".luacheckrc"] = "text/lua",
+ [".styluaignore"] = "text/plain",
+ [".zshenv"] = "text/plain",
+ [".zshrc"] = "text/plain",
["cargo.lock"] = "application/json",
+ ["flake.lock"] = "application/json",
+ license = "text/plain",
}
local EXTS = {
- ["123"] = "application/vnd.lotus-1-2-3",
- ["3dml"] = "text/vnd.in3d.3dml",
- ["3ds"] = "image/x-3ds",
+ ["123"] = "application/lotus-1-2-3",
+ ["3dml"] = "text/in3d.3dml",
+ ["3ds"] = "image/3ds",
["3g2"] = "video/3gpp2",
["3gp"] = "video/3gpp",
- ["7z"] = "application/x-7z-compressed",
+ ["7z"] = "application/7z-compressed",
["for"] = "text/fortran",
["in"] = "text/plain",
- ["n-gage"] = "application/vnd.nokia.n-gage.symbian.install",
- ["sfd-hdstx"] = "application/vnd.hydrostatix.sof-data",
- aab = "application/x-authorware-bin",
- aac = "audio/x-aac",
- aam = "application/x-authorware-map",
- aas = "application/x-authorware-seg",
- abw = "application/x-abiword",
+ ["n-gage"] = "application/nokia.n-gage.symbian.install",
+ ["sfd-hdstx"] = "application/hydrostatix.sof-data",
+ aab = "application/authorware-bin",
+ aac = "audio/aac",
+ aam = "application/authorware-map",
+ aas = "application/authorware-seg",
+ abw = "application/abiword",
ac = "application/pkix-attr-cert",
- acc = "application/vnd.americandynamics.acc",
- ace = "application/x-ace-compressed",
- acu = "application/vnd.acucobol",
- acutc = "application/vnd.acucorp",
+ acc = "application/americandynamics.acc",
+ ace = "application/ace-compressed",
+ acu = "application/acucobol",
+ acutc = "application/acucorp",
adp = "audio/adpcm",
- aep = "application/vnd.audiograph",
- afm = "application/x-font-type1",
- afp = "application/vnd.ibm.modcap",
- ahead = "application/vnd.ahead.space",
+ aep = "application/audiograph",
+ afm = "application/font-type1",
+ afp = "application/ibm.modcap",
+ ahead = "application/ahead.space",
ai = "application/postscript",
- aif = "audio/x-aiff",
- aifc = "audio/x-aiff",
- aiff = "audio/x-aiff",
- air = "application/vnd.adobe.air-application-installer-package+zip",
- ait = "application/vnd.dvb.ait",
- ami = "application/vnd.amiga.ami",
- apk = "application/vnd.android.package-archive",
+ aif = "audio/aiff",
+ aifc = "audio/aiff",
+ aiff = "audio/aiff",
+ air = "application/adobe.air-application-installer-package+zip",
+ ait = "application/dvb.ait",
+ ami = "application/amiga.ami",
+ apk = "application/android.package-archive",
appcache = "text/cache-manifest",
- application = "application/x-ms-application",
- apr = "application/vnd.lotus-approach",
- arc = "application/x-freearc",
+ application = "application/ms-application",
+ apr = "application/lotus-approach",
+ arc = "application/freearc",
asc = "application/pgp-signature",
- asf = "video/x-ms-asf",
+ asf = "video/ms-asf",
asm = "text/asm",
- aso = "application/vnd.accpac.simply.aso",
- ass = "text/x-ass",
- asx = "video/x-ms-asf",
- atc = "application/vnd.acucorp",
+ aso = "application/accpac.simply.aso",
+ ass = "text/ass",
+ asx = "video/ms-asf",
+ atc = "application/acucorp",
atom = "application/atom+xml",
atomcat = "application/atomcat+xml",
atomsvc = "application/atomsvc+xml",
- atx = "application/vnd.antix.game-component",
+ atx = "application/antix.game-component",
au = "audio/basic",
- avi = "video/x-msvideo",
+ avi = "video/msvideo",
avif = "image/avif",
aw = "application/applixware",
- azf = "application/vnd.airzip.filesecure.azf",
- azs = "application/vnd.airzip.filesecure.azs",
- azw = "application/vnd.amazon.ebook",
+ azf = "application/airzip.filesecure.azf",
+ azs = "application/airzip.filesecure.azs",
+ azw = "application/amazon.ebook",
bash = "text/shellscript",
- bat = "application/x-msdownload",
- bcpio = "application/x-bcpio",
- bdf = "application/x-font-bdf",
- bdm = "application/vnd.syncml.dm+wbxml",
- bed = "application/vnd.realvnc.bed",
- bh2 = "application/vnd.fujitsu.oasysprs",
+ bat = "application/msdownload",
+ bcpio = "application/bcpio",
+ bdf = "application/font-bdf",
+ bdm = "application/syncml.dm+wbxml",
+ bed = "application/realvnc.bed",
+ bh2 = "application/fujitsu.oasysprs",
bin = "application/octet-stream",
- blb = "application/x-blorb",
- blorb = "application/x-blorb",
- bmi = "application/vnd.bmi",
+ blb = "application/blorb",
+ blorb = "application/blorb",
+ bmi = "application/bmi",
bmp = "image/bmp",
- book = "application/vnd.framemaker",
- box = "application/vnd.previewsystems.box",
- boz = "application/x-bzip2",
+ book = "application/framemaker",
+ box = "application/previewsystems.box",
+ boz = "application/bzip2",
bpk = "application/octet-stream",
btif = "image/prs.btif",
- bz = "application/x-bzip",
- bz2 = "application/x-bzip2",
+ bz = "application/bzip",
+ bz2 = "application/bzip2",
c = "text/c",
- c11amc = "application/vnd.cluetrust.cartomobile-config",
- c11amz = "application/vnd.cluetrust.cartomobile-config-pkg",
- c4d = "application/vnd.clonk.c4group",
- c4f = "application/vnd.clonk.c4group",
- c4g = "application/vnd.clonk.c4group",
- c4p = "application/vnd.clonk.c4group",
- c4u = "application/vnd.clonk.c4group",
- cab = "application/vnd.ms-cab-compressed",
- caf = "audio/x-caf",
- cap = "application/vnd.tcpdump.pcap",
- car = "application/vnd.curl.car",
- cat = "application/vnd.ms-pki.seccat",
- cb7 = "application/x-cbr",
- cba = "application/x-cbr",
- cbr = "application/x-cbr",
- cbt = "application/x-cbr",
- cbz = "application/x-cbr",
+ c11amc = "application/cluetrust.cartomobile-config",
+ c11amz = "application/cluetrust.cartomobile-config-pkg",
+ c4d = "application/clonk.c4group",
+ c4f = "application/clonk.c4group",
+ c4g = "application/clonk.c4group",
+ c4p = "application/clonk.c4group",
+ c4u = "application/clonk.c4group",
+ cab = "application/ms-cab-compressed",
+ caf = "audio/caf",
+ cap = "application/tcpdump.pcap",
+ car = "application/curl.car",
+ cat = "application/ms-pki.seccat",
+ cb7 = "application/cbr",
+ cba = "application/cbr",
+ cbr = "application/cbr",
+ cbt = "application/cbr",
+ cbz = "application/cbr",
cc = "text/c",
- cct = "application/x-director",
+ cct = "application/director",
ccxml = "application/ccxml+xml",
- cdbcmsg = "application/vnd.contact.cmsg",
- cdf = "application/x-netcdf",
- cdkey = "application/vnd.mediastation.cdkey",
+ cdbcmsg = "application/contact.cmsg",
+ cdf = "application/netcdf",
+ cdkey = "application/mediastation.cdkey",
cdmia = "application/cdmi-capability",
cdmic = "application/cdmi-container",
cdmid = "application/cdmi-domain",
cdmio = "application/cdmi-object",
cdmiq = "application/cdmi-queue",
- cdx = "chemical/x-cdx",
- cdxml = "application/vnd.chemdraw+xml",
- cdy = "application/vnd.cinderella",
+ cdx = "chemical/cdx",
+ cdxml = "application/chemdraw+xml",
+ cdy = "application/cinderella",
cer = "application/pkix-cert",
cfg = "text/plain",
- cfs = "application/x-cfs-compressed",
+ cfs = "application/cfs-compressed",
cgm = "image/cgm",
- chat = "application/x-chat",
- chm = "application/vnd.ms-htmlhelp",
- chrt = "application/vnd.kde.kchart",
- cif = "chemical/x-cif",
- cii = "application/vnd.anser-web-certificate-issue-initiation",
- cil = "application/vnd.ms-artgalry",
- cla = "application/vnd.claymore",
+ chat = "application/chat",
+ chm = "application/ms-htmlhelp",
+ chrt = "application/kde.kchart",
+ cif = "chemical/cif",
+ cii = "application/anser-web-certificate-issue-initiation",
+ cil = "application/ms-artgalry",
+ cla = "application/claymore",
class = "application/java-vm",
- clkk = "application/vnd.crick.clicker.keyboard",
- clkp = "application/vnd.crick.clicker.palette",
- clkt = "application/vnd.crick.clicker.template",
- clkw = "application/vnd.crick.clicker.wordbank",
- clkx = "application/vnd.crick.clicker",
- clp = "application/x-msclip",
- cmc = "application/vnd.cosmocaller",
- cmdf = "chemical/x-cmdf",
- cml = "chemical/x-cml",
- cmp = "application/vnd.yellowriver-custom-menu",
- cmx = "image/x-cmx",
- cod = "application/vnd.rim.cod",
- com = "application/x-msdownload",
+ clkk = "application/crick.clicker.keyboard",
+ clkp = "application/crick.clicker.palette",
+ clkt = "application/crick.clicker.template",
+ clkw = "application/crick.clicker.wordbank",
+ clkx = "application/crick.clicker",
+ clp = "application/msclip",
+ cmc = "application/cosmocaller",
+ cmdf = "chemical/cmdf",
+ cml = "chemical/cml",
+ cmp = "application/yellowriver-custom-menu",
+ cmx = "image/cmx",
+ cod = "application/rim.cod",
+ com = "application/msdownload",
conf = "text/plain",
- cpio = "application/x-cpio",
+ cpio = "application/cpio",
cpp = "text/c",
cpt = "application/mac-compactpro",
- crd = "application/x-mscardfile",
+ crd = "application/mscardfile",
crl = "application/pkix-crl",
- crt = "application/x-x509-ca-cert",
- cryptonote = "application/vnd.rig.cryptonote",
- csh = "application/x-csh",
- csml = "chemical/x-csml",
- csp = "application/vnd.commonspace",
+ crt = "application/x509-ca-cert",
+ cryptonote = "application/rig.cryptonote",
+ csh = "application/csh",
+ csml = "chemical/csml",
+ csp = "application/commonspace",
css = "text/css",
- cst = "application/x-director",
+ cst = "application/director",
csv = "text/csv",
cu = "application/cu-seeme",
- curl = "text/vnd.curl",
+ curl = "text/curl",
cww = "application/prs.cww",
- cxt = "application/x-director",
+ cxt = "application/director",
cxx = "text/c",
- dae = "model/vnd.collada+xml",
- daf = "application/vnd.mobius.daf",
- dart = "application/vnd.dart",
- dataless = "application/vnd.fdsn.seed",
+ dae = "model/collada+xml",
+ daf = "application/mobius.daf",
+ dart = "application/dart",
+ dataless = "application/fdsn.seed",
davmount = "application/davmount+xml",
dbk = "application/docbook+xml",
- dcr = "application/x-director",
- dcurl = "text/vnd.curl.dcurl",
- dd2 = "application/vnd.oma.dd2+xml",
- ddd = "application/vnd.fujixerox.ddd",
- deb = "application/x-debian-package",
+ dcr = "application/director",
+ dcurl = "text/curl.dcurl",
+ dd2 = "application/oma.dd2+xml",
+ ddd = "application/fujixerox.ddd",
+ deb = "application/debian-package",
def = "text/plain",
deploy = "application/octet-stream",
- der = "application/x-x509-ca-cert",
- dfac = "application/vnd.dreamfactory",
- dgc = "application/x-dgc-compressed",
+ der = "application/x509-ca-cert",
+ dfac = "application/dreamfactory",
+ dgc = "application/dgc-compressed",
dic = "text/c",
- dir = "application/x-director",
- dis = "application/vnd.mobius.dis",
+ dir = "application/director",
+ dis = "application/mobius.dis",
dist = "application/octet-stream",
distz = "application/octet-stream",
- djv = "image/vnd.djvu",
- djvu = "image/vnd.djvu",
- dll = "application/x-msdownload",
- dmg = "application/x-apple-diskimage",
- dmp = "application/vnd.tcpdump.pcap",
+ djv = "image/djvu",
+ djvu = "image/djvu",
+ dll = "application/msdownload",
+ dmg = "application/apple-diskimage",
+ dmp = "application/tcpdump.pcap",
dms = "application/octet-stream",
- dna = "application/vnd.dna",
+ dna = "application/dna",
doc = "application/msword",
- docm = "application/vnd.ms-word.document.macroenabled.12",
- docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ docm = "application/ms-word.document.macroenabled.12",
+ docx = "application/openxmlformats-officedocument.wordprocessingml.document",
dot = "application/msword",
- dotm = "application/vnd.ms-word.template.macroenabled.12",
- dotx = "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
- dp = "application/vnd.osgi.dp",
- dpg = "application/vnd.dpgraph",
- dra = "audio/vnd.dra",
+ dotm = "application/ms-word.template.macroenabled.12",
+ dotx = "application/openxmlformats-officedocument.wordprocessingml.template",
+ dp = "application/osgi.dp",
+ dpg = "application/dpgraph",
+ dra = "audio/dra",
dsc = "text/prs.lines.tag",
dssc = "application/dssc+der",
- dtb = "application/x-dtbook+xml",
+ dtb = "application/dtbook+xml",
dtd = "application/xml-dtd",
- dts = "audio/vnd.dts",
- dtshd = "audio/vnd.dts.hd",
+ dts = "audio/dts",
+ dtshd = "audio/dts.hd",
dump = "application/octet-stream",
- dvb = "video/vnd.dvb.file",
- dvi = "application/x-dvi",
- dwf = "model/vnd.dwf",
- dwg = "image/vnd.dwg",
- dxf = "image/vnd.dxf",
- dxp = "application/vnd.spotfire.dxp",
- dxr = "application/x-director",
- ebuild = "application/vnd.gentoo.ebuild",
- ecelp4800 = "audio/vnd.nuera.ecelp4800",
- ecelp7470 = "audio/vnd.nuera.ecelp7470",
- ecelp9600 = "audio/vnd.nuera.ecelp9600",
- eclass = "application/vnd.gentoo.eclass",
+ dvb = "video/dvb.file",
+ dvi = "application/dvi",
+ dwf = "model/dwf",
+ dwg = "image/dwg",
+ dxf = "image/dxf",
+ dxp = "application/spotfire.dxp",
+ dxr = "application/director",
+ ebuild = "application/gentoo.ebuild",
+ ecelp4800 = "audio/nuera.ecelp4800",
+ ecelp7470 = "audio/nuera.ecelp7470",
+ ecelp9600 = "audio/nuera.ecelp9600",
+ eclass = "application/gentoo.eclass",
ecma = "application/ecmascript",
- edm = "application/vnd.novadigm.edm",
- edx = "application/vnd.novadigm.edx",
- efif = "application/vnd.picsel",
- ei6 = "application/vnd.pg.osasli",
+ edm = "application/novadigm.edm",
+ edx = "application/novadigm.edx",
+ efif = "application/picsel",
+ ei6 = "application/pg.osasli",
elc = "application/octet-stream",
- emf = "application/x-msmetafile",
+ emf = "application/msmetafile",
eml = "message/rfc822",
emma = "application/emma+xml",
- emz = "application/x-msmetafile",
+ emz = "application/msmetafile",
env = "text/plain",
- eol = "audio/vnd.digital-winds",
- eot = "application/vnd.ms-fontobject",
+ eol = "audio/digital-winds",
+ eot = "application/ms-fontobject",
eps = "application/postscript",
epub = "application/epub+zip",
- es3 = "application/vnd.eszigno3+xml",
- esa = "application/vnd.osgi.subsystem",
- esf = "application/vnd.epson.esf",
- et3 = "application/vnd.eszigno3+xml",
+ es3 = "application/eszigno3+xml",
+ esa = "application/osgi.subsystem",
+ esf = "application/epson.esf",
+ et3 = "application/eszigno3+xml",
etx = "text/setext",
- eva = "application/x-eva",
- evy = "application/x-envoy",
- exe = "application/x-msdownload",
+ eva = "application/eva",
+ evy = "application/envoy",
+ exe = "application/msdownload",
exi = "application/exi",
- ext = "application/vnd.novadigm.ext",
+ ext = "application/novadigm.ext",
ez = "application/andrew-inset",
- ez2 = "application/vnd.ezpix-album",
- ez3 = "application/vnd.ezpix-package",
+ ez2 = "application/ezpix-album",
+ ez3 = "application/ezpix-package",
f = "text/fortran",
- f4v = "video/x-f4v",
+ f4v = "video/f4v",
f77 = "text/fortran",
f90 = "text/fortran",
- fbs = "image/vnd.fastbidsheet",
- fcdt = "application/vnd.adobe.formscentral.fcdt",
- fcs = "application/vnd.isac.fcs",
- fdf = "application/vnd.fdf",
- fe_launch = "application/vnd.denovo.fcselayout-link",
- fg5 = "application/vnd.fujitsu.oasysgp",
- fgd = "application/x-director",
- fh = "image/x-freehand",
- fh4 = "image/x-freehand",
- fh5 = "image/x-freehand",
- fh7 = "image/x-freehand",
- fhc = "image/x-freehand",
- fig = "application/x-xfig",
+ fbs = "image/fastbidsheet",
+ fcdt = "application/adobe.formscentral.fcdt",
+ fcs = "application/isac.fcs",
+ fdf = "application/fdf",
+ fe_launch = "application/denovo.fcselayout-link",
+ fg5 = "application/fujitsu.oasysgp",
+ fgd = "application/director",
+ fh = "image/freehand",
+ fh4 = "image/freehand",
+ fh5 = "image/freehand",
+ fh7 = "image/freehand",
+ fhc = "image/freehand",
+ fig = "application/xfig",
fish = "text/shellscript",
- flac = "audio/x-flac",
- fli = "video/x-fli",
- flo = "application/vnd.micrografx.flo",
- flv = "video/x-flv",
- flw = "application/vnd.kde.kivio",
- flx = "text/vnd.fmi.flexstor",
- fly = "text/vnd.fly",
- fm = "application/vnd.framemaker",
- fnc = "application/vnd.frogans.fnc",
- fpx = "image/vnd.fpx",
- frame = "application/vnd.framemaker",
- fsc = "application/vnd.fsc.weblaunch",
- fst = "image/vnd.fst",
- ftc = "application/vnd.fluxtime.clip",
- fti = "application/vnd.anser-web-funds-transfer-initiation",
- fvt = "video/vnd.fvt",
- fxp = "application/vnd.adobe.fxp",
- fxpl = "application/vnd.adobe.fxp",
- fzs = "application/vnd.fuzzysheet",
- g2w = "application/vnd.geoplan",
+ flac = "audio/flac",
+ fli = "video/fli",
+ flo = "application/micrografx.flo",
+ flv = "video/flv",
+ flw = "application/kde.kivio",
+ flx = "text/fmi.flexstor",
+ fly = "text/fly",
+ fm = "application/framemaker",
+ fnc = "application/frogans.fnc",
+ fpx = "image/fpx",
+ frame = "application/framemaker",
+ fsc = "application/fsc.weblaunch",
+ fst = "image/fst",
+ ftc = "application/fluxtime.clip",
+ fti = "application/anser-web-funds-transfer-initiation",
+ fvt = "video/fvt",
+ fxp = "application/adobe.fxp",
+ fxpl = "application/adobe.fxp",
+ fzs = "application/fuzzysheet",
+ g2w = "application/geoplan",
g3 = "image/g3fax",
- g3w = "application/vnd.geospace",
- gac = "application/vnd.groove-account",
- gam = "application/x-tads",
+ g3w = "application/geospace",
+ gac = "application/groove-account",
+ gam = "application/tads",
gbr = "application/rpki-ghostbusters",
- gca = "application/x-gca-compressed",
- gdl = "model/vnd.gdl",
- geo = "application/vnd.dynageo",
- gex = "application/vnd.geometry-explorer",
- ggb = "application/vnd.geogebra.file",
- ggs = "application/vnd.geogebra.slides",
- ggt = "application/vnd.geogebra.tool",
- ghf = "application/vnd.groove-help",
+ gca = "application/gca-compressed",
+ gdl = "model/gdl",
+ geo = "application/dynageo",
+ gex = "application/geometry-explorer",
+ ggb = "application/geogebra.file",
+ ggs = "application/geogebra.slides",
+ ggt = "application/geogebra.tool",
+ ghf = "application/groove-help",
gif = "image/gif",
- gim = "application/vnd.groove-identity-message",
+ gim = "application/groove-identity-message",
gml = "application/gml+xml",
- gmx = "application/vnd.gmx",
- gnumeric = "application/x-gnumeric",
+ gmx = "application/gmx",
+ gnumeric = "application/gnumeric",
go = "text/go",
- gph = "application/vnd.flographit",
+ gph = "application/flographit",
gpx = "application/gpx+xml",
- gqf = "application/vnd.grafeq",
- gqs = "application/vnd.grafeq",
+ gqf = "application/grafeq",
+ gqs = "application/grafeq",
gram = "application/srgs",
- gramps = "application/x-gramps-xml",
- gre = "application/vnd.geometry-explorer",
- grv = "application/vnd.groove-injector",
+ gramps = "application/gramps-xml",
+ gre = "application/geometry-explorer",
+ grv = "application/groove-injector",
grxml = "application/srgs+xml",
- gsf = "application/x-font-ghostscript",
- gtar = "application/x-gtar",
- gtm = "application/vnd.groove-tool-message",
- gtw = "model/vnd.gtw",
- gv = "text/vnd.graphviz",
+ gsf = "application/font-ghostscript",
+ gtar = "application/gtar",
+ gtm = "application/groove-tool-message",
+ gtw = "model/gtw",
+ gv = "text/graphviz",
gxf = "application/gxf",
- gxt = "application/vnd.geonext",
+ gxt = "application/geonext",
h = "text/c",
h261 = "video/h261",
h263 = "video/h263",
h264 = "video/h264",
- hal = "application/vnd.hal+xml",
- hbci = "application/vnd.hbci",
- hdf = "application/x-hdf",
+ hal = "application/hal+xml",
+ hbci = "application/hbci",
+ hcl = "text/hcl",
+ hdf = "application/hdf",
hh = "text/c",
hlp = "application/winhlp",
- hpgl = "application/vnd.hp-hpgl",
- hpid = "application/vnd.hp-hpid",
+ hpgl = "application/hp-hpgl",
+ hpid = "application/hp-hpid",
hpp = "text/c",
- hps = "application/vnd.hp-hps",
+ hps = "application/hp-hps",
hqx = "application/mac-binhex40",
- htke = "application/vnd.kenameaapp",
+ htke = "application/kenameaapp",
htm = "text/html",
html = "text/html",
- hvd = "application/vnd.yamaha.hv-dic",
- hvp = "application/vnd.yamaha.hv-voice",
- hvs = "application/vnd.yamaha.hv-script",
- i2g = "application/vnd.intergeo",
- icc = "application/vnd.iccprofile",
- ice = "x-conference/x-cooltalk",
- icm = "application/vnd.iccprofile",
- ico = "image/x-icon",
+ hvd = "application/yamaha.hv-dic",
+ hvp = "application/yamaha.hv-voice",
+ hvs = "application/yamaha.hv-script",
+ i2g = "application/intergeo",
+ icc = "application/iccprofile",
+ ice = "conference/cooltalk",
+ icm = "application/iccprofile",
+ ico = "image/icon",
ics = "text/calendar",
ief = "image/ief",
ifb = "text/calendar",
- ifm = "application/vnd.shana.informed.formdata",
+ ifm = "application/shana.informed.formdata",
iges = "model/iges",
- igl = "application/vnd.igloader",
- igm = "application/vnd.insors.igm",
+ igl = "application/igloader",
+ igm = "application/insors.igm",
igs = "model/iges",
- igx = "application/vnd.micrografx.igx",
- iif = "application/vnd.shana.informed.interchange",
- imp = "application/vnd.accpac.simply.imp",
- ims = "application/vnd.ms-ims",
+ igx = "application/micrografx.igx",
+ iif = "application/shana.informed.interchange",
+ imp = "application/accpac.simply.imp",
+ ims = "application/ms-ims",
ini = "text/plain",
ink = "application/inkml+xml",
inkml = "application/inkml+xml",
- install = "application/x-install-instructions",
- iota = "application/vnd.astraea-software.iota",
+ install = "application/install-instructions",
+ iota = "application/astraea-software.iota",
ipfix = "application/ipfix",
- ipk = "application/vnd.shana.informed.package",
- irm = "application/vnd.ibm.rights-management",
- irp = "application/vnd.irepository.package+xml",
- iso = "application/x-iso9660-image",
- itp = "application/vnd.shana.informed.formtemplate",
- ivp = "application/vnd.immervision-ivp",
- ivu = "application/vnd.immervision-ivu",
- jad = "text/vnd.sun.j2me.app-descriptor",
- jam = "application/vnd.jam",
+ ipk = "application/shana.informed.package",
+ irm = "application/ibm.rights-management",
+ irp = "application/irepository.package+xml",
+ iso = "application/iso9660-image",
+ itp = "application/shana.informed.formtemplate",
+ ivp = "application/immervision-ivp",
+ ivu = "application/immervision-ivu",
+ jad = "text/sun.j2me.app-descriptor",
+ jam = "application/jam",
jar = "application/java-archive",
java = "text/java-source",
- jisp = "application/vnd.jisp",
- jlt = "application/vnd.hp-jlyt",
- jnlp = "application/x-java-jnlp-file",
- joda = "application/vnd.joost.joda-archive",
+ jisp = "application/jisp",
+ jlt = "application/hp-jlyt",
+ jnlp = "application/java-jnlp-file",
+ joda = "application/joost.joda-archive",
jpe = "image/jpeg",
jpeg = "image/jpeg",
jpg = "image/jpeg",
@@ -376,52 +385,51 @@ local EXTS = {
jpgv = "video/jpeg",
jpm = "video/jpm",
js = "text/javascript",
- js = "text/javascript",
json = "application/json",
jsonc = "application/json",
jsonml = "application/jsonml+json",
jsx = "text/jsx",
jxl = "image/jxl",
kar = "audio/midi",
- karbon = "application/vnd.kde.karbon",
- kfo = "application/vnd.kde.kformula",
- kia = "application/vnd.kidspiration",
- kml = "application/vnd.google-earth.kml+xml",
- kmz = "application/vnd.google-earth.kmz",
- kne = "application/vnd.kinar",
- knp = "application/vnd.kinar",
- kon = "application/vnd.kde.kontour",
- kpr = "application/vnd.kde.kpresenter",
- kpt = "application/vnd.kde.kpresenter",
- kpxx = "application/vnd.ds-keypoint",
- ksp = "application/vnd.kde.kspread",
- ktr = "application/vnd.kahootz",
+ karbon = "application/kde.karbon",
+ kfo = "application/kde.kformula",
+ kia = "application/kidspiration",
+ kml = "application/google-earth.kml+xml",
+ kmz = "application/google-earth.kmz",
+ kne = "application/kinar",
+ knp = "application/kinar",
+ kon = "application/kde.kontour",
+ kpr = "application/kde.kpresenter",
+ kpt = "application/kde.kpresenter",
+ kpxx = "application/ds-keypoint",
+ ksp = "application/kde.kspread",
+ ktr = "application/kahootz",
ktx = "image/ktx",
- ktz = "application/vnd.kahootz",
- kwd = "application/vnd.kde.kword",
- kwt = "application/vnd.kde.kword",
- lasxml = "application/vnd.las.las+xml",
- latex = "application/x-latex",
- lbd = "application/vnd.llamagraphics.life-balance.desktop",
- lbe = "application/vnd.llamagraphics.life-balance.exchange+xml",
- les = "application/vnd.hhe.lesson-player",
- lha = "application/x-lzh-compressed",
- link66 = "application/vnd.route66.link66+xml",
+ ktz = "application/kahootz",
+ kwd = "application/kde.kword",
+ kwt = "application/kde.kword",
+ lasxml = "application/las.las+xml",
+ latex = "application/latex",
+ lbd = "application/llamagraphics.life-balance.desktop",
+ lbe = "application/llamagraphics.life-balance.exchange+xml",
+ les = "application/hhe.lesson-player",
+ lha = "application/lzh-compressed",
+ link66 = "application/route66.link66+xml",
list = "text/plain",
- list3820 = "application/vnd.ibm.modcap",
- listafp = "application/vnd.ibm.modcap",
- lnk = "application/x-ms-shortcut",
+ list3820 = "application/ibm.modcap",
+ listafp = "application/ibm.modcap",
+ lnk = "application/ms-shortcut",
log = "text/plain",
lostxml = "application/lost+xml",
lrf = "application/octet-stream",
- lrm = "application/vnd.ms-lrm",
- ltf = "application/vnd.frogans.ltf",
+ lrm = "application/ms-lrm",
+ ltf = "application/frogans.ltf",
lua = "text/lua",
- lvp = "audio/vnd.lucent.voice",
- lwp = "application/vnd.lotus-wordpro",
- lzh = "application/x-lzh-compressed",
- m13 = "application/x-msmediaview",
- m14 = "application/x-msmediaview",
+ lvp = "audio/lucent.voice",
+ lwp = "application/lotus-wordpro",
+ lzh = "application/lzh-compressed",
+ m13 = "application/msmediaview",
+ m14 = "application/msmediaview",
m1v = "video/mpeg",
m21 = "application/mp21",
m2a = "audio/mpeg",
@@ -429,58 +437,58 @@ local EXTS = {
m2ts = "video/mp2t",
m2v = "video/mpeg",
m3a = "audio/mpeg",
- m3u = "audio/x-mpegurl",
- m3u8 = "application/vnd.apple.mpegurl",
+ m3u = "audio/mpegurl",
+ m3u8 = "application/apple.mpegurl",
m4a = "audio/mp4",
- m4u = "video/vnd.mpegurl",
- m4v = "video/x-m4v",
+ m4u = "video/mpegurl",
+ m4v = "video/m4v",
ma = "application/mathematica",
mads = "application/mads+xml",
- mag = "application/vnd.ecowin.chart",
- maker = "application/vnd.framemaker",
+ mag = "application/ecowin.chart",
+ maker = "application/framemaker",
man = "text/troff",
mar = "application/octet-stream",
mathml = "application/mathml+xml",
mb = "application/mathematica",
- mbk = "application/vnd.mobius.mbk",
+ mbk = "application/mobius.mbk",
mbox = "application/mbox",
- mc1 = "application/vnd.medcalcdata",
- mcd = "application/vnd.mcd",
- mcurl = "text/vnd.curl.mcurl",
+ mc1 = "application/medcalcdata",
+ mcd = "application/mcd",
+ mcurl = "text/curl.mcurl",
md = "text/markdown",
- mdb = "application/x-msaccess",
- mdi = "image/vnd.ms-modi",
+ mdb = "application/msaccess",
+ mdi = "image/ms-modi",
me = "text/troff",
mesh = "model/mesh",
meta4 = "application/metalink4+xml",
metalink = "application/metalink+xml",
mets = "application/mets+xml",
- mfm = "application/vnd.mfmp",
+ mfm = "application/mfmp",
mft = "application/rpki-manifest",
- mgp = "application/vnd.osgeo.mapguide.package",
- mgz = "application/vnd.proteus.magazine",
+ mgp = "application/osgeo.mapguide.package",
+ mgz = "application/proteus.magazine",
mid = "audio/midi",
midi = "audio/midi",
- mie = "application/x-mie",
- mif = "application/vnd.mif",
+ mie = "application/mie",
+ mif = "application/mif",
mime = "message/rfc822",
mj2 = "video/mj2",
mjp2 = "video/mj2",
mjs = "text/javascript",
- mk3d = "video/x-matroska",
- mka = "audio/x-matroska",
- mks = "video/x-matroska",
- mkv = "video/x-matroska",
- mlp = "application/vnd.dolby.mlp",
- mmd = "application/vnd.chipnuts.karaoke-mmd",
- mmf = "application/vnd.smaf",
- mmr = "image/vnd.fujixerox.edmics-mmr",
- mng = "video/x-mng",
- mny = "application/x-msmoney",
- mobi = "application/x-mobipocket-ebook",
+ mk3d = "video/matroska",
+ mka = "audio/matroska",
+ mks = "video/matroska",
+ mkv = "video/matroska",
+ mlp = "application/dolby.mlp",
+ mmd = "application/chipnuts.karaoke-mmd",
+ mmf = "application/smaf",
+ mmr = "image/fujixerox.edmics-mmr",
+ mng = "video/mng",
+ mny = "application/msmoney",
+ mobi = "application/mobipocket-ebook",
mods = "application/mods+xml",
mov = "video/quicktime",
- movie = "video/x-sgi-movie",
+ movie = "video/sgi-movie",
mp2 = "audio/mpeg",
mp21 = "application/mp21",
mp2a = "audio/mpeg",
@@ -489,75 +497,75 @@ local EXTS = {
mp4a = "audio/mp4",
mp4s = "application/mp4",
mp4v = "video/mp4",
- mpc = "application/vnd.mophun.certificate",
+ mpc = "application/mophun.certificate",
mpe = "video/mpeg",
mpeg = "video/mpeg",
mpg = "video/mpeg",
mpg4 = "video/mp4",
mpga = "audio/mpeg",
- mpkg = "application/vnd.apple.installer+xml",
- mpm = "application/vnd.blueice.multipass",
- mpn = "application/vnd.mophun.application",
- mpp = "application/vnd.ms-project",
- mpt = "application/vnd.ms-project",
- mpy = "application/vnd.ibm.minipay",
- mqy = "application/vnd.mobius.mqy",
+ mpkg = "application/apple.installer+xml",
+ mpm = "application/blueice.multipass",
+ mpn = "application/mophun.application",
+ mpp = "application/ms-project",
+ mpt = "application/ms-project",
+ mpy = "application/ibm.minipay",
+ mqy = "application/mobius.mqy",
mrc = "application/marc",
mrcx = "application/marcxml+xml",
ms = "text/troff",
mscml = "application/mediaservercontrol+xml",
- mseed = "application/vnd.fdsn.mseed",
- mseq = "application/vnd.mseq",
- msf = "application/vnd.epson.msf",
+ mseed = "application/fdsn.mseed",
+ mseq = "application/mseq",
+ msf = "application/epson.msf",
msh = "model/mesh",
- msi = "application/x-msdownload",
- msl = "application/vnd.mobius.msl",
- msty = "application/vnd.muvee.style",
+ msi = "application/msdownload",
+ msl = "application/mobius.msl",
+ msty = "application/muvee.style",
mts = "video/mp2t",
- mus = "application/vnd.musician",
- musicxml = "application/vnd.recordare.musicxml+xml",
- mvb = "application/x-msmediaview",
- mwf = "application/vnd.mfer",
+ mus = "application/musician",
+ musicxml = "application/recordare.musicxml+xml",
+ mvb = "application/msmediaview",
+ mwf = "application/mfer",
mxf = "application/mxf",
- mxl = "application/vnd.recordare.musicxml",
+ mxl = "application/recordare.musicxml",
mxml = "application/xv+xml",
- mxs = "application/vnd.triscape.mxs",
- mxu = "video/vnd.mpegurl",
+ mxs = "application/triscape.mxs",
+ mxu = "video/mpegurl",
n3 = "text/n3",
nb = "application/mathematica",
- nbp = "application/vnd.wolfram.player",
- nc = "application/x-netcdf",
- ncx = "application/x-dtbncx+xml",
+ nbp = "application/wolfram.player",
+ nc = "application/netcdf",
+ ncx = "application/dtbncx+xml",
nfo = "text/nfo",
- ngdat = "application/vnd.nokia.n-gage.data",
- nitf = "application/vnd.nitf",
+ ngdat = "application/nokia.n-gage.data",
+ nitf = "application/nitf",
nix = "text/nix",
- nlu = "application/vnd.neurolanguage.nlu",
- nml = "application/vnd.enliven",
- nnd = "application/vnd.noblenet-directory",
- nns = "application/vnd.noblenet-sealer",
- nnw = "application/vnd.noblenet-web",
- npx = "image/vnd.net-fpx",
- nsc = "application/x-conference",
- nsf = "application/vnd.lotus-notes",
- ntf = "application/vnd.nitf",
- nzb = "application/x-nzb",
- oa2 = "application/vnd.fujitsu.oasys2",
- oa3 = "application/vnd.fujitsu.oasys3",
- oas = "application/vnd.fujitsu.oasys",
- obd = "application/x-msbinder",
- obj = "application/x-tgif",
+ nlu = "application/neurolanguage.nlu",
+ nml = "application/enliven",
+ nnd = "application/noblenet-directory",
+ nns = "application/noblenet-sealer",
+ nnw = "application/noblenet-web",
+ npx = "image/net-fpx",
+ nsc = "application/conference",
+ nsf = "application/lotus-notes",
+ ntf = "application/nitf",
+ nzb = "application/nzb",
+ oa2 = "application/fujitsu.oasys2",
+ oa3 = "application/fujitsu.oasys3",
+ oas = "application/fujitsu.oasys",
+ obd = "application/msbinder",
+ obj = "application/tgif",
oda = "application/oda",
- odb = "application/vnd.oasis.opendocument.database",
- odc = "application/vnd.oasis.opendocument.chart",
- odf = "application/vnd.oasis.opendocument.formula",
- odft = "application/vnd.oasis.opendocument.formula-template",
- odg = "application/vnd.oasis.opendocument.graphics",
- odi = "application/vnd.oasis.opendocument.image",
- odm = "application/vnd.oasis.opendocument.text-master",
- odp = "application/vnd.oasis.opendocument.presentation",
- ods = "application/vnd.oasis.opendocument.spreadsheet",
- odt = "application/vnd.oasis.opendocument.text",
+ odb = "application/oasis.opendocument.database",
+ odc = "application/oasis.opendocument.chart",
+ odf = "application/oasis.opendocument.formula",
+ odft = "application/oasis.opendocument.formula-template",
+ odg = "application/oasis.opendocument.graphics",
+ odi = "application/oasis.opendocument.image",
+ odm = "application/oasis.opendocument.text-master",
+ odp = "application/oasis.opendocument.presentation",
+ ods = "application/oasis.opendocument.spreadsheet",
+ odt = "application/oasis.opendocument.text",
oga = "audio/ogg",
ogg = "audio/ogg",
ogv = "video/ogg",
@@ -569,134 +577,134 @@ local EXTS = {
onetoc2 = "application/onenote",
opf = "application/oebps-package+xml",
opml = "text/opml",
- oprc = "application/vnd.palm",
+ oprc = "application/palm",
opus = "audio/ogg",
- org = "application/vnd.lotus-organizer",
- osf = "application/vnd.yamaha.openscoreformat",
- osfpvg = "application/vnd.yamaha.openscoreformat.osfpvg+xml",
- otc = "application/vnd.oasis.opendocument.chart-template",
+ org = "application/lotus-organizer",
+ osf = "application/yamaha.openscoreformat",
+ osfpvg = "application/yamaha.openscoreformat.osfpvg+xml",
+ otc = "application/oasis.opendocument.chart-template",
otf = "font/otf",
- otg = "application/vnd.oasis.opendocument.graphics-template",
- oth = "application/vnd.oasis.opendocument.text-web",
- oti = "application/vnd.oasis.opendocument.image-template",
- otp = "application/vnd.oasis.opendocument.presentation-template",
- ots = "application/vnd.oasis.opendocument.spreadsheet-template",
- ott = "application/vnd.oasis.opendocument.text-template",
+ otg = "application/oasis.opendocument.graphics-template",
+ oth = "application/oasis.opendocument.text-web",
+ oti = "application/oasis.opendocument.image-template",
+ otp = "application/oasis.opendocument.presentation-template",
+ ots = "application/oasis.opendocument.spreadsheet-template",
+ ott = "application/oasis.opendocument.text-template",
oxps = "application/oxps",
- oxt = "application/vnd.openofficeorg.extension",
+ oxt = "application/openofficeorg.extension",
p = "text/pascal",
p10 = "application/pkcs10",
- p12 = "application/x-pkcs12",
- p7b = "application/x-pkcs7-certificates",
+ p12 = "application/pkcs12",
+ p7b = "application/pkcs7-certificates",
p7c = "application/pkcs7-mime",
p7m = "application/pkcs7-mime",
- p7r = "application/x-pkcs7-certreqresp",
+ p7r = "application/pkcs7-certreqresp",
p7s = "application/pkcs7-signature",
p8 = "application/pkcs8",
pas = "text/pascal",
- paw = "application/vnd.pawaafile",
- pbd = "application/vnd.powerbuilder6",
- pbm = "image/x-portable-bitmap",
- pcap = "application/vnd.tcpdump.pcap",
- pcf = "application/x-font-pcf",
- pcl = "application/vnd.hp-pcl",
- pclxl = "application/vnd.hp-pclxl",
- pct = "image/x-pict",
- pcurl = "application/vnd.curl.pcurl",
- pcx = "image/x-pcx",
- pdb = "application/vnd.palm",
+ paw = "application/pawaafile",
+ pbd = "application/powerbuilder6",
+ pbm = "image/portable-bitmap",
+ pcap = "application/tcpdump.pcap",
+ pcf = "application/font-pcf",
+ pcl = "application/hp-pcl",
+ pclxl = "application/hp-pclxl",
+ pct = "image/pict",
+ pcurl = "application/curl.pcurl",
+ pcx = "image/pcx",
+ pdb = "application/palm",
pdf = "application/pdf",
- pfa = "application/x-font-type1",
- pfb = "application/x-font-type1",
- pfm = "application/x-font-type1",
+ pfa = "application/font-type1",
+ pfb = "application/font-type1",
+ pfm = "application/font-type1",
pfr = "application/font-tdpfr",
- pfx = "application/x-pkcs12",
- pgm = "image/x-portable-graymap",
- pgn = "application/x-chess-pgn",
+ pfx = "application/pkcs12",
+ pgm = "image/portable-graymap",
+ pgn = "application/chess-pgn",
pgp = "application/pgp-encrypted",
php = "text/php",
- pic = "image/x-pict",
+ pic = "image/pict",
pkg = "application/octet-stream",
pki = "application/pkixcmp",
pkipath = "application/pkix-pkipath",
- plb = "application/vnd.3gpp.pic-bw-large",
- plc = "application/vnd.mobius.plc",
- plf = "application/vnd.pocketlearn",
+ plb = "application/3gpp.pic-bw-large",
+ plc = "application/mobius.plc",
+ plf = "application/pocketlearn",
pls = "application/pls+xml",
- pml = "application/vnd.ctc-posml",
+ pml = "application/ctc-posml",
png = "image/png",
- pnm = "image/x-portable-anymap",
- portpkg = "application/vnd.macports.portpkg",
- pot = "application/vnd.ms-powerpoint",
- potm = "application/vnd.ms-powerpoint.template.macroenabled.12",
- potx = "application/vnd.openxmlformats-officedocument.presentationml.template",
- ppam = "application/vnd.ms-powerpoint.addin.macroenabled.12",
- ppd = "application/vnd.cups-ppd",
- ppm = "image/x-portable-pixmap",
- pps = "application/vnd.ms-powerpoint",
- ppsm = "application/vnd.ms-powerpoint.slideshow.macroenabled.12",
- ppsx = "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
- ppt = "application/vnd.ms-powerpoint",
- pptm = "application/vnd.ms-powerpoint.presentation.macroenabled.12",
- pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
- pqa = "application/vnd.palm",
- prc = "application/x-mobipocket-ebook",
- pre = "application/vnd.lotus-freelance",
+ pnm = "image/portable-anymap",
+ portpkg = "application/macports.portpkg",
+ pot = "application/ms-powerpoint",
+ potm = "application/ms-powerpoint.template.macroenabled.12",
+ potx = "application/openxmlformats-officedocument.presentationml.template",
+ ppam = "application/ms-powerpoint.addin.macroenabled.12",
+ ppd = "application/cups-ppd",
+ ppm = "image/portable-pixmap",
+ pps = "application/ms-powerpoint",
+ ppsm = "application/ms-powerpoint.slideshow.macroenabled.12",
+ ppsx = "application/openxmlformats-officedocument.presentationml.slideshow",
+ ppt = "application/ms-powerpoint",
+ pptm = "application/ms-powerpoint.presentation.macroenabled.12",
+ pptx = "application/openxmlformats-officedocument.presentationml.presentation",
+ pqa = "application/palm",
+ prc = "application/mobipocket-ebook",
+ pre = "application/lotus-freelance",
prf = "application/pics-rules",
ps = "application/postscript",
- psb = "application/vnd.3gpp.pic-bw-small",
- psd = "image/vnd.adobe.photoshop",
- psf = "application/x-font-linux-psf",
+ psb = "application/3gpp.pic-bw-small",
+ psd = "image/adobe.photoshop",
+ psf = "application/font-linux-psf",
pskcxml = "application/pskc+xml",
- ptid = "application/vnd.pvi.ptid1",
- pub = "application/x-mspublisher",
- pvb = "application/vnd.3gpp.pic-bw-var",
- pwn = "application/vnd.3m.post-it-notes",
+ ptid = "application/pvi.ptid1",
+ pub = "application/mspublisher",
+ pvb = "application/3gpp.pic-bw-var",
+ pwn = "application/3m.post-it-notes",
py = "text/python",
- pya = "audio/vnd.ms-playready.media.pya",
- pyv = "video/vnd.ms-playready.media.pyv",
- qam = "application/vnd.epson.quickanime",
- qbo = "application/vnd.intu.qbo",
- qfx = "application/vnd.intu.qfx",
- qml = "text/x-qml",
- qps = "application/vnd.publishare-delta-tree",
+ pya = "audio/ms-playready.media.pya",
+ pyv = "video/ms-playready.media.pyv",
+ qam = "application/epson.quickanime",
+ qbo = "application/intu.qbo",
+ qfx = "application/intu.qfx",
+ qml = "text/qml",
+ qps = "application/publishare-delta-tree",
qt = "video/quicktime",
- qwd = "application/vnd.quark.quarkxpress",
- qwt = "application/vnd.quark.quarkxpress",
- qxb = "application/vnd.quark.quarkxpress",
- qxd = "application/vnd.quark.quarkxpress",
- qxl = "application/vnd.quark.quarkxpress",
- qxt = "application/vnd.quark.quarkxpress",
+ qwd = "application/quark.quarkxpress",
+ qwt = "application/quark.quarkxpress",
+ qxb = "application/quark.quarkxpress",
+ qxd = "application/quark.quarkxpress",
+ qxl = "application/quark.quarkxpress",
+ qxt = "application/quark.quarkxpress",
r = "text/r",
- ra = "audio/x-pn-realaudio",
- ram = "audio/x-pn-realaudio",
- rar = "application/x-rar-compressed",
- ras = "image/x-cmu-raster",
+ ra = "audio/pn-realaudio",
+ ram = "audio/pn-realaudio",
+ rar = "application/rar",
+ ras = "image/cmu-raster",
rb = "text/ruby",
- rcprofile = "application/vnd.ipunplugged.rcprofile",
+ rcprofile = "application/ipunplugged.rcprofile",
rdf = "application/rdf+xml",
- rdz = "application/vnd.data-vision.rdz",
- rep = "application/vnd.businessobjects",
- res = "application/x-dtbresource+xml",
- rgb = "image/x-rgb",
+ rdz = "application/data-vision.rdz",
+ rep = "application/businessobjects",
+ res = "application/dtbresource+xml",
+ rgb = "image/rgb",
rif = "application/reginfo+xml",
- rip = "audio/vnd.rip",
- ris = "application/x-research-info-systems",
+ rip = "audio/rip",
+ ris = "application/research-info-systems",
rl = "application/resource-lists+xml",
- rlc = "image/vnd.fujixerox.edmics-rlc",
+ rlc = "image/fujixerox.edmics-rlc",
rld = "application/resource-lists-diff+xml",
- rm = "application/vnd.rn-realmedia",
+ rm = "application/rn-realmedia",
rmi = "audio/midi",
- rmp = "audio/x-pn-realaudio-plugin",
- rms = "application/vnd.jcp.javame.midlet-rms",
- rmvb = "application/vnd.rn-realmedia-vbr",
+ rmp = "audio/pn-realaudio-plugin",
+ rms = "application/jcp.javame.midlet-rms",
+ rmvb = "application/rn-realmedia-vbr",
rnc = "application/relax-ng-compact-syntax",
roa = "application/rpki-roa",
roff = "text/troff",
- rp9 = "application/vnd.cloanto.rp9",
- rpm = "application/x-rpm",
- rpss = "application/vnd.nokia.radio-presets",
- rpst = "application/vnd.nokia.radio-preset",
+ rp9 = "application/cloanto.rp9",
+ rpm = "application/rpm",
+ rpss = "application/nokia.radio-presets",
+ rpst = "application/nokia.radio-preset",
rq = "application/sparql-query",
rs = "text/rust",
rsd = "application/rsd+xml",
@@ -705,134 +713,138 @@ local EXTS = {
rtx = "text/richtext",
s = "text/asm",
s3m = "audio/s3m",
- saf = "application/vnd.yamaha.smaf-audio",
+ saf = "application/yamaha.smaf-audio",
sbml = "application/sbml+xml",
- sc = "application/vnd.ibm.secure-container",
- scd = "application/x-msschedule",
- scm = "application/vnd.lotus-screencam",
+ sc = "application/ibm.secure-container",
+ scd = "application/msschedule",
+ scm = "application/lotus-screencam",
scq = "application/scvp-cv-request",
scs = "application/scvp-cv-response",
- scss = "text/x-scss",
- scurl = "text/vnd.curl.scurl",
- sda = "application/vnd.stardivision.draw",
- sdc = "application/vnd.stardivision.calc",
- sdd = "application/vnd.stardivision.impress",
- sdkd = "application/vnd.solent.sdkm+xml",
- sdkm = "application/vnd.solent.sdkm+xml",
+ scss = "text/scss",
+ scurl = "text/curl.scurl",
+ sda = "application/stardivision.draw",
+ sdc = "application/stardivision.calc",
+ sdd = "application/stardivision.impress",
+ sdkd = "application/solent.sdkm+xml",
+ sdkm = "application/solent.sdkm+xml",
sdp = "application/sdp",
- sdw = "application/vnd.stardivision.writer",
- see = "application/vnd.seemail",
- seed = "application/vnd.fdsn.seed",
- sema = "application/vnd.sema",
- semd = "application/vnd.semd",
- semf = "application/vnd.semf",
+ sdw = "application/stardivision.writer",
+ see = "application/seemail",
+ seed = "application/fdsn.seed",
+ sema = "application/sema",
+ semd = "application/semd",
+ semf = "application/semf",
ser = "application/java-serialized-object",
setpay = "application/set-payment-initiation",
setreg = "application/set-registration-initiation",
- sfs = "application/vnd.spotfire.sfs",
+ sfs = "application/spotfire.sfs",
sfv = "text/sfv",
sgi = "image/sgi",
- sgl = "application/vnd.stardivision.writer-global",
+ sgl = "application/stardivision.writer-global",
sgm = "text/sgml",
sgml = "text/sgml",
sh = "text/shellscript",
- shar = "application/x-shar",
+ shar = "application/shar",
shf = "application/shf+xml",
- sid = "image/x-mrsid-image",
+ sid = "image/mrsid-image",
sig = "application/pgp-signature",
sil = "audio/silk",
silo = "model/mesh",
- sis = "application/vnd.symbian.install",
- sisx = "application/vnd.symbian.install",
- sit = "application/x-stuffit",
- sitx = "application/x-stuffitx",
- skd = "application/vnd.koan",
- skm = "application/vnd.koan",
- skp = "application/vnd.koan",
- skt = "application/vnd.koan",
- sldm = "application/vnd.ms-powerpoint.slide.macroenabled.12",
- sldx = "application/vnd.openxmlformats-officedocument.presentationml.slide",
- slt = "application/vnd.epson.salt",
- sm = "application/vnd.stepmania.stepchart",
- smf = "application/vnd.stardivision.math",
+ sis = "application/symbian.install",
+ sisx = "application/symbian.install",
+ sit = "application/stuffit",
+ sitx = "application/stuffitx",
+ skd = "application/koan",
+ skm = "application/koan",
+ skp = "application/koan",
+ skt = "application/koan",
+ sldm = "application/ms-powerpoint.slide.macroenabled.12",
+ sldx = "application/openxmlformats-officedocument.presentationml.slide",
+ slt = "application/epson.salt",
+ sm = "application/stepmania.stepchart",
+ smf = "application/stardivision.math",
smi = "application/smil+xml",
smil = "application/smil+xml",
- smv = "video/x-smv",
- smzip = "application/vnd.stepmania.package",
+ smv = "video/smv",
+ smzip = "application/stepmania.package",
snd = "audio/basic",
- snf = "application/x-font-snf",
+ snf = "application/font-snf",
so = "application/octet-stream",
- spc = "application/x-pkcs7-certificates",
- spf = "application/vnd.yamaha.smaf-phrase",
- spl = "application/x-futuresplash",
- spot = "text/vnd.in3d.spot",
+ spc = "application/pkcs7-certificates",
+ spf = "application/yamaha.smaf-phrase",
+ spl = "application/futuresplash",
+ spot = "text/in3d.spot",
spp = "application/scvp-vp-response",
spq = "application/scvp-vp-request",
spx = "audio/ogg",
- sql = "application/x-sql",
- src = "application/x-wais-source",
- srt = "application/x-subrip",
+ sql = "application/sql",
+ src = "application/wais-source",
+ srt = "application/subrip",
sru = "application/sru+xml",
srx = "application/sparql-results+xml",
ssdl = "application/ssdl+xml",
- sse = "application/vnd.kodak-descriptor",
- ssf = "application/vnd.epson.ssf",
+ sse = "application/kodak-descriptor",
+ ssf = "application/epson.ssf",
ssml = "application/ssml+xml",
- st = "application/vnd.sailingtracker.track",
- stc = "application/vnd.sun.xml.calc.template",
- std = "application/vnd.sun.xml.draw.template",
- stf = "application/vnd.wt.stf",
- sti = "application/vnd.sun.xml.impress.template",
+ st = "application/sailingtracker.track",
+ stc = "application/sun.xml.calc.template",
+ std = "application/sun.xml.draw.template",
+ stf = "application/wt.stf",
+ sti = "application/sun.xml.impress.template",
stk = "application/hyperstudio",
- stl = "application/vnd.ms-pki.stl",
- str = "application/vnd.pg.format",
- stw = "application/vnd.sun.xml.writer.template",
- sub = "text/vnd.dvb.subtitle",
- sus = "application/vnd.sus-calendar",
- susp = "application/vnd.sus-calendar",
- sv4cpio = "application/x-sv4cpio",
- sv4crc = "application/x-sv4crc",
- svc = "application/vnd.dvb.service",
- svd = "application/vnd.svd",
+ stl = "application/ms-pki.stl",
+ str = "application/pg.format",
+ stw = "application/sun.xml.writer.template",
+ sub = "text/dvb.subtitle",
+ sus = "application/sus-calendar",
+ susp = "application/sus-calendar",
+ sv4cpio = "application/sv4cpio",
+ sv4crc = "application/sv4crc",
+ svc = "application/dvb.service",
+ svd = "application/svd",
svg = "image/svg+xml",
svgz = "image/svg+xml",
- swa = "application/x-director",
- swf = "application/x-shockwave-flash",
- swi = "application/vnd.aristanetworks.swi",
- sxc = "application/vnd.sun.xml.calc",
- sxd = "application/vnd.sun.xml.draw",
- sxg = "application/vnd.sun.xml.writer.global",
- sxi = "application/vnd.sun.xml.impress",
- sxm = "application/vnd.sun.xml.math",
- sxw = "application/vnd.sun.xml.writer",
+ swa = "application/director",
+ swf = "application/shockwave-flash",
+ swi = "application/aristanetworks.swi",
+ sxc = "application/sun.xml.calc",
+ sxd = "application/sun.xml.draw",
+ sxg = "application/sun.xml.writer.global",
+ sxi = "application/sun.xml.impress",
+ sxm = "application/sun.xml.math",
+ sxw = "application/sun.xml.writer",
t = "text/troff",
- t3 = "application/x-t3vm-image",
- taglet = "application/vnd.mynfc",
- tao = "application/vnd.tao.intent-module-archive",
- tar = "application/x-tar",
- tcap = "application/vnd.3gpp2.tcap",
- tcl = "application/x-tcl",
- teacher = "application/vnd.smart.teacher",
+ t3 = "application/t3vm-image",
+ taglet = "application/mynfc",
+ tao = "application/tao.intent-module-archive",
+ tar = "application/tar",
+ tcap = "application/3gpp2.tcap",
+ tcl = "application/tcl",
+ teacher = "application/smart.teacher",
tei = "application/tei+xml",
teicorpus = "application/tei+xml",
- tex = "application/x-tex",
- texi = "application/x-texinfo",
- texinfo = "application/x-texinfo",
+ tex = "application/tex",
+ texi = "application/texinfo",
+ texinfo = "application/texinfo",
text = "text/plain",
+ tf = "text/hcl",
tfi = "application/thraud+xml",
- tfm = "application/x-tex-tfm",
- tga = "image/x-tga",
- thmx = "application/vnd.ms-officetheme",
+ tfm = "application/tex-tfm",
+ tfrc = "text/hcl",
+ tfstate = "application/json",
+ tfvars = "text/hcl",
+ tga = "image/tga",
+ thmx = "application/ms-officetheme",
tif = "image/tiff",
tiff = "image/tiff",
- tmo = "application/vnd.tmobile-livetv",
+ tmo = "application/tmobile-livetv",
toml = "text/toml",
- torrent = "application/x-bittorrent",
- tpl = "application/vnd.groove-tool-template",
- tpt = "application/vnd.trid.tpt",
+ torrent = "application/bittorrent",
+ tpl = "application/groove-tool-template",
+ tpt = "application/trid.tpt",
tr = "text/troff",
- tra = "application/vnd.trueapp",
- trm = "application/x-msterminal",
+ tra = "application/trueapp",
+ trm = "application/msterminal",
ts = "text/typescript",
tsd = "application/timestamped-data",
tsv = "text/tab-separated-values",
@@ -840,113 +852,113 @@ local EXTS = {
ttc = "font/collection",
ttf = "font/ttf",
ttl = "text/turtle",
- twd = "application/vnd.simtech-mindmapper",
- twds = "application/vnd.simtech-mindmapper",
- txd = "application/vnd.genomatix.tuxedo",
- txf = "application/vnd.mobius.txf",
+ twd = "application/simtech-mindmapper",
+ twds = "application/simtech-mindmapper",
+ txd = "application/genomatix.tuxedo",
+ txf = "application/mobius.txf",
txt = "text/plain",
- u32 = "application/x-authorware-bin",
- udeb = "application/x-debian-package",
- ufd = "application/vnd.ufdl",
- ufdl = "application/vnd.ufdl",
- ulx = "application/x-glulx",
- umj = "application/vnd.umajin",
- unityweb = "application/vnd.unity",
- uoml = "application/vnd.uoml+xml",
+ u32 = "application/authorware-bin",
+ udeb = "application/debian-package",
+ ufd = "application/ufdl",
+ ufdl = "application/ufdl",
+ ulx = "application/glulx",
+ umj = "application/umajin",
+ unityweb = "application/unity",
+ uoml = "application/uoml+xml",
uri = "text/uri-list",
uris = "text/uri-list",
urls = "text/uri-list",
- ustar = "application/x-ustar",
- utz = "application/vnd.uiq.theme",
+ ustar = "application/ustar",
+ utz = "application/uiq.theme",
uu = "text/uuencode",
- uva = "audio/vnd.dece.audio",
- uvd = "application/vnd.dece.data",
- uvf = "application/vnd.dece.data",
- uvg = "image/vnd.dece.graphic",
- uvh = "video/vnd.dece.hd",
- uvi = "image/vnd.dece.graphic",
- uvm = "video/vnd.dece.mobile",
- uvp = "video/vnd.dece.pd",
- uvs = "video/vnd.dece.sd",
- uvt = "application/vnd.dece.ttml+xml",
- uvu = "video/vnd.uvvu.mp4",
- uvv = "video/vnd.dece.video",
- uvva = "audio/vnd.dece.audio",
- uvvd = "application/vnd.dece.data",
- uvvf = "application/vnd.dece.data",
- uvvg = "image/vnd.dece.graphic",
- uvvh = "video/vnd.dece.hd",
- uvvi = "image/vnd.dece.graphic",
- uvvm = "video/vnd.dece.mobile",
- uvvp = "video/vnd.dece.pd",
- uvvs = "video/vnd.dece.sd",
- uvvt = "application/vnd.dece.ttml+xml",
- uvvu = "video/vnd.uvvu.mp4",
- uvvv = "video/vnd.dece.video",
- uvvx = "application/vnd.dece.unspecified",
- uvvz = "application/vnd.dece.zip",
- uvx = "application/vnd.dece.unspecified",
- uvz = "application/vnd.dece.zip",
+ uva = "audio/dece.audio",
+ uvd = "application/dece.data",
+ uvf = "application/dece.data",
+ uvg = "image/dece.graphic",
+ uvh = "video/dece.hd",
+ uvi = "image/dece.graphic",
+ uvm = "video/dece.mobile",
+ uvp = "video/dece.pd",
+ uvs = "video/dece.sd",
+ uvt = "application/dece.ttml+xml",
+ uvu = "video/uvvu.mp4",
+ uvv = "video/dece.video",
+ uvva = "audio/dece.audio",
+ uvvd = "application/dece.data",
+ uvvf = "application/dece.data",
+ uvvg = "image/dece.graphic",
+ uvvh = "video/dece.hd",
+ uvvi = "image/dece.graphic",
+ uvvm = "video/dece.mobile",
+ uvvp = "video/dece.pd",
+ uvvs = "video/dece.sd",
+ uvvt = "application/dece.ttml+xml",
+ uvvu = "video/uvvu.mp4",
+ uvvv = "video/dece.video",
+ uvvx = "application/dece.unspecified",
+ uvvz = "application/dece.zip",
+ uvx = "application/dece.unspecified",
+ uvz = "application/dece.zip",
vcard = "text/vcard",
- vcd = "application/x-cdlink",
+ vcd = "application/cdlink",
vcf = "text/vcard",
- vcg = "application/vnd.groove-vcard",
+ vcg = "application/groove-vcard",
vcs = "text/vcalendar",
- vcx = "application/vnd.vcx",
- vis = "application/vnd.visionary",
- viv = "video/vnd.vivo",
- vob = "video/x-ms-vob",
- vor = "application/vnd.stardivision.writer",
- vox = "application/x-authorware-bin",
+ vcx = "application/vcx",
+ vis = "application/visionary",
+ viv = "video/vivo",
+ vob = "video/ms-vob",
+ vor = "application/stardivision.writer",
+ vox = "application/authorware-bin",
vrml = "model/vrml",
- vsd = "application/vnd.visio",
- vsf = "application/vnd.vsf",
- vss = "application/vnd.visio",
- vst = "application/vnd.visio",
- vsw = "application/vnd.visio",
- vtu = "model/vnd.vtu",
+ vsd = "application/visio",
+ vsf = "application/vsf",
+ vss = "application/visio",
+ vst = "application/visio",
+ vsw = "application/visio",
+ vtu = "model/vtu",
vxml = "application/voicexml+xml",
- w3d = "application/x-director",
- wad = "application/x-doom",
+ w3d = "application/director",
+ wad = "application/doom",
wasm = "application/wasm",
- wav = "audio/x-wav",
- wax = "audio/x-ms-wax",
- wbmp = "image/vnd.wap.wbmp",
- wbs = "application/vnd.criticaltools.wbs+xml",
- wbxml = "application/vnd.wap.wbxml",
- wcm = "application/vnd.ms-works",
- wdb = "application/vnd.ms-works",
- wdp = "image/vnd.ms-photo",
+ wav = "audio/wav",
+ wax = "audio/ms-wax",
+ wbmp = "image/wap.wbmp",
+ wbs = "application/criticaltools.wbs+xml",
+ wbxml = "application/wap.wbxml",
+ wcm = "application/ms-works",
+ wdb = "application/ms-works",
+ wdp = "image/ms-photo",
weba = "audio/webm",
webm = "video/webm",
webp = "image/webp",
- wg = "application/vnd.pmi.widget",
+ wg = "application/pmi.widget",
wgt = "application/widget",
- wks = "application/vnd.ms-works",
- wm = "video/x-ms-wm",
- wma = "audio/x-ms-wma",
- wmd = "application/x-ms-wmd",
- wmf = "application/x-msmetafile",
- wml = "text/vnd.wap.wml",
- wmlc = "application/vnd.wap.wmlc",
- wmls = "text/vnd.wap.wmlscript",
- wmlsc = "application/vnd.wap.wmlscriptc",
- wmv = "video/x-ms-wmv",
- wmx = "video/x-ms-wmx",
- wmz = "application/x-ms-wmz",
+ wks = "application/ms-works",
+ wm = "video/ms-wm",
+ wma = "audio/ms-wma",
+ wmd = "application/ms-wmd",
+ wmf = "application/msmetafile",
+ wml = "text/wap.wml",
+ wmlc = "application/wap.wmlc",
+ wmls = "text/wap.wmlscript",
+ wmlsc = "application/wap.wmlscriptc",
+ wmv = "video/ms-wmv",
+ wmx = "video/ms-wmx",
+ wmz = "application/ms-wmz",
woff = "font/woff",
woff2 = "font/woff2",
- wpd = "application/vnd.wordperfect",
- wpl = "application/vnd.ms-wpl",
- wps = "application/vnd.ms-works",
- wqd = "application/vnd.wqd",
- wri = "application/x-mswrite",
+ wpd = "application/wordperfect",
+ wpl = "application/ms-wpl",
+ wps = "application/ms-works",
+ wqd = "application/wqd",
+ wri = "application/mswrite",
wrl = "model/vrml",
wsdl = "application/wsdl+xml",
wspolicy = "application/wspolicy+xml",
- wtb = "application/vnd.webturbo",
- wvx = "video/x-ms-wvx",
- x32 = "application/x-authorware-bin",
+ wtb = "application/webturbo",
+ wvx = "video/ms-wvx",
+ x32 = "application/authorware-bin",
x3d = "model/x3d+xml",
x3db = "model/x3d+binary",
x3dbz = "model/x3d+binary",
@@ -954,76 +966,76 @@ local EXTS = {
x3dvz = "model/x3d+vrml",
x3dz = "model/x3d+xml",
xaml = "application/xaml+xml",
- xap = "application/x-silverlight-app",
- xar = "application/vnd.xara",
- xbap = "application/x-ms-xbap",
- xbd = "application/vnd.fujixerox.docuworks.binder",
- xbm = "image/x-xbitmap",
+ xap = "application/silverlight-app",
+ xar = "application/xara",
+ xbap = "application/ms-xbap",
+ xbd = "application/fujixerox.docuworks.binder",
+ xbm = "image/xbitmap",
xdf = "application/xcap-diff+xml",
- xdm = "application/vnd.syncml.dm+xml",
- xdp = "application/vnd.adobe.xdp+xml",
+ xdm = "application/syncml.dm+xml",
+ xdp = "application/adobe.xdp+xml",
xdssc = "application/dssc+xml",
- xdw = "application/vnd.fujixerox.docuworks",
+ xdw = "application/fujixerox.docuworks",
xenc = "application/xenc+xml",
xer = "application/patch-ops-error+xml",
- xfdf = "application/vnd.adobe.xfdf",
- xfdl = "application/vnd.xfdl",
+ xfdf = "application/adobe.xfdf",
+ xfdl = "application/xfdl",
xht = "application/xhtml+xml",
xhtml = "application/xhtml+xml",
xhvml = "application/xv+xml",
- xif = "image/vnd.xiff",
- xla = "application/vnd.ms-excel",
- xlam = "application/vnd.ms-excel.addin.macroenabled.12",
- xlc = "application/vnd.ms-excel",
- xlf = "application/x-xliff+xml",
- xlm = "application/vnd.ms-excel",
- xls = "application/vnd.ms-excel",
- xlsb = "application/vnd.ms-excel.sheet.binary.macroenabled.12",
- xlsm = "application/vnd.ms-excel.sheet.macroenabled.12",
- xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
- xlt = "application/vnd.ms-excel",
- xltm = "application/vnd.ms-excel.template.macroenabled.12",
- xltx = "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
- xlw = "application/vnd.ms-excel",
+ xif = "image/xiff",
+ xla = "application/ms-excel",
+ xlam = "application/ms-excel.addin.macroenabled.12",
+ xlc = "application/ms-excel",
+ xlf = "application/xliff+xml",
+ xlm = "application/ms-excel",
+ xls = "application/ms-excel",
+ xlsb = "application/ms-excel.sheet.binary.macroenabled.12",
+ xlsm = "application/ms-excel.sheet.macroenabled.12",
+ xlsx = "application/openxmlformats-officedocument.spreadsheetml.sheet",
+ xlt = "application/ms-excel",
+ xltm = "application/ms-excel.template.macroenabled.12",
+ xltx = "application/openxmlformats-officedocument.spreadsheetml.template",
+ xlw = "application/ms-excel",
xm = "audio/xm",
xml = "application/xml",
- xo = "application/vnd.olpc-sugar",
+ xo = "application/olpc-sugar",
xop = "application/xop+xml",
- xpak = "application/vnd.gentoo.xpak",
- xpi = "application/x-xpinstall",
+ xpak = "application/gentoo.xpak",
+ xpi = "application/xpinstall",
xpl = "application/xproc+xml",
- xpm = "image/x-xpixmap",
- xpr = "application/vnd.is-xpr",
- xps = "application/vnd.ms-xpsdocument",
- xpw = "application/vnd.intercon.formnet",
- xpx = "application/vnd.intercon.formnet",
+ xpm = "image/xpixmap",
+ xpr = "application/is-xpr",
+ xps = "application/ms-xpsdocument",
+ xpw = "application/intercon.formnet",
+ xpx = "application/intercon.formnet",
xsl = "application/xml",
xslt = "application/xslt+xml",
- xsm = "application/vnd.syncml+xml",
+ xsm = "application/syncml+xml",
xspf = "application/xspf+xml",
- xul = "application/vnd.mozilla.xul+xml",
+ xul = "application/mozilla.xul+xml",
xvm = "application/xv+xml",
xvml = "application/xv+xml",
- xwd = "image/x-xwindowdump",
- xyz = "chemical/x-xyz",
- xz = "application/x-xz",
+ xwd = "image/xwindowdump",
+ xyz = "chemical/xyz",
+ xz = "application/xz",
yaml = "text/yaml",
yang = "application/yang",
yin = "application/yin+xml",
yml = "text/yaml",
- z1 = "application/x-zmachine",
- z2 = "application/x-zmachine",
- z3 = "application/x-zmachine",
- z4 = "application/x-zmachine",
- z5 = "application/x-zmachine",
- z6 = "application/x-zmachine",
- z7 = "application/x-zmachine",
- z8 = "application/x-zmachine",
- zaz = "application/vnd.zzazz.deck+xml",
+ z1 = "application/zmachine",
+ z2 = "application/zmachine",
+ z3 = "application/zmachine",
+ z4 = "application/zmachine",
+ z5 = "application/zmachine",
+ z6 = "application/zmachine",
+ z7 = "application/zmachine",
+ z8 = "application/zmachine",
+ zaz = "application/zzazz.deck+xml",
zip = "application/zip",
- zir = "application/vnd.zul",
- zirz = "application/vnd.zul",
- zmm = "application/vnd.handheld-entertainment+xml",
+ zir = "application/zul",
+ zirz = "application/zul",
+ zmm = "application/handheld-entertainment+xml",
zsh = "text/shellscript",
}
@@ -1047,16 +1059,16 @@ function M:setup(opts)
self.fallback_file1 = opts.fallback_file1
end
-function M:fetch()
+function M:fetch(job)
local opts = options()
local merged_files = ya.dict_merge(FILES, opts.with_files or {})
local merged_exts = ya.dict_merge(EXTS, opts.with_exts or {})
local updates, unknown = {}, {}
- for _, file in ipairs(self.files) do
+ for _, file in ipairs(job.files) do
local mime
if file.cha.len == 0 then
- mime = "inode/x-empty"
+ mime = "inode/empty"
else
mime = merged_files[(file.url:name() or ""):lower()]
mime = mime or merged_exts[(file.url:ext() or ""):lower()]
@@ -1066,17 +1078,18 @@ function M:fetch()
updates[tostring(file.url)] = mime
elseif opts.fallback_file1 then
unknown[#unknown + 1] = file
+ else
+ updates[tostring(file.url)] = "application/octet-stream"
end
end
if next(updates) then
ya.manager_emit("update_mimes", { updates = updates })
- ya.manager_emit("update_mimetype", { updates = updates }) -- TODO: remove this
end
if #unknown > 0 then
- self.files = unknown
- return require("mime").fetch(self)
+ job.files = unknown
+ return require("mime"):fetch(job)
end
return 1
diff --git a/dot_config/yazi/plugins/starship.yazi/README.md b/dot_config/yazi/plugins/starship.yazi/README.md
index a6fcab4..9c9af39 100644
--- a/dot_config/yazi/plugins/starship.yazi/README.md
+++ b/dot_config/yazi/plugins/starship.yazi/README.md
@@ -50,21 +50,21 @@ If you use a `starship` theme with a background colour, it might look a bit to c
```lua
local old_build = Tab.build
+
Tab.build = function(self, ...)
local bar = function(c, x, y)
if x <= 0 or x == self._area.w - 1 then
- return ui.Bar(ui.Rect.default, ui.Bar.TOP)
+ return ui.Bar(ui.Bar.TOP):area(ui.Rect.default)
end
- return ui.Bar(
- ui.Rect({
+ return ui.Bar(ui.Bar.TOP)
+ :area(ui.Rect({
x = x,
y = math.max(0, y),
w = ya.clamp(0, self._area.w - x, 1),
h = math.min(1, self._area.h),
- }),
- ui.Bar.TOP
- ):symbol(c)
+ }))
+ :symbol(c)
end
local c = self._chunks
@@ -76,15 +76,14 @@ Tab.build = function(self, ...)
local style = THEME.manager.border_style
self._base = ya.list_merge(self._base or {}, {
- -- Enable for full border
- --[[ ui.Border(self._area, ui.Border.ALL):type(ui.Border.ROUNDED):style(style), ]]
- ui.Bar(self._chunks[1], ui.Bar.RIGHT):style(style),
- ui.Bar(self._chunks[3], ui.Bar.LEFT):style(style),
+ ui.Border(ui.Border.ALL):area(self._area):type(ui.Border.ROUNDED):style(style),
+ ui.Bar(ui.Bar.RIGHT):area(self._chunks[1]):style(style),
+ ui.Bar(ui.Bar.LEFT):area(self._chunks[1]):style(style),
bar("┬", c[1].right - 1, c[1].y),
bar("┴", c[1].right - 1, c[1].bottom - 1),
bar("┬", c[2].right, c[2].y),
- bar("┴", c[2].right, c[1].bottom - 1),
+ bar("┴", c[2].right, c[2].bottom - 1),
})
old_build(self, ...)
diff --git a/dot_config/yazi/plugins/starship.yazi/init.lua b/dot_config/yazi/plugins/starship.yazi/init.lua
index b8672c5..292e75e 100644
--- a/dot_config/yazi/plugins/starship.yazi/init.lua
+++ b/dot_config/yazi/plugins/starship.yazi/init.lua
@@ -61,7 +61,12 @@ return {
ps.sub("tab", callback)
end,
- entry = function(_, args)
+ entry = function(_, job_or_args)
+ -- yazi 2024-11-29 changed the way arguments are passed to the plugin
+ -- entry point. They were moved inside {args = {...}}. If the user is using
+ -- a version before this change, they can use the old implementation.
+ -- https://github.com/sxyazi/yazi/pull/1966
+ local args = job_or_args.args or job_or_args
local command = Command("starship"):arg("prompt"):cwd(args[1]):env("STARSHIP_SHELL", "")
-- Point to custom starship config
diff --git a/dot_config/zellij/config.kdl b/dot_config/zellij/config.kdl
index 99bfe96..4af0a70 100644
--- a/dot_config/zellij/config.kdl
+++ b/dot_config/zellij/config.kdl
@@ -1,14 +1,10 @@
-// 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; }
- }
+ normal { }
locked {
- bind "Ctrl g" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt g" { SwitchToMode "Normal"; }
}
resize {
- bind "Ctrl n" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt n" { SwitchToMode "Normal"; }
bind "h" "Left" { Resize "Increase Left"; }
bind "j" "Down" { Resize "Increase Down"; }
bind "k" "Up" { Resize "Increase Up"; }
@@ -21,7 +17,7 @@ keybinds {
bind "-" { Resize "Decrease"; }
}
pane {
- bind "Ctrl p" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt p" { SwitchToMode "Normal"; }
bind "h" "Left" { MoveFocus "Left"; }
bind "l" "Right" { MoveFocus "Right"; }
bind "j" "Down" { MoveFocus "Down"; }
@@ -38,7 +34,7 @@ keybinds {
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
}
move {
- bind "Ctrl h" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt h" { SwitchToMode "Normal"; }
bind "n" "Tab" { MovePane; }
bind "p" { MovePaneBackwards; }
bind "h" "Left" { MovePane "Left"; }
@@ -47,7 +43,7 @@ keybinds {
bind "l" "Right" { MovePane "Right"; }
}
tab {
- bind "Ctrl t" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt t" { SwitchToMode "Normal"; }
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
bind "l" "Right" "Down" "j" { GoToNextTab; }
@@ -69,26 +65,24 @@ keybinds {
bind "Tab" { ToggleTab; }
}
scroll {
- bind "Ctrl s" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt 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 Alt 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 "Ctrl Alt s" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt 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 "Ctrl Alt f" "PageDown" "Right" "l" { PageScrollDown; }
+ bind "Ctrl Alt b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "n" { Search "down"; }
@@ -98,20 +92,20 @@ keybinds {
bind "o" { SearchToggleOption "WholeWord"; }
}
entersearch {
- bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
+ bind "Ctrl Alt c" "Esc" { SwitchToMode "Scroll"; }
bind "Enter" { SwitchToMode "Search"; }
}
renametab {
- bind "Ctrl c" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
}
renamepane {
- bind "Ctrl c" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
}
session {
- bind "Ctrl o" { SwitchToMode "Normal"; }
- bind "Ctrl s" { SwitchToMode "Scroll"; }
+ bind "Ctrl Alt o" { SwitchToMode "Normal"; }
+ bind "Ctrl Alt s" { SwitchToMode "Scroll"; }
bind "d" { Detach; }
bind "w" {
LaunchOrFocusPlugin "zellij:session-manager" {
@@ -123,7 +117,7 @@ keybinds {
}
tmux {
bind "[" { SwitchToMode "Scroll"; }
- bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
+ bind "Ctrl Alt b" { Write 2; SwitchToMode "Normal"; }
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
@@ -145,41 +139,41 @@ keybinds {
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; }
+ bind "Ctrl Alt g" { SwitchToMode "Locked"; }
+ bind "Ctrl Alt q" { Quit; }
+ bind "Ctrl Alt n" { NewPane; }
+ bind "Ctrl Alt h" "Ctrl Alt Left" { MoveFocusOrTab "Left"; }
+ bind "Ctrl Alt l" "Ctrl Alt Right" { MoveFocusOrTab "Right"; }
+ bind "Ctrl Alt j" "Ctrl Alt Down" { MoveFocus "Down"; }
+ bind "Ctrl Alt k" "Ctrl Alt Up" { MoveFocus "Up"; }
+ bind "Ctrl Alt =" "Ctrl Alt +" { Resize "Increase"; }
+ bind "Ctrl Alt -" { Resize "Decrease"; }
+ bind "Ctrl Alt [" { PreviousSwapLayout; }
+ bind "Ctrl Alt ]" { NextSwapLayout; }
}
shared_except "normal" "locked" {
bind "Enter" "Esc" { SwitchToMode "Normal"; }
}
shared_except "pane" "locked" {
- bind "Ctrl p" { SwitchToMode "Pane"; }
+ bind "Ctrl Alt p" { SwitchToMode "Pane"; }
}
shared_except "resize" "locked" {
- bind "Ctrl n" { SwitchToMode "Resize"; }
+ bind "Ctrl Alt n" { SwitchToMode "Resize"; }
}
shared_except "scroll" "locked" {
- bind "Ctrl s" { SwitchToMode "Scroll"; }
+ bind "Ctrl Alt s" { SwitchToMode "Scroll"; }
}
shared_except "session" "locked" {
- bind "Ctrl o" { SwitchToMode "Session"; }
+ bind "Ctrl Alt o" { SwitchToMode "Session"; }
}
shared_except "tab" "locked" {
- bind "Ctrl t" { SwitchToMode "Tab"; }
+ bind "Ctrl Alt t" { SwitchToMode "Tab"; }
}
shared_except "move" "locked" {
- bind "Ctrl h" { SwitchToMode "Move"; }
+ bind "Ctrl Alt h" { SwitchToMode "Move"; }
}
shared_except "tmux" "locked" {
- bind "Ctrl b" { SwitchToMode "Tmux"; }
+ bind "Ctrl Alt b" { SwitchToMode "Tmux"; }
}
}
@@ -191,174 +185,5 @@ plugins {
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 true
-
-// 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 {
- dracula {
- fg 248 248 242
- bg 40 42 54
- red 255 85 85
- green 80 250 123
- yellow 241 250 140
- blue 98 114 164
- magenta 255 121 198
- orange 255 184 108
- cyan 139 233 253
- black 0 0 0
- white 255 255 255
- }
- tokyo-night {
- fg 169 177 214
- bg 26 27 38
- black 56 62 90
- red 249 51 87
- green 158 206 106
- yellow 224 175 104
- blue 122 162 247
- magenta 187 154 247
- cyan 42 195 222
- white 192 202 245
- orange 255 158 100
- }
-}
-
-// Choose the theme that is specified in the themes section.
-// Default: default
-//
theme "tokyo-night"
-
-// 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