diff --git a/flake.nix b/flake.nix
index e8c28cf..267ce74 100644
--- a/flake.nix
+++ b/flake.nix
@@ -35,7 +35,7 @@
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
};
modules = [
- ./nixos/worklaptop/configuration.nix
+ ./nixos/worklaptop.nix
];
};
homeserver = nixpkgs.lib.nixosSystem {
@@ -44,7 +44,7 @@
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
};
modules = [
- ./nixos/homeserver/configuration.nix
+ ./nixos/homeserver.nix
];
};
};
diff --git a/nixos/core.nix b/nixos/core.nix
new file mode 100644
index 0000000..14d143e
--- /dev/null
+++ b/nixos/core.nix
@@ -0,0 +1,13 @@
+{
+ inputs,
+ outputs,
+ lib,
+ config,
+ pkgs,
+ unstablePkgs,
+ ...
+}: {
+ imports = [
+ ./core/programs.nix
+ ];
+}
diff --git a/nixos/core/programs.nix b/nixos/core/programs.nix
new file mode 100644
index 0000000..5866329
--- /dev/null
+++ b/nixos/core/programs.nix
@@ -0,0 +1,12 @@
+{
+ inputs,
+ lib,
+ config,
+ pkgs,
+ unstablePkgs,
+ ...
+}: {
+ imports = [
+ ./programs/yazi.nix
+ ];
+}
diff --git a/nixos/core/programs/yazi.nix b/nixos/core/programs/yazi.nix
new file mode 100644
index 0000000..eed4952
--- /dev/null
+++ b/nixos/core/programs/yazi.nix
@@ -0,0 +1,26 @@
+{
+ inputs,
+ lib,
+ config,
+ pkgs,
+ unstablePkgs,
+ ...
+}: {
+ programs.yazi = {
+ enable = true;
+ initLua = ./yazi/init.lua;
+ plugins = {
+ sudo = unstablePkgs.yaziPlugins.sudo;
+ chmod = unstablePkgs.yaziPlugins.chmod;
+ mime-ext = unstablePkgs.yaziPlugins.mime-ext;
+ git = unstablePkgs.yaziPlugins.git;
+ ouch = unstablePkgs.yaziPlugins.ouch;
+ starship = unstablePkgs.yaziPlugins.starship;
+ full-border = unstablePkgs.yaziPlugins.full-border;
+ glow = unstablePkgs.yaziPlugins.glow;
+ };
+ settings = {
+ keymap = ./yazi/keymap.toml;
+ };
+ };
+}
diff --git a/nixos/core/programs/yazi/flavors/tokyo-night.yazi/LICENSE b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/LICENSE
new file mode 100644
index 0000000..9a5124e
--- /dev/null
+++ b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 - sxyazi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme
new file mode 100644
index 0000000..44b4479
--- /dev/null
+++ b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Himanshu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/flavors/tokyo-night.yazi/README.md b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/README.md
new file mode 100644
index 0000000..ec2a2e6
--- /dev/null
+++ b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/README.md
@@ -0,0 +1,37 @@
+
+

+
+
+
+ Tokyo Night Flavor for Yazi
+
+
+## 👀 Preview
+
+
+
+## 🎨 Installation
+
+```bash
+# Linux/macOS
+git clone https://github.com/BennyOe/tokyo-night.yazi.git ~/.config/yazi/flavors/tokyo-night.yazi
+
+# Windows
+git clone https://github.com/BennyOe/tokyo-night.yazi.git %AppData%\yazi\config\flavors\tokyo-night.yazi
+```
+
+## ⚙️ Usage
+
+Add the these lines to your `theme.toml` configuration file to use it:
+
+
+```toml
+[flavor]
+use = "tokyo-night"
+```
+
+## 📜 License
+
+The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed.
+
+Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details.
diff --git a/nixos/core/programs/yazi/flavors/tokyo-night.yazi/flavor.toml b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/flavor.toml
new file mode 100644
index 0000000..c6d3303
--- /dev/null
+++ b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/flavor.toml
@@ -0,0 +1,167 @@
+# : Manager {{{
+
+[manager]
+cwd = { fg = "#7aa2f7" } # Blue
+
+# Hovered
+hovered = { reversed = true }
+preview_hovered = { underline = true }
+
+# Find
+find_keyword = { fg = "#f7768e", bold = true, italic = true, underline = true } # Red
+find_position = { fg = "#bb9af7", bg = "reset", bold = true, italic = true } # Magenta
+
+# Marker
+marker_copied = { fg = "#9ece6a", bg = "#9ece6a" } # Green
+marker_cut = { fg = "#e0af68", bg = "#f7768e" } # Red
+marker_marked = { fg = "#7aa2f7", bg = "#7dcfff" } # Cyan
+marker_selected = { fg = "#e0af68", bg = "#e0af68" } # Yellow
+
+# Tab
+tab_active = { bg = "#282C34", fg = "#7aa2f7" } # Darkened background, Blue text
+tab_inactive = {}
+tab_width = 1
+
+# Count
+count_copied = { fg = "#414868", bg = "#9ece6a" } # Darkened black on Green
+count_cut = { fg = "#414868", bg = "#e0af68" } # Darkened black on Yellow
+count_selected = { fg = "#414868", bg = "#7aa2f7" } # Darkened black on Blue
+
+# Border
+border_symbol = "│"
+border_style = { fg = "#414868" } # Darkened black
+
+# : }}}
+
+
+# : Status {{{
+
+[status]
+separator_open = ""
+separator_close = ""
+separator_style = { fg = "#7aa2f7", bg = "#414868" } # Blue on Darkened black
+
+# Mode
+mode_normal = { fg = "#414868", bg = "#7aa2f7", bold = true } # Darkened black on Blue
+mode_select = { fg = "#414868", bg = "#9ece6a", bold = true } # Darkened black on Green
+mode_unset = { fg = "#414868", bg = "#bb9af7", bold = true } # Darkened black on Magenta
+
+# Progress
+progress_label = { fg = "#a9b1d6", bold = true } # White
+progress_normal = { fg = "#7aa2f7", bg = "#414868" } # Blue on Darkened black
+progress_error = { fg = "#f7768e", bg = "#414868" } # Red on Darkened black
+
+# Permissions
+permissions_t = { fg = "#7aa2f7" } # Blue
+permissions_r = { fg = "#9ece6a" } # Green
+permissions_w = { fg = "#e0af68" } # Yellow
+permissions_x = { fg = "#f7768e" } # Red
+permissions_s = { fg = "#bb9af7" } # Magenta
+
+# : }}}
+
+
+# : Select {{{
+
+[select]
+border = { fg = "#7aa2f7" } # Blue
+active = { fg = "#bb9af7", bold = true } # Magenta
+inactive = {}
+
+# : }}}
+
+
+# : Input {{{
+
+[input]
+border = { fg = "#7aa2f7" } # Blue
+title = {}
+value = {}
+selected = { reversed = true }
+
+# : }}}
+
+
+# : Completion {{{
+
+[completion]
+border = { fg = "#7aa2f7" } # Blue
+
+# : }}}
+
+
+# : Tasks {{{
+
+[tasks]
+border = { fg = "#7aa2f7" } # Blue
+title = {}
+hovered = { fg = "#bb9af7", underline = true } # Magenta
+
+# : }}}
+# : Which {{{
+
+[which]
+mask = { bg = "#414868" } # Darkened black
+cand = { fg = "#9ece6a" } # Green
+rest = { fg = "#a9b1d6" } # White
+desc = { fg = "#bb9af7" } # Magenta
+separator = " "
+separator_style = { fg = "#626880" } # Darkened gray
+
+# : }}}
+
+
+# : Help {{{
+
+[help]
+on = { fg = "#9ece6a" } # Green
+run = { fg = "#bb9af7" } # Magenta
+hovered = { reversed = true, bold = true }
+footer = { fg = "#a9b1d6", bg = "#c6d0f5" } # White on Light gray
+
+# : }}}
+
+
+# : Notify {{{
+
+[notify]
+title_info = { fg = "#9ece6a" } # Green
+title_warn = { fg = "#f7768e" } # Red
+title_error = { fg = "#e0af68" } # Yellow
+
+# : }}}
+
+
+# : File-specific styles {{{
+
+[filetype]
+
+rules = [
+ # Images
+ { mime = "image/*", fg = "#e0af68" }, # Yellow
+
+ # Media
+ { mime = "video/*", fg = "#f7768e" }, # Red
+ { mime = "audio/*", fg = "#f7768e" }, # Red
+
+ # Archives
+ { mime = "application/zip", fg = "#bb9af7" }, # Magenta
+ { mime = "application/x-tar", fg = "#bb9af7" }, # Magenta
+ { mime = "application/x-bzip*", fg = "#bb9af7" }, # Magenta
+ { mime = "application/x-bzip2", fg = "#bb9af7" }, # Magenta
+ { mime = "application/x-7z-compressed", fg = "#bb9af7" }, # Magenta
+ { mime = "application/x-rar", fg = "#bb9af7" }, # Magenta
+ { mime = "application/x-xz", fg = "#bb9af7" }, # Magenta
+
+ # Documents
+ { mime = "application/doc", fg = "#9ece6a" }, # Green
+ { mime = "application/pdf", fg = "#9ece6a" }, # Green
+ { mime = "application/rtf", fg = "#9ece6a" }, # Green
+ { mime = "application/vnd.*", fg = "#9ece6a" }, # Green
+
+ # Fallback
+ { name = "*", fg = "#c6d0f5" }, # Light gray
+ { name = "*/", fg = "#7aa2f7" } # Blue
+]
+
+# : }}}
diff --git a/nixos/core/programs/yazi/flavors/tokyo-night.yazi/preview.png b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/preview.png
new file mode 100644
index 0000000..75f2f4a
Binary files /dev/null and b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/preview.png differ
diff --git a/nixos/core/programs/yazi/flavors/tokyo-night.yazi/tmtheme.xml b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/tmtheme.xml
new file mode 100644
index 0000000..21d2163
--- /dev/null
+++ b/nixos/core/programs/yazi/flavors/tokyo-night.yazi/tmtheme.xml
@@ -0,0 +1,1329 @@
+
+
+
+
+ author
+ Kristi Russell (http://github.com/enkia)
+ colorSpaceName
+ sRGB
+ name
+ Enki-Tokyo-Night
+ semanticClass
+ enki.theme.tokyo
+ settings
+
+
+ settings
+
+ activeGuide
+ #363b54
+ background
+ #1d1f29
+ caret
+ #DBC08A
+ findHighlight
+ #ffa300
+ findHighlightForeground
+ #000000
+ foreground
+ #AFBAD4ff
+ guide
+ #4f4f5e40
+ gutterForeground
+ #3b415caa
+ inactiveSelection
+ #282833
+ invisibles
+ #4f4f5e
+ lineHighlight
+ #00000030
+ phantomCss
+ <![CDATA[ html { position: relative; } ]]>
+ popupCss
+ <![CDATA[ html { color: #B376B3; background-color: #2b2d3a; padding: 10px; } a { color: #6189BB; line-height: 1.2; text-decoration: none; } .error, .deleted { color: #50B4DC; } .success, .inserted { color: #9DBA72; } .warning, .modified { color: #ffa300; } ]]>
+ selection
+ #9D599D40
+ selectionBorder
+ #9D599D
+ shadow
+ #00000010
+ stackGuide
+ #4f4f5e60
+ tagsOptions
+ underline
+
+
+
+ name
+ Italics - Comments, Storage, Keyword Flow, Vue attributes, Decorators
+ scope
+ comment, meta.var.expr storage.type, keyword.control.flow, meta.directive.vue punctuation.separator.key-value.html, meta.directive.vue entity.other.attribute-name.html, tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js, storage.modifier
+ settings
+
+ fontStyle
+ italic
+
+
+
+ name
+ Comment
+ scope
+ comment, comment.block.documentation, punctuation.definition.comment
+ settings
+
+ foreground
+ #444b6a
+
+
+
+ name
+ Comment Doc
+ scope
+ comment.block.documentation variable, comment.block.documentation storage, comment.block.documentation punctuation, comment.block.documentation keyword, comment.block.documentation support, comment.block.documentation markup, comment.block.documentation markup.inline.raw.string.markdown, keyword.other.phpdoc.php
+ settings
+
+ foreground
+ #7982a9
+
+
+
+ name
+ Number, Boolean, Undefined, Null
+ scope
+ variable.other.constant, punctuation.definition.constant, constant.language, constant.numeric, support.constant
+ settings
+
+ foreground
+ #ff9e64
+
+
+
+ name
+ String, Symbols, Markup Heading
+ scope
+ string, constant.other.symbol, constant.other.key, markup.heading, meta.attribute-selector
+ settings
+
+ fontStyle
+
+ foreground
+ #9ece6a
+
+
+
+ name
+ Colors
+ scope
+ constant.other.color, constant.other.color.rgb-value.hex punctuation.definition.constant
+ settings
+
+ foreground
+ #9aa5ce
+
+
+
+ name
+ Invalid
+ scope
+ invalid, invalid.illegal
+ settings
+
+ foreground
+ #ff5370
+
+
+
+ name
+ Invalid deprecated
+ scope
+ invalid.deprecated
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Storage Type
+ scope
+ storage.type
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Storage - modifier, var, const, let
+ scope
+ meta.var.expr storage.type, storage.modifier
+ settings
+
+ foreground
+ #9d7cd8
+
+
+
+ name
+ Interpolation
+ scope
+ punctuation.definition.template-expression, punctuation.section.embedded
+ settings
+
+ foreground
+ #7dcfff
+
+
+
+ name
+ Spread
+ scope
+ keyword.operator.spread, keyword.operator.rest
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #f7768e
+
+
+
+ name
+ Operator, Misc
+ scope
+ keyword.operator, keyword.control.as, keyword.other, keyword.operator.bitwise.shift, punctuation, punctuation.definition.constant.markdown, punctuation.definition.string, punctuation.support.type.property-name, text.html.vue-html meta.tag, punctuation.definition.keyword, punctuation.terminator.rule, punctuation.definition.entity, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, keyword.other.template, keyword.other.substitution, entity.name.operator, text.html.vue meta.tag.block.any.html, text.html.vue meta.tag.inline.any.html, text.html.vue meta.tag.other.html, text.html.twig meta.tag.inline.any.html, text.html.twig meta.tag.block.any.html, text.html.twig meta.tag.structure.any.html, text.html.twig meta.tag.any.html
+ settings
+
+ foreground
+ #89ddff
+
+
+
+ name
+ Import, Export, From, Default
+ scope
+ keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.default, meta.import keyword.other
+ settings
+
+ foreground
+ #7dcfff
+
+
+
+ name
+ Keyword
+ scope
+ keyword, keyword.control, keyword.other.important
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Keyword SQL
+ scope
+ keyword.other.DML
+ settings
+
+ foreground
+ #7dcfff
+
+
+
+ name
+ Keyword Operator Logical, Arrow, Ternary, Comparison
+ scope
+ keyword.operator.logical, storage.type.function, keyword.operator.bitwise, keyword.operator.ternary, keyword.operator.comparison, keyword.operator.relational, keyword.operator.or.regexp
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Tag
+ scope
+ entity.name.tag, entity.name.tag support.class.component, meta.tag
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ Tag Punctuation
+ scope
+ punctuation.definition.tag, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html
+ settings
+
+ foreground
+ #ba3c97
+
+
+
+ name
+ Blade
+ scope
+ keyword.blade, entity.name.function.blade
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ PHP - Embedded Tag
+ scope
+ punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ Smarty - Twig tag - Blade
+ scope
+ punctuation.definition.variable.smarty, punctuation.section.embedded.begin.smarty, punctuation.section.embedded.end.smarty, meta.tag.template.value.twig, punctuation.section.tag.twig, meta.tag.expression.twig, punctuation.definition.tag.expression.twig, punctuation.definition.tag.output.twig, variable.parameter.smarty
+ settings
+
+ foreground
+ #7DCFFF
+
+
+
+ name
+ Smarty - Twig variable - function
+ scope
+ variable.other.property.twig, support.function.twig, meta.function-call.twig, keyword.control.twig, keyword.control.smarty, keyword.operator.other.twig, keyword.operator.comparison.twig, support.function.functions.twig, support.function.functions.twig, keyword.operator.assignment.twig, support.function.filters.twig, support.function.built-in.smarty, keyword.operator.smarty, text.blade text.html.blade custom.compiler.blade.php punctuation.section.embedded.php entity.name.tag.block.any.html, text.blade text.html.blade custom.compiler.blade.php punctuation.section.embedded.php constant.other.inline-data.html, text.blade text.html.blade custom.compiler.blade.php support.function constant.other.inline-data.html
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ Globals - PHP Constants etc
+ scope
+ constant.other.php, variable.other.global.safer, variable.other.global.safer punctuation.definition.variable, variable.other.global, variable.other.global punctuation.definition.variable, constant.other
+ settings
+
+ foreground
+ #e0af68
+
+
+
+ name
+ Variables
+ scope
+ variable, support.variable, string constant.other.placeholder
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Object Variable
+ scope
+ variable.other.object, support.module.node
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Object Key
+ scope
+ meta.object-literal.key, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js, string.alias.graphql, string.unquoted.graphql, string.unquoted.alias.graphql, meta.field.declaration.ts variable.object.property
+ settings
+
+ foreground
+ #73daca
+
+
+
+ name
+ Object Property
+ scope
+ variable.other.property, support.variable.property, support.variable.property.dom, meta.function-call variable.other.object.property, variable.language.prototype, meta.property.object, variable.other.member
+ settings
+
+ foreground
+ #7dcfff
+
+
+
+ name
+ Object Property
+ scope
+ variable.other.object.property
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Object Literal Member lvl 3 (Vue Prop Validation)
+ scope
+ meta.objectliteral meta.object.member meta.objectliteral meta.object.member meta.objectliteral meta.object.member meta.object-literal.key
+ settings
+
+ foreground
+ #41a6b5
+
+
+
+ name
+ C-related Block Level Variables
+ scope
+ source.cpp meta.block variable.other
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ Other Variable
+ scope
+ support.other.variable
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ Methods
+ scope
+ meta.class-method.js entity.name.function.js, entity.name.method.js, variable.function.constructor, keyword.other.special-method, storage.type.cs
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ Function Definition
+ scope
+ entity.name.function, meta.function-call, meta.function-call entity.name.function, variable.function, meta.definition.method entity.name.function, meta.object-literal entity.name.function
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ Function Argument
+ scope
+ variable.parameter.function.language.special, variable.parameter, meta.function.parameters punctuation.definition.variable, meta.function.parameter variable
+ settings
+
+ foreground
+ #e0af68
+
+
+
+ name
+ Constant, Tag Attribute
+ scope
+ keyword.other.type.php, storage.type.php, constant.character, constant.escape, keyword.other.unit
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Variable Definition
+ scope
+ meta.definition.variable variable.other.constant, meta.definition.variable variable.other.readwrite, variable.other.declaration
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Inherited Class
+ scope
+ entity.other.inherited-class
+ settings
+
+ fontStyle
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Class, Support, DOM, etc
+ scope
+ support.class, support.type, variable.other.readwrite.alias, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, support.type.sys-types, support.variable.dom, support.constant.math, support.type.object.module, support.constant.json, entity.name.namespace, meta.import.qualifier, entity.name.class
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ Class Name
+ scope
+ entity.name
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Support Function
+ scope
+ support.function
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ CSS Class and Support
+ scope
+ source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name, support.type.property-name.css, support.type.vendored.property-name, support.type.map.key
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ CSS Font
+ scope
+ support.constant.font-name, meta.definition.variable
+ settings
+
+ foreground
+ #9ece6a
+
+
+
+ name
+ CSS Class
+ scope
+ entity.other.attribute-name.class, meta.at-rule.mixin.scss entity.name.function.scss
+ settings
+
+ foreground
+ #9ece6a
+
+
+
+ name
+ CSS ID
+ scope
+ entity.other.attribute-name.id
+ settings
+
+ foreground
+ #fc7b7b
+
+
+
+ name
+ CSS Tag
+ scope
+ entity.name.tag.css, entity.name.tag.reference, entity.name.tag.scss
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ CSS Tag Reference
+ scope
+ entity.name.tag.reference
+ settings
+
+ foreground
+ #e0af68
+
+
+
+ name
+ CSS Property Separator
+ scope
+ meta.property-list punctuation.separator.key-value
+ settings
+
+ foreground
+ #9abdf5
+
+
+
+ name
+ CSS Punctuation
+ scope
+ meta.property-list, punctuation.definition.entity.css
+ settings
+
+ foreground
+ #e0af68
+
+
+
+ name
+ SCSS @
+ scope
+ meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.include entity.name.function.scss, meta.at-rule.include keyword.control.at-rule.include
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ SCSS Mixins, Extends, Include Keyword
+ scope
+ keyword.control.at-rule.include punctuation.definition.keyword, keyword.control.at-rule.mixin punctuation.definition.keyword, meta.at-rule.include keyword.control.at-rule.include, keyword.control.at-rule.extend punctuation.definition.keyword, meta.at-rule.extend keyword.control.at-rule.extend, entity.other.attribute-name.placeholder.css punctuation.definition.entity.css, meta.at-rule.media keyword.control.at-rule.media, meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.function keyword.control.at-rule.function, keyword.control punctuation.definition.keyword, meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss, meta.at-rule.import.scss keyword.control.at-rule.import.scss
+ settings
+
+ foreground
+ #9d7cd8
+
+
+
+ name
+ SCSS Include Mixin Argument
+ scope
+ meta.property-list meta.at-rule.include
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ CSS value
+ scope
+ support.constant.property-value
+ settings
+
+ foreground
+ #ff9e64
+
+
+
+ name
+ Sub-methods
+ scope
+ entity.name.module.js, variable.import.parameter.js, variable.other.class.js
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Language methods
+ scope
+ variable.language
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ Variable punctuation
+ scope
+ variable.other punctuation.definition.variable
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Keyword this with Punctuation, ES7 Bind Operator
+ scope
+ source.js constant.other.object.key.js string.unquoted.label.js, variable.language.this punctuation.definition.variable, keyword.other.this
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ HTML Attributes
+ scope
+ entity.other.attribute-name, text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, text.blade entity.other.attribute-name.class, text.html.smarty entity.other.attribute-name.class
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Vue Template attributes
+ scope
+ meta.directive.vue punctuation.separator.key-value.html, meta.directive.vue entity.other.attribute-name.html
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Vue Template attribute separator
+ scope
+ meta.directive.vue punctuation.separator.key-value.html
+ settings
+
+ foreground
+ #89ddff
+
+
+
+ name
+ CSS IDs
+ scope
+ source.sass keyword.control
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ CSS psuedo selectors
+ scope
+ entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element, entity.other.attribute-name.placeholder, meta.property-list meta.property-value
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Inserted
+ scope
+ markup.inserted
+ settings
+
+ foreground
+ #449dab
+
+
+
+ name
+ Deleted
+ scope
+ markup.deleted
+ settings
+
+ foreground
+ #914c54
+
+
+
+ name
+ Changed
+ scope
+ markup.changed
+ settings
+
+ foreground
+ #6183bb
+
+
+
+ name
+ Regular Expressions
+ scope
+ string.regexp
+ settings
+
+ foreground
+ #b4f9f8
+
+
+
+ name
+ Regular Expressions - Punctuation
+ scope
+ punctuation.definition.group
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ Regular Expressions - Character Class
+ scope
+ constant.other.character-class.regexp
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Regular Expressions - Character Class Set
+ scope
+ constant.other.character-class.set.regexp, punctuation.definition.character-class.regexp
+ settings
+
+ foreground
+ #e0af68
+
+
+
+ name
+ Regular Expressions - Quantifier
+ scope
+ keyword.operator.quantifier.regexp
+ settings
+
+ foreground
+ #89ddff
+
+
+
+ name
+ Regular Expressions - Backslash
+ scope
+ constant.character.escape.backslash
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ Escape Characters
+ scope
+ constant.character.escape
+ settings
+
+ foreground
+ #89ddff
+
+
+
+ name
+ Decorators
+ scope
+ tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ CSS Units
+ scope
+ keyword.other.unit
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ JSON Key - Level 0
+ scope
+ source.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ name
+ JSON Key - Level 1
+ scope
+ source.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ JSON Key - Level 2
+ scope
+ source.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #7dcfff
+
+
+
+ name
+ JSON Key - Level 3
+ scope
+ source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ JSON Key - Level 4
+ scope
+ source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #e0af68
+
+
+
+ name
+ JSON Key - Level 5
+ scope
+ source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ JSON Key - Level 6
+ scope
+ source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json
+ settings
+
+ foreground
+ #73daca
+
+
+
+ name
+ JSON Key - Level 7
+ scope
+ source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ JSON Key - Level 8
+ scope
+ source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json punctuation.definition.string.end.json
+ settings
+
+ foreground
+ #9ece6a
+
+
+
+ name
+ JSON Key - value
+ scope
+ source.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json
+ settings
+
+ foreground
+ #9ece6a
+
+
+
+ name
+ Plain Punctuation
+ scope
+ punctuation.definition.list_item.markdown
+ settings
+
+ foreground
+ #9abdf5
+
+
+
+ name
+ Block Punctuation
+ scope
+ meta.block, meta.brace, punctuation.definition.block, punctuation.definition.use, punctuation.definition.group.shell, punctuation.definition.class, punctuation.definition.begin.bracket, punctuation.definition.end.bracket, punctuation.definition.parameters, punctuation.definition.arguments, punctuation.definition.dictionary, punctuation.definition.array, punctuation.section
+ settings
+
+ foreground
+ #9abdf5
+
+
+
+ name
+ Markdown - Plain
+ scope
+ meta.jsx.children, meta.embedded.block
+ settings
+
+ foreground
+ #c0caf5
+
+
+
+ name
+ HTML text
+ scope
+ text.html
+ settings
+
+ foreground
+ #9aa5ce
+
+
+
+ name
+ Markdown - Markup Raw Inline
+ scope
+ text.html.markdown markup.inline.raw.markdown
+ settings
+
+ foreground
+ #bb9af7
+
+
+
+ name
+ Markdown - Markup Raw Inline Punctuation
+ scope
+ text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown
+ settings
+
+ foreground
+ #4E5579
+
+
+
+ name
+ Markdown - Heading 1
+ scope
+ heading.1.markdown entity.name, heading.1.markdown punctuation.definition.heading.markdown
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #89ddff
+
+
+
+ name
+ Markdown - Heading 2
+ scope
+ heading.2.markdown entity.name, heading.2.markdown punctuation.definition.heading.markdown
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #61bdf2
+
+
+
+ name
+ Markdown - Heading 3
+ scope
+ heading.3.markdown entity.name, heading.3.markdown punctuation.definition.heading.markdown
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #7aa2f7
+
+
+
+ name
+ Markdown - Heading 4
+ scope
+ heading.4.markdown entity.name, heading.4.markdown punctuation.definition.heading.markdown
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #6d91de
+
+
+
+ name
+ Markdown - Heading 5
+ scope
+ heading.5.markdown entity.name, heading.5.markdown punctuation.definition.heading.markdown
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #9aa5ce
+
+
+
+ name
+ Markdown - Heading 6
+ scope
+ heading.6.markdown entity.name, heading.6.markdown punctuation.definition.heading.markdown
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #747ca1
+
+
+
+ name
+ Markup - Italic
+ scope
+ markup.italic, markup.italic punctuation
+ settings
+
+ fontStyle
+ italic
+ foreground
+ #c0caf5
+
+
+
+ name
+ Markup - Bold
+ scope
+ markup.bold, markup.bold punctuation
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #c0caf5
+
+
+
+ name
+ Markup - Bold-Italic
+ scope
+ markup.bold markup.italic, markup.bold markup.italic punctuation
+ settings
+
+ fontStyle
+ bold italic
+ foreground
+ #c0caf5
+
+
+
+ name
+ Markup - Underline
+ scope
+ markup.underline, markup.underline punctuation
+ settings
+
+ fontStyle
+ underline
+
+
+
+ name
+ Markdown - Blockquote
+ scope
+ markup.quote punctuation.definition.blockquote.markdown
+ settings
+
+ foreground
+ #4e5579
+
+
+
+ name
+ Markup - Quote
+ scope
+ markup.quote
+ settings
+
+ fontStyle
+ italic
+
+
+
+ name
+ Markdown - Link
+ scope
+ string.other.link, markup.underline.link, constant.other.reference.link.markdown, string.other.link.description.title.markdown
+ settings
+
+ foreground
+ #73daca
+
+
+
+ name
+ Markdown - Fenced Code Block
+ scope
+ markup.fenced_code.block.markdown, markup.inline.raw.string.markdown, variable.language.fenced.markdown
+ settings
+
+ foreground
+ #89ddff
+
+
+
+ name
+ Markdown - Separator
+ scope
+ meta.separator
+ settings
+
+ fontStyle
+ bold
+ foreground
+ #444b6a
+
+
+
+ name
+ Markup - Table
+ scope
+ markup.table
+ settings
+
+ foreground
+ #c0cefc
+
+
+
+ name
+ Token - Info
+ scope
+ token.info-token
+ settings
+
+ foreground
+ #0db9d7
+
+
+
+ name
+ Token - Warn
+ scope
+ token.warn-token
+ settings
+
+ foreground
+ #ffdb69
+
+
+
+ name
+ Token - Error
+ scope
+ token.error-token
+ settings
+
+ foreground
+ #db4b4b
+
+
+
+ name
+ Token - Debug
+ scope
+ token.debug-token
+ settings
+
+ foreground
+ #b267e6
+
+
+
+ name
+ Apache Tag
+ scope
+ entity.tag.apacheconf
+ settings
+
+ foreground
+ #f7768e
+
+
+
+ name
+ Preprocessor
+ scope
+ meta.preprocessor
+ settings
+
+ foreground
+ #73daca
+
+
+
+ name
+ ENV value
+ scope
+ source.env
+ settings
+
+ foreground
+ #7aa2f7
+
+
+
+ uuid
+ 06f855e3-9fb7-4fb1-b790-aef06065f34e
+
+
diff --git a/nixos/core/programs/yazi/init.lua b/nixos/core/programs/yazi/init.lua
new file mode 100644
index 0000000..9e46b8a
--- /dev/null
+++ b/nixos/core/programs/yazi/init.lua
@@ -0,0 +1,3 @@
+require("starship"):setup()
+require("full-border"):setup()
+require("git"):setup()
diff --git a/nixos/core/programs/yazi/keymap.toml b/nixos/core/programs/yazi/keymap.toml
new file mode 100644
index 0000000..1408bbf
--- /dev/null
+++ b/nixos/core/programs/yazi/keymap.toml
@@ -0,0 +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 top", desc = "Move cursor to the top" },
+ { on = "G", run = "arrow bot", 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"
+desc = "Chmod on selected files"
+
+[[manager.prepend_keymap]]
+on = "T"
+run = "plugin --sync max-preview"
+desc = "Maximize or restore preview"
diff --git a/nixos/core/programs/yazi/package.toml b/nixos/core/programs/yazi/package.toml
new file mode 100644
index 0000000..78fbab6
--- /dev/null
+++ b/nixos/core/programs/yazi/package.toml
@@ -0,0 +1,42 @@
+[[plugin.deps]]
+use = "Reledia/glow"
+rev = "5ce76dc"
+hash = "52e5f5c602962e7cbf874da28f52ba45"
+
+[[plugin.deps]]
+use = "Reledia/hexyl"
+rev = "39d3d4e"
+hash = "dd624cbaff94af65f39fd86bc57b340"
+
+[[plugin.deps]]
+use = "Rolv-Apneseth/starship"
+rev = "f6939fb"
+hash = "8ae899541dc7accb680ee4fd382a09c"
+
+[[plugin.deps]]
+use = "yazi-rs/plugins:git"
+rev = "beb586a"
+hash = "771f18427fb75fb19990ce602bb322f4"
+
+[[plugin.deps]]
+use = "yazi-rs/plugins:full-border"
+rev = "beb586a"
+hash = "ae9e1d0c6bfd68cdebc98cc684c22b45"
+
+[[plugin.deps]]
+use = "yazi-rs/plugins:chmod"
+rev = "beb586a"
+hash = "f28138c2e11e87962b66d583fef724c3"
+
+[[plugin.deps]]
+use = "yazi-rs/plugins:max-preview"
+rev = "beb586a"
+hash = "15b2ff7f6563c14d5b2e93b3e9da35de"
+
+[[plugin.deps]]
+use = "yazi-rs/plugins:mime-ext"
+rev = "beb586a"
+hash = "b03f3d80d26b6d7bb490b1380e9cb754"
+
+[flavor]
+deps = []
diff --git a/nixos/core/programs/yazi/plugins/chmod.yazi/LICENSE b/nixos/core/programs/yazi/plugins/chmod.yazi/LICENSE
new file mode 100644
index 0000000..fb5b1d6
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/chmod.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 yazi-rs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/chmod.yazi/README.md b/nixos/core/programs/yazi/plugins/chmod.yazi/README.md
new file mode 100644
index 0000000..e8a6614
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/chmod.yazi/README.md
@@ -0,0 +1,28 @@
+# chmod.yazi
+
+Execute `chmod` on the selected files to change their mode. This plugin is only available on Unix platforms since it relies on [`chmod(2)`](https://man7.org/linux/man-pages/man2/chmod.2.html).
+
+https://github.com/yazi-rs/plugins/assets/17523360/7aa3abc2-d057-498c-8473-a6282c59c464
+
+## Installation
+
+```sh
+ya pack -a yazi-rs/plugins:chmod
+```
+
+## Usage
+
+Add this to your `~/.config/yazi/keymap.toml`:
+
+```toml
+[[manager.prepend_keymap]]
+on = [ "c", "m" ]
+run = "plugin chmod"
+desc = "Chmod on selected files"
+```
+
+Make sure the c => m key is not used elsewhere.
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/nixos/core/programs/yazi/plugins/chmod.yazi/main.lua b/nixos/core/programs/yazi/plugins/chmod.yazi/main.lua
new file mode 100644
index 0000000..d3a5a67
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/chmod.yazi/main.lua
@@ -0,0 +1,41 @@
+--- @since 25.2.7
+
+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
+end)
+
+return {
+ 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 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 on selected files failed, error: %s", status and status.code or err),
+ level = "error",
+ timeout = 5,
+ }
+ end
+ end,
+}
diff --git a/nixos/core/programs/yazi/plugins/full-border.yazi/LICENSE b/nixos/core/programs/yazi/plugins/full-border.yazi/LICENSE
new file mode 100644
index 0000000..fb5b1d6
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/full-border.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 yazi-rs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/full-border.yazi/README.md b/nixos/core/programs/yazi/plugins/full-border.yazi/README.md
new file mode 100644
index 0000000..6e78bd4
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/full-border.yazi/README.md
@@ -0,0 +1,32 @@
+# full-border.yazi
+
+Add a full border to Yazi to make it look fancier.
+
+
+
+## Installation
+
+```sh
+ya pack -a yazi-rs/plugins:full-border
+```
+
+## Usage
+
+Add this to your `init.lua` to enable the plugin:
+
+```lua
+require("full-border"):setup()
+```
+
+Or you can customize the border type:
+
+```lua
+require("full-border"):setup {
+ -- Available values: ui.Border.PLAIN, ui.Border.ROUNDED
+ type = ui.Border.ROUNDED,
+}
+```
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/nixos/core/programs/yazi/plugins/full-border.yazi/main.lua b/nixos/core/programs/yazi/plugins/full-border.yazi/main.lua
new file mode 100644
index 0000000..058371a
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/full-border.yazi/main.lua
@@ -0,0 +1,43 @@
+--- @since 25.2.7
+
+local function setup(_, opts)
+ local type = opts and opts.type or ui.Border.ROUNDED
+ 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.Bar.TOP)
+ end
+
+ 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
+ self._chunks = {
+ c[1]:pad(ui.Pad.y(1)),
+ c[2]:pad(ui.Pad(1, c[3].w > 0 and 0 or 1, 1, c[1].w > 0 and 0 or 1)),
+ c[3]:pad(ui.Pad.y(1)),
+ }
+
+ local style = THEME.manager.border_style
+ self._base = ya.list_merge(self._base or {}, {
+ 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),
+ bar("┬", c[2].right, c[2].y),
+ bar("┴", c[2].right, c[2].bottom - 1),
+ })
+
+ old_build(self, ...)
+ end
+end
+
+return { setup = setup }
diff --git a/nixos/core/programs/yazi/plugins/git.yazi/LICENSE b/nixos/core/programs/yazi/plugins/git.yazi/LICENSE
new file mode 100644
index 0000000..fb5b1d6
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/git.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 yazi-rs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/git.yazi/README.md b/nixos/core/programs/yazi/plugins/git.yazi/README.md
new file mode 100644
index 0000000..1054230
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/git.yazi/README.md
@@ -0,0 +1,78 @@
+# git.yazi
+
+> [!NOTE]
+> Yazi v25.2.7 or later is required for this plugin to work.
+
+Show the status of Git file changes as linemode in the file list.
+
+https://github.com/user-attachments/assets/34976be9-a871-4ffe-9d5a-c4cdd0bf4576
+
+## Installation
+
+```sh
+ya pack -a yazi-rs/plugins:git
+```
+
+## Setup
+
+Add the following to your `~/.config/yazi/init.lua`:
+
+```lua
+require("git"):setup()
+```
+
+And register it as fetchers in your `~/.config/yazi/yazi.toml`:
+
+```toml
+[[plugin.prepend_fetchers]]
+id = "git"
+name = "*"
+run = "git"
+
+[[plugin.prepend_fetchers]]
+id = "git"
+name = "*/"
+run = "git"
+```
+
+## Advanced
+
+You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with:
+
+- `THEME.git.modified`
+- `THEME.git.added`
+- `THEME.git.untracked`
+- `THEME.git.ignored`
+- `THEME.git.deleted`
+- `THEME.git.updated`
+
+For example:
+
+```lua
+-- ~/.config/yazi/init.lua
+THEME.git = THEME.git or {}
+THEME.git.modified = ui.Style():fg("blue")
+THEME.git.deleted = ui.Style():fg("red"):bold()
+```
+
+You can also customize the text of the status sign with:
+
+- `THEME.git.modified_sign`
+- `THEME.git.added_sign`
+- `THEME.git.untracked_sign`
+- `THEME.git.ignored_sign`
+- `THEME.git.deleted_sign`
+- `THEME.git.updated_sign`
+
+For example:
+
+```lua
+-- ~/.config/yazi/init.lua
+THEME.git = THEME.git or {}
+THEME.git.modified_sign = "M"
+THEME.git.deleted_sign = "D"
+```
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/nixos/core/programs/yazi/plugins/git.yazi/main.lua b/nixos/core/programs/yazi/plugins/git.yazi/main.lua
new file mode 100644
index 0000000..edd54fc
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/git.yazi/main.lua
@@ -0,0 +1,209 @@
+--- @since 25.2.7
+
+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
+}
+
+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
+end
+
+local function root(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
+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
+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()
+end)
+
+local remove = ya.sync(function(st, cwd)
+ 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
+
+ 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 = {}
+
+ 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",
+ }
+
+ 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 ""
+ elseif self._file:is_hovered() then
+ return ui.Line { " ", signs[change] }
+ else
+ return ui.Line { " ", ui.Span(signs[change]):style(styles[change]) }
+ end
+ end, opts.order)
+end
+
+local function fetch(_, job)
+ local cwd = job.files[1].url:parent()
+ local repo = root(cwd)
+ if not repo then
+ remove(tostring(cwd))
+ return true
+ end
+
+ local paths = {}
+ for _, f in ipairs(job.files) do
+ paths[#paths + 1] = tostring(f.url)
+ end
+
+ -- stylua: ignore
+ local output, err = Command("git")
+ :cwd(tostring(cwd))
+ :args({ "--no-optional-locks", "-c", "core.quotePath=", "status", "--porcelain", "-unormal", "--no-renames", "--ignored=matching" })
+ :args(paths)
+ :stdout(Command.PIPED)
+ :output()
+ if not output then
+ return true, Err("Cannot spawn `git` command, error: %s", err)
+ 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 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)
+
+ return false
+end
+
+return { setup = setup, fetch = fetch }
diff --git a/nixos/core/programs/yazi/plugins/glow.yazi/LICENSE b/nixos/core/programs/yazi/plugins/glow.yazi/LICENSE
new file mode 100644
index 0000000..de882e5
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/glow.yazi/LICENSE
@@ -0,0 +1,7 @@
+Copyright © 2024 Reledia
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/glow.yazi/README.md b/nixos/core/programs/yazi/plugins/glow.yazi/README.md
new file mode 100644
index 0000000..c67f7cc
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/glow.yazi/README.md
@@ -0,0 +1,30 @@
+# glow.yazi
+
+Plugin for [Yazi](https://github.com/sxyazi/yazi) to preview markdown files with [glow](https://github.com/charmbracelet/glow). To install, run the below mentioned command:
+
+```bash
+ya pack -a Reledia/glow
+```
+
+then include it in your `yazi.toml` to use:
+
+```toml
+[plugin]
+prepend_previewers = [
+ { name = "*.md", run = "glow" },
+]
+```
+
+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/nixos/core/programs/yazi/plugins/glow.yazi/main.lua b/nixos/core/programs/yazi/plugins/glow.yazi/main.lua
new file mode 100644
index 0000000..cc813e9
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/glow.yazi/main.lua
@@ -0,0 +1,76 @@
+local M = {}
+
+function M:peek(job)
+ -- Set a fixed width of 55 characters for the preview
+ local preview_width = 55
+
+ 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()
+
+ if not child then
+ return require("code").peek(job)
+ end
+
+ 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
+
+ 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(job)
+ local h = cx.active.current.hovered
+ if not h or h.url ~= job.file.url then
+ return
+ 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/nixos/core/programs/yazi/plugins/hexyl.yazi/LICENSE b/nixos/core/programs/yazi/plugins/hexyl.yazi/LICENSE
new file mode 100644
index 0000000..de882e5
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/hexyl.yazi/LICENSE
@@ -0,0 +1,7 @@
+Copyright © 2024 Reledia
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/hexyl.yazi/README.md b/nixos/core/programs/yazi/plugins/hexyl.yazi/README.md
new file mode 100644
index 0000000..029dde0
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/hexyl.yazi/README.md
@@ -0,0 +1,22 @@
+# hexyl.yazi
+
+Preview any file on [Yazi](https://github.com/sxyazi/yazi) using [hexyl](https://github.com/sharkdp/hexyl). To install, use the `ya pack` cli utility:
+
+```bash
+ya pack -a Reledia/hexyl
+```
+
+then include it in your `yazi.toml` to use:
+
+```toml
+[plugin]
+append_previewers = [
+ { name = "*", run = "hexyl" },
+]
+```
+
+Make sure you have [hexyl](https://github.com/sharkdp/hexyl) installed, and that can be found in `PATH`.
+
+## Preview
+
+
diff --git a/nixos/core/programs/yazi/plugins/hexyl.yazi/main.lua b/nixos/core/programs/yazi/plugins/hexyl.yazi/main.lua
new file mode 100644
index 0000000..6fe0990
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/hexyl.yazi/main.lua
@@ -0,0 +1,57 @@
+local M = {}
+
+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 = 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 > 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", { 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)
+ require("code").seek(job, units)
+end
+
+return M
diff --git a/nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE b/nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE
new file mode 100644
index 0000000..fb5b1d6
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 yazi-rs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/max-preview.yazi/README.md b/nixos/core/programs/yazi/plugins/max-preview.yazi/README.md
new file mode 100644
index 0000000..73b9058
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/max-preview.yazi/README.md
@@ -0,0 +1,47 @@
+# max-preview.yazi
+
+Maximize or restore the preview pane.
+
+https://github.com/yazi-rs/plugins/assets/17523360/8976308e-ebfe-4e9e-babe-153eb1f87d61
+
+## Installation
+
+```sh
+ya pack -a yazi-rs/plugins:max-preview
+```
+
+## Usage
+
+Add this to your `~/.config/yazi/keymap.toml`:
+
+```toml
+[[manager.prepend_keymap]]
+on = "T"
+run = "plugin max-preview"
+desc = "Maximize or restore preview"
+```
+
+Make sure the T key is not used elsewhere.
+
+## Tips
+
+This plugin only maximizes the "available preview area", without actually changing the content size.
+
+This means that the appearance of your preview largely depends on the previewer you are using.
+However, most previewers tend to make the most of the available space, so this usually isn't an issue.
+
+For image previews, you may want to tune up the [`max_width`][max-width] and [`max_height`][max-height] options in your `yazi.toml`:
+
+```toml
+[preview]
+# Change them to your desired values
+max_width = 1000
+max_height = 1000
+```
+
+[max-width]: https://yazi-rs.github.io/docs/configuration/yazi/#preview.max_width
+[max-height]: https://yazi-rs.github.io/docs/configuration/yazi/#preview.max_height
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua b/nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua
new file mode 100644
index 0000000..bb65bad
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua
@@ -0,0 +1,25 @@
+--- @since 25.2.7
+--- @sync entry
+
+local function entry(st)
+ if st.old then
+ Tab.layout, st.old = st.old, nil
+ else
+ st.old = Tab.layout
+ Tab.layout = function(self)
+ self._chunks = ui.Layout()
+ :direction(ui.Layout.HORIZONTAL)
+ :constraints({
+ ui.Constraint.Percentage(0),
+ ui.Constraint.Percentage(0),
+ ui.Constraint.Percentage(100),
+ })
+ :split(self._area)
+ end
+ end
+ ya.app_emit("resize", {})
+end
+
+local function enabled(st) return st.old ~= nil end
+
+return { entry = entry, enabled = enabled }
diff --git a/nixos/core/programs/yazi/plugins/mime-ext.yazi/LICENSE b/nixos/core/programs/yazi/plugins/mime-ext.yazi/LICENSE
new file mode 100644
index 0000000..fb5b1d6
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/mime-ext.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 yazi-rs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/mime-ext.yazi/README.md b/nixos/core/programs/yazi/plugins/mime-ext.yazi/README.md
new file mode 100644
index 0000000..e771576
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/mime-ext.yazi/README.md
@@ -0,0 +1,56 @@
+# mime-ext.yazi
+
+A mime-type provider based on a file extension database, replacing the [builtin `file(1)`](https://github.com/sxyazi/yazi/blob/main/yazi-plugin/preset/plugins/mime.lua) to speed up mime-type retrieval at the expense of accuracy.
+
+See https://yazi-rs.github.io/docs/tips#make-yazi-even-faster for more information.
+
+## Installation
+
+```sh
+ya pack -a yazi-rs/plugins:mime-ext
+```
+
+## Usage
+
+Add this to your `~/.config/yazi/yazi.toml`:
+
+```toml
+[[plugin.prepend_fetchers]]
+id = "mime"
+name = "*"
+run = "mime-ext"
+prio = "high"
+```
+
+## Advanced
+
+You can also customize it in your `~/.config/yazi/init.lua` with:
+
+```lua
+require("mime-ext"):setup {
+ -- Expand the existing filename database (lowercase), for example:
+ with_files = {
+ makefile = "text/makefile",
+ -- ...
+ },
+
+ -- Expand the existing extension database (lowercase), for example:
+ with_exts = {
+ mk = "text/makefile",
+ -- ...
+ },
+
+ -- If the mime-type is not in both filename and extension databases,
+ -- then fallback to Yazi's preset `mime` plugin, which uses `file(1)`
+ fallback_file1 = false,
+}
+```
+
+## TODO
+
+- Add more file types (PRs welcome!).
+- Compress mime-type tables.
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/nixos/core/programs/yazi/plugins/mime-ext.yazi/main.lua b/nixos/core/programs/yazi/plugins/mime-ext.yazi/main.lua
new file mode 100644
index 0000000..94e5a3a
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/mime-ext.yazi/main.lua
@@ -0,0 +1,1126 @@
+--- @since 25.2.7
+
+local FILES = {
+ [".envrc"] = "text/plain",
+ [".gitconfig"] = "text/plain",
+ [".gitignore"] = "text/plain",
+ [".luacheckrc"] = "text/lua",
+ [".npmrc"] = "text/plain",
+ [".styluaignore"] = "text/plain",
+ [".zshenv"] = "text/plain",
+ [".zshrc"] = "text/plain",
+ ["cargo.lock"] = "application/json",
+ ["flake.lock"] = "application/json",
+ license = "text/plain",
+}
+
+local EXTS = {
+ ["123"] = "application/lotus-1-2-3",
+ ["3dml"] = "text/in3d.3dml",
+ ["3ds"] = "image/3ds",
+ ["3g2"] = "video/3gpp2",
+ ["3gp"] = "video/3gpp",
+ ["7z"] = "application/7z-compressed",
+ ["for"] = "text/fortran",
+ ["in"] = "text/plain",
+ ["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/americandynamics.acc",
+ ace = "application/ace-compressed",
+ acu = "application/acucobol",
+ acutc = "application/acucorp",
+ adp = "audio/adpcm",
+ aep = "application/audiograph",
+ afm = "application/font-type1",
+ afp = "application/ibm.modcap",
+ ahead = "application/ahead.space",
+ ai = "application/postscript",
+ 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/ms-application",
+ apr = "application/lotus-approach",
+ arc = "application/freearc",
+ asc = "application/pgp-signature",
+ asf = "video/ms-asf",
+ asm = "text/asm",
+ 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/antix.game-component",
+ au = "audio/basic",
+ avi = "video/msvideo",
+ avif = "image/avif",
+ aw = "application/applixware",
+ azf = "application/airzip.filesecure.azf",
+ azs = "application/airzip.filesecure.azs",
+ azw = "application/amazon.ebook",
+ bash = "text/shellscript",
+ bat = "application/msdownload",
+ bcpio = "application/bcpio",
+ bdf = "application/font-bdf",
+ bdm = "application/syncml.dm+wbxml",
+ bean = "text/plain",
+ beancount = "text/plain",
+ bed = "application/realvnc.bed",
+ bh2 = "application/fujitsu.oasysprs",
+ bin = "application/octet-stream",
+ blb = "application/blorb",
+ blorb = "application/blorb",
+ bmi = "application/bmi",
+ bmp = "image/bmp",
+ book = "application/framemaker",
+ box = "application/previewsystems.box",
+ boz = "application/bzip2",
+ bpk = "application/octet-stream",
+ btif = "image/prs.btif",
+ bz = "application/bzip",
+ bz2 = "application/bzip2",
+ c = "text/c",
+ 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/director",
+ ccxml = "application/ccxml+xml",
+ 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/cdx",
+ cdxml = "application/chemdraw+xml",
+ cdy = "application/cinderella",
+ cer = "application/pkix-cert",
+ cfg = "text/plain",
+ cfs = "application/cfs-compressed",
+ cgm = "image/cgm",
+ 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/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/cpio",
+ cpp = "text/c",
+ cpt = "application/mac-compactpro",
+ crd = "application/mscardfile",
+ crl = "application/pkix-crl",
+ crt = "application/x509-ca-cert",
+ cryptonote = "application/rig.cryptonote",
+ csh = "application/csh",
+ csml = "chemical/csml",
+ csp = "application/commonspace",
+ css = "text/css",
+ cst = "application/director",
+ csv = "text/csv",
+ cu = "application/cu-seeme",
+ curl = "text/curl",
+ cww = "application/prs.cww",
+ cxt = "application/director",
+ cxx = "text/c",
+ 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/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/x509-ca-cert",
+ dfac = "application/dreamfactory",
+ dgc = "application/dgc-compressed",
+ dic = "text/c",
+ dir = "application/director",
+ dis = "application/mobius.dis",
+ dist = "application/octet-stream",
+ distz = "application/octet-stream",
+ djv = "image/djvu",
+ djvu = "image/djvu",
+ dll = "application/msdownload",
+ dmg = "application/apple-diskimage",
+ dmp = "application/tcpdump.pcap",
+ dms = "application/octet-stream",
+ dna = "application/dna",
+ doc = "application/msword",
+ docm = "application/ms-word.document.macroenabled.12",
+ docx = "application/openxmlformats-officedocument.wordprocessingml.document",
+ dot = "application/msword",
+ 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/dtbook+xml",
+ dtd = "application/xml-dtd",
+ dts = "audio/dts",
+ dtshd = "audio/dts.hd",
+ dump = "application/octet-stream",
+ 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/novadigm.edm",
+ edx = "application/novadigm.edx",
+ efif = "application/picsel",
+ ei6 = "application/pg.osasli",
+ elc = "application/octet-stream",
+ emf = "application/msmetafile",
+ eml = "message/rfc822",
+ emma = "application/emma+xml",
+ emz = "application/msmetafile",
+ env = "text/plain",
+ eol = "audio/digital-winds",
+ eot = "application/ms-fontobject",
+ eps = "application/postscript",
+ epub = "application/epub+zip",
+ es3 = "application/eszigno3+xml",
+ esa = "application/osgi.subsystem",
+ esf = "application/epson.esf",
+ et3 = "application/eszigno3+xml",
+ etx = "text/setext",
+ eva = "application/eva",
+ evy = "application/envoy",
+ exe = "application/msdownload",
+ exi = "application/exi",
+ ext = "application/novadigm.ext",
+ ez = "application/andrew-inset",
+ ez2 = "application/ezpix-album",
+ ez3 = "application/ezpix-package",
+ f = "text/fortran",
+ f4v = "video/f4v",
+ f77 = "text/fortran",
+ f90 = "text/fortran",
+ 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/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/geospace",
+ gac = "application/groove-account",
+ gam = "application/tads",
+ gbr = "application/rpki-ghostbusters",
+ 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/groove-identity-message",
+ gml = "application/gml+xml",
+ gmx = "application/gmx",
+ gnumeric = "application/gnumeric",
+ go = "text/go",
+ gph = "application/flographit",
+ gpx = "application/gpx+xml",
+ gqf = "application/grafeq",
+ gqs = "application/grafeq",
+ gram = "application/srgs",
+ gramps = "application/gramps-xml",
+ gre = "application/geometry-explorer",
+ grv = "application/groove-injector",
+ grxml = "application/srgs+xml",
+ gsf = "application/font-ghostscript",
+ gtar = "application/gtar",
+ gtm = "application/groove-tool-message",
+ gtw = "model/gtw",
+ gv = "text/graphviz",
+ gxf = "application/gxf",
+ gxt = "application/geonext",
+ h = "text/c",
+ h261 = "video/h261",
+ h263 = "video/h263",
+ h264 = "video/h264",
+ hal = "application/hal+xml",
+ hbci = "application/hbci",
+ hcl = "text/hcl",
+ hdf = "application/hdf",
+ hh = "text/c",
+ hlp = "application/winhlp",
+ hpgl = "application/hp-hpgl",
+ hpid = "application/hp-hpid",
+ hpp = "text/c",
+ hps = "application/hp-hps",
+ hqx = "application/mac-binhex40",
+ htke = "application/kenameaapp",
+ htm = "text/html",
+ html = "text/html",
+ 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/shana.informed.formdata",
+ iges = "model/iges",
+ igl = "application/igloader",
+ igm = "application/insors.igm",
+ igs = "model/iges",
+ 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/install-instructions",
+ iota = "application/astraea-software.iota",
+ ipfix = "application/ipfix",
+ 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/jisp",
+ jlt = "application/hp-jlyt",
+ jnlp = "application/java-jnlp-file",
+ joda = "application/joost.joda-archive",
+ jpe = "image/jpeg",
+ jpeg = "image/jpeg",
+ jpg = "image/jpeg",
+ jpgm = "video/jpm",
+ jpgv = "video/jpeg",
+ jpm = "video/jpm",
+ js = "text/javascript",
+ json = "application/json",
+ jsonc = "application/json",
+ jsonml = "application/jsonml+json",
+ jsx = "text/jsx",
+ jxl = "image/jxl",
+ kar = "audio/midi",
+ 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/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/ibm.modcap",
+ listafp = "application/ibm.modcap",
+ lnk = "application/ms-shortcut",
+ log = "text/plain",
+ lostxml = "application/lost+xml",
+ lrf = "application/octet-stream",
+ lrm = "application/ms-lrm",
+ ltf = "application/frogans.ltf",
+ lua = "text/lua",
+ 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",
+ m2t = "video/mp2t",
+ m2ts = "video/mp2t",
+ m2v = "video/mpeg",
+ m3a = "audio/mpeg",
+ m3u = "audio/mpegurl",
+ m3u8 = "application/apple.mpegurl",
+ m4a = "audio/mp4",
+ m4u = "video/mpegurl",
+ m4v = "video/m4v",
+ ma = "application/mathematica",
+ mads = "application/mads+xml",
+ mag = "application/ecowin.chart",
+ maker = "application/framemaker",
+ man = "text/troff",
+ mar = "application/octet-stream",
+ mathml = "application/mathml+xml",
+ mb = "application/mathematica",
+ mbk = "application/mobius.mbk",
+ mbox = "application/mbox",
+ mc1 = "application/medcalcdata",
+ mcd = "application/mcd",
+ mcurl = "text/curl.mcurl",
+ md = "text/markdown",
+ 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/mfmp",
+ mft = "application/rpki-manifest",
+ mgp = "application/osgeo.mapguide.package",
+ mgz = "application/proteus.magazine",
+ mid = "audio/midi",
+ midi = "audio/midi",
+ mie = "application/mie",
+ mif = "application/mif",
+ mime = "message/rfc822",
+ mj2 = "video/mj2",
+ mjp2 = "video/mj2",
+ mjs = "text/javascript",
+ 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/sgi-movie",
+ mp2 = "audio/mpeg",
+ mp21 = "application/mp21",
+ mp2a = "audio/mpeg",
+ mp3 = "audio/mpeg",
+ mp4 = "video/mp4",
+ mp4a = "audio/mp4",
+ mp4s = "application/mp4",
+ mp4v = "video/mp4",
+ mpc = "application/mophun.certificate",
+ mpe = "video/mpeg",
+ mpeg = "video/mpeg",
+ mpg = "video/mpeg",
+ mpg4 = "video/mp4",
+ mpga = "audio/mpeg",
+ 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/fdsn.mseed",
+ mseq = "application/mseq",
+ msf = "application/epson.msf",
+ msh = "model/mesh",
+ msi = "application/msdownload",
+ msl = "application/mobius.msl",
+ msty = "application/muvee.style",
+ mts = "video/mp2t",
+ mus = "application/musician",
+ musicxml = "application/recordare.musicxml+xml",
+ mvb = "application/msmediaview",
+ mwf = "application/mfer",
+ mxf = "application/mxf",
+ mxl = "application/recordare.musicxml",
+ mxml = "application/xv+xml",
+ mxs = "application/triscape.mxs",
+ mxu = "video/mpegurl",
+ n3 = "text/n3",
+ nb = "application/mathematica",
+ nbp = "application/wolfram.player",
+ nc = "application/netcdf",
+ ncx = "application/dtbncx+xml",
+ nfo = "text/nfo",
+ ngdat = "application/nokia.n-gage.data",
+ nitf = "application/nitf",
+ nix = "text/nix",
+ 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/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",
+ ogx = "application/ogg",
+ omdoc = "application/omdoc+xml",
+ onepkg = "application/onenote",
+ onetmp = "application/onenote",
+ onetoc = "application/onenote",
+ onetoc2 = "application/onenote",
+ opf = "application/oebps-package+xml",
+ opml = "text/opml",
+ oprc = "application/palm",
+ opus = "audio/ogg",
+ 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/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/openofficeorg.extension",
+ p = "text/pascal",
+ p10 = "application/pkcs10",
+ p12 = "application/pkcs12",
+ p7b = "application/pkcs7-certificates",
+ p7c = "application/pkcs7-mime",
+ p7m = "application/pkcs7-mime",
+ p7r = "application/pkcs7-certreqresp",
+ p7s = "application/pkcs7-signature",
+ p8 = "application/pkcs8",
+ pas = "text/pascal",
+ patch = "text/diff",
+ 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/font-type1",
+ pfb = "application/font-type1",
+ pfm = "application/font-type1",
+ pfr = "application/font-tdpfr",
+ pfx = "application/pkcs12",
+ pgm = "image/portable-graymap",
+ pgn = "application/chess-pgn",
+ pgp = "application/pgp-encrypted",
+ php = "text/php",
+ pic = "image/pict",
+ pkg = "application/octet-stream",
+ pki = "application/pkixcmp",
+ pkipath = "application/pkix-pkipath",
+ plb = "application/3gpp.pic-bw-large",
+ plc = "application/mobius.plc",
+ plf = "application/pocketlearn",
+ pls = "application/pls+xml",
+ pml = "application/ctc-posml",
+ png = "image/png",
+ 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/3gpp.pic-bw-small",
+ psd = "image/adobe.photoshop",
+ psf = "application/font-linux-psf",
+ pskcxml = "application/pskc+xml",
+ ptid = "application/pvi.ptid1",
+ pub = "application/mspublisher",
+ pvb = "application/3gpp.pic-bw-var",
+ pwn = "application/3m.post-it-notes",
+ py = "text/python",
+ 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/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/pn-realaudio",
+ ram = "audio/pn-realaudio",
+ rar = "application/rar",
+ ras = "image/cmu-raster",
+ rb = "text/ruby",
+ rcprofile = "application/ipunplugged.rcprofile",
+ rdf = "application/rdf+xml",
+ rdz = "application/data-vision.rdz",
+ rep = "application/businessobjects",
+ res = "application/dtbresource+xml",
+ rgb = "image/rgb",
+ rif = "application/reginfo+xml",
+ rip = "audio/rip",
+ ris = "application/research-info-systems",
+ rl = "application/resource-lists+xml",
+ rlc = "image/fujixerox.edmics-rlc",
+ rld = "application/resource-lists-diff+xml",
+ rm = "application/rn-realmedia",
+ rmi = "audio/midi",
+ 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/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",
+ rss = "application/rss+xml",
+ rtf = "application/rtf",
+ rtx = "text/richtext",
+ s = "text/asm",
+ s3m = "audio/s3m",
+ saf = "application/yamaha.smaf-audio",
+ sbml = "application/sbml+xml",
+ sc = "application/ibm.secure-container",
+ scd = "application/msschedule",
+ scm = "application/lotus-screencam",
+ scq = "application/scvp-cv-request",
+ scs = "application/scvp-cv-response",
+ 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/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/spotfire.sfs",
+ sfv = "text/sfv",
+ sgi = "image/sgi",
+ sgl = "application/stardivision.writer-global",
+ sgm = "text/sgml",
+ sgml = "text/sgml",
+ sh = "text/shellscript",
+ shar = "application/shar",
+ shf = "application/shf+xml",
+ sid = "image/mrsid-image",
+ sig = "application/pgp-signature",
+ sil = "audio/silk",
+ silo = "model/mesh",
+ 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/smv",
+ smzip = "application/stepmania.package",
+ snd = "audio/basic",
+ snf = "application/font-snf",
+ so = "application/octet-stream",
+ 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/sql",
+ src = "application/wais-source",
+ srt = "application/subrip",
+ sru = "application/sru+xml",
+ srx = "application/sparql-results+xml",
+ ssdl = "application/ssdl+xml",
+ sse = "application/kodak-descriptor",
+ ssf = "application/epson.ssf",
+ ssml = "application/ssml+xml",
+ 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/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/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/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/tex",
+ texi = "application/texinfo",
+ texinfo = "application/texinfo",
+ text = "text/plain",
+ tf = "text/hcl",
+ tfi = "application/thraud+xml",
+ 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/tmobile-livetv",
+ toml = "text/toml",
+ torrent = "application/bittorrent",
+ tpl = "application/groove-tool-template",
+ tpt = "application/trid.tpt",
+ tr = "text/troff",
+ tra = "application/trueapp",
+ trm = "application/msterminal",
+ ts = "text/typescript",
+ tsd = "application/timestamped-data",
+ tsv = "text/tab-separated-values",
+ tsx = "text/tsx",
+ ttc = "font/collection",
+ ttf = "font/ttf",
+ ttl = "text/turtle",
+ twd = "application/simtech-mindmapper",
+ twds = "application/simtech-mindmapper",
+ txd = "application/genomatix.tuxedo",
+ txf = "application/mobius.txf",
+ txt = "text/plain",
+ 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/ustar",
+ utz = "application/uiq.theme",
+ uu = "text/uuencode",
+ 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/cdlink",
+ vcf = "text/vcard",
+ vcg = "application/groove-vcard",
+ vcs = "text/vcalendar",
+ 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/visio",
+ vsf = "application/vsf",
+ vss = "application/visio",
+ vst = "application/visio",
+ vsw = "application/visio",
+ vtu = "model/vtu",
+ vxml = "application/voicexml+xml",
+ w3d = "application/director",
+ wad = "application/doom",
+ wasm = "application/wasm",
+ 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/pmi.widget",
+ wgt = "application/widget",
+ 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/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/webturbo",
+ wvx = "video/ms-wvx",
+ x32 = "application/authorware-bin",
+ x3d = "model/x3d+xml",
+ x3db = "model/x3d+binary",
+ x3dbz = "model/x3d+binary",
+ x3dv = "model/x3d+vrml",
+ x3dvz = "model/x3d+vrml",
+ x3dz = "model/x3d+xml",
+ xaml = "application/xaml+xml",
+ 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/syncml.dm+xml",
+ xdp = "application/adobe.xdp+xml",
+ xdssc = "application/dssc+xml",
+ xdw = "application/fujixerox.docuworks",
+ xenc = "application/xenc+xml",
+ xer = "application/patch-ops-error+xml",
+ xfdf = "application/adobe.xfdf",
+ xfdl = "application/xfdl",
+ xht = "application/xhtml+xml",
+ xhtml = "application/xhtml+xml",
+ xhvml = "application/xv+xml",
+ 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/olpc-sugar",
+ xop = "application/xop+xml",
+ xpak = "application/gentoo.xpak",
+ xpi = "application/xpinstall",
+ xpl = "application/xproc+xml",
+ 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/syncml+xml",
+ xspf = "application/xspf+xml",
+ xul = "application/mozilla.xul+xml",
+ xvm = "application/xv+xml",
+ xvml = "application/xv+xml",
+ xwd = "image/xwindowdump",
+ xyz = "chemical/xyz",
+ xz = "application/xz",
+ yaml = "text/yaml",
+ yang = "application/yang",
+ yin = "application/yin+xml",
+ yml = "text/yaml",
+ 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/zul",
+ zirz = "application/zul",
+ zmm = "application/handheld-entertainment+xml",
+ zsh = "text/shellscript",
+}
+
+local options = ya.sync(
+ function(st)
+ return {
+ with_files = st.with_files,
+ with_exts = st.with_exts,
+ fallback_file1 = st.fallback_file1,
+ }
+ end
+)
+
+local M = {}
+
+function M:setup(opts)
+ opts = opts or {}
+
+ self.with_files = opts.with_files
+ self.with_exts = opts.with_exts
+ self.fallback_file1 = opts.fallback_file1
+end
+
+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, state = {}, {}, {}
+ for i, file in ipairs(job.files) do
+ if file.cha.is_dummy then
+ state[i] = false
+ goto continue
+ end
+
+ local mime
+ if file.cha.len == 0 then
+ mime = "inode/empty"
+ else
+ mime = merged_files[(file.url:name() or ""):lower()]
+ mime = mime or merged_exts[(file.url:ext() or ""):lower()]
+ end
+
+ if mime then
+ updates[tostring(file.url)], state[i] = mime, true
+ elseif opts.fallback_file1 then
+ unknown[#unknown + 1] = file
+ else
+ updates[tostring(file.url)], state[i] = "application/octet-stream", true
+ end
+ ::continue::
+ end
+
+ if next(updates) then
+ ya.manager_emit("update_mimes", { updates = updates })
+ end
+
+ if #unknown > 0 then
+ return self.fallback_builtin(job, unknown, state)
+ end
+
+ return state
+end
+
+function M.fallback_builtin(job, unknown, state)
+ local indices = {}
+ for i, f in ipairs(job.files) do
+ indices[f:hash()] = i
+ end
+
+ local result = require("mime"):fetch(ya.dict_merge(job, { files = unknown }))
+ for i, f in ipairs(unknown) do
+ if type(result) == "table" then
+ state[indices[f:hash()]] = result[i]
+ else
+ state[indices[f:hash()]] = result
+ end
+ end
+ return state
+end
+
+return M
diff --git a/nixos/core/programs/yazi/plugins/starship.yazi/LICENSE b/nixos/core/programs/yazi/plugins/starship.yazi/LICENSE
new file mode 100644
index 0000000..c03ce66
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/starship.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Rolv Apneseth
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/nixos/core/programs/yazi/plugins/starship.yazi/README.md b/nixos/core/programs/yazi/plugins/starship.yazi/README.md
new file mode 100644
index 0000000..e5d0097
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/starship.yazi/README.md
@@ -0,0 +1,109 @@
+# starship.yazi
+
+Starship prompt plugin for [Yazi](https://github.com/sxyazi/yazi)
+
+
+
+## Requirements
+
+- [Yazi](https://github.com/sxyazi/yazi)
+- [starship](https://github.com/starship/starship)
+
+## Installation
+
+```bash
+ya pack -a Rolv-Apneseth/starship
+```
+
+### Manual
+
+```sh
+# Linux / MacOS
+git clone https://github.com/Rolv-Apneseth/starship.yazi.git ~/.config/yazi/plugins/starship.yazi
+# Windows
+git clone https://github.com/Rolv-Apneseth/starship.yazi.git %AppData%\yazi\config\plugins\starship.yazi
+```
+
+## Usage
+
+Add this to `~/.config/yazi/init.lua`:
+
+```lua
+require("starship"):setup()
+```
+
+Make sure you have [starship](https://github.com/starship/starship) installed and in your `PATH`.
+
+## Config
+
+Here is an example with all available config options:
+
+```lua
+require("starship"):setup({
+ -- Hide flags (such as filter, find and search). This is recommended for starship themes which
+ -- are intended to go across the entire width of the terminal.
+ hide_flags = false, -- Default: false
+ -- Whether to place flags after the starship prompt. False means the flags will be placed before the prompt.
+ flags_after_prompt = true, -- Default: true
+ -- Custom starship configuration file to use
+ config_file = "~/.config/starship_full.toml", -- Default: nil
+})
+```
+
+## Extra
+
+If you use a `starship` theme with a background colour, it might look a bit to cramped on just the one line `Yazi` gives the header by default. To fix this, you can add this to your `init.lua`:
+
+
+Click to expand
+
+```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.Bar.TOP):area(ui.Rect.default)
+ end
+
+ 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
+ self._chunks = {
+ c[1]:padding(ui.Padding.y(1)),
+ c[2]:padding(ui.Padding(c[1].w > 0 and 0 or 1, c[3].w > 0 and 0 or 1, 1, 1)),
+ c[3]:padding(ui.Padding.y(1)),
+ }
+
+ local style = THEME.manager.border_style
+ self._base = ya.list_merge(self._base or {}, {
+ 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[2].bottom - 1),
+ })
+
+ old_build(self, ...)
+end
+```
+
+
+
+> [!NOTE]
+> This works by overriding your `Tab.build` function so make sure this is the only place you're doing that in your config. For example, this would be incompatible with the [full-border plugin](https://github.com/yazi-rs/plugins/tree/main/full-border.yazi)
+
+## Thanks
+
+- [sxyazi](https://github.com/sxyazi) for providing the code for this plugin and the demo video [in this comment](https://github.com/sxyazi/yazi/issues/767#issuecomment-1977082834)
diff --git a/nixos/core/programs/yazi/plugins/starship.yazi/main.lua b/nixos/core/programs/yazi/plugins/starship.yazi/main.lua
new file mode 100644
index 0000000..c3fb1c4
--- /dev/null
+++ b/nixos/core/programs/yazi/plugins/starship.yazi/main.lua
@@ -0,0 +1,138 @@
+--- @since 25.2.7
+
+-- For development
+--[[ local function notify(message) ]]
+--[[ ya.notify({ title = "Starship", content = message, timeout = 5 }) ]]
+--[[ end ]]
+
+local save = ya.sync(function(st, cwd, output)
+ if cx.active.current.cwd == Url(cwd) then
+ st.output = output
+ ya.render()
+ end
+end)
+
+-- Helper function for accessing the `config_file` state variable
+---@return string
+local get_config_file = ya.sync(function(st)
+ return st.config_file
+end)
+
+return {
+ ---User arguments for setup method
+ ---@class SetupArgs
+ ---@field config_file string Absolute path to a starship config file
+ ---@field hide_flags boolean Whether to hide all flags (such as filter and search). Recommended for themes which are intended to take the full width of the terminal.
+ ---@field flags_after_prompt boolean Whether to place flags (such as filter and search) after the starship prompt. By default this is true.
+
+ --- Setup plugin
+ --- @param st table State
+ --- @param args SetupArgs|nil
+ setup = function(st, args)
+ local hide_flags = false
+ local flags_after_prompt = true
+
+ -- Check setup args
+ if args ~= nil then
+ if args.config_file ~= nil then
+ local url = Url(args.config_file)
+ if url.is_regular then
+ local config_file = args.config_file
+
+ -- Manually replace '~' and '$HOME' at the start of the path with the OS environment variable
+ local home = os.getenv("HOME")
+ if home then
+ home = tostring(home)
+ config_file = config_file:gsub("^~", home):gsub("^$HOME", home)
+ end
+
+ st.config_file = config_file
+ end
+ end
+
+ if args.hide_flags ~= nil then
+ hide_flags = args.hide_flags
+ end
+
+ if args.flags_after_prompt ~= nil then
+ flags_after_prompt = args.flags_after_prompt
+ end
+ end
+
+ -- Replace default header widget
+ Header:children_remove(1, Header.LEFT)
+ Header:children_add(function(self)
+ local max = self._area.w - self._right_width
+ if max <= 0 then
+ return ""
+ end
+
+ if hide_flags or not st.output then
+ return ui.Line.parse(st.output or "")
+ end
+
+ -- Split `st.output` at the first line break (or keep as is if none was found)
+ local output = st.output:match("([^\n]*)\n?") or st.output
+
+ local flags = self:flags()
+ if flags_after_prompt then
+ output = output .. " " .. flags
+ else
+ output = flags .. " " .. output
+ end
+
+ return ui.Line.parse(output)
+ end, 1000, Header.LEFT)
+
+ -- Pass current working directory and custom config path (if specified) to the plugin's entry point
+ ---Callback for subscribers to update the prompt
+ local callback = function()
+ local cwd = cx.active.current.cwd
+ if st.cwd ~= cwd then
+ st.cwd = cwd
+
+ if ya.confirm then
+ -- >= yazi 25.2.7
+ ya.manager_emit("plugin", {
+ st._id,
+ ya.quote(tostring(cwd), true),
+ })
+ else
+ -- < yazi 25.2.7
+ ya.manager_emit("plugin", {
+ st._id,
+ args = ya.quote(tostring(cwd), true),
+ })
+ end
+ end
+ end
+
+ -- Subscribe to events
+ ps.sub("cd", callback)
+ ps.sub("tab", callback)
+ end,
+
+ 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")
+ :stdin(Command.INHERIT)
+ :cwd(args[1])
+ :env("STARSHIP_SHELL", "")
+
+ -- Point to custom starship config
+ local config_file = get_config_file()
+ if config_file then
+ command = command:env("STARSHIP_CONFIG", config_file)
+ end
+
+ local output = command:output()
+ if output then
+ save(args[1], output.stdout:gsub("^%s+", ""))
+ end
+ end,
+}
diff --git a/nixos/core/programs/yazi/theme.toml b/nixos/core/programs/yazi/theme.toml
new file mode 100644
index 0000000..a1460bf
--- /dev/null
+++ b/nixos/core/programs/yazi/theme.toml
@@ -0,0 +1,2 @@
+[flavor]
+use = "tokyo-night"
diff --git a/nixos/core/programs/yazi/yazi.toml b/nixos/core/programs/yazi/yazi.toml
new file mode 100644
index 0000000..b38c22e
--- /dev/null
+++ b/nixos/core/programs/yazi/yazi.toml
@@ -0,0 +1,12 @@
+[plugin]
+prepend_previewers = [
+ { name = "*.md", run = "glow" },
+ { name = "*.bin", run = "hexyl" },
+]
+append_previewers = [
+ { name = "*", run = "hexyl" },
+]
+prepend_fetchers = [
+ { id = "git", name = "*", run = "git" },
+ { id = "git", name = "*/", run = "git" },
+]
diff --git a/nixos/homeserver/configuration.nix b/nixos/homeserver.nix
similarity index 98%
rename from nixos/homeserver/configuration.nix
rename to nixos/homeserver.nix
index 61ccec1..eca4412 100644
--- a/nixos/homeserver/configuration.nix
+++ b/nixos/homeserver.nix
@@ -7,10 +7,10 @@
...
}: {
imports = [
- # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ./filesystems.nix
- ./firewall.nix
+ ./core.nix
+ ./homeserver/hardware-configuration.nix
+ ./homeserver/filesystems.nix
+ ./homeserver/firewall.nix
];
# Allow unfree packages
diff --git a/nixos/worklaptop/configuration.nix b/nixos/worklaptop.nix
similarity index 98%
rename from nixos/worklaptop/configuration.nix
rename to nixos/worklaptop.nix
index 2dfe110..bfe9cd5 100644
--- a/nixos/worklaptop/configuration.nix
+++ b/nixos/worklaptop.nix
@@ -7,9 +7,9 @@
...
}: {
imports = [
- # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ./theming.nix
+ ./core.nix
+ ./worklaptop/hardware-configuration.nix
+ ./worklaptop/theming.nix
];
# Allow unfree packages