Theme updates; picture updates
BIN
images/pic1.png
Before Width: | Height: | Size: 796 KiB After Width: | Height: | Size: 961 KiB |
BIN
images/pic2.png
Before Width: | Height: | Size: 822 KiB After Width: | Height: | Size: 878 KiB |
BIN
images/pic3.png
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.2 MiB |
BIN
images/pic4.png
Before Width: | Height: | Size: 810 KiB After Width: | Height: | Size: 1.0 MiB |
@ -6,7 +6,9 @@ import threading
|
||||
# Lib imports
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
gi.require_version('Gdk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import GLib
|
||||
|
||||
# Application imports
|
||||
@ -125,6 +127,14 @@ class Plugin(StylingMixin, ReplaceMixin, PluginBase):
|
||||
self.timer.start()
|
||||
|
||||
|
||||
def on_enter_search(self, widget, eve):
|
||||
text = widget.get_text()
|
||||
if not text: return
|
||||
|
||||
keyname = Gdk.keyval_name(eve.keyval)
|
||||
if keyname == "Return":
|
||||
self.find_next(widget)
|
||||
|
||||
def search_for_string(self, widget):
|
||||
self.cancel_timer()
|
||||
|
||||
|
@ -261,6 +261,7 @@
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="primary-icon-sensitive">False</property>
|
||||
<property name="placeholder-text" translatable="yes">Find in current buffer</property>
|
||||
<signal name="key-release-event" handler="on_enter_search" swapped="no"/>
|
||||
<signal name="search-changed" handler="search_for_string" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
219
user_config/local/share/gtksourceview-4/language-specs/xml.lang
Normal file
@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
This file is part of GtkSourceView
|
||||
|
||||
Authors: Marco Barisione, Emanuele Aina, Paolo Borelli
|
||||
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
|
||||
Copyright (C) 2005-2007 Emanuele Aina
|
||||
Copyright (C) 2007 Paolo Borelli
|
||||
Copyright (C) 2019 Yukihiro Nakai
|
||||
|
||||
GtkSourceView is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
GtkSourceView 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<language id="xml" name="XML" version="2.0" _section="Markup">
|
||||
<metadata>
|
||||
<property name="mimetypes">application/xml;text/xml;text/sgml</property>
|
||||
<property name="globs">*.xml;*.xspf;*.siv;*.smil;*.smi;*.sml;*.kino;*.xul;*.xbel;*.abw;*.zabw;*.glade;*.jnlp;*.xhtml;*.svg;*.mml;*.rdf;*.rss;*.wml;*.xmi;*.fo;*.xslfo;*.sgml;*.lang</property>
|
||||
<property name="block-comment-start"><!--</property>
|
||||
<property name="block-comment-end">--></property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" name="Comment" map-to="def:comment"/>
|
||||
<style id="doctype" name="DOCTYPE" map-to="def:preprocessor"/>
|
||||
<style id="cdata-delim" name="CDATA delimiter" map-to="def:preprocessor"/>
|
||||
<style id="processing-instruction" name="Processing instruction" map-to="def:preprocessor"/>
|
||||
<style id="element-name" name="Element name" map-to="def:identifier"/>
|
||||
<style id="attribute-name" name="Attribute name" map-to="def:type"/>
|
||||
<style id="attribute-value" name="Attribute value" map-to="def:string"/>
|
||||
<style id="entity" name="Entity" map-to="def:preprocessor"/>
|
||||
<style id="tag" name="Tag"/>
|
||||
<style id="namespace" name="Namespace" map-to="xml:element-name"/>
|
||||
<style id="error" name="Error" map-to="def:error"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
<define-regex id="prefix">[[:alpha:]_][[:alnum:]._-]*</define-regex>
|
||||
|
||||
<define-regex id="name">[[:alpha:]_][[:alnum:].:_-]*</define-regex>
|
||||
|
||||
<context id="entity" style-ref="entity" class="no-spell-check">
|
||||
<match>&\%{name};</match>
|
||||
</context>
|
||||
|
||||
<context id="character-reference" style-ref="entity">
|
||||
<match>&#([0-9]+|x[a-fA-F0-9]+);</match>
|
||||
</context>
|
||||
|
||||
<context id="unallowed-chars" style-ref="error" extend-parent="false">
|
||||
<match>[&<]</match>
|
||||
</context>
|
||||
|
||||
<context id="comment" style-ref="comment" class="comment">
|
||||
<start><!--</start>
|
||||
<end>--></end>
|
||||
<include>
|
||||
<context style-ref="error" extend-parent="false">
|
||||
<match>--+</match>
|
||||
</context>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="doctype" class="no-spell-check">
|
||||
<start>(<!DOCTYPE)\s+(\%{name})</start>
|
||||
<end>></end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="doctype"/>
|
||||
<context sub-pattern="2" where="start" style-ref="doctype"/>
|
||||
<context sub-pattern="0" where="end" style-ref="doctype"/>
|
||||
<context>
|
||||
<match>(SYSTEM)\s+(\"[^\"]*\")</match>
|
||||
<include>
|
||||
<context sub-pattern="1" style-ref="doctype"/>
|
||||
<context sub-pattern="2" style-ref="attribute-value"/>
|
||||
</include>
|
||||
</context>
|
||||
<context>
|
||||
<match>(PUBLIC)\s+(\"[^\"]*\")\s+(\"[^\"]*\")</match>
|
||||
<include>
|
||||
<context sub-pattern="1" style-ref="doctype"/>
|
||||
<context sub-pattern="2" style-ref="attribute-value"/>
|
||||
<context sub-pattern="3" style-ref="attribute-value"/>
|
||||
</include>
|
||||
</context>
|
||||
<context>
|
||||
<start>\[</start>
|
||||
<end>\]</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="doctype"/>
|
||||
<context sub-pattern="0" where="end" style-ref="doctype"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="cdata" class="no-spell-check">
|
||||
<start><!\[CDATA\[</start>
|
||||
<end>\]\]></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="cdata-delim" class="no-spell-check"/>
|
||||
<context sub-pattern="0" where="end" style-ref="cdata-delim"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="processing-instruction" style-ref="processing-instruction">
|
||||
<start><\?</start>
|
||||
<end>\?></end>
|
||||
</context>
|
||||
|
||||
<!-- The following three contexts can be <replace>d in xml
|
||||
dialect lang files, to custommize highlighting, e.g.
|
||||
highlighting docbook tags as keywords -->
|
||||
|
||||
<context id="namespace" style-ref="namespace" class="no-spell-check">
|
||||
<match>(?<!:)\%{prefix}:</match>
|
||||
</context>
|
||||
|
||||
<!-- Match attribute-name before element-name otherwise
|
||||
"text" in <fo:block text-align="left"> is detected as
|
||||
element -->
|
||||
<context id="attribute-name" style-ref="attribute-name" class="no-spell-check">
|
||||
<match>\b\%{name}\s*=</match>
|
||||
</context>
|
||||
|
||||
<context id="attribute-value" style-ref="attribute-value" class="string" class-disabled="no-spell-check">
|
||||
<start>["']</start>
|
||||
<end>\%{0@start}</end>
|
||||
<include>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="element-name" once-only="true" style-ref="element-name" class="no-spell-check">
|
||||
<match>\b\%{name}\b(?!\s*=)</match>
|
||||
</context>
|
||||
|
||||
<context id="prolog" class="no-spell-check">
|
||||
<start><\?xml</start>
|
||||
<end>\?></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="processing-instruction"/>
|
||||
<context sub-pattern="0" where="end" style-ref="processing-instruction"/>
|
||||
<context ref="attribute-value"/>
|
||||
<context ref="attribute-name"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="start-tag" style-ref="tag" class="no-spell-check">
|
||||
<start><(?!/)</start>
|
||||
<end>/?></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="element-name"/>
|
||||
<context sub-pattern="0" where="end" style-ref="element-name"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
<context ref="namespace"/>
|
||||
<context ref="attribute-name"/>
|
||||
<context ref="attribute-value"/>
|
||||
<context ref="element-name"/>
|
||||
<context style-ref="error" extend-parent="false">
|
||||
<match>\S</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="end-tag" style-ref="tag" class="no-spell-check">
|
||||
<start></</start>
|
||||
<end>></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="element-name"/>
|
||||
<context sub-pattern="0" where="end" style-ref="element-name"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
<context ref="namespace"/>
|
||||
<context ref="element-name"/>
|
||||
<context style-ref="error" extend-parent="false">
|
||||
<match>\S</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="close-tag-outside-tag" style-ref="error">
|
||||
<match>/></match>
|
||||
</context>
|
||||
|
||||
<context id="xml">
|
||||
<include>
|
||||
<context ref="comment"/>
|
||||
<context ref="doctype"/>
|
||||
<context ref="cdata"/>
|
||||
<context ref="prolog"/>
|
||||
<context ref="processing-instruction"/>
|
||||
<context ref="start-tag"/>
|
||||
<context ref="end-tag"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
<context ref="close-tag-outside-tag"/>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
</language>
|
@ -1,5 +1,5 @@
|
||||
<style-scheme name="Peacocks In Space" id="peacocks-in-space" version="1.0">
|
||||
<author> ITDominator</author>
|
||||
<author> ITDominator</author>
|
||||
<description>An attempted clone of Dayle Rees' Peacocks In Space theme.</description>
|
||||
|
||||
<style name="current-line" background="#2b303b" />
|
||||
@ -117,4 +117,6 @@
|
||||
<style name="python3:method-calls" foreground="#e6db74" />
|
||||
<style name="java:keyword" foreground="#8998b9" />
|
||||
<style name="method-calls" foreground="#e6db74" />
|
||||
<style name="xml:processing-instruction" />
|
||||
<style name="xml:cdata-delim" foreground="#8998b9" />
|
||||
</style-scheme>
|
||||
|
@ -114,4 +114,5 @@
|
||||
<style name="js:switch-statement" foreground="#00a8c6" />
|
||||
<style name="python:multiline-string" foreground="#454a54" />
|
||||
<style name="python3:method-calls" foreground="#e6db74" />
|
||||
<style name="xml:cdata-delim" foreground="#8998b9" />
|
||||
</style-scheme>
|
||||
|