How I can add any color themes into Scratch?

Asked by q

I wanna add any color scheme into Scratch, but I don't know how. Where I can find default Scratch themes (kate, oblivion etc.) in my system?

Question information

Language:
English Edit question
Status:
Answered
For:
Scratch Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mario Guerriero (mefrio-g) said :
#1

You can find them at: /usr/share/gtksourceview-3.0/styles/

Take a look here for more informations:
https://live.gnome.org/GtkSourceView/StyleSchemes

Revision history for this message
Filipe Manuel Azinhal Funenga (ffunenga-deactivatedaccount) said :
#2

I've followed the following steps:
    $ mkdir ~/.local/share/gtksourceview-3.0/styles/
    $ cd ~/.local/share/gtksourceview-3.0/styles/
    $ cp /usr/share/gtksourceview-3.0/styles/classic.xml custom.xml
    # edit custom.xml to your liking

More info at: https://developer.gnome.org/gtksourceview/stable/style-reference.html

example (caution, it needs more tweaking!):
<?xml version="1.0" encoding="UTF-8"?>

<style-scheme id="dark-ffunenga" _name="Dark" version="1.0">

    <author>Filipe Funenga</author>
    <description>Dark color scheme based on Duncan Lock's theme for geany</description>

    <style name="text" foreground="#white" background="#1E1E1E"/>
    <style name="selection" foreground="#white" background="#333964"/>
    <style name="current-line" foreground="#black" background="#2F2F2F"/>
    <style name="line-numbers" foreground="#black" background="#d0d0d0"/>
    <style name="draw-spaces" foreground="#424242"/>
    <style name="cursor" foreground="#white"/>
    <style name="bracket-match" foreground="#white" background="#50AA15" bold="true"/>
    <style name="bracket-mismatch" foreground="#white" background="#AA1515" bold="true"/>
    <style name="search-match" foreground="#black" background="#B8F4B8"/>
    <style name="right-margin" foreground="#white" width="2"/>

    <style name="def:comment" foreground="#747474"/>
    <style name="def:shebang" foreground="#747474" bold="true"/>
    <style name="def:doc-comment-element" italic="true"/>
    <style name="def:preprocessor" foreground="#B2A886" bold="true"/>
    <style name="def:string" foreground="#A18651" bold="true"/>
    <style name="def:constant" foreground="#7EB35B"/>
    <style name="def:type" foreground="#FFCB4F" bold="true"/>
    <style name="def:statement" foreground="#FFCB4F" bold="true"/>
    <style name="def:special-constant" foreground="#FFCB4F" bold="true"/>
    <style name="def:keyword" foreground="#FFCB4F" bold="true"/>

</style-scheme>

Can you help with this problem?

Provide an answer of your own, or ask q for more information if necessary.

To post a message you must log in.