Xfce Wiki

Sub domains
 

Mousepad

Introduction

Mousepad aims to be an easy-to-use and fast editor. Our target is an editor for quickly editing text files, not a development environment or an editor with a huge bunch of plugins. On the other hand we try to use the latest GTK features available, which means that if GTK adds something new in a major release that is useful for the editor, we will likely bump the GTK dependency and integrate this new feature in Mousepad.


Screenshots

Main window
:apps:mousepad:mousepad_window.png

View and Editor Preferences
:apps:mousepad:mousepad_window.png :apps:mousepad:mousepad_editor_preferences.png

Window and File Preferences
:apps:mousepad:mousepad_window_preferences.png :apps:mousepad:mousepad_file_preferences.png

Plugins Preferences
:apps:mousepad:mousepad_plugins_preferences.png

Back To Top


Settings

The preferences dialog shown above is the easiest way to set Mousepad settings. Some of them are also accessible via the menubar, e.g. “Word Wrap” and “Auto Indent” in the “Document” menu.

All these settings, plus some “hidden” ones, are also accessible using Dconf Editor, normally available from your distribution repositories: see https://wiki.gnome.org/Apps/DconfEditor.

From the command line, you can use gsettings or dconf. You can get a list of everything about Mousepad in GSettings, except plugins, with this command:

 gsettings list-recursively org.xfce.mousepad

Then, to enable e.g. automatic indentation, just do

 gsettings set org.xfce.mousepad.preferences.view auto-indent true

See man gsettings and gsettings help for more details.

For technical reasons, to access plugin preferences, one has to specify each plugin name separately, e.g.

 gsettings list-recursively org.xfce.mousepad.plugins.gspell

dconf can be an interesting alternative here, because it sees plugins as linked to Mousepad, as e.g. in

 dconf dump /org/xfce/mousepad/

See man dconf and dconf help for more details.

Printing

The settings for printing are treated separately, in the file ~/.config/Mousepad/mousepadrc. Carry out a printing operation to the end (you can print in a file), and Mousepad will fill in the configuration file with the values set in the print dialog. Be sure to leave the value of PageSetupSaved at true so that all settings are reloaded the next time you print.

Back to Top


Keybindings

After its first use, Mousepad will generate the file ~/.config/Mousepad/accels.scm, containing the list of configurable keybindings. To customize a keybinding, uncomment the corresponding line by removing the semicolon at the beginning, then change the shortcut at the end of the line, without touching the rest.

Back to Top


Required packages

Mousepad depends on the following packages:

Mousepad optionally depends on the following packages:

Back to Top


Manual actions required for some version changes

As of version 0.5.4, Mousepad is likely to use GtkSourceView 4 (this is decided at compile time by the packager). If this is the case, the custom themes must be copied from ~/.local/share/gtksourceview-3.0/styles/ to ~/.local/share/gtksourceview-4/styles/:

 mkdir -p ~/.local/share/gtksourceview-4/styles/
 cp ~/.local/share/gtksourceview-3.0/styles/* ~/.local/share/gtksourceview-4/styles/

As of version 0.5.7, the name of the Mousepad launcher has changed from mousepad.desktop to org.xfce.mousepad.desktop, which breaks the mime type mapping. To fix this, just run this command:

 sed -Ei.bak 's/([=;])(mousepad.desktop)/\1org.xfce.\2/' ~/.config/mimeapps.list

The original mime type file will be kept as ~/.config/mimeapps.list.bak after running this command.

Latest Release

  • mousepad 0.5.7 released (2021/09/23 15:16)
    mousepad 0.5.7 is now available for download from
    
      https://archive.xfce.org/src/apps/mousepad/0.5/mousepad-0.5.7.tar.bz2
      https://archive.xfce.org/src/apps/mousepad/0.5/mousepad-0.5.7.tar.bz2?sha1
      https://archive.xfce.org/src/apps/mousepad/0.5/mousepad-0.5.7.tar.bz2?sha256
    
    
    What is mousepad?
    =================
    
    A simple text editor for Xfce.
    
    Website:
      https://docs.xfce.org/apps/mousepad/
    
    
    Release notes for 0.5.7
    =======================
    - Bug Fixes:
      - Update Appdata file and use the same description everywhere
      - Prevent warning when saving a deleted file via a symlink (#135)
      - Conform to Freedesktop.org standard for file naming
      - Properly disconnect signal handlers
      - Be sure not to disable highlighting when disabling regex search
      - Check for realpath()
      - Check for `errno.h` required by CI
      - Fix a nasty memory leak
      - Fix "Save As" procedure when it recurses
      - Allow drag and drop on selections in the textview
      - Code cleanup: Remove a useless dnd signal forwarding
      - Code cleanup: Simplify `mousepad_file_save()`
      - Fix a small memory leak
      - Improve trash can management
      - Update read-only status on file location change/validation
      - Monitor also the target of broken links
      - Fix monitoring of files opened through a symlink
      - Allow drag and drop of broken links
      - Follow symlinks if necessary when checking if a file exists
      - Replace `g_realloc()` with `g_renew()`
      - Replace `g_malloc*()` with `g_new*()` (!113)
      - Make sure that `gtk_selection_data_get_uris()` returned non-NULL
        (!113)
      - Initialize `contents` and use it to guard
        `g_file_replace_contents` (!113)
      - Fix an unlikely memory leak
      - Make CSD consistent with other Xfce windows (#145)
    - Translation Updates:
      Estonian, Greek, Kazakh, Polish, Serbian, Slovenian, Swedish,
      Ukrainian

Back to Top


Source code repository

Reporting Bugs

Back To Top


Back to main Xfce documentation page