diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index 062ce3c..f5a6613 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -200,5 +200,6 @@ "chat.agent.enabled": false, "chat.disableAIFeatures": true, "workbench.preferredDarkColorTheme": "Visual Studio Dark", - "workbench.preferredLightColorTheme": "Visual Studio Light" + "workbench.preferredLightColorTheme": "Visual Studio Light", + "workbench.colorTheme": "Visual Studio Light", } \ No newline at end of file diff --git a/.config/Sublime Text/Packages/User/massimo_custom.tmTheme b/.config/Sublime Text/Packages/User/Bedroom.tmTheme similarity index 93% rename from .config/Sublime Text/Packages/User/massimo_custom.tmTheme rename to .config/Sublime Text/Packages/User/Bedroom.tmTheme index e1ecdfd..f3ad9cc 100644 --- a/.config/Sublime Text/Packages/User/massimo_custom.tmTheme +++ b/.config/Sublime Text/Packages/User/Bedroom.tmTheme @@ -1,18 +1,16 @@ - - name - Massimo Custom + Bedroom settings settings background - #141B2BFF + #142b29FF caret #DADEE5FF foreground @@ -22,7 +20,7 @@ lineHighlight #00000078 selection - #15285A + #224d49 @@ -44,7 +42,7 @@ settings foreground - #87919DFF + #879c9dFF diff --git a/.config/Sublime Text/Packages/User/Boron.tmTheme b/.config/Sublime Text/Packages/User/Boron.tmTheme deleted file mode 100644 index 49c73e6..0000000 --- a/.config/Sublime Text/Packages/User/Boron.tmTheme +++ /dev/null @@ -1,221 +0,0 @@ - - - - - name - Boron - website - https://github.com/mjio/boron.tmtheme - comment - Last update: Feb 25 2013 - settings - - - settings - - background - #151515 - caret - #b0d0f0 - foreground - #e8e8d3 - invisibles - #e8e8d3 - selection - #404040 - lineHighlight - #010101 - gutterForeground - #373737 - - - - - name - Comment - scope - comment - settings - - foreground - #888888 - - - - - name - String - scope - string - settings - - foreground - #99ad6a - - - - - name - String begin/end - scope - punctuation.definition.string.begin, punctuation.definition.string.end - settings - - foreground - #556633 - - - - - name - Symbol - scope - constant.other - settings - - foreground - #7697d6 - - - - - name - Regexp - scope - string.regexp - settings - - foreground - #dd0093 - - - - - name - Variable - scope - variable, support.class - settings - - foreground - #ffb964 - - - - - name - Number - scope - constant.numeric - settings - - foreground - #cf6a4c - - - - - name - Entity - scope - entity - settings - - foreground - #ffb964 - - - - - name - Entity Function - scope - entity.name.function - settings - - foreground - #fad07a - - - - - name - Keyword - scope - keyword.control - settings - - foreground - #8fbfdc - - - - - name - Diff insertion - scope - diff.inserted, markup.inserted - settings - - foreground - #558f1f - - - - - name - Diff deletion - scope - diff.deleted, markup.deleted - settings - - foreground - #a1000d - - - - - name - Diff header - scope - meta.diff.header - settings - - foreground - #FFFFFF - background - #4e738a - - - - - name - Diff range - scope - meta.diff.range - settings - - fontStyle - italic - foreground - #888888 - - - - - name - Diff changed - scope - markup.changed - settings - - foreground - #967efb - - - - - uuid - 4e4cdb00-2fb2-11e2-81c1-0800200c9a66 - - diff --git a/.config/Sublime Text/Packages/User/Package Control.sublime-settings b/.config/Sublime Text/Packages/User/Package Control.sublime-settings new file mode 100644 index 0000000..e0115b7 --- /dev/null +++ b/.config/Sublime Text/Packages/User/Package Control.sublime-settings @@ -0,0 +1,12 @@ +{ + "bootstrapped": true, + "in_process_packages": + [ + ], + "installed_packages": + [ + "Copy Filepath With Line Numbers", + "JaiTools", + "Package Control", + ], +} diff --git a/.config/Sublime Text/Packages/User/Package Control.user-ca-bundle b/.config/Sublime Text/Packages/User/Package Control.user-ca-bundle new file mode 100644 index 0000000..e69de29 diff --git a/.config/Sublime Text/Packages/User/Preferences.sublime-settings b/.config/Sublime Text/Packages/User/Preferences.sublime-settings index 0f7d8e1..2c5623d 100644 --- a/.config/Sublime Text/Packages/User/Preferences.sublime-settings +++ b/.config/Sublime Text/Packages/User/Preferences.sublime-settings @@ -2,8 +2,8 @@ "caret_extra_bottom": 0, "caret_extra_top": 0, "caret_extra_width": 1, - "font_size": 16, - "color_scheme": "Packages/User/massimo_custom.tmTheme", + "font_size": 17, + "color_scheme": "Packages/User/Bedroom.tmTheme", "translate_tabs_to_spaces": true, "tab_size": 4, "word_wrap": false, @@ -22,7 +22,7 @@ "draw_indent_guides": false, "line_numbers": true, "gutter": false, - "block_caret": false, + "block_caret": true, "show_definitions": false, "fold_buttons": false, "line_padding_top": -1, diff --git a/.config/Sublime Text/Packages/User/Railscasts Extended.tmTheme b/.config/Sublime Text/Packages/User/Railscasts Extended.tmTheme new file mode 100644 index 0000000..96aa838 --- /dev/null +++ b/.config/Sublime Text/Packages/User/Railscasts Extended.tmTheme @@ -0,0 +1,1922 @@ + + + + + author + github.com/jzelenkov + colorSpaceName + sRGB + gutterSettings + + background + #073642 + divider + #586e75 + foreground + #839496 + selectionBackground + #586e75 + selectionForeground + #a6e22e + + name + Railscasts Extended + semanticClass + theme.dark.railscasts_extended + settings + + + settings + + activeGuide + #7FB11B + background + #282828 + bracketContentsForeground + #f8f8f2a5 + bracketContentsOptions + underline + bracketsForeground + #f8f8f2a5 + bracketsOptions + underline + caret + #FFFFED + findHighlight + #ffe792 + findHighlightForeground + #000000 + foreground + #E6E1DC + invisibles + #404040 + lineHighlight + #333435 + selection + #3D4456E0 + selectionBorder + #1c1c1c + stackGuide + #635f2d + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + String + scope + string + settings + + foreground + #A5C261 + + + + name + Number + scope + constant.numeric + settings + + foreground + #A5C261 + + + + name + Constant: Built-in + scope + constant.language + settings + + foreground + #6E9CBE + + + + name + Constant: Built-in + scope + meta.preprocessor + settings + + foreground + #A5C261 + + + + name + Constant: User-defined + scope + constant.character, constant.other + settings + + foreground + #A5C261 + + + + name + Block Parameter + scope + variable.other.block + settings + + foreground + #E6E1DC + + + + name + Variable + scope + variable.language, variable.other + settings + + foreground + #D0D0FF + + + + name + Keyword + scope + keyword + settings + + foreground + #CC7833 + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #CC7833 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + #DA4939 + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #FFC66D + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #FFC66D + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + #FFC66D + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + #E8BF6A + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #E8BF6A + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + #DA4939 + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + #A5C261 + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + + foreground + #6E9CBE + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + String constant + scope + string constant + settings + + foreground + #DA4939 + + + + name + String.regexp + scope + string.regexp + settings + + foreground + #A5C261 + + + + name + String interpolation + scope + constant.character.escaped, constant.character.escape, string source, string source.ruby + settings + + fontStyle + + foreground + #519F50 + + + + name + String variable + scope + string variable + settings + + foreground + #D0D0FF + + + + name + Variable: punctuation + scope + punctuation.definition.variable + settings + + foreground + #FFFFFF + + + + name + Entity + scope + entity + settings + + fontStyle + + foreground + #FFFFFF + + + + name + HTML: Doctype/XML Processing + scope + meta.tag.sgml.doctype.xml, declaration.sgml.html declaration.doctype, declaration.sgml.html declaration.doctype entity, declaration.sgml.html declaration.doctype string, declaration.xml-processing, declaration.xml-processing entity, declaration.xml-processing string, doctype + settings + + foreground + #c8cecc + + + + name + HTML: Comment Block + scope + comment.block.html + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + HTML: Script + scope + entity.name.tag.script.html + settings + + fontStyle + italic + + + + name + HTML: Attribute punctuation + scope + text.html.basic meta.tag.other.html, text.html.basic meta.tag.any.html, text.html.basic meta.tag.block.any, text.html.basic meta.tag.inline.any, text.html.basic meta.tag.structure.any.html, text.html.basic source.js.embedded.html, punctuation.separator.key-value.html + settings + + fontStyle + + foreground + #A5C261 + + + + name + HTML: Attributes + scope + text.html.basic entity.other.attribute-name.html + settings + + foreground + #E8BF6A + + + + name + HTML: Quotation Marks + scope + text.html.basic meta.tag.structure.any.html punctuation.definition.string.begin.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html + settings + + fontStyle + + foreground + #A5C261 + + + + name + HTML: Tags punctuation + scope + punctuation.definition.tag.end, punctuation.definition.tag.begin, punctuation.definition.tag + settings + + foreground + #E8BF6A + + + + name + Handlebars: Variable + scope + variable.parameter.handlebars + settings + + foreground + #FD971F + + + + name + Handlebars: Constant + scope + support.constant.handlebars, meta.function.block.start.handlebars + settings + + foreground + #A5C261 + + + + name + CSS: @at-rule + scope + meta.preprocessor.at-rule keyword.control.at-rule + settings + + foreground + #CC7833 + + + + name + CSS: #Id + scope + meta.selector.css entity.other.attribute-name.id + settings + + foreground + #7FB11B + + + + name + CSS: #Id for SCSS + scope + entity.other.attribute-name.id.css + settings + + fontStyle + + foreground + #7FB11B + + + + name + CSS: .class + scope + meta.selector.css entity.other.attribute-name.class + settings + + foreground + #FFC66D + + + + name + CSS: Property Name + scope + support.type.property-name.css + settings + + foreground + #6E9CBE + + + + name + CSS: Constructor Argument + scope + meta.constructor.argument.css + settings + + foreground + #9D9DFF + + + + name + CSS: {} + scope + punctuation.section.property-list.css + settings + + foreground + #FFFFFF + + + + name + CSS: Tag Punctuation + scope + punctuation.definition.tag.css + settings + + foreground + #FFFFFF + + + + name + CSS: : , + scope + punctuation.separator.key-value.css, punctuation.terminator.rule.css + settings + + fontStyle + + foreground + #FFFFFF + + + + name + CSS :pseudo + scope + entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-selector.css + settings + + fontStyle + + foreground + #FFC66D + + + + name + LESS variables + scope + variable.other.less + settings + + foreground + #D0D0FF + + + + name + LESS mixins + scope + entity.other.less.mixin + settings + + fontStyle + italic + foreground + #E0FDCE + + + + name + LESS: Extend + scope + entity.other.attribute-name.pseudo-element.less + settings + + fontStyle + + foreground + #FF9117 + + + + name + JS: Function Name + scope + meta.function.js, entity.name.function.js, support.function.dom.js + settings + + fontStyle + + foreground + #FFC66D + + + + name + JS: Function Parameter + scope + meta.function.js + settings + + fontStyle + + foreground + #E6E1DC + + + + name + JS: Storage Type + scope + storage.type.js + settings + + fontStyle + + foreground + #CC7833 + + + + name + JS: Source + scope + text.html.basic source.js.embedded.html + settings + + fontStyle + + foreground + #FFFFFF + + + + name + JS: Function + scope + storage.type.function.js + settings + + fontStyle + + foreground + #CC7833 + + + + name + JS: Numeric Constant + scope + constant.numeric.js + settings + + foreground + #A5C261 + + + + name + JS: [] + scope + meta.brace.square.js + settings + + foreground + #FFFFFF + + + + name + JS: () + scope + meta.brace.round, punctuation.definition.parameters.begin.js, punctuation.definition.parameters.end.js + settings + + foreground + #FFFFFF + + + + name + JS: {} + scope + meta.brace.curly.js + settings + + foreground + #FFFFFF + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #CFCFC2 + + + + name + PHP: [] + scope + keyword.operator.index-start.php, keyword.operator.index-end.php + settings + + foreground + #FFFFFF + + + + name + PHP: Array + scope + meta.array.php + settings + + foreground + #FFFFFF + + + + name + PHP: Array() + scope + meta.array.php support.function.construct.php, meta.array.empty.php support.function.construct.php + settings + + fontStyle + + foreground + #DA4939 + + + + name + PHP: Array Construct + scope + support.function.construct.php + settings + + foreground + #DA4939 + + + + name + PHP: Storage Type Function + scope + storage.type.function.php + settings + + foreground + #DA4939 + + + + name + PHP: Numeric Constant + scope + constant.numeric.php + settings + + foreground + #A5C261 + + + + name + PHP: New + scope + keyword.other.new.php + settings + + foreground + #DA4939 + + + + name + PHP: :: + scope + support.class.php + settings + + fontStyle + italic + foreground + #6E9CBE + + + + name + PHP: Other Property + scope + variable.other.property.php + settings + + foreground + #9D9DFF + + + + name + PHP: Class + scope + storage.modifier.extends.php, storage.type.class.php, keyword.operator.class.php + settings + + foreground + #DA4939 + + + + name + PHP: Inherited Class + scope + meta.other.inherited-class.php + settings + + fontStyle + + foreground + #6E9CBE + + + + name + PHP: Storage Type + scope + storage.type.php + settings + + foreground + #6E9CBE + + + + name + PHP: Function + scope + entity.name.function.php + settings + + foreground + #FFC66D + + + + name + PHP: Function Construct + scope + support.function.construct.php + settings + + foreground + #DA4939 + + + + name + PHP: Function Call + scope + entity.name.type.class.php, meta.function-call.php, meta.function-call.static.php, meta.function-call.object.php + settings + + foreground + #FFFFFF + + + + name + PHP: Comment + scope + keyword.other.phpdoc + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + PHP: Source Emebedded + scope + source.php.embedded.block.html + settings + + foreground + #FFFFFF + + + + name + Invalid + scope + invalid + settings + + background + #404142 + fontStyle + + foreground + #FFFFFF + + + + name + Invalid - Illegal + scope + invalid.illegal + settings + + background + #404142 + fontStyle + + foreground + #FFFFFF + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #702929 + foreground + #FFFFFF + + + + name + diff.header + scope + meta.diff + settings + + background + #282828 + + + + name + diff.deleted + scope + markup.deleted + settings + + background + #660000 + foreground + #F92672 + + + + name + diff.inserted + scope + markup.inserted + settings + + background + #144212 + foreground + #A6E22E + + + + name + diff.changed + scope + markup.changed + settings + + foreground + #967EFB + + + + name + diff.range and diff.header + scope + meta.diff.range, meta.diff.header + settings + + background + #2F33AB + + + + name + Python: storage + scope + storage.type.class.python, storage.type.function.python, storage.modifier.global.python + settings + + fontStyle + + foreground + #BC9458 + + + + name + Python: import + scope + keyword.control.import.python, keyword.control.import.from.python + settings + + foreground + #CC7833DD + + + + name + Python: Support.exception + scope + support.type.exception.python + settings + + foreground + #6E9CBE + + + + name + Perl: variables + scope + punctuation.definition.variable.perl, variable.other.readwrite.global.perl, variable.other.predefined.perl, keyword.operator.comparison.perl + settings + + foreground + #DA4939 + + + + name + Perl: functions + scope + support.function.perl + settings + + foreground + #DA4939 + + + + name + Perl: comments + scope + comment.line.number-sign.perl + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + Perl: quotes + scope + punctuation.definition.string.begin.perl, punctuation.definition.string.end.perl + settings + + foreground + #FFFFFF + + + + name + Perl: char + scope + constant.character.escape.perl + settings + + foreground + #519F50 + + + + name + Ruby: Constant + scope + constant.language.ruby, constant.numeric.ruby + settings + + foreground + #A5C261 + + + + name + Ruby: Variable definition + scope + punctuation.definition.variable.ruby + settings + + fontStyle + + foreground + #D0D0FF + + + + name + Ruby: Function Name + scope + meta.function.method.with-arguments.ruby + settings + + foreground + #E6E1DC + + + + name + Ruby: Function + scope + entity.name.function.ruby + settings + + foreground + #E8BF6A + + + + name + Ruby: Keyword Control + scope + keyword.control.ruby, keyword.control.def.ruby + settings + + fontStyle + + foreground + #CC7833 + + + + name + Ruby: Class + scope + keyword.control.class.ruby, meta.class.ruby + settings + + foreground + #CC7833 + + + + name + Ruby: Class Name + scope + entity.name.type.class.ruby + settings + + fontStyle + + foreground + #FFFFFF + + + + name + Ruby: Keyword + scope + keyword.control.ruby + settings + + fontStyle + + foreground + #CC7833 + + + + name + Ruby: Support Class + scope + support.class.ruby + settings + + fontStyle + + foreground + #E6E1DC + + + + name + Ruby: Special Method + scope + keyword.other.special-method.ruby + settings + + foreground + #CC7833 + + + + name + Ruby: Constant Other + scope + variable.other.constant.ruby + settings + + fontStyle + + foreground + #DA4939 + + + + name + Ruby: :symbol + scope + constant.other.symbol.ruby + settings + + fontStyle + + foreground + #6E9CBE + + + + name + Ruby: Punctuation Section + scope + punctuation.definition.string.begin.ruby, punctuation.definition.string.end.ruby + settings + + foreground + #A5C261 + + + + name + Ruby: Punctuation Section + scope + punctuation.section.embedded.ruby + settings + + foreground + #519F50 + + + + name + Ruby: Special Method + scope + keyword.other.special-method.ruby + settings + + foreground + #CC7833 + + + + name + Markdown: plain + scope + text.html.markdown + settings + + foreground + #FFFFFF + + + + name + Markup: raw inline + scope + text.html.markdown markup.raw.inline + settings + + foreground + #CC7833 + + + + name + Markdown: linebreak + scope + text.html.markdown meta.dummy.line-break + settings + + foreground + #E0EDDD + + + + name + Markdown: heading + scope + markdown.heading, markup.heading | markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown + settings + + fontStyle + + foreground + #7FB11B + + + + name + Markup: italic + scope + markup.italic + settings + + fontStyle + italic + foreground + #D0D0FF + + + + name + Markup: bold + scope + markup.bold + settings + + fontStyle + bold + foreground + #D0D0FF + + + + name + Markup: underline + scope + markup.underline + settings + + fontStyle + underline + foreground + #E8BF6A + + + + name + Markdown: Blockquote + scope + markup.quote, punctuation.definition.blockquote.markdown + settings + + fontStyle + italic + foreground + #6E9CBE + + + + name + Markup: Quote + scope + markup.quote + settings + + fontStyle + italic + foreground + #6E9CBE + + + + name + Markdown: Link + scope + string.other.link.title.markdown + settings + + fontStyle + underline + foreground + #A5C261 + + + + name + Markup: Raw block + scope + markup.raw.block + settings + + foreground + #9D9DFF + + + + name + Markdown: List Items Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + #FFFFFF + + + + name + Markdown: Raw Block fenced + scope + markup.raw.block.fenced.markdown + settings + + background + #222222 + foreground + #FFFFFF + + + + name + Markdown: Fenced Code Block + scope + punctuation.definition.fenced.markdown, variable.language.fenced.markdown + settings + + background + #222222 + foreground + #BC9458 + + + + name + Markdown: Fenced Language + scope + variable.language.fenced.markdown + settings + + fontStyle + + foreground + #BC9458 + + + + name + Markdown: Separator + scope + meta.separator + settings + + background + #FFFFFF0F + fontStyle + bold + foreground + #FFFFFF33 + + + + name + Markup: table + scope + markup.table + settings + + background + #2222221A + foreground + #FFC66D + + + + name + Other: Removal + scope + other.package.exclude, other.remove + settings + + fontStyle + + foreground + #D3201F + + + + name + Shell: builtin + scope + support.function.builtin.shell + settings + + foreground + #DA4939 + + + + name + Shell: variable + scope + variable.other.normal.shell + settings + + foreground + #DA4939 + + + + name + Shell: DOTFILES + scope + source.shell + settings + + fontStyle + + foreground + #FFFFFF + + + + name + Shell: meta scope in loop + scope + meta.scope.for-in-loop.shell, variable.other.loop.shell + settings + + fontStyle + + foreground + #FD971F + + + + name + Shell: Function name + scope + entity.name.function.shell + settings + + fontStyle + + foreground + #FFC66D + + + + name + Shell: Quotation Marks + scope + punctuation.definition.string.end.shell, punctuation.definition.string.begin.shell + settings + + fontStyle + + foreground + #FFFFFF + + + + name + Shell: Meta Block + scope + meta.scope.case-block.shell, meta.scope.case-body.shell + settings + + fontStyle + + foreground + #FD971F + + + + name + Shell: [] + scope + punctuation.definition.logical-expression.shell + settings + + fontStyle + + foreground + #FFFFFF + + + + name + Shell: Comment + scope + comment.line.number-sign.shell + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + Makefile: Comment + scope + comment.line.number-sign.makefile + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + Makefile: Comment punctuation + scope + punctuation.definition.comment.makefile + settings + + fontStyle + italic + foreground + #BC9458 + + + + name + Makefile: Variables + scope + variable.other.makefile + settings + + fontStyle + + foreground + #CC7833 + + + + name + Makefile: Function name + scope + entity.name.function.makefile + settings + + fontStyle + + foreground + #FFC66D + + + + name + Makefile: Function + scope + meta.function.makefile + settings + + fontStyle + + foreground + #DA4939 + + + + name + GitGutter deleted + scope + markup.deleted.git_gutter + settings + + foreground + #DA4939 + + + + name + GitGutter inserted + scope + markup.inserted.git_gutter + settings + + foreground + #8DBF5D + + + + name + GitGutter changed + scope + markup.changed.git_gutter + settings + + foreground + #FFC66D + + + + name + GitGutter ignored + scope + markup.ignored.git_gutter + settings + + foreground + #565656 + + + + name + GitGutter untracked + scope + markup.untracked.git_gutter + settings + + foreground + #565656 + + + + name + SublimeLinter Annotations + scope + sublimelinter.annotations + settings + + background + #FFFFAA + foreground + #333333 + + + + name + SublimeLinter Error Outline + scope + sublimelinter.outline.illegal + settings + + background + #FF4A52 + foreground + #FFFFFF + + + + name + SublimeLinter Error Underline + scope + sublimelinter.underline.illegal + settings + + background + #FF0000 + + + + name + SublimeLinter Warning Outline + scope + sublimelinter.outline.warning + settings + + background + #DF9400 + foreground + #FFFFFF + + + + name + SublimeLinter Warning Underline + scope + sublimelinter.underline.warning + settings + + background + #FF0000 + + + + name + SublimeLinter Violation Outline + scope + sublimelinter.outline.violation + settings + + background + #FFFFFF33 + foreground + #FFFFFF + + + + name + SublimeLinter Violation Underline + scope + sublimelinter.underline.violation + settings + + background + #FF0000 + + + + scope + constant.numeric.line-number.find-in-files - match + settings + + foreground + #A5C26190 + + + + scope + entity.name.filename.find-in-files + settings + + foreground + #A5C261 + + + + name + SublimeLinter Error + scope + sublimelinter.mark.error + settings + + foreground + #D02000 + + + + name + SublimeLinter Warning + scope + sublimelinter.mark.warning + settings + + foreground + #DDB700 + + + + name + SublimeLinter Gutter Mark + scope + sublimelinter.gutter-mark + settings + + foreground + #FFFFFF + + + + uuid + 103C646A-D70E-4FAD-93AE-40FF39126E84 + + \ No newline at end of file diff --git a/.config/Sublime Text/Packages/User/freshcut-contrast.tmTheme b/.config/Sublime Text/Packages/User/freshcut-contrast.tmTheme new file mode 100644 index 0000000..9e15deb --- /dev/null +++ b/.config/Sublime Text/Packages/User/freshcut-contrast.tmTheme @@ -0,0 +1,687 @@ + + + + + + name + FreshCut Contrast + settings + + + settings + + background + #000000 + caret + #f8f8f0 + foreground + #F8F8F2 + invisibles + #3b3a32 + lineHighlight + #151515 + selection + #008097 + selectionForeground + #ffffff + findHighlight + #ffe792 + findHighlightForeground + #000000 + selectionBorder + #222218 + activeGuide + #9d550fb0 + + bracketsForeground + #4ECDC4 + bracketsOptions + underline + + bracketContentsForeground + #00A8C6 + bracketContentsOptions + underline + + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + #737b84 + + + + name + String + scope + string + settings + + foreground + #e9ee00 + + + + name + Number + scope + constant.numeric + settings + + foreground + #8FBE00 + + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #00A8C6 + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #00A8C6 + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Keyword + scope + keyword + settings + + foreground + #C8D7E8 + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #00A8C6 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + + foreground + #4ECDC4 + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #00A8C6 + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #00A8C6 + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + #AEE239 + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + #4ECDC4 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #00A8C6 + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + #4ECDC4 + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + #00A8C6 + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + #00A8C6 + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Invalid + scope + invalid + settings + + background + #00a8c6 + fontStyle + + foreground + #f8f8f0 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #00a8c6 + foreground + #f8f8f0 + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #e9ee00 + + + + + name + diff.header + scope + meta.diff, meta.diff.header + settings + + foreground + #75715E + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #00A8C6 + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + #A6E22E + + + + name + diff.changed + scope + markup.changed + settings + + foreground + #E6DB74 + + + + + scope + constant.numeric.line-number.find-in-files - match + settings + + foreground + #8FBE00A0 + + + + scope + entity.name.filename.find-in-files + settings + + foreground + #E6DB74 + + + + scope + keyword.other + settings + + foreground + #939da8 + + + + scope + meta.property-value, support.constant.property-value, constant.other.color + settings + + foreground + #e9ee00 + + + + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #00A8C6 + + + + scope + meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #e9ee00 + + + + name + Function argument + scope + meta.property-name support.type.property-name + settings + + fontStyle + normal + + + + name + Function argument + scope + meta.property-value punctuation.separator.key-value + settings + + foreground + #F8F8F2 + + + + name + Function argument + scope + keyword.other.use, keyword.other.function.use, keyword.other.namespace, keyword.other.new, keyword.other.special-method, keyword.other.unit, keyword.other.use-as + settings + + foreground + #4ECDC4 + + + + name + Function argument + scope + meta.use support.class.builtin, meta.other.inherited-class support.class.builtin + settings + + foreground + #F8F8F2 + fontStyle + normal + + + + name + Function argument + scope + variable.other + settings + + foreground + + fontStyle + normal + + + + name + Coffeescript Function argument + scope + variable.parameter.function.coffee + settings + + foreground + #8FBE00 + fontStyle + italic + + + + + + name + Markdown Titles + scope + entity.name.section.markdown + settings + + foreground + #00A8C6 + + + + + name + Markdown Title Hash + scope + punctuation.definition.heading.markdown + settings + + foreground + #C8D7E8 + + + + + name + Markdown Raw + scope + markup.raw.inline.markdown + settings + + foreground + #e9ee00 + + + + + name + Markdown bold stars + scope + punctuation.definition.bold.markdown, punctuation.definition.italic.markdown + settings + + foreground + #C8D7E8 + + + + + name + Markdown link title braces + scope + punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown + settings + + foreground + #C8D7E8 + + + + + name + Markdown link braces + scope + punctuation.definition.metadata.markdown + settings + + foreground + #C8D7E8 + + + + + name + Markdown link + scope + markup.underline.link.markdown, markup.underline.link.image.markdown, meta.image.inline.markdown + settings + + foreground + #4ECDC4 + fontStyle + italic + + + + + name + Markdown bold/italic + scope + markup.bold.markdown, markup.italic.markdown + settings + + foreground + #4ECDC4 + + + + + name + Markdown bold/italic + scope + markup.italic.markdown + settings + + fontStyle + italic + + + + + name + Markdown bold/italic + scope + markup.bold.markdown + settings + + fontStyle + bold + + + + + name + Markdown pre + scope + markup.raw.block.markdown + settings + + foreground + #00a8c6 + + + + + name + GitGutter deleted + scope + markup.deleted.git_gutter + settings + + foreground + #e61f44 + + + + name + GitGutter inserted + scope + markup.inserted.git_gutter + settings + + foreground + #a7da1e + + + + name + GitGutter changed + scope + markup.changed.git_gutter + settings + + foreground + #f7b83d + + + + name + CSS Class + scope + entity.other.attribute-name.class.css + settings + + foreground + #AEE239 + + + + uuid + 8c4bd735-02f4-0f06-bc2d-2c8e31f71f55 + + diff --git a/.config/focus-editor/global.focus-config b/.config/focus-editor/global.focus-config index 740f46a..325a016 100644 --- a/.config/focus-editor/global.focus-config +++ b/.config/focus-editor/global.focus-config @@ -402,7 +402,7 @@ Shift-Cmd-F8 go_to_previous_build_error_in_side_pane [[style]] -theme: basic-light +theme: bedroom [fonts] font: default diff --git a/.config/focus-editor/themes/bedroom.focus-theme b/.config/focus-editor/themes/bedroom.focus-theme index a19977f..8e59452 100644 --- a/.config/focus-editor/themes/bedroom.focus-theme +++ b/.config/focus-editor/themes/bedroom.focus-theme @@ -1,41 +1,41 @@ [25] # Version number. Do not delete. [colors] -background0: 141B2BFF -background1: 141B2BFF -background2: 141B2BFF -background3: 141B2BFF -background4: 2B344AFF +background0: 142B29FF +background1: 142b29FF +background2: 142b29FF +background3: 142B29FF +background4: 091212FF # NOTE: region_scope colors only work for Jai at the moment -region_scope_export: 141B2BFF -region_scope_file: 1F2638FF -region_scope_module: 111621FF +region_scope_export: 142B29FF +region_scope_file: 142B29FF +region_scope_module: 142B29FF region_header: 1F2638FF region_success: 226022FF region_warning: 986032FF region_error: 772222FF -region_heredoc: 000000FF +region_heredoc: 142B29FF -selection_active: 354770FF -selection_inactive: 263351FF +selection_active: 224D49FF +selection_inactive: 222222FF selection_highlight: FCEDFC26 search_result_active: 8E772EFF search_result_inactive: FCEDFC83 -scrollbar: 141B2BFF -scrollbar_hover: 3C4964FF -scrollbar_background: 2B344AFF -cursor: 9AD3EAFF -cursor_inactive: 87919DFF +scrollbar: 142b29FF +scrollbar_hover: 0F201FFF +scrollbar_background: 091212FF +cursor: DADEE5FF +cursor_inactive: 879C9DFF paste_animation: 1C4449FF -splitter: 141B2BFF +splitter: 142B29FF splitter_hover: 1F2638FF ruler: FCEDFC26 indent_guide: FCEDFC26 letter_highlight: 85B8DEFF -list_cursor_lite: 3C496488 -list_cursor: 3C4964FF +list_cursor_lite: 0F201FFF +list_cursor: 0F201FFF shadow_dark: 0E161C7F shadow_transparent: 0E161C00 text_input_label: 3B4450FF @@ -43,7 +43,7 @@ char_under_cursor: 000000FF bracket_highlight: E8FCFE30 ui_default: DADEE5FF -ui_dim: 87919DFF +ui_dim: 879c9dFF ui_neutral: 4C4C4CFF ui_warning: F8AD34FF ui_warning_dim: 986032FF @@ -51,11 +51,11 @@ ui_error: 772222FF ui_error_bright: FF0000FF ui_success: 227722FF -build_panel_background: 000000FF +build_panel_background: 050B0BFF build_panel_scrollbar: 33CCCC19 -build_panel_scrollbar_hover: 3C4964FF -build_panel_scrollbar_background: 2B344AFF -build_panel_title_bar: 2B344AFF +build_panel_scrollbar_hover: 0F201FFF +build_panel_scrollbar_background: 091212FF +build_panel_title_bar: 091212FF code_default: DADEE5FF code_invalid: FF0000FF @@ -73,8 +73,8 @@ code_error: FF0000FF code_warning: E4D97DFF code_highlight: F9DD03FF -code_comment: 87919DFF -code_multiline_comment: 87919DFF +code_comment: 879c9dFF +code_multiline_comment: 879c9dFF code_operation: DADEE5FF code_punctuation: DADEE5FF @@ -103,7 +103,7 @@ code_header5: E0AD82FF code_header6: E0AD82FF # Added after migration to version [18] -active_pane_border: 2B344AFF +active_pane_border: 091212FF inactive_pane_dim_overlay: 050505FF # Added after migration to version [22] @@ -111,8 +111,8 @@ code_comment_highlight1: F9DD03FF code_comment_highlight2: FF0000FF code_comment_highlight3: C47616FF code_comment_highlight4: BBABC3FF -cursor_line_highlight: 2B344AFF -color_preview_title_bar: 2B344AFF +cursor_line_highlight: 091212FF +color_preview_title_bar: 091212FF code_addition: 33B333FF code_deletion: E64D4DFF region_addition: 2260224C diff --git a/.config/zed/settings.json b/.config/zed/settings.json index 712921d..0e62512 100644 --- a/.config/zed/settings.json +++ b/.config/zed/settings.json @@ -49,7 +49,7 @@ "theme": { "mode": "dark", "light": "One Light", - "dark": "Bedroom" + "dark": "One Dark" }, "indent_guides": { diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e2349c8..57e3c6c 100755 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -10,9 +10,9 @@ (normal-top-level-add-subdirs-to-load-path)) ;; Core libraries -(require 's) (require 'dash) (require 'popup) +(require 's) ;; Completion framework (require 'vertico) @@ -35,9 +35,6 @@ (require 'dumb-jump) (require 'eglot) -;; Search -(require 'xah-find) - ;; Git (require 'simple-git) @@ -78,11 +75,14 @@ ;;; ============================================================================ ;; dumb-jump as fallback for xref when LSP is not available -(setq dumb-jump-force-searcher 'grep) +(setq dumb-jump-force-searcher 'rg) (setq dumb-jump-selector 'completing-read) (setq xref-show-definitions-function #'xref-show-definitions-completing-read) (add-hook 'xref-backend-functions #'dumb-jump-xref-activate 100) +;; Use ripgrep for project-find-regexp (C-S-f) - much faster than grep +(setq xref-search-program 'ripgrep) + ;;; ============================================================================ ;;; EGLOT (LSP) CONFIGURATION ;;; ============================================================================ @@ -442,6 +442,69 @@ If any panel is visible, close all. If none visible, open all." (when matching-buffers (my-display-in-bottom-panel (car matching-buffers) '((window-height . 0.25))))))))) +;;; ============================================================================ +;;; RIGHT PANEL / OPENCODE AI PANEL +;;; ============================================================================ + +(defvar my-right-panel-buffer "*simple-opencode*" + "Buffer name for the right panel.") + +(defun my-get-right-panel-window () + "Get existing right panel window if any." + (seq-find (lambda (w) + (and (window-at-side-p w 'right) + (string= (buffer-name (window-buffer w)) my-right-panel-buffer))) + (window-list))) + +(defun my-display-in-right-panel (buffer alist) + "Display BUFFER in right side panel. ALIST is passed by display-buffer." + (let ((window (my-get-right-panel-window))) + (if window + (progn + (set-window-buffer window buffer) + window) + (let ((new-window (display-buffer-in-side-window + buffer + '((side . right) + (slot . 0) + (window-width . 0.28) + (window-parameters . ((no-delete-other-windows . t) + (no-other-window . nil))))))) + ;; Preserve window on delete-other-windows + (set-window-parameter new-window 'no-delete-other-windows t) + new-window)))) + +;; Register opencode buffer to always use right panel +(add-to-list 'display-buffer-alist + '("\\*simple-opencode\\*" + (my-display-in-right-panel) + (side . right) + (slot . 0) + (window-width . 0.28))) + +(defun my-opencode-panel-toggle () + "Toggle the OpenCode AI panel on the right side of the screen." + (interactive) + (let ((window (my-get-right-panel-window))) + (if window + ;; Panel is visible - close it + (delete-window window) + ;; Panel not visible - open it + (simple-opencode)))) + +(defun my-opencode-panel-send-region () + "Send selected region to OpenCode panel with a prompt." + (interactive) + (if (use-region-p) + (let ((start (region-beginning)) + (end (region-end))) + ;; Open panel if not visible + (unless (my-get-right-panel-window) + (my-opencode-panel-toggle)) + ;; Send region + (simple-opencode-send-region start end)) + (message "No region selected"))) + ;;; ============================================================================ ;;; BACKUP & AUTOSAVE SETTINGS ;;; ============================================================================ @@ -552,7 +615,7 @@ If any panel is visible, close all. If none visible, open all." (global-set-key (kbd "") 'move-end-of-line) (global-set-key (kbd "M-p") 'backward-paragraph) (global-set-key (kbd "M-n") 'forward-paragraph) -(global-set-key (kbd "C-S-g") 'goto-line) +(global-set-key (kbd "") 'goto-line) (when (eq system-type 'darwin) (global-set-key (kbd "C-") 'my-smart-home) (global-set-key (kbd "C-") 'move-end-of-line)) @@ -642,6 +705,11 @@ If any panel is visible, close all. If none visible, open all." ;; --- Git --- (global-set-key (kbd "") 'simple-git-status) (global-set-key (kbd "C-") 'simple-git-file-history) +(global-set-key (kbd "C-S-") 'simple-git-line-blame) + +;; --- OpenCode AI --- +(global-set-key (kbd "C-?") 'my-opencode-panel-toggle) +(global-set-key (kbd "C-S-/") 'my-opencode-panel-toggle) ; Alternative binding ;; --- Misc --- (global-set-key (kbd "C-e") 'my-select-inside-parens) @@ -1440,7 +1508,7 @@ Use in `isearch-mode-end-hook'." ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(my-current-theme 'valigo) + '(my-current-theme 'bedroom) '(safe-local-variable-directories '("/Users/mta/projects/cdrateline.com_2.0/"))) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/.emacs.d/lisp/simple-git.el b/.emacs.d/lisp/simple-git.el index 81b576f..1f048db 100644 --- a/.emacs.d/lisp/simple-git.el +++ b/.emacs.d/lisp/simple-git.el @@ -86,6 +86,28 @@ "Return non-nil if current directory is in a Git repository." (simple-git--root)) +;;; ============================================================================ +;;; Mouse Support +;;; ============================================================================ + +(defface simple-git-highlight-face + '((t :inherit highlight)) + "Face for mouse hover on clickable items.") + +(defun simple-git-mouse-action (event) + "Perform default action at mouse click EVENT." + (interactive "e") + (mouse-set-point event) + (let ((cmd (lookup-key (current-local-map) (kbd "RET")))) + (when cmd + (call-interactively cmd)))) + +(defun simple-git-mouse-visit-file (event) + "Visit file at mouse click EVENT." + (interactive "e") + (mouse-set-point event) + (simple-git-visit-file)) + ;;; ============================================================================ ;;; Status Mode ;;; ============================================================================ @@ -102,14 +124,16 @@ (define-key map (kbd "P") #'simple-git-push) (define-key map (kbd "F") #'simple-git-pull) (define-key map (kbd "b") #'simple-git-switch-branch) - (define-key map (kbd "B") #'simple-git-branch-graph) + (define-key map (kbd "G") #'simple-git-branch-graph) (define-key map (kbd "l") #'simple-git-log) - (define-key map (kbd "d") #'simple-git-diff-file) + (define-key map (kbd "v") #'simple-git-visit-file) (define-key map (kbd "m") #'simple-git-merge) (define-key map (kbd "q") #'quit-window) - (define-key map (kbd "RET") #'simple-git-visit-file) + (define-key map (kbd "RET") #'simple-git-diff-file) (define-key map (kbd "n") #'next-line) (define-key map (kbd "p") #'previous-line) + (define-key map [mouse-1] #'simple-git-mouse-action) + (define-key map [C-mouse-1] #'simple-git-mouse-visit-file) map) "Keymap for `simple-git-status-mode'.") @@ -189,6 +213,8 @@ "\n\n") ;; Help (insert "Commands: ") + (insert (propertize "RET" 'face 'font-lock-keyword-face) " diff ") + (insert (propertize "v" 'face 'font-lock-keyword-face) "iew file ") (insert (propertize "s" 'face 'font-lock-keyword-face) "tage ") (insert (propertize "u" 'face 'font-lock-keyword-face) "nstage ") (insert (propertize "S" 'face 'font-lock-keyword-face) "tage-all ") @@ -197,9 +223,8 @@ (insert (propertize "P" 'face 'font-lock-keyword-face) "ush ") (insert (propertize "F" 'face 'font-lock-keyword-face) "etch/pull ") (insert (propertize "b" 'face 'font-lock-keyword-face) "ranch ") - (insert (propertize "B" 'face 'font-lock-keyword-face) "ranch-graph ") + (insert (propertize "G" 'face 'font-lock-keyword-face) "raph ") (insert (propertize "l" 'face 'font-lock-keyword-face) "og ") - (insert (propertize "d" 'face 'font-lock-keyword-face) "iff ") (insert (propertize "m" 'face 'font-lock-keyword-face) "erge ") (insert (propertize "r" 'face 'font-lock-keyword-face) "evert ") (insert (propertize "g" 'face 'font-lock-keyword-face) " refresh ") @@ -216,8 +241,9 @@ 'face 'simple-git-staged-face) (propertize (car item) 'face 'simple-git-staged-face) "\n") - (put-text-property line-start (point) 'simple-git-file (car item)) - (put-text-property line-start (point) 'simple-git-staged t))) + (put-text-property line-start (1- (point)) 'simple-git-file (car item)) + (put-text-property line-start (1- (point)) 'simple-git-staged t) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))) (insert " (none)\n"))) (insert "\n") ;; Unstaged files @@ -231,9 +257,10 @@ 'face 'simple-git-unstaged-face) (propertize (car item) 'face 'simple-git-unstaged-face) "\n") - (put-text-property line-start (point) 'simple-git-file (car item)) - (put-text-property line-start (point) 'simple-git-staged nil) - (put-text-property line-start (point) 'simple-git-unstaged t))) + (put-text-property line-start (1- (point)) 'simple-git-file (car item)) + (put-text-property line-start (1- (point)) 'simple-git-staged nil) + (put-text-property line-start (1- (point)) 'simple-git-unstaged t) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))) (insert " (none)\n"))) (insert "\n") ;; Untracked files @@ -245,8 +272,9 @@ (let ((line-start (point))) (insert " " (propertize file 'face 'simple-git-untracked-face) "\n") - (put-text-property line-start (point) 'simple-git-file file) - (put-text-property line-start (point) 'simple-git-untracked t))) + (put-text-property line-start (1- (point)) 'simple-git-file file) + (put-text-property line-start (1- (point)) 'simple-git-untracked t) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))) (insert " (none)\n"))) (goto-char (min pos (point-max)))))) @@ -501,9 +529,12 @@ (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") #'simple-git-log-show-commit) (define-key map (kbd "q") #'quit-window) - (define-key map (kbd "n") #'next-line) - (define-key map (kbd "p") #'previous-line) (define-key map (kbd "g") #'simple-git-log-refresh) + (define-key map (kbd "n") #'simple-git-log-next-page) + (define-key map (kbd "p") #'simple-git-log-prev-page) + (define-key map (kbd "N") #'simple-git-log-last-page) + (define-key map (kbd "P") #'simple-git-log-first-page) + (define-key map [mouse-1] #'simple-git-mouse-action) map) "Keymap for `simple-git-log-mode'.") @@ -513,7 +544,17 @@ (setq truncate-lines t)) (defvar simple-git-log-count 50 - "Number of commits to show in log.") + "Number of commits to show per page in log.") + +(defvar-local simple-git--log-page 0 + "Current page number in log view.") + +(defvar-local simple-git--log-total-commits nil + "Total number of commits in log.") + +(defun simple-git--get-total-commits () + "Get total number of commits in repository." + (string-to-number (string-trim (simple-git--run "rev-list" "--count" "HEAD")))) (defun simple-git-log-refresh () "Refresh the log buffer." @@ -521,35 +562,80 @@ (when (eq major-mode 'simple-git-log-mode) (let ((inhibit-read-only t) (pos (point)) - (default-directory (simple-git--root))) - (erase-buffer) - (insert (propertize "Commit History" 'face 'simple-git-header-face) "\n") - (insert "Commands: " - (propertize "RET" 'face 'font-lock-keyword-face) " show commit " - (propertize "g" 'face 'font-lock-keyword-face) " refresh " - (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") - (let ((output (simple-git--run "log" - (format "-n%d" simple-git-log-count) - "--pretty=format:%h|%an|%ar|%s"))) - (dolist (line (split-string output "\n" t)) - (let* ((parts (split-string line "|")) - (hash (nth 0 parts)) - (author (nth 1 parts)) - (date (nth 2 parts)) - (subject (nth 3 parts))) - (insert (propertize hash 'face 'simple-git-commit-hash-face - 'simple-git-commit hash) - " " - (propertize (format "%-20s" (truncate-string-to-width (or author "") 20)) - 'face 'simple-git-commit-author-face) - " " - (propertize (format "%-15s" (truncate-string-to-width (or date "") 15)) - 'face 'simple-git-commit-date-face) - " " - (or subject "") - "\n")))) + (default-directory (simple-git--root)) + (skip (* simple-git--log-page simple-git-log-count))) + ;; Get total commits if not cached + (unless simple-git--log-total-commits + (setq simple-git--log-total-commits (simple-git--get-total-commits))) + (let ((max-page (max 0 (1- (ceiling (/ (float simple-git--log-total-commits) simple-git-log-count)))))) + ;; Cap page number + (when (> simple-git--log-page max-page) + (setq simple-git--log-page max-page) + (setq skip (* simple-git--log-page simple-git-log-count))) + (erase-buffer) + (insert (propertize "Commit History" 'face 'simple-git-header-face) + (format " (page %d/%d)" (1+ simple-git--log-page) (1+ max-page)) + "\n") + (insert "Commands: " + (propertize "RET" 'face 'font-lock-keyword-face) " show commit " + (propertize "n" 'face 'font-lock-keyword-face) "ext page " + (propertize "p" 'face 'font-lock-keyword-face) "rev page " + (propertize "N" 'face 'font-lock-keyword-face) " last " + (propertize "P" 'face 'font-lock-keyword-face) " first " + (propertize "g" 'face 'font-lock-keyword-face) " refresh " + (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") + (let ((output (simple-git--run "log" + (format "--skip=%d" skip) + (format "-n%d" simple-git-log-count) + "--pretty=format:%h|%an|%ar|%s"))) + (dolist (line (split-string output "\n" t)) + (let* ((parts (split-string line "|")) + (hash (nth 0 parts)) + (author (nth 1 parts)) + (date (nth 2 parts)) + (subject (nth 3 parts)) + (line-start (point))) + (insert (propertize hash 'face 'simple-git-commit-hash-face + 'simple-git-commit hash) + " " + (propertize (format "%-20s" (truncate-string-to-width (or author "") 20)) + 'face 'simple-git-commit-author-face) + " " + (propertize (format "%-15s" (truncate-string-to-width (or date "") 15)) + 'face 'simple-git-commit-date-face) + " " + (or subject "") + "\n") + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))))) (goto-char (min pos (point-max)))))) +(defun simple-git-log-next-page () + "Go to next page of log." + (interactive) + (setq simple-git--log-page (1+ simple-git--log-page)) + (simple-git-log-refresh)) + +(defun simple-git-log-prev-page () + "Go to previous page of log." + (interactive) + (when (> simple-git--log-page 0) + (setq simple-git--log-page (1- simple-git--log-page)) + (simple-git-log-refresh))) + +(defun simple-git-log-first-page () + "Go to first page of log." + (interactive) + (setq simple-git--log-page 0) + (simple-git-log-refresh)) + +(defun simple-git-log-last-page () + "Go to last page of log." + (interactive) + (unless simple-git--log-total-commits + (setq simple-git--log-total-commits (simple-git--get-total-commits))) + (setq simple-git--log-page (max 0 (1- (ceiling (/ (float simple-git--log-total-commits) simple-git-log-count))))) + (simple-git-log-refresh)) + (defun simple-git--commit-at-point () "Get the commit hash at point." (get-text-property (line-beginning-position) 'simple-git-commit)) @@ -565,6 +651,7 @@ (define-key map (kbd "q") #'quit-window) (define-key map (kbd "n") #'next-line) (define-key map (kbd "p") #'previous-line) + (define-key map [mouse-1] #'simple-git-mouse-action) map) "Keymap for `simple-git-commit-detail-mode'.") @@ -623,8 +710,9 @@ ("D" 'simple-git-unstaged-face) (_ 'simple-git-untracked-face))) file "\n") - (put-text-property line-start (point) 'simple-git-commit-file file) - (put-text-property line-start (point) 'simple-git-commit-hash hash)))))))) + (put-text-property line-start (1- (point)) 'simple-git-commit-file file) + (put-text-property line-start (1- (point)) 'simple-git-commit-hash hash) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))))))) (simple-git-commit-detail-mode) (goto-char (point-min))) (display-buffer buf)))) @@ -728,10 +816,13 @@ (define-key map (kbd "RET") #'simple-git-file-history-show-diff) (define-key map (kbd "v") #'simple-git-file-history-view-file) (define-key map (kbd "c") #'simple-git-file-history-show-commit) + (define-key map (kbd "n") #'simple-git-file-history-next-page) + (define-key map (kbd "p") #'simple-git-file-history-prev-page) + (define-key map (kbd "N") #'simple-git-file-history-last-page) + (define-key map (kbd "P") #'simple-git-file-history-first-page) (define-key map (kbd "q") #'quit-window) - (define-key map (kbd "n") #'next-line) - (define-key map (kbd "p") #'previous-line) (define-key map (kbd "g") #'simple-git-file-history-refresh) + (define-key map [mouse-1] #'simple-git-mouse-action) map) "Keymap for `simple-git-file-history-mode'.") @@ -746,6 +837,16 @@ (defvar-local simple-git--file-history-root nil "The git root for file history mode.") +(defvar-local simple-git--file-history-page 0 + "Current page number in file history view.") + +(defvar-local simple-git--file-history-total-commits nil + "Total number of commits for file.") + +(defun simple-git--get-file-total-commits (file) + "Get total number of commits for FILE." + (string-to-number (string-trim (simple-git--run "rev-list" "--count" "--follow" "HEAD" "--" file)))) + (defun simple-git-file-history-refresh () "Refresh the file history buffer." (interactive) @@ -753,23 +854,40 @@ (let ((inhibit-read-only t) (pos (point)) (file simple-git--file-history-file) - (root simple-git--file-history-root)) - (erase-buffer) - (insert (propertize "File History" 'face 'simple-git-header-face) "\n") - (insert (propertize "File: " 'face 'simple-git-header-face) - file "\n\n") - (insert "Commands: " - (propertize "RET" 'face 'font-lock-keyword-face) " show diff " - (propertize "v" 'face 'font-lock-keyword-face) "iew file at this point " - (propertize "c" 'face 'font-lock-keyword-face) "ommit view " - (propertize "g" 'face 'font-lock-keyword-face) " refresh " - (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") - ;; Get log with file names to track renames - (let* ((default-directory root) - (output (simple-git--run "log" "--follow" "--name-status" - (format "-n%d" simple-git-log-count) - "--pretty=format:%h|%an|%ar|%s" - "--" file)) + (root simple-git--file-history-root) + (skip (* simple-git--file-history-page simple-git-log-count))) + ;; Get total commits if not cached + (let ((default-directory root)) + (unless simple-git--file-history-total-commits + (setq simple-git--file-history-total-commits (simple-git--get-file-total-commits file)))) + (let ((max-page (max 0 (1- (ceiling (/ (float simple-git--file-history-total-commits) simple-git-log-count)))))) + ;; Cap page number + (when (> simple-git--file-history-page max-page) + (setq simple-git--file-history-page max-page) + (setq skip (* simple-git--file-history-page simple-git-log-count))) + (erase-buffer) + (insert (propertize "File History" 'face 'simple-git-header-face) + (format " (page %d/%d)" (1+ simple-git--file-history-page) (1+ max-page)) + "\n") + (insert (propertize "File: " 'face 'simple-git-header-face) + file "\n\n") + (insert "Commands: " + (propertize "RET" 'face 'font-lock-keyword-face) " show diff " + (propertize "v" 'face 'font-lock-keyword-face) "iew file at this point " + (propertize "c" 'face 'font-lock-keyword-face) "ommit view " + (propertize "n" 'face 'font-lock-keyword-face) "ext page " + (propertize "p" 'face 'font-lock-keyword-face) "rev page " + (propertize "N" 'face 'font-lock-keyword-face) " last " + (propertize "P" 'face 'font-lock-keyword-face) " first " + (propertize "g" 'face 'font-lock-keyword-face) " refresh " + (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") + ;; Get log with file names to track renames + (let* ((default-directory root) + (output (simple-git--run "log" "--follow" "--name-status" + (format "--skip=%d" skip) + (format "-n%d" simple-git-log-count) + "--pretty=format:%h|%an|%ar|%s" + "--" file)) (lines (split-string output "\n")) (current-file file)) ;; Parse output - each commit has format line, then blank, then file status @@ -807,9 +925,10 @@ " " (or subject "") "\n") - (put-text-property line-start (point) 'simple-git-commit-hash hash) - (put-text-property line-start (point) 'simple-git-commit-file file-at-commit))))) - (setq i (1+ i))))) + (put-text-property line-start (1- (point)) 'simple-git-commit-hash hash) + (put-text-property line-start (1- (point)) 'simple-git-commit-file file-at-commit) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))))) + (setq i (1+ i)))))) (goto-char (min pos (point-max)))))) (defun simple-git-file-history-show-diff () @@ -911,14 +1030,45 @@ ("D" 'simple-git-unstaged-face) (_ 'simple-git-untracked-face))) file "\n") - (put-text-property line-start (point) 'simple-git-commit-file file) - (put-text-property line-start (point) 'simple-git-commit-hash hash))))))))) + (put-text-property line-start (1- (point)) 'simple-git-commit-file file) + (put-text-property line-start (1- (point)) 'simple-git-commit-hash hash) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))))))))) (with-current-buffer buf (simple-git-commit-detail-mode) (goto-char (point-min))) (display-buffer buf)) (message "No commit at point")))) +(defun simple-git-file-history-next-page () + "Go to next page of file history." + (interactive) + (setq simple-git--file-history-page (1+ simple-git--file-history-page)) + (simple-git-file-history-refresh)) + +(defun simple-git-file-history-prev-page () + "Go to previous page of file history." + (interactive) + (when (> simple-git--file-history-page 0) + (setq simple-git--file-history-page (1- simple-git--file-history-page)) + (simple-git-file-history-refresh))) + +(defun simple-git-file-history-first-page () + "Go to first page of file history." + (interactive) + (setq simple-git--file-history-page 0) + (simple-git-file-history-refresh)) + +(defun simple-git-file-history-last-page () + "Go to last page of file history." + (interactive) + (let ((default-directory simple-git--file-history-root)) + (unless simple-git--file-history-total-commits + (setq simple-git--file-history-total-commits + (simple-git--get-file-total-commits simple-git--file-history-file)))) + (setq simple-git--file-history-page + (max 0 (1- (ceiling (/ (float simple-git--file-history-total-commits) simple-git-log-count))))) + (simple-git-file-history-refresh)) + ;;;###autoload (defun simple-git-file-history () "Show commit history for the current file." @@ -934,9 +1084,252 @@ (simple-git-file-history-mode) (setq simple-git--file-history-file file) (setq simple-git--file-history-root root) + (setq simple-git--file-history-page 0) (simple-git-file-history-refresh)) (pop-to-buffer buf))) +;;; ============================================================================ +;;; Line Blame Mode +;;; ============================================================================ + +(defvar simple-git-line-blame-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") #'simple-git-line-blame-show-diff) + (define-key map (kbd "v") #'simple-git-line-blame-view-file) + (define-key map (kbd "c") #'simple-git-line-blame-show-commit) + (define-key map (kbd "q") #'quit-window) + (define-key map (kbd "n") #'next-line) + (define-key map (kbd "p") #'previous-line) + (define-key map [mouse-1] #'simple-git-mouse-action) + map) + "Keymap for `simple-git-line-blame-mode'.") + +(define-derived-mode simple-git-line-blame-mode special-mode "SimpleGit:LineBlame" + "Major mode for viewing line blame history." + (setq buffer-read-only t) + (setq truncate-lines t)) + +(defvar-local simple-git--line-blame-file nil + "The file being viewed in line blame mode.") + +(defvar-local simple-git--line-blame-root nil + "The git root for line blame mode.") + +(defvar-local simple-git--line-blame-line nil + "The line number being blamed.") + +(defun simple-git--get-line-history (file line root) + "Get history of commits that modified LINE in FILE. +Returns list of (hash author date subject file-at-commit)." + (let* ((default-directory root) + (results '()) + (current-file file) + (current-line line) + (seen-hashes (make-hash-table :test 'equal)) + (iterations 0) + (max-iterations 50)) + ;; Iteratively trace the line back through history + (while (and current-file current-line (< iterations max-iterations)) + (let* ((blame-output (simple-git--run "blame" "-L" (format "%d,%d" current-line current-line) + "--porcelain" "-w" current-file))) + (if (string-match "^\\([a-f0-9]+\\)" blame-output) + (let ((hash (match-string 1 blame-output))) + (if (or (string-prefix-p "00000000" hash) + (gethash hash seen-hashes)) + ;; Uncommitted or already seen - stop + (setq current-file nil) + ;; New commit found + (puthash hash t seen-hashes) + (let* ((info (simple-git--run "show" "--no-patch" + "--format=%h|%an|%ar|%s" hash)) + (parts (split-string (car (split-string info "\n")) "|")) + (short-hash (nth 0 parts)) + (author (nth 1 parts)) + (date (nth 2 parts)) + (subject (nth 3 parts))) + (push (list short-hash author date subject current-file hash) results)) + ;; Find parent commit and line number + (let* ((parent-output (simple-git--run "rev-parse" (concat hash "^"))) + (parent (string-trim parent-output))) + (if (or (string-empty-p parent) (string-prefix-p "fatal:" parent)) + (setq current-file nil) + ;; Try to find the line in parent + (let ((blame-parent (simple-git--run "blame" "-L" (format "%d,%d" current-line current-line) + "--porcelain" "-w" parent "--" current-file))) + (if (string-match "^\\([a-f0-9]+\\)" blame-parent) + ;; Line exists in parent, continue tracing + nil + ;; Line doesn't exist in parent with same number, stop + (setq current-file nil))))))) + ;; No blame output - stop + (setq current-file nil))) + (setq iterations (1+ iterations))) + (nreverse results))) + +(defun simple-git-line-blame-refresh () + "Refresh the line blame buffer." + (let ((inhibit-read-only t) + (file simple-git--line-blame-file) + (root simple-git--line-blame-root) + (line simple-git--line-blame-line)) + (erase-buffer) + (insert (propertize "Line History (Blame)" 'face 'simple-git-header-face) "\n") + (insert (propertize "File: " 'face 'simple-git-header-face) file "\n") + (insert (propertize "Line: " 'face 'simple-git-header-face) (number-to-string line) "\n\n") + (insert "Commands: " + (propertize "RET" 'face 'font-lock-keyword-face) " show diff " + (propertize "v" 'face 'font-lock-keyword-face) "iew file at this point " + (propertize "c" 'face 'font-lock-keyword-face) "ommit view " + (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") + (let ((history (simple-git--get-line-history file line root))) + (if history + (dolist (entry history) + (let* ((hash (nth 0 entry)) + (author (nth 1 entry)) + (date (nth 2 entry)) + (subject (nth 3 entry)) + (file-at-commit (nth 4 entry)) + (full-hash (nth 5 entry)) + (line-start (point))) + (insert (propertize hash 'face 'simple-git-commit-hash-face) + " " + (propertize (format "%-20s" (truncate-string-to-width (or author "") 20)) + 'face 'simple-git-commit-author-face) + " " + (propertize (format "%-15s" (truncate-string-to-width (or date "") 15)) + 'face 'simple-git-commit-date-face) + " " + (or subject "") + "\n") + (put-text-property line-start (1- (point)) 'simple-git-commit-hash full-hash) + (put-text-property line-start (1- (point)) 'simple-git-commit-file file-at-commit) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))) + (insert " (no history found)\n"))) + (goto-char (point-min)))) + +(defun simple-git-line-blame-show-diff () + "Show diff for commit at point." + (interactive) + (let* ((hash (get-text-property (line-beginning-position) 'simple-git-commit-hash)) + (file (get-text-property (line-beginning-position) 'simple-git-commit-file)) + (root simple-git--line-blame-root) + (return-buf (current-buffer))) + (if (and hash file) + (let ((buf (get-buffer-create "*simple-git-diff*"))) + (with-current-buffer buf + (let ((inhibit-read-only t) + (default-directory root)) + (erase-buffer) + (call-process "git" nil t nil "show" "--format=" hash "--" file) + (goto-char (point-min)) + (simple-git-diff-mode) + (setq simple-git--diff-return-buffer return-buf))) + (display-buffer buf)) + (message "No commit at point")))) + +(defun simple-git-line-blame-view-file () + "View file at commit at point." + (interactive) + (let* ((hash (get-text-property (line-beginning-position) 'simple-git-commit-hash)) + (file (get-text-property (line-beginning-position) 'simple-git-commit-file)) + (root simple-git--line-blame-root)) + (if (and hash file) + (let* ((buf-name (format "*simple-git:%s@%s*" (file-name-nondirectory file) (substring hash 0 7))) + (buf (get-buffer-create buf-name))) + (with-current-buffer buf + (let ((inhibit-read-only t) + (default-directory root)) + (erase-buffer) + (call-process "git" nil t nil "show" (concat hash ":" file)) + (goto-char (point-min)) + (let ((mode (assoc-default file auto-mode-alist 'string-match))) + (when mode (funcall mode))) + (setq buffer-read-only t))) + (let ((main-window (or (seq-find (lambda (w) + (not (window-parameter w 'window-side))) + (window-list)) + (selected-window)))) + (select-window main-window) + (switch-to-buffer buf))) + (message "No commit at point")))) + +(defun simple-git-line-blame-show-commit () + "Show full commit details for commit at point." + (interactive) + (let* ((hash (get-text-property (line-beginning-position) 'simple-git-commit-hash)) + (root simple-git--line-blame-root)) + (if hash + (let ((buf (get-buffer-create "*simple-git-commit-detail*"))) + (with-current-buffer buf + (let ((inhibit-read-only t) + (default-directory root)) + (erase-buffer) + (let* ((info (simple-git--run "show" "--no-patch" + "--format=%h%n%an%n%ar%n%s%n%b" hash)) + (lines (split-string info "\n")) + (short-hash (nth 0 lines)) + (author (nth 1 lines)) + (date (nth 2 lines)) + (subject (nth 3 lines)) + (body (string-trim (mapconcat #'identity (nthcdr 4 lines) "\n")))) + (insert (propertize "Commit: " 'face 'simple-git-header-face) + (propertize short-hash 'face 'simple-git-commit-hash-face) "\n") + (insert (propertize "Author: " 'face 'simple-git-header-face) + (propertize author 'face 'simple-git-commit-author-face) "\n") + (insert (propertize "Date: " 'face 'simple-git-header-face) + (propertize date 'face 'simple-git-commit-date-face) "\n\n") + (insert (propertize subject 'face 'bold) "\n") + (when (not (string-empty-p body)) + (insert "\n" body "\n")) + (insert "\n") + (insert "Commands: " + (propertize "RET" 'face 'font-lock-keyword-face) " show diff " + (propertize "v" 'face 'font-lock-keyword-face) "iew file at this point " + (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") + (let* ((files-output (simple-git--run "show" "--name-status" "--format=" hash)) + (file-lines (split-string files-output "\n" t))) + (insert (propertize "Changed files:\n" 'face 'simple-git-header-face)) + (dolist (file-line file-lines) + (when (string-match "^\\([AMDRT]\\)\t\\(.+\\)$" file-line) + (let ((status (match-string 1 file-line)) + (file (match-string 2 file-line))) + (let ((line-start (point))) + (insert " " + (propertize (format "[%s] " status) + 'face (pcase status + ("A" 'simple-git-staged-face) + ("D" 'simple-git-unstaged-face) + (_ 'simple-git-untracked-face))) + file "\n") + (put-text-property line-start (1- (point)) 'simple-git-commit-file file) + (put-text-property line-start (1- (point)) 'simple-git-commit-hash hash) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))))))))) + (with-current-buffer buf + (simple-git-commit-detail-mode) + (goto-char (point-min))) + (display-buffer buf)) + (message "No commit at point")))) + +;;;###autoload +(defun simple-git-line-blame () + "Show blame history for the current line." + (interactive) + (unless (simple-git--in-repo-p) + (user-error "Not in a Git repository")) + (unless buffer-file-name + (user-error "Buffer is not visiting a file")) + (let* ((root (simple-git--root)) + (file (file-relative-name buffer-file-name root)) + (line (line-number-at-pos)) + (buf (get-buffer-create (format "*simple-git-blame:%s:%d*" (file-name-nondirectory file) line)))) + (with-current-buffer buf + (simple-git-line-blame-mode) + (setq simple-git--line-blame-file file) + (setq simple-git--line-blame-root root) + (setq simple-git--line-blame-line line) + (simple-git-line-blame-refresh)) + (pop-to-buffer buf))) + ;;; ============================================================================ ;;; Branch Graph Mode ;;; ============================================================================ @@ -945,9 +1338,12 @@ (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") #'simple-git-branch-graph-show-commit) (define-key map (kbd "q") #'quit-window) - (define-key map (kbd "n") #'next-line) - (define-key map (kbd "p") #'previous-line) (define-key map (kbd "g") #'simple-git-branch-graph-refresh) + (define-key map (kbd "n") #'simple-git-branch-graph-next-page) + (define-key map (kbd "p") #'simple-git-branch-graph-prev-page) + (define-key map (kbd "N") #'simple-git-branch-graph-last-page) + (define-key map (kbd "P") #'simple-git-branch-graph-first-page) + (define-key map [mouse-1] #'simple-git-mouse-action) map) "Keymap for `simple-git-branch-graph-mode'.") @@ -956,6 +1352,12 @@ (setq buffer-read-only t) (setq truncate-lines t)) +(defvar-local simple-git--graph-page 0 + "Current page number in graph view.") + +(defvar-local simple-git--graph-total-commits nil + "Total number of commits in graph.") + (defface simple-git-graph-branch-1 '((t :foreground "#e06c75")) "Face for branch 1 in graph.") @@ -1014,24 +1416,44 @@ (setq i (1+ i))) result)) +(defun simple-git--get-all-commits-count () + "Get total number of commits across all branches." + (string-to-number (string-trim (simple-git--run "rev-list" "--count" "--all")))) + (defun simple-git-branch-graph-refresh () "Refresh the branch graph buffer." (interactive) (when (eq major-mode 'simple-git-branch-graph-mode) (let ((inhibit-read-only t) (pos (point)) - (default-directory (simple-git--root))) - (erase-buffer) - (insert (propertize "Branch Graph" 'face 'simple-git-header-face) "\n\n") - (insert "Commands: " - (propertize "RET" 'face 'font-lock-keyword-face) " show commit " - (propertize "g" 'face 'font-lock-keyword-face) " refresh " - (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") - ;; Get graph with commit info - (let* ((output (simple-git--run "log" "--all" "--graph" - (format "-n%d" simple-git-branch-graph-count) - "--pretty=format:%h|%an|%ar|%s|%d")) - (lines (split-string output "\n"))) + (default-directory (simple-git--root)) + (skip (* simple-git--graph-page simple-git-branch-graph-count))) + ;; Get total commits if not cached + (unless simple-git--graph-total-commits + (setq simple-git--graph-total-commits (simple-git--get-all-commits-count))) + (let ((max-page (max 0 (1- (ceiling (/ (float simple-git--graph-total-commits) simple-git-branch-graph-count)))))) + ;; Cap page number + (when (> simple-git--graph-page max-page) + (setq simple-git--graph-page max-page) + (setq skip (* simple-git--graph-page simple-git-branch-graph-count))) + (erase-buffer) + (insert (propertize "Branch Graph" 'face 'simple-git-header-face) + (format " (page %d/%d)" (1+ simple-git--graph-page) (1+ max-page)) + "\n\n") + (insert "Commands: " + (propertize "RET" 'face 'font-lock-keyword-face) " show commit " + (propertize "n" 'face 'font-lock-keyword-face) "ext page " + (propertize "p" 'face 'font-lock-keyword-face) "rev page " + (propertize "N" 'face 'font-lock-keyword-face) " last " + (propertize "P" 'face 'font-lock-keyword-face) " first " + (propertize "g" 'face 'font-lock-keyword-face) " refresh " + (propertize "q" 'face 'font-lock-keyword-face) "uit\n\n") + ;; Get graph with commit info + (let* ((output (simple-git--run "log" "--all" "--graph" + (format "--skip=%d" skip) + (format "-n%d" simple-git-branch-graph-count) + "--pretty=format:%h|%an|%ar|%s|%d")) + (lines (split-string output "\n"))) (dolist (line lines) (if (string-match "^\\([*| /\\\\]+\\)\\([a-f0-9]+\\)|\\([^|]*\\)|\\([^|]*\\)|\\([^|]*\\)|\\(.*\\)$" line) ;; Line with commit info @@ -1050,12 +1472,41 @@ (insert (propertize (truncate-string-to-width (or author "") 15) 'face 'simple-git-commit-author-face) " ") (insert (or subject "") "\n") - (put-text-property line-start (point) 'simple-git-commit-hash hash)) + (put-text-property line-start (1- (point)) 'simple-git-commit-hash hash) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)) ;; Graph-only line (no commit) (when (string-match "^\\([*| /\\\\]+\\)$" line) - (insert (simple-git--colorize-graph (match-string 1 line)) "\n"))))) + (insert (simple-git--colorize-graph (match-string 1 line)) "\n")))))) (goto-char (min pos (point-max)))))) +(defun simple-git-branch-graph-next-page () + "Go to next page of graph." + (interactive) + (setq simple-git--graph-page (1+ simple-git--graph-page)) + (simple-git-branch-graph-refresh)) + +(defun simple-git-branch-graph-prev-page () + "Go to previous page of graph." + (interactive) + (when (> simple-git--graph-page 0) + (setq simple-git--graph-page (1- simple-git--graph-page)) + (simple-git-branch-graph-refresh))) + +(defun simple-git-branch-graph-first-page () + "Go to first page of graph." + (interactive) + (setq simple-git--graph-page 0) + (simple-git-branch-graph-refresh)) + +(defun simple-git-branch-graph-last-page () + "Go to last page of graph." + (interactive) + (unless simple-git--graph-total-commits + (setq simple-git--graph-total-commits (simple-git--get-all-commits-count))) + (setq simple-git--graph-page + (max 0 (1- (ceiling (/ (float simple-git--graph-total-commits) simple-git-branch-graph-count))))) + (simple-git-branch-graph-refresh)) + (defun simple-git-branch-graph-show-commit () "Show commit details for commit at point." (interactive) @@ -1106,8 +1557,9 @@ ("D" 'simple-git-unstaged-face) (_ 'simple-git-untracked-face))) file "\n") - (put-text-property line-start (point) 'simple-git-commit-file file) - (put-text-property line-start (point) 'simple-git-commit-hash hash))))))))) + (put-text-property line-start (1- (point)) 'simple-git-commit-file file) + (put-text-property line-start (1- (point)) 'simple-git-commit-hash hash) + (put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))))))))) (with-current-buffer buf (simple-git-commit-detail-mode) (goto-char (point-min))) diff --git a/.emacs.d/lisp/xah-find.el b/.emacs.d/lisp/xah-find.el deleted file mode 100755 index b9be4cb..0000000 --- a/.emacs.d/lisp/xah-find.el +++ /dev/null @@ -1,731 +0,0 @@ -;;; xah-find.el --- find replace in pure emacs lisp. Purpose similar to grep/sed. -*- coding: utf-8; lexical-binding: t; -*- - -;; Copyright © 2012-2021 by Xah Lee - -;; Author: Xah Lee ( http://xahlee.info/ ) -;; Version: 5.4.20211014135145 -;; Created: 02 April 2012 -;; Package-Requires: ((emacs "24.1")) -;; Keywords: convenience, extensions, files, tools, unix -;; License: GPL v3 -;; Homepage: http://ergoemacs.org/emacs/elisp-xah-find-text.html - -;; This file is not part of GNU Emacs. - -;;; Commentary: - -;; Provides emacs commands for find/replace text of files in a directory, written entirely in emacs lisp. - -;; This package provides these commands: - -;; xah-find-text -;; xah-find-text-regex -;; xah-find-count -;; xah-find-replace-text -;; xah-find-replace-text-regex - -;; • Pure emacs lisp. No dependencies on unix/linux grep/sed/find. Especially useful on Windows. - -;; • Output is highlighted and clickable for jumping to occurrence. - -;; • Using emacs regex, not bash/perl etc regex. - -;; These commands treats find/replace string as sequence of chars, not as lines as in grep/sed, so it's easier to find or replace a text containing lots newlines, especially programming language source code. - -;; • Reliably Find/Replace string that contains newline chars. - -;; • Reliably Find/Replace string that contains lots Unicode chars. See http://xahlee.info/comp/unix_uniq_unicode_bug.html and http://ergoemacs.org/emacs/emacs_grep_problem.html - -;; • Reliably Find/Replace string that contains lots escape slashes or backslashes. For example, regex in source code, Microsoft Windows' path. - -;; The result output is also not based on lines. Instead, visual separators are used for easy reading. - -;; For each occurrence or replacement, n chars will be printed before and after. The number of chars to show is defined by `xah-find-context-char-count-before' and `xah-find-context-char-count-after' - -;; Each “block of text” in output is one occurrence. -;; For example, if a line in a file has 2 occurrences, then the same line will be reported twice, as 2 “blocks”. -;; so, the number of blocks corresponds exactly to the number of occurrences. - -;; Keys -;; ----------------------- -;; TAB xah-find-next-match -;; xah-find-previous-match - -;; RET xah-find--jump-to-place -;; xah-find--mouse-jump-to-place - -;; xah-find-previous-match -;; xah-find-next-match - -;; xah-find-next-file -;; xah-find-previous-file - -;; M-n xah-find-next-file -;; M-p xah-find-previous-file - -;; IGNORE DIRECTORIES - -;; By default, .git dir is ignored. You can add to it by adding the following in your init: - -;; (setq -;; xah-find-dir-ignore-regex-list -;; [ -;; "\\.git/" -;; ; more regex here. regex is matched against file full path -;; ]) - -;; USE CASE - -;; To give a idea what file size, number of files, are practical, here's my typical use pattern: -;; • 5 thousand HTML files match file name regex. -;; • Each HTML file size are usually less than 200k bytes. -;; • search string length have been up to 13 lines of text. - -;; Homepage: http://ergoemacs.org/emacs/elisp-xah-find-text.html - -;; Like it? -;; Buy Xah Emacs Tutorial -;; http://ergoemacs.org/emacs/buy_xah_emacs_tutorial.html -;; Thank you. - -;;; INSTALL - -;; To install manually, place this file in the directory [~/.emacs.d/lisp/] - -;; Then, place the following code in your emacs init file - -;; (add-to-list 'load-path "~/.emacs.d/lisp/") -;; (autoload 'xah-find-text "xah-find" "find replace" t) -;; (autoload 'xah-find-text-regex "xah-find" "find replace" t) -;; (autoload 'xah-find-replace-text "xah-find" "find replace" t) -;; (autoload 'xah-find-replace-text-regex "xah-find" "find replace" t) -;; (autoload 'xah-find-count "xah-find" "find replace" t) - -;;; HISTORY - -;; version 2.1.0, 2015-05-30 Complete rewrite. -;; version 1.0, 2012-04-02 First version. - -;;; CONTRIBUTOR -;; 2015-12-09 Peter Buckley (dx-pbuckley). defcustom for result highlight color. - -;; HHH___________________________________________________________________ -;;; Code: - -(require 'ido) -(require 'seq) - -(ido-common-initialization) - ;; 2015-07-26 else, when ido-read-directory-name is called, Return key insert line return instead of submit. For some reason i dunno. - -(defvar xah-find-context-char-count-before 100 "Number of characters to print before search string." ) - -(defvar xah-find-context-char-count-after 50 "Number of characters to print after search string." ) - -(defvar xah-find-dir-ignore-regex-list - [ - "\\.git/" - ] - "A list or vector of regex patterns, if match, that directory will be ignored. -The regex match is Case Insensitive." - ) - -(defface xah-find-file-path-highlight - '((t :foreground "black" - :background "pink" - )) - "Face of file path where a text match is found." - :group 'xah-find - ) - -(defface xah-find-match-highlight - '((t :foreground "black" - :background "yellow" - )) - "Face for matched text." - :group 'xah-find - ) - -(defface xah-find-replace-highlight - '((t :foreground "black" - :background "green" - )) - "Face for replaced text." - :group 'xah-find - ) - -(defvar xah-find-file-separator - "ff━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n" - "A string as visual separator." - ) - -(defvar xah-find-occur-separator - "oo────────────────────────────────────────────────────────────\n\n" - "A string as visual separator." - ) - -(defvar xah-find-occur-prefix "〖" "A left-bracket string that marks matched text and navigate previous/next. This string should basically never occure in your files. If it does, jumping to the location may not work." ) - -(defvar xah-find-occur-postfix "〗" "A right-bracket string that marks matched text and navigate previous/next. See also `xah-find-occur-prefix'." ) - -(defvar xah-find-replace-prefix "『" "A left-bracket string that marks matched text and navigate previous/next. See also `xah-find-occur-prefix'." ) - -(defvar xah-find-replace-postfix "』" "A right-bracket string that marks matched text and navigate previous/next. See also `xah-find-occur-prefix'." ) - -;; more brackets at http://xahlee.info/comp/unicode_matching_brackets.html - -(defvar xah-find-filepath-prefix "〘" "A left-bracket string used to mark file path and navigate previous/next. See also `xah-find-occur-prefix'." ) - -(defvar xah-find-filepath-postfix "〙" "A right-bracket string used to mark file path and navigate previous/next. See also `xah-find-occur-prefix'." ) - -(defvar xah-find-pos-prefix "⁅" "A string of left bracket that marks line column position of occurrence. See also `xah-find-occur-prefix'." ) - -(defvar xah-find-pos-postfix "⁆" "A string of right bracket that marks line column position of occurrence. See also `xah-find-occur-prefix'." ) - -;; HHH___________________________________________________________________ - -(defvar xah-find-file-path-regex-history '() "File path regex history list, used by `xah-find-text' and others.") - -(defun xah-find--ignore-dir-p (Path) - "Return true if one of `xah-find-dir-ignore-regex-list' matches PATH. Else, nil. -version 2016-11-16 2021-10-11" - (let ((case-fold-search t)) - (catch 'exit25001 - (mapc - (lambda ($regex) - (when (string-match $regex Path) (throw 'exit25001 $regex))) - xah-find-dir-ignore-regex-list) - nil - ))) - -;; HHH___________________________________________________________________ -(defvar xah-find-output-mode-map nil "Keybinding for `xah-find.el output'") -(progn - (setq xah-find-output-mode-map (make-sparse-keymap)) - - (define-key xah-find-output-mode-map (kbd "") 'xah-find-previous-match) - (define-key xah-find-output-mode-map (kbd "") 'xah-find-next-match) - (define-key xah-find-output-mode-map (kbd "") 'xah-find-next-file) - (define-key xah-find-output-mode-map (kbd "") 'xah-find-previous-file) - - (define-key xah-find-output-mode-map (kbd "TAB") 'xah-find-next-match) - (define-key xah-find-output-mode-map (kbd "") 'xah-find-previous-match) - (define-key xah-find-output-mode-map (kbd "") 'xah-find--mouse-jump-to-place) - (define-key xah-find-output-mode-map (kbd "M-n") 'xah-find-next-file) - (define-key xah-find-output-mode-map (kbd "M-p") 'xah-find-previous-file) - (define-key xah-find-output-mode-map (kbd "RET") 'xah-find--jump-to-place) - ) - -(defvar xah-find-output-syntax-table nil "Syntax table for `xah-find-output-mode'.") - -(setq xah-find-output-syntax-table - (let ( (synTable (make-syntax-table))) - (modify-syntax-entry ?\" "." synTable) - ;; (modify-syntax-entry ?〖 "(〗" synTable) - ;; (modify-syntax-entry ?〗 "(〖" synTable) - synTable)) - -(setq xah-find-font-lock-keywords - (let ( - (xMatch (format "%s\\([^%s]+\\)%s" xah-find-occur-prefix xah-find-occur-postfix xah-find-occur-postfix)) - - (xRep (format "%s\\([^%s]+\\)%s" xah-find-replace-prefix xah-find-replace-postfix xah-find-replace-postfix)) - (xfPath (format "%s\\([^%s]+\\)%s" xah-find-filepath-prefix xah-find-filepath-postfix xah-find-filepath-postfix))) - - `( - (,xMatch . (1 'xah-find-match-highlight)) - (,xRep . (1 'xah-find-replace-highlight)) - (,xfPath . (1 'xah-find-file-path-highlight))))) - -(define-derived-mode xah-find-output-mode fundamental-mode "∑xah-find" - "Major mode for reading output for xah-find commands. -home page: -URL `http://ergoemacs.org/emacs/elisp-xah-find-text.html' - -\\{xah-find-output-mode-map} -Version 2021-06-23" - (setq font-lock-defaults '((xah-find-font-lock-keywords))) - (set-syntax-table xah-find-output-syntax-table)) - -(defun xah-find-next-match () - "Put cursor to next occurrence." - (interactive) - (search-forward xah-find-occur-prefix nil t )) - -(defun xah-find-previous-match () - "Put cursor to previous occurrence." - (interactive) - (search-backward xah-find-occur-postfix nil t )) - -(defun xah-find-next-file () - "Put cursor to next file." - (interactive) - (search-forward xah-find-filepath-prefix nil t )) - -(defun xah-find-previous-file () - "Put cursor to previous file." - (interactive) - (search-backward xah-find-filepath-postfix nil t )) - -(defun xah-find--mouse-jump-to-place (Event) - "Open file and put cursor at location of the occurrence. -Version 2016-12-18" - (interactive "e") - (let* ( - ($pos (posn-point (event-end Event))) - ($fpath (get-text-property $pos 'xah-find-fpath)) - ($posJumpTo (get-text-property $pos 'xah-find-pos))) - (when $fpath - (progn - (find-file-other-window $fpath) - (when $posJumpTo (goto-char $posJumpTo)))))) - -;; (defun xah-find--jump-to-place () -;; "Open file and put cursor at location of the occurrence. -;; Version 2017-04-07" -;; (interactive) -;; (let (($fpath (get-text-property (point) 'xah-find-fpath)) -;; ($posJumpTo (get-text-property (point) 'xah-find-pos))) -;; (if $fpath -;; (if (file-exists-p $fpath) -;; (progn -;; (find-file-other-window $fpath) -;; (when $posJumpTo (goto-char $posJumpTo))) -;; (error "File at 「%s」 does not exist." $fpath)) -;; (insert "\n")))) - -(defun xah-find--jump-to-place () - "Open file and put cursor at location of the occurrence. -Version 2019-03-14" - (interactive) - (let (($fpath (get-text-property (point) 'xah-find-fpath)) - ($posJumpTo (get-text-property (point) 'xah-find-pos)) - ($p0 (point)) - $p1 $p2 - ) - (if $fpath - (if (file-exists-p $fpath) - (progn - (find-file-other-window $fpath) - (when $posJumpTo (goto-char $posJumpTo))) - (error "File at 「%s」 does not exist." $fpath)) - (progn - (save-excursion - (goto-char $p0) - - ;; (if (eq (char-after (line-beginning-position)) (string-to-char xah-find-filepath-prefix )) - ;; (progn ) - ;; (progn )) - - (search-forward xah-find-file-separator) - (search-backward xah-find-filepath-prefix ) - (setq $p1 (1+ (point))) - (search-forward xah-find-filepath-postfix) - (setq $p2 (1- (point))) - (setq $fpath (buffer-substring-no-properties $p1 $p2)) - - (progn - (goto-char $p0) - (if (search-backward xah-find-pos-prefix nil t) - (progn - (setq $p1 (1+ (point))) - (search-forward xah-find-pos-postfix ) - (setq $p2 (1- (point))) - (setq $posJumpTo (string-to-number (buffer-substring-no-properties $p1 $p2)))) - (setq $posJumpTo nil)))) - (if (file-exists-p $fpath) - (progn - (find-file-other-window $fpath) - (when $posJumpTo (goto-char $posJumpTo))) - (error "File at 「%s」 does not exist." $fpath)))))) - -;; HHH___________________________________________________________________ -(defun xah-find--backup-suffix (S) - "Return a string of the form 「~‹S›~‹date time stamp›~」" - (concat "~" S (format-time-string "%Y%m%dT%H%M%S") "~")) - -(defun xah-find--current-date-time-string () - "Return current date-time string in this format 「2012-04-05T21:08:24-07:00」" - (concat - (format-time-string "%Y-%m-%dT%T") - (funcall (lambda (x) (format "%s:%s" (substring x 0 3) (substring x 3 5))) (format-time-string "%z")))) - -(defun xah-find--print-header (BufferObj Cmd InputDir PathRegex SearchStr &optional ReplaceStr Write-file-p BackupQ) - "Print things" - (princ - (concat - "-*- coding: utf-8; mode: xah-find-output -*-" "\n" - "Datetime: " (xah-find--current-date-time-string) "\n" - "Result of: " Cmd "\n" - (format "Directory: %s\n" InputDir ) - (format "Path regex: %s\n" PathRegex ) - (format "Write to file: %s\n" Write-file-p ) - (format "Backup: %s\n" BackupQ ) - (format "Search string: %s\n" SearchStr ) - (when ReplaceStr (format "Replace string [[%s]]\n" ReplaceStr)) - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n" - ) - BufferObj)) - -(defun xah-find--occur-output (P1 P2 Fpath Buff &optional NoContextString-p AltColor) - "Print result to a output buffer, with text properties (e.g. highlight and link). -P1 P2 are region boundary. Region of current buffer are grabbed. The region typically is the searched text. -Fpath is file path to be used as property value for clickable link. -Buff is the buffer to insert P1 P2 region. -NoContextString-p if true, don't add text before and after the region of interest. Else, `xah-find-context-char-count-before' number of chars are inserted before, and similar for `xah-find-context-char-count-after'. -AltColor if true, use a different highlight color face `xah-find-replace-highlight'. Else, use `xah-find-match-highlight'. - Version 2017-04-07 2021-08-05" - (let* ( - ($begin (max 1 (- P1 xah-find-context-char-count-before ))) - ($end (min (point-max) (+ P2 xah-find-context-char-count-after ))) - ($textBefore (if NoContextString-p "" (buffer-substring-no-properties $begin P1 ))) - $textMiddle - ($textAfter (if NoContextString-p "" (buffer-substring-no-properties P2 $end))) - ($face (if AltColor 'xah-find-replace-highlight 'xah-find-match-highlight)) - $bracketL $bracketR - ) - (put-text-property P1 P2 'face $face) - (put-text-property P1 P2 'xah-find-fpath Fpath) - (put-text-property P1 P2 'xah-find-pos P1) - (add-text-properties P1 P2 '(mouse-face highlight)) - (setq $textMiddle (buffer-substring P1 P2 )) - (if AltColor - (setq $bracketL xah-find-replace-prefix $bracketR xah-find-replace-postfix ) - (setq $bracketL xah-find-occur-prefix $bracketR xah-find-occur-postfix )) - (with-current-buffer Buff - (insert - (format "%s%s%s\n" xah-find-pos-prefix P1 xah-find-pos-postfix) - $textBefore - $bracketL - $textMiddle - $bracketR - $textAfter - "\n" - xah-find-occur-separator )))) - -;; (defun xah-find--print-replace-block (P1 P2 Buff) -;; "print " -;; (princ (concat "❬" (buffer-substring-no-properties P1 P2 ) "❭" "\n" xah-find-occur-separator) Buff)) - -(defun xah-find--print-file-count (Filepath4287 Count8086 BuffObj32) - "Print file path and count" - (princ (format "%d %s%s%s\n%s" - Count8086 - xah-find-filepath-prefix - Filepath4287 - xah-find-filepath-postfix - xah-find-file-separator) - BuffObj32)) - -(defun xah-find--switch-to-output (Buffer) - "switch to Buffer and highlight stuff" - (let ($p3 $p4) - (switch-to-buffer Buffer) - (progn - (goto-char (point-min)) - (while (search-forward xah-find-filepath-prefix nil t) - (setq $p3 (point)) - (search-forward xah-find-filepath-postfix nil nil) - (setq $p4 (match-beginning 0)) - (put-text-property $p3 $p4 'xah-find-fpath (buffer-substring-no-properties $p3 $p4)) - (add-text-properties $p3 $p4 '(mouse-face highlight)) - (put-text-property (line-beginning-position) (line-end-position) 'face 'xah-find-file-path-highlight))) - - (goto-char (point-min)) - (search-forward "━" nil t) ; todo, need fix - (search-forward xah-find-occur-prefix nil t) - (xah-find-output-mode) - )) - -;; HHH___________________________________________________________________ - -(defun xah-find--get-fpath-regex (&optional DefaultExt) - "Returns a string, that is a regex to match a file extension. -The result is based on current buffer's file extension. -If current file doesn't have extension or current buffer isn't a file, then extension DefaultExt is used. -DefaultExt should be a string, without dot, such as 「\"html\"」. -If DefaultExt is nil, 「\"html\"」 is used. -Example return value: 「ββ.htmlββ'」, where β is a backslash. -" - (let ( - ($buff-is-file-p (buffer-file-name)) - $fname-ext - $default-ext - ) - (setq $default-ext (if (null DefaultExt) - (progn "html") - (progn DefaultExt))) - (if $buff-is-file-p - (progn - (setq $fname-ext (file-name-extension (buffer-file-name))) - (if (or (null $fname-ext) (equal $fname-ext "")) - (progn (concat "\\." $default-ext "$")) - (progn (concat "\\." $fname-ext "$")))) - (progn (concat "\\." $default-ext "$"))))) - -;;;###autoload -(defun xah-find-count (SearchStr CountExpr CountNumber InputDir PathRegex) - "Report how many occurrences of a string, of a given dir. -Similar to `rgrep', but written in pure elisp. -Result is shown in buffer *xah-find output*. -Case sensitivity is determined by `case-fold-search'. Call `toggle-case-fold-search' to change. -`xah-find-dir-ignore-regex-list' is respected. -\\{xah-find-output-mode-map} - -Version 2021-10-11" - (interactive - (let ( $operator) - (list - (read-string (format "Search string (default %s): " (current-word)) nil 'query-replace-history (current-word)) - (setq $operator (ido-completing-read "Report on: " '("greater than" "greater or equal to" "equal" "not equal" "less than" "less or equal to" ))) - (read-string (format "Count %s: " $operator) "0") - (ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH") - (read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history)))) - (let* (($outBufName "*xah-find output*") - $outBuffer - ($countOperator - (cond - ((string-equal "less than" CountExpr ) '<) - ((string-equal "less or equal to" CountExpr ) '<=) - ((string-equal "greater than" CountExpr ) '>) - ((string-equal "greater or equal to" CountExpr ) '>=) - ((string-equal "equal" CountExpr ) '=) - ((string-equal "not equal" CountExpr ) '/=) - (t (error "count expression 「%s」 is wrong!" CountExpr )))) - ($countNumber (string-to-number CountNumber))) - (when (get-buffer $outBufName) (kill-buffer $outBufName)) - (setq $outBuffer (generate-new-buffer $outBufName)) - (xah-find--print-header $outBuffer "xah-find-count" InputDir PathRegex SearchStr ) - (mapc - (lambda ($f) - (let (($count 0)) - (with-temp-buffer - (insert-file-contents $f) - (goto-char (point-min)) - (while (search-forward SearchStr nil t) (setq $count (1+ $count))) - (when (funcall $countOperator $count $countNumber) - (xah-find--print-file-count $f $count $outBuffer))))) - (seq-filter (lambda (x) (not (xah-find--ignore-dir-p x))) - (directory-files-recursively InputDir PathRegex))) - (princ "Done." $outBuffer) - (xah-find--switch-to-output $outBuffer))) - -;;;###autoload -(defun xah-find-text (SearchStr InputDir PathRegex FixedCaseSearchQ PrintContext-p) - "Report files that contain string. -By default, not case sensitive, and print surrounding text. -If `universal-argument' is called first, prompt to ask. -`xah-find-dir-ignore-regex-list' is respected. -Result is shown in buffer *xah-find output*. -\\{xah-find-output-mode-map} - -version 2021-10-11" - (interactive - (let (($defaultInput (if (region-active-p) (buffer-substring-no-properties (region-beginning) (region-end)) (current-word)))) - (list - (read-string (format "Search string (default %s): " $defaultInput) nil 'query-replace-history $defaultInput) - (ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH") - (read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "html") nil nil 'dired-regexp-history) - (if current-prefix-arg (y-or-n-p "Fixed case in search?") nil ) - (if current-prefix-arg (y-or-n-p "Print surrounding Text?") t )))) - (let* ((case-fold-search (not FixedCaseSearchQ)) - ($count 0) - ($outBufName "*xah-find output*") - $outBuffer - ) - (setq InputDir (file-name-as-directory InputDir)) ; normalize dir path - (when (get-buffer $outBufName) (kill-buffer $outBufName)) - (setq $outBuffer (generate-new-buffer $outBufName)) - (xah-find--print-header $outBuffer "xah-find-text" InputDir PathRegex SearchStr ) - (mapc - (lambda ($path) - (setq $count 0) - (with-temp-buffer - (insert-file-contents $path) - (while (search-forward SearchStr nil t) - (setq $count (1+ $count)) - (when PrintContext-p (xah-find--occur-output (match-beginning 0) (match-end 0) $path $outBuffer))) - (when (> $count 0) (xah-find--print-file-count $path $count $outBuffer)))) - (seq-filter (lambda (x) (not (xah-find--ignore-dir-p x))) - (directory-files-recursively InputDir PathRegex))) - (princ "Done." $outBuffer) - (xah-find--switch-to-output $outBuffer))) - -(defun xah-find-count-slash (Path) - "Count the number of slash in path. -Useful for finding the level of a nested dir. -Note: you should probably call `expand-file-name' on Path first to canonize path, to make sure dir name always ends in slash. -Version 2021-10-11" - (interactive) - (seq-count (lambda (x) (char-equal x ?/)) Path)) - -;;;###autoload -(defun xah-find-replace-text (SearchStr ReplaceStr InputDir PathRegex DepthMin DepthMax WriteToFileQ FixedCaseSearchQ FixedCaseReplaceQ BackupQ) - "Find/Replace string in all files of a directory. -Search string can span multiple lines. -Search string is not regex. -`xah-find-dir-ignore-regex-list' is respected. - -Backup, if requested, backup filenames has suffix with timestamp, like this: ~xf20150531T233826~ - -Result is shown in buffer *xah-find output*. -\\{xah-find-output-mode-map} - -version 2021-10-11" - (interactive - (let (($searchStr (read-string (format "Search string (default %s): " (current-word)) nil 'query-replace-history (current-word))) - ($replaceStr (read-string "Replace string: " nil 'query-replace-history)) - ($inputDir (ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH")) - ($pathRegex (read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history)) - ;; ($recurseQ (yes-or-no-p "Recurse to subdirs?")) - ($depthMin (read-number "Min dir depth. Start dir has depth 0:" 0)) - ($depthMax (read-number "Max dir depth. (max+1 depth subdir files are excluded):" 9)) - ($writeToFileQ (y-or-n-p "Write changes to file?")) - ($fixedCaseSearchQ (y-or-n-p "Fixed case in search?")) - ($fixedCaseReplaceQ (y-or-n-p "Fixed case in replacement?")) - ($backupQ (y-or-n-p "Make backup?"))) - (list $searchStr $replaceStr $inputDir $pathRegex - $depthMin $depthMax - $writeToFileQ $fixedCaseSearchQ $fixedCaseReplaceQ $backupQ))) - (let (($outBufName "*xah-find output*") - $outBuffer - ($backupSuffix (xah-find--backup-suffix "xf")) - ($rootDepth (xah-find-count-slash (expand-file-name InputDir)))) - (when (get-buffer $outBufName) (kill-buffer $outBufName)) - (setq $outBuffer (generate-new-buffer $outBufName)) - (xah-find--print-header $outBuffer "xah-find-replace-text" InputDir PathRegex SearchStr ReplaceStr WriteToFileQ BackupQ) - (mapc - (lambda ($f) - (let ((case-fold-search (not FixedCaseSearchQ)) - ($count 0)) - (with-temp-buffer - (insert-file-contents $f) - (while (search-forward SearchStr nil t) - (setq $count (1+ $count)) - (replace-match ReplaceStr FixedCaseReplaceQ "literalreplace") - (xah-find--occur-output (match-beginning 0) (point) $f $outBuffer)) - (when (> $count 0) - (when WriteToFileQ - (when BackupQ (copy-file $f (concat $f $backupSuffix) t)) - (write-region (point-min) (point-max) $f nil 3)) - (xah-find--print-file-count $f $count $outBuffer))))) - (seq-filter - (lambda (x) - (let (($df (- (xah-find-count-slash x) $rootDepth))) - (and (>= $df DepthMin) (<= $df DepthMax)))) - (directory-files-recursively InputDir PathRegex))) - (princ "Done." $outBuffer) - (xah-find--switch-to-output $outBuffer))) - -;;;###autoload -(defun xah-find-text-regex (SearchRegex InputDir PathRegex RecurseQ FixedCaseSearchQ PrintContextLevel) - "Report files that contain a string pattern, similar to `rgrep'. -Result is shown in buffer *xah-find output*. -`xah-find-dir-ignore-regex-list' is respected. - -\\{xah-find-output-mode-map} -Version 2016-12-21 2021-10-11" - (interactive - (list - (read-string (format "Search regex (default %s): " (current-word)) nil 'query-replace-history (current-word)) - (ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH") - (read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history) - (yes-or-no-p "Recurse to subdirs?") - (y-or-n-p "Fixed case search?") - (ido-completing-read "Print context level: " '("with context string" "just matched pattern" "none")))) - (let (($count 0) - ($outBufName "*xah-find output*") - $outBuffer - ) - (setq InputDir (file-name-as-directory InputDir)) ; add ending slash - (when (get-buffer $outBufName) (kill-buffer $outBufName)) - (setq $outBuffer (generate-new-buffer $outBufName)) - (xah-find--print-header $outBuffer "xah-find-text-regex" InputDir PathRegex SearchRegex) - (mapc - (lambda ($fp) - (setq $count 0) - (with-temp-buffer - (insert-file-contents $fp) - (setq case-fold-search (not FixedCaseSearchQ)) - (while (re-search-forward SearchRegex nil t) - (setq $count (1+ $count)) - (cond - ((equal PrintContextLevel "none") nil) - ((equal PrintContextLevel "just matched pattern") - (xah-find--occur-output (match-beginning 0) (match-end 0) $fp $outBuffer t)) - ((equal PrintContextLevel "with context string") - (xah-find--occur-output (match-beginning 0) (match-end 0) $fp $outBuffer)))) - (when (> $count 0) (xah-find--print-file-count $fp $count $outBuffer)))) - (seq-filter (lambda (x) (not (xah-find--ignore-dir-p x))) - (if RecurseQ - (directory-files-recursively InputDir PathRegex) - (directory-files InputDir t PathRegex)))) - (princ "Done." $outBuffer) - (xah-find--switch-to-output $outBuffer))) - -;;;###autoload -(defun xah-find-replace-text-regex (Regex ReplaceStr InputDir PathRegex WriteToFileQ FixedCaseSearchQ FixedCaseReplaceQ ShowcontexQ BackupQ) - "Find/Replace by regex in all files of a directory. - -`xah-find-dir-ignore-regex-list' is respected. - -Backup, if requested, backup filenames has suffix with timestamp, like this: ~xf20150531T233826~ - -When called in lisp code: -Regex is a regex pattern. -ReplaceStr is replacement string. -InputDir is input directory to search (includes all nested subdirectories). -PathRegex is a regex to filter file paths. -WriteToFileQ, when true, write to file, else, print a report of changes only. -FixedCaseSearchQ sets `case-fold-search' for this operation. -FixedCaseReplaceQ if true, then the letter-case in replacement is literal. (this is relevant only if FixedCaseSearchQ is true.) -ShowcontexQ print characters before and after match. -BackupQ if ture does backup. - -Result is shown in buffer *xah-find output*. -\\{xah-find-output-mode-map} - -Version 2018-08-20 2021-10-11" - (interactive - (list - (read-regexp "Find regex: " ) - (read-string (format "Replace string: ") nil 'query-replace-history) - (ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH") - (read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history) - (y-or-n-p "Write changes to file?") - (y-or-n-p "Fixed case in search?") - (y-or-n-p "Fixed case in replacement?") - (y-or-n-p "Show context before after in output?") - (y-or-n-p "Make backup?"))) - (let (($outBufName "*xah-find output*") - $outBuffer - ($backupSuffix (xah-find--backup-suffix "xfr"))) - (when (get-buffer $outBufName) (kill-buffer $outBufName)) - (setq $outBuffer (generate-new-buffer $outBufName)) - (xah-find--print-header $outBuffer "xah-find-replace-text-regex" InputDir PathRegex Regex ReplaceStr WriteToFileQ BackupQ ) - (mapc - (lambda ($fp) - (let (($count 0)) - (with-temp-buffer - (insert-file-contents $fp) - (setq case-fold-search (not FixedCaseSearchQ)) - (while (re-search-forward Regex nil t) - (setq $count (1+ $count)) - ;; (xah-find--print-occur-block (match-beginning 0) (match-end 0) $outBuffer) - (xah-find--occur-output (match-beginning 0) (match-end 0) $fp $outBuffer t) - (replace-match ReplaceStr FixedCaseReplaceQ) - (xah-find--occur-output (match-beginning 0) (point) $fp $outBuffer (not ShowcontexQ) t)) - (when (> $count 0) - (xah-find--print-file-count $fp $count $outBuffer) - (when WriteToFileQ - (when BackupQ - (copy-file $fp (concat $fp $backupSuffix) t)) - (write-region (point-min) (point-max) $fp nil 3)))))) - (seq-filter (lambda (x) (not (xah-find--ignore-dir-p x))) - (directory-files-recursively InputDir PathRegex))) - (princ "Done." $outBuffer) - (xah-find--switch-to-output $outBuffer))) - -(provide 'xah-find) - -;;; xah-find.el ends here diff --git a/.emacs.d/themes/acme-theme.el b/.emacs.d/themes/acme-theme.el deleted file mode 100644 index b83c8ae..0000000 --- a/.emacs.d/themes/acme-theme.el +++ /dev/null @@ -1,512 +0,0 @@ -;;; acme-theme.el --- A color theme based on Acme & Sam from Plan 9 -*- lexical-binding: t; -*- - -;; Copyright (C) 2020 Ian Yi-En Pan - -;; Author: Ian Y.E. Pan -;; URL: https://github.com/ianpan870102/acme-emacs-theme -;; Version: 1.0.0 - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: -;; A color theme for Emacs based on Acme & Sam from Plan 9 - -;;; Credits: -;; This theme was modified from John Louis Del Rosario's plan9-theme.el - -;;; Code: - -(defgroup acme-theme nil - "Options for acme theme." - :group 'faces) - -(defcustom acme-theme-black-fg nil - "If non-nil, foreground will be pure black instead of the default dark grey." - :group 'acme-theme - :type 'boolean) - -(deftheme acme "A color theme based on Acme & Sam") - -;;; Color palette - -(let ((class '((class color) (min-colors 89))) - (bg "#FFFFE8") ; default bg - (bg-alt "#EFEFD8") - (bg-dark "#E5E5D0") - (fg (if acme-theme-black-fg "#000000" "#444444")) ; default fg - (fg-alt "#B8B09A") - (fg-dark "#988D6D") - (fg-light "#CCCCB7") - (highlight "#E8EB98") - (highlight-alt "#E8EBC8") - - ;; Standardized palette - (acme-cyan "#007777") - (acme-cyan-light "#A8EFEB") - (acme-red "#880000") - (acme-red-light "#F8E8E8") - (acme-yellow "#888838") - (acme-yellow-light "#F8FCE8") - (acme-green "#005500") - (acme-green-alt "#006600") - (acme-green-light "#E8FCE8") - (acme-blue "#1054AF") - (acme-blue-light "#E1FAFF") - (acme-purple "#555599") - (acme-purple-light "#FFEAFF")) - -;;; Theme Faces - (custom-theme-set-faces - 'acme - -;;;; Built-in - -;;;;; basic coloring - `(button ((t (:underline t)))) - `(link ((t (:foreground "#0066cc":weight normal)))) - `(highlight ((t (:inherit link :underline t)))) ; link hover - `(link-visited ((t (:foreground ,acme-purple :underline t :weight normal)))) - `(default ((t (:foreground ,fg :background ,bg)))) - `(cursor ((t (:foreground ,bg :background ,fg)))) - `(escape-glyph ((t (:foreground ,acme-cyan-light :bold nil)))) - `(fringe ((t (:foreground ,fg :background ,bg)))) - `(line-number ((t (:foreground ,fg :background ,bg-alt)))) - `(line-number-current-line ((t (:foreground ,fg :background ,bg-alt)))) - `(header-line ((t (:foreground ,fg :background ,acme-blue-light :box t)))) - `(success ((t (:foreground ,acme-green :weight normal)))) - `(warning ((t (:foreground ,acme-red :weight normal)))) - `(error ((t (:foreground ,acme-red :bold t)))) - -;;;;; compilation - `(compilation-column-face ((t (:foreground ,acme-yellow :background ,acme-yellow-light)))) - `(compilation-column-number ((t (:foreground ,acme-yellow :background ,acme-yellow-light)))) - `(compilation-error-face ((t (:foreground ,acme-red :weight normal :underline t)))) - `(compilation-face ((t (:foreground ,fg)))) - `(compilation-info-face ((t (:foreground ,acme-blue)))) - `(compilation-info ((t (:foreground ,acme-blue :underline t)))) - `(compilation-line-face ((t (:foreground ,acme-purple)))) - `(compilation-line-number ((t (:foreground ,acme-yellow :background ,acme-yellow-light)))) - `(compilation-message-face ((t (:foreground ,acme-blue)))) - `(compilation-warning-face ((t (:foreground ,acme-yellow :weight normal :underline t)))) - `(compilation-mode-line-exit ((t (:foreground ,acme-cyan :weight normal)))) - `(compilation-mode-line-fail ((t (:foreground ,acme-red :weight normal)))) - `(compilation-mode-line-run ((t (:foreground ,acme-purple :weight normal)))) - -;;;;; grep - `(grep-context-face ((t (:foreground ,fg-alt)))) - `(grep-error-face ((t (:foreground ,acme-red :weight normal :underline t)))) - `(grep-hit-face ((t (:foreground ,acme-purple :weight normal)))) - `(grep-match-face ((t (:foreground ,acme-cyan :weight normal)))) - `(match ((t (:background ,acme-cyan :foreground ,acme-cyan-light)))) - -;;;;; ag - `(ag-hit-face ((t (:foreground ,acme-green :weight normal)))) - `(ag-match-face ((t (:foreground ,acme-cyan :background ,acme-cyan-light :weight normal)))) - -;;;;; isearch - `(isearch ((t (:foreground ,fg :weight normal :background ,acme-cyan-light)))) - `(isearch-fail ((t (:foreground ,fg :weight normal :background ,acme-red)))) - `(lazy-highlight ((t (:foreground ,fg :weight normal :background ,acme-blue-light)))) - - `(menu ((t (:foreground ,bg :background ,fg)))) - `(minibuffer-prompt ((t (:foreground ,fg :weight normal)))) - `(region ((,class (:foreground ,fg :background ,highlight :extend nil)))) - `(secondary-selection ((t (:background ,acme-green-light)))) - `(trailing-whitespace ((t (:background ,acme-red-light)))) - `(vertical-border ((t (:foreground ,acme-cyan)))) - -;;;;; font lock - `(font-lock-builtin-face ((t (:foreground ,fg :weight normal)))) - `(font-lock-function-name-face ((t (:foreground ,fg :weight normal)))) - `(font-lock-string-face ((t (:foreground ,acme-red)))) - `(font-lock-keyword-face ((t (:foreground ,acme-blue :weight bold)))) ; if, else, for, while, return... - `(font-lock-type-face ((t (:foreground ,fg :weight bold)))) ; int, float, string, void... - `(font-lock-constant-face ((t (:foreground ,fg :weight bold)))) ; NULL, nullptr, true, false... - `(font-lock-variable-name-face ((t (:foreground ,fg :weight normal)))) - `(font-lock-comment-face ((t (:foreground ,acme-green :italic nil)))) - `(font-lock-comment-delimiter-face ((t (:foreground ,acme-green :italic nil)))) - `(font-lock-doc-face ((t (:foreground ,acme-yellow :italic nil)))) - `(font-lock-negation-char-face ((t (:foreground ,acme-red :weight normal)))) - `(font-lock-preprocessor-face ((t (:foreground ,acme-red :weight normal)))) - `(font-lock-regexp-grouping-construct ((t (:foreground ,acme-purple :weight normal)))) - `(font-lock-regexp-grouping-backslash ((t (:foreground ,acme-purple :weight normal)))) - `(font-lock-warning-face ((t (:foreground ,acme-red :weight normal)))) - -;;;;; table - `(table-cell ((t (:background ,bg-alt)))) - -;;;;; ledger - `(ledger-font-directive-face ((t (:foreground ,acme-cyan)))) - `(ledger-font-periodic-xact-face ((t (:inherit ledger-font-directive-face)))) - `(ledger-font-posting-account-face ((t (:foreground ,acme-blue)))) - `(ledger-font-posting-amount-face ((t (:foreground ,acme-red)))) - `(ledger-font-posting-date-face ((t (:foreground ,acme-red :weight normal)))) - `(ledger-font-payee-uncleared-face ((t (:foreground ,acme-purple)))) - `(ledger-font-payee-cleared-face ((t (:foreground ,fg)))) - `(ledger-font-payee-pending-face ((t (:foreground ,acme-yellow)))) - `(ledger-font-xact-highlight-face ((t (:background ,bg-alt)))) - -;;;; Third-party - - -;;;;; anzu - `(anzu-mode-line ((t (:foreground ,acme-yellow :background ,acme-yellow-light :weight normal)))) - -;;;;; clojure-mode - `(clojure-interop-method-face ((t (:inherit font-lock-function-name-face)))) - -;;;;; clojure-test-mode - `(clojure-test-failure-face ((t (:foreground ,acme-red :weight normal :underline t)))) - `(clojure-test-error-face ((t (:foreground ,acme-red :weight normal :underline t)))) - `(clojure-test-success-face ((t (:foreground ,acme-green :weight normal :underline t)))) - -;;;;; diff - `(diff-added ((,class (:foreground ,fg :background ,acme-green-light)) - (t (:foreground ,fg :background ,acme-green-light)))) - `(diff-changed ((t (:foreground ,acme-yellow)))) - `(diff-context ((t (:foreground ,fg)))) - `(diff-removed ((,class (:foreground ,fg :background ,acme-red-light)) - (t (:foreground ,fg :background ,acme-red-light)))) - `(diff-refine-added ((t :inherit diff-added :background ,acme-green-light :weight bold :underline t))) - `(diff-refine-change ((t :inherit diff-changed :weight normal))) - `(diff-refine-removed ((t :inherit diff-removed :background ,acme-red-light :weight bold :underline t))) - `(diff-header ((,class (:foreground ,fg :weight normal)) - (t (:foreground ,acme-purple-light :weight normal)))) - `(diff-file-header ((,class (:foreground ,fg :background ,acme-cyan-light :weight normal)) - (t (:foreground ,fg :background ,acme-cyan-light :weight normal)))) - `(diff-hunk-header ((,class (:foreground ,acme-green :weight normal)) - (t (:foreground ,acme-green :weight normal)))) -;;;;; dired/dired+/dired-subtree - `(dired-directory ((t (:foreground ,acme-blue :weight bold)))) - `(diredp-display-msg ((t (:foreground ,acme-blue)))) - `(diredp-compressed-file-suffix ((t (:foreground ,acme-purple)))) - `(diredp-date-time ((t (:foreground ,acme-green)))) - `(diredp-deletion ((t (:foreground ,acme-red)))) - `(diredp-deletion-file-name ((t (:foreground ,acme-red)))) - `(diredp-dir-heading ((t (:foreground ,acme-blue :background ,acme-blue-light :weight bold)))) - `(diredp-dir-priv ((t (:foreground ,acme-blue)))) - `(diredp-exec-priv ((t (:foreground ,acme-yellow)))) - `(diredp-executable-tag ((t (:foreground ,acme-yellow)))) - `(diredp-file-name ((t (:foreground ,fg)))) - `(diredp-file-suffix ((t (:foreground ,acme-yellow)))) - `(diredp-flag-mark ((t (:foreground ,acme-cyan)))) - `(diredp-flag-mark-line ((t (:foreground ,acme-cyan)))) - `(diredp-ignored-file-name ((t (:foreground ,fg-light)))) - `(diredp-link-priv ((t (:foreground ,acme-purple)))) - `(diredp-mode-line-flagged ((t (:foreground ,acme-yellow)))) - `(diredp-mode-line-marked ((t (:foreground ,acme-yellow)))) - `(diredp-no-priv ((t (:foreground ,fg)))) - `(diredp-number ((t (:foreground ,acme-blue)))) - `(diredp-other-priv ((t (:foreground ,fg)))) - `(diredp-rare-priv ((t (:foreground ,fg)))) - `(diredp-read-priv ((t (:foreground ,fg)))) - `(diredp-symlink ((t (:foreground ,fg :background ,acme-blue-light)))) - `(diredp-write-priv ((t (:foreground ,fg)))) - `(diredp-dir-name ((t (:foreground ,acme-blue :weight bold)))) - `(dired-subtree-depth-1-face ((t (:background ,bg)))) - `(dired-subtree-depth-2-face ((t (:background ,bg)))) - `(dired-subtree-depth-3-face ((t (:background ,bg)))) - -;;;;; elfeed - `(elfeed-search-date-face ((t (:foreground ,acme-blue)))) - `(elfeed-search-title-face ((t (:foreground ,fg)))) - `(elfeed-search-unread-title-face ((t (:foreground ,fg)))) - `(elfeed-search-feed-face ((t (:foreground ,acme-green)))) - `(elfeed-search-tag-face ((t (:foreground ,acme-red)))) - `(elfeed-search-unread-count-face ((t (:foreground ,fg)))) - -;;;;; erc - `(erc-default-face ((t (:foreground ,fg)))) - `(erc-header-line ((t (:inherit header-line)))) - `(erc-action-face ((t (:inherit erc-default-face)))) - `(erc-bold-face ((t (:inherit erc-default-face :weight normal)))) - `(erc-underline-face ((t (:underline t)))) - `(erc-error-face ((t (:inherit font-lock-warning-face)))) - `(erc-prompt-face ((t (:foreground ,acme-green :background ,acme-green-light :weight normal)))) - `(erc-timestamp-face ((t (:foreground ,acme-green :background ,acme-green-light)))) - `(erc-direct-msg-face ((t (:inherit erc-default)))) - `(erc-notice-face ((t (:foreground ,fg-light)))) - `(erc-highlight-face ((t (:background ,highlight)))) - `(erc-input-face ((t (:foreground ,fg :background ,bg-alt)))) - `(erc-current-nick-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal - :box (:line-width 1 :style released-button))))) - `(erc-nick-default-face ((t (:weight normal :background ,bg-alt)))) - `(erc-my-nick-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal - :box (:line-width 1 :style released-button))))) - `(erc-nick-msg-face ((t (:inherit erc-default)))) - `(erc-fool-face ((t (:inherit erc-default)))) - `(erc-pal-face ((t (:foreground ,acme-purple :weight normal)))) - `(erc-dangerous-host-face ((t (:inherit font-lock-warning-face)))) - `(erc-keyword-face ((t (:foreground ,acme-yellow :weight normal)))) - - ;;;;; evil - `(evil-search-highlight-persist-highlight-face ((t (:inherit lazy-highlight)))) - -;;;;; flx - `(flx-highlight-face ((t (:foreground ,acme-yellow :background ,acme-green-light - :weight normal :underline t)))) - -;;;;; company - `(company-tooltip ((t (:background ,acme-blue-light)))) - `(company-tooltip-selection ((t (:background ,acme-cyan-light)))) - `(company-tooltip-common ((t (:foreground ,acme-blue :bold t)))) - `(company-tooltip-annotation ((t (:foreground ,acme-yellow :italic t)))) ; parameter hints etc. - `(company-scrollbar-fg ((t (:background ,acme-cyan)))) - `(company-scrollbar-bg ((t (:background ,acme-cyan-light)))) - `(company-preview-common ((t (:foreground ,fg :background ,acme-cyan-light)))) - -;;;;; highlight-symbol - `(highlight-symbol-face ((t (:background ,bg-alt)))) - -;;;;; highlight-numbers - `(highlight-numbers-number ((t (:foreground ,acme-blue)))) - -;;;;; highlight-operators - `(highlight-operators-face ((t (:foreground ,fg)))) - -;;;;; hl-todo - `(hl-todo ((t (:inverse-video t)))) - -;;;;; hl-line-mode - `(hl-line ((,class (:background ,bg-alt)))) - -;;;;; hl-sexp - `(hl-sexp-face ((,class (:background ,bg-alt)))) - -;;;;; ido-mode - `(ido-first-match ((t (:foreground ,fg :weight normal)))) - `(ido-only-match ((t (:foreground ,fg :weight normal)))) - `(ido-subdir ((t (:foreground ,acme-blue)))) - `(ido-indicator ((t (:foreground ,acme-yellow)))) - -;;;;; ido-vertical - `(ido-vertical-first-match-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal)))) - `(ido-vertical-only-match-face ((t (:foreground ,acme-red :background ,acme-red-light :weight normal)))) - `(ido-vertical-match-face ((t (:foreground ,fg :background ,acme-green-light - :weight normal :underline t)))) - -;;;;; indent-guide - `(indent-guide-face ((t (:foreground ,highlight)))) - -;;;;; ivy - `(ivy-current-match ((t (:background ,acme-blue-light :underline t :extend t)))) - `(ivy-minibuffer-match-face-1 ((t (:background ,bg-alt)))) - `(ivy-minibuffer-match-face-2 ((t (:background ,acme-cyan-light)))) - `(ivy-minibuffer-match-face-3 ((t (:background ,acme-purple-light)))) - `(ivy-minibuffer-match-face-3 ((t (:background ,acme-blue-light)))) - -;;;;; js2-mode - `(js2-warning ((t (:underline ,acme-yellow)))) - `(js2-error ((t (:foreground ,acme-red :weight normal)))) - `(js2-jsdoc-tag ((t (:foreground ,acme-purple)))) - `(js2-jsdoc-type ((t (:foreground ,acme-blue)))) - `(js2-jsdoc-value ((t (:foreground ,acme-cyan)))) - `(js2-function-param ((t (:foreground ,fg)))) - `(js2-external-variable ((t (:foreground ,acme-cyan)))) - -;;;;; linum-mode - `(linum ((t (:foreground ,fg-light)))) - -;;;;; lsp-mode - `(lsp-face-highlight-textual ((t (:background ,bg-dark)))) - `(lsp-face-highlight-read ((t (:background ,acme-purple-light)))) - `(lsp-face-highlight-write ((t (:background ,acme-green-light)))) - -;;;;; magit - `(magit-section-heading ((t (:foreground ,acme-cyan :background ,acme-blue-light - :weight normal :underline t)))) - `(magit-section-highlight ((t (:background ,bg-alt)))) - `(magit-section-heading-selection ((t (:background ,highlight)))) - `(magit-filename ((t (:foreground ,fg)))) - `(magit-hash ((t (:foreground ,acme-yellow :weight normal)))) - `(magit-tag ((t (:foreground ,acme-purple :weight normal)))) - `(magit-refname ((t (:foreground ,acme-purple :weight normal)))) - `(magit-head ((t (:foreground ,acme-green :weight normal)))) - `(magit-branch-local ((t (:foreground ,acme-blue :background ,acme-blue-light - :weight normal)))) - `(magit-branch-remote ((t (:foreground ,acme-green :background ,acme-green-light - :weight normal)))) - `(magit-branch-current ((t (:foreground ,acme-cyan :background ,acme-cyan-light - :weight normal - :box (:line-width 1 :color ,acme-cyan))))) - `(magit-diff-file-heading ((t (:foreground ,fg :weight normal)))) - `(magit-diff-file-heading-highlight ((t (:background ,bg-alt)))) - `(magit-diff-file-heading-selection ((t (:foreground ,acme-red :background ,highlight)))) - `(magit-diff-hunk-heading ((t (:foreground ,acme-blue :background ,acme-blue-light :weight normal :underline t)))) - `(magit-diff-hunk-heading-highlight ((t (:background ,acme-cyan-light)))) - `(magit-diff-added ((t (:foreground ,acme-green :background ,acme-green-light)))) - `(magit-diff-removed ((t (:foreground ,acme-red :background ,acme-red-light)))) - `(magit-diff-context ((t (:foreground ,fg-dark :background nil)))) - `(magit-diff-added-highlight ((t (:foreground ,acme-green :background ,acme-green-light)))) - `(magit-diff-removed-highlight ((t (:foreground ,acme-red :background ,acme-red-light)))) - `(magit-diff-context-highlight ((t (:foreground ,fg-dark :background ,bg-alt)))) - `(magit-diffstat-added ((t (:foreground ,acme-green :background ,acme-green-light :weight normal)))) - `(magit-diffstat-removed ((t (:foreground ,acme-red :background ,acme-red-light :weight normal)))) - `(magit-log-author ((t (:foreground ,acme-blue :weight normal)))) - `(magit-log-date ((t (:foreground ,acme-purple :weight normal)))) - `(magit-log-graph ((t (:foreground ,acme-red :weight normal)))) - `(magit-blame-heading ((t (:foreground ,fg-dark :background ,bg-alt)))) - -;;;;; paren-face - `(parenthesis ((t (:foreground "#CCCCB7")))) - -;;;;; project-explorer - `(pe/file-face ((t (:foreground ,fg)))) - `(pe/directory-face ((t (:foreground ,acme-blue :weight normal)))) - -;;;;; rainbow-delimiters - `(rainbow-delimiters-depth-1-face ((t (:foreground ,acme-green)))) - `(rainbow-delimiters-depth-2-face ((t (:foreground ,acme-blue)))) - `(rainbow-delimiters-depth-3-face ((t (:foreground ,acme-red)))) - -;;;;; show-paren - `(show-paren-mismatch ((t (:foreground ,acme-yellow :background ,acme-red :weight normal)))) - `(show-paren-match ((t (:foreground ,fg :background ,acme-cyan-light :weight normal)))) - -;;;;; mode-line/sml-mode-line - `(mode-line ((,class (:foreground ,fg :background ,acme-blue-light :box t)))) - `(mode-line-inactive ((t (:foreground ,fg :background ,bg-dark :box t)))) - `(mode-line-buffer-id ((t (:foreground ,fg :weight bold)))) ; associated buffer/file name - `(sml/global ((t (:foreground ,fg)))) - `(sml/modes ((t (:foreground ,acme-green :background ,acme-green-light)))) - `(sml/filename ((t (:foreground ,acme-red)))) - `(sml/folder ((t (:foreground ,fg)))) - `(sml/prefix ((t (:foreground ,fg)))) - `(sml/read-only ((t (:foreground ,fg)))) - `(sml/modified ((t (:foreground ,acme-red :weight normal)))) - `(sml/outside-modified ((t (:background ,acme-red :foreground ,acme-red-light :weight normal)))) - `(sml/line-number ((t (:foreground ,fg :weight normal)))) - `(sml/col-number ((t (:foreground ,fg :weight normal)))) - `(sml/vc ((t (:foreground ,fg :weight normal)))) - `(sml/vc-edited ((t (:foreground ,acme-red :weight normal)))) - `(sml/git ((t (:foreground ,fg :weight normal)))) - -;;;;; sh - `(sh-heredoc-face ((t (:foreground ,acme-purple)))) - -;;;;; web-mode - `(web-mode-builtin-face ((t (:inherit ,font-lock-builtin-face)))) - `(web-mode-comment-face ((t (:inherit ,font-lock-comment-face)))) - `(web-mode-constant-face ((t (:inherit ,font-lock-constant-face)))) - `(web-mode-doctype-face ((t (:inherit ,font-lock-comment-face)))) - `(web-mode-folded-face ((t (:underline t)))) - `(web-mode-function-name-face ((t (:foreground ,fg :weight normal)))) - `(web-mode-html-attr-name-face ((t (:foreground ,fg)))) - `(web-mode-html-attr-value-face ((t (:inherit ,font-lock-string-face)))) - `(web-mode-html-tag-face ((t (:foreground ,acme-blue)))) - `(web-mode-keyword-face ((t (:inherit ,font-lock-keyword-face)))) - `(web-mode-preprocessor-face ((t (:inherit ,font-lock-preprocessor-face)))) - `(web-mode-string-face ((t (:inherit ,font-lock-string-face)))) - `(web-mode-type-face ((t (:inherit ,font-lock-type-face)))) - `(web-mode-variable-name-face ((t (:inherit ,font-lock-variable-name-face)))) - `(web-mode-server-background-face ((t (:background ,acme-green-light)))) - `(web-mode-server-comment-face ((t (:inherit web-mode-comment-face)))) - `(web-mode-server-string-face ((t (:foreground ,acme-red)))) - `(web-mode-symbol-face ((t (:inherit font-lock-constant-face)))) - `(web-mode-warning-face ((t (:inherit font-lock-warning-face)))) - `(web-mode-whitespaces-face ((t (:background ,acme-red-light)))) - `(web-mode-block-face ((t (:background ,acme-green-light)))) - `(web-mode-current-element-highlight-face ((t (:foreground ,fg :background ,acme-blue-light)))) - `(web-mode-json-key-face ((,class (:inherit font-lock-string-face)))) - `(web-mode-json-context-face ((,class (:inherit font-lock-string-face :bold t)))) - -;;;;; which-func-mode - `(which-func ((t (:foreground ,acme-purple :background ,acme-purple-light)))) - -;;;;; yascroll - `(yascroll:thumb-text-area ((t (:background ,highlight)))) - `(yascroll:thumb-fringe ((t (:background ,bg :foreground ,bg - :box (:line-width 1 :style released-button))))) - -;;;;; Org - `(org-level-1 ((t (:background ,acme-blue-light :foreground ,acme-blue :weight bold :overline t)))) - `(org-level-2 ((t (:background ,acme-blue-light :foreground ,acme-cyan :weight bold :overline t)))) - `(org-level-3 ((t (:background ,acme-blue-light :foreground ,acme-blue :weight bold :overline t)))) - `(org-level-4 ((t (:background ,acme-blue-light :foreground ,acme-cyan)))) - `(org-level-5 ((t (:background ,acme-blue-light :foreground ,acme-blue)))) - `(org-level-6 ((t (:background ,acme-blue-light :foreground ,acme-cyan)))) - `(org-level-7 ((t (:background ,acme-blue-light :foreground ,acme-blue)))) - `(org-level-8 ((t (:background ,acme-blue-light :foreground ,acme-cyan)))) - `(org-document-title ((t (:height 1.2 :foreground ,acme-blue :weight bold :underline t)))) ; #TITLE - `(org-meta-line ((t (:foreground ,acme-green)))) - `(org-document-info ((t (:foreground ,acme-cyan :weight normal)))) - `(org-document-info-keyword ((t (:foreground ,acme-cyan)))) - `(org-todo ((t (:foreground ,acme-yellow :background ,bg-alt :weight normal :box (:line-width 1 :style released-button))))) - `(org-done ((t (:foreground ,acme-green :background ,acme-green-light :weight normal :box (:style released-button))))) - `(org-date ((t (:foreground ,acme-purple)))) - `(org-table ((t (:foreground ,acme-purple)))) - `(org-formula ((t (:foreground ,acme-blue :background ,bg-alt)))) - `(org-code ((t (:foreground ,acme-red :background ,bg-alt)))) - `(org-verbatim ((t (:foreground ,fg :background ,bg-alt :underline t)))) - `(org-special-keyword ((t (:foreground ,acme-cyan)))) - `(org-agenda-date ((t (:foreground ,acme-cyan)))) - `(org-agenda-structure ((t (:foreground ,acme-purple)))) - `(org-block ((t (:foreground ,fg :background ,bg-alt :extend t)))) - `(org-block-background ((t (:background ,bg-alt :extend t)))) - `(org-block-begin-line ((t (:foreground ,fg-alt :background ,bg-dark :italic t :extend t)))) - `(org-block-end-line ((t (:foreground ,fg-alt :background ,bg-dark :italic t :extend t)))) - -;;;;; origami - `(origami-fold-replacement-face ((t (:foreground ,acme-red :background ,acme-red-light - :box (:line-width -1))))) - -;;;;; git-gutter - `(git-gutter:added ((t (:background ,acme-green-alt :foreground ,acme-green-alt :weight normal)))) - `(git-gutter:deleted ((t (:background ,acme-red :foreground ,acme-red :weight normal)))) - `(git-gutter:modified ((t (:background ,acme-yellow :foreground ,acme-yellow :weight normal)))) - `(git-gutter-fr:added ((t (:background ,acme-green-alt :foreground ,acme-green-alt :weight normal)))) - `(git-gutter-fr:deleted ((t (:background ,acme-red :foreground ,acme-red :weight normal)))) - `(git-gutter-fr:modified ((t (:background ,acme-yellow :foreground ,acme-yellow :weight normal)))) - -;;;;; diff-hl - `(diff-hl-insert ((t (:background ,acme-green-alt :foreground ,acme-green-alt)))) - `(diff-hl-delete ((t (:background ,acme-red :foreground ,acme-red)))) - `(diff-hl-change ((t (:background ,acme-yellow :foreground ,acme-yellow)))) - -;;;;; mu4e, mail - `(mu4e-header-highlight-face ((t (:background ,highlight)))) - `(mu4e-unread-face ((t (:foreground ,acme-blue :weight normal)))) - `(mu4e-flagged-face ((t (:foreground ,acme-red :background ,acme-red-light :weight normal)))) - `(mu4e-compose-separator-face ((t (:foreground ,acme-green)))) - `(mu4e-header-value-face ((t (:foreground ,fg)))) - `(message-header-name ((t (:foreground ,acme-purple :weight normal)))) - `(message-header-to ((t (:foreground ,acme-blue)))) - `(message-header-subject ((t (:foreground ,acme-blue)))) - `(message-header-other ((t (:foreground ,acme-blue)))) - `(message-cited-text ((t (:inherit font-lock-comment-face)))) - -;;;;; term-mode (vterm too) - `(term ((,class (:foreground ,fg :background ,bg)))) - `(term-color-black ((,class (:foreground ,fg :background ,fg)))) - `(term-color-blue ((,class (:foreground ,acme-blue :background ,acme-blue)))) - `(term-color-red ((,class (:foreground ,acme-red :background ,acme-red)))) - `(term-color-green ((,class (:foreground ,acme-green :background ,acme-green)))) - `(term-color-yellow ((,class (:foreground ,acme-yellow :background ,acme-yellow)))) - `(term-color-magenta ((,class (:foreground ,acme-purple :background ,acme-purple)))) - `(term-color-cyan ((,class (:foreground ,acme-cyan :background ,acme-cyan)))) - `(term-color-white ((,class (:foreground ,fg :background ,fg)))) - -;;;;; fill-column-indicator - `(fci-rule-color ((t (:foreground ,highlight-alt)))) - `(fill-column-indicator ((t (:foreground ,highlight-alt)))))) - -;;;###autoload -(when (and (boundp 'custom-theme-load-path) load-file-name) - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'acme) -(provide 'acme-theme) - -;;; acme-theme.el ends here diff --git a/.emacs.d/themes/bedroom-theme.el b/.emacs.d/themes/bedroom-theme.el index d3fef58..ecd4fff 100644 --- a/.emacs.d/themes/bedroom-theme.el +++ b/.emacs.d/themes/bedroom-theme.el @@ -11,18 +11,18 @@ (custom-theme-set-faces 'bedroom ;; Basic faces - '(default ((t (:foreground "#DADEE5" :background "#141B2B")))) + '(default ((t (:foreground "#DADEE5" :background "#142B29")))) '(cursor ((t (:background "lightgreen")))) - '(region ((t (:background "#15285A")))) + '(region ((t (:background "#1F4A3A")))) '(hl-line ((t (:background "#000000")))) - '(highlight ((t (:background "#15285A")))) - '(mode-line ((t (:background "#1E3050" :foreground "#DADEE5")))) - '(mode-line-inactive ((t (:background "#182438" :foreground "#6A7A8A")))) + '(highlight ((t (:background "#1F4A3A")))) + '(mode-line ((t (:background "#1E4A3A" :foreground "#DADEE5")))) + '(mode-line-inactive ((t (:background "#183524" :foreground "#6A8A7A")))) '(vertical-border ((t (:foreground "#505050")))) - '(fringe ((t (:background "#141B2B")))) - '(window-divider ((t (:foreground "#3A4255")))) - '(window-divider-first-pixel ((t (:foreground "#141B2B")))) - '(window-divider-last-pixel ((t (:foreground "#3A4255")))) + '(fringe ((t (:background "#142B29")))) + '(window-divider ((t (:foreground "#3A5542")))) + '(window-divider-first-pixel ((t (:foreground "#142B29")))) + '(window-divider-last-pixel ((t (:foreground "#3A5542")))) '(tab-line ((t (:background "#505050" :foreground "#DADEE5")))) '(tab-line-tab ((t (:background "#505050" :foreground "#DADEE5")))) '(tab-line-tab-current ((t (:background "#505050" :foreground "#DADEE5")))) @@ -40,12 +40,12 @@ '(font-lock-warning-face ((t (:foreground "#FC2D07")))) ;; Dired - '(dired-directory ((t (:foreground "#5FAFD7" :weight bold)))) + '(dired-directory ((t (:foreground "#5FD7AF" :weight bold)))) '(dired-symlink ((t (:foreground "#87919D")))) ;; Custom/widget faces - '(custom-group-tag ((t (:underline t :foreground "lightblue")))) - '(custom-variable-tag ((t (:underline t :foreground "lightblue")))) + '(custom-group-tag ((t (:underline t :foreground "lightgreen")))) + '(custom-variable-tag ((t (:underline t :foreground "lightgreen")))) '(widget-field ((t (:foreground "white")))) '(widget-single-line-field ((t (:background "darkgray"))))) diff --git a/.emacs.d/themes/classic-theme.el b/.emacs.d/themes/classic-theme.el new file mode 100644 index 0000000..9b4bc4e --- /dev/null +++ b/.emacs.d/themes/classic-theme.el @@ -0,0 +1,208 @@ +;;; classic-theme.el --- classic theme + +;; Copyright (C) 2000 by Frederic Giroud +;; Copyright (C) 2013 by Syohei YOSHIDA + +;; Author: Syohei YOSHIDA +;; URL: https://github.com/emacs-jp/replace-colorthemes +;; Version: 0.01 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: +;; +;; Port of classic theme from `color-themes' + +;;; Code: + +(deftheme classic + "classic theme") + +(custom-theme-set-faces + 'classic + + '(default ((t (:background "darkslategrey" :foreground "AntiqueWhite")))) + ;; avoid ugly random fringe color + '(fringe ((t (:background "darkslategrey")))) + + '(mouse ((t (:foreground "Grey")))) + '(cursor ((t (:background "Red")))) + '(border ((t (:foreground "black")))) + + '(gnus-cite-attribution-face ((t (:lforeground "lemon chiffon" :bold t)))) + '(gnus-cite-face-1 ((t (:foreground "LightSalmon")))) + '(gnus-cite-face-2 ((t (:foreground "Khaki")))) + '(gnus-cite-face-3 ((t (:foreground "Coral")))) + '(gnus-cite-face-4 ((t (:foreground "yellow green")))) + '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) + '(gnus-cite-face-6 ((t (:foreground "bisque")))) + '(gnus-cite-face-7 ((t (:foreground "peru")))) + '(gnus-cite-face-8 ((t (:foreground "light coral")))) + '(gnus-cite-face-9 ((t (:foreground "plum")))) + '(gnus-emphasis-bold ((t (:bold t)))) + '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + '(gnus-emphasis-italic ((t (:italic t)))) + '(gnus-emphasis-underline ((t (:underline t)))) + '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) + '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) + '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) + '(gnus-group-mail-1-empty-face ((t (:foreground "White")))) + '(gnus-group-mail-1-face ((t (:bold t :foreground "White")))) + '(gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) + '(gnus-group-mail-2-face ((t (:bold t :foreground "light cyan")))) + '(gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) + '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) + '(gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) + '(gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine")))) + '(gnus-group-news-1-empty-face ((t (:foreground "White")))) + '(gnus-group-news-1-face ((t (:bold t :foreground "White")))) + '(gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) + '(gnus-group-news-2-face ((t (:bold t :foreground "light cyan")))) + '(gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) + '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) + '(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) + '(gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine")))) + '(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) + '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) + '(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) + '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) + '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) + '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) + '(gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) + '(gnus-header-from-face ((t (:bold t :foreground "light cyan")))) + '(gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) + '(gnus-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) + '(gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) + '(gnus-signature-face ((t (:foreground "Grey")))) + '(gnus-splash-face ((t (:foreground "ForestGreen")))) + '(gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) + '(gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine")))) + '(gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine")))) + '(gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon")))) + '(gnus-summary-high-unread-face ((t (:bold t :foreground "beige")))) + '(gnus-summary-low-ancient-face ((t (:foreground "DimGray")))) + '(gnus-summary-low-read-face ((t (:foreground "slate gray")))) + '(gnus-summary-low-ticked-face ((t (:foreground "Pink")))) + '(gnus-summary-low-unread-face ((t (:foreground "LightGray")))) + '(gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) + '(gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) + '(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) + '(gnus-summary-normal-unread-face ((t (nil)))) + '(gnus-summary-selected-face ((t (:background "DarkSlateBlue")))) + '(message-cited-text-face ((t (:foreground "LightSalmon")))) + '(message-header-cc-face ((t (:foreground "light cyan")))) + '(message-header-name-face ((t (:foreground "LightBlue")))) + '(message-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) + '(message-header-other-face ((t (:foreground "MediumAquamarine")))) + '(message-header-subject-face ((t (:bold t :foreground "light cyan")))) + '(message-header-to-face ((t (:bold t :foreground "light cyan")))) + '(message-header-xheader-face ((t (:foreground "MediumAquamarine")))) + '(message-separator-face ((t (:foreground "chocolate")))) + + '(apropos-keybinding-face ((t (:underline t)))) + '(apropos-label-face ((t (:italic t)))) + '(apropos-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) + '(apropos-property-face ((t (:italic t :bold t :foreground "beige")))) + '(apropos-symbol-face ((t (:underline t :foreground "DodgerBlue1")))) + '(goto-address-mail-face ((t (:bold t :foreground "light cyan")))) + '(goto-address-mail-mouse-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) + '(goto-address-url-face ((t (:underline t :foreground "DodgerBlue1")))) + '(goto-address-url-mouse-face ((t (:background "PaleGreen" :foreground "DarkGreen")))) + '(list-matching-lines-face ((t (:bold t)))) + '(view-highlight-face ((t (:background "PaleGreen" :foreground "DarkGreen")))) + + '(bold ((t (:bold t)))) + '(bold-italic ((t (:italic t :bold t :foreground "beige")))) + '(calendar-today-face ((t (:underline t)))) + '(cperl-array-face ((t (:foreground "Yellow")))) + '(cperl-hash-face ((t (:foreground "White")))) + '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) + '(custom-button-face ((t (:underline t :foreground "MediumSlateBlue")))) + '(custom-documentation-face ((t (:foreground "Grey")))) + '(custom-group-tag-face ((t (:foreground "MediumAquamarine")))) + '(custom-state-face ((t (:foreground "LightSalmon")))) + '(custom-variable-tag-face ((t (:foreground "Aquamarine")))) + '(diary-face ((t (:foreground "IndianRed")))) + '(erc-action-face ((t (:bold t)))) + '(erc-bold-face ((t (:bold t)))) + '(erc-default-face ((t (nil)))) + '(erc-direct-msg-face ((t (:foreground "LightSalmon")))) + '(erc-error-face ((t (:bold t :foreground "IndianRed")))) + '(erc-input-face ((t (:foreground "Beige")))) + '(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) + '(erc-notice-face ((t (:foreground "MediumAquamarine")))) + '(erc-pal-face ((t (:foreground "pale green")))) + '(erc-prompt-face ((t (:foreground "MediumAquamarine")))) + '(erc-underline-face ((t (:underline t)))) + '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) + '(eshell-ls-backup-face ((t (:foreground "Grey")))) + '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) + '(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) + '(eshell-ls-executable-face ((t (:foreground "Coral")))) + '(eshell-ls-missing-face ((t (:foreground "black")))) + '(eshell-ls-picture-face ((t (:foreground "Violet")))) + '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) + '(eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) + '(eshell-ls-special-face ((t (:foreground "Gold")))) + '(eshell-ls-symlink-face ((t (:foreground "White")))) + '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + '(eshell-prompt-face ((t (:foreground "MediumAquamarine")))) + '(font-lock-builtin-face ((t (:bold t :foreground "PaleGreen")))) + '(font-lock-comment-face ((t (:foreground "tomato3")))) + '(font-lock-constant-face ((t (:foreground "Aquamarine")))) + '(font-lock-doc-string-face ((t (:foreground "LightSalmon3")))) + '(font-lock-function-name-face ((t (:foreground "SteelBlue1")))) + '(font-lock-keyword-face ((t (:foreground "cyan1")))) + '(font-lock-reference-face ((t (:foreground "LightSalmon2")))) + '(font-lock-string-face ((t (:foreground "LightSalmon3")))) + '(font-lock-type-face ((t (:foreground "PaleGreen3")))) + '(font-lock-variable-name-face ((t (:foreground "khaki1")))) + '(font-lock-warning-face ((t (:bold t :foreground "IndianRed")))) + '(font-lock-preprocessor-face ((t (:foreground "SkyBlue3")))) + '(widget-field-face ((t (:background "DarkCyan")))) + '(custom-group-tag-face ((t(:foreground "brown" :underline t)))) + '(custom-state-face ((t (:foreground "khaki")))) + '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) + '(highline-face ((t (:background "SeaGreen")))) + '(holiday-face ((t (:background "DimGray")))) + '(info-menu-5 ((t (:underline t)))) + '(info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) + '(info-xref ((t (:underline t :foreground "DodgerBlue1")))) + '(isearch ((t (:foreground "red" :background "CornflowerBlue")))) + '(italic ((t (:italic t)))) + '(mode-line ((t (:background "LightSlateGray" :foreground "AntiqueWhite")))) + '(mode-line-buffer-id ((t (:background "LightSlateGray" :foreground "DarkBlue")))) + '(mode-line-mousable ((t (:background "LightSlateGray" :foreground "firebrick")))) + '(mode-line-mousable-minor-mode ((t (:background "LightSlateGray" :foreground "wheat")))) + '(region ((t (:background "dark cyan" :foreground "cyan")))) + '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) + '(show-paren-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) + '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) + '(underline ((t (:underline t)))) + '(widget-field-face ((t (:foreground "LightBlue")))) + '(widget-inactive-face ((t (:foreground "DimGray")))) + '(widget-single-line-field-face ((t (:foreground "LightBlue")))) + '(woman-bold-face ((t (:bold t)))) + '(woman-italic-face ((t (:foreground "beige")))) + '(woman-unknown-face ((t (:foreground "LightSalmon"))))) + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'classic) + +;;; classic-theme.el ends here diff --git a/.emacs.d/themes/cobalt-theme.el b/.emacs.d/themes/cobalt-theme.el new file mode 100644 index 0000000..bd243c8 --- /dev/null +++ b/.emacs.d/themes/cobalt-theme.el @@ -0,0 +1,82 @@ +;;; cobalt-theme.el --- cobalt theme + +;; Copyright (C) 2012 by Nick Ewing +;; Copyright (C) 2014 by Syohei YOSHIDA + +;; Author: Nick Ewing +;; URL: https://github.com/emacs-jp/replace-colorthemes +;; Version: 0.01 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: +;; +;; Port of cobalt theme from `color-themes' + +;;; Code: + +(deftheme cobalt + "cobalt theme") + +(custom-theme-set-faces + 'cobalt + + '(default ((t (:background "#09223F" :foreground "#F8F8F8")))) + '(cursor ((t (:background "#A7A7A7")))) + '(border ((t (:foreground "black")))) + + '(buffers-tab ((t (:background "#09223F" :foreground "white")))) + '(font-lock-builtin-face ((t (:foreground "#40FFB9")))) + '(font-lock-comment-face ((t (:foreground "#008AFF")))) + '(font-lock-constant-face ((t (:foreground "#FF518C")))) + '(font-lock-doc-face ((t (:foreground "#008AFF")))) + '(font-lock-function-name-face ((t (:foreground "#FFDD00")))) + '(font-lock-keyword-face ((t (:foreground "#FA9E18")))) + '(font-lock-preprocessor-face ((t (:foreground "#8090A2")))) + '(font-lock-reference-face ((t (:foreground "#CCCCCC")))) + '(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062")))) + '(font-lock-regexp-grouping-construct ((t (:foreground "red")))) + '(font-lock-string-face ((t (:foreground "#42D915")))) + '(font-lock-type-face ((t (:foreground "#FFEF79")))) + '(font-lock-variable-name-face ((t (:foreground "#CCCCCC")))) + '(font-lock-warning-face ((t (:foreground "Pink")))) + '(hl-line ((t (:background "#00162A")))) + '(linum ((t (:background "#111111" :foreground "#888888" + :underline nil)))) + '(gui-element ((t (:background "#303030" :foreground "black")))) + '(region ((t (:background "#444444")))) + '(highlight ((t (:background "#26425D")))) + '(show-paren-match ((t (:background "#26425D")))) + '(show-paren-mismatch ((t (:background "#FF0000")))) + '(ecb-default-highlight-face ((t (:background "#26425D")))) + '(minibuffer-prompt ((t (:foreground "#008AFF")))) + '(mode-line ((t (:background "#111111" :foreground "#888888")))) + '(modeline-inactive ((t (:background "#222222" :foreground "#888888")))) + '(italic ((t (nil)))) + '(left-margin ((t (nil)))) + '(toolbar ((t (nil)))) + '(ido-subdir ((t (:foreground "#008AFF")))) + '(ido-only-match ((t (:foreground "#42D915")))) + '(mumamo-background-chunk-major ((t (:background nil)))) + '(mumamo-background-chunk-submode1 ((t (:background nil)))) + '(underline ((nil (:underline nil))))) + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'cobalt) + +;;; cobalt-theme.el ends here diff --git a/.emacs.d/themes/eclipse-theme.el b/.emacs.d/themes/eclipse-theme.el new file mode 100644 index 0000000..536f962 --- /dev/null +++ b/.emacs.d/themes/eclipse-theme.el @@ -0,0 +1,158 @@ +;;; eclipse-theme.el --- Theme based on Eclipse circa 2010 + +;; Copyright (C) 2015 Oleh Krehel + +;; Author: Oleh Krehel +;; URL: https://github.com/abo-abo/eclipse-theme +;; Version: 0.1.0 +;; Keywords: themes + +;; This file is not part of GNU Emacs + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; For a full copy of the GNU General Public License +;; see . + +;;; Commentary: +;; +;; This theme assumes light background. To load it, use: +;; +;; (require 'eclipse-theme) + +;;; Code: + +(deftheme eclipse + "Color theme from Eclipse.") + +(let ((class '((class color) (min-colors 88) (background light))) + (eclipse-bg "#ffffff") + (eclipse-fg "#000000") + (eclipse-const "#110099") + (eclipse-comment "#3F7F5F") + (eclipse-error "#FF0000") + (eclipse-builtin "#7F0055") + (eclipse-string "#2A00FF") + (eclipse-blue-3 "#758BC6") + (eclipse-region "#f9b593") + (eclipse-shadow "grey50")) + (apply 'custom-theme-set-faces 'eclipse + (mapcar + (lambda (x) `(,(car x) ((,class ,(cdr x))))) + `((default :foreground ,eclipse-fg :background ,eclipse-bg) + (cursor :background ,eclipse-fg) + (shadow :foreground ,eclipse-shadow) + (success :foreground ,eclipse-error) + (error :foreground ,eclipse-error :weight bold) + (warning :foreground "DarkOrange" :weight bold) + (compilation-warning :underline t :inherit warning) + (compilation-error :underline t :inherit error) + (compilation-info :underline t :foreground ,eclipse-const) + (highlight :background "darkseagreen2") + (fringe :background ,eclipse-bg) + (region :background ,eclipse-region :foreground ,eclipse-bg :extend t) + (secondary-selection :background "#333366" :foreground "#f6f3e8") + (whitespace-indentation :background "LightYellow" :foreground "lightgray") + (term) + ;; (font-lock-negation-char-face :foreground "#e8e2b7") + (font-lock-builtin-face :foreground ,eclipse-builtin :bold t) + (font-lock-comment-face :foreground ,eclipse-comment :slant normal) + (font-lock-comment-delimiter-face :foreground ,eclipse-comment :slant normal) + (font-lock-constant-face :foreground ,eclipse-const) + (font-lock-doc-face :foreground ,eclipse-string) + (font-lock-doc-string-face :foreground ,eclipse-string) + (font-lock-function-name-face :foreground ,eclipse-fg :bold t) + (font-lock-keyword-face :foreground ,eclipse-builtin :weight bold) + (font-lock-preprocessor-face :foreground ,eclipse-builtin :bold t) + (font-lock-regexp-grouping-backslash :foreground ,eclipse-builtin) + (font-lock-regexp-grouping-construct :foreground ,eclipse-builtin) + (font-lock-string-face :foreground ,eclipse-string) + (font-lock-type-face :foreground ,eclipse-fg :underline t :slant italic) + (font-lock-variable-name-face :foreground ,eclipse-fg) + (font-lock-warning-face :foreground ,eclipse-error) + (font-lock-doxygen-face :foreground "SaddleBrown" :background "#f7f7f7") + (org-code :foreground ,eclipse-builtin :weight bold) + (org-verbatim :foreground ,eclipse-const) + (org-level-1 :weight bold :foreground "black") + (org-level-2 :foreground ,eclipse-builtin) + (org-level-3 :foreground "#123555") + (org-level-4 :slant normal :foreground "#E3258D") + (org-level-5 :slant normal :foreground "#0077CC") + (org-level-6 :slant italic :foreground "#EA6300") + (org-level-7 :slant italic :foreground "#2EAE2C") + (org-level-8 :slant italic :foreground "#FD8008") + (org-block-begin-line :foreground ,eclipse-const) + (org-block-end-line :foreground ,eclipse-const) + (org-scheduled-previously :foreground ,eclipse-comment) + (ido-subdir :weight bold) + (mode-line :foreground "black" :background "#f9b593" :box nil) + (mode-line-inactive :foreground "grey20" :background "grey90" :box nil) + (minibuffer-prompt :foreground "medium blue") + (hl-line :background "#e5e4e2" :extend t) + ;; defaults + (mode-line-buffer-id) + (show-paren-match :background "turquoise") + (isearch :background "magenta3" :foreground "lightskyblue1") + (link :foreground "RoyalBlue3" :underline t) + ;; other packages + (helm-locate-finish :foreground ,eclipse-const) + (aw-mode-line-face :foreground ,eclipse-string) + (swiper-match-face-1 :background "#FEEA89") + (swiper-match-face-2 :background "#fb7905") + (swiper-match-face-3 :background "#F9A35A") + (swiper-match-face-4 :background "#F15C79") + (swiper-line-face :background "#f3d3d3") + (hydra-face-red :foreground "#cc0000" :bold t) + (hydra-face-blue :foreground "RoyalBlue3" :bold t) + (powerline-active1 :background "grey22" :foreground "white" :inherit mode-line) + (powerline-active2 :background "grey40" :foreground "white" :inherit mode-line) + (powerline-inactive1 :background "grey22" :foreground "white" :inherit mode-line-inactive) + (powerline-inactive2 :background "grey40" :foreground "white" :inherit mode-line-inactive) + (diff-added :background "#ddffdd") + (diff-removed :background "#ffdddd") + (magit-tag :background "LemonChiffon1" :foreground "goldenrod4") + (magit-section-heading :inherit header-line) + (magit-section-highlight :weight bold) + (magit-diff-context :foreground "grey20" :extend t) + (magit-diff-context-highlight :weight bold :foreground "grey20" :extend t) + (magit-diff-added :inherit diff-added :extend t) + (magit-diff-added-highlight :inherit diff-added :weight bold :extend t) + (magit-diff-removed :inherit diff-removed :extend t) + (magit-diff-removed-highlight :inherit diff-removed :weight bold :extend t) + (magit-diff-file-heading) + (magit-diff-file-heading-highlight :weight bold) + (magit-diff-file-heading-selection :foreground "red") + (magit-diff-hunk-heading :inherit diff-hunk-header :extend t) + (magit-diff-hunk-heading-highlight :inherit diff-hunk-header :weight bold :extend t) + (magit-hash :foreground "firebrick") + (magit-branch-remote :background "Grey85" :foreground "OliveDrab4" :box t) + (magit-branch-local :background "Grey85" :foreground "LightSkyBlue4" :box t) + (mu4e-modeline-face :foreground "white") + (ivy-highlight-face) + (ivy-posframe :background "#eeeeee" :foreground "#000000") + (wgrep-face :foreground ,eclipse-comment) + (cider-instrumented-face))))) + +(custom-theme-set-variables + 'eclipse + '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" + "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])) + +;;;###autoload +(and load-file-name + (boundp 'custom-theme-load-path) + (add-to-list 'custom-theme-load-path + (file-name-as-directory + (file-name-directory load-file-name)))) + +(provide 'eclipse-theme) + +;;; eclipse-theme.el ends here diff --git a/.emacs.d/themes/jetbrains-darcula-theme.el b/.emacs.d/themes/jetbrains-darcula-theme.el new file mode 100644 index 0000000..1b2e3f4 --- /dev/null +++ b/.emacs.d/themes/jetbrains-darcula-theme.el @@ -0,0 +1,438 @@ +;;; jetbrains-darcula-theme.el --- A complete port of the default JetBrains Darcula theme -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 , Ian Y.E. Pan + +;; Author: Ian Y.E. Pan +;; URL: https://github.com/ianpan870102/jetbrains-darcula-emacs-theme +;; Version: 1.0.0 + +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;; This file is not part of Emacs. + +;;; Commentary: +;; A complete port of the default JetBrains Darcula theme for Emacs + +;;; Code: + +(deftheme jetbrains-darcula) +(let ((class '((class color) (min-colors 89))) + (fg0 "#8997a6") + (fg1 "#a9b7c6") ; default fg + (fg2 "#cccccc") + (fg3 "#e8e8e8") + (fg4 "#fafafa") + (bg0 "#111111") + (bg1 "#2b2b2b") ; default bg + (bg2 "#303030") + (bg3 "#313335") ; hl-line + (bg4 "#383c3f") + (bg5 "#515757") ; tab-bar active tab + (bg-hl "#214283") + (jb-r "#ac0909") + (jb-g "#36a546") + (jb-y "#f1eb7f") + (key2 "#c57825") + (key3 "#d0d0ff") + (accent "#ffffff") + (mode-line-bg "#3c3f41") + (mode-line-bg-dark "#2c2f31") + (line-num "#606366") + (builtin "#c57825") + (keyword "#c57825") + (const "#9676ac") + (comment "#8e9292") + (doc "#5e8759") + (func "#ffc66d") + (str "#5e8759") + (type "#c57825") + (var "#9676ac") + (warning "#990000") + + ;; standardized palette + (jb-yellow "#ffc66d") + (jb-bluegreen "#318495") + (jb-magenta "#9676ac") + (jb-orange "#c57825") + (jb-red "#8c0909") + (jb-blue "#7ca8c6") + (jb-green "#5e8759")) + + + (custom-theme-set-faces + 'jetbrains-darcula + `(default ((,class (:background ,bg1 :foreground ,fg1)))) + + `(font-lock-builtin-face ((,class (:foreground ,builtin)))) + `(font-lock-comment-face ((,class (:foreground ,comment :italic t)))) + `(font-lock-negation-char-face ((,class (:foreground ,const)))) + `(font-lock-reference-face ((,class (:foreground ,const)))) + `(font-lock-constant-face ((,class (:foreground ,const)))) + `(font-lock-doc-face ((,class (:foreground ,doc)))) + `(font-lock-function-name-face ((,class (:foreground ,func :bold nil)))) + `(font-lock-keyword-face ((,class (:bold nil :foreground ,keyword)))) + `(font-lock-string-face ((,class (:foreground ,str)))) + `(font-lock-type-face ((,class (:foreground ,type )))) + `(font-lock-variable-name-face ((,class (:foreground ,var)))) + `(font-lock-warning-face ((,class (:foreground ,jb-red :background ,bg2)))) + + `(region ((,class (:background ,bg-hl :extend nil)))) + `(secondary-selection ((,class (:inherit region)))) + `(highlight ((,class (:foreground ,bg3 :background ,fg3)))) + `(hl-line ((,class (:background ,bg3)))) + `(fringe ((,class (:background ,bg1 :foreground ,fg4)))) + `(cursor ((,class (:background "white")))) + `(show-paren-match-face ((,class (:background ,warning)))) + `(show-paren-match ((t (:foreground "yellow" :background ,bg4 :bold t)))) + `(show-paren-mismatch ((t (:background ,warning)))) + `(isearch ((t (:foreground ,accent :background ,jb-green)))) + `(isearch-fail ((t (:foreground ,accent :background ,jb-red)))) + `(lazy-highlight ((t (:foreground ,accent :background ,jb-y)))) + `(vertical-border ((,class (:foreground ,bg3)))) + `(minibuffer-prompt ((,class (:foreground ,fg2 :weight normal)))) + `(default-italic ((,class (:italic t)))) + `(link ((,class (:foreground ,jb-blue :underline t)))) + `(error ((,class (:foreground ,jb-orange)))) + `(warning ((,class (:foreground ,jb-magenta)))) + `(success ((,class (:foreground ,jb-bluegreen)))) + `(dired-directory ((t (:inherit (font-lock-keyword-face))))) + `(line-number ((,class (:foreground ,line-num :background ,bg3)))) + `(line-number-current-line ((,class (:foreground ,fg1 :background ,bg3)))) + + `(mode-line ((,class (:bold nil :foreground ,fg4 :background ,mode-line-bg)))) + `(mode-line-inactive ((,class (:bold nil :foreground ,fg1 :background ,mode-line-bg-dark)))) + `(mode-line-buffer-id ((,class (:bold nil :foreground ,accent :background nil)))) + `(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight normal)))) + `(mode-line-emphasis ((,class (:foreground ,fg1)))) + + `(company-tooltip ((t (:foreground ,fg2 :background ,bg4)))) + `(company-preview-common ((t (:foreground unspecified :background ,bg4)))) + `(company-scrollbar-bg ((t (:background ,bg4)))) + `(company-scrollbar-fg ((t (:background ,bg0)))) + `(company-tooltip-common ((t (:foreground "#926297" :bold t)))) + `(company-tooltip-selection ((t (:background ,bg-hl)))) + `(company-tooltip-annotation ((t (:foreground ,doc)))) ; parameter hints etc. + + `(org-document-title ((,class (:foreground ,jb-orange :height 1.2 :bold t)))) + `(org-level-1 ((,class (:bold nil :foreground ,jb-orange :height 1.1)))) + `(org-level-2 ((,class (:bold nil :foreground ,jb-magenta)))) + `(org-level-3 ((,class (:bold nil :foreground ,jb-green)))) + `(org-level-4 ((,class (:bold nil :foreground ,jb-bluegreen)))) + `(org-code ((,class (:foreground ,fg2)))) + `(org-hide ((,class (:foreground ,fg4)))) + `(org-date ((,class (:underline t :foreground ,jb-green) ))) + `(org-footnote ((,class (:underline t :foreground ,fg4)))) + `(org-link ((,class (:underline t :foreground ,type )))) + `(org-special-keyword ((,class (:foreground ,jb-green)))) + `(org-block ((,class (:foreground ,fg2 :background ,bg0 :extend t)))) + `(org-quote ((,class (:inherit org-block :slant italic)))) + `(org-verse ((,class (:inherit org-block :slant italic)))) + `(org-todo ((,class (:box (:line-width 1 :color ,fg3) :foreground ,keyword :bold nil)))) + `(org-done ((,class (:box (:line-width 1 :color ,bg3) :bold nil :foreground ,bg4)))) + `(org-warning ((,class (:underline t :foreground ,warning)))) + `(org-agenda-structure ((,class (:weight normal :foreground ,fg3 :box (:color ,fg4) :background ,bg3)))) + `(org-agenda-date ((,class (:foreground ,var :height 1.1 )))) + `(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4)))) + `(org-agenda-date-today ((,class (:weight normal :foreground ,keyword :height 1.2)))) + `(org-agenda-done ((,class (:foreground ,bg4)))) + `(org-scheduled ((,class (:foreground ,type)))) + `(org-scheduled-today ((,class (:foreground ,func :weight normal :height 1.2)))) + `(org-ellipsis ((,class (:foreground ,builtin)))) + `(org-verbatim ((,class (:foreground ,fg4)))) + `(org-document-info-keyword ((,class (:foreground ,jb-green)))) + `(org-sexp-date ((,class (:foreground ,fg4)))) + + `(font-latex-bold-face ((,class (:foreground ,type)))) + `(font-latex-italic-face ((,class (:foreground ,key3 :italic t)))) + `(font-latex-string-face ((,class (:foreground ,str)))) + `(font-latex-match-reference-keywords ((,class (:foreground ,const)))) + `(font-latex-match-variable-keywords ((,class (:foreground ,var)))) + + `(ido-only-match ((,class (:foreground ,keyword)))) + `(ido-subdir ((,class (:weight normal :foreground ,fg0)))) + `(ido-first-match ((,class (:foreground ,keyword :bold nil)))) + + `(gnus-header-content ((,class (:foreground ,keyword)))) + `(gnus-header-from ((,class (:foreground ,var)))) + `(gnus-header-name ((,class (:foreground ,type)))) + `(gnus-header-subject ((,class (:foreground ,func :bold nil)))) + + `(mu4e-view-url-number-face ((,class (:foreground ,type)))) + `(mu4e-cited-1-face ((,class (:foreground ,fg2)))) + `(mu4e-cited-7-face ((,class (:foreground ,fg3)))) + `(mu4e-header-marks-face ((,class (:foreground ,type)))) + + `(ffap ((,class (:foreground ,fg4)))) + + `(js2-private-function-call ((,class (:foreground ,const)))) + `(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str)))) + `(js2-jsdoc-html-tag-name ((,class (:foreground ,key2)))) + `(js2-external-variable ((,class (:foreground ,type )))) + `(js2-function-param ((,class (:foreground ,const)))) + `(js2-jsdoc-value ((,class (:foreground ,str)))) + `(js2-private-member ((,class (:foreground ,fg3)))) + `(js2-warning ((t (:underline ,warning)))) + `(js2-error ((t (:foreground ,warning :weight normal)))) + `(js2-jsdoc-tag ((t (:foreground ,var)))) + `(js2-jsdoc-type ((t (:foreground ,var)))) + `(js2-instance-member ((t (:foreground ,var)))) + `(js2-object-property ((t (:foreground ,func)))) + `(js2-magic-paren ((t (:foreground ,const)))) + `(js2-function-call ((t (:foreground ,const)))) + `(js2-keywords ((t (:foreground ,keyword)))) + `(js3-warning-face ((,class (:underline ,keyword)))) + `(js3-error-face ((,class (:underline ,warning)))) + `(js3-external-variable-face ((,class (:foreground ,var)))) + `(js3-function-param-face ((,class (:foreground ,key3)))) + `(js3-jsdoc-tag-face ((,class (:foreground ,keyword)))) + `(js3-instance-member-face ((,class (:foreground ,const)))) + + `(ac-completion-face ((,class (:underline t :foreground ,keyword)))) + `(info-quoted-name ((,class (:foreground ,builtin)))) + `(info-string ((,class (:foreground ,str)))) + `(icompletep-determined ((,class :foreground ,builtin))) + + `(slime-repl-inputed-output-face ((,class (:foreground ,type)))) + `(trailing-whitespace ((,class :foreground nil :background ,warning))) + + `(undo-tree-visualizer-current-face ((,class :foreground ,builtin))) + `(undo-tree-visualizer-default-face ((,class :foreground ,fg2))) + `(undo-tree-visualizer-unmodified-face ((,class :foreground ,var))) + `(undo-tree-visualizer-register-face ((,class :foreground ,type))) + + `(rainbow-delimiters-depth-1-face ((,class :foreground "gold"))) + `(rainbow-delimiters-depth-2-face ((,class :foreground "orchid"))) + `(rainbow-delimiters-depth-3-face ((,class :foreground "LightSkyBlue"))) + `(rainbow-delimiters-depth-4-face ((,class :foreground "gold"))) + `(rainbow-delimiters-depth-5-face ((,class :foreground "orchid"))) + `(rainbow-delimiters-depth-6-face ((,class :foreground "LightSkyBlue"))) + `(rainbow-delimiters-depth-7-face ((,class :foreground "gold"))) + `(rainbow-delimiters-depth-8-face ((,class :foreground "orchid"))) + `(rainbow-delimiters-depth-9-face ((,class :foreground "LightSkyBlue"))) + `(rainbow-delimiters-unmatched-face ((,class :foreground ,warning))) + + ;;;;; New magit faces (adpated from sanityinc-tomorrow themes) + `(magit-item-highlight ((,class :background ,bg3))) + `(magit-hunk-heading ((,class (:background ,bg3)))) + `(magit-hunk-heading-highlight ((,class (:background ,bg3)))) + `(magit-bisect-bad ((t (:foreground ,jb-red)))) + `(magit-bisect-good ((t (:foreground ,jb-green)))) + `(magit-bisect-skip ((t (:foreground ,jb-orange)))) + `(magit-blame-date ((t (:foreground ,jb-red)))) + `(magit-blame-heading ((t (:foreground ,jb-orange :background ,bg3 :extend t)))) + `(magit-branch ((,class (:foreground ,jb-blue :weight normal)))) + `(magit-branch-current ((t (:foreground ,jb-blue)))) + `(magit-branch-local ((t (:foreground ,jb-bluegreen)))) + `(magit-branch-remote ((t (:foreground ,jb-green)))) + `(magit-cherry-equivalent ((t (:foreground ,jb-magenta)))) + `(magit-cherry-unmatched ((t (:foreground ,jb-bluegreen)))) + `(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3)))) + `(magit-diffstat-added ((t (:foreground ,jb-green)))) + `(magit-diffstat-removed ((t (:foreground ,jb-orange)))) + `(magit-dimmed ((t (:foreground ,comment)))) + `(magit-filename ((t (:foreground ,jb-magenta)))) + `(magit-hash ((t (:foreground ,comment)))) + `(magit-header-line ((t (:inherit nil)))) + `(magit-log-author ((t (:foreground ,jb-orange)))) + `(magit-log-date ((t (:foreground ,jb-blue)))) + `(magit-log-graph ((t (:foreground ,comment)))) + `(magit-mode-line-process ((t (:foreground ,jb-orange)))) + `(magit-mode-line-process-error ((t (:foreground ,jb-red)))) + `(magit-process-ok ((t (:inherit success)))) + `(magit-process-ng ((t (:inherit error)))) + `(magit-reflog-amend ((t (:foreground ,jb-magenta)))) + `(magit-reflog-checkout ((t (:foreground ,jb-blue)))) + `(magit-reflog-cherry-pick ((t (:foreground ,jb-green)))) + `(magit-reflog-commit ((t (:foreground ,jb-green)))) + `(magit-reflog-merge ((t (:foreground ,jb-green)))) + `(magit-reflog-other ((t (:foreground ,jb-bluegreen)))) + `(magit-reflog-rebase ((t (:foreground ,jb-magenta)))) + `(magit-reflog-remote ((t (:foreground ,jb-bluegreen)))) + `(magit-reflog-reset ((t (:inherit error)))) + `(magit-refname ((t (:foreground ,comment)))) + `(magit-section-heading ((t (:foreground ,jb-magenta)))) + `(magit-section-heading-selection ((t (:foreground ,jb-orange :extend t)))) + `(magit-section-highlight ((t (:background ,bg3 :extend t)))) + `(magit-sequence-drop ((t (:foreground ,jb-red)))) + `(magit-sequence-head ((t (:foreground ,jb-blue)))) + `(magit-sequence-part ((t (:foreground ,jb-orange)))) + `(magit-sequence-stop ((t (:foreground ,jb-green)))) + `(magit-signature-bad ((t (:inherit error)))) + `(magit-signature-error ((t (:inherit error)))) + `(magit-signature-expijb-red ((t (:foreground ,jb-orange)))) + `(magit-signature-good ((t (:inherit success)))) + `(magit-signature-revoked ((t (:foreground ,jb-magenta)))) + `(magit-signature-untrusted ((t (:foreground ,jb-bluegreen)))) + `(magit-tag ((t (:foreground ,jb-yellow)))) + + `(term ((,class (:foreground ,fg1 :background ,bg1)))) + `(term-color-black ((,class (:foreground ,fg1 :background ,bg3)))) + `(term-color-blue ((,class (:foreground ,jb-blue :background ,func)))) + `(term-color-red ((,class (:foreground ,jb-red :background ,bg3)))) + `(term-color-green ((,class (:foreground ,jb-green :background ,bg3)))) + `(term-color-yellow ((,class (:foreground ,jb-yellow :background ,var)))) + `(term-color-magenta ((,class (:foreground ,jb-orange :background ,builtin)))) + `(term-color-cyan ((,class (:foreground ,jb-bluegreen :background ,str)))) + `(term-color-white ((,class (:foreground ,fg2 :background ,fg2)))) + + `(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil)))) + `(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight normal)))) + `(helm-selection ((,class (:background ,bg2 :underline nil)))) + `(helm-selection-line ((,class (:background ,bg2)))) + `(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3)))) + `(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1)))) + `(helm-separator ((,class (:foreground ,type :background ,bg1)))) + `(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1)))) + `(helm-time-zone-home ((,class (:foreground ,type :background ,bg1)))) + `(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1)))) + `(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1)))) + `(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1)))) + `(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1)))) + `(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight normal)))) + `(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal)))) + `(helm-ff-executable ((,class (:foreground ,key2 :background ,bg1 :weight normal)))) + `(helm-ff-invalid-symlink ((,class (:foreground ,key3 :background ,bg1 :weight normal)))) + `(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight normal)))) + `(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal)))) + `(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1)))) + `(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1)))) + `(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1)))) + `(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1)))) + `(helm-grep-match ((,class (:foreground nil :background nil :inherit helm-match)))) + `(helm-grep-running ((,class (:foreground ,func :background ,bg1)))) + `(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1)))) + `(helm-source-go-package-godoc-description ((,class (:foreground ,str)))) + `(helm-bookmark-w3m ((,class (:foreground ,type)))) + + `(web-mode-html-tag-bracket-face ((,class (:foreground ,jb-yellow)))) + `(web-mode-html-tag-face ((,class (:foreground ,jb-yellow)))) + `(web-mode-html-attr-name-face ((,class (:foreground ,var)))) + `(web-mode-html-attr-value-face ((,class (:foreground ,str)))) + `(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face)))) + `(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face)))) + `(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face)))) + `(web-mode-keyword-face ((,class (:inherit ,font-lock-keyword-face)))) + `(web-mode-doctype-face ((,class (:inherit ,font-lock-doc-face)))) + `(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face)))) + `(web-mode-string-face ((,class (:inherit ,font-lock-string-face)))) + `(web-mode-type-face ((,class (:inherit ,font-lock-type-face)))) + `(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face)))) + + `(ediff-fine-diff-Ancestor ((t (:background "#885555")))) + `(ediff-fine-diff-A ((t (:background "#885555")))) + `(ediff-fine-diff-B ((t (:background "#558855")))) + `(ediff-fine-diff-C ((t (:background "#555588")))) + `(ediff-current-diff-Ancestor ((t (:background "#663333")))) + `(ediff-current-diff-A ((t (:background "#663333")))) + `(ediff-current-diff-B ((t (:background "#336633")))) + `(ediff-current-diff-C ((t (:background "#333366")))) + `(ediff-even-diff-Ancestor ((t (:background ,bg3)))) + `(ediff-even-diff-A ((t (:background ,bg3)))) + `(ediff-even-diff-B ((t (:background ,bg3)))) + `(ediff-even-diff-C ((t (:background ,bg3)))) + `(ediff-odd-diff-Ancestor ((t (:background ,bg3)))) + `(ediff-odd-diff-A ((t (:background ,bg3)))) + `(ediff-odd-diff-B ((t (:background ,bg3)))) + `(ediff-odd-diff-C ((t (:background ,bg3)))) + + `(jde-java-font-lock-package-face ((t (:foreground ,var)))) + `(jde-java-font-lock-public-face ((t (:foreground ,keyword)))) + `(jde-java-font-lock-private-face ((t (:foreground ,keyword)))) + `(jde-java-font-lock-constant-face ((t (:foreground ,const)))) + `(jde-java-font-lock-modifier-face ((t (:foreground ,key3)))) + `(jde-jave-font-lock-protected-face ((t (:foreground ,keyword)))) + `(jde-java-font-lock-number-face ((t (:foreground ,var)))) + + `(centaur-tabs-default ((t (:background ,bg1 :foreground ,fg1)))) + `(centaur-tabs-selected ((t (:background ,bg1 :foreground ,fg3 :box nil)))) + `(centaur-tabs-unselected ((t (:background ,bg2 :foreground ,fg0 :box nil)))) + `(centaur-tabs-selected-modified ((t (:background ,bg2 :foreground ,accent :box nil)))) + `(centaur-tabs-unselected-modified ((t (:background ,bg2 :foreground ,fg4 :box nil)))) + `(centaur-tabs-active-bar-face ((t (:background ,accent :box nil)))) + `(centaur-tabs-modified-marker-selected ((t (:inherit 'centaur-tabs-selected-modified :foreground ,accent :box nil)))) + `(centaur-tabs-modified-marker-unselected ((t (:inherit 'centaur-tabs-unselected-modified :foreground ,accent :box nil)))) + + `(solaire-default-face ((t (:inherit default :background ,bg2)))) + `(solaire-minibuffer-face ((t (:inherit default :background ,bg2)))) + `(solaire-hl-line-face ((t (:inherit hl-line :background ,bg3)))) + `(solaire-org-hide-face ((t (:inherit org-hide :background ,bg2)))) + + `(ivy-confirm-face ((t (:inherit minibuffer-prompt :foreground ,keyword)))) + `(ivy-current-match ((t (:background ,bg-hl :extend t)))) + `(ivy-highlight-face ((t (:inherit font-lock-builtin-face)))) + `(ivy-match-required-face ((t (:inherit minibuffer-prompt :foreground ,warning)))) + `(ivy-minibuffer-match-face-1 ((t (:inherit isearch)))) + `(ivy-minibuffer-match-face-2 ((t (:inherit ivy-minibuffer-match-face-1)))) + `(ivy-minibuffer-match-face-3 ((t (:inherit ivy-minibuffer-match-face-2)))) + `(ivy-minibuffer-match-face-4 ((t (:inherit ivy-minibuffer-match-face-2)))) + `(ivy-minibuffer-match-highlight ((t (:inherit ivy-current-match)))) + `(ivy-modified-buffer ((t (:inherit default :foreground ,var)))) + `(ivy-virtual ((t (:inherit default :foreground ,doc)))) + `(ivy-posframe ((t (:background "#252526")))) + + `(counsel-key-binding ((t (:foreground ,var)))) + + `(swiper-match-face-1 ((t (:inherit ivy-minibuffer-match-face-1)))) + `(swiper-match-face-2 ((t (:inherit ivy-minibuffer-match-face-2)))) + `(swiper-match-face-3 ((t (:inherit ivy-minibuffer-match-face-3)))) + `(swiper-match-face-4 ((t (:inherit ivy-minibuffer-match-face-4)))) + `(swiper-line-face ((t (:foreground ,fg0 :background ,bg4 :extend t)))) + + `(git-gutter:added ((t (:background ,jb-g :foreground ,jb-g :weight normal)))) + `(git-gutter:deleted ((t (:background ,jb-r :foreground ,jb-r :weight normal)))) + `(git-gutter:modified ((t (:background ,jb-y :foreground ,jb-y :weight normal)))) + `(git-gutter-fr:added ((t (:background ,jb-g :foreground ,jb-g :weight normal)))) + `(git-gutter-fr:deleted ((t (:background ,jb-r :foreground ,jb-r :weight normal)))) + `(git-gutter-fr:modified ((t (:background ,jb-y :foreground ,jb-y :weight normal)))) + + `(diff-hl-insert ((t (:background ,jb-g :foreground ,jb-g)))) + `(diff-hl-delete ((t (:background ,jb-r :foreground ,jb-r)))) + `(diff-hl-change ((t (:background ,jb-y :foreground ,jb-y)))) + + `(neo-dir-link-face ((t (:foreground "#cccccc" :family "Sans Serif")))) + `(neo-header-face ((t (:foreground "#cccccc" :family "Sans Serif")))) + `(neo-banner-face ((t (:foreground "#cccccc" :family "Sans Serif")))) + `(neo-root-dir-face ((t (:foreground "#cccccc" :family "Sans Serif")))) + `(neo-file-link-face ((t (:foreground "#aaaaaa" :family "Sans Serif")))) + `(neo-expand-btn-face ((t (:foreground "#aaaaaa")))) + + `(sml/global ((t (:foreground ,fg1 :weight normal)))) + `(sml/filename ((t (:foreground ,fg1 :weight normal)))) + `(sml/prefix ((t (:foreground ,fg1 :weight normal)))) + `(sml/read-only ((t (:foreground ,fg1 :weight normal)))) + `(sml/modes ((t (:foreground ,fg1 :weight normal)))) + `(sml/modified ((t (:foreground ,fg3 :weight normal)))) + + ;; tab-bar-mode + `(tab-bar ((t (:background ,bg3)))) + `(tab-bar-tab ((t (:foreground ,fg2 :background ,bg5 :box (:color ,bg4))))) + `(tab-bar-tab-inactive ((t (:foreground ,fg1 :background ,bg2 :box (:color ,bg4))))) + + `(evil-ex-substitute-matches ((t (:foreground ,warning :weight normal :strike-through t)))) + `(evil-ex-substitute-replacement ((t (:foreground ,jb-bluegreen :weight normal)))) + + `(hl-todo ((t (:inverse-video t)))) + `(highlight-numbers-number ((t (:foreground ,jb-blue)))) + `(highlight-operators-face ((t (:inherit default)))) + `(highlight-symbol-face ((t (:background "#354a32")))))) + +;;;###autoload +(when (and (boundp 'custom-theme-load-path) load-file-name) + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'jetbrains-darcula) +(provide 'jetbrains-darcula-theme) + +;;; jetbrains-darcula-theme.el ends here diff --git a/.emacs.d/themes/odersky-theme.el b/.emacs.d/themes/odersky-theme.el new file mode 100644 index 0000000..30b75e7 --- /dev/null +++ b/.emacs.d/themes/odersky-theme.el @@ -0,0 +1,114 @@ +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;; --------------------------- +;; +;; Oderskey: A dark color theme +;; +;; ---------------------------- + +(unless (>= emacs-major-version 24) + (error "requires Emacs 24 or later.")) + +(deftheme odersky "A dark color theme for Emacs") + +(let ((*background* "#1E2326") + (*vborder* "#FF7E00") + (*gutter* "#3E3E3E") + (*comments* "#999999") + (*constant* "#F38630") + (*current-line* "#151515") + (*cursor-underscore* "#FFFAAA") + (*keywords* "#A7DBD8") + (*line-number* "#1E2326") + (*method-declaration* "#FFD2A7") + (*mode-line-bg* "#505C63") + (*mode-line-fg* "#E0E4CC") + (*mode-inactive-bg* "#2E3336") + (*mode-inactive-fg* "#F8F8F2") + (*normal* "#DEDEDE") + (*number* "#2EBF7E") + (*operators* "#69D2E7") + (*warning* "#FA6900") + (*regexp* "#FA6900") + (*string* "#E0E4CC") + (*variable* "#FA6900") + (*visual-selection* "#505C63")) + + (custom-theme-set-faces + 'odersky + + `(bold ((t (:bold t)))) + `(button ((t (:foreground, *keywords* :underline t)))) + `(default ((t (:background, *background* :foreground, *normal*)))) + `(header-line ((t (:background, *mode-line-bg* :foreground, *normal*)))) ;; info header + `(highlight ((t (:background, *current-line*)))) + `(highlight-face ((t (:background, *current-line*)))) + `(hl-line ((t (:background, *current-line* :underline t)))) + `(info-xref ((t (:foreground, *keywords* :underline t)))) + `(region ((t (:background, *visual-selection*)))) + `(underline ((nil (:underline t)))) + + ;; font-lock + `(font-lock-builtin-face ((t (:foreground, *operators*)))) + `(font-lock-comment-delimiter-face ((t (:foreground, *comments*)))) + `(font-lock-comment-face ((t (:foreground, *comments*)))) + `(font-lock-constant-face ((t (:foreground, *constant*)))) + `(font-lock-doc-face ((t (:foreground, *string*)))) + `(font-lock-doc-string-face ((t (:foreground, *string*)))) + `(font-lock-function-name-face ((t (:foreground, *method-declaration*)))) + `(font-lock-keyword-face ((t (:foreground, *keywords*)))) + `(font-lock-negation-char-face ((t (:foreground, *warning*)))) + `(font-lock-number-face ((t (:foreground, *number*)))) + `(font-lock-preprocessor-face ((t (:foreground, *keywords*)))) + `(font-lock-reference-face ((t (:foreground, *constant*)))) + `(font-lock-regexp-grouping-backslash ((t (:foreground, *regexp*)))) + `(font-lock-regexp-grouping-construct ((t (:foreground, *regexp*)))) + `(font-lock-string-face ((t (:foreground, *string*)))) + `(font-lock-type-face ((t (:foreground, *operators*)))) + `(font-lock-variable-name-face ((t (:foreground, *variable*)))) + `(font-lock-warning-face ((t (:foreground, *warning*)))) + + ;; GUI + `(fringe ((t (:background, *gutter*)))) + `(linum ((t (:background, *line-number*)))) + `(minibuffer-prompt ((t (:foreground, *variable*)))) + `(mode-line ((t (:background, *mode-line-bg* :foreground, *mode-line-fg*)))) + `(mode-line-inactive ((t (:background, *mode-inactive-bg* :foreground, *mode-inactive-fg*)))) + `(cursor ((t (:background, *cursor-underscore*)))) + `(text-cursor ((t (:background, *cursor-underscore*)))) + `(vertical-border ((t (:foreground, *vborder*)))) ;; between splits + + ;; show-paren + `(show-paren-mismatch ((t (:background, *warning* :foreground, *normal* :weight bold)))) + `(show-paren-match ((t (:background, *keywords* :foreground, *normal* :weight bold)))) + + ;; search + `(isearch ((t (:background, *regexp* :foreground, *visual-selection*)))) + `(isearch-fail ((t (:background, *warning*)))) + `(lazy-highlight ((t (:background, *operators* :foreground, *visual-selection*)))) + + )) + +;;;###autoload +(when (and (boundp 'custom-theme-load-path) load-file-name) + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'odersky) + +;; Local Variables: +;; no-byte-compile: t +;; End: + + diff --git a/.emacs.d/themes/wilson-theme.el b/.emacs.d/themes/wilson-theme.el new file mode 100644 index 0000000..a95b900 --- /dev/null +++ b/.emacs.d/themes/wilson-theme.el @@ -0,0 +1,94 @@ +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;; ------------------------------------------------------ +;; +;; Wilson: A theme based upon a dirty spitfire +;; +;; ------------------------------------------------------- + +(unless (>= emacs-major-version 24) + (error "requires Emacs 24 or later.")) + +(deftheme wilson + "A theme based upon a dirty spitfire") + +(let ((wilson-oilstained-eggshell "#6C6B59") + (wilson-flying-boots "#44443C") + (wilson-darker-flying-boots "#222222") + (wilson-spring-grass "#9BA657") + (wilson-stained-white "#BEBFB7") + (wilson-darker-stained-white "#A9AAA3") + (wilson-gray "#84857E") + (wilson-darker-gray "gray30") + (wilson-dark-gray "gray25") + (wilson-light-gray "gray20") + (wilson-lighter-gray "gray12") + (wilson-stained-orange "#B97E56") + (wilson-darker-stained-orange "#A56F4B") + (wilson-stained-yellow "#CFB980") + (wilson-darker-stained-yellow "#B9A572")) + (custom-theme-set-faces + 'wilson + + ;; ----------------- Frame stuff -------------------- + `(default ((t (:background ,wilson-darker-flying-boots :foreground ,wilson-stained-white)))) + `(cursor ((t (:background ,wilson-stained-white)))) + `(hl-line ((t (:background ,wilson-flying-boots)))) + `(modeline ((t (:background ,wilson-stained-yellow :foreground ,wilson-flying-boots)))) + `(mode-line-inactive ((t (:box nil :background ,wilson-light-gray :foreground ,wilson-stained-yellow)))) + `(mode-line ((t (:box nil :foreground ,wilson-flying-boots :background ,wilson-stained-yellow)))) + `(fringe ((t (:background ,wilson-darker-flying-boots)))) + ;; Dir-ed search prompt + `(minibuffer-prompt ((default (:foreground ,wilson-stained-orange)))) + `(linum ((t (:background, wilson-darker-flying-boots :foreground, wilson-stained-white)))) + ;; Highlight region color + `(region ((t (:foreground ,wilson-darker-stained-white :background ,wilson-flying-boots)))) + + ;; ---------------- Code Highlighting --------------- + ;; Builtin + `(font-lock-builtin-face ((t (:foreground ,wilson-darker-stained-yellow)))) + ;; Constants + `(font-lock-constant-face ((t (:foreground ,wilson-stained-orange)))) + ;; Comments + `(font-lock-comment-face ((t (:foreground ,wilson-oilstained-eggshell)))) + ;; Function names + `(font-lock-function-name-face ((t (:foreground ,wilson-stained-yellow)))) + ;; Keywords + `(font-lock-keyword-face ((t (:foreground ,wilson-spring-grass)))) + ;; Strings + `(font-lock-string-face ((t (:foreground ,wilson-gray)))) + ;; Variables + `(font-lock-variable-name-face ((t (:foreground ,wilson-stained-yellow)))) + `(font-lock-type-face ((t (:foreground ,wilson-darker-stained-orange)))) + `(font-lock-warning-face ((t (:foreground ,wilson-darker-stained-orange :bold t)))) + + ;; ---------------- Package Specific Stuff ----------- + ;; Powerline + `(powerline-active1 ((t (:background ,wilson-dark-gray :foreground ,wilson-stained-orange)))) + `(powerline-active2 ((t (:background ,wilson-lighter-gray :foreground ,wilson-darker-stained-white)))) + `(powerline-inactive1 ((t (:background ,wilson-darker-gray :foreground ,wilson-stained-white)))) + `(powerline-inactive2 ((t (:background ,wilson-dark-gray :foreground ,wilson-darker-stained-white)))))) + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name))) + (when (not window-system) + (custom-set-faces '(default ((t (:background nil))))))) + +(provide-theme 'wilson) + +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/.emacs.d/themes/witness-nostalgia-theme.el b/.emacs.d/themes/witness-nostalgia-theme.el new file mode 100644 index 0000000..4c35e40 --- /dev/null +++ b/.emacs.d/themes/witness-nostalgia-theme.el @@ -0,0 +1,37 @@ +;;; witness-nostalgia-theme.el --- Witness color theme -*- lexical-binding: t; -*- + +;;; Commentary: +;; A dark teal color theme. + +;;; Code: + +(deftheme witness-nostalgia + "Witness nostalgia color theme - gray with green and yellow accents.") + +(custom-theme-set-faces + 'witness-nostalgia + ;; Basic faces + '(default ((t (:foreground "#d3b58d" :background "#292929")))) + '(cursor ((t (:background "lightgreen")))) + '(region ((t (:background "blue")))) + '(highlight ((t (:foreground "navyblue" :background "darkseagreen2")))) + '(mode-line ((t (:inverse-video t)))) + + ;; Font lock faces + '(font-lock-builtin-face ((t (:foreground "lightgreen")))) + '(font-lock-comment-face ((t (:foreground "#FFFF00")))) + '(font-lock-string-face ((t (:foreground "#BEBEBE")))) + '(font-lock-keyword-face ((t (:foreground "white")))) + '(font-lock-function-name-face ((t (:foreground "white")))) + '(font-lock-variable-name-face ((t (:foreground "#c8d4ec")))) + '(font-lock-warning-face ((t (:foreground "#504038")))) + + ;; Custom/widget faces + '(custom-group-tag ((t (:underline t :foreground "lightblue")))) + '(custom-variable-tag ((t (:underline t :foreground "lightblue")))) + '(widget-field ((t (:foreground "white")))) + '(widget-single-line-field ((t (:background "darkgray"))))) + +(provide-theme 'witness-nostalgia) + +;;; witness-theme.el ends here diff --git a/sync.sh b/sync.sh index 681f5db..aaa3113 100755 --- a/sync.sh +++ b/sync.sh @@ -119,6 +119,27 @@ sync_emacs_dir() { done } +sync_sublime_dir() { + local src_base="$1" + local dest_base="$2" + local action="$3" + + # Sync the entire Packages/User directory (clear destination first) + local src_dir="$src_base/Packages/User" + local dest_dir="$dest_base/Packages/User" + + if [[ -d "$src_dir" ]]; then + # Clear destination directory + if [[ -d "$dest_dir" ]]; then + rm -rf "$dest_dir" + fi + # Ensure parent directory exists + ensure_dir "$(dirname "$dest_dir")" + # Copy directory + cp -r "$src_dir" "$dest_dir" + fi +} + push_dotfiles() { echo "Pushing dotfiles from repo to home directory..." @@ -127,6 +148,15 @@ push_dotfiles() { sync_emacs_dir "$DOTFILES_DIR/.emacs.d" "$HOME_DIR/.emacs.d" "Push" fi + # Handle Sublime Text specially (clear folders before syncing) + if [[ -d "$DOTFILES_DIR/.config/Sublime Text" ]]; then + if [[ "$OSTYPE" == "darwin"* ]]; then + sync_sublime_dir "$DOTFILES_DIR/.config/Sublime Text" "/Users/${USER}/Library/Application Support/Sublime Text" "Push" + else + sync_sublime_dir "$DOTFILES_DIR/.config/Sublime Text" "$HOME_DIR/.config/Sublime Text" "Push" + fi + fi + local count=0 while IFS= read -r src_file; do rel_path="${src_file#$DOTFILES_DIR/}" @@ -134,6 +164,10 @@ push_dotfiles() { if [[ "$rel_path" == .emacs.d/* ]]; then continue fi + # Skip Sublime Text files (handled above) + if [[ "$rel_path" == .config/Sublime\ Text/* ]]; then + continue + fi dest_file="$(get_system_path "$rel_path")" copy_file "$src_file" "$dest_file" "Push" ((count++)) @@ -150,6 +184,17 @@ pull_dotfiles() { sync_emacs_dir "$HOME_DIR/.emacs.d" "$DOTFILES_DIR/.emacs.d" "Pull" fi + # Handle Sublime Text specially (clear folders before syncing) + if [[ "$OSTYPE" == "darwin"* ]]; then + if [[ -d "/Users/${USER}/Library/Application Support/Sublime Text" ]]; then + sync_sublime_dir "/Users/${USER}/Library/Application Support/Sublime Text" "$DOTFILES_DIR/.config/Sublime Text" "Pull" + fi + else + if [[ -d "$HOME_DIR/.config/Sublime Text" ]]; then + sync_sublime_dir "$HOME_DIR/.config/Sublime Text" "$DOTFILES_DIR/.config/Sublime Text" "Pull" + fi + fi + local count=0 while IFS= read -r dest_file; do rel_path="${dest_file#$DOTFILES_DIR/}" @@ -157,6 +202,10 @@ pull_dotfiles() { if [[ "$rel_path" == .emacs.d/* ]]; then continue fi + # Skip Sublime Text files (handled above) + if [[ "$rel_path" == .config/Sublime\ Text/* ]]; then + continue + fi src_file="$(get_system_path "$rel_path")" copy_file "$src_file" "$dest_file" "Pull" ((count++))