Add basic .xrdb/.Xresources import plugin

Adds basic support for importing .Xresources and .xrdb files as Theme
resources.

Examples of terminal color schemes in .xrdb format can be found here:
https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/xrdb

Examples of terminal themes in .Xresources format can be found here:
https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/Xresources

https://terminal.sexy also supports exporting themes is Xresources
format.
This commit is contained in:
Leroy Hopson 2021-07-18 23:11:31 +07:00
parent 7b63079594
commit 3e2162d366
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
11 changed files with 369 additions and 1 deletions

View file

@ -3,6 +3,7 @@ extends EditorPlugin
var pty_supported := OS.get_name() in ["X11", "Server", "OSX"]
var asciicast_import_plugin
var xrdb_import_plugin
var terminal_panel: Control
@ -10,6 +11,9 @@ func _enter_tree():
asciicast_import_plugin = preload("./import_plugins/asciicast_import_plugin.gd").new()
add_import_plugin(asciicast_import_plugin)
xrdb_import_plugin = preload("./import_plugins/xrdb_import_plugin.gd").new()
add_import_plugin(xrdb_import_plugin)
var asciicast_script = preload("./resources/asciicast.gd")
add_custom_type("Asciicast", "Animation", asciicast_script, null)
@ -37,6 +41,9 @@ func _exit_tree():
remove_import_plugin(asciicast_import_plugin)
asciicast_import_plugin = null
remove_import_plugin(xrdb_import_plugin)
xrdb_import_plugin = null
remove_custom_type("Asciicast")
remove_custom_type("Terminal")