Compare commits
6 Commits
ff27fbdf6c
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| ce22ed6a53 | |||
| c16493037d | |||
| 849e7611ca | |||
| 2c453bc621 | |||
| 530fe7c3ab | |||
| 5e5cc50ba8 |
29
src/app.py
29
src/app.py
@@ -23,13 +23,14 @@ class Application:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Application, self).__init__()
|
super(Application, self).__init__()
|
||||||
|
|
||||||
if not settings_manager.is_trace_debug():
|
|
||||||
self.load_ipc()
|
|
||||||
|
|
||||||
self.setup_debug_hook()
|
self.setup_debug_hook()
|
||||||
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
if not settings_manager.is_trace_debug():
|
||||||
|
if not self.load_ipc():
|
||||||
|
return
|
||||||
|
|
||||||
win = Window()
|
win = Window()
|
||||||
win.start()
|
win.start()
|
||||||
|
|
||||||
@@ -39,13 +40,20 @@ class Application:
|
|||||||
ipc_server = IPCServer()
|
ipc_server = IPCServer()
|
||||||
|
|
||||||
self.ipc_realization_check(ipc_server)
|
self.ipc_realization_check(ipc_server)
|
||||||
if not ipc_server.is_ipc_alive:
|
if ipc_server.is_ipc_alive:
|
||||||
for arg in unknownargs + [args.new_tab,]:
|
return True
|
||||||
if os.path.isfile(arg):
|
|
||||||
message = f"FILE|{arg}"
|
|
||||||
ipc_server.send_ipc_message(message)
|
|
||||||
|
|
||||||
raise AppLaunchException(f"{APP_NAME} IPC Server Exists: Have sent path(s) to it and closing...")
|
logger.warning(f"{app_name} IPC Server Exists: Have sent path(s) to it and closing...")
|
||||||
|
for arg in unknownargs + [args.new_tab,]:
|
||||||
|
if os.path.isfile(arg):
|
||||||
|
message = f"FILE|{arg}"
|
||||||
|
ipc_server.send_ipc_message(message)
|
||||||
|
|
||||||
|
if os.path.isdir(arg):
|
||||||
|
message = f"DIR|{arg}"
|
||||||
|
ipc_server.send_ipc_message(message)
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def ipc_realization_check(self, ipc_server):
|
def ipc_realization_check(self, ipc_server):
|
||||||
try:
|
try:
|
||||||
@@ -53,9 +61,6 @@ class Application:
|
|||||||
except Exception:
|
except Exception:
|
||||||
ipc_server.send_test_ipc_message()
|
ipc_server.send_test_ipc_message()
|
||||||
|
|
||||||
with suppress(Exception):
|
|
||||||
ipc_server.create_ipc_listener()
|
|
||||||
|
|
||||||
def setup_debug_hook(self):
|
def setup_debug_hook(self):
|
||||||
# Typically: ValueError: signal only works in main thread
|
# Typically: ValueError: signal only works in main thread
|
||||||
with suppress(ValueError):
|
with suppress(ValueError):
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ class BaseContainer(Gtk.Box):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(BaseContainer, self).__init__()
|
super(BaseContainer, self).__init__()
|
||||||
|
|
||||||
self.ctx = self.get_style_context()
|
|
||||||
|
|
||||||
self._setup_styling()
|
self._setup_styling()
|
||||||
self._setup_signals()
|
self._setup_signals()
|
||||||
self._subscribe_to_events()
|
self._subscribe_to_events()
|
||||||
@@ -27,9 +25,11 @@ class BaseContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
self.set_orientation(Gtk.Orientation.VERTICAL)
|
self.ctx = self.get_style_context()
|
||||||
self.ctx.add_class("base-container")
|
self.ctx.add_class("base-container")
|
||||||
|
|
||||||
|
self.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
@@ -38,9 +38,9 @@ class BaseContainer(Gtk.Box):
|
|||||||
event_system.subscribe("remove-transparency", self._remove_transparency)
|
event_system.subscribe("remove-transparency", self._remove_transparency)
|
||||||
|
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
self.add(HeaderContainer())
|
self.add( HeaderContainer() )
|
||||||
self.add(BodyContainer())
|
self.add( BodyContainer() )
|
||||||
self.add(FooterContainer())
|
self.add( FooterContainer() )
|
||||||
|
|
||||||
def _update_transparency(self):
|
def _update_transparency(self):
|
||||||
self.ctx.add_class(f"mw_transparency_{settings.theming.transparency}")
|
self.ctx.add_class(f"mw_transparency_{settings.theming.transparency}")
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ class BodyContainer(Gtk.Box):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(BodyContainer, self).__init__()
|
super(BodyContainer, self).__init__()
|
||||||
|
|
||||||
self.ctx = self.get_style_context()
|
|
||||||
|
|
||||||
self._setup_styling()
|
self._setup_styling()
|
||||||
self._setup_signals()
|
self._setup_signals()
|
||||||
self._subscribe_to_events()
|
self._subscribe_to_events()
|
||||||
@@ -27,8 +25,10 @@ class BodyContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
self.set_orientation(Gtk.Orientation.HORIZONTAL)
|
self.ctx = self.get_style_context()
|
||||||
self.ctx.add_class("body-container")
|
self.ctx.add_class("body-container")
|
||||||
|
|
||||||
|
self.set_orientation(Gtk.Orientation.HORIZONTAL)
|
||||||
self.set_homogeneous(True)
|
self.set_homogeneous(True)
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
@@ -37,8 +37,7 @@ class BodyContainer(Gtk.Box):
|
|||||||
def _subscribe_to_events(self):
|
def _subscribe_to_events(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
self.add(LeftContainer())
|
self.add( LeftContainer() )
|
||||||
self.add(CenterContainer())
|
self.add( CenterContainer() )
|
||||||
self.add(RightContainer())
|
self.add( RightContainer() )
|
||||||
@@ -25,14 +25,13 @@ class CenterContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
self.set_orientation(Gtk.Orientation.VERTICAL)
|
self.ctx = self.get_style_context()
|
||||||
|
self.ctx.add_class("center-container")
|
||||||
|
|
||||||
|
self.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
self.set_hexpand(True)
|
self.set_hexpand(True)
|
||||||
self.set_vexpand(True)
|
self.set_vexpand(True)
|
||||||
|
|
||||||
ctx = self.get_style_context()
|
|
||||||
ctx.add_class("center-container")
|
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
@@ -41,7 +40,7 @@ class CenterContainer(Gtk.Box):
|
|||||||
|
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
glade_box = self._builder.get_object("glade_box")
|
glade_box = self._builder.get_object("glade_box")
|
||||||
button = Gtk.Button(label = "Click Me!")
|
button = Gtk.Button(label = "Click Me!")
|
||||||
|
|
||||||
button.connect("clicked", self._hello_world)
|
button.connect("clicked", self._hello_world)
|
||||||
|
|
||||||
|
|||||||
3
src/core/containers/code/__init__.py
Normal file
3
src/core/containers/code/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"""
|
||||||
|
Containers Package
|
||||||
|
"""
|
||||||
40
src/core/containers/code/editors_container.py
Normal file
40
src/core/containers/code/editors_container.py
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import Gtk
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from ...widgets.separator_widget import Separator
|
||||||
|
from ...widgets.code.miniview_widget import MiniViewWidget
|
||||||
|
from .paned_editors_container import PanedEditorsContainer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class EditorsContainer(Gtk.Box):
|
||||||
|
def __init__(self):
|
||||||
|
super(EditorsContainer, self).__init__()
|
||||||
|
|
||||||
|
self._setup_styling()
|
||||||
|
self._setup_signals()
|
||||||
|
self._subscribe_to_events()
|
||||||
|
self._load_widgets()
|
||||||
|
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
|
||||||
|
def _setup_styling(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _setup_signals(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _subscribe_to_events(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _load_widgets(self):
|
||||||
|
self.add( Separator("separator_left") )
|
||||||
|
self.add( PanedEditorsContainer() )
|
||||||
|
self.add( Separator("separator_right") )
|
||||||
|
self.add( MiniViewWidget() )
|
||||||
75
src/core/containers/code/paned_editors_container.py
Normal file
75
src/core/containers/code/paned_editors_container.py
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import GLib
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from ...widgets.code.view import SourceView
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class PanedEditorsContainer(Gtk.Paned):
|
||||||
|
def __init__(self):
|
||||||
|
super(PanedEditorsContainer, self).__init__()
|
||||||
|
|
||||||
|
self._setup_styling()
|
||||||
|
self._setup_signals()
|
||||||
|
self._subscribe_to_events()
|
||||||
|
self._load_widgets()
|
||||||
|
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
|
||||||
|
def _setup_styling(self):
|
||||||
|
self.ctx = self.get_style_context()
|
||||||
|
self.ctx.add_class("paned-editors-container")
|
||||||
|
|
||||||
|
self.set_hexpand(True)
|
||||||
|
self.set_vexpand(True)
|
||||||
|
# self.set_homogeneous(True)
|
||||||
|
self.set_wide_handle(True)
|
||||||
|
|
||||||
|
def _setup_signals(self):
|
||||||
|
self.map_id = self.connect("map", self._init_map)
|
||||||
|
|
||||||
|
def _subscribe_to_events(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _load_widgets(self):
|
||||||
|
scrolled_win1 = Gtk.ScrolledWindow()
|
||||||
|
scrolled_win2 = Gtk.ScrolledWindow()
|
||||||
|
source_view1 = SourceView()
|
||||||
|
source_view2 = SourceView()
|
||||||
|
|
||||||
|
source_view1.sibling_right = source_view2
|
||||||
|
source_view2.sibling_left = source_view1
|
||||||
|
|
||||||
|
scrolled_win1.add( source_view1 )
|
||||||
|
scrolled_win2.add( source_view2 )
|
||||||
|
|
||||||
|
self.add1(scrolled_win1)
|
||||||
|
self.add2(scrolled_win2)
|
||||||
|
|
||||||
|
scrolled_win1.show_all()
|
||||||
|
scrolled_win2.show_all()
|
||||||
|
|
||||||
|
def _init_map(self, view):
|
||||||
|
def _first_show_init():
|
||||||
|
self.disconnect(self.map_id)
|
||||||
|
del self.map_id
|
||||||
|
|
||||||
|
self._handle_first_show()
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
# GLib.timeout_add(1000, _first_show_init)
|
||||||
|
GLib.idle_add(_first_show_init)
|
||||||
|
|
||||||
|
def _handle_first_show(self):
|
||||||
|
self.set_position(
|
||||||
|
self.get_allocated_width() / 2
|
||||||
|
)
|
||||||
|
|
||||||
@@ -13,8 +13,6 @@ class FooterContainer(Gtk.Box):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(FooterContainer, self).__init__()
|
super(FooterContainer, self).__init__()
|
||||||
|
|
||||||
self.ctx = self.get_style_context()
|
|
||||||
|
|
||||||
self._setup_styling()
|
self._setup_styling()
|
||||||
self._setup_signals()
|
self._setup_signals()
|
||||||
self._subscribe_to_events()
|
self._subscribe_to_events()
|
||||||
@@ -24,18 +22,17 @@ class FooterContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
self.set_orientation(Gtk.Orientation.HORIZONTAL)
|
self.ctx = self.get_style_context()
|
||||||
|
|
||||||
self.set_hexpand(True)
|
|
||||||
|
|
||||||
self.ctx.add_class("footer-container")
|
self.ctx.add_class("footer-container")
|
||||||
|
|
||||||
|
self.set_orientation(Gtk.Orientation.HORIZONTAL)
|
||||||
|
self.set_hexpand(True)
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
def _subscribe_to_events(self):
|
def _subscribe_to_events(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ class HeaderContainer(Gtk.Box):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(HeaderContainer, self).__init__()
|
super(HeaderContainer, self).__init__()
|
||||||
|
|
||||||
self.ctx = self.get_style_context()
|
|
||||||
|
|
||||||
self._setup_styling()
|
self._setup_styling()
|
||||||
self._setup_signals()
|
self._setup_signals()
|
||||||
self._subscribe_to_events()
|
self._subscribe_to_events()
|
||||||
@@ -26,19 +24,18 @@ class HeaderContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
self.set_orientation(Gtk.Orientation.HORIZONTAL)
|
self.ctx = self.get_style_context()
|
||||||
|
|
||||||
self.set_hexpand(True)
|
|
||||||
|
|
||||||
self.ctx.add_class("header-container")
|
self.ctx.add_class("header-container")
|
||||||
|
|
||||||
|
self.set_orientation(Gtk.Orientation.HORIZONTAL)
|
||||||
|
self.set_hexpand(True)
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
def _subscribe_to_events(self):
|
def _subscribe_to_events(self):
|
||||||
event_system.subscribe("tggl-top-main-menubar", self.tggl_top_main_menubar)
|
event_system.subscribe("tggl-top-main-menubar", self.tggl_top_main_menubar)
|
||||||
|
|
||||||
|
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
button = Gtk.Button(label = "Interactive Debug")
|
button = Gtk.Button(label = "Interactive Debug")
|
||||||
button.connect("clicked", self._interactive_debug)
|
button.connect("clicked", self._interactive_debug)
|
||||||
|
|||||||
@@ -22,13 +22,12 @@ class LeftContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
|
self.ctx = self.get_style_context()
|
||||||
|
self.ctx.add_class("left-container")
|
||||||
|
|
||||||
self.set_orientation(Gtk.Orientation.VERTICAL)
|
self.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
|
|
||||||
self.set_vexpand(True)
|
self.set_vexpand(True)
|
||||||
|
|
||||||
ctx = self.get_style_context()
|
|
||||||
ctx.add_class("left-container")
|
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|||||||
@@ -23,13 +23,12 @@ class RightContainer(Gtk.Box):
|
|||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
|
self.ctx = self.get_style_context()
|
||||||
|
self.ctx.add_class("right-container")
|
||||||
|
|
||||||
self.set_orientation(Gtk.Orientation.VERTICAL)
|
self.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
|
|
||||||
self.set_vexpand(True)
|
self.set_vexpand(True)
|
||||||
|
|
||||||
ctx = self.get_style_context()
|
|
||||||
ctx.add_class("right-container")
|
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|||||||
3
src/core/widgets/code/__init__.py
Normal file
3
src/core/widgets/code/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"""
|
||||||
|
Code Package
|
||||||
|
"""
|
||||||
29
src/core/widgets/code/command_system.py
Normal file
29
src/core/widgets/code/command_system.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from .commands import *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class CommandSystem:
|
||||||
|
def __init__(self):
|
||||||
|
super(CommandSystem, self).__init__()
|
||||||
|
|
||||||
|
self.data: list = ()
|
||||||
|
|
||||||
|
|
||||||
|
def set_data(self, *args, **kwargs):
|
||||||
|
self.data = (args, kwargs)
|
||||||
|
|
||||||
|
def exec(self, command: str):
|
||||||
|
if not command in globals(): return
|
||||||
|
|
||||||
|
# method = getattr(self, command, None)
|
||||||
|
method = globals()[command]
|
||||||
|
args, kwargs = self.data
|
||||||
|
if kwargs:
|
||||||
|
method.execute(*args, kwargs)
|
||||||
|
else:
|
||||||
|
method.execute(*args)
|
||||||
12
src/core/widgets/code/commands/__init__.py
Normal file
12
src/core/widgets/code/commands/__init__.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
"""
|
||||||
|
Commands Package
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
command.replace(".py", "") for command in os.listdir(
|
||||||
|
os.path.dirname(__file__)
|
||||||
|
) if "__init__" not in command
|
||||||
|
]
|
||||||
22
src/core/widgets/code/commands/close_file.py
Normal file
22
src/core/widgets/code/commands/close_file.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Close File Command")
|
||||||
|
file = editor.files.new()
|
||||||
|
buffer = editor.get_buffer()
|
||||||
|
editor.set_buffer(file.buffer)
|
||||||
|
|
||||||
|
editor.files.remove_file(buffer)
|
||||||
19
src/core/widgets/code/commands/focus_left_sibling.py
Normal file
19
src/core/widgets/code/commands/focus_left_sibling.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Focus Left Sibling Command")
|
||||||
|
if not editor.sibling_left: return
|
||||||
|
editor.sibling_left.grab_focus()
|
||||||
19
src/core/widgets/code/commands/focus_right_sibling.py
Normal file
19
src/core/widgets/code/commands/focus_right_sibling.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Focus Right Sibling Command")
|
||||||
|
if not editor.sibling_right: return
|
||||||
|
editor.sibling_right.grab_focus()
|
||||||
18
src/core/widgets/code/commands/line_down.py
Normal file
18
src/core/widgets/code/commands/line_down.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Line Up Command")
|
||||||
|
editor.emit("move-lines", True)
|
||||||
18
src/core/widgets/code/commands/line_up.py
Normal file
18
src/core/widgets/code/commands/line_up.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Line Up Command")
|
||||||
|
editor.emit("move-lines", False)
|
||||||
26
src/core/widgets/code/commands/move_to_left_sibling.py
Normal file
26
src/core/widgets/code/commands/move_to_left_sibling.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Move To Left Sibling Command")
|
||||||
|
if not editor.sibling_left: return
|
||||||
|
|
||||||
|
buffer = editor.get_buffer()
|
||||||
|
sibling_file, popped_file = editor.files.pop_file(buffer)
|
||||||
|
|
||||||
|
editor.set_buffer(sibling_file.buffer)
|
||||||
|
editor.sibling_left.set_buffer(buffer)
|
||||||
|
editor.sibling_left.files.append(popped_file)
|
||||||
|
editor.sibling_left.grab_focus()
|
||||||
27
src/core/widgets/code/commands/move_to_right_sibling.py
Normal file
27
src/core/widgets/code/commands/move_to_right_sibling.py
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Move To Right Sibling Command")
|
||||||
|
if not editor.sibling_right: return
|
||||||
|
|
||||||
|
buffer = editor.get_buffer()
|
||||||
|
sibling_file, popped_file = editor.files.pop_file(buffer)
|
||||||
|
|
||||||
|
editor.set_buffer(sibling_file.buffer)
|
||||||
|
editor.sibling_right.set_buffer(buffer)
|
||||||
|
editor.sibling_right.files.append(popped_file)
|
||||||
|
editor.sibling_right.grab_focus()
|
||||||
|
|
||||||
25
src/core/widgets/code/commands/new_file.py
Normal file
25
src/core/widgets/code/commands/new_file.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("New File Command")
|
||||||
|
file = editor.files.new()
|
||||||
|
language = editor.language_manager \
|
||||||
|
.guess_language("file.txt", None)
|
||||||
|
|
||||||
|
file.buffer.set_language(language)
|
||||||
|
file.buffer.set_style_scheme(editor.syntax_theme)
|
||||||
|
|
||||||
|
editor.set_buffer(file.buffer)
|
||||||
35
src/core/widgets/code/commands/open_files.py
Normal file
35
src/core/widgets/code/commands/open_files.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Open File(s) Command")
|
||||||
|
gfiles = event_system.emit_and_await("open-files")
|
||||||
|
if not gfiles: return
|
||||||
|
|
||||||
|
size = len(gfiles)
|
||||||
|
for i, gfile in enumerate(gfiles):
|
||||||
|
file = editor.files.new()
|
||||||
|
file.load_path(gfile)
|
||||||
|
|
||||||
|
language = editor.language_manager \
|
||||||
|
.guess_language(file.fname, None)
|
||||||
|
file.ftype = language
|
||||||
|
file.buffer.set_language(language)
|
||||||
|
file.buffer.set_style_scheme(editor.syntax_theme)
|
||||||
|
|
||||||
|
if i == (size - 1):
|
||||||
|
editor.set_buffer(file.buffer)
|
||||||
|
|
||||||
|
|
||||||
30
src/core/widgets/code/commands/save_file.py
Normal file
30
src/core/widgets/code/commands/save_file.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Save File Command")
|
||||||
|
buffer = editor.get_buffer()
|
||||||
|
file = editor.files.get_file(buffer)
|
||||||
|
|
||||||
|
if file.ftype == "buffer":
|
||||||
|
file.save_as()
|
||||||
|
language = editor.language_manager \
|
||||||
|
.guess_language(file.fname, None)
|
||||||
|
file.ftype = language
|
||||||
|
file.buffer.set_language(language)
|
||||||
|
return
|
||||||
|
|
||||||
|
file.save()
|
||||||
|
|
||||||
26
src/core/widgets/code/commands/save_file_as.py
Normal file
26
src/core/widgets/code/commands/save_file_as.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.info("Save File As Command")
|
||||||
|
buffer = editor.get_buffer()
|
||||||
|
file = editor.files.get_file(buffer)
|
||||||
|
|
||||||
|
file.save_as()
|
||||||
|
|
||||||
|
language = editor.language_manager \
|
||||||
|
.guess_language(file.fname, None)
|
||||||
|
file.ftype = language
|
||||||
|
file.buffer.set_language(language)
|
||||||
18
src/core/widgets/code/commands/show_completion.py
Normal file
18
src/core/widgets/code/commands/show_completion.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute(
|
||||||
|
editor: GtkSource.View = None
|
||||||
|
):
|
||||||
|
logger.debug("Show Completion Command")
|
||||||
|
editor.completion.request_completion()
|
||||||
65
src/core/widgets/code/completion_manager.py
Normal file
65
src/core/widgets/code/completion_manager.py
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
from gi.repository import GLib
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from .completion_providers.example_completion_provider import ExampleCompletionProvider
|
||||||
|
from .completion_providers.lsp_completion_provider import LSPCompletionProvider
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class CompletionManager():
|
||||||
|
def __init__(self):
|
||||||
|
super(CompletionManager, self).__init__()
|
||||||
|
|
||||||
|
self._lsp_provider = LSPCompletionProvider()
|
||||||
|
self._timeout_id = None
|
||||||
|
|
||||||
|
|
||||||
|
def set_completer(self, completer):
|
||||||
|
self._completor = completer
|
||||||
|
|
||||||
|
def request_completion(self):
|
||||||
|
if self._timeout_id:
|
||||||
|
GLib.source_remove(self._timeout_id)
|
||||||
|
|
||||||
|
self._timeout_id = GLib.timeout_add(
|
||||||
|
800,
|
||||||
|
self._process_request_completion
|
||||||
|
)
|
||||||
|
|
||||||
|
def _process_request_completion(self):
|
||||||
|
self._start_completion()
|
||||||
|
|
||||||
|
self._timeout_id = None
|
||||||
|
return False
|
||||||
|
|
||||||
|
def _do_completion(self):
|
||||||
|
if self._completor.get_providers():
|
||||||
|
self._mach_completion()
|
||||||
|
else:
|
||||||
|
self._start_completion()
|
||||||
|
|
||||||
|
def _mach_completion(self):
|
||||||
|
"""
|
||||||
|
Note: Use IF providers were added to completion...
|
||||||
|
"""
|
||||||
|
self._completion.match(
|
||||||
|
self._completion.create_context()
|
||||||
|
)
|
||||||
|
|
||||||
|
def _start_completion(self):
|
||||||
|
"""
|
||||||
|
Note: Use IF NO providers have been added to completion...
|
||||||
|
"""
|
||||||
|
self._completor.start(
|
||||||
|
[
|
||||||
|
ExampleCompletionProvider(),
|
||||||
|
self._lsp_provider
|
||||||
|
],
|
||||||
|
self._completor.create_context()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
3
src/core/widgets/code/completion_providers/__init__.py
Normal file
3
src/core/widgets/code/completion_providers/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"""
|
||||||
|
Custom Completion Providers Module
|
||||||
|
"""
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# Python imports
|
||||||
|
import re
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
from gi.repository import GObject
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ExampleCompletionProvider(GObject.GObject, GtkSource.CompletionProvider):
|
||||||
|
"""
|
||||||
|
This is a custom Completion Example Provider.
|
||||||
|
# NOTE: used information from here --> https://warroom.rsmus.com/do-that-auto-complete/
|
||||||
|
"""
|
||||||
|
__gtype_name__ = 'ExampleCompletionProvider'
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
GObject.Object.__init__(self)
|
||||||
|
|
||||||
|
def do_get_name(self):
|
||||||
|
""" Returns: a new string containing the name of the provider. """
|
||||||
|
return 'Example Completion Provider'
|
||||||
|
|
||||||
|
def do_match(self, context):
|
||||||
|
""" Get whether the provider match the context of completion detailed in context. """
|
||||||
|
# NOTE: True for debugging but context needs to normally get checked for actual usage needs.
|
||||||
|
# TODO: Fix me
|
||||||
|
return True
|
||||||
|
|
||||||
|
def do_get_priority(self):
|
||||||
|
""" Determin position in result list along other providor results. """
|
||||||
|
return 1
|
||||||
|
|
||||||
|
# def do_get_activation(self):
|
||||||
|
# """ The context for when a provider will show results """
|
||||||
|
# return GtkSource.CompletionActivation.NONE
|
||||||
|
# return GtkSource.CompletionActivation.USER_REQUESTED
|
||||||
|
# return GtkSource.CompletionActivation.INTERACTIVE
|
||||||
|
|
||||||
|
def do_populate(self, context):
|
||||||
|
"""
|
||||||
|
In this instance, it will do 2 things:
|
||||||
|
1) always provide Hello World! (Not ideal but an option so its in the example)
|
||||||
|
2) Utilizes the Gtk.TextIter from the TextBuffer to determine if there is a jinja
|
||||||
|
example of '{{ custom.' if so it will provide you with the options of foo and bar.
|
||||||
|
If selected it will insert foo }} or bar }}, completing your syntax...
|
||||||
|
|
||||||
|
PLEASE NOTE the GtkTextIter Logic and regex are really rough and should be adjusted and tuned
|
||||||
|
"""
|
||||||
|
|
||||||
|
proposals = [
|
||||||
|
GtkSource.CompletionItem(label='Hello World!', text = 'Hello World!', icon = None, info = None) # NOTE: Always proposed...
|
||||||
|
]
|
||||||
|
|
||||||
|
# Gtk Versions differ on get_iter responses...
|
||||||
|
end_iter = context.get_iter()
|
||||||
|
if not isinstance(end_iter, Gtk.TextIter):
|
||||||
|
_, end_iter = context.get_iter()
|
||||||
|
|
||||||
|
if end_iter:
|
||||||
|
buf = end_iter.get_buffer()
|
||||||
|
mov_iter = end_iter.copy()
|
||||||
|
if mov_iter.backward_search('{{', Gtk.TextSearchFlags.VISIBLE_ONLY):
|
||||||
|
mov_iter, _ = mov_iter.backward_search('{{', Gtk.TextSearchFlags.VISIBLE_ONLY)
|
||||||
|
left_text = buf.get_text(mov_iter, end_iter, True)
|
||||||
|
else:
|
||||||
|
left_text = ''
|
||||||
|
|
||||||
|
if re.match(r'.*\{\{\s*custom\.$', left_text):
|
||||||
|
proposals.append(
|
||||||
|
GtkSource.CompletionItem(label='foo', text='foo }}') # optionally proposed based on left search via regex
|
||||||
|
)
|
||||||
|
proposals.append(
|
||||||
|
GtkSource.CompletionItem(label='bar', text='bar }}') # optionally proposed based on left search via regex
|
||||||
|
)
|
||||||
|
|
||||||
|
context.add_proposals(self, proposals, True)
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
from gi.repository import GObject
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class LSPCompletionProvider(GObject.Object, GtkSource.CompletionProvider):
|
||||||
|
"""
|
||||||
|
This code is an LSP code completion plugin for Newton.
|
||||||
|
# NOTE: Some code pulled/referenced from here --> https://github.com/isamert/gedi
|
||||||
|
"""
|
||||||
|
__gtype_name__ = 'LSPProvider'
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
GObject.Object.__init__(self)
|
||||||
|
|
||||||
|
self._icon_theme = Gtk.IconTheme.get_default()
|
||||||
|
|
||||||
|
self.lsp_data = None
|
||||||
|
|
||||||
|
|
||||||
|
def pre_populate(self, context):
|
||||||
|
...
|
||||||
|
|
||||||
|
def do_get_name(self):
|
||||||
|
return "LSP Code Completion"
|
||||||
|
|
||||||
|
def get_iter_correctly(self, context):
|
||||||
|
return context.get_iter()[1] if isinstance(context.get_iter(), tuple) else context.get_iter()
|
||||||
|
|
||||||
|
def do_match(self, context):
|
||||||
|
iter = self.get_iter_correctly(context)
|
||||||
|
iter.backward_char()
|
||||||
|
|
||||||
|
buffer = iter.get_buffer()
|
||||||
|
if buffer.get_context_classes_at_iter(iter) != ['no-spell-check']:
|
||||||
|
return False
|
||||||
|
|
||||||
|
ch = iter.get_char()
|
||||||
|
# NOTE: Look to re-add or apply supprting logic to use spaces
|
||||||
|
# As is it slows down the editor in certain contexts...
|
||||||
|
# if not (ch in ('_', '.', ' ') or ch.isalnum()):
|
||||||
|
if not (ch in ('_', '.') or ch.isalnum()):
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def do_get_priority(self):
|
||||||
|
return 5
|
||||||
|
|
||||||
|
def do_populate(self, context, items = []):
|
||||||
|
# self.lsp_data
|
||||||
|
proposals = []
|
||||||
|
|
||||||
|
comp_item = GtkSource.CompletionItem.new()
|
||||||
|
comp_item.set_label("LSP Class")
|
||||||
|
comp_item.set_text("LSP Code")
|
||||||
|
# comp_item.set_icon(self.get_icon_for_type(completion.type))
|
||||||
|
comp_item.set_info("A test LSP completion item...")
|
||||||
|
|
||||||
|
context.add_proposals(self, [comp_item], True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# def do_populate(self, context, items = []):
|
||||||
|
# if hasattr(self._source_view, "completion_items"):
|
||||||
|
# items = self._source_view.completion_items
|
||||||
|
|
||||||
|
# proposals = []
|
||||||
|
# for item in items:
|
||||||
|
# proposals.append( self.create_completion_item(item) )
|
||||||
|
|
||||||
|
# context.add_proposals(self, proposals, True)
|
||||||
|
|
||||||
|
# def get_icon_for_type(self, _type):
|
||||||
|
# try:
|
||||||
|
# return self._theme.load_icon(icon_names[_type.lower()], 16, 0)
|
||||||
|
# except:
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# return self._theme.load_icon(Gtk.STOCK_ADD, 16, 0)
|
||||||
|
# except:
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# return None
|
||||||
|
|
||||||
|
# def create_completion_item(self, item):
|
||||||
|
# comp_item = GtkSource.CompletionItem.new()
|
||||||
|
# keys = item.keys()
|
||||||
|
# comp_item.set_label(item["label"])
|
||||||
|
|
||||||
|
# if "insertText" in keys:
|
||||||
|
# comp_item.set_text(item["insertText"])
|
||||||
|
|
||||||
|
# if "additionalTextEdits" in keys:
|
||||||
|
# comp_item.additionalTextEdits = item["additionalTextEdits"]
|
||||||
|
|
||||||
|
# return comp_item
|
||||||
|
|
||||||
|
|
||||||
|
# def create_completion_item(self, item):
|
||||||
|
# comp_item = GtkSource.CompletionItem.new()
|
||||||
|
# comp_item.set_label(item.label)
|
||||||
|
|
||||||
|
# if item.textEdit:
|
||||||
|
# if isinstance(item.textEdit, dict):
|
||||||
|
# comp_item.set_text(item.textEdit["newText"])
|
||||||
|
# else:
|
||||||
|
# comp_item.set_text(item.textEdit)
|
||||||
|
# else:
|
||||||
|
# comp_item.set_text(item.insertText)
|
||||||
|
|
||||||
|
# comp_item.set_icon( self.get_icon_for_type(item.kind) )
|
||||||
|
# comp_item.set_info(item.documentation)
|
||||||
|
|
||||||
|
# return comp_item
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
from gi.repository import GObject
|
||||||
|
|
||||||
|
import jedi
|
||||||
|
from jedi.api import Script
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME: Find real icon names...
|
||||||
|
icon_names = {
|
||||||
|
'import': '',
|
||||||
|
'module': '',
|
||||||
|
'class': '',
|
||||||
|
'function': '',
|
||||||
|
'statement': '',
|
||||||
|
'param': ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Jedi:
|
||||||
|
def get_script(file, doc_text):
|
||||||
|
return Script(code = doc_text, path = file)
|
||||||
|
|
||||||
|
|
||||||
|
class PythonCompletionProvider(GObject.Object, GtkSource.CompletionProvider):
|
||||||
|
"""
|
||||||
|
This code is A python code completion plugin for Newton.
|
||||||
|
# NOTE: Some code pulled/referenced from here --> https://github.com/isamert/gedi
|
||||||
|
"""
|
||||||
|
__gtype_name__ = 'PythonProvider'
|
||||||
|
|
||||||
|
def __init__(self, file):
|
||||||
|
GObject.Object.__init__(self)
|
||||||
|
self._theme = Gtk.IconTheme.get_default()
|
||||||
|
self._file = file
|
||||||
|
|
||||||
|
def do_get_name(self):
|
||||||
|
return "Python Code Completion"
|
||||||
|
|
||||||
|
def get_iter_correctly(self, context):
|
||||||
|
return context.get_iter()[1] if isinstance(context.get_iter(), tuple) else context.get_iter()
|
||||||
|
|
||||||
|
def do_match(self, context):
|
||||||
|
iter = self.get_iter_correctly(context)
|
||||||
|
iter.backward_char()
|
||||||
|
|
||||||
|
buffer = iter.get_buffer()
|
||||||
|
if buffer.get_context_classes_at_iter(iter) != ['no-spell-check']:
|
||||||
|
return False
|
||||||
|
|
||||||
|
ch = iter.get_char()
|
||||||
|
# NOTE: Look to re-add or apply supprting logic to use spaces
|
||||||
|
# As is it slows down the editor in certain contexts...
|
||||||
|
# if not (ch in ('_', '.', ' ') or ch.isalnum()):
|
||||||
|
if not (ch in ('_', '.') or ch.isalnum()):
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def do_get_priority(self):
|
||||||
|
return 1
|
||||||
|
|
||||||
|
def do_get_activation(self):
|
||||||
|
return GtkSource.CompletionActivation.INTERACTIVE
|
||||||
|
|
||||||
|
def do_populate(self, context):
|
||||||
|
# TODO: Maybe convert async?
|
||||||
|
it = self.get_iter_correctly(context)
|
||||||
|
buffer = it.get_buffer()
|
||||||
|
proposals = []
|
||||||
|
|
||||||
|
doc_text = buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter(), False)
|
||||||
|
iter_cursor = buffer.get_iter_at_mark(buffer.get_insert())
|
||||||
|
linenum = iter_cursor.get_line() + 1
|
||||||
|
charnum = iter_cursor.get_line_index()
|
||||||
|
|
||||||
|
def create_generator():
|
||||||
|
for completion in Jedi.get_script(self._file, doc_text).complete(line = linenum, column = None, fuzzy = False):
|
||||||
|
comp_item = GtkSource.CompletionItem.new()
|
||||||
|
comp_item.set_label(completion.name)
|
||||||
|
comp_item.set_text(completion.name)
|
||||||
|
comp_item.set_icon(self.get_icon_for_type(completion.type))
|
||||||
|
comp_item.set_info(completion.docstring())
|
||||||
|
yield comp_item
|
||||||
|
|
||||||
|
for item in create_generator():
|
||||||
|
proposals.append(item)
|
||||||
|
|
||||||
|
context.add_proposals(self, proposals, True)
|
||||||
|
|
||||||
|
def get_icon_for_type(self, _type):
|
||||||
|
try:
|
||||||
|
return self._theme.load_icon(icon_names[_type.lower()], 16, 0)
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
return self._theme.load_icon(Gtk.STOCK_ADD, 16, 0)
|
||||||
|
except:
|
||||||
|
return None
|
||||||
126
src/core/widgets/code/key_mapper.py
Normal file
126
src/core/widgets/code/key_mapper.py
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# Python imports
|
||||||
|
import copy
|
||||||
|
import json
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gdk', '3.0')
|
||||||
|
from gi.repository import Gdk
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class NoKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class CtrlKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class ShiftKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class AltKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class CtrlShiftKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class CtrlAltKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class AltShiftKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
class CtrlShiftAltKeyState:
|
||||||
|
held: dict = {}
|
||||||
|
released: dict = {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class KeyMapper:
|
||||||
|
def __init__(self):
|
||||||
|
super(KeyMapper, self).__init__()
|
||||||
|
|
||||||
|
self.state = NoKeyState
|
||||||
|
self._map = {
|
||||||
|
NoKeyState: NoKeyState(),
|
||||||
|
NoKeyState | CtrlKeyState : CtrlKeyState(),
|
||||||
|
NoKeyState | ShiftKeyState: ShiftKeyState(),
|
||||||
|
NoKeyState | AltKeyState : AltKeyState(),
|
||||||
|
NoKeyState | CtrlKeyState | ShiftKeyState : CtrlShiftKeyState(),
|
||||||
|
NoKeyState | CtrlKeyState | AltKeyState : CtrlAltKeyState(),
|
||||||
|
NoKeyState | AltKeyState | ShiftKeyState : AltShiftKeyState(),
|
||||||
|
NoKeyState | CtrlKeyState | ShiftKeyState | AltKeyState: CtrlShiftAltKeyState(),
|
||||||
|
}
|
||||||
|
|
||||||
|
self.load_map()
|
||||||
|
|
||||||
|
|
||||||
|
def load_map(self):
|
||||||
|
self.states = copy.deepcopy(self._map)
|
||||||
|
bindings_file = f"{settings_manager.get_home_config_path()}/code-key-bindings.json"
|
||||||
|
|
||||||
|
with open(bindings_file, 'r') as f:
|
||||||
|
data = json.load(f)["keybindings"]
|
||||||
|
|
||||||
|
for command in data:
|
||||||
|
press_state = "held" if "held" in data[command] else "released"
|
||||||
|
keyname = data[command][press_state]
|
||||||
|
|
||||||
|
state = NoKeyState
|
||||||
|
if "<Control>" in keyname:
|
||||||
|
state = state | CtrlKeyState
|
||||||
|
if "<Shift>" in keyname:
|
||||||
|
state = state | ShiftKeyState
|
||||||
|
if "<Alt>" in keyname:
|
||||||
|
state = state | AltKeyState
|
||||||
|
|
||||||
|
keyname = keyname.replace("<Control>", "") \
|
||||||
|
.replace("<Shift>", "") \
|
||||||
|
.replace("<Alt>", "")
|
||||||
|
|
||||||
|
getattr(self.states[state], press_state)[keyname] = command
|
||||||
|
|
||||||
|
def re_map(self):
|
||||||
|
self.states = copy.deepcopy(self._map)
|
||||||
|
|
||||||
|
def _key_press_event(self, eve):
|
||||||
|
keyname = Gdk.keyval_name(eve.keyval).lower()
|
||||||
|
|
||||||
|
self._set_key_state(eve)
|
||||||
|
if keyname in self.states[self.state].held:
|
||||||
|
return self.states[self.state].held[keyname]
|
||||||
|
|
||||||
|
def _key_release_event(self, eve):
|
||||||
|
keyname = Gdk.keyval_name(eve.keyval).lower()
|
||||||
|
|
||||||
|
self._set_key_state(eve)
|
||||||
|
if keyname in self.states[self.state].released:
|
||||||
|
return self.states[self.state].released[keyname]
|
||||||
|
|
||||||
|
def _set_key_state(self, eve):
|
||||||
|
modifiers = Gdk.ModifierType(eve.get_state() & ~Gdk.ModifierType.LOCK_MASK)
|
||||||
|
is_control = True if modifiers & Gdk.ModifierType.CONTROL_MASK else False
|
||||||
|
is_shift = True if modifiers & Gdk.ModifierType.SHIFT_MASK else False
|
||||||
|
|
||||||
|
try:
|
||||||
|
is_alt = True if modifiers & Gdk.ModifierType.ALT_MASK else False
|
||||||
|
except Exception:
|
||||||
|
is_alt = True if modifiers & Gdk.ModifierType.MOD1_MASK else False
|
||||||
|
|
||||||
|
self.state = NoKeyState
|
||||||
|
if is_control:
|
||||||
|
self.state = self.state | CtrlKeyState
|
||||||
|
if is_shift:
|
||||||
|
self.state = self.state | ShiftKeyState
|
||||||
|
if is_alt:
|
||||||
|
self.state = self.state | AltKeyState
|
||||||
|
|
||||||
40
src/core/widgets/code/miniview_widget.py
Normal file
40
src/core/widgets/code/miniview_widget.py
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
from gi.repository.GtkSource import Map
|
||||||
|
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class MiniViewWidget(Map):
|
||||||
|
def __init__(self):
|
||||||
|
super(MiniViewWidget, self).__init__()
|
||||||
|
|
||||||
|
self._setup_styling()
|
||||||
|
self._setup_signals()
|
||||||
|
self._subscribe_to_events()
|
||||||
|
self._load_widgets()
|
||||||
|
|
||||||
|
self.show_all()
|
||||||
|
|
||||||
|
|
||||||
|
def _setup_styling(self):
|
||||||
|
self.set_hexpand(False)
|
||||||
|
ctx = self.get_style_context()
|
||||||
|
ctx.add_class("mini-view")
|
||||||
|
|
||||||
|
def _setup_signals(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _subscribe_to_events(self):
|
||||||
|
event_system.subscribe(f"set-mini-view", self.set_smini_view)
|
||||||
|
|
||||||
|
def _load_widgets(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def set_smini_view(self, source_view):
|
||||||
|
self.set_view(source_view)
|
||||||
40
src/core/widgets/code/source_buffer.py
Normal file
40
src/core/widgets/code/source_buffer.py
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class SourceBuffer(GtkSource.Buffer):
|
||||||
|
def __init__(self):
|
||||||
|
super(SourceBuffer, self).__init__()
|
||||||
|
|
||||||
|
self._handler_ids = []
|
||||||
|
|
||||||
|
|
||||||
|
def set_signals(
|
||||||
|
self,
|
||||||
|
_changed,
|
||||||
|
_mark_set,
|
||||||
|
_insert_text,
|
||||||
|
_modified_changed,
|
||||||
|
):
|
||||||
|
|
||||||
|
self._handler_ids = [
|
||||||
|
self.connect("changed", _changed),
|
||||||
|
self.connect("mark-set", _mark_set),
|
||||||
|
self.connect("insert-text", _insert_text),
|
||||||
|
self.connect("modified-changed", _modified_changed)
|
||||||
|
]
|
||||||
|
|
||||||
|
def clear_signals(self):
|
||||||
|
for handle_id in self._handler_ids:
|
||||||
|
self.disconnect(handle_id)
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
for handle_id in self._handler_ids:
|
||||||
|
self.disconnect(handle_id)
|
||||||
106
src/core/widgets/code/source_file.py
Normal file
106
src/core/widgets/code/source_file.py
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
# Python imports
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
from gi.repository import Gio
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from .source_buffer import SourceBuffer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class SourceFile(GtkSource.File):
|
||||||
|
def __init__(self):
|
||||||
|
super(SourceFile, self).__init__()
|
||||||
|
|
||||||
|
self.encoding: str = "UTF-8"
|
||||||
|
self.fname: str = "buffer"
|
||||||
|
self.fpath: str = "buffer"
|
||||||
|
self.ftype: str = "buffer"
|
||||||
|
|
||||||
|
self.buffer: SourceBuffer = SourceBuffer()
|
||||||
|
|
||||||
|
self._set_signals()
|
||||||
|
|
||||||
|
|
||||||
|
def load_path(self, gfile: Gio.File):
|
||||||
|
if not gfile: return
|
||||||
|
|
||||||
|
self.set_path(gfile)
|
||||||
|
data = gfile.load_bytes()[0].get_data().decode("UTF-8")
|
||||||
|
|
||||||
|
self.buffer.insert_at_cursor(data)
|
||||||
|
|
||||||
|
def set_path(self, gfile: Gio.File):
|
||||||
|
if not gfile: return
|
||||||
|
self.set_location(gfile)
|
||||||
|
|
||||||
|
self.fpath = gfile.get_parent().get_path(),
|
||||||
|
self.fname = gfile.get_basename()
|
||||||
|
|
||||||
|
def _set_signals(self):
|
||||||
|
self.buffer.set_signals(
|
||||||
|
self._changed,
|
||||||
|
self._mark_set,
|
||||||
|
self._insert_text,
|
||||||
|
self._modified_changed
|
||||||
|
)
|
||||||
|
|
||||||
|
def _insert_text(
|
||||||
|
self,
|
||||||
|
buffer: SourceBuffer,
|
||||||
|
location: Gtk.TextIter,
|
||||||
|
text: str,
|
||||||
|
length: int
|
||||||
|
):
|
||||||
|
logger.info("SourceFile._insert_text")
|
||||||
|
|
||||||
|
def _changed(self, buffer: SourceBuffer):
|
||||||
|
logger.info("SourceFile._changed")
|
||||||
|
|
||||||
|
def _mark_set(
|
||||||
|
self,
|
||||||
|
buffer: SourceBuffer,
|
||||||
|
location: Gtk.TextIter,
|
||||||
|
mark: Gtk.TextMark
|
||||||
|
):
|
||||||
|
# logger.info("SourceFile._mark_set")
|
||||||
|
...
|
||||||
|
|
||||||
|
def _modified_changed(self, buffer: SourceBuffer):
|
||||||
|
logger.info("SourceFile._modified_changed")
|
||||||
|
|
||||||
|
def _write_file(self, gfile: Gio.File):
|
||||||
|
if not gfile: return
|
||||||
|
|
||||||
|
with open(gfile.get_path(), 'w') as f:
|
||||||
|
start_itr = self.buffer.get_start_iter()
|
||||||
|
end_itr = self.buffer.get_end_iter()
|
||||||
|
text = self.buffer.get_text(start_itr, end_itr, True)
|
||||||
|
|
||||||
|
f.write(text)
|
||||||
|
|
||||||
|
return gfile
|
||||||
|
|
||||||
|
def save(self):
|
||||||
|
self._write_file( self.get_location() )
|
||||||
|
|
||||||
|
def save_as(self):
|
||||||
|
print("poop")
|
||||||
|
file = event_system.emit_and_await("save-file-dialog")
|
||||||
|
if not file: return
|
||||||
|
|
||||||
|
self._write_file(file)
|
||||||
|
self.set_path(file)
|
||||||
|
|
||||||
|
return file
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
del self.buffer
|
||||||
58
src/core/widgets/code/source_files_manager.py
Normal file
58
src/core/widgets/code/source_files_manager.py
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from .source_file import SourceFile
|
||||||
|
from .source_buffer import SourceBuffer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class SourceFilesManager(list):
|
||||||
|
def __init__(self):
|
||||||
|
super(SourceFilesManager, self).__init__()
|
||||||
|
|
||||||
|
|
||||||
|
def new(self):
|
||||||
|
file = SourceFile()
|
||||||
|
super().append(file)
|
||||||
|
|
||||||
|
return file
|
||||||
|
|
||||||
|
def append(self, file: SourceFile):
|
||||||
|
if not file: return
|
||||||
|
|
||||||
|
super().append(file)
|
||||||
|
|
||||||
|
def get_file(self, buffer: SourceBuffer):
|
||||||
|
if not buffer: return
|
||||||
|
|
||||||
|
for i, file in enumerate(self):
|
||||||
|
if not buffer == file.buffer: continue
|
||||||
|
return file
|
||||||
|
|
||||||
|
def pop_file(self, buffer: SourceBuffer):
|
||||||
|
if not buffer: return
|
||||||
|
|
||||||
|
for i, file in enumerate(self):
|
||||||
|
if not buffer == file.buffer: continue
|
||||||
|
|
||||||
|
popped_file = self.pop(i)
|
||||||
|
sibling_file = None
|
||||||
|
if len(self) == 0:
|
||||||
|
sibling_file = self.new()
|
||||||
|
else:
|
||||||
|
sibling_file = self[ i - 1 if i > 0 else i + 1]
|
||||||
|
|
||||||
|
return sibling_file, popped_file
|
||||||
|
|
||||||
|
def remove_file(self, buffer: SourceBuffer):
|
||||||
|
if not buffer: return
|
||||||
|
|
||||||
|
for file in self:
|
||||||
|
if not buffer == file.buffer: continue
|
||||||
|
self.remove(file)
|
||||||
|
|
||||||
|
file.close()
|
||||||
|
del file
|
||||||
|
break
|
||||||
119
src/core/widgets/code/view.py
Normal file
119
src/core/widgets/code/view.py
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
gi.require_version('GtkSource', '4')
|
||||||
|
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import GLib
|
||||||
|
from gi.repository import GtkSource
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from .source_files_manager import SourceFilesManager
|
||||||
|
from .completion_manager import CompletionManager
|
||||||
|
from .command_system import CommandSystem
|
||||||
|
from .key_mapper import KeyMapper
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class SourceView(GtkSource.View):
|
||||||
|
def __init__(self):
|
||||||
|
super(SourceView, self).__init__()
|
||||||
|
|
||||||
|
self.sibling_right = None
|
||||||
|
self.sibling_left = None
|
||||||
|
self.key_mapper = KeyMapper()
|
||||||
|
|
||||||
|
self._setup_styles()
|
||||||
|
self._setup_signals()
|
||||||
|
self._subscribe_to_events()
|
||||||
|
self._load_widgets()
|
||||||
|
|
||||||
|
|
||||||
|
def _setup_styles(self):
|
||||||
|
ctx = self.get_style_context()
|
||||||
|
ctx.add_class("source-view")
|
||||||
|
|
||||||
|
self.set_vexpand(True)
|
||||||
|
|
||||||
|
self.set_show_line_marks(True)
|
||||||
|
self.set_show_line_numbers(True)
|
||||||
|
self.set_smart_backspace(True)
|
||||||
|
self.set_indent_on_tab(True)
|
||||||
|
self.set_insert_spaces_instead_of_tabs(True)
|
||||||
|
self.set_auto_indent(True)
|
||||||
|
self.set_monospace(True)
|
||||||
|
self.set_tab_width(4)
|
||||||
|
self.set_show_right_margin(True)
|
||||||
|
self.set_right_margin_position(80)
|
||||||
|
self.set_background_pattern(0) # 0 = None, 1 = Grid
|
||||||
|
self.set_highlight_current_line(True)
|
||||||
|
|
||||||
|
def _setup_signals(self):
|
||||||
|
# self.connect("show-completion", self._show_completion)
|
||||||
|
self.map_id = self.connect("map", self._init_map)
|
||||||
|
|
||||||
|
# self.connect("focus", self._on_widget_focus)
|
||||||
|
# self.connect("focus-in-event", self._focus_in_event)
|
||||||
|
|
||||||
|
# self.connect("drag-data-received", self._on_drag_data_received)
|
||||||
|
self.connect("key-press-event", self._key_press_event)
|
||||||
|
self.connect("key-release-event", self._key_release_event)
|
||||||
|
# self.connect("button-press-event", self._button_press_event)
|
||||||
|
# self.connect("button-release-event", self._button_release_event)
|
||||||
|
# self.connect("scroll-event", self._scroll_event)
|
||||||
|
|
||||||
|
def _subscribe_to_events(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _load_widgets(self):
|
||||||
|
...
|
||||||
|
|
||||||
|
def _init_map(self, view):
|
||||||
|
def _first_show_init():
|
||||||
|
self.disconnect(self.map_id)
|
||||||
|
del self.map_id
|
||||||
|
|
||||||
|
self._handle_first_show()
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
# GLib.timeout_add(1000, _first_show_init)
|
||||||
|
GLib.idle_add(_first_show_init)
|
||||||
|
|
||||||
|
def _handle_first_show(self):
|
||||||
|
self.language_manager = GtkSource.LanguageManager()
|
||||||
|
self.style_scheme_manager = GtkSource.StyleSchemeManager()
|
||||||
|
self.command = CommandSystem()
|
||||||
|
self.files = SourceFilesManager()
|
||||||
|
self.completion = CompletionManager()
|
||||||
|
|
||||||
|
self.completion.set_completer( self.get_completion() )
|
||||||
|
|
||||||
|
self.style_scheme_manager.append_search_path(
|
||||||
|
f"{settings_manager.get_home_config_path()}/code_styles"
|
||||||
|
)
|
||||||
|
self.syntax_theme = self.style_scheme_manager.get_scheme(
|
||||||
|
f"{settings.theming.syntax_theme}"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.command.set_data(self)
|
||||||
|
self.exec_command("new_file")
|
||||||
|
|
||||||
|
def _key_press_event(self, view, eve):
|
||||||
|
command = self.key_mapper._key_press_event(eve)
|
||||||
|
if not command: return False
|
||||||
|
|
||||||
|
self.exec_command(command)
|
||||||
|
return True
|
||||||
|
|
||||||
|
def _key_release_event(self, view, eve):
|
||||||
|
command = self.key_mapper._key_release_event(eve)
|
||||||
|
if not command: return False
|
||||||
|
|
||||||
|
self.exec_command(command)
|
||||||
|
return True
|
||||||
|
|
||||||
|
def exec_command(self, command: str):
|
||||||
|
self.command.exec(command)
|
||||||
@@ -35,7 +35,7 @@ class OpenFilesButton(Gtk.Button):
|
|||||||
self.connect("button-release-event", self._open_files)
|
self.connect("button-release-event", self._open_files)
|
||||||
|
|
||||||
def _subscribe_to_events(self):
|
def _subscribe_to_events(self):
|
||||||
event_system.subscribe("open_files", self._open_files)
|
event_system.subscribe("open-files", self._open_files)
|
||||||
|
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -93,6 +93,9 @@ class VteWidget(Vte.Terminal):
|
|||||||
if not text.encode() == "\r".encode(): return
|
if not text.encode() == "\r".encode(): return
|
||||||
|
|
||||||
text, attributes = self.get_text()
|
text, attributes = self.get_text()
|
||||||
|
|
||||||
|
if not text: return
|
||||||
|
|
||||||
lines = text.strip().splitlines()
|
lines = text.strip().splitlines()
|
||||||
command_ran = None
|
command_ran = None
|
||||||
|
|
||||||
|
|||||||
@@ -118,9 +118,8 @@ class Window(Gtk.ApplicationWindow):
|
|||||||
|
|
||||||
# bind css file
|
# bind css file
|
||||||
cssProvider = Gtk.CssProvider()
|
cssProvider = Gtk.CssProvider()
|
||||||
cssProvider.load_from_path( settings_manager.get_css_file() )
|
|
||||||
screen = Gdk.Screen.get_default()
|
|
||||||
styleContext = Gtk.StyleContext()
|
styleContext = Gtk.StyleContext()
|
||||||
|
cssProvider.load_from_path( settings_manager.get_css_file() )
|
||||||
styleContext.add_provider_for_screen(screen, cssProvider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
|
styleContext.add_provider_for_screen(screen, cssProvider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
|
||||||
|
|
||||||
def _area_draw(self, widget: Gtk.ApplicationWindow, cr: cairo.Context) -> None:
|
def _area_draw(self, widget: Gtk.ApplicationWindow, cr: cairo.Context) -> None:
|
||||||
|
|||||||
@@ -61,8 +61,12 @@ class IPCServer(Singleton):
|
|||||||
conn = listener.accept()
|
conn = listener.accept()
|
||||||
start_time = time.perf_counter()
|
start_time = time.perf_counter()
|
||||||
self._handle_ipc_message(conn, start_time)
|
self._handle_ipc_message(conn, start_time)
|
||||||
|
except EOFError as e:
|
||||||
|
logger.debug( repr(e) )
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug( repr(e) )
|
logger.debug( repr(e) )
|
||||||
|
finally:
|
||||||
|
conn.close()
|
||||||
|
|
||||||
listener.close()
|
listener.close()
|
||||||
|
|
||||||
@@ -88,7 +92,7 @@ class IPCServer(Singleton):
|
|||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
if msg in ['close connection', 'close server']:
|
if msg in ['close connection', 'close server', 'Empty Data...']:
|
||||||
conn.close()
|
conn.close()
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ from dataclasses import dataclass
|
|||||||
@dataclass
|
@dataclass
|
||||||
class Theming:
|
class Theming:
|
||||||
transparency: int = 64
|
transparency: int = 64
|
||||||
|
default_zoom: int = 12
|
||||||
|
syntax_theme: str = "penguins-in-space"
|
||||||
success_color: str = "#88cc27"
|
success_color: str = "#88cc27"
|
||||||
warning_color: str = "#ffa800"
|
warning_color: str = "#ffa800"
|
||||||
error_color: str = "#ff0000"
|
error_color: str = "#ff0000"
|
||||||
|
|||||||
40
user_config/usr/share/app_name/code-key-bindings.json
Normal file
40
user_config/usr/share/app_name/code-key-bindings.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"keybindings": {
|
||||||
|
"show_completion": {
|
||||||
|
"released": "<Control>space"
|
||||||
|
},
|
||||||
|
"line_up": {
|
||||||
|
"held": "<Control>Up"
|
||||||
|
},
|
||||||
|
"line_down": {
|
||||||
|
"held": "<Control>Down"
|
||||||
|
},
|
||||||
|
"new_file": {
|
||||||
|
"released": "<Control>t"
|
||||||
|
},
|
||||||
|
"open_files": {
|
||||||
|
"released": "<Control>o"
|
||||||
|
},
|
||||||
|
"close_file": {
|
||||||
|
"released": "<Control>w"
|
||||||
|
},
|
||||||
|
"save_file": {
|
||||||
|
"released": "<Control>s"
|
||||||
|
},
|
||||||
|
"save_file_as": {
|
||||||
|
"released": "<Control><Shift>s"
|
||||||
|
},
|
||||||
|
"focus_left_sibling": {
|
||||||
|
"released": "<Control>Page_Up"
|
||||||
|
},
|
||||||
|
"focus_right_sibling": {
|
||||||
|
"released": "<Control>Page_Down"
|
||||||
|
},
|
||||||
|
"move_to_left_sibling": {
|
||||||
|
"released": "<Control><Shift>Up"
|
||||||
|
},
|
||||||
|
"move_to_right_sibling": {
|
||||||
|
"released": "<Control><Shift>Down"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
100
user_config/usr/share/app_name/code_styles/catppuccin-frappe.xml
Normal file
100
user_config/usr/share/app_name/code_styles/catppuccin-frappe.xml
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio Code.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<style-scheme id="catppuccin_frappe" _name="Catppuccin frappe" version="1.0">
|
||||||
|
|
||||||
|
<author>sacerdos</author>
|
||||||
|
<_description>Soothing pastel theme for Gedit</_description>
|
||||||
|
|
||||||
|
<!-- Catppuccin Palette -->
|
||||||
|
<color name="frappe_rosewater" value="#f2d5cf"/>
|
||||||
|
<color name="frappe_flamingo" value="#eebebe"/>
|
||||||
|
<color name="frappe_pink" value="#f4b8e4"/>
|
||||||
|
<color name="frappe_mauve" value="#ca9ee6"/>
|
||||||
|
<color name="frappe_red" value="#e78284"/>
|
||||||
|
<color name="frappe_maroon" value="#ea999c"/>
|
||||||
|
<color name="frappe_peach" value="#ef9f76"/>
|
||||||
|
<color name="frappe_yellow" value="#e5c890"/>
|
||||||
|
<color name="frappe_green" value="#a6d189"/>
|
||||||
|
<color name="frappe_teal" value="#81c8be"/>
|
||||||
|
<color name="frappe_sky" value="#99d1db"/>
|
||||||
|
<color name="frappe_sapphire" value="#85c1dc"/>
|
||||||
|
<color name="frappe_blue" value="#8caaee"/>
|
||||||
|
<color name="frappe_lavender" value="#babbf1"/>
|
||||||
|
<color name="frappe_text" value="#c6d0f5"/>
|
||||||
|
<color name="frappe_subtext1" value="#b5bfe2"/>
|
||||||
|
<color name="frappe_subtext0" value="#a5adce"/>
|
||||||
|
<color name="frappe_overlay2" value="#949cbb"/>
|
||||||
|
<color name="frappe_overlay1" value="#838ba7"/>
|
||||||
|
<color name="frappe_overlay0" value="#737994"/>
|
||||||
|
<color name="frappe_surface2" value="#626880"/>
|
||||||
|
<color name="frappe_surface1" value="#51576d"/>
|
||||||
|
<color name="frappe_surface0" value="#51576d"/>
|
||||||
|
<color name="frappe_base" value="#303446"/>
|
||||||
|
<color name="frappe_mantle" value="#292c3c"/>
|
||||||
|
<color name="frappe_crust" value="#232634"/>
|
||||||
|
|
||||||
|
<!-- Global Settings -->
|
||||||
|
<style name="text" foreground="frappe_text" background = "frappe_base"/>
|
||||||
|
<style name="selection" foreground="frappe_text" background="frappe_surface2"/>
|
||||||
|
<style name="cursor" foreground="frappe_rosewater"/>
|
||||||
|
<style name="secondary-cursor" foreground="frappe_rosewater"/>
|
||||||
|
<style name="current-line" background="frappe_surface0"/>
|
||||||
|
<style name="line-numbers" foreground="frappe_text" background="frappe_crust"/>
|
||||||
|
<style name="draw-spaces" foreground="frappe_text"/>
|
||||||
|
<style name="background-pattern" background="frappe_base"/>
|
||||||
|
|
||||||
|
<!-- Bracket Matching -->
|
||||||
|
<style name="bracket-match" foreground="frappe_mauve"/>
|
||||||
|
<style name="bracket-mismatch" foreground="frappe_text" background="frappe_peach"/>
|
||||||
|
|
||||||
|
<!-- Right Margin -->
|
||||||
|
<style name="right-margin" foreground="frappe_text" background="frappe_crust"/>
|
||||||
|
|
||||||
|
<!-- Search Matching -->
|
||||||
|
<style name="search-match" foreground="frappe_text" background="frappe_blue"/>
|
||||||
|
|
||||||
|
<!-- Comments -->
|
||||||
|
<style name="def:comment" foreground="frappe_overlay0"/>
|
||||||
|
<style name="def:shebang" foreground="frappe_overlay0" bold="true"/>
|
||||||
|
<style name="def:doc-comment-element" italic="true"/>
|
||||||
|
|
||||||
|
<!-- Constants -->
|
||||||
|
<style name="def:constant" foreground="frappe_green"/>
|
||||||
|
<style name="def:string" foreground="frappe_green"/>
|
||||||
|
<style name="def:special-char" foreground="frappe_lavender"/>
|
||||||
|
<style name="def:special-constant" foreground="frappe_lavender"/>
|
||||||
|
<style name="def:floating-point" foreground="frappe_lavender"/>
|
||||||
|
|
||||||
|
<!-- Identifiers -->
|
||||||
|
<style name="def:identifier" foreground="frappe_blue"/>
|
||||||
|
|
||||||
|
<!-- Statements -->
|
||||||
|
<style name="def:statement" foreground="frappe_sapphire" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Types -->
|
||||||
|
<style name="def:type" foreground="frappe_maroon" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Markup -->
|
||||||
|
<style name="def:emphasis" italic="true"/>
|
||||||
|
<style name="def:strong-emphasis" foreground="frappe_yellow" bold="true"/>
|
||||||
|
<style name="def:inline-code" foreground="frappe_green"/>
|
||||||
|
<style name="def:insertion" underline="single"/>
|
||||||
|
<style name="def:deletion" strikethrough="true"/>
|
||||||
|
<style name="def:link-text" foreground="frappe_rosewater"/>
|
||||||
|
<style name="def:link-symbol" foreground="frappe_blue" bold="true"/>
|
||||||
|
<style name="def:link-destination" foreground="frappe_blue" italic="true" underline="single"/>
|
||||||
|
<style name="def:heading" foreground="frappe_teal" bold="true"/>
|
||||||
|
<style name="def:thematic-break" foreground="frappe_green" bold="true"/>
|
||||||
|
<style name="def:preformatted-section" foreground="frappe_green"/>
|
||||||
|
<style name="def:list-marker" foreground="frappe_teal" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Others -->
|
||||||
|
<style name="def:preprocessor" foreground="frappe_teal"/>
|
||||||
|
<style name="def:error" foreground="frappe_maroon" bold="true"/>
|
||||||
|
<style name="def:warning" foreground="frappe_peach"/>
|
||||||
|
<style name="def:note" foreground="frappe_blue" bold="true"/>
|
||||||
|
<style name="def:net-address" italic="true" underline="single"/>
|
||||||
|
</style-scheme>
|
||||||
100
user_config/usr/share/app_name/code_styles/catppuccin-latte.xml
Normal file
100
user_config/usr/share/app_name/code_styles/catppuccin-latte.xml
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio Code.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<style-scheme id="catppuccin_latte" _name="Catppuccin latte" version="1.0">
|
||||||
|
|
||||||
|
<author>sacerdos</author>
|
||||||
|
<_description>Soothing pastel theme for Gedit</_description>
|
||||||
|
|
||||||
|
<!-- Catppuccin Palette -->
|
||||||
|
<color name="latte_rosewater" value="#dc8a78"/>
|
||||||
|
<color name="latte_flamingo" value="#dd7878"/>
|
||||||
|
<color name="latte_pink" value="#ea76cb"/>
|
||||||
|
<color name="latte_mauve" value="#8839ef"/>
|
||||||
|
<color name="latte_red" value="#d20f39"/>
|
||||||
|
<color name="latte_maroon" value="#e64553"/>
|
||||||
|
<color name="latte_peach" value="#fe640b"/>
|
||||||
|
<color name="latte_yellow" value="#df8e1d"/>
|
||||||
|
<color name="latte_green" value="#40a02b"/>
|
||||||
|
<color name="latte_teal" value="#179299"/>
|
||||||
|
<color name="latte_sky" value="#04a5e5"/>
|
||||||
|
<color name="latte_sapphire" value="#209fb5"/>
|
||||||
|
<color name="latte_blue" value="#1e66f5"/>
|
||||||
|
<color name="latte_lavender" value="#7287fd"/>
|
||||||
|
<color name="latte_text" value="#4c4f69"/>
|
||||||
|
<color name="latte_subtext1" value="#5c5f77"/>
|
||||||
|
<color name="latte_subtext0" value="#6c6f85"/>
|
||||||
|
<color name="latte_overlay2" value="#7c7f93"/>
|
||||||
|
<color name="latte_overlay1" value="#8c8fa1"/>
|
||||||
|
<color name="latte_overlay0" value="#9ca0b0"/>
|
||||||
|
<color name="latte_surface2" value="#acb0be"/>
|
||||||
|
<color name="latte_surface1" value="#bcc0cc"/>
|
||||||
|
<color name="latte_surface0" value="#ccd0da"/>
|
||||||
|
<color name="latte_base" value="#eff1f5"/>
|
||||||
|
<color name="latte_mantle" value="#e6e9ef"/>
|
||||||
|
<color name="latte_crust" value="#dce0e8"/>
|
||||||
|
|
||||||
|
<!-- Global Settings -->
|
||||||
|
<style name="text" foreground="latte_text" background = "latte_base"/>
|
||||||
|
<style name="selection" foreground="latte_text" background="latte_surface2"/>
|
||||||
|
<style name="cursor" foreground="latte_rosewater"/>
|
||||||
|
<style name="secondary-cursor" foreground="latte_rosewater"/>
|
||||||
|
<style name="current-line" background="latte_surface0"/>
|
||||||
|
<style name="line-numbers" foreground="latte_text" background="latte_crust"/>
|
||||||
|
<style name="draw-spaces" foreground="latte_text"/>
|
||||||
|
<style name="background-pattern" background="latte_base"/>
|
||||||
|
|
||||||
|
<!-- Bracket Matching -->
|
||||||
|
<style name="bracket-match" foreground="latte_mauve"/>
|
||||||
|
<style name="bracket-mismatch" foreground="latte_text" background="latte_peach"/>
|
||||||
|
|
||||||
|
<!-- Right Margin -->
|
||||||
|
<style name="right-margin" foreground="latte_text" background="latte_crust"/>
|
||||||
|
|
||||||
|
<!-- Search Matching -->
|
||||||
|
<style name="search-match" foreground="latte_text" background="latte_blue"/>
|
||||||
|
|
||||||
|
<!-- Comments -->
|
||||||
|
<style name="def:comment" foreground="latte_overlay0"/>
|
||||||
|
<style name="def:shebang" foreground="latte_overlay0" bold="true"/>
|
||||||
|
<style name="def:doc-comment-element" italic="true"/>
|
||||||
|
|
||||||
|
<!-- Constants -->
|
||||||
|
<style name="def:constant" foreground="latte_green"/>
|
||||||
|
<style name="def:string" foreground="latte_green"/>
|
||||||
|
<style name="def:special-char" foreground="latte_lavender"/>
|
||||||
|
<style name="def:special-constant" foreground="latte_lavender"/>
|
||||||
|
<style name="def:floating-point" foreground="latte_lavender"/>
|
||||||
|
|
||||||
|
<!-- Identifiers -->
|
||||||
|
<style name="def:identifier" foreground="latte_blue"/>
|
||||||
|
|
||||||
|
<!-- Statements -->
|
||||||
|
<style name="def:statement" foreground="latte_sapphire" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Types -->
|
||||||
|
<style name="def:type" foreground="latte_maroon" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Markup -->
|
||||||
|
<style name="def:emphasis" italic="true"/>
|
||||||
|
<style name="def:strong-emphasis" foreground="latte_yellow" bold="true"/>
|
||||||
|
<style name="def:inline-code" foreground="latte_green"/>
|
||||||
|
<style name="def:insertion" underline="single"/>
|
||||||
|
<style name="def:deletion" strikethrough="true"/>
|
||||||
|
<style name="def:link-text" foreground="latte_rosewater"/>
|
||||||
|
<style name="def:link-symbol" foreground="latte_blue" bold="true"/>
|
||||||
|
<style name="def:link-destination" foreground="latte_blue" italic="true" underline="single"/>
|
||||||
|
<style name="def:heading" foreground="latte_teal" bold="true"/>
|
||||||
|
<style name="def:thematic-break" foreground="latte_green" bold="true"/>
|
||||||
|
<style name="def:preformatted-section" foreground="latte_green"/>
|
||||||
|
<style name="def:list-marker" foreground="latte_teal" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Others -->
|
||||||
|
<style name="def:preprocessor" foreground="latte_teal"/>
|
||||||
|
<style name="def:error" foreground="latte_maroon" bold="true"/>
|
||||||
|
<style name="def:warning" foreground="latte_peach"/>
|
||||||
|
<style name="def:note" foreground="latte_blue" bold="true"/>
|
||||||
|
<style name="def:net-address" italic="true" underline="single"/>
|
||||||
|
</style-scheme>
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio Code.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<style-scheme id="catppuccin_macchiato" _name="Catppuccin macchiato" version="1.0">
|
||||||
|
|
||||||
|
<author>sacerdos</author>
|
||||||
|
<_description>Soothing pastel theme for Gedit</_description>
|
||||||
|
|
||||||
|
<!-- Catppuccin Palette -->
|
||||||
|
<color name="macchiato_rosewater" value="#f4dbd6"/>
|
||||||
|
<color name="macchiato_flamingo" value="#f0c6c6"/>
|
||||||
|
<color name="macchiato_pink" value="#f5bde6"/>
|
||||||
|
<color name="macchiato_mauve" value="#c6a0f6"/>
|
||||||
|
<color name="macchiato_red" value="#ed8796"/>
|
||||||
|
<color name="macchiato_maroon" value="#ee99a0"/>
|
||||||
|
<color name="macchiato_peach" value="#f5a97f"/>
|
||||||
|
<color name="macchiato_yellow" value="#eed49f"/>
|
||||||
|
<color name="macchiato_green" value="#a6da95"/>
|
||||||
|
<color name="macchiato_teal" value="#8bd5ca"/>
|
||||||
|
<color name="macchiato_sky" value="#91d7e3"/>
|
||||||
|
<color name="macchiato_sapphire" value="#7dc4e4"/>
|
||||||
|
<color name="macchiato_blue" value="#8aadf4"/>
|
||||||
|
<color name="macchiato_lavender" value="#b7bdf8"/>
|
||||||
|
<color name="macchiato_text" value="#cad3f5"/>
|
||||||
|
<color name="macchiato_subtext1" value="#b8c0e0"/>
|
||||||
|
<color name="macchiato_subtext0" value="#a5adcb"/>
|
||||||
|
<color name="macchiato_overlay2" value="#939ab7"/>
|
||||||
|
<color name="macchiato_overlay1" value="#8087a2"/>
|
||||||
|
<color name="macchiato_overlay0" value="#6e738d"/>
|
||||||
|
<color name="macchiato_surface2" value="#5b6078"/>
|
||||||
|
<color name="macchiato_surface1" value="#494d64"/>
|
||||||
|
<color name="macchiato_surface0" value="#363a4f"/>
|
||||||
|
<color name="macchiato_base" value="#24273a"/>
|
||||||
|
<color name="macchiato_mantle" value="#1e2030"/>
|
||||||
|
<color name="macchiato_crust" value="#181926"/>
|
||||||
|
|
||||||
|
<!-- Global Settings -->
|
||||||
|
<style name="text" foreground="macchiato_text" background = "macchiato_base"/>
|
||||||
|
<style name="selection" foreground="macchiato_text" background="macchiato_surface2"/>
|
||||||
|
<style name="cursor" foreground="macchiato_rosewater"/>
|
||||||
|
<style name="secondary-cursor" foreground="macchiato_rosewater"/>
|
||||||
|
<style name="current-line" background="macchiato_surface0"/>
|
||||||
|
<style name="line-numbers" foreground="macchiato_text" background="macchiato_crust"/>
|
||||||
|
<style name="draw-spaces" foreground="macchiato_text"/>
|
||||||
|
<style name="background-pattern" background="macchiato_mantle"/>
|
||||||
|
|
||||||
|
<!-- Bracket Matching -->
|
||||||
|
<style name="bracket-match" foreground="macchiato_mauve"/>
|
||||||
|
<style name="bracket-mismatch" foreground="macchiato_text" background="macchiato_peach"/>
|
||||||
|
|
||||||
|
<!-- Right Margin -->
|
||||||
|
<style name="right-margin" foreground="macchiato_text" background="crust"/>
|
||||||
|
|
||||||
|
<!-- Search Matching -->
|
||||||
|
<style name="search-match" foreground="macchiato_text" background="macchiato_blue"/>
|
||||||
|
|
||||||
|
<!-- Comments -->
|
||||||
|
<style name="def:comment" foreground="macchiato_overlay0"/>
|
||||||
|
<style name="def:shebang" foreground="macchiato_overlay0" bold="true"/>
|
||||||
|
<style name="def:doc-comment-element" italic="true"/>
|
||||||
|
|
||||||
|
<!-- Constants -->
|
||||||
|
<style name="def:constant" foreground="macchiato_green"/>
|
||||||
|
<style name="def:string" foreground="macchiato_green"/>
|
||||||
|
<style name="def:special-char" foreground="macchiato_lavender"/>
|
||||||
|
<style name="def:special-constant" foreground="macchiato_lavender"/>
|
||||||
|
<style name="def:floating-point" foreground="macchiato_lavender"/>
|
||||||
|
|
||||||
|
<!-- Identifiers -->
|
||||||
|
<style name="def:identifier" foreground="macchiato_blue"/>
|
||||||
|
|
||||||
|
<!-- Statements -->
|
||||||
|
<style name="def:statement" foreground="macchiato_sapphire" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Types -->
|
||||||
|
<style name="def:type" foreground="macchiato_maroon" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Markup -->
|
||||||
|
<style name="def:emphasis" italic="true"/>
|
||||||
|
<style name="def:strong-emphasis" foreground="macchiato_yellow" bold="true"/>
|
||||||
|
<style name="def:inline-code" foreground="macchiato_green"/>
|
||||||
|
<style name="def:insertion" underline="single"/>
|
||||||
|
<style name="def:deletion" strikethrough="true"/>
|
||||||
|
<style name="def:link-text" foreground="macchiato_rosewater"/>
|
||||||
|
<style name="def:link-symbol" foreground="macchiato_blue" bold="true"/>
|
||||||
|
<style name="def:link-destination" foreground="macchiato_blue" italic="true" underline="single"/>
|
||||||
|
<style name="def:heading" foreground="macchiato_teal" bold="true"/>
|
||||||
|
<style name="def:thematic-break" foreground="macchiato_green" bold="true"/>
|
||||||
|
<style name="def:preformatted-section" foreground="macchiato_green"/>
|
||||||
|
<style name="def:list-marker" foreground="macchiato_teal" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Others -->
|
||||||
|
<style name="def:preprocessor" foreground="macchiato_teal"/>
|
||||||
|
<style name="def:error" foreground="macchiato_maroon" bold="true"/>
|
||||||
|
<style name="def:warning" foreground="macchiato_peach"/>
|
||||||
|
<style name="def:note" foreground="macchiato_blue" bold="true"/>
|
||||||
|
<style name="def:net-address" italic="true" underline="single"/>
|
||||||
|
</style-scheme>
|
||||||
100
user_config/usr/share/app_name/code_styles/catppuccin-mocha.xml
Normal file
100
user_config/usr/share/app_name/code_styles/catppuccin-mocha.xml
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio Code.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<style-scheme id="catppuccin_mocha" _name="Catppuccin Mocha" version="1.0">
|
||||||
|
|
||||||
|
<author>sacerdos</author>
|
||||||
|
<_description>Soothing pastel theme for Gedit</_description>
|
||||||
|
|
||||||
|
<!-- Tango Palette -->
|
||||||
|
<color name="mocha_rosewater" value="#f5e0dc"/>
|
||||||
|
<color name="mocha_flamingo" value="#f2cdcd"/>
|
||||||
|
<color name="mocha_pink" value="#f5c2e7"/>
|
||||||
|
<color name="mocha_mauve" value="#cba6f7"/>
|
||||||
|
<color name="mocha_red" value="#f38ba8"/>
|
||||||
|
<color name="mocha_maroon" value="#eba0ac"/>
|
||||||
|
<color name="mocha_peach" value="#fab387"/>
|
||||||
|
<color name="mocha_yellow" value="#f9e2af"/>
|
||||||
|
<color name="mocha_green" value="#a6e3a1"/>
|
||||||
|
<color name="mocha_teal" value="#94e2d5"/>
|
||||||
|
<color name="mocha_sky" value="#89dceb"/>
|
||||||
|
<color name="mocha_sapphire" value="#74c7ec"/>
|
||||||
|
<color name="mocha_blue" value="#89b4fa"/>
|
||||||
|
<color name="mocha_lavender" value="#b4befe"/>
|
||||||
|
<color name="mocha_text" value="#cdd6f4"/>
|
||||||
|
<color name="mocha_subtext1" value="#bac2de"/>
|
||||||
|
<color name="mocha_subtext0" value="#a6adc8"/>
|
||||||
|
<color name="mocha_overlay2" value="#9399b2"/>
|
||||||
|
<color name="mocha_overlay1" value="#7f849c"/>
|
||||||
|
<color name="mocha_overlay0" value="#6c7086"/>
|
||||||
|
<color name="mocha_surface2" value="#585b70"/>
|
||||||
|
<color name="mocha_surface1" value="#45475a"/>
|
||||||
|
<color name="mocha_surface0" value="#313244"/>
|
||||||
|
<color name="mocha_base" value="#1e1e2e"/>
|
||||||
|
<color name="mocha_mantle" value="#181825"/>
|
||||||
|
<color name="mocha_crust" value="#11111b"/>
|
||||||
|
|
||||||
|
<!-- Global Settings -->
|
||||||
|
<style name="text" foreground="mocha_text" background = "mocha_base"/>
|
||||||
|
<style name="selection" foreground="mocha_text" background="mocha_surface2"/>
|
||||||
|
<style name="cursor" foreground="mocha_rosewater"/>
|
||||||
|
<style name="secondary-cursor" foreground="mocha_rosewater"/>
|
||||||
|
<style name="current-line" background="mocha_surface0"/>
|
||||||
|
<style name="line-numbers" foreground="mocha_text" background="mocha_crust"/>
|
||||||
|
<style name="draw-spaces" foreground="mocha_text"/>
|
||||||
|
<style name="background-pattern" background="mocha_mantle"/>
|
||||||
|
|
||||||
|
<!-- Bracket Matching -->
|
||||||
|
<style name="bracket-match" foreground="mocha_mauve"/>
|
||||||
|
<style name="bracket-mismatch" foreground="mocha_text" background="mocha_peach"/>
|
||||||
|
|
||||||
|
<!-- Right Margin -->
|
||||||
|
<style name="right-margin" foreground="mocha_text" background="mocha_crust"/>
|
||||||
|
|
||||||
|
<!-- Search Matching -->
|
||||||
|
<style name="search-match" foreground="mocha_text" background="mocha_blue"/>
|
||||||
|
|
||||||
|
<!-- Comments -->
|
||||||
|
<style name="def:comment" foreground="mocha_overlay0"/>
|
||||||
|
<style name="def:shebang" foreground="mocha_overlay0" bold="true"/>
|
||||||
|
<style name="def:doc-comment-element" italic="true"/>
|
||||||
|
|
||||||
|
<!-- Constants -->
|
||||||
|
<style name="def:constant" foreground="mocha_green"/>
|
||||||
|
<style name="def:string" foreground="mocha_green"/>
|
||||||
|
<style name="def:special-char" foreground="mocha_lavender"/>
|
||||||
|
<style name="def:special-constant" foreground="mocha_lavender"/>
|
||||||
|
<style name="def:floating-point" foreground="mocha_lavender"/>
|
||||||
|
|
||||||
|
<!-- Identifiers -->
|
||||||
|
<style name="def:identifier" foreground="mocha_blue"/>
|
||||||
|
|
||||||
|
<!-- Statements -->
|
||||||
|
<style name="def:statement" foreground="mocha_sapphire" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Types -->
|
||||||
|
<style name="def:type" foreground="mocha_maroon" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Markup -->
|
||||||
|
<style name="def:emphasis" italic="true"/>
|
||||||
|
<style name="def:strong-emphasis" foreground="mocha_yellow" bold="true"/>
|
||||||
|
<style name="def:inline-code" foreground="mocha_green"/>
|
||||||
|
<style name="def:insertion" underline="single"/>
|
||||||
|
<style name="def:deletion" strikethrough="true"/>
|
||||||
|
<style name="def:link-text" foreground="mocha_rosewater"/>
|
||||||
|
<style name="def:link-symbol" foreground="mocha_blue" bold="true"/>
|
||||||
|
<style name="def:link-destination" foreground="mocha_blue" italic="true" underline="single"/>
|
||||||
|
<style name="def:heading" foreground="mocha_teal" bold="true"/>
|
||||||
|
<style name="def:thematic-break" foreground="mocha_green" bold="true"/>
|
||||||
|
<style name="def:preformatted-section" foreground="mocha_green"/>
|
||||||
|
<style name="def:list-marker" foreground="mocha_teal" bold="true"/>
|
||||||
|
|
||||||
|
<!-- Others -->
|
||||||
|
<style name="def:preprocessor" foreground="mocha_teal"/>
|
||||||
|
<style name="def:error" foreground="mocha_maroon" bold="true"/>
|
||||||
|
<style name="def:warning" foreground="mocha_peach"/>
|
||||||
|
<style name="def:note" foreground="mocha_blue" bold="true"/>
|
||||||
|
<style name="def:net-address" italic="true" underline="single"/>
|
||||||
|
</style-scheme>
|
||||||
123
user_config/usr/share/app_name/code_styles/peacocks-in-space.xml
Normal file
123
user_config/usr/share/app_name/code_styles/peacocks-in-space.xml
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<style-scheme name="Peacocks In Space" id="peacocks-in-space" version="1.0">
|
||||||
|
<author> ITDominator</author>
|
||||||
|
<description>An attempted clone of Dayle Rees' Peacocks In Space theme.</description>
|
||||||
|
|
||||||
|
<style name="current-line" background="#2b303b" />
|
||||||
|
<style name="current-line-number" background="#f7b83d" />
|
||||||
|
<style name="draw-spaces" foreground="#babdb6" />
|
||||||
|
<style name="background-pattern" background="#6e7a94" />
|
||||||
|
<style name="bracket-match" foreground="#white" background="#gray" />
|
||||||
|
<style name="bracket-mismatch" foreground="#white" background="#FF5D38" />
|
||||||
|
<style name="right-margin" foreground="#dee3ec" background="#454a54" />
|
||||||
|
<style name="search-match" background="#E6DB74" />
|
||||||
|
<style name="def:comment" foreground="#8998b9" />
|
||||||
|
<style name="def:shebang" foreground="#00a8c6" bold="true" />
|
||||||
|
<style name="def:doc-comment-element" italic="true" />
|
||||||
|
<style name="def:constant" foreground="#E6DB74" />
|
||||||
|
<style name="def:special-char" foreground="#26A6A6" />
|
||||||
|
<style name="def:identifier" foreground="#FF5D38" />
|
||||||
|
<style name="def:statement" foreground="#26A6A6" bold="true" />
|
||||||
|
<style name="def:type" foreground="#E6DB74" bold="true" />
|
||||||
|
<style name="def:preprocessor" foreground="#8998b9" />
|
||||||
|
<style name="def:error" background="#FF5D38" bold="true" />
|
||||||
|
<style name="def:warning" background="#f7b83d" />
|
||||||
|
<style name="def:note" foreground="#00a8c6" background="#yellow" bold="true" />
|
||||||
|
<style name="def:underlined" italic="true" underline="true" />
|
||||||
|
<style name="diff:added-line" foreground="#008B8B" />
|
||||||
|
<style name="diff:removed-line" foreground="#6A5ACD" />
|
||||||
|
<style name="diff:changed-line" foreground="#8998b9" />
|
||||||
|
<style name="diff:special-case" foreground="#E6DB74" />
|
||||||
|
<style name="diff:location" foreground="#26A6A6" bold="true" />
|
||||||
|
<style name="diff:diff-file" foreground="#E6DB74" bold="true" />
|
||||||
|
<style name="xml:tags" foreground="#00a8c6" />
|
||||||
|
<style name="xml:attribute-name" foreground="#ff5d38" />
|
||||||
|
<style name="xml:namespace" foreground="#E6DB74" bold="true" />
|
||||||
|
<style name="js:object" foreground="#2E8B57" bold="true" />
|
||||||
|
<style name="js:constructors" foreground="#008B8B" />
|
||||||
|
<style name="latex:display-math" foreground="#6A5ACD" />
|
||||||
|
<style name="latex:command" foreground="#2E8B57" bold="true" />
|
||||||
|
<style name="latex:include" foreground="#8998b9" />
|
||||||
|
<style name="sh:variable" foreground="#6A5ACD" />
|
||||||
|
<style name="Others" foreground="#2E8B57" bold="true" />
|
||||||
|
<style name="Others 2" foreground="#008B8B" />
|
||||||
|
<style name="Others 3" foreground="#6A5ACD" />
|
||||||
|
<style name="python:builtin-object" foreground="#00a8c6" />
|
||||||
|
<style name="python:class-name" foreground="#ff5d38" />
|
||||||
|
<style name="python:function-name" foreground="#e6db74" />
|
||||||
|
<style name="python:keyword" foreground="#00a8c6" />
|
||||||
|
<style name="python:special-variable" />
|
||||||
|
<style name="python:boolean" foreground="#ff5d38" />
|
||||||
|
<style name="python:complex" foreground="#ff5d38" />
|
||||||
|
<style name="python:format" foreground="#bf3f3f" />
|
||||||
|
<style name="python:builtin-constant" foreground="#ff5d38" />
|
||||||
|
<style name="python:builtin-function" foreground="#e6db74" />
|
||||||
|
<style name="python:module-handler" foreground="#00a8c6" />
|
||||||
|
<style name="python:escaped-char" foreground="#ff5d38" />
|
||||||
|
<style name="reserved" foreground="#ff5d38" />
|
||||||
|
<style name="operator" foreground="#00a8c6" />
|
||||||
|
<style name="keyword" foreground="#00a8c6" />
|
||||||
|
<style name="line-numbers" foreground="#ffffff" />
|
||||||
|
<style name="python3:function-name" foreground="#e6db74" />
|
||||||
|
<style name="text" />
|
||||||
|
<style name="emphasis" />
|
||||||
|
<style name="function" foreground="#e6db74" />
|
||||||
|
<style name="selection-unfocused" background="#ff7800" />
|
||||||
|
<style name="html:attrib-name" foreground="#ff5d38" />
|
||||||
|
<style name="html:dtd" />
|
||||||
|
<style name="html:attrib-value" foreground="#e6db74" />
|
||||||
|
<style name="xml:element-name" foreground="#00a8c6" />
|
||||||
|
<style name="xml:attribute-value" foreground="#e6db74" />
|
||||||
|
<style name="html:comment" foreground="#8998b9" />
|
||||||
|
<style name="xml:comment" foreground="#8998b9" />
|
||||||
|
<style name="python3:builtin-function" foreground="#ff5d38" />
|
||||||
|
<style name="python3:builtin-object" foreground="#ff5d38" />
|
||||||
|
<style name="python3:class-name" foreground="#ff5d38" />
|
||||||
|
<style name="python3:builtin-constant" foreground="#ff5d38" />
|
||||||
|
<style name="python3:complex" foreground="#e6db74" />
|
||||||
|
<style name="python3:escaped-char" foreground="#ff5d38" />
|
||||||
|
<style name="python3:decimal" />
|
||||||
|
<style name="python3:format" />
|
||||||
|
<style name="python3:base-n-integer" />
|
||||||
|
<style name="php:comment" foreground="#8998b9" />
|
||||||
|
<style name="php:string" foreground="#e6db74" />
|
||||||
|
<style name="json:keyname" foreground="#ff5d38" />
|
||||||
|
<style name="json:string" foreground="#e6db74" />
|
||||||
|
<style name="json:null-value" foreground="#ff5d38" />
|
||||||
|
<style name="json:float" foreground="#e6db74" />
|
||||||
|
<style name="json:boolean" foreground="#ff5d38" />
|
||||||
|
<style name="java:reserved" foreground="#ff5d38" />
|
||||||
|
<style name="js:function-expression" />
|
||||||
|
<style name="js:identifier" />
|
||||||
|
<style name="js:object-literal" />
|
||||||
|
<style name="js:expression-statement" foreground="#e6db74" />
|
||||||
|
<style name="js:expression" />
|
||||||
|
<style name="js:label-statement" />
|
||||||
|
<style name="js:variable-declaration" />
|
||||||
|
<style name="js:rest-syntax" />
|
||||||
|
<style name="js:regex-group" />
|
||||||
|
<style name="js:keyword" foreground="#00a8c6" />
|
||||||
|
<style name="js:grouping-operator" foreground="#ed333b" />
|
||||||
|
<style name="js:grouping" foreground="#2ec27e" />
|
||||||
|
<style name="js:escape" foreground="#ff5d38" />
|
||||||
|
<style name="js:directive" />
|
||||||
|
<style name="js:class-expression" />
|
||||||
|
<style name="js:built-in-property" />
|
||||||
|
<style name="js:built-in-object" />
|
||||||
|
<style name="js:built-in-method" />
|
||||||
|
<style name="js:built-in-function" />
|
||||||
|
<style name="js:built-in-constructor" />
|
||||||
|
<style name="js:block-statement" />
|
||||||
|
<style name="js:ternary-operator" foreground="#00a8c6" />
|
||||||
|
<style name="js:throw-statement" foreground="#00a8c6" />
|
||||||
|
<style name="js:try-catch-statement" foreground="#00a8c6" />
|
||||||
|
<style name="js:spread-syntax" />
|
||||||
|
<style name="js:switch-statement" foreground="#00a8c6" />
|
||||||
|
<style name="python3:keyword" foreground="#00a8c6" />
|
||||||
|
<style name="python3:module-handler" foreground="#00a8c6" />
|
||||||
|
<style name="python3:method-calls" foreground="#e6db74" />
|
||||||
|
<style name="java:keyword" foreground="#8998b9" />
|
||||||
|
<style name="method-calls" foreground="#e6db74" />
|
||||||
|
<style name="xml:processing-instruction" />
|
||||||
|
<style name="xml:cdata-delim" foreground="#8998b9" />
|
||||||
|
<style name="gdscript:method-calls" foreground="#e6db74" />
|
||||||
|
</style-scheme>
|
||||||
119
user_config/usr/share/app_name/code_styles/penguins-in-space.xml
Normal file
119
user_config/usr/share/app_name/code_styles/penguins-in-space.xml
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<style-scheme name="Penguins In Space" id="penguins-in-space" version="1.0">
|
||||||
|
<author> ITDominator</author>
|
||||||
|
<description>An homage to Dayle Rees' Peacocks In Space theme.</description>
|
||||||
|
|
||||||
|
<style name="current-line" background="#2b303b" />
|
||||||
|
<style name="current-line-number" background="#f7b83d" />
|
||||||
|
<style name="draw-spaces" foreground="#babdb6" />
|
||||||
|
<style name="background-pattern" background="#6e7a94" />
|
||||||
|
<style name="bracket-match" foreground="#white" background="#gray" />
|
||||||
|
<style name="bracket-mismatch" foreground="#white" background="#FF5D38" />
|
||||||
|
<style name="right-margin" foreground="#dee3ec" background="#454a54" />
|
||||||
|
<style name="search-match" background="#E6DB74" />
|
||||||
|
<style name="def:comment" foreground="#454a54" />
|
||||||
|
<style name="def:shebang" foreground="#00a8c6" bold="true" />
|
||||||
|
<style name="def:doc-comment-element" italic="true" />
|
||||||
|
<style name="def:constant" foreground="#E6DB74" />
|
||||||
|
<style name="def:special-char" foreground="#26A6A6" />
|
||||||
|
<style name="def:identifier" foreground="#FF5D38" />
|
||||||
|
<style name="def:statement" foreground="#26A6A6" bold="true" />
|
||||||
|
<style name="def:type" foreground="#E6DB74" bold="true" />
|
||||||
|
<style name="def:preprocessor" foreground="#8998b9" />
|
||||||
|
<style name="def:error" background="#FF5D38" bold="true" />
|
||||||
|
<style name="def:warning" background="#f7b83d" />
|
||||||
|
<style name="def:note" foreground="#00a8c6" background="#yellow" bold="true" />
|
||||||
|
<style name="def:underlined" italic="true" underline="true" />
|
||||||
|
<style name="diff:added-line" foreground="#008B8B" />
|
||||||
|
<style name="diff:removed-line" foreground="#6A5ACD" />
|
||||||
|
<style name="diff:changed-line" foreground="#8998b9" />
|
||||||
|
<style name="diff:special-case" foreground="#E6DB74" />
|
||||||
|
<style name="diff:location" foreground="#26A6A6" bold="true" />
|
||||||
|
<style name="diff:diff-file" foreground="#E6DB74" bold="true" />
|
||||||
|
<style name="xml:tags" foreground="#00a8c6" />
|
||||||
|
<style name="xml:attribute-name" foreground="#ff5d38" />
|
||||||
|
<style name="xml:namespace" foreground="#E6DB74" bold="true" />
|
||||||
|
<style name="js:object" foreground="#2E8B57" bold="true" />
|
||||||
|
<style name="js:constructors" foreground="#008B8B" />
|
||||||
|
<style name="latex:display-math" foreground="#6A5ACD" />
|
||||||
|
<style name="latex:command" foreground="#2E8B57" bold="true" />
|
||||||
|
<style name="latex:include" foreground="#8998b9" />
|
||||||
|
<style name="sh:variable" foreground="#6A5ACD" />
|
||||||
|
<style name="Others" foreground="#2E8B57" bold="true" />
|
||||||
|
<style name="Others 2" foreground="#008B8B" />
|
||||||
|
<style name="Others 3" foreground="#6A5ACD" />
|
||||||
|
<style name="python:builtin-object" foreground="#00a8c6" />
|
||||||
|
<style name="python:class-name" foreground="#ff5d38" />
|
||||||
|
<style name="python:function-name" foreground="#e6db74" />
|
||||||
|
<style name="python:keyword" foreground="#00a8c6" />
|
||||||
|
<style name="python:special-variable" foreground="#26a269" />
|
||||||
|
<style name="python:boolean" foreground="#ff5d38" />
|
||||||
|
<style name="python:complex" foreground="#ff5d38" />
|
||||||
|
<style name="python:format" foreground="#bf3f3f" />
|
||||||
|
<style name="python:builtin-constant" foreground="#ff5d38" />
|
||||||
|
<style name="python:builtin-function" foreground="#e6db74" />
|
||||||
|
<style name="python:module-handler" foreground="#00a8c6" />
|
||||||
|
<style name="python:escaped-char" foreground="#ff5d38" />
|
||||||
|
<style name="reserved" foreground="#ff5d38" />
|
||||||
|
<style name="operator" foreground="#00a8c6" />
|
||||||
|
<style name="keyword" foreground="#00a8c6" />
|
||||||
|
<style name="line-numbers" foreground="#ffffff" />
|
||||||
|
<style name="python3:function-name" foreground="#e6db74" />
|
||||||
|
<style name="text" />
|
||||||
|
<style name="emphasis" />
|
||||||
|
<style name="function" foreground="#e6db74" />
|
||||||
|
<style name="selection-unfocused" background="#ff7800" />
|
||||||
|
<style name="html:attrib-name" foreground="#ff5d38" />
|
||||||
|
<style name="html:dtd" />
|
||||||
|
<style name="html:attrib-value" foreground="#e6db74" />
|
||||||
|
<style name="xml:element-name" foreground="#00a8c6" />
|
||||||
|
<style name="xml:attribute-value" foreground="#e6db74" />
|
||||||
|
<style name="html:comment" foreground="#8998b9" />
|
||||||
|
<style name="xml:comment" foreground="#8998b9" />
|
||||||
|
<style name="python3:builtin-function" foreground="#ff5d38" />
|
||||||
|
<style name="python3:builtin-object" foreground="#ff5d38" />
|
||||||
|
<style name="python3:class-name" foreground="#ff5d38" />
|
||||||
|
<style name="python3:builtin-constant" foreground="#ff5d38" />
|
||||||
|
<style name="python3:complex" foreground="#e6db74" />
|
||||||
|
<style name="python3:escaped-char" foreground="#ff5d38" />
|
||||||
|
<style name="python3:decimal" />
|
||||||
|
<style name="python3:format" />
|
||||||
|
<style name="python3:base-n-integer" />
|
||||||
|
<style name="php:comment" foreground="#8998b9" />
|
||||||
|
<style name="php:string" foreground="#e6db74" />
|
||||||
|
<style name="json:keyname" foreground="#ff5d38" />
|
||||||
|
<style name="json:string" foreground="#e6db74" />
|
||||||
|
<style name="json:null-value" foreground="#e01b24" />
|
||||||
|
<style name="json:float" foreground="#00a8c6" />
|
||||||
|
<style name="json:boolean" foreground="#33d17a" />
|
||||||
|
<style name="java:reserved" foreground="#ff5d38" />
|
||||||
|
<style name="js:function-expression" />
|
||||||
|
<style name="js:identifier" />
|
||||||
|
<style name="js:object-literal" />
|
||||||
|
<style name="js:expression-statement" foreground="#e6db74" />
|
||||||
|
<style name="js:expression" />
|
||||||
|
<style name="js:label-statement" />
|
||||||
|
<style name="js:variable-declaration" />
|
||||||
|
<style name="js:rest-syntax" />
|
||||||
|
<style name="js:regex-group" />
|
||||||
|
<style name="js:keyword" foreground="#00a8c6" />
|
||||||
|
<style name="js:grouping-operator" foreground="#ed333b" />
|
||||||
|
<style name="js:grouping" foreground="#2ec27e" />
|
||||||
|
<style name="js:escape" foreground="#ff5d38" />
|
||||||
|
<style name="js:directive" />
|
||||||
|
<style name="js:class-expression" />
|
||||||
|
<style name="js:built-in-property" />
|
||||||
|
<style name="js:built-in-object" />
|
||||||
|
<style name="js:built-in-method" />
|
||||||
|
<style name="js:built-in-function" />
|
||||||
|
<style name="js:built-in-constructor" />
|
||||||
|
<style name="js:block-statement" />
|
||||||
|
<style name="js:ternary-operator" foreground="#00a8c6" />
|
||||||
|
<style name="js:throw-statement" foreground="#00a8c6" />
|
||||||
|
<style name="js:try-catch-statement" foreground="#00a8c6" />
|
||||||
|
<style name="js:spread-syntax" />
|
||||||
|
<style name="js:switch-statement" foreground="#00a8c6" />
|
||||||
|
<style name="python:multiline-string" foreground="#454a54" />
|
||||||
|
<style name="python3:method-calls" foreground="#e6db74" />
|
||||||
|
<style name="xml:cdata-delim" foreground="#8998b9" />
|
||||||
|
<style name="gdscript:method-calls" foreground="#e6db74" />
|
||||||
|
</style-scheme>
|
||||||
@@ -5,21 +5,8 @@
|
|||||||
"rename-files" : ["F2", "<Control>e"],
|
"rename-files" : ["F2", "<Control>e"],
|
||||||
"open-terminal" : "F4",
|
"open-terminal" : "F4",
|
||||||
"refresh-tab" : ["F5", "<Control>r"],
|
"refresh-tab" : ["F5", "<Control>r"],
|
||||||
"delete-files" : "Delete",
|
"load-interactive-debug" : "<Control>d",
|
||||||
"tggl-top-main-menubar" : "Alt_L",
|
"tggl-top-main-menubar" : "Alt_L",
|
||||||
"tggl-top-main-menubar" : "<Control>0",
|
"tear-down" : "<Control>q"
|
||||||
"trash-files" : "<Shift><Control>t",
|
|
||||||
"tear-down" : "<Control>q",
|
|
||||||
"go-up" : "<Control>Up",
|
|
||||||
"go-home" : "<Control>slash",
|
|
||||||
"grab-focus-path-entry" : "<Control>l",
|
|
||||||
"open-files" : "<Control>o",
|
|
||||||
"show-hide-hidden-files" : "<Control>h",
|
|
||||||
"keyboard-create-tab" : "<Control>t",
|
|
||||||
"keyboard-close-tab" : "<Control>w",
|
|
||||||
"keyboard-copy-files" : "<Control>c",
|
|
||||||
"keyboard-cut-files" : "<Control>x",
|
|
||||||
"paste-files" : "<Control>v",
|
|
||||||
"show-new-file-menu" : "<Control>n"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,24 @@
|
|||||||
/* ---- Make most desired things base transparent ---- */
|
/* ---- Make most desired things base transparent ---- */
|
||||||
popover,
|
popover,
|
||||||
popover > box,
|
popover > box,
|
||||||
|
notebook,
|
||||||
|
header,
|
||||||
|
stack,
|
||||||
|
scrolledwindow,
|
||||||
|
viewport {
|
||||||
|
background: rgba(0, 0, 0, 0.0);
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
tab {
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
tab:checked {
|
||||||
|
border-bottom-color: rgba(125, 125, 125, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.main-window,
|
.main-window,
|
||||||
.base-container,
|
.base-container,
|
||||||
.body-container,
|
.body-container,
|
||||||
@@ -13,6 +31,7 @@ popover > box,
|
|||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.base-container {
|
.base-container {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user