Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions gresources/nemo-file-management-properties.glade
Original file line number Diff line number Diff line change
Expand Up @@ -4383,6 +4383,22 @@ along with . If not, see <http://www.gnu.org/licenses/>.
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkBox" id="keybindings_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="name">keybindings</property>
<property name="title" translatable="yes">Keyboard Shortcuts</property>
<property name="icon-name">xsi-keyboard-shortcuts-symbolic</property>
<property name="position">9</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
Expand Down
2 changes: 2 additions & 0 deletions gresources/nemo-shell-ui.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<ui>
<accelerator action="Search"/>
<accelerator action="SplitViewNextPane"/>
<accelerator action="Bookmark Picker"/>
<accelerator action="Bookmark Picker Other Pane"/>
<accelerator action="TabsPrevious"/>
<accelerator action="TabsNext"/>
<accelerator action="TabsMoveLeft"/>
Expand Down
12 changes: 12 additions & 0 deletions gresources/nemo-style-fallback-mandatory.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
background-color: @theme_unfocused_bg_color;
}

/* Hide selection highlight and focus cursor in the inactive pane */
.nemo-window .nemo-inactive-pane .view:selected {
background-color: alpha(@theme_unfocused_selected_bg_color, 0.4);
color: @theme_fg_color;
}

.nemo-window .nemo-inactive-pane .view:focus {
outline-width: 0;
outline-offset: 0;
-gtk-outline-radius: 0;
}

/* Rename box styling in the icon view. */

.nemo-window .nemo-window-pane widget.entry {
Expand Down
258 changes: 258 additions & 0 deletions libnemo-private/org.nemo.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -895,4 +895,262 @@
<summary>List of search helper filenames to skip when using content search.</summary>
</key>
</schema>

<schema id="org.nemo.keybindings" path="/org/nemo/keybindings/">
<!-- Navigation -->
<key name="go-back" type="s">
<default>'&lt;Alt&gt;Left'</default>
<summary>Go back</summary>
</key>
<key name="go-forward" type="s">
<default>'&lt;Alt&gt;Right'</default>
<summary>Go forward</summary>
</key>
<key name="go-up" type="s">
<default>'&lt;Alt&gt;Up'</default>
<summary>Go to parent folder</summary>
</key>
<key name="go-home" type="s">
<default>'&lt;Alt&gt;Home'</default>
<summary>Go to home folder</summary>
</key>
<key name="edit-location" type="s">
<default>'&lt;Control&gt;l'</default>
<summary>Toggle location entry</summary>
</key>
<key name="reload" type="s">
<default>'&lt;Control&gt;r'</default>
<summary>Reload current location</summary>
</key>
<key name="reload-alt" type="s">
<default>'F5'</default>
<summary>Reload current location (alternate)</summary>
</key>
<key name="go-up-alt" type="s">
<default>'BackSpace'</default>
<summary>Go to parent folder (alternate)</summary>
</key>
<key name="search" type="s">
<default>'&lt;Control&gt;f'</default>
<summary>Search for files</summary>
</key>

<!-- Window -->
<key name="new-window" type="s">
<default>'&lt;Control&gt;n'</default>
<summary>Open a new window</summary>
</key>
<key name="close-window" type="s">
<default>'&lt;Control&gt;w'</default>
<summary>Close window or tab</summary>
</key>
<key name="close-all-windows" type="s">
<default>'&lt;Control&gt;q'</default>
<summary>Close all windows</summary>
</key>
<key name="show-hidden-files" type="s">
<default>'&lt;Control&gt;h'</default>
<summary>Toggle hidden files</summary>
</key>
<key name="show-sidebar" type="s">
<default>'F9'</default>
<summary>Toggle sidebar</summary>
</key>
<key name="split-view" type="s">
<default>'F3'</default>
<summary>Toggle split view</summary>
</key>
<key name="switch-pane" type="s">
<default>'F6'</default>
<summary>Switch to other pane</summary>
</key>
<key name="same-location-pane" type="s">
<default>'&lt;Alt&gt;s'</default>
<summary>Same location as other pane</summary>
</key>

<!-- Tabs -->
<key name="new-tab" type="s">
<default>'&lt;Control&gt;t'</default>
<summary>Open a new tab</summary>
</key>
<key name="previous-tab" type="s">
<default>'&lt;Control&gt;Page_Up'</default>
<summary>Previous tab</summary>
</key>
<key name="next-tab" type="s">
<default>'&lt;Control&gt;Page_Down'</default>
<summary>Next tab</summary>
</key>
<key name="move-tab-left" type="s">
<default>'&lt;Shift&gt;&lt;Control&gt;Page_Up'</default>
<summary>Move tab left</summary>
</key>
<key name="move-tab-right" type="s">
<default>'&lt;Shift&gt;&lt;Control&gt;Page_Down'</default>
<summary>Move tab right</summary>
</key>

<!-- View -->
<key name="zoom-in" type="s">
<default>'&lt;Control&gt;plus'</default>
<summary>Zoom in</summary>
</key>
<key name="zoom-out" type="s">
<default>'&lt;Control&gt;minus'</default>
<summary>Zoom out</summary>
</key>
<key name="zoom-normal" type="s">
<default>'&lt;Control&gt;0'</default>
<summary>Reset zoom to normal</summary>
</key>
<key name="icon-view" type="s">
<default>'&lt;Control&gt;1'</default>
<summary>Switch to icon view</summary>
</key>
<key name="list-view" type="s">
<default>'&lt;Control&gt;2'</default>
<summary>Switch to list view</summary>
</key>
<key name="compact-view" type="s">
<default>'&lt;Control&gt;3'</default>
<summary>Switch to compact view</summary>
</key>

<!-- Bookmarks -->
<key name="add-bookmark" type="s">
<default>'&lt;Control&gt;d'</default>
<summary>Add bookmark</summary>
</key>
<key name="edit-bookmarks" type="s">
<default>'&lt;Control&gt;b'</default>
<summary>Edit bookmarks</summary>
</key>
<key name="bookmark-picker" type="s">
<default>'&lt;Alt&gt;F1'</default>
<summary>Open bookmark and disk picker for current pane</summary>
</key>
<key name="bookmark-picker-other" type="s">
<default>'&lt;Alt&gt;F2'</default>
<summary>Open bookmark and disk picker for other pane</summary>
</key>

<!-- File Operations -->
<key name="open" type="s">
<default>'&lt;Control&gt;o'</default>
<summary>Open selected item</summary>
</key>
<key name="open-default" type="s">
<default>''</default>
<summary>Open with default application</summary>
</key>
<key name="open-alternate" type="s">
<default>'&lt;Control&gt;&lt;Shift&gt;o'</default>
<summary>Open in new window</summary>
</key>
<key name="open-in-new-tab" type="s">
<default>'&lt;Control&gt;&lt;Shift&gt;t'</default>
<summary>Open in new tab</summary>
</key>
<key name="open-in-terminal" type="s">
<default>'&lt;Shift&gt;F4'</default>
<summary>Open in terminal</summary>
</key>
<key name="open-containing-folder" type="s">
<default>'&lt;Control&gt;&lt;Alt&gt;o'</default>
<summary>Open containing folder</summary>
</key>
<key name="properties" type="s">
<default>'&lt;Alt&gt;Return'</default>
<summary>Show properties</summary>
</key>
<key name="new-folder" type="s">
<default>'&lt;Control&gt;&lt;Shift&gt;n'</default>
<summary>Create new folder</summary>
</key>
<key name="new-folder-alt" type="s">
<default>''</default>
<summary>Create new folder (alternate)</summary>
</key>
<key name="rename" type="s">
<default>'F2'</default>
<summary>Rename selected item</summary>
</key>
<key name="create-link" type="s">
<default>'&lt;Control&gt;m'</default>
<summary>Create symbolic link</summary>
</key>
<key name="pin-file" type="s">
<default>'&lt;Control&gt;&lt;Shift&gt;d'</default>
<summary>Pin or unpin file</summary>
</key>
<key name="trash" type="s">
<default>'Delete'</default>
<summary>Move to trash</summary>
</key>
<key name="trash-alt" type="s">
<default>''</default>
<summary>Move to trash (alternate key)</summary>
</key>
<key name="delete-permanently" type="s">
<default>'&lt;Shift&gt;Delete'</default>
<summary>Delete permanently</summary>
</key>
<key name="copy-to-other-pane" type="s">
<default>''</default>
<summary>Copy selection to other pane</summary>
</key>
<key name="move-to-other-pane" type="s">
<default>''</default>
<summary>Move selection to other pane</summary>
</key>

<!-- Clipboard -->
<key name="cut" type="s">
<default>'&lt;Control&gt;x'</default>
<summary>Cut files</summary>
</key>
<key name="copy" type="s">
<default>'&lt;Control&gt;c'</default>
<summary>Copy files</summary>
</key>
<key name="paste" type="s">
<default>'&lt;Control&gt;v'</default>
<summary>Paste files</summary>
</key>

<!-- Selection -->
<key name="select-all" type="s">
<default>'&lt;Control&gt;a'</default>
<summary>Select all items</summary>
</key>
<key name="select-pattern" type="s">
<default>'&lt;Control&gt;s'</default>
<summary>Select items matching a pattern</summary>
</key>
<key name="invert-selection" type="s">
<default>'&lt;Control&gt;&lt;Shift&gt;i'</default>
<summary>Invert selection</summary>
</key>

<!-- Edit -->
<key name="undo" type="s">
<default>'&lt;Control&gt;z'</default>
<summary>Undo</summary>
</key>
<key name="redo" type="s">
<default>'&lt;Control&gt;y'</default>
<summary>Redo</summary>
</key>

<!-- Help -->
<key name="show-help" type="s">
<default>'F1'</default>
<summary>Show help</summary>
</key>
<key name="show-shortcuts" type="s">
<default>'&lt;Control&gt;F1'</default>
<summary>Show keyboard shortcuts</summary>
</key>
</schema>
</schemalist>
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ nemoCommon_sources = [
'nemo-icon-view.c',
'nemo-image-properties-page.c',
'nemo-interesting-folder-bar.c',
'nemo-keybindings.c',
'nemo-list-model.c',
'nemo-list-view.c',
'nemo-location-bar.c',
Expand Down
2 changes: 2 additions & 0 deletions src/nemo-actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#define NEMO_ACTION_GO_HOME "Home"
#define NEMO_ACTION_ADD_BOOKMARK "Add Bookmark"
#define NEMO_ACTION_EDIT_BOOKMARKS "Edit Bookmarks"
#define NEMO_ACTION_BOOKMARK_PICKER "Bookmark Picker"
#define NEMO_ACTION_BOOKMARK_PICKER_OTHER "Bookmark Picker Other Pane"
#define NEMO_ACTION_HOME "Home"
#define NEMO_ACTION_ZOOM_IN "Zoom In"
#define NEMO_ACTION_ZOOM_OUT "Zoom Out"
Expand Down
5 changes: 5 additions & 0 deletions src/nemo-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#include <libnemo-private/nemo-thumbnails.h>
#include <libnemo-extension/nemo-menu-provider.h>

#include "nemo-keybindings.h"

#define DEBUG_FLAG NEMO_DEBUG_APPLICATION
#include <libnemo-private/nemo-debug.h>

Expand Down Expand Up @@ -565,6 +567,9 @@ nemo_application_startup (GApplication *app)
init_icons_and_styles ();
init_gtk_accels ();

/* initialize configurable keybindings */
nemo_keybindings_init ();

/* initialize nemo modules */
nemo_module_setup ();

Expand Down
14 changes: 14 additions & 0 deletions src/nemo-file-management-properties.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "nemo-plugin-manager.h"
#include "nemo-template-config-widget.h"
#include "nemo-actions.h"
#include "nemo-keybindings.h"

/* string enum preferences */
#define NEMO_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET "default_view_combobox"
Expand Down Expand Up @@ -487,6 +488,18 @@ nemo_file_management_properties_dialog_setup_templates_page (GtkBuilder *builder
TRUE, TRUE, 0);
}

static void
nemo_file_management_properties_dialog_setup_keybindings_page (GtkBuilder *builder)
{
GtkWidget *box;
GtkWidget *editor;

box = GTK_WIDGET (gtk_builder_get_object (builder, "keybindings_box"));
editor = nemo_keybindings_create_editor ();

gtk_box_pack_start (GTK_BOX (box), editor, TRUE, TRUE, 0);
}

static void
create_date_format_menu (GtkBuilder *builder)
{
Expand Down Expand Up @@ -1144,6 +1157,7 @@ nemo_file_management_properties_dialog_setup (GtkBuilder *builder,
nemo_file_management_properties_dialog_setup_list_column_page (builder);
nemo_file_management_properties_dialog_setup_plugin_page (builder);
nemo_file_management_properties_dialog_setup_templates_page (builder);
nemo_file_management_properties_dialog_setup_keybindings_page (builder);


setup_configurable_menu_items (builder);
Expand Down
2 changes: 1 addition & 1 deletion src/nemo-icon-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@ button_press_callback (GtkWidget *widget, GdkEventFocus *event, gpointer user_da
GdkEventButton *event_button = (GdkEventButton *)event;
gint selection_count = nemo_view_get_selection_count (NEMO_VIEW (view));

if (!nemo_view_get_active (view) && selection_count > 0) {
if (!nemo_view_get_active (view)) {
NemoWindowSlot *slot = nemo_view_get_nemo_window_slot (view);
nemo_window_slot_make_hosting_pane_active (slot);
return GDK_EVENT_STOP;
Expand Down
Loading