Редактирование темы Yaru Gtk: где находится ресурс: ///com/ubuntu/themes/Yaru/3.20/gtk.css?

Я хотел бы отредактировать темную тему Yaru для Ubuntu 20.04 (особенно ярко-оранжевый цвет на выделенном / выбранном Предметы). из других вопросов здесь я думаю, что мне нужно отредактировать /usr/share/themes/Yaru/gtk-3.20/gtk.css , но весь файл:

@import url("resource:///com/ubuntu/themes/Yaru/3.20/gtk.css");

Что такое ресурс : / //com/ubuntu/themes/Yaru/3.20/gtk. css и как мне его отредактировать?

2
задан 23 July 2020 в 13:52

1 ответ

There is a file gtk.gresource in the same directory. It contains all packed theme files. resource:///com/ubuntu/themes/Yaru/3.20/gtk.css refers to gtk.css file packed inside this file.

You can view a list of all packed files with a command

gresource list gtk.gresource

You can unpack a particular file using a command eg.

gresource extract gtk.gresource /com/ubuntu/themes/Yaru/3.20/gtk.css >somefile.css

Note that the contents of the file is extracted to stdout so you have to redirect it to some other file.

I don't know however how to pack the files again into gtk.gresource after editing. But you don't have to pack them, you can unpack all files from gtk.gresource file and leave them in unpacked form.

I recommend however that you don't edit the Yaru theme in place because your changes might be overwritten when the theme's files are updated. Make a copy, change the theme's name (you must edit index.theme file in theme's main dir) to something that is unlikely to be used by standard themes (I use "My Theme" for example) and edit the copy.

3
ответ дан 30 July 2020 в 22:04

Другие вопросы по тегам:

Похожие вопросы: