commit 10db59de2a805e1aa951aa1c9a4e6cb548a28f94 Author: Evie Litherland-Smith Date: Sat May 11 13:55:23 2024 +0100 Initial add of copied files Probably not in a working state at the moment, but home-manager will build. Needs proper configuring to be used diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9eb700d --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*~ +.\#* +\#*\# +*.swp +.python-version +.DS_Store +__pycache__ +.direnv +*.html diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..440061b --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +call_parentheses = "None" +collapse_simple_statement = "Always" diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..bb4363f --- /dev/null +++ b/default.nix @@ -0,0 +1,40 @@ +{pkgs, ...}: { + imports = [ + ./bat/default.nix + ./git/default.nix + ./ssh/default.nix + ./zsh/default.nix + ./starship/default.nix + ./bottom/default.nix + ./emacs/default.nix + ./scripts/default.nix + ]; + programs = { + bash.enable = true; + carapace.enable = true; + eza = { + enable = true; + enableAliases = true; + git = true; + icons = true; + extraOptions = ["--octal-permissions"]; + }; + readline = { + enable = true; + includeSystemConfig = true; + extraConfig = '' + set completion-ignore-case On + ''; + }; + direnv = { + enable = true; + nix-direnv.enable = true; + }; + fzf = { + enable = true; + defaultCommand = "${pkgs.fd}/bin/fd --type f"; + changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; + fileWidgetCommand = "${pkgs.fd}/bin/fd --type f"; + }; + }; +} diff --git a/desktop.nix b/desktop.nix new file mode 100644 index 0000000..ebfa828 --- /dev/null +++ b/desktop.nix @@ -0,0 +1,86 @@ +{ + config, + lib, + pkgs, + catppuccinVariant ? "Mocha", + ... +}: { + imports = [ + ./default.nix + ./email/default.nix + ./password-store/default.nix + ./wlogout/default.nix + ./waybar/default.nix + ./rofi/default.nix + ./swaylock/default.nix + ./swaync/default.nix + ./avizo/default.nix + ./alacritty/default.nix + ./emacs/default.nix + ./nyxt/default.nix + ./obs/default.nix + ./cava/default.nix + ./prog/default.nix + ]; + programs.rofi.terminal = "${config.programs.alacritty.package}/bin/alacritty"; + services = { + gpg-agent.pinentryFlavor = "gtk2"; + avizo.enable = true; + syncthing.enable = true; + udiskie = { + enable = true; + notify = true; + automount = true; + tray = "never"; + }; + }; + gtk = with lib.strings; let + accent = "Lavender"; + size = "Standard"; + in { + enable = true; + iconTheme = { + package = pkgs.catppuccin-papirus-folders.override { + accent = toLower accent; + flavor = toLower catppuccinVariant; + }; + name = "Papirus-Dark"; + }; + cursorTheme = let + variant = "${lib.strings.toLower catppuccinVariant}Dark"; + in { + package = pkgs.catppuccin-cursors.${variant}; + name = "Catppuccin-${catppuccinVariant}-Dark-Cursors"; + size = 32; + }; + theme = { + package = with lib.strings; + pkgs.catppuccin-gtk.override { + accents = [(toLower accent)]; + size = toLower size; + variant = toLower catppuccinVariant; + }; + name = "Catppuccin-${catppuccinVariant}-${size}-${accent}-Dark"; + }; + }; + xresources.properties = with config.scheme.withHashtag; { + "*background" = base00; + "*foreground" = base05; + "*color0" = base00; + "*color1" = red; + "*color2" = green; + "*color3" = yellow; + "*color4" = blue; + "*color5" = magenta; + "*color6" = cyan; + "*color7" = base04; + "*color8" = base01; + "*color9" = red; + "*color10" = green; + "*color11" = yellow; + "*color12" = blue; + "*color13" = magenta; + "*color14" = cyan; + "*color15" = base05; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..50ad99e --- /dev/null +++ b/flake.lock @@ -0,0 +1,136 @@ +{ + "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1709025227, + "narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715381426, + "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-23.11", + "repo": "home-manager", + "type": "github" + } + }, + "iosevka-custom": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1710589819, + "narHash": "sha256-fm69qycthevGExpbudpuCCSEBPuCOk/+d15382c37oE=", + "ref": "refs/heads/main", + "rev": "6e305fa1d05a97343d47f0b6865e10a870fc8d4e", + "revCount": 10, + "type": "git", + "url": "https://git.xenia.me.uk/pixelifytica/iosevka.git" + }, + "original": { + "type": "git", + "url": "https://git.xenia.me.uk/pixelifytica/iosevka.git" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1710451336, + "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d691274a972b3165335d261cc4671335f5c67de9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1715218190, + "narHash": "sha256-R98WOBHkk8wIi103JUVQF3ei3oui4HvoZcz9tYOAwlk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "9a9960b98418f8c385f52de3b09a63f9c561427a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "base16": "base16", + "home-manager": "home-manager", + "iosevka-custom": "iosevka-custom", + "nixpkgs": "nixpkgs_2", + "tt-schemes": "tt-schemes" + } + }, + "tt-schemes": { + "flake": false, + "locked": { + "lastModified": 1713388094, + "narHash": "sha256-wcotm0Ek2ISn8iJBzEujJQdcPLKWrPAOZ/dS/DLKafw=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "abcf2a055ae69f1bf047463332f83db3125aa8a5", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f998ef3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,71 @@ +{ + description = ""; + + nixConfig = { + extra-substituters = ["https://nix.xenia.me.uk"]; + extra-trusted-public-keys = ["nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI="]; + }; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + home-manager = { + url = "github:nix-community/home-manager/release-23.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git"; + base16.url = "github:SenchoPens/base16.nix"; + tt-schemes = { + url = "github:tinted-theming/schemes"; + flake = false; + }; + }; + + outputs = { + nixpkgs, + home-manager, + iosevka-custom, + base16, + tt-schemes, + ... + }: let + pkgs = import nixpkgs {system = "x86_64-linux";}; + extraSpecialArgs = { + inherit tt-schemes; + accentColour = "base07"; # catppuccin lavender + catppuccinVariant = "Mocha"; + fonts = with pkgs; + with iosevka-custom.outputs; rec { + sizes = { + applications = 12; + desktop = 10; + popups = 14; + terminal = 12; + }; + serif = sansSerif; + sansSerif = { + name = names."iosevka-custom-aile"; + package = packages.${system}."iosevka-custom-aile"; + }; + monospace = { + name = names."iosevka-custom-nerdfont"; + package = packages.${system}."iosevka-custom-nerdfont"; + }; + emoji = { + name = "Noto Color Emoji"; + package = noto-fonts-emoji; + }; + }; + }; + in { + inherit (home-manager) defaultPackage; + homeConfigurations = { + "pixelifytica" = home-manager.lib.homeManagerConfiguration { + inherit pkgs extraSpecialArgs; + modules = [ + base16.homeManagerModule + ./home.nix + ]; + }; + }; + }; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..91a7f46 --- /dev/null +++ b/home.nix @@ -0,0 +1,20 @@ +{ + lib, + config, + pkgs, + tt-schemes, + catppuccinVariant, + ... +}: { + imports = [ + ./home/default.nix + /etc/nixos/hosts/Northstar/home.nix + ]; + programs.home-manager.enable = true; + scheme = "${tt-schemes}/base16/catppuccin-${lib.strings.toLower catppuccinVariant}.yaml"; + home = rec { + username = "pixelifytica"; + homeDirectory = "/home/${username}"; + stateVersion = "23.05"; + }; +} diff --git a/programs/alacritty/catppuccin-mocha.toml b/programs/alacritty/catppuccin-mocha.toml new file mode 100644 index 0000000..1dfe857 --- /dev/null +++ b/programs/alacritty/catppuccin-mocha.toml @@ -0,0 +1,75 @@ +[colors.primary] +background = "#1E1E2E" +foreground = "#CDD6F4" +dim_foreground = "#CDD6F4" +bright_foreground = "#CDD6F4" + +[colors.cursor] +text = "#1E1E2E" +cursor = "#F5E0DC" + +[colors.vi_mode_cursor] +text = "#1E1E2E" +cursor = "#B4BEFE" + +[colors.search.matches] +foreground = "#1E1E2E" +background = "#A6ADC8" + +[colors.search.focused_match] +foreground = "#1E1E2E" +background = "#A6E3A1" + +[colors.footer_bar] +foreground = "#1E1E2E" +background = "#A6ADC8" + +[colors.hints.start] +foreground = "#1E1E2E" +background = "#F9E2AF" + +[colors.hints.end] +foreground = "#1E1E2E" +background = "#A6ADC8" + +[colors.selection] +text = "#1E1E2E" +background = "#F5E0DC" + +[colors.normal] +black = "#45475A" +red = "#F38BA8" +green = "#A6E3A1" +yellow = "#F9E2AF" +blue = "#89B4FA" +magenta = "#F5C2E7" +cyan = "#94E2D5" +white = "#BAC2DE" + +[colors.bright] +black = "#585B70" +red = "#F38BA8" +green = "#A6E3A1" +yellow = "#F9E2AF" +blue = "#89B4FA" +magenta = "#F5C2E7" +cyan = "#94E2D5" +white = "#A6ADC8" + +[colors.dim] +black = "#45475A" +red = "#F38BA8" +green = "#A6E3A1" +yellow = "#F9E2AF" +blue = "#89B4FA" +magenta = "#F5C2E7" +cyan = "#94E2D5" +white = "#BAC2DE" + +[[colors.indexed_colors]] +index = 16 +color = "#FAB387" + +[[colors.indexed_colors]] +index = 17 +color = "#F5E0DC" diff --git a/programs/alacritty/default.nix b/programs/alacritty/default.nix new file mode 100644 index 0000000..c84145d --- /dev/null +++ b/programs/alacritty/default.nix @@ -0,0 +1,30 @@ +{fonts, ...}: { + programs.alacritty = let + catppuccin-mocha = builtins.fromTOML (builtins.readFile ./catppuccin-mocha.toml); + in { + enable = true; + settings = + { + font = { + size = fonts.sizes.applications; + normal = { + family = fonts.monospace.name; + style = "Regular"; + }; + }; + window = { + opacity = 0.8; + dynamic_title = true; + padding = { + x = 10; + y = 10; + }; + decorations = "none"; + }; + live_config_reload = false; + selection.save_to_clipboard = true; + mouse.hide_when_typing = false; + } + // catppuccin-mocha; + }; +} diff --git a/programs/bat/catppuccinFrappe.tmTheme b/programs/bat/catppuccinFrappe.tmTheme new file mode 100644 index 0000000..7e74c6c --- /dev/null +++ b/programs/bat/catppuccinFrappe.tmTheme @@ -0,0 +1,2021 @@ + + + + + name + Catppuccin Frappé + semanticClass + theme.dark.catppuccin-frappé + uuid + e0ada983-8938-490c-86f0-97a1a0ec58e4 + author + Catppuccin Org + colorSpaceName + sRGB + settings + + + settings + + background + #303446 + foreground + #c6d0f5 + caret + #f2d5cf + lineHighlight + #c6d0f512 + misspelling + #e78284 + accent + #ca9ee6 + selection + #949cbb40 + activeGuide + #51576d + findHighlight + #506373 + gutterForeground + #838ba7 + + + + name + Basic text & variable names (incl. leading punctuation) + scope + text, source, variable.other.readwrite, punctuation.definition.variable + settings + + foreground + #c6d0f5 + + + + name + Parentheses, Brackets, Braces + scope + punctuation + settings + + foreground + #949cbb + fontStyle + + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #737994 + fontStyle + italic + + + + scope + string, punctuation.definition.string + settings + + foreground + #a6d189 + + + + scope + constant.character.escape + settings + + foreground + #f4b8e4 + + + + name + Booleans, constants, numbers + scope + constant.numeric, variable.other.constant, entity.name.constant, constant.language.boolean, constant.language.false, constant.language.true, keyword.other.unit.user-defined, keyword.other.unit.suffix.floating-point + settings + + foreground + #ef9f76 + + + + scope + keyword, keyword.operator.word, keyword.operator.new, variable.language.super, support.type.primitive, storage.type, storage.modifier, punctuation.definition.keyword + settings + + foreground + #ca9ee6 + fontStyle + + + + + scope + entity.name.tag.documentation + settings + + foreground + #ca9ee6 + + + + name + Punctuation + scope + keyword.operator, punctuation.accessor, punctuation.definition.generic, meta.function.closure punctuation.section.parameters, punctuation.definition.tag, punctuation.separator.key-value + settings + + foreground + #81c8be + + + + scope + entity.name.function, meta.function-call.method, support.function, support.function.misc, variable.function + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Classes + scope + entity.name.class, entity.other.inherited-class, support.class, meta.function-call.constructor, entity.name.struct + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Enum + scope + entity.name.enum + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Enum member + scope + meta.enum variable.other.readwrite, variable.other.enummember + settings + + foreground + #81c8be + + + + name + Object properties + scope + meta.property.object + settings + + foreground + #81c8be + + + + name + Types + scope + meta.type, meta.type-alias, support.type, entity.name.type + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Decorators + scope + meta.annotation variable.function, meta.annotation variable.annotation.function, meta.annotation punctuation.definition.annotation, meta.decorator, punctuation.decorator + settings + + foreground + #ef9f76 + + + + scope + variable.parameter, meta.function.parameters + settings + + foreground + #ea999c + fontStyle + italic + + + + name + Built-ins + scope + constant.language, support.function.builtin + settings + + foreground + #e78284 + + + + scope + entity.other.attribute-name.documentation + settings + + foreground + #e78284 + + + + name + Preprocessor directives + scope + keyword.control.directive, punctuation.definition.directive + settings + + foreground + #e5c890 + + + + name + Type parameters + scope + punctuation.definition.typeparameters + settings + + foreground + #99d1db + + + + name + Namespaces + scope + entity.name.namespace + settings + + foreground + #e5c890 + + + + name + Property names (left hand assignments in json/yaml/css) + scope + support.type.property-name.css + settings + + foreground + #8caaee + fontStyle + + + + + name + This/Self keyword + scope + variable.language.this, variable.language.this punctuation.definition.variable + settings + + foreground + #e78284 + + + + name + Object properties + scope + variable.object.property + settings + + foreground + #c6d0f5 + + + + name + String template interpolation + scope + string.template variable, string variable + settings + + foreground + #c6d0f5 + + + + name + `new` as bold + scope + keyword.operator.new + settings + + fontStyle + bold + + + + name + C++ extern keyword + scope + storage.modifier.specifier.extern.cpp + settings + + foreground + #ca9ee6 + + + + name + C++ scope resolution + scope + entity.name.scope-resolution.template.call.cpp, entity.name.scope-resolution.parameter.cpp, entity.name.scope-resolution.cpp, entity.name.scope-resolution.function.definition.cpp + settings + + foreground + #e5c890 + + + + name + C++ doc keywords + scope + storage.type.class.doxygen + settings + + fontStyle + + + + + name + C++ operators + scope + storage.modifier.reference.cpp + settings + + foreground + #81c8be + + + + name + C# Interpolated Strings + scope + meta.interpolation.cs + settings + + foreground + #c6d0f5 + + + + name + C# xml-style docs + scope + comment.block.documentation.cs + settings + + foreground + #c6d0f5 + + + + name + Classes, reflecting the className color in JSX + scope + source.css entity.other.attribute-name.class.css, entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css + settings + + foreground + #e5c890 + + + + name + Operators + scope + punctuation.separator.operator.css + settings + + foreground + #81c8be + + + + name + Pseudo classes + scope + source.css entity.other.attribute-name.pseudo-class + settings + + foreground + #81c8be + + + + scope + source.css constant.other.unicode-range + settings + + foreground + #ef9f76 + + + + scope + source.css variable.parameter.url + settings + + foreground + #a6d189 + fontStyle + + + + + name + CSS vendored property names + scope + support.type.vendored.property-name + settings + + foreground + #99d1db + + + + name + Less/SCSS right-hand variables (@/$-prefixed) + scope + source.css meta.property-value variable, source.css meta.property-value variable.other.less, source.css meta.property-value variable.other.less punctuation.definition.variable.less, meta.definition.variable.scss + settings + + foreground + #ea999c + + + + name + CSS variables (--prefixed) + scope + source.css meta.property-list variable, meta.property-list variable.other.less, meta.property-list variable.other.less punctuation.definition.variable.less + settings + + foreground + #8caaee + + + + name + CSS Percentage values, styled the same as numbers + scope + keyword.other.unit.percentage.css + settings + + foreground + #ef9f76 + + + + name + CSS Attribute selectors, styled the same as strings + scope + source.css meta.attribute-selector + settings + + foreground + #a6d189 + + + + name + JSON/YAML keys, other left-hand assignments + scope + keyword.other.definition.ini, punctuation.support.type.property-name.json, support.type.property-name.json, punctuation.support.type.property-name.toml, support.type.property-name.toml, entity.name.tag.yaml, punctuation.support.type.property-name.yaml, support.type.property-name.yaml + settings + + foreground + #8caaee + fontStyle + + + + + name + JSON/YAML constants + scope + constant.language.json, constant.language.yaml + settings + + foreground + #ef9f76 + + + + name + YAML anchors + scope + entity.name.type.anchor.yaml, variable.other.alias.yaml + settings + + foreground + #e5c890 + fontStyle + + + + + name + TOML tables / ini groups + scope + support.type.property-name.table, entity.name.section.group-title.ini + settings + + foreground + #e5c890 + + + + name + TOML dates + scope + constant.other.time.datetime.offset.toml + settings + + foreground + #f4b8e4 + + + + name + YAML anchor puctuation + scope + punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml + settings + + foreground + #f4b8e4 + + + + name + YAML triple dashes + scope + entity.other.document.begin.yaml + settings + + foreground + #f4b8e4 + + + + name + Markup Diff + scope + markup.changed.diff + settings + + foreground + #ef9f76 + + + + name + Diff + scope + meta.diff.header.from-file, meta.diff.header.to-file, punctuation.definition.from-file.diff, punctuation.definition.to-file.diff + settings + + foreground + #8caaee + + + + name + Diff Inserted + scope + markup.inserted.diff + settings + + foreground + #a6d189 + + + + name + Diff Deleted + scope + markup.deleted.diff + settings + + foreground + #e78284 + + + + name + dotenv left-hand side assignments + scope + variable.other.env + settings + + foreground + #8caaee + + + + name + dotenv reference to existing env variable + scope + string.quoted variable.other.env + settings + + foreground + #c6d0f5 + + + + name + GDScript functions + scope + support.function.builtin.gdscript + settings + + foreground + #8caaee + + + + name + GDScript constants + scope + constant.language.gdscript + settings + + foreground + #ef9f76 + + + + name + Comment keywords + scope + comment meta.annotation.go + settings + + foreground + #ea999c + + + + name + go:embed, go:build, etc. + scope + comment meta.annotation.parameters.go + settings + + foreground + #ef9f76 + + + + name + Go constants (nil, true, false) + scope + constant.language.go + settings + + foreground + #ef9f76 + + + + name + GraphQL variables + scope + variable.graphql + settings + + foreground + #c6d0f5 + + + + name + GraphQL aliases + scope + string.unquoted.alias.graphql + settings + + foreground + #eebebe + + + + name + GraphQL enum members + scope + constant.character.enum.graphql + settings + + foreground + #81c8be + + + + name + GraphQL field in types + scope + meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql + settings + + foreground + #eebebe + + + + name + HTML/XML DOCTYPE as keyword + scope + keyword.other.doctype, meta.tag.sgml.doctype punctuation.definition.tag, meta.tag.metadata.doctype entity.name.tag, meta.tag.metadata.doctype punctuation.definition.tag + settings + + foreground + #ca9ee6 + + + + name + HTML/XML-like <tags/> + scope + entity.name.tag + settings + + foreground + #8caaee + fontStyle + + + + + name + Special characters like &amp; + scope + text.html constant.character.entity, text.html constant.character.entity punctuation, constant.character.entity.xml, constant.character.entity.xml punctuation, constant.character.entity.js.jsx, constant.charactger.entity.js.jsx punctuation, constant.character.entity.tsx, constant.character.entity.tsx punctuation + settings + + foreground + #e78284 + + + + name + HTML/XML tag attribute values + scope + entity.other.attribute-name + settings + + foreground + #e5c890 + + + + name + Components + scope + support.class.component, support.class.component.jsx, support.class.component.tsx, support.class.component.vue + settings + + foreground + #f4b8e4 + fontStyle + + + + + name + Annotations + scope + punctuation.definition.annotation, storage.type.annotation + settings + + foreground + #ef9f76 + + + + name + Java enums + scope + constant.other.enum.java + settings + + foreground + #81c8be + + + + name + Java imports + scope + storage.modifier.import.java + settings + + foreground + #c6d0f5 + + + + name + Javadoc + scope + comment.block.javadoc.java keyword.other.documentation.javadoc.java + settings + + fontStyle + + + + + name + Exported Variable + scope + meta.export variable.other.readwrite.js + settings + + foreground + #ea999c + + + + name + JS/TS constants & properties + scope + variable.other.constant.js, variable.other.constant.ts, variable.other.property.js, variable.other.property.ts + settings + + foreground + #c6d0f5 + + + + name + JSDoc; these are mainly params, so styled as such + scope + variable.other.jsdoc, comment.block.documentation variable.other + settings + + foreground + #ea999c + fontStyle + + + + + name + JSDoc keywords + scope + storage.type.class.jsdoc + settings + + fontStyle + + + + + scope + support.type.object.console.js + settings + + foreground + #c6d0f5 + + + + name + Node constants as keywords (module, etc.) + scope + support.constant.node, support.type.object.module.js + settings + + foreground + #ca9ee6 + + + + name + implements as keyword + scope + storage.modifier.implements + settings + + foreground + #ca9ee6 + + + + name + Builtin types + scope + constant.language.null.js, constant.language.null.ts, constant.language.undefined.js, constant.language.undefined.ts, support.type.builtin.ts + settings + + foreground + #ca9ee6 + + + + scope + variable.parameter.generic + settings + + foreground + #e5c890 + + + + name + Arrow functions + scope + keyword.declaration.function.arrow.js, storage.type.function.arrow.ts + settings + + foreground + #81c8be + + + + name + Decorator punctuations (decorators inherit from blue functions, instead of styleguide peach) + scope + punctuation.decorator.ts + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Extra JS/TS keywords + scope + keyword.operator.expression.in.js, keyword.operator.expression.in.ts, keyword.operator.expression.infer.ts, keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.is, keyword.operator.expression.keyof.ts, keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.typeof.ts + settings + + foreground + #ca9ee6 + + + + name + Julia macros + scope + support.function.macro.julia + settings + + foreground + #81c8be + fontStyle + italic + + + + name + Julia language constants (true, false) + scope + constant.language.julia + settings + + foreground + #ef9f76 + + + + name + Julia other constants (these seem to be arguments inside arrays) + scope + constant.other.symbol.julia + settings + + foreground + #ea999c + + + + name + LaTeX preamble + scope + text.tex keyword.control.preamble + settings + + foreground + #81c8be + + + + name + LaTeX be functions + scope + text.tex support.function.be + settings + + foreground + #99d1db + + + + name + LaTeX math + scope + constant.other.general.math.tex + settings + + foreground + #eebebe + + + + name + Lua docstring keywords + scope + comment.line.double-dash.documentation.lua storage.type.annotation.lua + settings + + foreground + #ca9ee6 + fontStyle + + + + + name + Lua docstring variables + scope + comment.line.double-dash.documentation.lua entity.name.variable.lua, comment.line.double-dash.documentation.lua variable.lua + settings + + foreground + #c6d0f5 + + + + scope + heading.1.markdown punctuation.definition.heading.markdown, heading.1.markdown, markup.heading.atx.1.mdx, markup.heading.atx.1.mdx punctuation.definition.heading.mdx, markup.heading.setext.1.markdown, markup.heading.heading-0.asciidoc + settings + + foreground + #e78284 + + + + scope + heading.2.markdown punctuation.definition.heading.markdown, heading.2.markdown, markup.heading.atx.2.mdx, markup.heading.atx.2.mdx punctuation.definition.heading.mdx, markup.heading.setext.2.markdown, markup.heading.heading-1.asciidoc + settings + + foreground + #ef9f76 + + + + scope + heading.3.markdown punctuation.definition.heading.markdown, heading.3.markdown, markup.heading.atx.3.mdx, markup.heading.atx.3.mdx punctuation.definition.heading.mdx, markup.heading.heading-2.asciidoc + settings + + foreground + #e5c890 + + + + scope + heading.4.markdown punctuation.definition.heading.markdown, heading.4.markdown, markup.heading.atx.4.mdx, markup.heading.atx.4.mdx punctuation.definition.heading.mdx, markup.heading.heading-3.asciidoc + settings + + foreground + #a6d189 + + + + scope + heading.5.markdown punctuation.definition.heading.markdown, heading.5.markdown, markup.heading.atx.5.mdx, markup.heading.atx.5.mdx punctuation.definition.heading.mdx, markup.heading.heading-4.asciidoc + settings + + foreground + #8caaee + + + + scope + heading.6.markdown punctuation.definition.heading.markdown, heading.6.markdown, markup.heading.atx.6.mdx, markup.heading.atx.6.mdx punctuation.definition.heading.mdx, markup.heading.heading-5.asciidoc + settings + + foreground + #ca9ee6 + + + + scope + markup.bold + settings + + foreground + #e78284 + fontStyle + bold + + + + scope + markup.italic + settings + + foreground + #e78284 + fontStyle + italic + + + + scope + markup.strikethrough + settings + + foreground + #a5adce + fontStyle + strikethrough + + + + name + Markdown auto links + scope + punctuation.definition.link, markup.underline.link + settings + + foreground + #8caaee + + + + name + Markdown links + scope + text.html.markdown punctuation.definition.link.title, string.other.link.title.markdown, markup.link, punctuation.definition.constant.markdown, constant.other.reference.link.markdown, markup.substitution.attribute-reference + settings + + foreground + #babbf1 + + + + name + Markdown code spans + scope + punctuation.definition.raw.markdown, markup.inline.raw.string.markdown, markup.raw.block.markdown + settings + + foreground + #a6d189 + + + + name + Markdown triple backtick language identifier + scope + fenced_code.block.language + settings + + foreground + #99d1db + + + + name + Markdown triple backticks + scope + markup.fenced_code.block punctuation.definition, markup.raw support.asciidoc + settings + + foreground + #949cbb + + + + name + Markdown quotes + scope + markup.quote, punctuation.definition.quote.begin + settings + + foreground + #f4b8e4 + + + + name + Markdown separators + scope + meta.separator.markdown + settings + + foreground + #81c8be + + + + name + Markdown list bullets + scope + punctuation.definition.list.begin.markdown, markup.list.bullet + settings + + foreground + #81c8be + + + + name + Nix attribute names + scope + entity.other.attribute-name.multipart.nix, entity.other.attribute-name.single.nix + settings + + foreground + #8caaee + + + + name + Nix parameter names + scope + variable.parameter.name.nix + settings + + foreground + #c6d0f5 + fontStyle + + + + + name + Nix interpolated parameter names + scope + meta.embedded variable.parameter.name.nix + settings + + foreground + #babbf1 + fontStyle + + + + + name + Nix paths + scope + string.unquoted.path.nix + settings + + foreground + #f4b8e4 + fontStyle + + + + + name + PHP Attributes + scope + support.attribute.builtin, meta.attribute.php + settings + + foreground + #e5c890 + + + + name + PHP Parameters (needed for the leading dollar sign) + scope + meta.function.parameters.php punctuation.definition.variable.php + settings + + foreground + #ea999c + + + + name + PHP Constants (null, __FILE__, etc.) + scope + constant.language.php + settings + + foreground + #ca9ee6 + + + + name + PHP functions + scope + text.html.php support.function + settings + + foreground + #99d1db + + + + name + PHPdoc keywords + scope + keyword.other.phpdoc.php + settings + + fontStyle + + + + + name + Python argument functions reset to text, otherwise they inherit blue from function-call + scope + support.variable.magic.python, meta.function-call.arguments.python + settings + + foreground + #c6d0f5 + + + + name + Python double underscore functions + scope + support.function.magic.python + settings + + foreground + #99d1db + fontStyle + italic + + + + name + Python `self` keyword + scope + variable.parameter.function.language.special.self.python, variable.language.special.self.python + settings + + foreground + #e78284 + fontStyle + italic + + + + name + python keyword flow/logical (for ... in) + scope + keyword.control.flow.python, keyword.operator.logical.python + settings + + foreground + #ca9ee6 + + + + name + python storage type + scope + storage.type.function.python + settings + + foreground + #ca9ee6 + + + + name + python function support + scope + support.token.decorator.python, meta.function.decorator.identifier.python + settings + + foreground + #99d1db + + + + name + python function calls + scope + meta.function-call.python + settings + + foreground + #8caaee + + + + name + python function decorators + scope + entity.name.function.decorator.python, punctuation.definition.decorator.python + settings + + foreground + #ef9f76 + fontStyle + italic + + + + name + python placeholder reset to normal string + scope + constant.character.format.placeholder.other.python + settings + + foreground + #f4b8e4 + + + + name + Python exception & builtins such as exit() + scope + support.type.exception.python, support.function.builtin.python + settings + + foreground + #ef9f76 + + + + name + entity.name.type + scope + support.type.python + settings + + foreground + #ef9f76 + + + + name + python constants (True/False) + scope + constant.language.python + settings + + foreground + #ca9ee6 + + + + name + Arguments accessed later in the function body + scope + meta.indexed-name.python, meta.item-access.python + settings + + foreground + #ea999c + fontStyle + italic + + + + name + Python f-strings/binary/unicode storage types + scope + storage.type.string.python + settings + + foreground + #a6d189 + fontStyle + italic + + + + name + Python type hints + scope + meta.function.parameters.python + settings + + fontStyle + + + + + name + Regex string begin/end in JS/TS + scope + string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end + settings + + foreground + #f4b8e4 + + + + name + Regex anchors (^, $) + scope + keyword.control.anchor.regexp + settings + + foreground + #ca9ee6 + + + + name + Regex regular string match + scope + string.regexp.ts + settings + + foreground + #c6d0f5 + + + + name + Regex group parenthesis & backreference (\1, \2, \3, ...) + scope + punctuation.definition.group.regexp, keyword.other.back-reference.regexp + settings + + foreground + #a6d189 + + + + name + Regex character class [] + scope + punctuation.definition.character-class.regexp + settings + + foreground + #e5c890 + + + + name + Regex character classes (\d, \w, \s) + scope + constant.other.character-class.regexp + settings + + foreground + #f4b8e4 + + + + name + Regex range + scope + constant.other.character-class.range.regexp + settings + + foreground + #f2d5cf + + + + name + Regex quantifier + scope + keyword.operator.quantifier.regexp + settings + + foreground + #81c8be + + + + name + Regex constant/numeric + scope + constant.character.numeric.regexp + settings + + foreground + #ef9f76 + + + + name + Regex lookaheads, negative lookaheads, lookbehinds, negative lookbehinds + scope + punctuation.definition.group.no-capture.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp + settings + + foreground + #8caaee + + + + name + Rust attribute + scope + meta.annotation.rust, meta.annotation.rust punctuation, meta.attribute.rust, punctuation.definition.attribute.rust + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Rust attribute strings + scope + meta.attribute.rust string.quoted.double.rust, meta.attribute.rust string.quoted.single.char.rust + settings + + fontStyle + + + + + name + Rust keyword + scope + entity.name.function.macro.rules.rust, storage.type.module.rust, storage.modifier.rust, storage.type.struct.rust, storage.type.enum.rust, storage.type.trait.rust, storage.type.union.rust, storage.type.impl.rust, storage.type.rust, storage.type.function.rust, storage.type.type.rust + settings + + foreground + #ca9ee6 + fontStyle + + + + + name + Rust u/i32, u/i64, etc. + scope + entity.name.type.numeric.rust + settings + + foreground + #ca9ee6 + fontStyle + + + + + name + Rust generic + scope + meta.generic.rust + settings + + foreground + #ef9f76 + + + + name + Rust impl + scope + entity.name.impl.rust + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Rust module + scope + entity.name.module.rust + settings + + foreground + #ef9f76 + + + + name + Rust trait + scope + entity.name.trait.rust + settings + + foreground + #e5c890 + fontStyle + italic + + + + name + Rust struct + scope + storage.type.source.rust + settings + + foreground + #e5c890 + + + + name + Rust union + scope + entity.name.union.rust + settings + + foreground + #e5c890 + + + + name + Rust enum member + scope + meta.enum.rust storage.type.source.rust + settings + + foreground + #81c8be + + + + name + Rust macro + scope + support.macro.rust, meta.macro.rust support.function.rust, entity.name.function.macro.rust + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Rust lifetime + scope + storage.modifier.lifetime.rust, entity.name.type.lifetime + settings + + foreground + #8caaee + fontStyle + italic + + + + name + Rust string formatting + scope + string.quoted.double.rust constant.other.placeholder.rust + settings + + foreground + #f4b8e4 + + + + name + Rust return type generic + scope + meta.function.return-type.rust meta.generic.rust storage.type.rust + settings + + foreground + #c6d0f5 + + + + name + Rust functions + scope + meta.function.call.rust + settings + + foreground + #8caaee + + + + name + Rust angle brackets + scope + punctuation.brackets.angle.rust + settings + + foreground + #99d1db + + + + name + Rust constants + scope + constant.other.caps.rust + settings + + foreground + #ef9f76 + + + + name + Rust function parameters + scope + meta.function.definition.rust variable.other.rust + settings + + foreground + #ea999c + + + + name + Rust closure variables + scope + meta.function.call.rust variable.other.rust + settings + + foreground + #c6d0f5 + + + + name + Rust self + scope + variable.language.self.rust + settings + + foreground + #e78284 + + + + name + Rust metavariable names + scope + variable.other.metavariable.name.rust, meta.macro.metavariable.rust keyword.operator.macro.dollar.rust + settings + + foreground + #f4b8e4 + + + + name + Shell shebang + scope + comment.line.shebang, comment.line.shebang punctuation.definition.comment, comment.line.shebang, punctuation.definition.comment.shebang.shell, meta.shebang.shell + settings + + foreground + #f4b8e4 + fontStyle + italic + + + + name + Shell shebang command + scope + comment.line.shebang constant.language + settings + + foreground + #81c8be + fontStyle + italic + + + + name + Shell interpolated command + scope + meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation, meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation + settings + + foreground + #e78284 + + + + name + Shell interpolated command variable + scope + meta.string meta.interpolation.parameter.shell variable.other.readwrite + settings + + foreground + #ef9f76 + fontStyle + italic + + + + scope + source.shell punctuation.section.interpolation, punctuation.definition.evaluation.backticks.shell + settings + + foreground + #81c8be + + + + name + Shell EOF + scope + entity.name.tag.heredoc.shell + settings + + foreground + #ca9ee6 + + + + name + Shell quoted variable + scope + string.quoted.double.shell variable.other.normal.shell + settings + + foreground + #c6d0f5 + + + + scope + markup.heading.synopsis.man, markup.heading.title.man, markup.heading.other.man, markup.heading.env.man + settings + + foreground + #ca9ee6 + + + + scope + markup.heading.commands.man + settings + + foreground + #8caaee + + + + scope + markup.heading.env.man + settings + + foreground + #f4b8e4 + + + + + \ No newline at end of file diff --git a/programs/bat/catppuccinLatte.tmTheme b/programs/bat/catppuccinLatte.tmTheme new file mode 100644 index 0000000..ae4a0c0 --- /dev/null +++ b/programs/bat/catppuccinLatte.tmTheme @@ -0,0 +1,2021 @@ + + + + + name + Catppuccin Latte + semanticClass + theme.light.catppuccin-latte + uuid + 96a262cd-4b2f-49f5-9125-8dd0077cbfe1 + author + Catppuccin Org + colorSpaceName + sRGB + settings + + + settings + + background + #eff1f5 + foreground + #4c4f69 + caret + #dc8a78 + lineHighlight + #4c4f6912 + misspelling + #d20f39 + accent + #8839ef + selection + #7c7f934d + activeGuide + #bcc0cc + findHighlight + #a9daf0 + gutterForeground + #8c8fa1 + + + + name + Basic text & variable names (incl. leading punctuation) + scope + text, source, variable.other.readwrite, punctuation.definition.variable + settings + + foreground + #4c4f69 + + + + name + Parentheses, Brackets, Braces + scope + punctuation + settings + + foreground + #7c7f93 + fontStyle + + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #9ca0b0 + fontStyle + italic + + + + scope + string, punctuation.definition.string + settings + + foreground + #40a02b + + + + scope + constant.character.escape + settings + + foreground + #ea76cb + + + + name + Booleans, constants, numbers + scope + constant.numeric, variable.other.constant, entity.name.constant, constant.language.boolean, constant.language.false, constant.language.true, keyword.other.unit.user-defined, keyword.other.unit.suffix.floating-point + settings + + foreground + #fe640b + + + + scope + keyword, keyword.operator.word, keyword.operator.new, variable.language.super, support.type.primitive, storage.type, storage.modifier, punctuation.definition.keyword + settings + + foreground + #8839ef + fontStyle + + + + + scope + entity.name.tag.documentation + settings + + foreground + #8839ef + + + + name + Punctuation + scope + keyword.operator, punctuation.accessor, punctuation.definition.generic, meta.function.closure punctuation.section.parameters, punctuation.definition.tag, punctuation.separator.key-value + settings + + foreground + #179299 + + + + scope + entity.name.function, meta.function-call.method, support.function, support.function.misc, variable.function + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Classes + scope + entity.name.class, entity.other.inherited-class, support.class, meta.function-call.constructor, entity.name.struct + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Enum + scope + entity.name.enum + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Enum member + scope + meta.enum variable.other.readwrite, variable.other.enummember + settings + + foreground + #179299 + + + + name + Object properties + scope + meta.property.object + settings + + foreground + #179299 + + + + name + Types + scope + meta.type, meta.type-alias, support.type, entity.name.type + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Decorators + scope + meta.annotation variable.function, meta.annotation variable.annotation.function, meta.annotation punctuation.definition.annotation, meta.decorator, punctuation.decorator + settings + + foreground + #fe640b + + + + scope + variable.parameter, meta.function.parameters + settings + + foreground + #e64553 + fontStyle + italic + + + + name + Built-ins + scope + constant.language, support.function.builtin + settings + + foreground + #d20f39 + + + + scope + entity.other.attribute-name.documentation + settings + + foreground + #d20f39 + + + + name + Preprocessor directives + scope + keyword.control.directive, punctuation.definition.directive + settings + + foreground + #df8e1d + + + + name + Type parameters + scope + punctuation.definition.typeparameters + settings + + foreground + #04a5e5 + + + + name + Namespaces + scope + entity.name.namespace + settings + + foreground + #df8e1d + + + + name + Property names (left hand assignments in json/yaml/css) + scope + support.type.property-name.css + settings + + foreground + #1e66f5 + fontStyle + + + + + name + This/Self keyword + scope + variable.language.this, variable.language.this punctuation.definition.variable + settings + + foreground + #d20f39 + + + + name + Object properties + scope + variable.object.property + settings + + foreground + #4c4f69 + + + + name + String template interpolation + scope + string.template variable, string variable + settings + + foreground + #4c4f69 + + + + name + `new` as bold + scope + keyword.operator.new + settings + + fontStyle + bold + + + + name + C++ extern keyword + scope + storage.modifier.specifier.extern.cpp + settings + + foreground + #8839ef + + + + name + C++ scope resolution + scope + entity.name.scope-resolution.template.call.cpp, entity.name.scope-resolution.parameter.cpp, entity.name.scope-resolution.cpp, entity.name.scope-resolution.function.definition.cpp + settings + + foreground + #df8e1d + + + + name + C++ doc keywords + scope + storage.type.class.doxygen + settings + + fontStyle + + + + + name + C++ operators + scope + storage.modifier.reference.cpp + settings + + foreground + #179299 + + + + name + C# Interpolated Strings + scope + meta.interpolation.cs + settings + + foreground + #4c4f69 + + + + name + C# xml-style docs + scope + comment.block.documentation.cs + settings + + foreground + #4c4f69 + + + + name + Classes, reflecting the className color in JSX + scope + source.css entity.other.attribute-name.class.css, entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css + settings + + foreground + #df8e1d + + + + name + Operators + scope + punctuation.separator.operator.css + settings + + foreground + #179299 + + + + name + Pseudo classes + scope + source.css entity.other.attribute-name.pseudo-class + settings + + foreground + #179299 + + + + scope + source.css constant.other.unicode-range + settings + + foreground + #fe640b + + + + scope + source.css variable.parameter.url + settings + + foreground + #40a02b + fontStyle + + + + + name + CSS vendored property names + scope + support.type.vendored.property-name + settings + + foreground + #04a5e5 + + + + name + Less/SCSS right-hand variables (@/$-prefixed) + scope + source.css meta.property-value variable, source.css meta.property-value variable.other.less, source.css meta.property-value variable.other.less punctuation.definition.variable.less, meta.definition.variable.scss + settings + + foreground + #e64553 + + + + name + CSS variables (--prefixed) + scope + source.css meta.property-list variable, meta.property-list variable.other.less, meta.property-list variable.other.less punctuation.definition.variable.less + settings + + foreground + #1e66f5 + + + + name + CSS Percentage values, styled the same as numbers + scope + keyword.other.unit.percentage.css + settings + + foreground + #fe640b + + + + name + CSS Attribute selectors, styled the same as strings + scope + source.css meta.attribute-selector + settings + + foreground + #40a02b + + + + name + JSON/YAML keys, other left-hand assignments + scope + keyword.other.definition.ini, punctuation.support.type.property-name.json, support.type.property-name.json, punctuation.support.type.property-name.toml, support.type.property-name.toml, entity.name.tag.yaml, punctuation.support.type.property-name.yaml, support.type.property-name.yaml + settings + + foreground + #1e66f5 + fontStyle + + + + + name + JSON/YAML constants + scope + constant.language.json, constant.language.yaml + settings + + foreground + #fe640b + + + + name + YAML anchors + scope + entity.name.type.anchor.yaml, variable.other.alias.yaml + settings + + foreground + #df8e1d + fontStyle + + + + + name + TOML tables / ini groups + scope + support.type.property-name.table, entity.name.section.group-title.ini + settings + + foreground + #df8e1d + + + + name + TOML dates + scope + constant.other.time.datetime.offset.toml + settings + + foreground + #ea76cb + + + + name + YAML anchor puctuation + scope + punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml + settings + + foreground + #ea76cb + + + + name + YAML triple dashes + scope + entity.other.document.begin.yaml + settings + + foreground + #ea76cb + + + + name + Markup Diff + scope + markup.changed.diff + settings + + foreground + #fe640b + + + + name + Diff + scope + meta.diff.header.from-file, meta.diff.header.to-file, punctuation.definition.from-file.diff, punctuation.definition.to-file.diff + settings + + foreground + #1e66f5 + + + + name + Diff Inserted + scope + markup.inserted.diff + settings + + foreground + #40a02b + + + + name + Diff Deleted + scope + markup.deleted.diff + settings + + foreground + #d20f39 + + + + name + dotenv left-hand side assignments + scope + variable.other.env + settings + + foreground + #1e66f5 + + + + name + dotenv reference to existing env variable + scope + string.quoted variable.other.env + settings + + foreground + #4c4f69 + + + + name + GDScript functions + scope + support.function.builtin.gdscript + settings + + foreground + #1e66f5 + + + + name + GDScript constants + scope + constant.language.gdscript + settings + + foreground + #fe640b + + + + name + Comment keywords + scope + comment meta.annotation.go + settings + + foreground + #e64553 + + + + name + go:embed, go:build, etc. + scope + comment meta.annotation.parameters.go + settings + + foreground + #fe640b + + + + name + Go constants (nil, true, false) + scope + constant.language.go + settings + + foreground + #fe640b + + + + name + GraphQL variables + scope + variable.graphql + settings + + foreground + #4c4f69 + + + + name + GraphQL aliases + scope + string.unquoted.alias.graphql + settings + + foreground + #dd7878 + + + + name + GraphQL enum members + scope + constant.character.enum.graphql + settings + + foreground + #179299 + + + + name + GraphQL field in types + scope + meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql + settings + + foreground + #dd7878 + + + + name + HTML/XML DOCTYPE as keyword + scope + keyword.other.doctype, meta.tag.sgml.doctype punctuation.definition.tag, meta.tag.metadata.doctype entity.name.tag, meta.tag.metadata.doctype punctuation.definition.tag + settings + + foreground + #8839ef + + + + name + HTML/XML-like <tags/> + scope + entity.name.tag + settings + + foreground + #1e66f5 + fontStyle + + + + + name + Special characters like &amp; + scope + text.html constant.character.entity, text.html constant.character.entity punctuation, constant.character.entity.xml, constant.character.entity.xml punctuation, constant.character.entity.js.jsx, constant.charactger.entity.js.jsx punctuation, constant.character.entity.tsx, constant.character.entity.tsx punctuation + settings + + foreground + #d20f39 + + + + name + HTML/XML tag attribute values + scope + entity.other.attribute-name + settings + + foreground + #df8e1d + + + + name + Components + scope + support.class.component, support.class.component.jsx, support.class.component.tsx, support.class.component.vue + settings + + foreground + #ea76cb + fontStyle + + + + + name + Annotations + scope + punctuation.definition.annotation, storage.type.annotation + settings + + foreground + #fe640b + + + + name + Java enums + scope + constant.other.enum.java + settings + + foreground + #179299 + + + + name + Java imports + scope + storage.modifier.import.java + settings + + foreground + #4c4f69 + + + + name + Javadoc + scope + comment.block.javadoc.java keyword.other.documentation.javadoc.java + settings + + fontStyle + + + + + name + Exported Variable + scope + meta.export variable.other.readwrite.js + settings + + foreground + #e64553 + + + + name + JS/TS constants & properties + scope + variable.other.constant.js, variable.other.constant.ts, variable.other.property.js, variable.other.property.ts + settings + + foreground + #4c4f69 + + + + name + JSDoc; these are mainly params, so styled as such + scope + variable.other.jsdoc, comment.block.documentation variable.other + settings + + foreground + #e64553 + fontStyle + + + + + name + JSDoc keywords + scope + storage.type.class.jsdoc + settings + + fontStyle + + + + + scope + support.type.object.console.js + settings + + foreground + #4c4f69 + + + + name + Node constants as keywords (module, etc.) + scope + support.constant.node, support.type.object.module.js + settings + + foreground + #8839ef + + + + name + implements as keyword + scope + storage.modifier.implements + settings + + foreground + #8839ef + + + + name + Builtin types + scope + constant.language.null.js, constant.language.null.ts, constant.language.undefined.js, constant.language.undefined.ts, support.type.builtin.ts + settings + + foreground + #8839ef + + + + scope + variable.parameter.generic + settings + + foreground + #df8e1d + + + + name + Arrow functions + scope + keyword.declaration.function.arrow.js, storage.type.function.arrow.ts + settings + + foreground + #179299 + + + + name + Decorator punctuations (decorators inherit from blue functions, instead of styleguide peach) + scope + punctuation.decorator.ts + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Extra JS/TS keywords + scope + keyword.operator.expression.in.js, keyword.operator.expression.in.ts, keyword.operator.expression.infer.ts, keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.is, keyword.operator.expression.keyof.ts, keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.typeof.ts + settings + + foreground + #8839ef + + + + name + Julia macros + scope + support.function.macro.julia + settings + + foreground + #179299 + fontStyle + italic + + + + name + Julia language constants (true, false) + scope + constant.language.julia + settings + + foreground + #fe640b + + + + name + Julia other constants (these seem to be arguments inside arrays) + scope + constant.other.symbol.julia + settings + + foreground + #e64553 + + + + name + LaTeX preamble + scope + text.tex keyword.control.preamble + settings + + foreground + #179299 + + + + name + LaTeX be functions + scope + text.tex support.function.be + settings + + foreground + #04a5e5 + + + + name + LaTeX math + scope + constant.other.general.math.tex + settings + + foreground + #dd7878 + + + + name + Lua docstring keywords + scope + comment.line.double-dash.documentation.lua storage.type.annotation.lua + settings + + foreground + #8839ef + fontStyle + + + + + name + Lua docstring variables + scope + comment.line.double-dash.documentation.lua entity.name.variable.lua, comment.line.double-dash.documentation.lua variable.lua + settings + + foreground + #4c4f69 + + + + scope + heading.1.markdown punctuation.definition.heading.markdown, heading.1.markdown, markup.heading.atx.1.mdx, markup.heading.atx.1.mdx punctuation.definition.heading.mdx, markup.heading.setext.1.markdown, markup.heading.heading-0.asciidoc + settings + + foreground + #d20f39 + + + + scope + heading.2.markdown punctuation.definition.heading.markdown, heading.2.markdown, markup.heading.atx.2.mdx, markup.heading.atx.2.mdx punctuation.definition.heading.mdx, markup.heading.setext.2.markdown, markup.heading.heading-1.asciidoc + settings + + foreground + #fe640b + + + + scope + heading.3.markdown punctuation.definition.heading.markdown, heading.3.markdown, markup.heading.atx.3.mdx, markup.heading.atx.3.mdx punctuation.definition.heading.mdx, markup.heading.heading-2.asciidoc + settings + + foreground + #df8e1d + + + + scope + heading.4.markdown punctuation.definition.heading.markdown, heading.4.markdown, markup.heading.atx.4.mdx, markup.heading.atx.4.mdx punctuation.definition.heading.mdx, markup.heading.heading-3.asciidoc + settings + + foreground + #40a02b + + + + scope + heading.5.markdown punctuation.definition.heading.markdown, heading.5.markdown, markup.heading.atx.5.mdx, markup.heading.atx.5.mdx punctuation.definition.heading.mdx, markup.heading.heading-4.asciidoc + settings + + foreground + #1e66f5 + + + + scope + heading.6.markdown punctuation.definition.heading.markdown, heading.6.markdown, markup.heading.atx.6.mdx, markup.heading.atx.6.mdx punctuation.definition.heading.mdx, markup.heading.heading-5.asciidoc + settings + + foreground + #8839ef + + + + scope + markup.bold + settings + + foreground + #d20f39 + fontStyle + bold + + + + scope + markup.italic + settings + + foreground + #d20f39 + fontStyle + italic + + + + scope + markup.strikethrough + settings + + foreground + #6c6f85 + fontStyle + strikethrough + + + + name + Markdown auto links + scope + punctuation.definition.link, markup.underline.link + settings + + foreground + #1e66f5 + + + + name + Markdown links + scope + text.html.markdown punctuation.definition.link.title, string.other.link.title.markdown, markup.link, punctuation.definition.constant.markdown, constant.other.reference.link.markdown, markup.substitution.attribute-reference + settings + + foreground + #7287fd + + + + name + Markdown code spans + scope + punctuation.definition.raw.markdown, markup.inline.raw.string.markdown, markup.raw.block.markdown + settings + + foreground + #40a02b + + + + name + Markdown triple backtick language identifier + scope + fenced_code.block.language + settings + + foreground + #04a5e5 + + + + name + Markdown triple backticks + scope + markup.fenced_code.block punctuation.definition, markup.raw support.asciidoc + settings + + foreground + #7c7f93 + + + + name + Markdown quotes + scope + markup.quote, punctuation.definition.quote.begin + settings + + foreground + #ea76cb + + + + name + Markdown separators + scope + meta.separator.markdown + settings + + foreground + #179299 + + + + name + Markdown list bullets + scope + punctuation.definition.list.begin.markdown, markup.list.bullet + settings + + foreground + #179299 + + + + name + Nix attribute names + scope + entity.other.attribute-name.multipart.nix, entity.other.attribute-name.single.nix + settings + + foreground + #1e66f5 + + + + name + Nix parameter names + scope + variable.parameter.name.nix + settings + + foreground + #4c4f69 + fontStyle + + + + + name + Nix interpolated parameter names + scope + meta.embedded variable.parameter.name.nix + settings + + foreground + #7287fd + fontStyle + + + + + name + Nix paths + scope + string.unquoted.path.nix + settings + + foreground + #ea76cb + fontStyle + + + + + name + PHP Attributes + scope + support.attribute.builtin, meta.attribute.php + settings + + foreground + #df8e1d + + + + name + PHP Parameters (needed for the leading dollar sign) + scope + meta.function.parameters.php punctuation.definition.variable.php + settings + + foreground + #e64553 + + + + name + PHP Constants (null, __FILE__, etc.) + scope + constant.language.php + settings + + foreground + #8839ef + + + + name + PHP functions + scope + text.html.php support.function + settings + + foreground + #04a5e5 + + + + name + PHPdoc keywords + scope + keyword.other.phpdoc.php + settings + + fontStyle + + + + + name + Python argument functions reset to text, otherwise they inherit blue from function-call + scope + support.variable.magic.python, meta.function-call.arguments.python + settings + + foreground + #4c4f69 + + + + name + Python double underscore functions + scope + support.function.magic.python + settings + + foreground + #04a5e5 + fontStyle + italic + + + + name + Python `self` keyword + scope + variable.parameter.function.language.special.self.python, variable.language.special.self.python + settings + + foreground + #d20f39 + fontStyle + italic + + + + name + python keyword flow/logical (for ... in) + scope + keyword.control.flow.python, keyword.operator.logical.python + settings + + foreground + #8839ef + + + + name + python storage type + scope + storage.type.function.python + settings + + foreground + #8839ef + + + + name + python function support + scope + support.token.decorator.python, meta.function.decorator.identifier.python + settings + + foreground + #04a5e5 + + + + name + python function calls + scope + meta.function-call.python + settings + + foreground + #1e66f5 + + + + name + python function decorators + scope + entity.name.function.decorator.python, punctuation.definition.decorator.python + settings + + foreground + #fe640b + fontStyle + italic + + + + name + python placeholder reset to normal string + scope + constant.character.format.placeholder.other.python + settings + + foreground + #ea76cb + + + + name + Python exception & builtins such as exit() + scope + support.type.exception.python, support.function.builtin.python + settings + + foreground + #fe640b + + + + name + entity.name.type + scope + support.type.python + settings + + foreground + #fe640b + + + + name + python constants (True/False) + scope + constant.language.python + settings + + foreground + #8839ef + + + + name + Arguments accessed later in the function body + scope + meta.indexed-name.python, meta.item-access.python + settings + + foreground + #e64553 + fontStyle + italic + + + + name + Python f-strings/binary/unicode storage types + scope + storage.type.string.python + settings + + foreground + #40a02b + fontStyle + italic + + + + name + Python type hints + scope + meta.function.parameters.python + settings + + fontStyle + + + + + name + Regex string begin/end in JS/TS + scope + string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end + settings + + foreground + #ea76cb + + + + name + Regex anchors (^, $) + scope + keyword.control.anchor.regexp + settings + + foreground + #8839ef + + + + name + Regex regular string match + scope + string.regexp.ts + settings + + foreground + #4c4f69 + + + + name + Regex group parenthesis & backreference (\1, \2, \3, ...) + scope + punctuation.definition.group.regexp, keyword.other.back-reference.regexp + settings + + foreground + #40a02b + + + + name + Regex character class [] + scope + punctuation.definition.character-class.regexp + settings + + foreground + #df8e1d + + + + name + Regex character classes (\d, \w, \s) + scope + constant.other.character-class.regexp + settings + + foreground + #ea76cb + + + + name + Regex range + scope + constant.other.character-class.range.regexp + settings + + foreground + #dc8a78 + + + + name + Regex quantifier + scope + keyword.operator.quantifier.regexp + settings + + foreground + #179299 + + + + name + Regex constant/numeric + scope + constant.character.numeric.regexp + settings + + foreground + #fe640b + + + + name + Regex lookaheads, negative lookaheads, lookbehinds, negative lookbehinds + scope + punctuation.definition.group.no-capture.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp + settings + + foreground + #1e66f5 + + + + name + Rust attribute + scope + meta.annotation.rust, meta.annotation.rust punctuation, meta.attribute.rust, punctuation.definition.attribute.rust + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Rust attribute strings + scope + meta.attribute.rust string.quoted.double.rust, meta.attribute.rust string.quoted.single.char.rust + settings + + fontStyle + + + + + name + Rust keyword + scope + entity.name.function.macro.rules.rust, storage.type.module.rust, storage.modifier.rust, storage.type.struct.rust, storage.type.enum.rust, storage.type.trait.rust, storage.type.union.rust, storage.type.impl.rust, storage.type.rust, storage.type.function.rust, storage.type.type.rust + settings + + foreground + #8839ef + fontStyle + + + + + name + Rust u/i32, u/i64, etc. + scope + entity.name.type.numeric.rust + settings + + foreground + #8839ef + fontStyle + + + + + name + Rust generic + scope + meta.generic.rust + settings + + foreground + #fe640b + + + + name + Rust impl + scope + entity.name.impl.rust + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Rust module + scope + entity.name.module.rust + settings + + foreground + #fe640b + + + + name + Rust trait + scope + entity.name.trait.rust + settings + + foreground + #df8e1d + fontStyle + italic + + + + name + Rust struct + scope + storage.type.source.rust + settings + + foreground + #df8e1d + + + + name + Rust union + scope + entity.name.union.rust + settings + + foreground + #df8e1d + + + + name + Rust enum member + scope + meta.enum.rust storage.type.source.rust + settings + + foreground + #179299 + + + + name + Rust macro + scope + support.macro.rust, meta.macro.rust support.function.rust, entity.name.function.macro.rust + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Rust lifetime + scope + storage.modifier.lifetime.rust, entity.name.type.lifetime + settings + + foreground + #1e66f5 + fontStyle + italic + + + + name + Rust string formatting + scope + string.quoted.double.rust constant.other.placeholder.rust + settings + + foreground + #ea76cb + + + + name + Rust return type generic + scope + meta.function.return-type.rust meta.generic.rust storage.type.rust + settings + + foreground + #4c4f69 + + + + name + Rust functions + scope + meta.function.call.rust + settings + + foreground + #1e66f5 + + + + name + Rust angle brackets + scope + punctuation.brackets.angle.rust + settings + + foreground + #04a5e5 + + + + name + Rust constants + scope + constant.other.caps.rust + settings + + foreground + #fe640b + + + + name + Rust function parameters + scope + meta.function.definition.rust variable.other.rust + settings + + foreground + #e64553 + + + + name + Rust closure variables + scope + meta.function.call.rust variable.other.rust + settings + + foreground + #4c4f69 + + + + name + Rust self + scope + variable.language.self.rust + settings + + foreground + #d20f39 + + + + name + Rust metavariable names + scope + variable.other.metavariable.name.rust, meta.macro.metavariable.rust keyword.operator.macro.dollar.rust + settings + + foreground + #ea76cb + + + + name + Shell shebang + scope + comment.line.shebang, comment.line.shebang punctuation.definition.comment, comment.line.shebang, punctuation.definition.comment.shebang.shell, meta.shebang.shell + settings + + foreground + #ea76cb + fontStyle + italic + + + + name + Shell shebang command + scope + comment.line.shebang constant.language + settings + + foreground + #179299 + fontStyle + italic + + + + name + Shell interpolated command + scope + meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation, meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation + settings + + foreground + #d20f39 + + + + name + Shell interpolated command variable + scope + meta.string meta.interpolation.parameter.shell variable.other.readwrite + settings + + foreground + #fe640b + fontStyle + italic + + + + scope + source.shell punctuation.section.interpolation, punctuation.definition.evaluation.backticks.shell + settings + + foreground + #179299 + + + + name + Shell EOF + scope + entity.name.tag.heredoc.shell + settings + + foreground + #8839ef + + + + name + Shell quoted variable + scope + string.quoted.double.shell variable.other.normal.shell + settings + + foreground + #4c4f69 + + + + scope + markup.heading.synopsis.man, markup.heading.title.man, markup.heading.other.man, markup.heading.env.man + settings + + foreground + #8839ef + + + + scope + markup.heading.commands.man + settings + + foreground + #1e66f5 + + + + scope + markup.heading.env.man + settings + + foreground + #ea76cb + + + + + \ No newline at end of file diff --git a/programs/bat/catppuccinMacchiato.tmTheme b/programs/bat/catppuccinMacchiato.tmTheme new file mode 100644 index 0000000..a676454 --- /dev/null +++ b/programs/bat/catppuccinMacchiato.tmTheme @@ -0,0 +1,2021 @@ + + + + + name + Catppuccin Macchiato + semanticClass + theme.dark.catppuccin-macchiato + uuid + 02b2bdf3-9eb7-4396-bf04-f17f1468f99f + author + Catppuccin Org + colorSpaceName + sRGB + settings + + + settings + + background + #24273a + foreground + #cad3f5 + caret + #f4dbd6 + lineHighlight + #cad3f512 + misspelling + #ed8796 + accent + #c6a0f6 + selection + #939ab740 + activeGuide + #494d64 + findHighlight + #455c6d + gutterForeground + #8087a2 + + + + name + Basic text & variable names (incl. leading punctuation) + scope + text, source, variable.other.readwrite, punctuation.definition.variable + settings + + foreground + #cad3f5 + + + + name + Parentheses, Brackets, Braces + scope + punctuation + settings + + foreground + #939ab7 + fontStyle + + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #6e738d + fontStyle + italic + + + + scope + string, punctuation.definition.string + settings + + foreground + #a6da95 + + + + scope + constant.character.escape + settings + + foreground + #f5bde6 + + + + name + Booleans, constants, numbers + scope + constant.numeric, variable.other.constant, entity.name.constant, constant.language.boolean, constant.language.false, constant.language.true, keyword.other.unit.user-defined, keyword.other.unit.suffix.floating-point + settings + + foreground + #f5a97f + + + + scope + keyword, keyword.operator.word, keyword.operator.new, variable.language.super, support.type.primitive, storage.type, storage.modifier, punctuation.definition.keyword + settings + + foreground + #c6a0f6 + fontStyle + + + + + scope + entity.name.tag.documentation + settings + + foreground + #c6a0f6 + + + + name + Punctuation + scope + keyword.operator, punctuation.accessor, punctuation.definition.generic, meta.function.closure punctuation.section.parameters, punctuation.definition.tag, punctuation.separator.key-value + settings + + foreground + #8bd5ca + + + + scope + entity.name.function, meta.function-call.method, support.function, support.function.misc, variable.function + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Classes + scope + entity.name.class, entity.other.inherited-class, support.class, meta.function-call.constructor, entity.name.struct + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Enum + scope + entity.name.enum + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Enum member + scope + meta.enum variable.other.readwrite, variable.other.enummember + settings + + foreground + #8bd5ca + + + + name + Object properties + scope + meta.property.object + settings + + foreground + #8bd5ca + + + + name + Types + scope + meta.type, meta.type-alias, support.type, entity.name.type + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Decorators + scope + meta.annotation variable.function, meta.annotation variable.annotation.function, meta.annotation punctuation.definition.annotation, meta.decorator, punctuation.decorator + settings + + foreground + #f5a97f + + + + scope + variable.parameter, meta.function.parameters + settings + + foreground + #ee99a0 + fontStyle + italic + + + + name + Built-ins + scope + constant.language, support.function.builtin + settings + + foreground + #ed8796 + + + + scope + entity.other.attribute-name.documentation + settings + + foreground + #ed8796 + + + + name + Preprocessor directives + scope + keyword.control.directive, punctuation.definition.directive + settings + + foreground + #eed49f + + + + name + Type parameters + scope + punctuation.definition.typeparameters + settings + + foreground + #91d7e3 + + + + name + Namespaces + scope + entity.name.namespace + settings + + foreground + #eed49f + + + + name + Property names (left hand assignments in json/yaml/css) + scope + support.type.property-name.css + settings + + foreground + #8aadf4 + fontStyle + + + + + name + This/Self keyword + scope + variable.language.this, variable.language.this punctuation.definition.variable + settings + + foreground + #ed8796 + + + + name + Object properties + scope + variable.object.property + settings + + foreground + #cad3f5 + + + + name + String template interpolation + scope + string.template variable, string variable + settings + + foreground + #cad3f5 + + + + name + `new` as bold + scope + keyword.operator.new + settings + + fontStyle + bold + + + + name + C++ extern keyword + scope + storage.modifier.specifier.extern.cpp + settings + + foreground + #c6a0f6 + + + + name + C++ scope resolution + scope + entity.name.scope-resolution.template.call.cpp, entity.name.scope-resolution.parameter.cpp, entity.name.scope-resolution.cpp, entity.name.scope-resolution.function.definition.cpp + settings + + foreground + #eed49f + + + + name + C++ doc keywords + scope + storage.type.class.doxygen + settings + + fontStyle + + + + + name + C++ operators + scope + storage.modifier.reference.cpp + settings + + foreground + #8bd5ca + + + + name + C# Interpolated Strings + scope + meta.interpolation.cs + settings + + foreground + #cad3f5 + + + + name + C# xml-style docs + scope + comment.block.documentation.cs + settings + + foreground + #cad3f5 + + + + name + Classes, reflecting the className color in JSX + scope + source.css entity.other.attribute-name.class.css, entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css + settings + + foreground + #eed49f + + + + name + Operators + scope + punctuation.separator.operator.css + settings + + foreground + #8bd5ca + + + + name + Pseudo classes + scope + source.css entity.other.attribute-name.pseudo-class + settings + + foreground + #8bd5ca + + + + scope + source.css constant.other.unicode-range + settings + + foreground + #f5a97f + + + + scope + source.css variable.parameter.url + settings + + foreground + #a6da95 + fontStyle + + + + + name + CSS vendored property names + scope + support.type.vendored.property-name + settings + + foreground + #91d7e3 + + + + name + Less/SCSS right-hand variables (@/$-prefixed) + scope + source.css meta.property-value variable, source.css meta.property-value variable.other.less, source.css meta.property-value variable.other.less punctuation.definition.variable.less, meta.definition.variable.scss + settings + + foreground + #ee99a0 + + + + name + CSS variables (--prefixed) + scope + source.css meta.property-list variable, meta.property-list variable.other.less, meta.property-list variable.other.less punctuation.definition.variable.less + settings + + foreground + #8aadf4 + + + + name + CSS Percentage values, styled the same as numbers + scope + keyword.other.unit.percentage.css + settings + + foreground + #f5a97f + + + + name + CSS Attribute selectors, styled the same as strings + scope + source.css meta.attribute-selector + settings + + foreground + #a6da95 + + + + name + JSON/YAML keys, other left-hand assignments + scope + keyword.other.definition.ini, punctuation.support.type.property-name.json, support.type.property-name.json, punctuation.support.type.property-name.toml, support.type.property-name.toml, entity.name.tag.yaml, punctuation.support.type.property-name.yaml, support.type.property-name.yaml + settings + + foreground + #8aadf4 + fontStyle + + + + + name + JSON/YAML constants + scope + constant.language.json, constant.language.yaml + settings + + foreground + #f5a97f + + + + name + YAML anchors + scope + entity.name.type.anchor.yaml, variable.other.alias.yaml + settings + + foreground + #eed49f + fontStyle + + + + + name + TOML tables / ini groups + scope + support.type.property-name.table, entity.name.section.group-title.ini + settings + + foreground + #eed49f + + + + name + TOML dates + scope + constant.other.time.datetime.offset.toml + settings + + foreground + #f5bde6 + + + + name + YAML anchor puctuation + scope + punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml + settings + + foreground + #f5bde6 + + + + name + YAML triple dashes + scope + entity.other.document.begin.yaml + settings + + foreground + #f5bde6 + + + + name + Markup Diff + scope + markup.changed.diff + settings + + foreground + #f5a97f + + + + name + Diff + scope + meta.diff.header.from-file, meta.diff.header.to-file, punctuation.definition.from-file.diff, punctuation.definition.to-file.diff + settings + + foreground + #8aadf4 + + + + name + Diff Inserted + scope + markup.inserted.diff + settings + + foreground + #a6da95 + + + + name + Diff Deleted + scope + markup.deleted.diff + settings + + foreground + #ed8796 + + + + name + dotenv left-hand side assignments + scope + variable.other.env + settings + + foreground + #8aadf4 + + + + name + dotenv reference to existing env variable + scope + string.quoted variable.other.env + settings + + foreground + #cad3f5 + + + + name + GDScript functions + scope + support.function.builtin.gdscript + settings + + foreground + #8aadf4 + + + + name + GDScript constants + scope + constant.language.gdscript + settings + + foreground + #f5a97f + + + + name + Comment keywords + scope + comment meta.annotation.go + settings + + foreground + #ee99a0 + + + + name + go:embed, go:build, etc. + scope + comment meta.annotation.parameters.go + settings + + foreground + #f5a97f + + + + name + Go constants (nil, true, false) + scope + constant.language.go + settings + + foreground + #f5a97f + + + + name + GraphQL variables + scope + variable.graphql + settings + + foreground + #cad3f5 + + + + name + GraphQL aliases + scope + string.unquoted.alias.graphql + settings + + foreground + #f0c6c6 + + + + name + GraphQL enum members + scope + constant.character.enum.graphql + settings + + foreground + #8bd5ca + + + + name + GraphQL field in types + scope + meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql + settings + + foreground + #f0c6c6 + + + + name + HTML/XML DOCTYPE as keyword + scope + keyword.other.doctype, meta.tag.sgml.doctype punctuation.definition.tag, meta.tag.metadata.doctype entity.name.tag, meta.tag.metadata.doctype punctuation.definition.tag + settings + + foreground + #c6a0f6 + + + + name + HTML/XML-like <tags/> + scope + entity.name.tag + settings + + foreground + #8aadf4 + fontStyle + + + + + name + Special characters like &amp; + scope + text.html constant.character.entity, text.html constant.character.entity punctuation, constant.character.entity.xml, constant.character.entity.xml punctuation, constant.character.entity.js.jsx, constant.charactger.entity.js.jsx punctuation, constant.character.entity.tsx, constant.character.entity.tsx punctuation + settings + + foreground + #ed8796 + + + + name + HTML/XML tag attribute values + scope + entity.other.attribute-name + settings + + foreground + #eed49f + + + + name + Components + scope + support.class.component, support.class.component.jsx, support.class.component.tsx, support.class.component.vue + settings + + foreground + #f5bde6 + fontStyle + + + + + name + Annotations + scope + punctuation.definition.annotation, storage.type.annotation + settings + + foreground + #f5a97f + + + + name + Java enums + scope + constant.other.enum.java + settings + + foreground + #8bd5ca + + + + name + Java imports + scope + storage.modifier.import.java + settings + + foreground + #cad3f5 + + + + name + Javadoc + scope + comment.block.javadoc.java keyword.other.documentation.javadoc.java + settings + + fontStyle + + + + + name + Exported Variable + scope + meta.export variable.other.readwrite.js + settings + + foreground + #ee99a0 + + + + name + JS/TS constants & properties + scope + variable.other.constant.js, variable.other.constant.ts, variable.other.property.js, variable.other.property.ts + settings + + foreground + #cad3f5 + + + + name + JSDoc; these are mainly params, so styled as such + scope + variable.other.jsdoc, comment.block.documentation variable.other + settings + + foreground + #ee99a0 + fontStyle + + + + + name + JSDoc keywords + scope + storage.type.class.jsdoc + settings + + fontStyle + + + + + scope + support.type.object.console.js + settings + + foreground + #cad3f5 + + + + name + Node constants as keywords (module, etc.) + scope + support.constant.node, support.type.object.module.js + settings + + foreground + #c6a0f6 + + + + name + implements as keyword + scope + storage.modifier.implements + settings + + foreground + #c6a0f6 + + + + name + Builtin types + scope + constant.language.null.js, constant.language.null.ts, constant.language.undefined.js, constant.language.undefined.ts, support.type.builtin.ts + settings + + foreground + #c6a0f6 + + + + scope + variable.parameter.generic + settings + + foreground + #eed49f + + + + name + Arrow functions + scope + keyword.declaration.function.arrow.js, storage.type.function.arrow.ts + settings + + foreground + #8bd5ca + + + + name + Decorator punctuations (decorators inherit from blue functions, instead of styleguide peach) + scope + punctuation.decorator.ts + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Extra JS/TS keywords + scope + keyword.operator.expression.in.js, keyword.operator.expression.in.ts, keyword.operator.expression.infer.ts, keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.is, keyword.operator.expression.keyof.ts, keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.typeof.ts + settings + + foreground + #c6a0f6 + + + + name + Julia macros + scope + support.function.macro.julia + settings + + foreground + #8bd5ca + fontStyle + italic + + + + name + Julia language constants (true, false) + scope + constant.language.julia + settings + + foreground + #f5a97f + + + + name + Julia other constants (these seem to be arguments inside arrays) + scope + constant.other.symbol.julia + settings + + foreground + #ee99a0 + + + + name + LaTeX preamble + scope + text.tex keyword.control.preamble + settings + + foreground + #8bd5ca + + + + name + LaTeX be functions + scope + text.tex support.function.be + settings + + foreground + #91d7e3 + + + + name + LaTeX math + scope + constant.other.general.math.tex + settings + + foreground + #f0c6c6 + + + + name + Lua docstring keywords + scope + comment.line.double-dash.documentation.lua storage.type.annotation.lua + settings + + foreground + #c6a0f6 + fontStyle + + + + + name + Lua docstring variables + scope + comment.line.double-dash.documentation.lua entity.name.variable.lua, comment.line.double-dash.documentation.lua variable.lua + settings + + foreground + #cad3f5 + + + + scope + heading.1.markdown punctuation.definition.heading.markdown, heading.1.markdown, markup.heading.atx.1.mdx, markup.heading.atx.1.mdx punctuation.definition.heading.mdx, markup.heading.setext.1.markdown, markup.heading.heading-0.asciidoc + settings + + foreground + #ed8796 + + + + scope + heading.2.markdown punctuation.definition.heading.markdown, heading.2.markdown, markup.heading.atx.2.mdx, markup.heading.atx.2.mdx punctuation.definition.heading.mdx, markup.heading.setext.2.markdown, markup.heading.heading-1.asciidoc + settings + + foreground + #f5a97f + + + + scope + heading.3.markdown punctuation.definition.heading.markdown, heading.3.markdown, markup.heading.atx.3.mdx, markup.heading.atx.3.mdx punctuation.definition.heading.mdx, markup.heading.heading-2.asciidoc + settings + + foreground + #eed49f + + + + scope + heading.4.markdown punctuation.definition.heading.markdown, heading.4.markdown, markup.heading.atx.4.mdx, markup.heading.atx.4.mdx punctuation.definition.heading.mdx, markup.heading.heading-3.asciidoc + settings + + foreground + #a6da95 + + + + scope + heading.5.markdown punctuation.definition.heading.markdown, heading.5.markdown, markup.heading.atx.5.mdx, markup.heading.atx.5.mdx punctuation.definition.heading.mdx, markup.heading.heading-4.asciidoc + settings + + foreground + #8aadf4 + + + + scope + heading.6.markdown punctuation.definition.heading.markdown, heading.6.markdown, markup.heading.atx.6.mdx, markup.heading.atx.6.mdx punctuation.definition.heading.mdx, markup.heading.heading-5.asciidoc + settings + + foreground + #c6a0f6 + + + + scope + markup.bold + settings + + foreground + #ed8796 + fontStyle + bold + + + + scope + markup.italic + settings + + foreground + #ed8796 + fontStyle + italic + + + + scope + markup.strikethrough + settings + + foreground + #a5adcb + fontStyle + strikethrough + + + + name + Markdown auto links + scope + punctuation.definition.link, markup.underline.link + settings + + foreground + #8aadf4 + + + + name + Markdown links + scope + text.html.markdown punctuation.definition.link.title, string.other.link.title.markdown, markup.link, punctuation.definition.constant.markdown, constant.other.reference.link.markdown, markup.substitution.attribute-reference + settings + + foreground + #b7bdf8 + + + + name + Markdown code spans + scope + punctuation.definition.raw.markdown, markup.inline.raw.string.markdown, markup.raw.block.markdown + settings + + foreground + #a6da95 + + + + name + Markdown triple backtick language identifier + scope + fenced_code.block.language + settings + + foreground + #91d7e3 + + + + name + Markdown triple backticks + scope + markup.fenced_code.block punctuation.definition, markup.raw support.asciidoc + settings + + foreground + #939ab7 + + + + name + Markdown quotes + scope + markup.quote, punctuation.definition.quote.begin + settings + + foreground + #f5bde6 + + + + name + Markdown separators + scope + meta.separator.markdown + settings + + foreground + #8bd5ca + + + + name + Markdown list bullets + scope + punctuation.definition.list.begin.markdown, markup.list.bullet + settings + + foreground + #8bd5ca + + + + name + Nix attribute names + scope + entity.other.attribute-name.multipart.nix, entity.other.attribute-name.single.nix + settings + + foreground + #8aadf4 + + + + name + Nix parameter names + scope + variable.parameter.name.nix + settings + + foreground + #cad3f5 + fontStyle + + + + + name + Nix interpolated parameter names + scope + meta.embedded variable.parameter.name.nix + settings + + foreground + #b7bdf8 + fontStyle + + + + + name + Nix paths + scope + string.unquoted.path.nix + settings + + foreground + #f5bde6 + fontStyle + + + + + name + PHP Attributes + scope + support.attribute.builtin, meta.attribute.php + settings + + foreground + #eed49f + + + + name + PHP Parameters (needed for the leading dollar sign) + scope + meta.function.parameters.php punctuation.definition.variable.php + settings + + foreground + #ee99a0 + + + + name + PHP Constants (null, __FILE__, etc.) + scope + constant.language.php + settings + + foreground + #c6a0f6 + + + + name + PHP functions + scope + text.html.php support.function + settings + + foreground + #91d7e3 + + + + name + PHPdoc keywords + scope + keyword.other.phpdoc.php + settings + + fontStyle + + + + + name + Python argument functions reset to text, otherwise they inherit blue from function-call + scope + support.variable.magic.python, meta.function-call.arguments.python + settings + + foreground + #cad3f5 + + + + name + Python double underscore functions + scope + support.function.magic.python + settings + + foreground + #91d7e3 + fontStyle + italic + + + + name + Python `self` keyword + scope + variable.parameter.function.language.special.self.python, variable.language.special.self.python + settings + + foreground + #ed8796 + fontStyle + italic + + + + name + python keyword flow/logical (for ... in) + scope + keyword.control.flow.python, keyword.operator.logical.python + settings + + foreground + #c6a0f6 + + + + name + python storage type + scope + storage.type.function.python + settings + + foreground + #c6a0f6 + + + + name + python function support + scope + support.token.decorator.python, meta.function.decorator.identifier.python + settings + + foreground + #91d7e3 + + + + name + python function calls + scope + meta.function-call.python + settings + + foreground + #8aadf4 + + + + name + python function decorators + scope + entity.name.function.decorator.python, punctuation.definition.decorator.python + settings + + foreground + #f5a97f + fontStyle + italic + + + + name + python placeholder reset to normal string + scope + constant.character.format.placeholder.other.python + settings + + foreground + #f5bde6 + + + + name + Python exception & builtins such as exit() + scope + support.type.exception.python, support.function.builtin.python + settings + + foreground + #f5a97f + + + + name + entity.name.type + scope + support.type.python + settings + + foreground + #f5a97f + + + + name + python constants (True/False) + scope + constant.language.python + settings + + foreground + #c6a0f6 + + + + name + Arguments accessed later in the function body + scope + meta.indexed-name.python, meta.item-access.python + settings + + foreground + #ee99a0 + fontStyle + italic + + + + name + Python f-strings/binary/unicode storage types + scope + storage.type.string.python + settings + + foreground + #a6da95 + fontStyle + italic + + + + name + Python type hints + scope + meta.function.parameters.python + settings + + fontStyle + + + + + name + Regex string begin/end in JS/TS + scope + string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end + settings + + foreground + #f5bde6 + + + + name + Regex anchors (^, $) + scope + keyword.control.anchor.regexp + settings + + foreground + #c6a0f6 + + + + name + Regex regular string match + scope + string.regexp.ts + settings + + foreground + #cad3f5 + + + + name + Regex group parenthesis & backreference (\1, \2, \3, ...) + scope + punctuation.definition.group.regexp, keyword.other.back-reference.regexp + settings + + foreground + #a6da95 + + + + name + Regex character class [] + scope + punctuation.definition.character-class.regexp + settings + + foreground + #eed49f + + + + name + Regex character classes (\d, \w, \s) + scope + constant.other.character-class.regexp + settings + + foreground + #f5bde6 + + + + name + Regex range + scope + constant.other.character-class.range.regexp + settings + + foreground + #f4dbd6 + + + + name + Regex quantifier + scope + keyword.operator.quantifier.regexp + settings + + foreground + #8bd5ca + + + + name + Regex constant/numeric + scope + constant.character.numeric.regexp + settings + + foreground + #f5a97f + + + + name + Regex lookaheads, negative lookaheads, lookbehinds, negative lookbehinds + scope + punctuation.definition.group.no-capture.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp + settings + + foreground + #8aadf4 + + + + name + Rust attribute + scope + meta.annotation.rust, meta.annotation.rust punctuation, meta.attribute.rust, punctuation.definition.attribute.rust + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Rust attribute strings + scope + meta.attribute.rust string.quoted.double.rust, meta.attribute.rust string.quoted.single.char.rust + settings + + fontStyle + + + + + name + Rust keyword + scope + entity.name.function.macro.rules.rust, storage.type.module.rust, storage.modifier.rust, storage.type.struct.rust, storage.type.enum.rust, storage.type.trait.rust, storage.type.union.rust, storage.type.impl.rust, storage.type.rust, storage.type.function.rust, storage.type.type.rust + settings + + foreground + #c6a0f6 + fontStyle + + + + + name + Rust u/i32, u/i64, etc. + scope + entity.name.type.numeric.rust + settings + + foreground + #c6a0f6 + fontStyle + + + + + name + Rust generic + scope + meta.generic.rust + settings + + foreground + #f5a97f + + + + name + Rust impl + scope + entity.name.impl.rust + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Rust module + scope + entity.name.module.rust + settings + + foreground + #f5a97f + + + + name + Rust trait + scope + entity.name.trait.rust + settings + + foreground + #eed49f + fontStyle + italic + + + + name + Rust struct + scope + storage.type.source.rust + settings + + foreground + #eed49f + + + + name + Rust union + scope + entity.name.union.rust + settings + + foreground + #eed49f + + + + name + Rust enum member + scope + meta.enum.rust storage.type.source.rust + settings + + foreground + #8bd5ca + + + + name + Rust macro + scope + support.macro.rust, meta.macro.rust support.function.rust, entity.name.function.macro.rust + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Rust lifetime + scope + storage.modifier.lifetime.rust, entity.name.type.lifetime + settings + + foreground + #8aadf4 + fontStyle + italic + + + + name + Rust string formatting + scope + string.quoted.double.rust constant.other.placeholder.rust + settings + + foreground + #f5bde6 + + + + name + Rust return type generic + scope + meta.function.return-type.rust meta.generic.rust storage.type.rust + settings + + foreground + #cad3f5 + + + + name + Rust functions + scope + meta.function.call.rust + settings + + foreground + #8aadf4 + + + + name + Rust angle brackets + scope + punctuation.brackets.angle.rust + settings + + foreground + #91d7e3 + + + + name + Rust constants + scope + constant.other.caps.rust + settings + + foreground + #f5a97f + + + + name + Rust function parameters + scope + meta.function.definition.rust variable.other.rust + settings + + foreground + #ee99a0 + + + + name + Rust closure variables + scope + meta.function.call.rust variable.other.rust + settings + + foreground + #cad3f5 + + + + name + Rust self + scope + variable.language.self.rust + settings + + foreground + #ed8796 + + + + name + Rust metavariable names + scope + variable.other.metavariable.name.rust, meta.macro.metavariable.rust keyword.operator.macro.dollar.rust + settings + + foreground + #f5bde6 + + + + name + Shell shebang + scope + comment.line.shebang, comment.line.shebang punctuation.definition.comment, comment.line.shebang, punctuation.definition.comment.shebang.shell, meta.shebang.shell + settings + + foreground + #f5bde6 + fontStyle + italic + + + + name + Shell shebang command + scope + comment.line.shebang constant.language + settings + + foreground + #8bd5ca + fontStyle + italic + + + + name + Shell interpolated command + scope + meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation, meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation + settings + + foreground + #ed8796 + + + + name + Shell interpolated command variable + scope + meta.string meta.interpolation.parameter.shell variable.other.readwrite + settings + + foreground + #f5a97f + fontStyle + italic + + + + scope + source.shell punctuation.section.interpolation, punctuation.definition.evaluation.backticks.shell + settings + + foreground + #8bd5ca + + + + name + Shell EOF + scope + entity.name.tag.heredoc.shell + settings + + foreground + #c6a0f6 + + + + name + Shell quoted variable + scope + string.quoted.double.shell variable.other.normal.shell + settings + + foreground + #cad3f5 + + + + scope + markup.heading.synopsis.man, markup.heading.title.man, markup.heading.other.man, markup.heading.env.man + settings + + foreground + #c6a0f6 + + + + scope + markup.heading.commands.man + settings + + foreground + #8aadf4 + + + + scope + markup.heading.env.man + settings + + foreground + #f5bde6 + + + + + \ No newline at end of file diff --git a/programs/bat/catppuccinMocha.tmTheme b/programs/bat/catppuccinMocha.tmTheme new file mode 100644 index 0000000..364617b --- /dev/null +++ b/programs/bat/catppuccinMocha.tmTheme @@ -0,0 +1,2021 @@ + + + + + name + Catppuccin Mocha + semanticClass + theme.dark.catppuccin-mocha + uuid + 627ce890-fabb-4d39-9819-7be71f4bdca7 + author + Catppuccin Org + colorSpaceName + sRGB + settings + + + settings + + background + #1e1e2e + foreground + #cdd6f4 + caret + #f5e0dc + lineHighlight + #cdd6f412 + misspelling + #f38ba8 + accent + #cba6f7 + selection + #9399b240 + activeGuide + #45475a + findHighlight + #3e5767 + gutterForeground + #7f849c + + + + name + Basic text & variable names (incl. leading punctuation) + scope + text, source, variable.other.readwrite, punctuation.definition.variable + settings + + foreground + #cdd6f4 + + + + name + Parentheses, Brackets, Braces + scope + punctuation + settings + + foreground + #9399b2 + fontStyle + + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #6c7086 + fontStyle + italic + + + + scope + string, punctuation.definition.string + settings + + foreground + #a6e3a1 + + + + scope + constant.character.escape + settings + + foreground + #f5c2e7 + + + + name + Booleans, constants, numbers + scope + constant.numeric, variable.other.constant, entity.name.constant, constant.language.boolean, constant.language.false, constant.language.true, keyword.other.unit.user-defined, keyword.other.unit.suffix.floating-point + settings + + foreground + #fab387 + + + + scope + keyword, keyword.operator.word, keyword.operator.new, variable.language.super, support.type.primitive, storage.type, storage.modifier, punctuation.definition.keyword + settings + + foreground + #cba6f7 + fontStyle + + + + + scope + entity.name.tag.documentation + settings + + foreground + #cba6f7 + + + + name + Punctuation + scope + keyword.operator, punctuation.accessor, punctuation.definition.generic, meta.function.closure punctuation.section.parameters, punctuation.definition.tag, punctuation.separator.key-value + settings + + foreground + #94e2d5 + + + + scope + entity.name.function, meta.function-call.method, support.function, support.function.misc, variable.function + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Classes + scope + entity.name.class, entity.other.inherited-class, support.class, meta.function-call.constructor, entity.name.struct + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Enum + scope + entity.name.enum + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Enum member + scope + meta.enum variable.other.readwrite, variable.other.enummember + settings + + foreground + #94e2d5 + + + + name + Object properties + scope + meta.property.object + settings + + foreground + #94e2d5 + + + + name + Types + scope + meta.type, meta.type-alias, support.type, entity.name.type + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Decorators + scope + meta.annotation variable.function, meta.annotation variable.annotation.function, meta.annotation punctuation.definition.annotation, meta.decorator, punctuation.decorator + settings + + foreground + #fab387 + + + + scope + variable.parameter, meta.function.parameters + settings + + foreground + #eba0ac + fontStyle + italic + + + + name + Built-ins + scope + constant.language, support.function.builtin + settings + + foreground + #f38ba8 + + + + scope + entity.other.attribute-name.documentation + settings + + foreground + #f38ba8 + + + + name + Preprocessor directives + scope + keyword.control.directive, punctuation.definition.directive + settings + + foreground + #f9e2af + + + + name + Type parameters + scope + punctuation.definition.typeparameters + settings + + foreground + #89dceb + + + + name + Namespaces + scope + entity.name.namespace + settings + + foreground + #f9e2af + + + + name + Property names (left hand assignments in json/yaml/css) + scope + support.type.property-name.css + settings + + foreground + #89b4fa + fontStyle + + + + + name + This/Self keyword + scope + variable.language.this, variable.language.this punctuation.definition.variable + settings + + foreground + #f38ba8 + + + + name + Object properties + scope + variable.object.property + settings + + foreground + #cdd6f4 + + + + name + String template interpolation + scope + string.template variable, string variable + settings + + foreground + #cdd6f4 + + + + name + `new` as bold + scope + keyword.operator.new + settings + + fontStyle + bold + + + + name + C++ extern keyword + scope + storage.modifier.specifier.extern.cpp + settings + + foreground + #cba6f7 + + + + name + C++ scope resolution + scope + entity.name.scope-resolution.template.call.cpp, entity.name.scope-resolution.parameter.cpp, entity.name.scope-resolution.cpp, entity.name.scope-resolution.function.definition.cpp + settings + + foreground + #f9e2af + + + + name + C++ doc keywords + scope + storage.type.class.doxygen + settings + + fontStyle + + + + + name + C++ operators + scope + storage.modifier.reference.cpp + settings + + foreground + #94e2d5 + + + + name + C# Interpolated Strings + scope + meta.interpolation.cs + settings + + foreground + #cdd6f4 + + + + name + C# xml-style docs + scope + comment.block.documentation.cs + settings + + foreground + #cdd6f4 + + + + name + Classes, reflecting the className color in JSX + scope + source.css entity.other.attribute-name.class.css, entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css + settings + + foreground + #f9e2af + + + + name + Operators + scope + punctuation.separator.operator.css + settings + + foreground + #94e2d5 + + + + name + Pseudo classes + scope + source.css entity.other.attribute-name.pseudo-class + settings + + foreground + #94e2d5 + + + + scope + source.css constant.other.unicode-range + settings + + foreground + #fab387 + + + + scope + source.css variable.parameter.url + settings + + foreground + #a6e3a1 + fontStyle + + + + + name + CSS vendored property names + scope + support.type.vendored.property-name + settings + + foreground + #89dceb + + + + name + Less/SCSS right-hand variables (@/$-prefixed) + scope + source.css meta.property-value variable, source.css meta.property-value variable.other.less, source.css meta.property-value variable.other.less punctuation.definition.variable.less, meta.definition.variable.scss + settings + + foreground + #eba0ac + + + + name + CSS variables (--prefixed) + scope + source.css meta.property-list variable, meta.property-list variable.other.less, meta.property-list variable.other.less punctuation.definition.variable.less + settings + + foreground + #89b4fa + + + + name + CSS Percentage values, styled the same as numbers + scope + keyword.other.unit.percentage.css + settings + + foreground + #fab387 + + + + name + CSS Attribute selectors, styled the same as strings + scope + source.css meta.attribute-selector + settings + + foreground + #a6e3a1 + + + + name + JSON/YAML keys, other left-hand assignments + scope + keyword.other.definition.ini, punctuation.support.type.property-name.json, support.type.property-name.json, punctuation.support.type.property-name.toml, support.type.property-name.toml, entity.name.tag.yaml, punctuation.support.type.property-name.yaml, support.type.property-name.yaml + settings + + foreground + #89b4fa + fontStyle + + + + + name + JSON/YAML constants + scope + constant.language.json, constant.language.yaml + settings + + foreground + #fab387 + + + + name + YAML anchors + scope + entity.name.type.anchor.yaml, variable.other.alias.yaml + settings + + foreground + #f9e2af + fontStyle + + + + + name + TOML tables / ini groups + scope + support.type.property-name.table, entity.name.section.group-title.ini + settings + + foreground + #f9e2af + + + + name + TOML dates + scope + constant.other.time.datetime.offset.toml + settings + + foreground + #f5c2e7 + + + + name + YAML anchor puctuation + scope + punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml + settings + + foreground + #f5c2e7 + + + + name + YAML triple dashes + scope + entity.other.document.begin.yaml + settings + + foreground + #f5c2e7 + + + + name + Markup Diff + scope + markup.changed.diff + settings + + foreground + #fab387 + + + + name + Diff + scope + meta.diff.header.from-file, meta.diff.header.to-file, punctuation.definition.from-file.diff, punctuation.definition.to-file.diff + settings + + foreground + #89b4fa + + + + name + Diff Inserted + scope + markup.inserted.diff + settings + + foreground + #a6e3a1 + + + + name + Diff Deleted + scope + markup.deleted.diff + settings + + foreground + #f38ba8 + + + + name + dotenv left-hand side assignments + scope + variable.other.env + settings + + foreground + #89b4fa + + + + name + dotenv reference to existing env variable + scope + string.quoted variable.other.env + settings + + foreground + #cdd6f4 + + + + name + GDScript functions + scope + support.function.builtin.gdscript + settings + + foreground + #89b4fa + + + + name + GDScript constants + scope + constant.language.gdscript + settings + + foreground + #fab387 + + + + name + Comment keywords + scope + comment meta.annotation.go + settings + + foreground + #eba0ac + + + + name + go:embed, go:build, etc. + scope + comment meta.annotation.parameters.go + settings + + foreground + #fab387 + + + + name + Go constants (nil, true, false) + scope + constant.language.go + settings + + foreground + #fab387 + + + + name + GraphQL variables + scope + variable.graphql + settings + + foreground + #cdd6f4 + + + + name + GraphQL aliases + scope + string.unquoted.alias.graphql + settings + + foreground + #f2cdcd + + + + name + GraphQL enum members + scope + constant.character.enum.graphql + settings + + foreground + #94e2d5 + + + + name + GraphQL field in types + scope + meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql + settings + + foreground + #f2cdcd + + + + name + HTML/XML DOCTYPE as keyword + scope + keyword.other.doctype, meta.tag.sgml.doctype punctuation.definition.tag, meta.tag.metadata.doctype entity.name.tag, meta.tag.metadata.doctype punctuation.definition.tag + settings + + foreground + #cba6f7 + + + + name + HTML/XML-like <tags/> + scope + entity.name.tag + settings + + foreground + #89b4fa + fontStyle + + + + + name + Special characters like &amp; + scope + text.html constant.character.entity, text.html constant.character.entity punctuation, constant.character.entity.xml, constant.character.entity.xml punctuation, constant.character.entity.js.jsx, constant.charactger.entity.js.jsx punctuation, constant.character.entity.tsx, constant.character.entity.tsx punctuation + settings + + foreground + #f38ba8 + + + + name + HTML/XML tag attribute values + scope + entity.other.attribute-name + settings + + foreground + #f9e2af + + + + name + Components + scope + support.class.component, support.class.component.jsx, support.class.component.tsx, support.class.component.vue + settings + + foreground + #f5c2e7 + fontStyle + + + + + name + Annotations + scope + punctuation.definition.annotation, storage.type.annotation + settings + + foreground + #fab387 + + + + name + Java enums + scope + constant.other.enum.java + settings + + foreground + #94e2d5 + + + + name + Java imports + scope + storage.modifier.import.java + settings + + foreground + #cdd6f4 + + + + name + Javadoc + scope + comment.block.javadoc.java keyword.other.documentation.javadoc.java + settings + + fontStyle + + + + + name + Exported Variable + scope + meta.export variable.other.readwrite.js + settings + + foreground + #eba0ac + + + + name + JS/TS constants & properties + scope + variable.other.constant.js, variable.other.constant.ts, variable.other.property.js, variable.other.property.ts + settings + + foreground + #cdd6f4 + + + + name + JSDoc; these are mainly params, so styled as such + scope + variable.other.jsdoc, comment.block.documentation variable.other + settings + + foreground + #eba0ac + fontStyle + + + + + name + JSDoc keywords + scope + storage.type.class.jsdoc + settings + + fontStyle + + + + + scope + support.type.object.console.js + settings + + foreground + #cdd6f4 + + + + name + Node constants as keywords (module, etc.) + scope + support.constant.node, support.type.object.module.js + settings + + foreground + #cba6f7 + + + + name + implements as keyword + scope + storage.modifier.implements + settings + + foreground + #cba6f7 + + + + name + Builtin types + scope + constant.language.null.js, constant.language.null.ts, constant.language.undefined.js, constant.language.undefined.ts, support.type.builtin.ts + settings + + foreground + #cba6f7 + + + + scope + variable.parameter.generic + settings + + foreground + #f9e2af + + + + name + Arrow functions + scope + keyword.declaration.function.arrow.js, storage.type.function.arrow.ts + settings + + foreground + #94e2d5 + + + + name + Decorator punctuations (decorators inherit from blue functions, instead of styleguide peach) + scope + punctuation.decorator.ts + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Extra JS/TS keywords + scope + keyword.operator.expression.in.js, keyword.operator.expression.in.ts, keyword.operator.expression.infer.ts, keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.is, keyword.operator.expression.keyof.ts, keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.typeof.ts + settings + + foreground + #cba6f7 + + + + name + Julia macros + scope + support.function.macro.julia + settings + + foreground + #94e2d5 + fontStyle + italic + + + + name + Julia language constants (true, false) + scope + constant.language.julia + settings + + foreground + #fab387 + + + + name + Julia other constants (these seem to be arguments inside arrays) + scope + constant.other.symbol.julia + settings + + foreground + #eba0ac + + + + name + LaTeX preamble + scope + text.tex keyword.control.preamble + settings + + foreground + #94e2d5 + + + + name + LaTeX be functions + scope + text.tex support.function.be + settings + + foreground + #89dceb + + + + name + LaTeX math + scope + constant.other.general.math.tex + settings + + foreground + #f2cdcd + + + + name + Lua docstring keywords + scope + comment.line.double-dash.documentation.lua storage.type.annotation.lua + settings + + foreground + #cba6f7 + fontStyle + + + + + name + Lua docstring variables + scope + comment.line.double-dash.documentation.lua entity.name.variable.lua, comment.line.double-dash.documentation.lua variable.lua + settings + + foreground + #cdd6f4 + + + + scope + heading.1.markdown punctuation.definition.heading.markdown, heading.1.markdown, markup.heading.atx.1.mdx, markup.heading.atx.1.mdx punctuation.definition.heading.mdx, markup.heading.setext.1.markdown, markup.heading.heading-0.asciidoc + settings + + foreground + #f38ba8 + + + + scope + heading.2.markdown punctuation.definition.heading.markdown, heading.2.markdown, markup.heading.atx.2.mdx, markup.heading.atx.2.mdx punctuation.definition.heading.mdx, markup.heading.setext.2.markdown, markup.heading.heading-1.asciidoc + settings + + foreground + #fab387 + + + + scope + heading.3.markdown punctuation.definition.heading.markdown, heading.3.markdown, markup.heading.atx.3.mdx, markup.heading.atx.3.mdx punctuation.definition.heading.mdx, markup.heading.heading-2.asciidoc + settings + + foreground + #f9e2af + + + + scope + heading.4.markdown punctuation.definition.heading.markdown, heading.4.markdown, markup.heading.atx.4.mdx, markup.heading.atx.4.mdx punctuation.definition.heading.mdx, markup.heading.heading-3.asciidoc + settings + + foreground + #a6e3a1 + + + + scope + heading.5.markdown punctuation.definition.heading.markdown, heading.5.markdown, markup.heading.atx.5.mdx, markup.heading.atx.5.mdx punctuation.definition.heading.mdx, markup.heading.heading-4.asciidoc + settings + + foreground + #89b4fa + + + + scope + heading.6.markdown punctuation.definition.heading.markdown, heading.6.markdown, markup.heading.atx.6.mdx, markup.heading.atx.6.mdx punctuation.definition.heading.mdx, markup.heading.heading-5.asciidoc + settings + + foreground + #cba6f7 + + + + scope + markup.bold + settings + + foreground + #f38ba8 + fontStyle + bold + + + + scope + markup.italic + settings + + foreground + #f38ba8 + fontStyle + italic + + + + scope + markup.strikethrough + settings + + foreground + #a6adc8 + fontStyle + strikethrough + + + + name + Markdown auto links + scope + punctuation.definition.link, markup.underline.link + settings + + foreground + #89b4fa + + + + name + Markdown links + scope + text.html.markdown punctuation.definition.link.title, string.other.link.title.markdown, markup.link, punctuation.definition.constant.markdown, constant.other.reference.link.markdown, markup.substitution.attribute-reference + settings + + foreground + #b4befe + + + + name + Markdown code spans + scope + punctuation.definition.raw.markdown, markup.inline.raw.string.markdown, markup.raw.block.markdown + settings + + foreground + #a6e3a1 + + + + name + Markdown triple backtick language identifier + scope + fenced_code.block.language + settings + + foreground + #89dceb + + + + name + Markdown triple backticks + scope + markup.fenced_code.block punctuation.definition, markup.raw support.asciidoc + settings + + foreground + #9399b2 + + + + name + Markdown quotes + scope + markup.quote, punctuation.definition.quote.begin + settings + + foreground + #f5c2e7 + + + + name + Markdown separators + scope + meta.separator.markdown + settings + + foreground + #94e2d5 + + + + name + Markdown list bullets + scope + punctuation.definition.list.begin.markdown, markup.list.bullet + settings + + foreground + #94e2d5 + + + + name + Nix attribute names + scope + entity.other.attribute-name.multipart.nix, entity.other.attribute-name.single.nix + settings + + foreground + #89b4fa + + + + name + Nix parameter names + scope + variable.parameter.name.nix + settings + + foreground + #cdd6f4 + fontStyle + + + + + name + Nix interpolated parameter names + scope + meta.embedded variable.parameter.name.nix + settings + + foreground + #b4befe + fontStyle + + + + + name + Nix paths + scope + string.unquoted.path.nix + settings + + foreground + #f5c2e7 + fontStyle + + + + + name + PHP Attributes + scope + support.attribute.builtin, meta.attribute.php + settings + + foreground + #f9e2af + + + + name + PHP Parameters (needed for the leading dollar sign) + scope + meta.function.parameters.php punctuation.definition.variable.php + settings + + foreground + #eba0ac + + + + name + PHP Constants (null, __FILE__, etc.) + scope + constant.language.php + settings + + foreground + #cba6f7 + + + + name + PHP functions + scope + text.html.php support.function + settings + + foreground + #89dceb + + + + name + PHPdoc keywords + scope + keyword.other.phpdoc.php + settings + + fontStyle + + + + + name + Python argument functions reset to text, otherwise they inherit blue from function-call + scope + support.variable.magic.python, meta.function-call.arguments.python + settings + + foreground + #cdd6f4 + + + + name + Python double underscore functions + scope + support.function.magic.python + settings + + foreground + #89dceb + fontStyle + italic + + + + name + Python `self` keyword + scope + variable.parameter.function.language.special.self.python, variable.language.special.self.python + settings + + foreground + #f38ba8 + fontStyle + italic + + + + name + python keyword flow/logical (for ... in) + scope + keyword.control.flow.python, keyword.operator.logical.python + settings + + foreground + #cba6f7 + + + + name + python storage type + scope + storage.type.function.python + settings + + foreground + #cba6f7 + + + + name + python function support + scope + support.token.decorator.python, meta.function.decorator.identifier.python + settings + + foreground + #89dceb + + + + name + python function calls + scope + meta.function-call.python + settings + + foreground + #89b4fa + + + + name + python function decorators + scope + entity.name.function.decorator.python, punctuation.definition.decorator.python + settings + + foreground + #fab387 + fontStyle + italic + + + + name + python placeholder reset to normal string + scope + constant.character.format.placeholder.other.python + settings + + foreground + #f5c2e7 + + + + name + Python exception & builtins such as exit() + scope + support.type.exception.python, support.function.builtin.python + settings + + foreground + #fab387 + + + + name + entity.name.type + scope + support.type.python + settings + + foreground + #fab387 + + + + name + python constants (True/False) + scope + constant.language.python + settings + + foreground + #cba6f7 + + + + name + Arguments accessed later in the function body + scope + meta.indexed-name.python, meta.item-access.python + settings + + foreground + #eba0ac + fontStyle + italic + + + + name + Python f-strings/binary/unicode storage types + scope + storage.type.string.python + settings + + foreground + #a6e3a1 + fontStyle + italic + + + + name + Python type hints + scope + meta.function.parameters.python + settings + + fontStyle + + + + + name + Regex string begin/end in JS/TS + scope + string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end + settings + + foreground + #f5c2e7 + + + + name + Regex anchors (^, $) + scope + keyword.control.anchor.regexp + settings + + foreground + #cba6f7 + + + + name + Regex regular string match + scope + string.regexp.ts + settings + + foreground + #cdd6f4 + + + + name + Regex group parenthesis & backreference (\1, \2, \3, ...) + scope + punctuation.definition.group.regexp, keyword.other.back-reference.regexp + settings + + foreground + #a6e3a1 + + + + name + Regex character class [] + scope + punctuation.definition.character-class.regexp + settings + + foreground + #f9e2af + + + + name + Regex character classes (\d, \w, \s) + scope + constant.other.character-class.regexp + settings + + foreground + #f5c2e7 + + + + name + Regex range + scope + constant.other.character-class.range.regexp + settings + + foreground + #f5e0dc + + + + name + Regex quantifier + scope + keyword.operator.quantifier.regexp + settings + + foreground + #94e2d5 + + + + name + Regex constant/numeric + scope + constant.character.numeric.regexp + settings + + foreground + #fab387 + + + + name + Regex lookaheads, negative lookaheads, lookbehinds, negative lookbehinds + scope + punctuation.definition.group.no-capture.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp + settings + + foreground + #89b4fa + + + + name + Rust attribute + scope + meta.annotation.rust, meta.annotation.rust punctuation, meta.attribute.rust, punctuation.definition.attribute.rust + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Rust attribute strings + scope + meta.attribute.rust string.quoted.double.rust, meta.attribute.rust string.quoted.single.char.rust + settings + + fontStyle + + + + + name + Rust keyword + scope + entity.name.function.macro.rules.rust, storage.type.module.rust, storage.modifier.rust, storage.type.struct.rust, storage.type.enum.rust, storage.type.trait.rust, storage.type.union.rust, storage.type.impl.rust, storage.type.rust, storage.type.function.rust, storage.type.type.rust + settings + + foreground + #cba6f7 + fontStyle + + + + + name + Rust u/i32, u/i64, etc. + scope + entity.name.type.numeric.rust + settings + + foreground + #cba6f7 + fontStyle + + + + + name + Rust generic + scope + meta.generic.rust + settings + + foreground + #fab387 + + + + name + Rust impl + scope + entity.name.impl.rust + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Rust module + scope + entity.name.module.rust + settings + + foreground + #fab387 + + + + name + Rust trait + scope + entity.name.trait.rust + settings + + foreground + #f9e2af + fontStyle + italic + + + + name + Rust struct + scope + storage.type.source.rust + settings + + foreground + #f9e2af + + + + name + Rust union + scope + entity.name.union.rust + settings + + foreground + #f9e2af + + + + name + Rust enum member + scope + meta.enum.rust storage.type.source.rust + settings + + foreground + #94e2d5 + + + + name + Rust macro + scope + support.macro.rust, meta.macro.rust support.function.rust, entity.name.function.macro.rust + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Rust lifetime + scope + storage.modifier.lifetime.rust, entity.name.type.lifetime + settings + + foreground + #89b4fa + fontStyle + italic + + + + name + Rust string formatting + scope + string.quoted.double.rust constant.other.placeholder.rust + settings + + foreground + #f5c2e7 + + + + name + Rust return type generic + scope + meta.function.return-type.rust meta.generic.rust storage.type.rust + settings + + foreground + #cdd6f4 + + + + name + Rust functions + scope + meta.function.call.rust + settings + + foreground + #89b4fa + + + + name + Rust angle brackets + scope + punctuation.brackets.angle.rust + settings + + foreground + #89dceb + + + + name + Rust constants + scope + constant.other.caps.rust + settings + + foreground + #fab387 + + + + name + Rust function parameters + scope + meta.function.definition.rust variable.other.rust + settings + + foreground + #eba0ac + + + + name + Rust closure variables + scope + meta.function.call.rust variable.other.rust + settings + + foreground + #cdd6f4 + + + + name + Rust self + scope + variable.language.self.rust + settings + + foreground + #f38ba8 + + + + name + Rust metavariable names + scope + variable.other.metavariable.name.rust, meta.macro.metavariable.rust keyword.operator.macro.dollar.rust + settings + + foreground + #f5c2e7 + + + + name + Shell shebang + scope + comment.line.shebang, comment.line.shebang punctuation.definition.comment, comment.line.shebang, punctuation.definition.comment.shebang.shell, meta.shebang.shell + settings + + foreground + #f5c2e7 + fontStyle + italic + + + + name + Shell shebang command + scope + comment.line.shebang constant.language + settings + + foreground + #94e2d5 + fontStyle + italic + + + + name + Shell interpolated command + scope + meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation, meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation + settings + + foreground + #f38ba8 + + + + name + Shell interpolated command variable + scope + meta.string meta.interpolation.parameter.shell variable.other.readwrite + settings + + foreground + #fab387 + fontStyle + italic + + + + scope + source.shell punctuation.section.interpolation, punctuation.definition.evaluation.backticks.shell + settings + + foreground + #94e2d5 + + + + name + Shell EOF + scope + entity.name.tag.heredoc.shell + settings + + foreground + #cba6f7 + + + + name + Shell quoted variable + scope + string.quoted.double.shell variable.other.normal.shell + settings + + foreground + #cdd6f4 + + + + scope + markup.heading.synopsis.man, markup.heading.title.man, markup.heading.other.man, markup.heading.env.man + settings + + foreground + #cba6f7 + + + + scope + markup.heading.commands.man + settings + + foreground + #89b4fa + + + + scope + markup.heading.env.man + settings + + foreground + #f5c2e7 + + + + + \ No newline at end of file diff --git a/programs/bat/default.nix b/programs/bat/default.nix new file mode 100644 index 0000000..45a6330 --- /dev/null +++ b/programs/bat/default.nix @@ -0,0 +1,21 @@ +{ + lib, + catppuccinVariant ? "Mocha", + ... +}: { + xdg.configFile = let + variants = ["Latte" "Frappe" "Macchiato" "Mocha"]; + mkVariant = variant: let + fname = "catppuccin${variant}.tmTheme"; + in { + name = "bat/themes/${fname}"; + value = {source = ./. + "/${fname}";}; + }; + in + builtins.listToAttrs + (lib.lists.forEach variants mkVariant); + programs.bat = { + enable = true; + config.theme = "catppuccin${catppuccinVariant}"; + }; +} diff --git a/programs/bottom/default.nix b/programs/bottom/default.nix new file mode 100644 index 0000000..09c35c4 --- /dev/null +++ b/programs/bottom/default.nix @@ -0,0 +1,35 @@ +{ + config, + accentColour ? "base07", + ... +}: { + programs.bottom = { + enable = true; + settings.colors = with config.scheme.withHashtag; let + rainbow = [red yellow green cyan blue magenta]; + in { + table_header_color = base05; + all_cpu_color = base05; + avg_cpu_color = base05; + cpu_core_colors = rainbow; + ram_color = red; + cache_color = green; + swap_color = blue; + rx_color = green; + tx_color = blue; + widget_title_color = config.scheme.withHashtag.${accentColour}; + border_color = base02; + highlighted_border_color = config.scheme.withHashtag.${accentColour}; + text_color = base05; + graph_color = base04; + cursor_color = base02; + selected_text_color = base05; + selected_bg_color = base01; + high_battery_color = green; + medium_battery_color = yellow; + low_battery_color = red; + gpu_core_colors = rainbow; + arc_color = cyan; + }; + }; +} diff --git a/programs/cava/default.nix b/programs/cava/default.nix new file mode 100644 index 0000000..7f61e7d --- /dev/null +++ b/programs/cava/default.nix @@ -0,0 +1,17 @@ +{config, ...}: { + programs.cava = { + enable = true; + settings = { + color = with config.scheme.withHashtag; { + gradient = 1; + gradient_count = 6; + gradient_color_1 = "'${red}'"; + gradient_color_2 = "'${yellow}'"; + gradient_color_3 = "'${green}'"; + gradient_color_4 = "'${cyan}'"; + gradient_color_5 = "'${blue}'"; + gradient_color_6 = "'${magenta}'"; + }; + }; + }; +} diff --git a/programs/emacs/default.nix b/programs/emacs/default.nix new file mode 100644 index 0000000..eac920a --- /dev/null +++ b/programs/emacs/default.nix @@ -0,0 +1,172 @@ +{ + config, + pkgs, + fonts, + ... +}: { + imports = [../git/default.nix]; + programs.git.extraConfig.core.editor = "$EDITOR"; + programs.emacs = { + # Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git + # git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs + enable = true; + package = pkgs.emacs29-pgtk; + extraConfig = let + shell = "${pkgs.zsh}/bin/zsh"; + font = "${fonts.monospace.name}-${toString fonts.sizes.applications}"; + fixed-font-family = "${fonts.monospace.name}"; + variable-font-family = "${fonts.sansSerif.name}"; + alpha = "80"; + in '' + (customize-set-variable 'shell-file-name "${shell}") + (add-to-list 'initial-frame-alist '(font . "${font}")) + (add-to-list 'default-frame-alist '(font . "${font}")) + (set-face-attribute 'fixed-pitch nil :family "${fixed-font-family}") + (set-face-attribute 'fixed-pitch-serif nil :family "${fixed-font-family}") + (set-face-attribute 'variable-pitch nil :family "${variable-font-family}") + (add-to-list 'initial-frame-alist '(alpha-background . ${alpha})) + (add-to-list 'default-frame-alist '(alpha-background . ${alpha})) + (scroll-bar-mode -1) + (tab-bar-mode -1) + (menu-bar-mode -1) + ''; + extraPackages = epkgs: + with epkgs; [ + # Theme + base16-theme + + # UI + all-the-icons + nerd-icons + nerd-icons-completion + nerd-icons-corfu + nerd-icons-dired + nerd-icons-ibuffer + doom-modeline + diminish + ligature + page-break-lines + helpful + which-key + link-hint + diff-hl + + # Completion + cape + consult + consult-eglot + consult-flyspell + corfu + corfu-terminal + embark + embark-consult + marginalia + orderless + vertico + + # Snippets + tempel + tempel-collection + + # spell-checking + flyspell-correct + + # password-store + pass + password-store + password-store-otp + + # IDE + treesit-grammars.with-all-grammars + treesit-auto + flymake-popon + flymake-collection + flymake-eslint + flymake-shellcheck + apheleia + direnv + rainbow-delimiters + aggressive-indent + nix-mode + python-docstring + + # Media + emms + + # org-mode + org-roam + org-noter + org-journal + + # org-cite + citar + citar-embark + + # org-plot + gnuplot + + # org-mode HTML export + htmlize + + # Projects + ibuffer-project + magit + forge + + # Writing + markdown-mode + pandoc-mode + auctex + auctex-latexmk + latex-preview-pane + + # Email + mu4e + + # RSS feeds + elfeed + elfeed-org + elfeed-tube + ]; + }; + services = { + emacs = { + enable = true; + package = config.programs.emacs.finalPackage; + defaultEditor = true; + client.enable = true; + socketActivation.enable = true; + startWithUserSession = false; + }; + git-sync.repositories = with config.xdg.userDirs; { + org = { + path = "${documents}/Org"; + uri = "git+https://git.xenia.me.uk/xenia/org.git"; + }; + references = { + path = "${documents}/References"; + uri = "git+https://git.xenia.me.uk/xenia/references.git"; + }; + }; + }; + home.packages = with pkgs; [ + # Emacs requirements + imagemagick + languagetool + wordnet + gnuplot # For org-plot + graphviz # For org-roam graph + mp3info # For EMMS + + # Language-specific requirements + sqlite + pandoc + ghostscript + poppler_utils + + # Customised LaTeX install + (texlive.combine { + inherit (pkgs.texlive) scheme-medium dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of; + }) + ]; +} diff --git a/programs/git/default.nix b/programs/git/default.nix new file mode 100644 index 0000000..60f3b22 --- /dev/null +++ b/programs/git/default.nix @@ -0,0 +1,39 @@ +{ + config, + lib, + ... +}: { + services.git-sync.enable = false; # Can't find pass for some reason... + programs.git = { + enable = true; + userName = "Evie Litherland-Smith"; + userEmail = lib.mkDefault "evie@xenia.me.uk"; + delta = { + enable = true; + options = { + line-numbers = true; + hyprlinks = true; + navigate = true; + side-by-side = true; + syntax-theme = with config.programs; lib.mkIf bat.enable bat.config.theme; + }; + }; + attributes = [ + "*.gpg filter=gpg diff=gpg" + "*.asc filter=gpg diff=gpg" + ]; + extraConfig = let + user = "pixelifytica"; + in { + github = {inherit user;}; + gitea = {inherit user;}; + pull.rebase = false; + init.defaultBranch = "main"; + merge.conflictstyle = "diff3"; + diff = { + colorMoved = "default"; + gpg.textconv = "gpg --no-tty --decrypt"; + }; + }; + }; +} diff --git a/programs/obs/default.nix b/programs/obs/default.nix new file mode 100644 index 0000000..c251e0d --- /dev/null +++ b/programs/obs/default.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + home.packages = with pkgs; [helvum]; + programs.obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-vkcapture + obs-pipewire-audio-capture + input-overlay + ]; + }; +} diff --git a/programs/prog/default.nix b/programs/prog/default.nix new file mode 100644 index 0000000..399906c --- /dev/null +++ b/programs/prog/default.nix @@ -0,0 +1,25 @@ +{pkgs, ...}: { + xdg.configFile = { + "ruff/pyproject.toml".source = ./ruff.toml; + "pypoetry/config.toml".source = ./pypoetry.toml; + }; + home.packages = with pkgs; [ + # Nix + nil + alejandra + + # Shell + shfmt + shellcheck + nodePackages.prettier + + # Python + (python3.withPackages + (ps: with ps; [python-lsp-server flake8 mypy])) + black + isort + + # FORTRAN + fortls + ]; +} diff --git a/programs/prog/luarocks/graph-toolkit.nix b/programs/prog/luarocks/graph-toolkit.nix new file mode 100644 index 0000000..c0c8dd5 --- /dev/null +++ b/programs/prog/luarocks/graph-toolkit.nix @@ -0,0 +1,41 @@ +{ + agg, + freetype, + buildLuarocksPackage, + fetchgit, + fetchurl, + lua, + luaOlder, +}: +buildLuarocksPackage { + pname = "graph-toolkit"; + version = "scm-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/graph-toolkit-scm-1.rockspec"; + sha256 = "0hsrf7k45w8ri18mdrx44mv1kr4zfr5mg76cxi8nnr30ssrblvgb"; + }) + .outPath; + src = fetchgit (removeAttrs (builtins.fromJSON '' { + "url": "https://github.com/franko/graph-toolkit", + "rev": "126a11bdbb98faf785c373516a288b7fa609f824", + "date": "2015-01-02T08:44:01-08:00", + "path": "/nix/store/gbwbjrl4j42kaqk3pjzvmckmr6dimkd0-graph-toolkit", + "sha256": "1pqjpqfandi7brk2213vlq891bl8drb0q32m5wmf0l21li0l4zrp", + "hash": "sha256-N39CQaRBUOAqL1UMDFZuiK6QEKZ7BCFmXic2qxy+Et8=", + "fetchLFS": false, + "fetchSubmodules": true, + "deepClone": false, + "leaveDotGit": false + } + '') ["date" "path" "sha256"]); + + disabled = luaOlder "5.1"; + propagatedBuildInputs = [lua agg freetype]; + + meta = { + homepage = "http://franko.github.io/graph-toolkit/"; + description = "Lua Graphics Toolkit"; + license.fullName = "GPL-3"; + }; +} diff --git a/programs/prog/luarocks/scilua.nix b/programs/prog/luarocks/scilua.nix new file mode 100644 index 0000000..f816bb6 --- /dev/null +++ b/programs/prog/luarocks/scilua.nix @@ -0,0 +1,33 @@ +{ + buildLuarocksPackage, + fetchurl, + lua, + luaAtLeast, + luaOlder, + luaPackages, +}: let + xsys = luaPackages.callPackage ./xsys.nix {}; +in + buildLuarocksPackage { + pname = "sci"; + version = "1.0.0.beta12-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/sci-1.0.0.beta12-1.rockspec"; + sha256 = "0lprn9x4zw767hdz8lyxmwrrfyn5xj3x50pm9b4qiwy8992mg00r"; + }) + .outPath; + src = fetchurl { + url = "https://github.com/stepelu/lua-sci/archive/v1.0.0-beta12.tar.gz"; + sha256 = "0a45r7n13gfqckpdp1bmizqvjadn8nc5d6ff9gjw860g3i75sy2h"; + }; + + disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [lua xsys]; + + meta = { + homepage = "https://github.com/stepelu/lua-sci"; + description = "Scientific Computing with LuaJIT"; + license.fullName = "MIT"; + }; + } diff --git a/programs/prog/luarocks/xsys.nix b/programs/prog/luarocks/xsys.nix new file mode 100644 index 0000000..d3b88bc --- /dev/null +++ b/programs/prog/luarocks/xsys.nix @@ -0,0 +1,30 @@ +{ + buildLuarocksPackage, + fetchurl, + lua, + luaAtLeast, + luaOlder, +}: +buildLuarocksPackage { + pname = "xsys"; + version = "1.0.2-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/xsys-1.0.2-1.rockspec"; + sha256 = "0jlyrwbzh6fi68msdynp4bbihyww4i3yk0qh859xlwqhfy5cza7p"; + }) + .outPath; + src = fetchurl { + url = "https://github.com/stepelu/lua-xsys/archive/v1.0.2.tar.gz"; + sha256 = "1zwrlp6bghq8c12kyqc1ic7mrn8lf3d42755h8q2wxwhy1i3xqyh"; + }; + + disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [lua]; + + meta = { + homepage = "http://scilua.org/xsys.html"; + description = "LuaJIT General Purpose Routines"; + license.fullName = "MIT"; + }; +} diff --git a/programs/prog/pypoetry.toml b/programs/prog/pypoetry.toml new file mode 100644 index 0000000..acda707 --- /dev/null +++ b/programs/prog/pypoetry.toml @@ -0,0 +1,9 @@ +[virtualenvs] +create = true +in-project = true + +[virtualenvs.options] +always-copy = true +no-pip = true +no-setuptools = true +system-site-packages = true diff --git a/programs/prog/ruff.toml b/programs/prog/ruff.toml new file mode 100644 index 0000000..fa952f6 --- /dev/null +++ b/programs/prog/ruff.toml @@ -0,0 +1,37 @@ +[lint] +select = [ + "F", "E4", "E7", "E9", # Defaults + "W", # pycodestyle warnings + "B", # Flake8 bugbear rules + "PD", # Pandas vet rules + "NPY", # NumPy specific rules + "RUF", # Ruff specific rules + "PERF1", "PERF2", # Performance lints from Perflint + "E101", # Mixed spaces and tabs + "E501", # Line too long + "C901", # Complex structure + "I001", # Import block un-sorted / un-formatted + "I002", # Missing required import + "N804", # First argument of class method should be cls + "N805" # First argument of method should be self +] +ignore = [ + "W191", # Ignore due to conflict with ruff formatter + "E111", # Ignore due to conflict with ruff formatter + "E114", # Ignore due to conflict with ruff formatter + "E117", # Ignore due to conflict with ruff formatter + "D206", # Ignore due to conflict with ruff formatter + "D300", # Ignore due to conflict with ruff formatter + "Q000", # Ignore due to conflict with ruff formatter + "Q001", # Ignore due to conflict with ruff formatter + "Q002", # Ignore due to conflict with ruff formatter + "Q003", # Ignore due to conflict with ruff formatter + "COM812", # Ignore due to conflict with ruff formatter + "COM819", # Ignore due to conflict with ruff formatter + "ISC001", # Ignore due to conflict with ruff formatter + "ISC002" # Ignore due to conflict with ruff formatter +] +unfixable = ["W", "B", "PD", "NPY", "RUF", "E101", "E501", "C901", "I001", "I002"] + +# [format] +# docstring-code-format = true diff --git a/programs/rofi/default.nix b/programs/rofi/default.nix new file mode 100644 index 0000000..97876d2 --- /dev/null +++ b/programs/rofi/default.nix @@ -0,0 +1,140 @@ +{ + config, + pkgs, + fonts, + accentColour ? "base07", + ... +}: { + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + font = fonts.monospace.name; + location = "center"; + plugins = with pkgs; [rofi-emoji]; + pass = { + enable = true; + extraConfig = '' + USERNAME_field='login' + ''; + }; + extraConfig = { + modi = "run,drun,ssh,window,emoji,combi"; + combi-modi = "drun,ssh,window,emoji"; + sidebar-mode = true; + sort = true; + sorting-method = "fzf"; + matching = "fuzzy"; + icon-theme = config.gtk.iconTheme.name; + show-icons = true; + application-fallback-icon = "application-x-addon"; + drun-display-format = "{icon} {name} ({categories})"; + disable-history = false; + hide-scrollbar = true; + display-run = " 󰅴 Run "; + display-drun = " 󱓞 Apps "; + display-ssh = " 󰢹 SSH "; + display-window = " 󰧨 Move "; + display-emoji = " 󰞅 Emoji "; + display-combi = " 󰛡 Combi "; + }; + theme = with builtins; + with config.scheme; let + inherit (config.lib.formats.rasi) mkLiteral; + bg = mkLiteral "rgba (${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 80%)"; + bg2 = mkLiteral "rgba (${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 100%)"; + fg = mkLiteral withHashtag.base05; + fg2 = mkLiteral withHashtag.base04; + border = mkLiteral withHashtag.${accentColour}; + blue = mkLiteral withHashtag.blue; + in { + "*" = { + background-color = mkLiteral "transparent"; + text-color = fg; + font = with fonts; "${monospace.name} ${toString sizes.popups}"; + }; + + window = { + height = mkLiteral "75%"; + width = mkLiteral "75%"; + border = mkLiteral "1px"; + border-color = border; + border-radius = mkLiteral "10px"; + background-color = bg; + }; + + inputbar = { + children = map mkLiteral ["prompt" "entry"]; + padding = mkLiteral "2px"; + }; + + prompt = { + background-color = bg2; + padding = mkLiteral "6px"; + text-color = blue; + border-radius = mkLiteral "10px"; + margin = mkLiteral "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "="; + }; + + entry = { + padding = mkLiteral "6px"; + margin = mkLiteral "20px 0px 0px 10px"; + }; + + listview = { + border = mkLiteral "0px 0px 0px"; + padding = mkLiteral "6px 0px 0px"; + margin = mkLiteral "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = mkLiteral "5px"; + }; + + "element-icon" = { + size = mkLiteral "25px"; + }; + + "element selected" = { + background-color = bg2; + text-color = blue; + border-radius = mkLiteral "10px"; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = mkLiteral "10px"; + text-color = fg2; + border-radius = mkLiteral "10px"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.5"; + }; + + "button selected" = { + background-color = bg2; + text-color = blue; + }; + + message = { + margin = mkLiteral "2px"; + padding = mkLiteral "2px"; + border-radius = mkLiteral "5px"; + }; + + textbox = { + padding = mkLiteral "6px"; + margin = mkLiteral "20px 0px 0px 20px"; + text-color = blue; + }; + }; + }; +} diff --git a/programs/ssh/default.nix b/programs/ssh/default.nix new file mode 100644 index 0000000..7358329 --- /dev/null +++ b/programs/ssh/default.nix @@ -0,0 +1,40 @@ +{...}: { + programs.ssh = { + enable = true; + forwardAgent = true; + compression = true; + serverAliveInterval = 15; + serverAliveCountMax = 3; + controlMaster = "auto"; + controlPersist = "10s"; + extraConfig = '' + AddKeysToAgent=yes + SetEnv TERM=xterm-256color + ''; + matchBlocks = { + "git*".user = "git"; + "legion" = { + user = "pixelifytica"; + hostname = "192.168.0.31"; + }; + "vanguard" = { + user = "pixelifytica"; + hostname = "192.168.0.90"; + }; + "ionos" = { + user = "root"; + hostname = "77.68.67.133"; + }; + "freia" = { + user = "elitherl"; + hostname = "freia020.hpc.l"; + forwardX11Trusted = true; + }; + "heimdall" = { + user = "elitherl"; + hostname = "heimdall003.jet.uk"; + forwardX11Trusted = true; + }; + }; + }; +} diff --git a/programs/starship/default.nix b/programs/starship/default.nix new file mode 100644 index 0000000..ae5c2c7 --- /dev/null +++ b/programs/starship/default.nix @@ -0,0 +1,75 @@ +{...}: { + programs.starship = { + enable = true; + enableTransience = true; + settings = { + add_newline = false; + character = { + success_symbol = "[󰁔 ](bold green)"; + error_symbol = "[󰁔 ](bold red)"; + }; + command_timeout = 2000; + container = {symbol = " ";}; + directory = { + truncation_length = 2; + fish_style_pwd_dir_length = 1; + truncate_to_repo = false; + }; + direnv = {disabled = false;}; + git_branch = { + symbol = " "; + only_attached = true; + ignore_branches = ["master" "main"]; + }; + git_commit = { + format = "[ $hash | $tag]($style) "; + tag_symbol = " "; + tag_disabled = false; + }; + git_metrics = {disabled = false;}; + git_status = { + stashed = " "; + ahead = " "; + behind = " "; + up_to_date = ""; + diverged = " "; + conflicted = " "; + deleted = " "; + renamed = " "; + modified = " "; + staged = " "; + untracked = " "; + typechanged = " "; + }; + hostname = { + ssh_only = true; + ssh_symbol = "󰢹 "; + }; + jobs = {symbol = "󰈏 ";}; + line_break = {disabled = false;}; + localip = {disabled = false;}; + memory_usage = {disabled = false;}; + os = { + disabled = false; + format = "on [$symbol]($style) "; + }; + python = {python_binary = "python3";}; + shell = { + disabled = false; + format = "using [$indicator ]($style)"; + }; + status = { + disabled = false; + map_symbol = true; + pipestatus = true; + symbol = " "; + success_symbol = ""; + not_executable_symbol = " "; + not_found_symbol = " "; + sigint_symbol = " "; + signal_symbol = " "; + }; + sudo = {disabled = false;}; + }; + }; +} diff --git a/programs/sway/default.nix b/programs/sway/default.nix new file mode 100644 index 0000000..0b229d8 --- /dev/null +++ b/programs/sway/default.nix @@ -0,0 +1,180 @@ +{ + config, + lib, + pkgs, + fonts, + accentColour ? "base07", + ... +}: { + imports = [../desktop.nix]; + home.packages = with pkgs; [ + (writeShellScriptBin "protonmail-setup-bridge" '' + pkill -9 -f protonmail-bridge + ${protonmail-bridge}/bin/protonmail-bridge -c + swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n" + '') + (writeShellScriptBin "davmail-setup" '' + systemctl --user restart davmail # Ensure config file is present + systemctl --user stop davmail + ${davmail}/bin/davmail -n ~/.davmail.properties + systemctl --user restart davmail + '') + ]; + wayland.windowManager.sway = { + enable = true; + package = null; + swaynag.enable = true; + systemd.enable = true; + xwayland = true; + config = { + input = { + "*" = { + xkb_layout = "gb"; + xkb_options = "ctrl:nocaps"; + }; + "type:touchpad" = { + tap = "enabled"; + natural_scroll = "enabled"; + }; + }; + seat = { + "seat0" = { + xcursor_theme = with config.gtk.cursorTheme; "${name} ${toString size}"; + }; + }; + modifier = "Mod4"; + terminal = "${config.programs.alacritty.package}/bin/alacritty"; + menu = "${config.programs.rofi.finalPackage}/bin/rofi -show drun"; + workspaceAutoBackAndForth = true; + bars = []; + gaps = { + inner = 5; + outer = 0; + }; + fonts = { + names = [fonts.monospace.name]; + style = "regular"; + size = fonts.sizes.desktop * 1.0; + }; + colors = with config.scheme.withHashtag; let + text = toString base05; + indicator = toString cyan; + in rec { + background = toString base00; + focused = rec { + inherit background text indicator; + border = toString config.scheme.withHashtag.${accentColour}; + childBorder = border; + }; + focusedInactive = rec { + inherit background text indicator; + border = toString base04; + childBorder = border; + }; + unfocused = rec { + inherit background text indicator; + border = toString base03; + childBorder = border; + }; + urgent = rec { + inherit background text indicator; + border = toString red; + childBorder = border; + }; + }; + startup = [ + {command = "${pkgs.swaynotificationcenter}/bin/swaync";} + {command = "${pkgs.swaybg}/bin/swaybg -m fill -i ${../../wallpapers/waves/cat-waves.png}";} + {command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";} + {command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n";} + ]; + window = { + border = 1; + commands = [ + { + criteria = {app_id = "org.kde.polkit-kde-authentication-agent-1";}; + command = "floating enable"; + } + { + criteria = {app_id = "Pinentry";}; + command = "floating enable"; + } + { + criteria = {app_id = "pavucontrol";}; + command = "floating enable"; + } + { + criteria = {app_id = ".blueman-manager-wrapped";}; + command = "floating enable"; + } + { + criteria = {app_id = "nm-connection-editor";}; + command = "floating enable"; + } + { + criteria = {class = "steam";}; + command = "layout tabbed"; + } + ]; + }; + floating.border = 1; + keybindings = with config; let + modifier = wayland.windowManager.sway.config.modifier; + in + lib.mkOptionDefault { + # Movement + "${modifier}+comma" = "workspace prev"; + "${modifier}+period" = "workspace next"; + "${modifier}+shift+comma" = "move workspace prev"; + "${modifier}+shift+period" = "move workspace next"; + "${modifier}+bracketleft" = "move workspace to output left"; + "${modifier}+bracketright" = "move workspace to output right"; + + # Function keys + ## Sound + "XF86AudioMute" = "exec ${services.avizo.package}/bin/volumectl %"; + "XF86AudioMicMute" = "exec ${services.avizo.package}/bin/volumectl -m %"; + "XF86AudioRaiseVolume" = "exec ${services.avizo.package}/bin/volumectl -u + 5"; + "XF86AudioLowerVolume" = "exec ${services.avizo.package}/bin/volumectl -u - 5"; + + ## Playback + "XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; + "XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; + "XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous"; + "XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next"; + + ## Brightness + "XF86MonBrightnessUp" = "exec ${services.avizo.package}/bin/lightctl + 5"; + "XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5"; + + # System utilities + "${modifier}+F1" = "exec ${programs.swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"; + "${modifier}+p" = "exec ${programs.wlogout.package}/bin/wlogout"; + "${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; + "${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"; + "${modifier}+Shift+Return" = "exec ${programs.emacs.finalPackage}/bin/emacsclient -c"; + }; + }; + extraConfig = '' + bindgesture swipe:right workspace prev + bindgesture swipe:left workspace next + corner_radius 10 + blur enable + blur_xray disable + blur_passes 3 + blur_radius 5 + corner_radius 10 + shadows enable + shadow_blur_radius 4 + layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows disable + layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows disable + layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows disable + layer_effects "rofi" blur enable; blur_ignore_transparent enable; shadows disable + layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows disable + layer_effects "swaync-notification-window" blur enable; blur_ignore_transparent enable; shadows disable + layer_effects "swaync-control-center" blur enable; blur_ignore_transparent enable; shadows disable + titlebar_separator enable + scratchpad_minimize enable + ''; + }; +} diff --git a/programs/swaylock/default.nix b/programs/swaylock/default.nix new file mode 100644 index 0000000..685e871 --- /dev/null +++ b/programs/swaylock/default.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + # Settings are specifically for swaylock-effects + settings = { + indicator-radius = 100; + indicator-thickness = 10; + indicator-caps-lock = true; + ignore-empty-password = true; + show-failed-attempts = true; + effect-blur = "5x3"; + effect-vignette = "0.5:0.5"; + grace = 2; + fade-in = 0.2; + }; + }; +} diff --git a/programs/swaync/default.nix b/programs/swaync/default.nix new file mode 100644 index 0000000..4e07488 --- /dev/null +++ b/programs/swaync/default.nix @@ -0,0 +1,355 @@ +{ + config, + pkgs, + fonts, + accentColour ? "base07", + ... +}: { + home.packages = [pkgs.swaynotificationcenter]; + xdg.configFile."swaync/style.css".text = with config.scheme; '' + * { + all: unset; + font-size: 1.2rem; + font-family: "${fonts.monospace.name}"; + transition: 200ms; + } + + .floating-notifications.background .notification-row .notification-background { + border-radius: 10px; + border: 1px solid ${withHashtag.${accentColour}}; + margin: 18px; + background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8); + color: ${withHashtag.base05}; + padding: 0; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification { + padding: 7px; + border-radius: 10px; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + .notification-content { + margin: 7px; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + .notification-content + .summary { + color: ${withHashtag.base05}; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + .notification-content + .time { + color: ${withHashtag.base04}; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + .notification-content + .body { + color: ${withHashtag.base05}; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * { + min-height: 3.4em; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action { + border-radius: 10px; + background-color: ${withHashtag.base01}; + color: ${withHashtag.base05}; + margin: 7px; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:hover { + background-color: ${withHashtag.base01}; + color: ${withHashtag.base05}; + } + + .floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:active { + background-color: ${withHashtag.blue}; + color: ${withHashtag.base00}; + } + + .floating-notifications.background + .notification-row + .notification-background + .close-button { + margin: 7px; + padding: 2px; + border-radius: 10px; + background-color: ${withHashtag.red}; + color: ${withHashtag.base00}; + } + + .floating-notifications.background + .notification-row + .notification-background + .close-button:hover { + background-color: ${withHashtag.red}; + color: ${withHashtag.base00}; + } + + .floating-notifications.background + .notification-row + .notification-background + .close-button:active { + background-color: ${withHashtag.red}; + color: ${withHashtag.base00}; + } + + .control-center { + border-radius: 10px; + border: 1px solid ${withHashtag.${accentColour}}; + margin: 18px; + background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8); + color: ${withHashtag.base05}; + padding: 14px; + } + + .control-center .widget-title { + color: ${withHashtag.base05}; + font-size: 1.3em; + } + + .control-center .widget-title button { + border-radius: 7px; + background-color: ${withHashtag.base01}; + color: ${withHashtag.base05}; + padding: 8px; + } + + .control-center .widget-title button:hover { + background-color: ${withHashtag.base02}; + color: ${withHashtag.base05}; + } + + .control-center .widget-title button:active { + background-color: ${withHashtag.base03}; + color: ${withHashtag.base05}; + } + + .control-center .notification-row .notification-background { + border-radius: 10px; + background-color: ${withHashtag.base01}; + color: ${withHashtag.base05}; + margin-top: 14px; + } + + .control-center .notification-row .notification-background .notification { + padding: 7px; + border-radius: 7px; + } + + .control-center + .notification-row + .notification-background + .notification + .notification-content { + margin: 7px; + } + + .control-center + .notification-row + .notification-background + .notification + .notification-content + .summary { + color: ${withHashtag.base05}; + } + + .control-center + .notification-row + .notification-background + .notification + .notification-content + .time { + color: ${withHashtag.base04}; + } + + .control-center + .notification-row + .notification-background + .notification + .notification-content + .body { + color: ${withHashtag.base05}; + } + + .control-center + .notification-row + .notification-background + .notification + > *:last-child + > * { + min-height: 3.4em; + } + + .control-center + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action { + border-radius: 7px; + background-color: ${withHashtag.base00}; + color: ${withHashtag.base05}; + margin: 7px; + } + + .control-center + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:hover { + background-color: ${withHashtag.base01};; + color: ${withHashtag.base05}; + } + + .control-center + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:active { + background-color: ${withHashtag.blue}; + color: ${withHashtag.base05}; + } + + .control-center .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + background-color: ${withHashtag.red}; + color: ${withHashtag.base00}; + } + + .control-center .notification-row .notification-background .close-button:hover { + background-color: ${withHashtag.red}; + color: ${withHashtag.base00}; + } + + .control-center + .notification-row + .notification-background + .close-button:active { + background-color: ${withHashtag.red}; + color: ${withHashtag.base00}; + } + + .control-center .notification-row .notification-background:hover { + background-color: ${withHashtag.base00}; + color: ${withHashtag.base05}; + } + + .control-center .notification-row .notification-background:active { + background-color: ${withHashtag.blue}; + color: ${withHashtag.base05}; + } + + progressbar, + progress, + trough { + border-radius: 12.6px; + } + + .notification.critical progress { + background-color: ${withHashtag.red}; + } + + .notification.low progress, + .notification.normal progress { + background-color: ${withHashtag.blue}; + } + + trough { + background-color: ${withHashtag.base00}; + } + + .control-center trough { + background-color: ${withHashtag.base03}; + } + + .control-center-dnd { + margin-top: 5px; + border-radius: 8px; + background: ${withHashtag.base00}; + border: 1px solid ${withHashtag.base03}; + } + + .control-center-dnd:checked { + background: ${withHashtag.base00}; + } + + .control-center-dnd slider { + background: ${withHashtag.base03}; + border-radius: 8px; + } + + .widget-dnd { + margin: 0px; + font-size: 1.1rem; + } + + .widget-dnd > switch { + font-size: initial; + border-radius: 8px; + background: ${withHashtag.base00}; + border: 1px solid ${withHashtag.base03}; + } + + .widget-dnd > switch:checked { + background: ${withHashtag.base00}; + } + + .widget-dnd > switch slider { + background: ${withHashtag.base01}; + border-radius: 8px; + border: 1px solid ${withHashtag.${accentColour}}; + } + + ''; +} diff --git a/programs/waybar/default.nix b/programs/waybar/default.nix new file mode 100644 index 0000000..7dcdfb4 --- /dev/null +++ b/programs/waybar/default.nix @@ -0,0 +1,353 @@ +{ + config, + lib, + pkgs, + hostName, + fonts, + accentColour ? "base07", + ... +}: { + systemd.user.targets.tray.Unit = { + Description = "Home Manager System Tray"; + Requires = ["graphical-session-pre.target"]; + }; + programs.waybar = { + enable = true; + systemd = { + enable = true; + target = "sway-session.target"; + }; + settings = rec { + main = { + name = "main"; + layer = "top"; + position = "top"; + # Layout + "modules-left" = ["mpris"]; + "modules-center" = ["sway/workspaces"]; + "modules-right" = [ + "custom/notification" + "pulseaudio" + "network" + "bluetooth" + "clock#calendar" + "clock" + "backlight" + "battery" + "custom/weather" + "tray" + ]; + # Module config + "sway/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "󰫃 "; + "2" = "󰫄 "; + "3" = "󰫅 "; + "4" = "󰫆 "; + "5" = "󰫇 "; + "6" = "󰫈 "; + default = "󰋙 "; + urgent = "󰁡 "; + }; + # show-special = false; + # sort-by-number = true; + all-outputs = false; + persistent-workspaces = { + "1" = []; + "2" = []; + "3" = []; + "4" = []; + "5" = []; + "6" = []; + }; + }; + "sway/window" = { + "format" = "{title}"; + "max-length" = 50; + "rewrite" = { + "(.*) - GNU Emacs at (.*)" = " $1 [$2]"; + "(Alacritty.*)" = " $1"; + "(.*) - mpv" = "󰦟 $1"; + "swayimg: (.*)" = "󰋩 $1"; + "(btm)" = " Resource Usage [$1]"; + "(cava)" = "󰝚 Music Visualiser [$1]"; + "(.*) - Thunar" = "󰝰 $1"; + "Mozilla Firefox" = "󰈹 $1"; + "(.*) — Mozilla Firefox" = "󰈹 $1"; + "Nyxt - (.*)" = "󰀹 $1"; + "(.*) - Chromium" = "󰊯 $1"; + "((?:.*)WebCord.*)" = "󰙯 $1"; + "(Signal.*)" = "󰭹 $1"; + "([Ss]team)" = "󰓓 $1"; + "(Prism Launcher.*)" = "󰍳 Minecraft ($1)"; + "(X2Go Client)" = "󰢹 $1"; + "(NoMachine|Nxplayer.bin) (.*)" = "󰢹 $1 $2"; + }; + }; + mpris = { + "format" = "{status_icon} {player_icon} {artist} - {title}"; + "tooltip-format" = "{player_icon} ({player}) {dynamic}"; + "title-len" = 64; + "interval" = 1; + "dynamic-order" = [ + "album" + "artist" + "title" + "position" + "length" + ]; + "player-icons" = { + "default" = "󰲸 "; + "emms" = " "; + "firefox" = "󰈹 "; + "mpv" = "󰦟 "; + }; + "status-icons" = { + "playing" = "󰐊"; + "paused" = "󰏤"; + "stopped" = "󰓛"; + }; + "ignored-players" = []; + }; + pulseaudio = { + scroll-step = 5; + format = "{format_source}{icon}{volume}%"; + format-muted = "{format_source} 󰝟 "; + format-source = "󰍬 "; + format-source-muted = "󰍭 "; + format-icons = { + car = "󰄍 "; + default = ["󰕿 " "󰖀 " "󰕾 "]; + hands-free = "󰥰 "; + headset = "󰋎 "; + phone = "󰏲 "; + portable = "󰏳 "; + headphone = "󰋋 "; + }; + on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; + on-click-right = "${pkgs.pamixer}/bin/pamixer -t"; + on-scroll-up = "${pkgs.pamixer}/bin/pamixer -i 5"; + on-scroll-down = "${pkgs.pamixer}/bin/pamixer -d 5"; + }; + disk = { + format = "󰋊 {percentage_used}%"; + path = config.home.homeDirectory; + }; + cpu = { + format = "󰻠 {usage}%"; + tooltip = false; + }; + memory = {format = "󰍛 {}%";}; + temperature = { + critical-threshold = 80; + format = "{icon} {temperatureC}°C"; + format-icons = ["󱃃" "󰔏" "󱃂"]; + }; + network = { + format-icons = ["󰤟 " "󰤢 " "󰤥 " "󰤨 "]; + format-wifi = "{icon}"; + format-ethernet = "󰈁 "; + tooltip-format = "{essid} ({signalStrength}%)"; + format-linked = "󰈂 "; + format-disconnected = "󰈂 "; + }; + bluetooth = { + format = "󰂯"; + format-disabled = "󰂲"; + format-off = "󰂲"; + format-on = "󰂯"; + format-connected = "󰂱"; + tooltip-format = "{status} | {device_alias}"; + on-click = "${pkgs.bluez}/bin/bluetoothctl power on"; + on-click-right = "${pkgs.bluez}/bin/bluetoothctl power off"; + }; + "clock#calendar" = { + # format = "{:󰃭 %Y-%m-%d}"; + format = "{:%Y-%m-%d}"; # TEMP, see https://github.com/Alexays/Waybar/issues/3021 + tooltip-format = "{calendar}"; + calendar = { + mode = "month"; + mode-mon-col = 3; + weeks-pos = "left"; + on-scroll = 1; + on-click-right = "mode"; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + actions = { + on-click-right = "mode"; + on-scroll-up = "shift_up"; + on-scroll-down = "shift_down"; + }; + }; + clock = { + # format = "{:󰥔 %R}"; + format = "{:%R}"; # TEMP, see https://github.com/Alexays/Waybar/issues/3021 + }; + backlight = { + format = "{icon}"; + tooltip-format = "{percent}%"; + format-icons = [" " " " " " " " " " " " " " " " " "]; + }; + battery = { + states = { + warning = 30; + critical = 20; + }; + format = "{icon}"; + format-charging = "󰂄 "; + format-plugged = "󰚥 "; + tooltip-format = "{capacity}% {time}"; + format-icons = ["󱃍 " "󰁺 " "󰁻 " "󰁼 " "󰁽 " "󰁾 " "󰁿 " "󰂀 " "󰂁 " "󰂂 " "󰁹 "]; + }; + "custom/notification" = let + swaync = pkgs.swaynotificationcenter; + in { + "tooltip" = false; + "format" = "{icon}{}"; + "format-icons" = { + "notification" = "󱅫 "; + "none" = "󰂚 "; + "dnd-notification" = "󰅸 "; + "dnd-none" = "󰂜 "; + "inhibited-notification" = "󰅸 "; + "inhibited-none" = "󰂜 "; + "dnd-inhibited-notification" = "󰅸 "; + "dnd-inhibited-none" = "󰂜 "; + }; + "return-type" = "json"; + "exec-if" = "which ${swaync}/bin/swaync-client"; + "exec" = "${swaync}/bin/swaync-client -swb"; + "on-click" = "${swaync}/bin/swaync-client -t -sw"; + "on-click-right" = "${swaync}/bin/swaync-client -d -sw"; + "escape" = true; + }; + "custom/weather" = let + date-format = "%Y-%m-%d"; + custom-indicator = "{ICON}{temp_C}({FeelsLikeC})"; + in { + "format" = "{}°"; + "tooltip" = true; + "interval" = 900; # Every 15 minutes + "exec" = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"''; + "return-type" = "json"; + }; + tray = { + icon-size = builtins.floor fonts.sizes.popups; + show-passive-items = true; + spacing = 5; + }; + }; + # TEMP FIX + alt = lib.mkIf (hostName == "Vanguard") { + inherit (main) layer position "sway/workspaces"; + name = "alt"; + "modules-left" = []; + "modules-center" = ["sway/workspaces"]; + "modules-right" = []; + }; + }; + style = with config.scheme.withHashtag; let + accent = config.scheme.withHashtag.${accentColour}; + in '' + * { + all: unset; + font-size: 1em; + font-family: ${fonts.monospace.name}; + } + + window { + background: transparent; + } + + window > box { + color: ${base05}; + background: alpha(${base00}, 0.8); + margin: 5px 5px 0px; + padding: 0px; + border: 1px solid ${accent}; + border-radius: 10px; + } + + tooltip { + background: alpha(${base00}, 0.8); + border: 1px solid ${accent}; + border-radius: 10px; + } + + tooltip label { + color: ${base05}; + border: none; + padding: 5px; + margin: 0px; + } + + #workspaces, + #window, + #mpris, + #pulseaudio, + #network, + #bluetooth, + #backlight, + #battery, + #clock, + #custom-notification, + #custom-weather, + #tray { + margin: 0px; + padding: 1px 5px; + } + + #workspaces, + #window, + #mpris, + #tray, + #backlight, + #battery, + #custom-weather { + color: ${base05}; + } + + #workspaces button { + background: transparent; + color: ${base05}; + margin: 0px; + padding: 0px 5px; + } + #workspaces button.persistent { + color: ${base03}; + } + #workspaces button.focused { + color: ${accent}; + } + #workspaces button.urgent { + color: ${base09}; + } + + #custom-notification { + color: ${base08}; + } + #pulseaudio { + color: ${base09}; + } + #network { + color: ${base0A}; + } + #bluetooth { + color: ${base0B}; + } + #clock.calendar { + color: ${base0C}; + } + #clock { + color: ${base0D}; + } + ''; + }; +} diff --git a/programs/wlogout/default.nix b/programs/wlogout/default.nix new file mode 100644 index 0000000..7105446 --- /dev/null +++ b/programs/wlogout/default.nix @@ -0,0 +1,79 @@ +{ + config, + fonts, + accentColour ? "base07", + ... +}: { + programs.wlogout = { + enable = true; + layout = [ + { + label = "reboot"; + action = "systemctl reboot"; + text = "Reboot"; + keybind = "r"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + } + { + label = "logout"; + action = "swaymsg exit"; + text = "Logout"; + keybind = "l"; + } + ]; + style = with config.scheme.withHashtag; let + accent = config.scheme.withHashtag.${accentColour}; + shutdownIcon = ./icons/shutdown.png; + rebootIcon = ./icons/reboot.png; + logoutIcon = ./icons/logout.png; + in '' + * { + font-size: ${toString fonts.sizes.popups}px; + font-family: "${fonts.sansSerif.name}"; + } + + window { + border: none; + background-color: transparent; + } + + button { + border: ${accent}; + background-color: ${base00}; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + box-shadow: none; + margin: 5px; + color: ${base05}; + } + + button:hover { + background-color: ${base01}; + color: ${base05}; + } + + button:focus { + background-color: ${base03}; + color: ${base05}; + } + + #shutdown { + background-image: url("${shutdownIcon}"); + } + + #reboot { + background-image: url("${rebootIcon}"); + } + + #logout { + background-image: url("${logoutIcon}"); + } + ''; + }; +} diff --git a/programs/wlogout/icons/hibernate.png b/programs/wlogout/icons/hibernate.png new file mode 100644 index 0000000..a6322aa Binary files /dev/null and b/programs/wlogout/icons/hibernate.png differ diff --git a/programs/wlogout/icons/lock.png b/programs/wlogout/icons/lock.png new file mode 100644 index 0000000..f0b1eaf Binary files /dev/null and b/programs/wlogout/icons/lock.png differ diff --git a/programs/wlogout/icons/logout.png b/programs/wlogout/icons/logout.png new file mode 100644 index 0000000..345a8aa Binary files /dev/null and b/programs/wlogout/icons/logout.png differ diff --git a/programs/wlogout/icons/reboot.png b/programs/wlogout/icons/reboot.png new file mode 100644 index 0000000..29cfa2f Binary files /dev/null and b/programs/wlogout/icons/reboot.png differ diff --git a/programs/wlogout/icons/shutdown.png b/programs/wlogout/icons/shutdown.png new file mode 100644 index 0000000..4d7d499 Binary files /dev/null and b/programs/wlogout/icons/shutdown.png differ diff --git a/programs/wlogout/icons/suspend.png b/programs/wlogout/icons/suspend.png new file mode 100644 index 0000000..647bd66 Binary files /dev/null and b/programs/wlogout/icons/suspend.png differ diff --git a/programs/zsh/default.nix b/programs/zsh/default.nix new file mode 100644 index 0000000..cec66c8 --- /dev/null +++ b/programs/zsh/default.nix @@ -0,0 +1,38 @@ +{...}: { + programs.zsh = { + enable = true; + enableCompletion = true; + enableAutosuggestions = true; + syntaxHighlighting.enable = true; + enableVteIntegration = true; + autocd = true; + historySubstringSearch.enable = true; + history = { + extended = true; + ignoreDups = true; + ignoreSpace = true; + }; + shellAliases = { + nixos-repl = "nixos-rebuild repl"; + nixos-test = "sudo nixos-rebuild test"; + nixos-boot = "sudo nixos-rebuild boot"; + nixos-switch = "sudo nixos-rebuild switch"; + nixos-reboot = "sudo nixos-rebuild boot && sudo reboot now"; + nixos-shutdown = "sudo nixos-rebuild boot && sudo shutdown now"; + gsa = "git-sync-all"; + }; + oh-my-zsh = { + enable = true; + plugins = ["colored-man-pages" "lol" "rand-quote"]; + theme = ""; + }; + completionInit = '' + autoload -Uz +X compinit && compinit + + ## case insensitive path-completion + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' + zstyle ':completion:*' menu select + ''; + initExtra = "source ${./transient.zsh}\n"; + }; +} diff --git a/programs/zsh/transient.zsh b/programs/zsh/transient.zsh new file mode 100755 index 0000000..1f7bbd8 --- /dev/null +++ b/programs/zsh/transient.zsh @@ -0,0 +1,31 @@ +#!/usr/bin/env zsh + +zle-line-init() { + emulate -L zsh + + [[ $CONTEXT == start ]] || return 0 + + while true; do + zle .recursive-edit + local -i ret=$? + [[ $ret == 0 && $KEYS == $'\4' ]] || break + [[ -o ignore_eof ]] || exit 0 + done + + local saved_prompt=$PROMPT + local saved_rprompt=$RPROMPT + PROMPT='󰁔 ' + RPROMPT='' + zle .reset-prompt + PROMPT=$saved_prompt + RPROMPT=$saved_rprompt + + if ((ret)); then + zle .send-break + else + zle .accept-line + fi + return ret +} + +zle -N zle-line-init diff --git a/scripts/default.nix b/scripts/default.nix new file mode 100644 index 0000000..20aedf5 --- /dev/null +++ b/scripts/default.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: { + home.packages = [ + (pkgs.writeShellScriptBin "git-sync-all" + (builtins.readFile ./git-sync-all.sh)) + (pkgs.writeShellScriptBin "rsync-local-config" + (builtins.readFile ./rsync-local-config.sh)) + (pkgs.writeShellScriptBin "xdg-query-program" + (builtins.readFile ./xdg-query-program.sh)) + ]; +} diff --git a/scripts/git-sync-all.sh b/scripts/git-sync-all.sh new file mode 100755 index 0000000..73af165 --- /dev/null +++ b/scripts/git-sync-all.sh @@ -0,0 +1,55 @@ +# Sync common directories, setting url to ensure it's up-to-date first +SYNC_DIRS=( + "$HOME/.password-store/" + "$HOME/.elfeed/" + "$HOME/Documents/Org/" + "$HOME/Documents/References/" +) +SYNC_URLS=( + "https://git.xenia.me.uk/pixelifytica/pass.git" + "https://git.xenia.me.uk/pixelifytica/elfeed.git" + "https://git.xenia.me.uk/pixelifytica/org.git" + "https://git.xenia.me.uk/pixelifytica/references.git" +) + +for i in "${!SYNC_DIRS[@]}"; do + DIRECTORY="${SYNC_DIRS[$i]}" + URL="${SYNC_URLS[$i]}" + echo "--- sync: $DIRECTORY ---" + if [ ! -d "$DIRECTORY" ]; then + git clone "$URL" "$DIRECTORY" + fi + ( + cd "$DIRECTORY" || exit + git remote set-url origin "$URL" + git-sync -ns + ) +done + +# Pull NixOS and Emacs config if simple fast-forward +PULL_DIRS=( + "/etc/nixos" + "${XDG_CONFIG_HOME:-$HOME/.config}/emacs" +) +PULL_URLS=( + "https://git.xenia.me.uk/pixelifytica/nixos.git" + "https://git.xenia.me.uk/pixelifytica/emacs.git" +) +for i in "${!PULL_DIRS[@]}"; do + DIRECTORY="${PULL_DIRS[$i]}" + URL="${PULL_URLS[$i]}" + echo "--- pull: $DIRECTORY ---" + if [ ! -d "$DIRECTORY" ]; then + git clone "$URL" "$DIRECTORY" + fi + ( + cd "$DIRECTORY" || exit + if [ "$(git branch --show-current)" = "main" ]; then + git remote set-url origin "$URL" + git pull --ff-only + git push + else + echo "Not syncing repo $DIRECTORY on branch $(git branch --show-current)" + fi + ) +done diff --git a/scripts/rsync-local-config.sh b/scripts/rsync-local-config.sh new file mode 100755 index 0000000..6de2682 --- /dev/null +++ b/scripts/rsync-local-config.sh @@ -0,0 +1,25 @@ +HOST=$1 +# Config files +for TARGET in bat bottom git starship.toml; do + SOURCE="$HOME/.config/$TARGET" + echo "--- $SOURCE ---" + TMP_TARGET=/tmp/rsync-local-config + TMP_SOURCE=$TMP_TARGET + NIX_SED="sed -i 's|/nix/.*/bin/||g'" + NIX_REPLACE="$NIX_SED $TMP_TARGET" + if [[ -e $SOURCE ]]; then + if [[ -d $SOURCE ]]; then + SOURCE=$SOURCE/ + TMP_SOURCE=$TMP_SOURCE/ + NIX_REPLACE="fd -g '**' $TMP_TARGET -tfile -x $NIX_SED {};" + fi + rsync -avzL --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$SOURCE" $TMP_TARGET + sh -c "$NIX_REPLACE" + rsync -avzL --delete --exclude=".git*" $TMP_SOURCE "$HOST:.config/$TARGET" + rm -rf $TMP_SOURCE + fi +done + +# Fonts +rsync -avzL --delete --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$(nix path-info flake:iosevka#packages.x86_64-linux.iosevka-custom-nerdfont)/share/fonts/truetype/" "$HOST:.fonts/IosevkaCustomNerdFont" +rsync -avzL --delete --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$(nix path-info flake:iosevka#packages.x86_64-linux.iosevka-custom-aile)/share/fonts/truetype/" "$HOST:.fonts/IosevkaCustomAile" diff --git a/scripts/sync-all.lua b/scripts/sync-all.lua new file mode 100755 index 0000000..36eda13 --- /dev/null +++ b/scripts/sync-all.lua @@ -0,0 +1,38 @@ +#!/usr/bin/env nix-shell +--[[ +#!nix-shell -i lua -p git git-sync +]] +local config_home +if os.getenv("XDG_CONFIG_HOME") then + config_home = os.getenv("XDG_CONFIG_HOME") +else + config_home = "~/.config/" +end + +local sync_mapping = { + ["~/.password-store"] = "https://git.xenia.me.uk/pixelifytica/pass.git", + ["~/.elfeed"] = "https://git.xenia.me.uk/pixelifytica/elfeed.git", + ["~/Documents/Org"] = "https://git.xenia.me.uk/pixelifytica/org.git", + ["~/Documents/References"] = "https://git.xenia.me.uk/pixelifytica/references.git", +} + +local pull_mapping = { + ["/etc/nixos"] = "https://git.xenia.me.uk/pixelifytica/nixos.git", + [config_home .. "/emacs"] = "https://git.xenia.me.uk/pixelifytica/emacs.git", +} + +local function git_sync(directory, url) + print("--- sync: " .. directory .. " ---") +end + +local function git_pull(directory, url, ff_only) + print("--- pull: " .. directory .. " ---") +end + +for directory, url in pairs(sync_mapping) do + git_sync(directory, url) +end + +for directory, url in pairs(pull_mapping) do + git_pull(directory, url, true) +end diff --git a/scripts/sync-all.py b/scripts/sync-all.py new file mode 100755 index 0000000..4171ea6 --- /dev/null +++ b/scripts/sync-all.py @@ -0,0 +1,68 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python3 -p git git-sync + +import os +import queue +import subprocess +from pathlib import Path +from typing import Dict + +HOME = Path("~").expanduser().resolve() + +SYNC_MAPPING: Dict[Path, str] = { + Path( + "~/.password-store" + ).expanduser(): "https://git.xenia.me.uk/pixelifytica/pass.git", + Path("~/.elfeed").expanduser(): "https://git.xenia.me.uk/pixelifytica/elfeed.git", + Path( + "~/Documents/Org" + ).expanduser(): "https://git.xenia.me.uk/pixelifytica/org.git", + Path( + "~/Documents/References" + ).expanduser(): "https://git.xenia.me.uk/pixelifytica/references.git", +} + +PULL_MAPPINGS: Dict[Path, str] = { + Path("/etc/nixos"): "https://git.xenia.me.uk/pixelifytica/nixos.git", + Path(os.getenv("XDG_CONFIG_HOME", "~/.config")).expanduser() + / "emacs": "https://git.xenia.me.uk/pixelifytica/emacs.git", +} + + +def git_set_url(directory: Path, url: str) -> None: + """Set url for directory""" + comp = subprocess.run(f"git remote set-url origin {url}".split(), cwd=directory) + if comp.returncode != 0: + raise UserWarning(f"{comp.returncode} from {' '.join(comp.args)}") + subprocess.run("git remote -v".split(), cwd=directory) + + +def git_sync(directory: Path, url: str) -> subprocess.CompletedProcess: + """Sync status of repository""" + print(f"--- sync: ${directory} ---") + if not directory.exists(): + return subprocess.run("exit 1".split()) # TODO + git_set_url(directory, url) + return subprocess.run("git-sync -ns".split(), cwd=directory) + + +def git_pull( + directory: Path, url: str, ff_only: bool = True +) -> subprocess.CompletedProcess: + """Pull updates for directory from url""" + print(f"--- pull: {directory} ---") + if not directory.exists(): + return subprocess.run("exit 1".split()) # TODO + git_set_url(directory, url) + return subprocess.run("git pull --ff-only".split(), cwd=directory) + + +def main(*args, **kwargs) -> None: + for directory, url in SYNC_MAPPING.items(): + print(git_sync(directory, url)) + for directory, url in PULL_MAPPINGS.items(): + print(git_pull(directory, url)) + + +if __name__ == "__main__": + main() diff --git a/scripts/xdg-query-program.sh b/scripts/xdg-query-program.sh new file mode 100755 index 0000000..54c696c --- /dev/null +++ b/scripts/xdg-query-program.sh @@ -0,0 +1,3 @@ +FILETYPE=$(xdg-mime query filetype $@) +DEFAULT=$(xdg-mime query default $FILETYPE) +echo "$FILETYPE -> $DEFAULT" diff --git a/services/avizo/default.nix b/services/avizo/default.nix new file mode 100644 index 0000000..8bcb869 --- /dev/null +++ b/services/avizo/default.nix @@ -0,0 +1,22 @@ +{ + config, + accentColour ? "base07", + ... +}: { + services.avizo = { + enable = true; + settings.default = with config.scheme; let + accent = { + r = config.scheme."${accentColour}-rgb-r"; + g = config.scheme."${accentColour}-rgb-g"; + b = config.scheme."${accentColour}-rgb-b"; + }; + in { + background = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8)"; + bar-bg-color = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8)"; + bar-fg-color = "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, 1.0)"; + border-color = "rgba(${accent.r}, ${accent.g}, ${accent.b}, 1.0)"; + image-opacity = "1.0"; + }; + }; +} diff --git a/services/email/davmail.properties b/services/email/davmail.properties new file mode 100644 index 0000000..c61dddb --- /dev/null +++ b/services/email/davmail.properties @@ -0,0 +1,39 @@ +davmail.server=true +davmail.mode=O365Manual +davmail.url=https://outlook.office365.com/EWS/Exchange.asmx +davmail.imapPort=1144 +davmail.smtpPort=1026 +davmail.caldavPort=1080 +davmail.enableKeepAlive=true +davmail.logFilePath=/tmp/davmail.log +davmail.enableKerberos=false +davmail.forceActiveSyncUpdate=false +davmail.imapAutoExpunge=true +davmail.useSystemProxies=false +davmail.caldavEditNotifications=false +davmail.ssl.nosecuresmtp=false +davmail.caldavPastDelay=0 +log4j.logger.httpclient.wire=WARN +davmail.popMarkReadOnRetr=false +davmail.ssl.nosecureimap=false +davmail.disableTrayActivitySwitch=true +davmail.caldavAutoSchedule=true +davmail.enableProxy=false +davmail.smtpSaveInSent=false +davmail.ssl.nosecurepop=false +log4j.rootLogger=WARN +log4j.logger.davmail=DEBUG +davmail.ssl.clientKeystorePass= +log4j.logger.org.apache.http.conn.ssl=WARN +davmail.sentKeepDelay=0 +davmail.ssl.nosecureldap=false +davmail.imapAlwaysApproxMsgSize=true +davmail.ssl.nosecurecaldav=false +davmail.showStartupBanner=false +log4j.logger.httpclient=WARN +log4j.logger.org.apache.http.wire=WARN +davmail.disableGuiNotifications=true +davmail.disableUpdateCheck=true +log4j.logger.org.apache.http=WARN +davmail.carddavReadPhoto=true +davmail.keepDelay=30 diff --git a/services/email/default.nix b/services/email/default.nix new file mode 100644 index 0000000..5267545 --- /dev/null +++ b/services/email/default.nix @@ -0,0 +1,81 @@ +{ + pkgs, + hostName, + ... +}: { + accounts.email = { + maildirBasePath = "Mail"; + accounts = let + realName = "Evie Litherland-Smith"; + in { + proton = let + host = "127.0.0.1"; + tls.enable = false; + in rec { + inherit realName; + primary = true; + maildir.path = "Proton"; + imap = { + inherit host tls; + port = 1143; + }; + smtp = { + inherit host tls; + port = 1025; + }; + address = "e.litherlandsmith@proton.me"; + aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"]; + userName = address; + passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1"; + mu.enable = true; + msmtp = { + enable = true; + extraConfig = { + tls = "off"; + auth = "login"; + }; + }; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + remove = "both"; + patterns = ["*" "!All Mail" "!Labels*" "!Starred" "!Recovered Messages"]; + subFolders = "Verbatim"; + extraConfig.account.AuthMechs = "LOGIN"; + }; + }; + icloud = rec { + inherit realName; + primary = false; + maildir.path = "iCloud"; + imap.host = "imap.mail.me.com"; + smtp.host = "smtp.mail.me.com"; + address = "e.litherlandsmith@icloud.com"; + userName = address; + passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1"; + mu.enable = true; + msmtp.enable = true; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + remove = "both"; + patterns = ["*" "!Notes"]; + subFolders = "Verbatim"; + }; + }; + }; + }; + programs = { + mu.enable = true; + msmtp.enable = true; + mbsync = { + enable = true; + groups.inboxes = { + proton = ["INBOX"]; + icloud = ["INBOX"]; + }; + }; + }; +} diff --git a/services/email/signatures/personal b/services/email/signatures/personal new file mode 100644 index 0000000..5d7ac1d --- /dev/null +++ b/services/email/signatures/personal @@ -0,0 +1,3 @@ +-- +Evelyn Litherland-Smith (she/they) +email: evie@xenia.me.uk diff --git a/services/email/signatures/work b/services/email/signatures/work new file mode 100644 index 0000000..86cebce --- /dev/null +++ b/services/email/signatures/work @@ -0,0 +1,5 @@ +-- +Evelyn Litherland-Smith (she/they) +Spectroscopy Diagnostic Physicist +Plasma Science and Fusion Operations +UK Atomic Energy Authority diff --git a/services/email/work.nix b/services/email/work.nix new file mode 100644 index 0000000..adf9b0a --- /dev/null +++ b/services/email/work.nix @@ -0,0 +1,69 @@ +{ + config, + pkgs, + hostName, + ... +}: { + imports = [./default.nix]; + accounts.email.accounts.outlook = let + host = "127.0.0.1"; + tls.enable = false; + in rec { + inherit (config.accounts.email.accounts.proton) realName; + primary = false; + maildir.path = "Outlook"; + imap = { + inherit host tls; + port = 1144; + }; + smtp = { + inherit host tls; + port = 1026; + }; + address = "evie.litherland-smith@ukaea.uk"; + aliases = ["elitherl@jet.uk"]; + userName = address; + passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/outlook | head -n1"; + mu.enable = true; + msmtp = { + enable = true; + extraConfig = { + tls = "off"; + auth = "login"; + }; + }; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + remove = "both"; + patterns = [ + "*" + "!Conversation History" + "!Snoozed" + "!Social Activity Notifications" + "!Sync Issues*" + "!Unsent Messages" + ]; + subFolders = "Verbatim"; + extraConfig.account.AuthMechs = "LOGIN"; + }; + }; + programs.mbsync.groups.inboxes.outlook = ["INBOX"]; + systemd.user.services.davmail = { + Unit = { + Description = "Davmail server"; + Wants = ["network-online.target"]; + After = ["network-online.target"]; + }; + Service = { + Environment = ["PATH=/run/current-system/sw/bin/:$PATH"]; + Restart = "always"; + ExecStartPre = with config.home; '' + /bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties" + ''; + ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties"; + }; + Install.WantedBy = ["default.target"]; + }; +} diff --git a/services/password-store/default.nix b/services/password-store/default.nix new file mode 100644 index 0000000..4d60e3a --- /dev/null +++ b/services/password-store/default.nix @@ -0,0 +1,41 @@ +{ + config, + lib, + pkgs, + ... +}: { + xdg.configFile."pass-git-helper/git-pass-mapping.ini".source = + ./git-pass-mapping.ini; + programs = { + gpg.enable = true; + password-store = { + enable = true; + package = + pkgs.pass-nodmenu.withExtensions + (exts: with exts; [pass-otp pass-update pass-import]); # pass-audit + settings = { + PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; + PASSWORD_STORE_ENABLE_EXTENSIONS = "true"; + }; + }; + git.extraConfig.credential = { + helper = "${pkgs.pass-git-helper}/bin/pass-git-helper"; + }; + }; + services = { + gpg-agent = rec { + enable = true; + maxCacheTtl = 86400; + defaultCacheTtl = maxCacheTtl; + defaultCacheTtlSsh = maxCacheTtl; + pinentryFlavor = lib.mkDefault "curses"; + extraConfig = '' + no-allow-external-cache + ''; + }; + git-sync.repositories.password-store = { + path = "${config.home.homeDirectory}/.password-store"; + uri = "git+https://git.xenia.me.uk/xenia/pass.git"; + }; + }; +} diff --git a/services/password-store/git-pass-mapping.ini b/services/password-store/git-pass-mapping.ini new file mode 100644 index 0000000..23e6239 --- /dev/null +++ b/services/password-store/git-pass-mapping.ini @@ -0,0 +1,6 @@ +[DEFAULT] +username_extractor=regex_search +regex_username=^login: (.*)$ + +[*] +target=git/${host} \ No newline at end of file