~~NOTOC~~
{{ :apps:mousepad:4.22:mousepad.png?nolink|}}
====== Mousepad ======
Mousepad is a simple text editor for Xfce.
* **[[#Introduction|Introduction]]**
* **[[#Screenshots|Screenshots]]**
* **[[#Settings|Settings]]**
* **[[#Theming|Theming]]**
* **[[#Required Packages|Required Packages]]**
* **[[#Manual actions required for some version changes|Manual actions required for some version changes]]**
* **[[#Latest Release|Latest Release]]**
* **[[#Source Code Repository|Source Code Repository]]**
* **[[#Reporting Bugs|Reporting Bugs]]**
----
===== 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 =====
{{:apps:mousepad:4.22:mousepad_window.png?600|Mousepad Main Window}}
{{:apps:mousepad:4.22:mousepad_view_preferences.png|Mousepad View Preferences Window}}
{{:apps:mousepad:4.22:mousepad_editor_preferences.png|Mousepad Editor Preferences Window}}
{{:apps:mousepad:4.22:mousepad_window_preferences.png|Mousepad Window Preferences}}
{{:apps:mousepad:4.22:mousepad_file_preferences.png|Mousepad File Preferences Window}}
{{:apps:mousepad:4.22:mousepad_plugins_preferences.png|Mousepad Plugins Preferences Window}}
{{:apps:mousepad:4.22:mousepad_shortcuts_editor.png|Mousepad Shortcuts Editor Window}}
[[|Back to Top]]
----
===== Settings =====
The Preferences dialog windows, shown above, are the easiest way to modify Mousepad settings. Some of them are also accessible via the menubar, e.g. "Word Wrap" and "Auto Indent" in the "Document" menu.
All of these settings, plus some "hidden" ones, are also accessible using Dconf Editor, normally available from your distribution repositories: see https://apps.gnome.org/en/DconfEditor/.
From the command line, you can use ''gsettings'' or ''dconf'' to 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, use the following command:
gsettings set org.xfce.mousepad.preferences.view auto-indent true
See ''man gsettings'' and ''gsettings help'' for more details.
For technical reasons, to access the plugin preferences, one has to specify each plugin name separately:
gsettings list-recursively org.xfce.mousepad.plugins.gspell
''dconf'' can be an interesting alternative here, because it sees plugins as linked to Mousepad, as in the following command:
dconf dump /org/xfce/mousepad/
See ''man dconf'' and ''dconf help'' for additional details.
[[|Back to Top]]
----
==== 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.
NB: Before Mousepad 0.5.6, you must first create the configuration file if it does not exist:
>> ~/.config/Mousepad/mousepadrc
[[|Back to Top]]
----
===== Theming =====
As of version 0.5.9, Mousepad has a CSS style class "mousepad" to ease theming, which is used for example in this way:
.mousepad { color: red; }
It is also possible to mitigate some bugs by this way, like scrollbar grabbing when Mousepad is maximized (see https://gitlab.xfce.org/apps/mousepad/-/issues/34):
.mousepad.maximized > box > notebook > stack,
.mousepad.maximized > box > notebook > stack > scrolledwindow {
border-left: 0;
border-right: 0;
}
[[|Back to Top]]
----
===== Required packages =====
Mousepad depends on the following packages:
* [[https://docs.gtk.org/glib/|GLib]]
* [[https://www.gtk.org|GTK]]
* [[https://gitlab.gnome.org/GNOME/gtksourceview|GtkSourceView]]
Mousepad optionally depends on the following packages:
* [[https://gitlab.gnome.org/GNOME/gspell|gspell]]
* [[https://gitlab.xfce.org/xfce/libxfce4ui|libxfce4ui]]
For current version requirements of Xfce components, see the [[https://wiki.xfce.org/releng/4.22/roadmap#changes_in_dependencies|dependency version list]] on the developer wiki.
[[|Back to Top]]
----
===== Manual actions required for some version changes =====
From 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/
From 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.
[[|Back to Top]]
----
===== Latest Release =====
{{rss>https://archive.xfce.org/feeds/project/mousepad 1 date 2h}}
[[https://gitlab.xfce.org/apps/mousepad/-/blob/master/NEWS|Read the CHANGELOG]]
* **[[https://archive.xfce.org/src/apps/mousepad/|Download current release]]** (older versions of this component are also available here)
[[|Back to Top]]
----
===== Source code repository =====
[[https://gitlab.xfce.org/apps/mousepad]]
[[|Back to Top]]
----
===== Reporting Bugs =====
* **[[:apps:mousepad:bugs|Reporting Bugs]]** -- List of currently open bugs and instructions on how to submit new bug reports
[[|Back to Top]]
----
[[:4.22:start|Back to Xfce 4.22 Main Documentation Page]]