You are not logged in.
Pages: 1
Hi all,
I hope this is the correct place to ask. If not please feel free to move it:
I thought I'd try editing a few of the themes for Mousepad, and then save them to a local config, just as the instructions provide for terminal. But I can neither any information about Mousepad nor can I find any obvious location on my system for where the existing themes for it are stored.
Is this possible? Can I do something like
~/.local/share/xfce4/mousepad/colorschemes/
and put my files in there?
Offline
Hello and welcome.
Yes, Mousepad can make use of gtksourceview styles (color schemes). If you put them in ~/.local/share/gtksourceview-3.0/styles, mousepad will pick them up.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
strangely, that didn't finally work.
Did the expected - restart etc. but nope, no new theme options appear. To be sure I hadn't corrupted any formatting I just copied a theme from /usr/share dir, made a small edit, and saved the file in suggested location. Not picked up by Mousepad.
It's possible my installation is missing something. It's xfce4 on top of a base Arch install, that said though I did install xfce4 and xfce4-goodies as groups.
Offline
That's odd. Try running this command:
gsettings set org.xfce.mousepad.preferences.view color-scheme 'STYLE'
...where STYLE is the name of an xml style file in ~/.local/share/gtksourceview-3.0/styles.
Example:
gsettings set org.xfce.mousepad.preferences.view color-scheme 'build'
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I simply get no output at all.
Doesn't throw any errors or indeed messages. And yes gsettings is installed, I simply have no output. Nor has Mousepad picked up any additional options.
Offline
Really odd. I just built an Arch-based Xfce install and all I had to do was drop a style file in that location and restart mousepad. Can I see:
ls -l ~/.local/share/gtksourceview-3.0/styles
...as well as the content of the file you put in there?
Also, the results of:
gsettings get org.xfce.mousepad.preferences.view color-scheme
Note: I've been using the styles from here.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Sure, here you go. Just a note before I paste the output - when you said "all I had to do was drop a style file in that location" well, I had to create
gtksourceview-3.0/
and subdirs as they didn't exist.
If it's helpful to you (and thank you for trying to help, it's very much appreciated), once I'd finished installing xfce on top of Arch and I created my user, using the `useradd -m` option in fact only created the folder
/home/<username>/
but NOT any of the expected subdirectories below it. So, when trying to solve another recent problem and which was the fact that the folders I had to add into /home/<username> such as "Downloads" or "Documents" were not correctly displaying their icons, I discovered that the file
~/.config/user-dirs.dirs
didn't exist. After creating this file and logging back in all was well. So, it's possible that something wasn't quite set up correctly when creating my user account?
Output of
ls -l ~/.local/share/gtksourceview-3.0/styles
total 8
-rw-r--r-- 1 alan alan 4340 Feb 20 12:10 my-solarized-dark.xml
Output of
gsettings get org.xfce.mousepad.preferences.view color-scheme
'my-solarized-dark.xml'
The theme file above is simply a copy of the supplied 'solarized-dark` but in which I changed the background colour (I believe) to black. So:
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2011 Craig Russell
Author: Craig Russell <craig@craig-russell.co.uk>
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, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<style-scheme id="solarized-dark" _name="Solarized Dark" version="1.0">
<author>Craig Russell</author>
<_description>Color scheme using Solarized dark color palette</_description>
<!-- Solarized Palette -->
<color name="base03" value="#000000"/>
<color name="base02" value="#073642"/>
<color name="base01" value="#586E75"/>
<color name="base00" value="#657B83"/>
<color name="base0" value="#839496"/>
<color name="base1" value="#93A1A1"/>
<color name="base2" value="#EEE8D5"/>
<color name="base3" value="#FDF6E3"/>
<color name="yellow" value="#B58900"/>
<color name="orange" value="#CB4B16"/>
<color name="red" value="#DC322F"/>
<color name="magenta" value="#D33682"/>
<color name="violet" value="#6C71C4"/>
<color name="blue" value="#268BD2"/>
<color name="cyan" value="#2AA198"/>
<color name="green" value="#859900"/>
<color name="base03-02-blend" value="#032F3B"/>
<!-- Global Settings -->
<style name="text" foreground="base1" background="base03"/>
<style name="selection" foreground="base03" background="base00"/>
<style name="cursor" foreground="base1"/>
<style name="secondary-cursor" foreground="base00"/>
<style name="current-line" background="base02"/>
<style name="line-numbers" foreground="base01" background="base02"/>
<style name="background-pattern" background="base03-02-blend"/>
<!-- Bracket Matching -->
<style name="bracket-match" foreground="base03" background="base01"/>
<style name="bracket-mismatch" foreground="red" background="base01"/>
<!-- Right Margin -->
<style name="right-margin" foreground="base2" background="base1"/>
<!-- Search Matching -->
<style name="search-match" foreground="base03" background="yellow"/>
<!-- Comments -->
<style name="def:comment" foreground="base01"/>
<style name="def:shebang" foreground="base01" bold="true"/>
<style name="def:doc-comment-element" italic="true"/>
<!-- Constants -->
<style name="def:constant" foreground="cyan"/>
<style name="def:special-char" foreground="green"/>
<!-- Identifiers -->
<style name="def:identifier" foreground="blue"/>
<!-- Statements -->
<style name="def:statement" foreground="orange"/>
<!-- Types -->
<style name="def:type" foreground="yellow"/>
<!-- Operators -->
<style name="def:operator" foreground="green"/>
<!-- Others -->
<style name="def:preprocessor" foreground="violet"/>
<style name="def:error" foreground="red" bold="true"/>
<style name="def:note" foreground="magenta" bold="true"/>
<style name="def:underlined" italic="true" underline="single"/>
<!-- Heading styles, uncomment to enable -->
<!--
<style name="def:heading0" scale="5.0"/>
<style name="def:heading1" scale="2.5"/>
<style name="def:heading2" scale="2.0"/>
<style name="def:heading3" scale="1.7"/>
<style name="def:heading4" scale="1.5"/>
<style name="def:heading5" scale="1.3"/>
<style name="def:heading6" scale="1.2"/>
-->
</style-scheme>
Offline
but NOT any of the expected subdirectories below it. So, when trying to solve another recent problem and which was the fact that the folders I had to add into /home/<username> such as "Downloads" or "Documents" were not correctly displaying their icons, I discovered that the file
~/.config/user-dirs.dirs
didn't exist. After creating this file and logging back in all was well. So, it's possible that something wasn't quite set up correctly when creating my user account?
That shouldn't matter, however, if you install the xdg-user-dirs package, it will create all those folders for you automatically and the user-dirs.dirs file.
Output of
gsettings get org.xfce.mousepad.preferences.view color-scheme 'my-solarized-dark.xml'
Try again without the xml part:
gsettings set org.xfce.mousepad.preferences.view color-scheme 'my-solarized-theme'
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
nothing.
No output, nothing changes, Mousepad not picked it up, nor is it available.
p.s. yes, thank you, I did install that user-dirs package. Am slightly surprised it wasn't included in either xorg or xfce4 groups.
Offline
Solved it! (with thanks for your help)
I followed one of the above links you posted to the Gtk styles page. I clicked on one of them, copied and pasted the raw text into a local '.xml' file, and which Mousepad picked up immediately (expected behaviour).
I opened the installed Gtk styles under the /usr/share, and copied and pasted one into local and renamed the file. I renamed the file "solarized-dark.xml" to "solarized-other.xml". Mousepad didn't pick this one up.
Why? Because I had to also change the title of that file at the first lines of the xml file description:
<style-scheme id="solarized-dark" _name="Solarized Dark" version="1.0">
became
<style-scheme id="solarized-other" _name="Solarized Other" version="1.0">
Thanks again though - a small thing but very useful, and good to know that my install isn't borked
Offline
Good catch. I was only using new themes for my testing.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
first of all, i apologize for bringing back old topics, i know some people dont like that, but i have a good reason: when newbies (like me) search for a problem and this is the first result we get, its very helpful to have different approaches which could solve the problem!
so, this is what happened to me:
as it says in the docs:
Manual actions required for some version changes
As of version 0.5.4, Mousepad is likely to use GtkSourceView 4 (this is decided at compile time by the packager). If this is the case, the custom themes must be copied from ~/.local/share/gtksourceview-3.0/styles/ to ~/.local/share/gtksourceview-4/styles/:
im on debian (bookworm) and my mousepad version is 0.5.10 but as nothing else seemed to work, y just softlinked the 3.0 folder from a 4 folder and that did the trick, after restarting mousepad, it picked up the theme instantly!
i dont even have that 'gsettings' command, but i didnt need that, just to put the theme files into the new 'gtksourceview-4' (not 4.0, just 4) even if the version i have is previous the one noted on the docs!
hope this could help someone and save you some time!
Offline
Pages: 1
[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 611.2 KiB (Peak: 628.04 KiB) ]