diff --git a/common/bat/config b/common/bat/config new file mode 100644 index 0000000..ad0c373 --- /dev/null +++ b/common/bat/config @@ -0,0 +1 @@ +--theme="Catppuccin-mocha" \ No newline at end of file diff --git a/common/bat/themes/Catppuccin-frappe.tmTheme b/common/bat/themes/Catppuccin-frappe.tmTheme new file mode 100644 index 0000000..f4eb222 --- /dev/null +++ b/common/bat/themes/Catppuccin-frappe.tmTheme @@ -0,0 +1,959 @@ + + + + + name + Catppuccin + settings + + + settings + + foreground + #c6d0f5 + background + #303446 + caret + #b5bfe2 + invisibles + #a5adce + gutterForeground + #949cbb + gutterForegroundHighlight + #a6d189 + lineHighlight + #626880 + selection + #737994 + selectionBorder + #303446 + activeGuide + #ef9f76 + findHighlightForeground + #292c3c + findHighlight + #e5c890 + bracketsForeground + #949cbb + bracketContentsForeground + #949cbb + + + + name + Comment + scope + comment + settings + + foreground + #737994 + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #a6d189 + fontStyle + + + + + name + String regex + scope + string.regexp + settings + + foreground + #ef9f76 + fontStyle + + + + + name + Number + scope + constant.numeric + settings + + foreground + #ef9f76 + fontStyle + + + + + name + Boolean + scope + constant.language.boolean + settings + + foreground + #ef9f76 + fontStyle + bold italic + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #babbf1 + fontStyle + italic + + + + name + Built-in function + scope + support.function.builtin + settings + + foreground + #ef9f76 + fontStyle + italic + + + + name + User-defined constant + scope + variable.other.constant + settings + + foreground + #ef9f76 + fontStyle + + + + + name + Variable + scope + variable + settings + + + + name + Keyword + scope + keyword + settings + + foreground + #e78284 + fontStyle + italic + + + + name + Conditional/loop + scope + keyword.control.loop, keyword.control.conditional, keyword.control.c++ + settings + + foreground + #ca9ee6 + fontStyle + bold + + + + name + Return + scope + keyword.control.return, keyword.control.flow.return + settings + + foreground + #f4b8e4 + fontStyle + bold + + + + name + Exception + scope + support.type.exception + settings + + foreground + #ef9f76 + fontStyle + italic + + + + name + Operator + scope + keyword.operator, punctuation.accessor + settings + + foreground + #99d1db + fontStyle + bold + + + + name + Punctuation separator + scope + punctuation.separator + settings + + foreground + #81c8be + fontStyle + + + + + name + Punctuation terminator + scope + punctuation.terminator + settings + + foreground + #81c8be + fontStyle + + + + + name + Punctuation bracket + scope + punctuation.section + settings + + foreground + #949cbb + fontStyle + + + + + name + Include + scope + keyword.control.import.include + settings + + foreground + #81c8be + fontStyle + italic + + + + name + Storage + scope + storage + settings + + foreground + #e78284 + fontStyle + + + + + name + Storage type + scope + storage.type + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Storage modifier + scope + storage.modifier + settings + + foreground + #e78284 + fontStyle + + + + + name + Storage type namespace + scope + entity.name.namespace, meta.path + settings + + foreground + #f2d5cf + fontStyle + italic + + + + name + Storage type class + scope + storage.type.class + settings + + foreground + #f2d5cf + fontStyle + italic + + + + name + Label + scope + entity.name.label + settings + + foreground + #8caaee + fontStyle + + + + + name + Keyword class + scope + keyword.declaration.class + settings + + foreground + #e78284 + fontStyle + italic + + + + name + Class name + scope + entity.name.class, meta.toc-list.full-identifier + settings + + foreground + #99d1db + fontStyle + + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + foreground + #99d1db + fontStyle + italic + + + + name + Function name + scope + entity.name.function, variable.function + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Function macro + scope + entity.name.function.preprocessor + settings + + foreground + #e78284 + fontStyle + + + + + name + Macro directive - ifdef + scope + keyword.control.import + settings + + foreground + #e78284 + fontStyle + + + + + name + Constructor + scope + entity.name.function.constructor, entity.name.function.destructor + settings + + foreground + #babbf1 + fontStyle + + + + + name + Function argument + scope + variable.parameter.function + settings + + foreground + #f2d5cf + fontStyle + italic + + + + name + Function declaration + scope + keyword.declaration.function + settings + + foreground + #ea999c + fontStyle + italic + + + + name + Library function + scope + support.function + settings + + foreground + #99d1db + fontStyle + + + + + name + Library constant + scope + support.constant + settings + + foreground + #8caaee + fontStyle + + + + + name + Library class/type + scope + support.type, support.class + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Variable function + scope + variable.function + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Variable parameter + scope + variable.parameter + settings + + foreground + #f2d5cf + fontStyle + italic + + + + name + Variable other + scope + variable.other + settings + + foreground + #c6d0f5 + fontStyle + italic + + + + name + Variable field + scope + variable.other.member + settings + + foreground + #f2d5cf + fontStyle + + + + + name + Variable language + scope + variable.language + settings + + foreground + #81c8be + fontStyle + + + + + name + Tag name + scope + entity.name.tag + settings + + foreground + #ef9f76 + fontStyle + + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + foreground + #ca9ee6 + fontStyle + italic + + + + name + Tag delimiter + scope + punctuation.definition.tag + settings + + foreground + #ea999c + fontStyle + + + + + name + Markdown URL + scope + markup.underline.link.markdown + settings + + foreground + #f2d5cf + fontStyle + italic underline + + + + name + Markdown reference + scope + meta.link.inline.description + settings + + foreground + #babbf1 + fontStyle + bold + + + + name + Markdown literal + scope + comment.block.markdown, meta.code-fence, markup.raw.code-fence, markup.raw.inline + settings + + foreground + #81c8be + fontStyle + italic + + + + name + Markdown title + scope + punctuation.definition.heading, entity.name.section + settings + + foreground + #8caaee + fontStyle + bold + + + + name + Markdown emphasis + scope + markup.italic + settings + + foreground + #ea999c + fontStyle + italic + + + + name + Markdown strong + scope + markup.bold + settings + + foreground + #ea999c + fontStyle + bold + + + + name + Escape + scope + constant.character.escape + settings + + foreground + #f4b8e4 + fontStyle + + + + + name + Bash built-in function + scope + source.shell.bash meta.function.shell meta.compound.shell meta.function-call.identifier.shell + settings + + foreground + #f4b8e4 + fontStyle + + + + + name + Bash parameter + scope + variable.language.shell + settings + + foreground + #e78284 + fontStyle + italic + + + + name + Lua field + scope + source.lua meta.function.lua meta.block.lua meta.mapping.value.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #babbf1 + fontStyle + italic + + + + name + Lua constructor + scope + source.lua meta.function.lua meta.block.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #eebebe + fontStyle + + + + + name + Java constant + scope + entity.name.constant.java + settings + + foreground + #81c8be + fontStyle + + + + + name + CSS property + scope + support.type.property-name.css + settings + + foreground + #eebebe + fontStyle + italic + + + + name + CSS constant + scope + support.constant.property-value.css + settings + + foreground + #c6d0f5 + fontStyle + + + + + name + CSS suffix + scope + constant.numeric.suffix.css, keyword.other.unit.css + settings + + foreground + #81c8be + fontStyle + italic + + + + name + CSS variable property + scope + variable.other.custom-property.name.css, support.type.custom-property.name.css, punctuation.definition.custom-property.css + settings + + foreground + #81c8be + fontStyle + + + + + name + SCSS tag + scope + entity.name.tag.css + settings + + foreground + #babbf1 + fontStyle + + + + + name + SASS variable + scope + variable.other.sass + settings + + foreground + #81c8be + fontStyle + + + + + name + Invalid + scope + invalid + settings + + foreground + #c6d0f5 + background + #e78284 + fontStyle + + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + foreground + #c6d0f5 + background + #ca9ee6 + fontStyle + + + + + name + Diff header + scope + meta.diff, meta.diff.header + settings + + foreground + #737994 + fontStyle + + + + + name + Diff deleted + scope + markup.deleted + settings + + foreground + #e78284 + fontStyle + + + + + name + Diff inserted + scope + markup.inserted + settings + + foreground + #a6d189 + fontStyle + + + + + name + Diff changed + scope + markup.changed + settings + + foreground + #e5c890 + fontStyle + + + + + name + Message error + scope + message.error + settings + + foreground + #e78284 + fontStyle + + + + + uuid + 4d0379b5-ef82-467b-b8b8-365889420646 + colorSpaceName + sRGB + semanticClass + theme.dark.Catppuccin + author + BrunDerSchwarzmagier + + diff --git a/common/bat/themes/Catppuccin-latte.tmTheme b/common/bat/themes/Catppuccin-latte.tmTheme new file mode 100644 index 0000000..6f23c16 --- /dev/null +++ b/common/bat/themes/Catppuccin-latte.tmTheme @@ -0,0 +1,959 @@ + + + + + name + Catppuccin + settings + + + settings + + foreground + #4c4f69 + background + #eff1f5 + caret + #5c5f77 + invisibles + #6c6f85 + gutterForeground + #7c7f93 + gutterForegroundHighlight + #40a02b + lineHighlight + #acb0be + selection + #9ca0b0 + selectionBorder + #eff1f5 + activeGuide + #fe640b + findHighlightForeground + #e6e9ef + findHighlight + #df8e1d + bracketsForeground + #7c7f93 + bracketContentsForeground + #7c7f93 + + + + name + Comment + scope + comment + settings + + foreground + #9ca0b0 + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #40a02b + fontStyle + + + + + name + String regex + scope + string.regexp + settings + + foreground + #fe640b + fontStyle + + + + + name + Number + scope + constant.numeric + settings + + foreground + #fe640b + fontStyle + + + + + name + Boolean + scope + constant.language.boolean + settings + + foreground + #fe640b + fontStyle + bold italic + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #7287fd + fontStyle + italic + + + + name + Built-in function + scope + support.function.builtin + settings + + foreground + #fe640b + fontStyle + italic + + + + name + User-defined constant + scope + variable.other.constant + settings + + foreground + #fe640b + fontStyle + + + + + name + Variable + scope + variable + settings + + + + name + Keyword + scope + keyword + settings + + foreground + #d20f39 + fontStyle + italic + + + + name + Conditional/loop + scope + keyword.control.loop, keyword.control.conditional, keyword.control.c++ + settings + + foreground + #8839ef + fontStyle + bold + + + + name + Return + scope + keyword.control.return, keyword.control.flow.return + settings + + foreground + #ea76cb + fontStyle + bold + + + + name + Exception + scope + support.type.exception + settings + + foreground + #fe640b + fontStyle + italic + + + + name + Operator + scope + keyword.operator, punctuation.accessor + settings + + foreground + #04a5e5 + fontStyle + bold + + + + name + Punctuation separator + scope + punctuation.separator + settings + + foreground + #179299 + fontStyle + + + + + name + Punctuation terminator + scope + punctuation.terminator + settings + + foreground + #179299 + fontStyle + + + + + name + Punctuation bracket + scope + punctuation.section + settings + + foreground + #7c7f93 + fontStyle + + + + + name + Include + scope + keyword.control.import.include + settings + + foreground + #179299 + fontStyle + italic + + + + name + Storage + scope + storage + settings + + foreground + #d20f39 + fontStyle + + + + + name + Storage type + scope + storage.type + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Storage modifier + scope + storage.modifier + settings + + foreground + #d20f39 + fontStyle + + + + + name + Storage type namespace + scope + entity.name.namespace, meta.path + settings + + foreground + #dc8a78 + fontStyle + italic + + + + name + Storage type class + scope + storage.type.class + settings + + foreground + #dc8a78 + fontStyle + italic + + + + name + Label + scope + entity.name.label + settings + + foreground + #1e66f5 + fontStyle + + + + + name + Keyword class + scope + keyword.declaration.class + settings + + foreground + #d20f39 + fontStyle + italic + + + + name + Class name + scope + entity.name.class, meta.toc-list.full-identifier + settings + + foreground + #04a5e5 + fontStyle + + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + foreground + #04a5e5 + fontStyle + italic + + + + name + Function name + scope + entity.name.function, variable.function + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Function macro + scope + entity.name.function.preprocessor + settings + + foreground + #d20f39 + fontStyle + + + + + name + Macro directive - ifdef + scope + keyword.control.import + settings + + foreground + #d20f39 + fontStyle + + + + + name + Constructor + scope + entity.name.function.constructor, entity.name.function.destructor + settings + + foreground + #7287fd + fontStyle + + + + + name + Function argument + scope + variable.parameter.function + settings + + foreground + #dc8a78 + fontStyle + italic + + + + name + Function declaration + scope + keyword.declaration.function + settings + + foreground + #e64553 + fontStyle + italic + + + + name + Library function + scope + support.function + settings + + foreground + #04a5e5 + fontStyle + + + + + name + Library constant + scope + support.constant + settings + + foreground + #1e66f5 + fontStyle + + + + + name + Library class/type + scope + support.type, support.class + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Variable function + scope + variable.function + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Variable parameter + scope + variable.parameter + settings + + foreground + #dc8a78 + fontStyle + italic + + + + name + Variable other + scope + variable.other + settings + + foreground + #4c4f69 + fontStyle + italic + + + + name + Variable field + scope + variable.other.member + settings + + foreground + #dc8a78 + fontStyle + + + + + name + Variable language + scope + variable.language + settings + + foreground + #179299 + fontStyle + + + + + name + Tag name + scope + entity.name.tag + settings + + foreground + #fe640b + fontStyle + + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + foreground + #8839ef + fontStyle + italic + + + + name + Tag delimiter + scope + punctuation.definition.tag + settings + + foreground + #e64553 + fontStyle + + + + + name + Markdown URL + scope + markup.underline.link.markdown + settings + + foreground + #dc8a78 + fontStyle + italic underline + + + + name + Markdown reference + scope + meta.link.inline.description + settings + + foreground + #7287fd + fontStyle + bold + + + + name + Markdown literal + scope + comment.block.markdown, meta.code-fence, markup.raw.code-fence, markup.raw.inline + settings + + foreground + #179299 + fontStyle + italic + + + + name + Markdown title + scope + punctuation.definition.heading, entity.name.section + settings + + foreground + #1e66f5 + fontStyle + bold + + + + name + Markdown emphasis + scope + markup.italic + settings + + foreground + #e64553 + fontStyle + italic + + + + name + Markdown strong + scope + markup.bold + settings + + foreground + #e64553 + fontStyle + bold + + + + name + Escape + scope + constant.character.escape + settings + + foreground + #ea76cb + fontStyle + + + + + name + Bash built-in function + scope + source.shell.bash meta.function.shell meta.compound.shell meta.function-call.identifier.shell + settings + + foreground + #ea76cb + fontStyle + + + + + name + Bash parameter + scope + variable.language.shell + settings + + foreground + #d20f39 + fontStyle + italic + + + + name + Lua field + scope + source.lua meta.function.lua meta.block.lua meta.mapping.value.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #7287fd + fontStyle + italic + + + + name + Lua constructor + scope + source.lua meta.function.lua meta.block.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #dd7878 + fontStyle + + + + + name + Java constant + scope + entity.name.constant.java + settings + + foreground + #179299 + fontStyle + + + + + name + CSS property + scope + support.type.property-name.css + settings + + foreground + #dd7878 + fontStyle + italic + + + + name + CSS constant + scope + support.constant.property-value.css + settings + + foreground + #4c4f69 + fontStyle + + + + + name + CSS suffix + scope + constant.numeric.suffix.css, keyword.other.unit.css + settings + + foreground + #179299 + fontStyle + italic + + + + name + CSS variable property + scope + variable.other.custom-property.name.css, support.type.custom-property.name.css, punctuation.definition.custom-property.css + settings + + foreground + #179299 + fontStyle + + + + + name + SCSS tag + scope + entity.name.tag.css + settings + + foreground + #7287fd + fontStyle + + + + + name + SASS variable + scope + variable.other.sass + settings + + foreground + #179299 + fontStyle + + + + + name + Invalid + scope + invalid + settings + + foreground + #4c4f69 + background + #d20f39 + fontStyle + + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + foreground + #4c4f69 + background + #8839ef + fontStyle + + + + + name + Diff header + scope + meta.diff, meta.diff.header + settings + + foreground + #9ca0b0 + fontStyle + + + + + name + Diff deleted + scope + markup.deleted + settings + + foreground + #d20f39 + fontStyle + + + + + name + Diff inserted + scope + markup.inserted + settings + + foreground + #40a02b + fontStyle + + + + + name + Diff changed + scope + markup.changed + settings + + foreground + #df8e1d + fontStyle + + + + + name + Message error + scope + message.error + settings + + foreground + #d20f39 + fontStyle + + + + + uuid + 4d0379b5-ef82-467b-b8b8-365889420646 + colorSpaceName + sRGB + semanticClass + theme.dark.Catppuccin + author + BrunDerSchwarzmagier + + diff --git a/common/bat/themes/Catppuccin-macchiato.tmTheme b/common/bat/themes/Catppuccin-macchiato.tmTheme new file mode 100644 index 0000000..0beedb6 --- /dev/null +++ b/common/bat/themes/Catppuccin-macchiato.tmTheme @@ -0,0 +1,959 @@ + + + + + name + Catppuccin + settings + + + settings + + foreground + #cad3f5 + background + #24273a + caret + #b8c0e0 + invisibles + #a5adcb + gutterForeground + #939ab7 + gutterForegroundHighlight + #a6da95 + lineHighlight + #5b6078 + selection + #6e738d + selectionBorder + #24273a + activeGuide + #f5a97f + findHighlightForeground + #1e2030 + findHighlight + #eed49f + bracketsForeground + #939ab7 + bracketContentsForeground + #939ab7 + + + + name + Comment + scope + comment + settings + + foreground + #6e738d + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #a6da95 + fontStyle + + + + + name + String regex + scope + string.regexp + settings + + foreground + #f5a97f + fontStyle + + + + + name + Number + scope + constant.numeric + settings + + foreground + #f5a97f + fontStyle + + + + + name + Boolean + scope + constant.language.boolean + settings + + foreground + #f5a97f + fontStyle + bold italic + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #b7bdf8 + fontStyle + italic + + + + name + Built-in function + scope + support.function.builtin + settings + + foreground + #f5a97f + fontStyle + italic + + + + name + User-defined constant + scope + variable.other.constant + settings + + foreground + #f5a97f + fontStyle + + + + + name + Variable + scope + variable + settings + + + + name + Keyword + scope + keyword + settings + + foreground + #ed8796 + fontStyle + italic + + + + name + Conditional/loop + scope + keyword.control.loop, keyword.control.conditional, keyword.control.c++ + settings + + foreground + #c6a0f6 + fontStyle + bold + + + + name + Return + scope + keyword.control.return, keyword.control.flow.return + settings + + foreground + #f5bde6 + fontStyle + bold + + + + name + Exception + scope + support.type.exception + settings + + foreground + #f5a97f + fontStyle + italic + + + + name + Operator + scope + keyword.operator, punctuation.accessor + settings + + foreground + #91d7e3 + fontStyle + bold + + + + name + Punctuation separator + scope + punctuation.separator + settings + + foreground + #8bd5ca + fontStyle + + + + + name + Punctuation terminator + scope + punctuation.terminator + settings + + foreground + #8bd5ca + fontStyle + + + + + name + Punctuation bracket + scope + punctuation.section + settings + + foreground + #939ab7 + fontStyle + + + + + name + Include + scope + keyword.control.import.include + settings + + foreground + #8bd5ca + fontStyle + italic + + + + name + Storage + scope + storage + settings + + foreground + #ed8796 + fontStyle + + + + + name + Storage type + scope + storage.type + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Storage modifier + scope + storage.modifier + settings + + foreground + #ed8796 + fontStyle + + + + + name + Storage type namespace + scope + entity.name.namespace, meta.path + settings + + foreground + #f4dbd6 + fontStyle + italic + + + + name + Storage type class + scope + storage.type.class + settings + + foreground + #f4dbd6 + fontStyle + italic + + + + name + Label + scope + entity.name.label + settings + + foreground + #8aadf4 + fontStyle + + + + + name + Keyword class + scope + keyword.declaration.class + settings + + foreground + #ed8796 + fontStyle + italic + + + + name + Class name + scope + entity.name.class, meta.toc-list.full-identifier + settings + + foreground + #91d7e3 + fontStyle + + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + foreground + #91d7e3 + fontStyle + italic + + + + name + Function name + scope + entity.name.function, variable.function + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Function macro + scope + entity.name.function.preprocessor + settings + + foreground + #ed8796 + fontStyle + + + + + name + Macro directive - ifdef + scope + keyword.control.import + settings + + foreground + #ed8796 + fontStyle + + + + + name + Constructor + scope + entity.name.function.constructor, entity.name.function.destructor + settings + + foreground + #b7bdf8 + fontStyle + + + + + name + Function argument + scope + variable.parameter.function + settings + + foreground + #f4dbd6 + fontStyle + italic + + + + name + Function declaration + scope + keyword.declaration.function + settings + + foreground + #ee99a0 + fontStyle + italic + + + + name + Library function + scope + support.function + settings + + foreground + #91d7e3 + fontStyle + + + + + name + Library constant + scope + support.constant + settings + + foreground + #8aadf4 + fontStyle + + + + + name + Library class/type + scope + support.type, support.class + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Variable function + scope + variable.function + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Variable parameter + scope + variable.parameter + settings + + foreground + #f4dbd6 + fontStyle + italic + + + + name + Variable other + scope + variable.other + settings + + foreground + #cad3f5 + fontStyle + italic + + + + name + Variable field + scope + variable.other.member + settings + + foreground + #f4dbd6 + fontStyle + + + + + name + Variable language + scope + variable.language + settings + + foreground + #8bd5ca + fontStyle + + + + + name + Tag name + scope + entity.name.tag + settings + + foreground + #f5a97f + fontStyle + + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + foreground + #c6a0f6 + fontStyle + italic + + + + name + Tag delimiter + scope + punctuation.definition.tag + settings + + foreground + #ee99a0 + fontStyle + + + + + name + Markdown URL + scope + markup.underline.link.markdown + settings + + foreground + #f4dbd6 + fontStyle + italic underline + + + + name + Markdown reference + scope + meta.link.inline.description + settings + + foreground + #b7bdf8 + fontStyle + bold + + + + name + Markdown literal + scope + comment.block.markdown, meta.code-fence, markup.raw.code-fence, markup.raw.inline + settings + + foreground + #8bd5ca + fontStyle + italic + + + + name + Markdown title + scope + punctuation.definition.heading, entity.name.section + settings + + foreground + #8aadf4 + fontStyle + bold + + + + name + Markdown emphasis + scope + markup.italic + settings + + foreground + #ee99a0 + fontStyle + italic + + + + name + Markdown strong + scope + markup.bold + settings + + foreground + #ee99a0 + fontStyle + bold + + + + name + Escape + scope + constant.character.escape + settings + + foreground + #f5bde6 + fontStyle + + + + + name + Bash built-in function + scope + source.shell.bash meta.function.shell meta.compound.shell meta.function-call.identifier.shell + settings + + foreground + #f5bde6 + fontStyle + + + + + name + Bash parameter + scope + variable.language.shell + settings + + foreground + #ed8796 + fontStyle + italic + + + + name + Lua field + scope + source.lua meta.function.lua meta.block.lua meta.mapping.value.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #b7bdf8 + fontStyle + italic + + + + name + Lua constructor + scope + source.lua meta.function.lua meta.block.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #f0c6c6 + fontStyle + + + + + name + Java constant + scope + entity.name.constant.java + settings + + foreground + #8bd5ca + fontStyle + + + + + name + CSS property + scope + support.type.property-name.css + settings + + foreground + #f0c6c6 + fontStyle + italic + + + + name + CSS constant + scope + support.constant.property-value.css + settings + + foreground + #cad3f5 + fontStyle + + + + + name + CSS suffix + scope + constant.numeric.suffix.css, keyword.other.unit.css + settings + + foreground + #8bd5ca + fontStyle + italic + + + + name + CSS variable property + scope + variable.other.custom-property.name.css, support.type.custom-property.name.css, punctuation.definition.custom-property.css + settings + + foreground + #8bd5ca + fontStyle + + + + + name + SCSS tag + scope + entity.name.tag.css + settings + + foreground + #b7bdf8 + fontStyle + + + + + name + SASS variable + scope + variable.other.sass + settings + + foreground + #8bd5ca + fontStyle + + + + + name + Invalid + scope + invalid + settings + + foreground + #cad3f5 + background + #ed8796 + fontStyle + + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + foreground + #cad3f5 + background + #c6a0f6 + fontStyle + + + + + name + Diff header + scope + meta.diff, meta.diff.header + settings + + foreground + #6e738d + fontStyle + + + + + name + Diff deleted + scope + markup.deleted + settings + + foreground + #ed8796 + fontStyle + + + + + name + Diff inserted + scope + markup.inserted + settings + + foreground + #a6da95 + fontStyle + + + + + name + Diff changed + scope + markup.changed + settings + + foreground + #eed49f + fontStyle + + + + + name + Message error + scope + message.error + settings + + foreground + #ed8796 + fontStyle + + + + + uuid + 4d0379b5-ef82-467b-b8b8-365889420646 + colorSpaceName + sRGB + semanticClass + theme.dark.Catppuccin + author + BrunDerSchwarzmagier + + diff --git a/common/bat/themes/Catppuccin-mocha.tmTheme b/common/bat/themes/Catppuccin-mocha.tmTheme new file mode 100644 index 0000000..3b9b72c --- /dev/null +++ b/common/bat/themes/Catppuccin-mocha.tmTheme @@ -0,0 +1,959 @@ + + + + + name + Catppuccin + settings + + + settings + + foreground + #cdd6f4 + background + #1e1e2e + caret + #bac2de + invisibles + #a6adc8 + gutterForeground + #9399b2 + gutterForegroundHighlight + #a6e3a1 + lineHighlight + #585b70 + selection + #6c7086 + selectionBorder + #1e1e2e + activeGuide + #fab387 + findHighlightForeground + #181825 + findHighlight + #f9e2af + bracketsForeground + #9399b2 + bracketContentsForeground + #9399b2 + + + + name + Comment + scope + comment + settings + + foreground + #6c7086 + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #a6e3a1 + fontStyle + + + + + name + String regex + scope + string.regexp + settings + + foreground + #fab387 + fontStyle + + + + + name + Number + scope + constant.numeric + settings + + foreground + #fab387 + fontStyle + + + + + name + Boolean + scope + constant.language.boolean + settings + + foreground + #fab387 + fontStyle + bold italic + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #b4befe + fontStyle + italic + + + + name + Built-in function + scope + support.function.builtin + settings + + foreground + #fab387 + fontStyle + italic + + + + name + User-defined constant + scope + variable.other.constant + settings + + foreground + #fab387 + fontStyle + + + + + name + Variable + scope + variable + settings + + + + name + Keyword + scope + keyword + settings + + foreground + #f38ba8 + fontStyle + italic + + + + name + Conditional/loop + scope + keyword.control.loop, keyword.control.conditional, keyword.control.c++ + settings + + foreground + #cba6f7 + fontStyle + bold + + + + name + Return + scope + keyword.control.return, keyword.control.flow.return + settings + + foreground + #f5c2e7 + fontStyle + bold + + + + name + Exception + scope + support.type.exception + settings + + foreground + #fab387 + fontStyle + italic + + + + name + Operator + scope + keyword.operator, punctuation.accessor + settings + + foreground + #89dceb + fontStyle + bold + + + + name + Punctuation separator + scope + punctuation.separator + settings + + foreground + #94e2d5 + fontStyle + + + + + name + Punctuation terminator + scope + punctuation.terminator + settings + + foreground + #94e2d5 + fontStyle + + + + + name + Punctuation bracket + scope + punctuation.section + settings + + foreground + #9399b2 + fontStyle + + + + + name + Include + scope + keyword.control.import.include + settings + + foreground + #94e2d5 + fontStyle + italic + + + + name + Storage + scope + storage + settings + + foreground + #f38ba8 + fontStyle + + + + + name + Storage type + scope + storage.type + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Storage modifier + scope + storage.modifier + settings + + foreground + #f38ba8 + fontStyle + + + + + name + Storage type namespace + scope + entity.name.namespace, meta.path + settings + + foreground + #f5e0dc + fontStyle + italic + + + + name + Storage type class + scope + storage.type.class + settings + + foreground + #f5e0dc + fontStyle + italic + + + + name + Label + scope + entity.name.label + settings + + foreground + #89b4fa + fontStyle + + + + + name + Keyword class + scope + keyword.declaration.class + settings + + foreground + #f38ba8 + fontStyle + italic + + + + name + Class name + scope + entity.name.class, meta.toc-list.full-identifier + settings + + foreground + #89dceb + fontStyle + + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + foreground + #89dceb + fontStyle + italic + + + + name + Function name + scope + entity.name.function, variable.function + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Function macro + scope + entity.name.function.preprocessor + settings + + foreground + #f38ba8 + fontStyle + + + + + name + Macro directive - ifdef + scope + keyword.control.import + settings + + foreground + #f38ba8 + fontStyle + + + + + name + Constructor + scope + entity.name.function.constructor, entity.name.function.destructor + settings + + foreground + #b4befe + fontStyle + + + + + name + Function argument + scope + variable.parameter.function + settings + + foreground + #f5e0dc + fontStyle + italic + + + + name + Function declaration + scope + keyword.declaration.function + settings + + foreground + #eba0ac + fontStyle + italic + + + + name + Library function + scope + support.function + settings + + foreground + #89dceb + fontStyle + + + + + name + Library constant + scope + support.constant + settings + + foreground + #89b4fa + fontStyle + + + + + name + Library class/type + scope + support.type, support.class + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Variable function + scope + variable.function + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Variable parameter + scope + variable.parameter + settings + + foreground + #f5e0dc + fontStyle + italic + + + + name + Variable other + scope + variable.other + settings + + foreground + #cdd6f4 + fontStyle + italic + + + + name + Variable field + scope + variable.other.member + settings + + foreground + #f5e0dc + fontStyle + + + + + name + Variable language + scope + variable.language + settings + + foreground + #94e2d5 + fontStyle + + + + + name + Tag name + scope + entity.name.tag + settings + + foreground + #fab387 + fontStyle + + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + foreground + #cba6f7 + fontStyle + italic + + + + name + Tag delimiter + scope + punctuation.definition.tag + settings + + foreground + #eba0ac + fontStyle + + + + + name + Markdown URL + scope + markup.underline.link.markdown + settings + + foreground + #f5e0dc + fontStyle + italic underline + + + + name + Markdown reference + scope + meta.link.inline.description + settings + + foreground + #b4befe + fontStyle + bold + + + + name + Markdown literal + scope + comment.block.markdown, meta.code-fence, markup.raw.code-fence, markup.raw.inline + settings + + foreground + #94e2d5 + fontStyle + italic + + + + name + Markdown title + scope + punctuation.definition.heading, entity.name.section + settings + + foreground + #89b4fa + fontStyle + bold + + + + name + Markdown emphasis + scope + markup.italic + settings + + foreground + #eba0ac + fontStyle + italic + + + + name + Markdown strong + scope + markup.bold + settings + + foreground + #eba0ac + fontStyle + bold + + + + name + Escape + scope + constant.character.escape + settings + + foreground + #f5c2e7 + fontStyle + + + + + name + Bash built-in function + scope + source.shell.bash meta.function.shell meta.compound.shell meta.function-call.identifier.shell + settings + + foreground + #f5c2e7 + fontStyle + + + + + name + Bash parameter + scope + variable.language.shell + settings + + foreground + #f38ba8 + fontStyle + italic + + + + name + Lua field + scope + source.lua meta.function.lua meta.block.lua meta.mapping.value.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #b4befe + fontStyle + italic + + + + name + Lua constructor + scope + source.lua meta.function.lua meta.block.lua meta.mapping.key.lua string.unquoted.key.lua + settings + + foreground + #f2cdcd + fontStyle + + + + + name + Java constant + scope + entity.name.constant.java + settings + + foreground + #94e2d5 + fontStyle + + + + + name + CSS property + scope + support.type.property-name.css + settings + + foreground + #f2cdcd + fontStyle + italic + + + + name + CSS constant + scope + support.constant.property-value.css + settings + + foreground + #cdd6f4 + fontStyle + + + + + name + CSS suffix + scope + constant.numeric.suffix.css, keyword.other.unit.css + settings + + foreground + #94e2d5 + fontStyle + italic + + + + name + CSS variable property + scope + variable.other.custom-property.name.css, support.type.custom-property.name.css, punctuation.definition.custom-property.css + settings + + foreground + #94e2d5 + fontStyle + + + + + name + SCSS tag + scope + entity.name.tag.css + settings + + foreground + #b4befe + fontStyle + + + + + name + SASS variable + scope + variable.other.sass + settings + + foreground + #94e2d5 + fontStyle + + + + + name + Invalid + scope + invalid + settings + + foreground + #cdd6f4 + background + #f38ba8 + fontStyle + + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + foreground + #cdd6f4 + background + #cba6f7 + fontStyle + + + + + name + Diff header + scope + meta.diff, meta.diff.header + settings + + foreground + #6c7086 + fontStyle + + + + + name + Diff deleted + scope + markup.deleted + settings + + foreground + #f38ba8 + fontStyle + + + + + name + Diff inserted + scope + markup.inserted + settings + + foreground + #a6e3a1 + fontStyle + + + + + name + Diff changed + scope + markup.changed + settings + + foreground + #f9e2af + fontStyle + + + + + name + Message error + scope + message.error + settings + + foreground + #f38ba8 + fontStyle + + + + + uuid + 4d0379b5-ef82-467b-b8b8-365889420646 + colorSpaceName + sRGB + semanticClass + theme.dark.Catppuccin + author + BrunDerSchwarzmagier + + diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index c143d23..1a11c79 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -41,8 +41,10 @@ test -d ~/.tmux/pluginx/tpm || \ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm l common/zellij $c/zellij l common/fish $c/fish +l common/bat $c/bat l common/bash/rc $h/.bashrc l common/wezterm $c/wezterm +l common/kitty $c/kitty l common/weechat $h/.weechat l common/scim/rc $h/.scimrc l common/scim/lua $h/.scim/lua diff --git a/common/fish/config.fish b/common/fish/config.fish index 0d6cc64..f5b1b6d 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -10,7 +10,9 @@ for f in vars colors prompt functions key-bindings source $FISH_PATH/$f.fish end -if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish +if has_command rtx + rtx activate fish | source +else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish set --universal --export ASDF_DIR (brew --prefix asdf) source (brew --prefix asdf)/libexec/asdf.fish else if test -f $HOME/.asdf/asdf.fish diff --git a/common/helix/config.toml b/common/helix/config.toml index 22a010f..9eea2c4 100644 --- a/common/helix/config.toml +++ b/common/helix/config.toml @@ -30,6 +30,7 @@ D = "kill_to_line_end" "C-j" = "jump_view_down" "C-h" = "jump_view_left" "C-l" = "jump_view_right" +"C-q" = ":quit-all!" "L" = "repeat_last_motion" [keys.normal.space] diff --git a/common/kitty/kitty.conf b/common/kitty/kitty.conf new file mode 100644 index 0000000..9460ccd --- /dev/null +++ b/common/kitty/kitty.conf @@ -0,0 +1,144 @@ +font_family IosevkaLyteTerm +bold_font IosevkaLyteTerm Heavy +italic_font IosevkaLyteTerm Italic +bold_italic_font IosevkaLyteTerm Heavy Italic +font_size 12.5 + +symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono + +# use `kitty + list-fonts --psnames` to get the font's PostScript name + +allow_remote_control yes +listen_on unix:/tmp/kitty +repaint_delay 3 +input_delay 3 +sync_to_monitor yes + +adjust_line_height 0 +window_padding_width 10.0 +window_margin_width 0.0 + +confirm_os_window_close 0 + +enabled_layouts splits:split_axis=vertical + +map ctrl+shift+1 change_font_size all 12.5 +map ctrl+shift+2 change_font_size all 18.5 +map ctrl+shift+3 change_font_size all 26 + +map ctrl+shift+equal change_font_size all +0.5 +map ctrl+shift+minus change_font_size all -0.5 + +map shift+insert paste_from_clipboard +map ctrl+shift+v paste_from_selection +map ctrl+shift+c copy_to_clipboard + +map ctrl+shift+j launch --location=hsplit +map ctrl+shift+l launch --location=vsplit + +map ctrl+alt+shift+k move_window up +map ctrl+alt+shift+h move_window left +map ctrl+alt+shift+l move_window right +map ctrl+alt+shift+j move_window down + +map ctrl+h neighboring_window left +map ctrl+l neighboring_window right +map ctrl+k neighboring_window up +map ctrl+j neighboring_window down +map ctrl+shift+p nth_window -1 +map ctrl+shift+space>u kitten hints --type=url --program @ + +shell_integration disabled + +enable_audio_bell yes +visual_bell_duration 0.25 +visual_bell_color #333033 + +url_style single + +strip_trailing_spaces smart + +# open_url_modifiers ctrl + +tab_bar_align center +tab_bar_style separator +tab_separator "" +tab_bar_edge top +tab_title_template "{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} " + +## name: Catppuccin Kitty Mocha +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + +# The basic colors +foreground #CDD6F4 +background #1E1E2E +selection_foreground #1E1E2E +selection_background #F5E0DC + +# Cursor colors +cursor #F5E0DC +cursor_text_color #1E1E2E + +# URL underline color when hovering with mouse +url_color #F5E0DC + +# Kitty window border colors +active_border_color #74c7ec +inactive_border_color #181825 +bell_border_color #F9E2AF + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111B +active_tab_background #74c7ec +inactive_tab_foreground #CDD6F4 +inactive_tab_background #181825 +tab_bar_background #11111B + +# Colors for marks (marked text in the terminal) +mark1_foreground #1E1E2E +mark1_background #B4BEFE +mark2_foreground #1E1E2E +mark2_background #74c7ec +mark3_foreground #1E1E2E +mark3_background #74C7EC + +# The 16 terminal colors + +# black +color0 #45475A +color8 #585B70 + +# red +color1 #F38BA8 +color9 #F38BA8 + +# green +color2 #A6E3A1 +color10 #A6E3A1 + +# yellow +color3 #F9E2AF +color11 #F9E2AF + +# blue +color4 #89B4FA +color12 #89B4FA + +# magenta +color5 #F5C2E7 +color13 #F5C2E7 + +# cyan +color6 #94E2D5 +color14 #94E2D5 + +# white +color7 #BAC2DE +color15 #A6ADC8 diff --git a/common/nnn/plugins/preview b/common/nnn/plugins/preview index b058aec..c669951 100755 --- a/common/nnn/plugins/preview +++ b/common/nnn/plugins/preview @@ -1,18 +1,19 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash # Description: Terminal based file previewer # # Note: This plugin needs a "NNN_FIFO" to work. See man. # # Dependencies: -# - Supports 5 independent methods to preview with: +# - Supports 6 independent methods to preview with: # - tmux (>=3.0), or # - kitty with allow_remote_control and listen_on set in kitty.conf, or +# - wezterm (https://wezfurlong.org/wezterm), or # - QuickLook on WSL (https://github.com/QL-Win/QuickLook), or # - Windows Terminal (https://github.com/Microsoft/Terminal | https://aka.ms/terminal) with WSL, or -# - $TERMINAL set to a terminal (it's xterm by default). -# - less or $PAGER -# - tree or exa or ls +# - $NNN_TERMINAL set to a terminal (it's xterm by default). +# - less or $NNN_PAGER +# - tree or exa or (GNU) ls # - mediainfo or file # - mktemp # - unzip @@ -20,7 +21,7 @@ # - man # - optional: bsdtar or atool for additional archive preview # - optional: bat for code syntax highlighting -# - optional: ueberzug, kitty terminal, viu or catimg for images +# - optional: ueberzug, kitty terminal, wezterm terminal, viu, catimg or chafa for images # - optional: convert(ImageMagick) for playing gif preview (required for kitty image previews) # - optional: ffmpegthumbnailer for video thumbnails (https://github.com/dirkvdb/ffmpegthumbnailer) # - optional: ffmpeg for audio thumbnails @@ -31,14 +32,14 @@ # - optional: djvulibre for djvu # - optional: glow or lowdown for markdown # - optional: w3m or lynx or elinks for html -# - optional: set/export ICONLOOKUP as 1 to enable file icons in front of directory previews with .iconlookup -# Icons and colors are configureable in .iconlookup +# - optional: set/export NNN_ICONLOOKUP as 1 to enable file icons in front of directory previews with .iconlookup +# Icons and colors are configurable in .iconlookup # - optional: scope.sh file viewer from ranger. # 1. drop scope.sh executable in $PATH -# 2. set/export $USE_SCOPE as 1 +# 2. set/export $NNN_SCOPE as 1 # - optional: pistol file viewer (https://github.com/doronbehar/pistol). # 1. install pistol -# 2. set/export $USE_PISTOL as 1 +# 2. set/export $NNN_PISTOL as 1 # # Usage: # You need to set a NNN_FIFO path and a key for the plugin with NNN_PLUG, @@ -58,11 +59,7 @@ # # The previews will be shown in a tmux split. If that isn't possible, it # will try to use a kitty terminal split. And as a final fallback, a -# different terminal window will be used ($TERMINAL). -# -# Tmux and kitty users can configure $SPLIT to either "h" or "v" to set a -# 'h'orizontal split or a 'v'ertical split (as in, the line that splits the -# windows will be horizontal or vertical). +# different terminal window will be used ($NNN_TERMINAL). # # Kitty users need something similar to the following in their kitty.conf: # - `allow_remote_control yes` @@ -71,97 +68,114 @@ # With ImageMagick installed, this terminal can use the icat kitten to display images. # Refer to kitty documentation for further details. # -# Iterm2 users are recommended to use viu to view images without getting pixelated. +# Wezterm should work out of the box. If `NNN_PREVIEWIMGPROG` is not specified it will use +# built in iTerm2 image protocol. +# +# Note that GNU ls is used for its `--group-directories-first` flag. +# On MacOS this may be installed with `brew install coreutils`, or the flag can be removed. +# iTerm2 users are recommended to use viu to view images without getting pixelated. # # Windows Terminal users can set "Profile termination behavior" under "Profile > Advanced" settings -# to automaticaly close pane on quit when exit code is 0. +# to automatically close pane on quit when exit code is 0. # -# Shell: POSIX compliant +# When specifying a different terminal, additional arguments are supported. In particular, you can +# append a specific title to the terminal and set it to "nofocus" in your WM config. +# E.g for alacritty and i3, you can set $NNN_TERMINAL to 'alacritty --title preview-tui' and add +# 'no_focus [title="preview-tui"]' to your i3 config file. +# +# Shell: Bash (for environment manipulation through arrays) # Authors: Todd Yamakawa, Léo Villeveygoux, @Recidiviste, Mario Ortiz Manero, Luuk van Baal, @WanderLanz -#SPLIT="$SPLIT" # you can set a permanent split here -#TERMINAL="$TERMINAL" # same goes for the terminal -SPLIT_SIZE="${SPLIT_SIZE:-50}" # split size in percentage for supported previewers -USE_SCOPE="${USE_SCOPE:-0}" -USE_PISTOL="${USE_PISTOL:-0}" -ICONLOOKUP="${ICONLOOKUP:-0}" -PAGER="${PAGER:-less -P?n -R}" -TMPDIR="${TMPDIR:-/tmp}" -BAT_STYLE="${BAT_STYLE:-numbers}" -BAT_THEME="${BAT_THEME:-ansi}" -# Consider setting NNN_PREVIEWDIR to $XDG_CACHE_HOME/nnn/previews if you want to keep previews on disk between reboots -NNN_PREVIEWDIR="${NNN_PREVIEWDIR:-$TMPDIR/nnn/previews}" -NNN_PREVIEWWIDTH="${NNN_PREVIEWWIDTH:-1920}" -NNN_PREVIEWHEIGHT="${NNN_PREVIEWHEIGHT:-1080}" -NNN_PARENT="${NNN_FIFO#*.}" -[ "$NNN_PARENT" -eq "$NNN_PARENT" ] 2>/dev/null || NNN_PARENT="" -FIFOPID="$TMPDIR/nnn-preview-tui-fifopid.$NNN_PARENT" -PREVIEWPID="$TMPDIR/nnn-preview-tui-pagerpid.$NNN_PARENT" -CURSEL="$TMPDIR/nnn-preview-tui-selection.$NNN_PARENT" -FIFO_UEBERZUG="$TMPDIR/nnn-preview-tui-ueberzug-fifo.$NNN_PARENT" -POSOFFSET="$TMPDIR/nnn-preview-tui-posoffset" +NNN_SPLIT=${NNN_SPLIT:-} # Set permanent split direction +NNN_TERMINAL=${NNN_TERMINAL:-} # Set external terminal to be used +NNN_SPLITSIZE=${NNN_SPLITSIZE:-50} # Set previewer split size percentage +TMPDIR=${TMPDIR:-/tmp} +NNN_PARENT=${NNN_FIFO#*.} +[ "$NNN_PARENT" -eq "$NNN_PARENT" ] 2>/dev/null || NNN_PARENT="" # Make empty if non-numeric +ENVVARS=( + "PWD=$PWD" + "PATH=$PATH" + "NNN_FIFO=$NNN_FIFO" + "NNN_SCOPE=${NNN_SCOPE:-0}" + "NNN_PISTOL=${NNN_PISTOL:-0}" + "NNN_ICONLOOKUP=${NNN_ICONLOOKUP:-0}" + "NNN_PAGER=${NNN_PAGER:-less -P?n -R}" + "NNN_BATTHEME=${NNN_BATTHEME:-ansi}" + "NNN_BATSTYLE=${NNN_BATSTYLE:-numbers}" + "NNN_PREVIEWWIDTH=${NNN_PREVIEWWIDTH:-1920}" + "NNN_PREVIEWHEIGHT=${NNN_PREVIEWHEIGHT:-1080}" + "NNN_PREVIEWDIR=${NNN_PREVIEWDIR:-$TMPDIR/nnn/previews}" + "NNN_PREVIEWIMGPROG=${NNN_PREVIEWIMGPROG:-}" + "FIFOPID=$TMPDIR/nnn-preview-tui-fifopid.$NNN_PARENT" + "FIFOPATH=$TMPDIR/nnn-preview-tui-fifo.$NNN_PARENT" + "PREVIEWPID=$TMPDIR/nnn-preview-tui-previewpid.$NNN_PARENT" + "CURSEL=$TMPDIR/nnn-preview-tui-selection.$NNN_PARENT" + "FIFO_UEBERZUG=$TMPDIR/nnn-preview-tui-ueberzug-fifo.$NNN_PARENT" + "POSOFFSET=$TMPDIR/nnn-preview-tui-posoffset" +) +trap '' PIPE exists() { type "$1" >/dev/null 2>&1 ;} pkill() { command pkill "$@" >/dev/null 2>&1 ;} -pidkill() { [ -f "$1" ] && kill "$(cat "$1")" >/dev/null 2>&1 ;} -prompt() { printf "%b" "$@"; cfg=$(stty -g); stty raw -echo; head -c 1; stty "$cfg" ;} +prompt() { clear; printf "%b" "$@"; cfg=$(stty -g); stty raw -echo; head -c 1; stty "$cfg" ;} +pidkill() { + if [ -f "$1" ]; then + PID="$(cat "$1" 2>/dev/null)" || return 1 + kill "$PID" >/dev/null 2>&1 + RET=$? + wait "$PID" 2>/dev/null + return $RET + fi + return 1 +} start_preview() { - [ "$PAGER" = "most" ] && PAGER="less -R" - if [ -e "${TMUX%%,*}" ] && tmux -V | grep -q '[ -][3456789]\.'; then - TERMINAL=tmux + NNN_TERMINAL=tmux elif [ -n "$KITTY_LISTEN_ON" ]; then - TERMINAL=kitty - elif [ -z "$TERMINAL" ] && [ "$TERM_PROGRAM" = "iTerm.app" ]; then - TERMINAL=iterm + NNN_TERMINAL=kitty + elif [ -n "$WEZTERM_PANE" ]; then + NNN_TERMINAL=wezterm + elif [ -z "$NNN_TERMINAL" ] && [ "$TERM_PROGRAM" = "iTerm.app" ]; then + NNN_TERMINAL=iterm elif [ -n "$WT_SESSION" ]; then - TERMINAL=winterm + NNN_TERMINAL=winterm else - TERMINAL="${TERMINAL:-xterm}" + NNN_TERMINAL="${NNN_TERMINAL:-xterm}" fi - if [ -z "$SPLIT" ] && [ $(($(tput lines) * 2)) -gt "$(tput cols)" ]; then - SPLIT='h' - elif [ "$SPLIT" != 'h' ]; then - SPLIT='v' + if [ -z "$NNN_SPLIT" ] && [ $(($(tput lines) * 2)) -gt "$(tput cols)" ]; then + NNN_SPLIT='h' + elif [ "$NNN_SPLIT" != 'h' ]; then + NNN_SPLIT='v' fi - case "$TERMINAL" in + ENVVARS+=("NNN_TERMINAL=$NNN_TERMINAL" "NNN_SPLIT=$NNN_SPLIT" "QLPATH=$2" "PREVIEW_MODE=1") + case "$NNN_TERMINAL" in + iterm|winterm) # need run in separate shell command: escape + ENVVARS=("${ENVVARS[@]/#/\\\"}") + ENVVARS=("${ENVVARS[@]/%/\\\"}") + command="$SHELL -c 'env ${ENVVARS[*]} \\\"$0\\\" \\\"$1\\\"'" ;; + esac + + case "$NNN_TERMINAL" in tmux) # tmux splits are inverted - if [ "$SPLIT" = "v" ]; then DSPLIT="h"; else DSPLIT="v"; fi - DSPLIT="$SPLIT" - tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -e "CURSEL=$CURSEL" \ - -e "TMPDIR=$TMPDIR" -e "FIFOPID=$FIFOPID" -e "POSOFFSET=$POSOFFSET" \ - -e "BAT_STYLE=$BAT_STYLE" -e "BAT_THEME=$BAT_THEME" -e "PREVIEWPID=$PREVIEWPID" \ - -e "PAGER=$PAGER" -e "ICONLOOKUP=$ICONLOOKUP" -e "NNN_PREVIEWWIDTH=$NNN_PREVIEWWIDTH" \ - -e "USE_SCOPE=$USE_SCOPE" -e "SPLIT=$SPLIT" -e "USE_PISTOL=$USE_PISTOL" \ - -e "NNN_PREVIEWDIR=$NNN_PREVIEWDIR" -e "NNN_PREVIEWHEIGHT=$NNN_PREVIEWHEIGHT" \ - -e "FIFO_UEBERZUG=$FIFO_UEBERZUG" -e "QLPATH=$2" -d"$DSPLIT" -p"$SPLIT_SIZE" "$0" "$1" ;; + ENVVARS=("${ENVVARS[@]/#/-e}") + if [ "$NNN_SPLIT" = "v" ]; then split="h"; else split="v"; fi + tmux split-window "${ENVVARS[@]}" -d"$split" -p"$NNN_SPLITSIZE" "$0" "$1" ;; kitty) # Setting the layout for the new window. It will be restored after the script ends. + ENVVARS=("${ENVVARS[@]/#/--env=}") kitty @ goto-layout splits - # Trying to use kitty's integrated window management as the split window. All - # environmental variables that will be used in the new window must be explicitly passed. - kitty @ launch --no-response --title "nnn preview" --keep-focus \ - --cwd "$PWD" --env "PATH=$PATH" --env "NNN_FIFO=$NNN_FIFO" \ - --env "PREVIEW_MODE=1" --env "PAGER=$PAGER" --env "TMPDIR=$TMPDIR" \ - --env "USE_SCOPE=$USE_SCOPE" --env "SPLIT=$SPLIT" --env "TERMINAL=$TERMINAL"\ - --env "PREVIEWPID=$PREVIEWPID" --env "FIFO_UEBERZUG=$FIFO_UEBERZUG" \ - --env "ICONLOOKUP=$ICONLOOKUP" --env "NNN_PREVIEWHEIGHT=$NNN_PREVIEWHEIGHT" \ - --env "NNN_PREVIEWWIDTH=$NNN_PREVIEWWIDTH" --env "NNN_PREVIEWDIR=$NNN_PREVIEWDIR" \ - --env "USE_PISTOL=$USE_PISTOL" --env "BAT_STYLE=$BAT_STYLE" \ - --env "BAT_THEME=$BAT_THEME" --env "FIFOPID=$FIFOPID" \ - --env "CURSEL=$CURSEL" --location "${SPLIT}split" "$0" "$1" ;; + # Trying to use kitty's integrated window management as the split window. + kitty @ launch --no-response --title "preview-tui" --keep-focus \ + --cwd "$PWD" "${ENVVARS[@]}" --location "${NNN_SPLIT}split" "$0" "$1" ;; + wezterm) + export "${ENVVARS[@]}" + if [ "$NNN_SPLIT" = "v" ]; then split="--horizontal"; else split="--bottom"; fi + wezterm cli split-pane --cwd "$PWD" $split --percent "$NNN_SPLITSIZE" "$0" "$1" >/dev/null + wezterm cli activate-pane-direction Prev ;; iterm) - command="$SHELL -c 'cd $PWD; \ - PATH=\\\"$PATH\\\" NNN_FIFO=\\\"$NNN_FIFO\\\" PREVIEW_MODE=1 PAGER=\\\"$PAGER\\\" \ - USE_SCOPE=\\\"$USE_SCOPE\\\" SPLIT=\\\"$SPLIT\\\" TERMINAL=\\\"$TERMINAL\\\" \ - PREVIEWPID=\\\"$PREVIEWPID\\\" CURSEL=\\\"$CURSEL\\\" TMPDIR=\\\"$TMPDIR\\\" \ - ICONLOOKUP=\\\"$ICONLOOKUP\\\" NNN_PREVIEWHEIGHT=\\\"$NNN_PREVIEWHEIGHT\\\" \ - NNN_PREVIEWWIDTH=\\\"$NNN_PREVIEWWIDTH\\\" NNN_PREVIEWDIR=\\\"$NNN_PREVIEWDIR\\\" \ - USE_PISTOL=\\\"$USE_PISTOL\\\" BAT_STYLE=\\\"$BAT_STYLE\\\" \ - BAT_THEME=\\\"$BAT_THEME\\\" FIFOPID=\\\"$FIFOPID\\\" \\\"$0\\\" \\\"$1\\\"'" - if [ "$SPLIT" = "h" ]; then split="horizontally"; else split="vertically"; fi + if [ "$NNN_SPLIT" = "h" ]; then split="horizontally"; else split="vertically"; fi osascript <<-EOF tell application "iTerm" tell current session of current window @@ -171,25 +185,19 @@ start_preview() { EOF ;; winterm) - if [ "$SPLIT" = "h" ]; then split="H"; else split="V"; fi - cmd.exe /c wt -w 0 sp -$split -s$((SPLIT_SIZE / 100)) bash -c "cd $PWD \; \ - PATH='$PATH' NNN_FIFO=$NNN_FIFO PREVIEW_MODE=1 CURSEL=$CURSEL TMPDIR=$TMPDIR \ - FIFOPID=$FIFOPID BAT_STYLE=$BAT_STYLE BAT_THEME=$BAT_THEME PREVIEWPID=$PREVIEWPID \ - PAGER='$PAGER' ICONLOOKUP=$ICONLOOKUP NNN_PREVIEWWIDTH=$NNN_PREVIEWWIDTH \ - USE_SCOPE=$USE_SCOPE SPLIT=$SPLIT USE_PISTOL=$USE_PISTOL \ - NNN_PREVIEWDIR=$NNN_PREVIEWDIR NNN_PREVIEWHEIGHT=$NNN_PREVIEWHEIGHT \ - FIFO_UEBERZUG=$FIFO_UEBERZUG QLPATH=$2 $0 $1" \; -w 0 mf previous - ;; + if [ "$NNN_SPLIT" = "h" ]; then split="H"; else split="V"; fi + wt -w 0 sp -$split -s"0.$NNN_SPLITSIZE" "$command" \; -w 0 mf previous 2>/dev/null ;; *) if [ -n "$2" ]; then - QUICKLOOK=1 QLPATH="$2" PREVIEW_MODE=1 "$0" "$1" & + env "${ENVVARS[@]}" QUICKLOOK=1 "$0" "$1" & else - PREVIEWPID="$PREVIEWPID" CURSEL="$CURSEL" PREVIEW_MODE=1 \ - FIFOPID="$FIFOPID" FIFO_UEBERZUG="$FIFO_UEBERZUG" $TERMINAL -e "$0" "$1" & + # shellcheck disable=SC2086 # (allow arguments) + env "${ENVVARS[@]}" $NNN_TERMINAL -e "$0" "$1" & fi ;; esac } toggle_preview() { + export "${ENVVARS[@]}" if exists QuickLook.exe; then QLPATH="QuickLook.exe" elif exists Bridge.exe; then @@ -212,28 +220,27 @@ fifo_pager() { cmd="$1" shift - # We use a FIFO to access $PAGER PID in jobs control - tmpfifopath="$TMPDIR/nnn-preview-tui-fifo.$$" - mkfifo "$tmpfifopath" || return + # We use a FIFO to access $NNN_PAGER PID in jobs control + mkfifo "$FIFOPATH" || return - $PAGER < "$tmpfifopath" & + $NNN_PAGER < "$FIFOPATH" & printf "%s" "$!" > "$PREVIEWPID" ( - exec > "$tmpfifopath" + exec > "$FIFOPATH" if [ "$cmd" = "pager" ]; then if exists bat; then bat --terminal-width="$cols" --decorations=always --color=always \ - --paging=never --style="$BAT_STYLE" --theme="$BAT_THEME" "$@" & + --paging=never --style="$NNN_BATSTYLE" --theme="$NNN_BATTHEME" "$@" & else - $PAGER "$@" & + $NNN_PAGER "$@" & fi else "$cmd" "$@" & fi ) - rm "$tmpfifopath" + rm "$FIFOPATH" } # Binary file: show file info inside the pager @@ -255,7 +262,7 @@ handle_mime() { video/*) generate_preview "$cols" "$lines" "$1" "video" ;; audio/*) generate_preview "$cols" "$lines" "$1" "audio" ;; application/font*|application/*opentype|font/*) generate_preview "$cols" "$lines" "$1" "font" ;; - */*office*|*/*document*) generate_preview "$cols" "$lines" "$1" "office" ;; + */*office*|*/*document*|*/*msword|*/*ms-excel) generate_preview "$cols" "$lines" "$1" "office" ;; application/zip) fifo_pager unzip -l "$1" ;; text/troff) if exists man; then @@ -307,13 +314,13 @@ handle_ext() { preview_file() { clear # Trying to use pistol if it's available. - if [ "$USE_PISTOL" -ne 0 ] && exists pistol; then + if [ "$NNN_PISTOL" -ne 0 ] && exists pistol; then fifo_pager pistol "$1" return fi # Trying to use scope.sh if it's available. - if [ "$USE_SCOPE" -ne 0 ] && exists scope.sh; then + if [ "$NNN_SCOPE" -ne 0 ] && exists scope.sh; then fifo_pager scope.sh "$1" "$cols" "$lines" "$(mktemp -d)" "True" return fi @@ -335,8 +342,8 @@ preview_file() { # Otherwise, falling back to the defaults. if [ -d "$1" ]; then cd "$1" || return - if [ "$ICONLOOKUP" -ne 0 ] && [ -f "$(dirname "$0")"/.iconlookup ]; then - [ "$SPLIT" = v ] && BSTR="\n" + if [ "$NNN_ICONLOOKUP" -ne 0 ] && [ -f "$(dirname "$0")"/.iconlookup ]; then + [ "$NNN_SPLIT" = v ] && BSTR="\n" # shellcheck disable=SC2012 ls -F --group-directories-first | head -n "$((lines - 3))" | "$(dirname "$0")"/.iconlookup -l "$cols" -B "$BSTR" -b " " elif exists tree; then @@ -346,6 +353,7 @@ preview_file() { else fifo_pager ls -F --group-directories-first --color=always fi + cd .. elif [ "${encoding#*)}" = "binary" ]; then handle_mime "$1" "$mimetype" "$ext" "bin" else @@ -406,15 +414,18 @@ generate_preview() { image_preview() { clear exec >/dev/tty - if [ "$TERMINAL" = "kitty" ]; then - # Kitty terminal users can use the native image preview method + if [ "$NNN_TERMINAL" = "kitty" ] && [ -z "$NNN_PREVIEWIMGPROG" ]; then kitty +kitten icat --silent --scale-up --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no "$3" & - elif exists ueberzug; then + elif [ "$NNN_TERMINAL" = "wezterm" ] && [ -z "$NNN_PREVIEWIMGPROG" ]; then + wezterm imgcat "$3" & + elif exists ueberzug && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "ueberzug" ] ;}; then ueberzug_layer "$1" "$2" "$3" && return - elif exists catimg; then + elif exists catimg && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "catimg" ] ;}; then catimg "$3" & - elif exists viu; then + elif exists viu && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "viu" ] ;}; then viu -t "$3" & + elif exists chafa && { [ -z "$NNN_PREVIEWIMGPROG" ] || [ "$NNN_PREVIEWIMGPROG" = "chafa" ] ;}; then + chafa "$3" & else fifo_pager print_bin_info "$3" && return fi @@ -455,8 +466,8 @@ preview_fifo() { pkill -P "$$" } -if [ "$PREVIEW_MODE" ]; then - if [ "$TERMINAL" != "kitty" ] && exists ueberzug; then +if [ "$PREVIEW_MODE" -eq 1 ] 2>/dev/null; then + if [ "$NNN_TERMINAL" != "kitty" ] && exists ueberzug; then mkfifo "$FIFO_UEBERZUG" tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json & fi @@ -471,11 +482,9 @@ if [ "$PREVIEW_MODE" ]; then exit 0 else if [ ! -r "$NNN_FIFO" ]; then - clear - prompt "No FIFO available! (\$NNN_FIFO='$NNN_FIFO')\nPlease read Usage in preview-tui." + prompt "No FIFO available! (\$NNN_FIFO='$NNN_FIFO')\nPlease read Usage in '$0'." elif [ "$KITTY_WINDOW_ID" ] && [ -z "$TMUX" ] && [ -z "$KITTY_LISTEN_ON" ]; then - clear - prompt "\$KITTY_LISTEN_ON not set!\nPlease read Usage in preview-tui." + prompt "\$KITTY_LISTEN_ON not set!\nPlease read Usage in '$0'." else toggle_preview "$1" & fi diff --git a/common/wezterm/wezterm.lua b/common/wezterm/wezterm.lua index abb2222..37c6e57 100644 --- a/common/wezterm/wezterm.lua +++ b/common/wezterm/wezterm.lua @@ -79,6 +79,11 @@ config.keys = { mods = 'CTRL|SHIFT|ALT', action = wezterm.action.ShowDebugOverlay }, + { + key = 'r', + mods = 'CTRL|SHIFT|ALT', + action = wezterm.action.RotatePanes'Clockwise' + }, } -- config.default_gui_startup_args = { 'connect', 'unix' } diff --git a/host/desktop/hyprland.d.cond b/host/desktop/hyprland.d.cond deleted file mode 100644 index 8b13789..0000000 --- a/host/desktop/hyprland.d.cond +++ /dev/null @@ -1 +0,0 @@ - diff --git a/host/desktop/hyprland.d.conf b/host/desktop/hyprland.d.conf index 9ec8cd7..91e062d 100644 --- a/host/desktop/hyprland.d.conf +++ b/host/desktop/hyprland.d.conf @@ -1,5 +1,5 @@ source = ~/.config/hypr/hyprland.conf -monitor=DP-1,3840x2160@60,0x0,1.5,transform,3 -monitor=DP-2,3840x2160@60,5280x0,1.5,transform,3 +monitor=DP-1,3840x2160@60,5280x0,1.5,transform,3 +monitor=DP-2,3840x2160@60,0x0,1.5,transform,3 monitor=DP-3,3840x2160@120,1440x0,1 diff --git a/os/linux/hypr/hyprland.conf b/os/linux/hypr/hyprland.conf index bdb67ea..92093ce 100644 --- a/os/linux/hypr/hyprland.conf +++ b/os/linux/hypr/hyprland.conf @@ -4,7 +4,7 @@ monitor=,preferred,auto,auto # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch -exec-once = firefox & wezterm & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1 & eww daemon & eww open-many bar +exec-once = firefox & kitty --single-instance & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1 & eww daemon & eww open-many bar exec-once = swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f' exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP @@ -50,7 +50,7 @@ general { no_cursor_warps = true resize_on_border = true - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.active_border = rgba(74c7ecff) 45deg col.inactive_border = rgba(59595988) layout = dwindle @@ -123,8 +123,8 @@ gestures { $mainMod = SUPER # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, return, exec, wezterm -bind = $mainMod SHIFT, return, exec, wezterm start --always-new-process +bind = $mainMod, return, exec, kitty --single-instance +bind = $mainMod SHIFT, return, exec, kitty bind = $mainMod, U, exec, firefox bind = $mainMod, space, exec, wofi --show drun bind = $mainMod, C, killactive,