Skip to content

Commit 93ddce0

Browse files
committed
Add an embedded terminal
1 parent 99c7644 commit 93ddce0

11 files changed

+3331
-2
lines changed

gresources/nemo-shell-ui.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
</menu>
7272
<menuitem name="Show Hide Menubar" action="Show Hide Menubar"/>
7373
<menuitem name="Show Hide Statusbar" action="Show Hide Statusbar"/>
74+
<menuitem name="Show Hide Terminal" action="Show Hide Terminal"/>
7475
<separator/>
7576
<menuitem name="Show Hide Extra Pane" action="Show Hide Extra Pane"/>
7677
<menuitem name="Edit Location" action="Edit Location"/>

libnemo-private/org.nemo.gschema.xml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,29 @@
5959
<value nick="after-current-tab" value="0"/>
6060
<value nick="end" value="1"/>
6161
</enum>
62-
62+
6363
<enum id="org.nemo.SizePrefixes">
6464
<value value="0" nick="base-10"/>
6565
<value value="1" nick="base-10-full"/>
6666
<value value="2" nick="base-2"/>
6767
<value value="3" nick="base-2-full"/>
6868
</enum>
6969

70+
<enum id="org.nemo.TerminalSyncMode">
71+
<value nick="none" value="0"/>
72+
<value nick="fm-to-term" value="1"/>
73+
<value nick="term-to-fm" value="2"/>
74+
<value nick="both" value="3"/>
75+
</enum>
76+
77+
<enum id="org.nemo.TerminalSshAutoConnectMode">
78+
<value nick="off" value="0"/>
79+
<value nick="sync-both" value="1"/>
80+
<value nick="sync-fm-to-term" value="2"/>
81+
<value nick="sync-term-to-fm" value="3"/>
82+
<value nick="sync-none" value="4"/>
83+
</enum>
84+
7085
<schema id="org.nemo" path="/org/nemo/" gettext-domain="nemo">
7186
<child name="preferences" schema="org.nemo.preferences"/>
7287
<child name="icon-view" schema="org.nemo.icon-view"/>
@@ -625,6 +640,36 @@
625640
<summary>Whether the navigation window should be maximized.</summary>
626641
<description>Whether the navigation window should be maximized by default.</description>
627642
</key>
643+
<key name="local-terminal-sync-mode" enum="org.nemo.TerminalSyncMode">
644+
<default>'both'</default>
645+
<summary>Local terminal folder synchronization mode</summary>
646+
<description>Determines how the embedded terminal synchronizes its current directory with the file manager when navigating local folders. 'none': No synchronization. 'fm-to-term': File manager navigation changes terminal directory. 'term-to-fm': Terminal navigation changes file manager location. 'both': Synchronization works in both directions.</description>
647+
</key>
648+
<key name="ssh-terminal-auto-connect-mode" enum="org.nemo.TerminalSshAutoConnectMode">
649+
<default>'off'</default>
650+
<summary>SSH terminal auto-connection and synchronization mode preference</summary>
651+
<description>Determines behavior when an SFTP location is active. 'off': Do not connect automatically. 'sync-both': Connect and sync both ways. 'sync-fm-to-term': Connect and sync File Manager to Terminal. 'sync-term-to-fm': Connect and sync Terminal to File Manager. 'sync-none': Connect without folder synchronization.</description>
652+
</key>
653+
<key name="terminal-height" type="i">
654+
<default>300</default>
655+
<summary>Terminal panel height</summary>
656+
<description>Height of the terminal panel in pixels.</description>
657+
</key>
658+
<key name="terminal-visible" type="b">
659+
<default>false</default>
660+
<summary>Terminal pane visibility</summary>
661+
<description>Whether the terminal pane should be visible.</description>
662+
</key>
663+
<key name="terminal-color-scheme" type="s">
664+
<default>'system'</default>
665+
<summary>Terminal color scheme</summary>
666+
<description>The color scheme to use for the embedded terminal. Available values: 'system', 'dark', 'light', 'solarized-dark', 'solarized-light', 'matrix', 'one-half-dark', 'one-half-light', 'monokai', 'custom'.</description>
667+
</key>
668+
<key name="terminal-font-size" type="i">
669+
<default>12</default>
670+
<summary>Terminal font size</summary>
671+
<description>The font size to use for the embedded terminal in point units.</description>
672+
</key>
628673
<key name="sidebar-width" type="i">
629674
<default>170</default>
630675
<summary>Width of the side pane</summary>

meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ gmodule = dependency('gmodule-no-export-2.0', version: glib_version)
7777
gobject = dependency('gobject-2.0', version: '>=2.0')
7878
go_intr = dependency('gobject-introspection-1.0', version: '>=1.0')
7979
json = dependency('json-glib-1.0', version: '>=1.6')
80+
vte = dependency('vte-2.91', version: '>=0.52.0')
8081

8182
cinnamon= dependency('cinnamon-desktop', version: '>=4.8.0')
8283
gail = dependency('gail-3.0')

src/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ nemoCommon_sources = [
6060
'nemo-script-config-widget.c',
6161
'nemo-self-check-functions.c',
6262
'nemo-statusbar.c',
63+
'nemo-terminal-widget.c',
6364
'nemo-thumbnail-problem-bar.c',
6465
'nemo-toolbar.c',
6566
'nemo-trash-bar.c',
@@ -103,7 +104,7 @@ if enableEmptyView
103104
endif
104105

105106
nemo_deps = [ cinnamon, gail, glib, gtk, math,
106-
egg, nemo_extension, nemo_private, xapp ]
107+
egg, nemo_extension, nemo_private, xapp, vte ]
107108

108109
if exempi_enabled
109110
nemo_deps += exempi

src/nemo-actions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
#define NEMO_ACTION_OPEN_IN_TERMINAL "OpenInTerminal"
150150
#define NEMO_ACTION_FOLLOW_SYMLINK "FollowSymbolicLink"
151151
#define NEMO_ACTION_OPEN_CONTAINING_FOLDER "OpenContainingFolder"
152+
#define NEMO_ACTION_SHOW_HIDE_TERMINAL "Show Hide Terminal"
152153

153154
#define NEMO_ACTION_PLUGIN_MANAGER "NemoPluginManager"
154155

0 commit comments

Comments
 (0)