0

How to apply custom style for Mousepad 0.5.10 in Debian 12? I created a copy of classic.xml and modified the content of the copy as you can see below. But if I run Mousepad, then the new color-scheme is not listed within preferences > view > color scheme.

$ ls -l /usr/share/gtksourceview-3.0/styles
total 80
-rw-r--r-- 1 root root 5304 14. Sep 2019  classic.xml
-rw-r--r-- 1 root root 7332 14. Sep 2019  cobalt.xml
-rw-r--r-- 1 root root 8637 14. Sep 2019  kate.xml
-rw-r--r-- 1 root root 5310  8. Apr 19:16 my_classic.xml
-rw-r--r-- 1 root root 6498 14. Sep 2019  oblivion.xml
-rw-r--r-- 1 root root 4340 14. Sep 2019  solarized-dark.xml
-rw-r--r-- 1 root root 4265 14. Sep 2019  solarized-light.xml
-rw-r--r-- 1 root root 3441 14. Sep 2019  styles.rng
-rw-r--r-- 1 root root 6214 14. Sep 2019  tango.xml


$ sudo nano /usr/share/gtksourceview-3.0/styles/my_classic.xml

<style-scheme id="my_classic" _name="My-Classic" version="1.0">
  <author>GtkSourceView team</author>
  <_description>Classic color scheme</_description>
  <style name="current-line-number" background="#008A8C"/>
</style-scheme>

1 Answer 1

1

It seems that the Mousepad developers have made a change to use gtksourceview4. Based on info from this post on the Xfce forums, I got Mousepad to pick up styles by putting them into gtksourceview-4 directories rather than gtksourceview-3.0.

I only tried directories 1 and 4 in the following list, but I strongly suspect that all of them would work. If a particular folder isn't there, as was the case for the folder under ~/.local/share on my system, just create it.

  1. ~/.local/share/gtksourceview-4/styles/
  2. /usr/share/gnome/gtksourceview-4/styles/
  3. /usr/local/share/gtksourceview-4/styles/
  4. /usr/share/gtksourceview-4/styles/

Important Note: the number in these folder names must be 4 and not 4.0.

1
  • I am currently using .local/share/gtksourceview-4/styles/ on Fedora. I made a style also. That was the path that got it working. Commented May 3, 2024 at 13:44

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.