Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apps:mousepad:start [2021/05/14 01:11] – [Required packages] gaelapps:mousepad:start [2023/07/02 08:03] (current) – Update Latest Release section kevinbowen
Line 10: Line 10:
   * **[[#Keybindings|Keybindings]]**   * **[[#Keybindings|Keybindings]]**
   * **[[#Required Packages|Required Packages]]**   * **[[#Required Packages|Required Packages]]**
 +  * **[[#Manual actions required for some version changes|Manual actions required for some version changes]]**
   * **[[#Latest Release|Latest Release]]**   * **[[#Latest Release|Latest Release]]**
   * **[[#Source Code Repository|Source Code Repository]]**   * **[[#Source Code Repository|Source Code Repository]]**
Line 18: Line 19:
 ===== Introduction ===== ===== Introduction =====
  
-**Mousepad** aims to be an easy-to-use and fast editor. Our target is an+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 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 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 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 release that is useful for the editor, we will likely bump the GTK dependency
-and integrate this new feature in **Mousepad**.+and integrate this new feature in Mousepad.
  
 ---- ----
Line 32: Line 33:
 </figure> </figure>
  
-<figure "View Preferences">+<figure "View and Editor Preferences">
 {{:apps:mousepad:mousepad_view_preferences.png|:apps:mousepad:mousepad_window.png}} {{:apps:mousepad:mousepad_view_preferences.png|:apps:mousepad:mousepad_window.png}}
-</figure> 
- 
-<figure "Editor Preferences"> 
 {{:apps:mousepad:mousepad_editor_preferences.png|:apps:mousepad:mousepad_editor_preferences.png}} {{:apps:mousepad:mousepad_editor_preferences.png|:apps:mousepad:mousepad_editor_preferences.png}}
 </figure> </figure>
  
-<figure "Window Preferences">+<figure "Window and File Preferences">
 {{:apps:mousepad:mousepad_window_preferences.png|:apps:mousepad:mousepad_window_preferences.png}} {{:apps:mousepad:mousepad_window_preferences.png|:apps:mousepad:mousepad_window_preferences.png}}
 +{{:apps:mousepad:mousepad_file_preferences.png|:apps:mousepad:mousepad_file_preferences.png}}
 </figure> </figure>
  
Line 56: Line 55:
 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. 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 GSettings command line tool. You can get a list of everything about Mousepad in GSettings with this command:+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    gsettings list-recursively org.xfce.mousepad
Line 66: Line 67:
 See ''man gsettings'' and ''gsettings help'' for more details. See ''man gsettings'' and ''gsettings help'' for more details.
  
-A graphical alternative to ''gsettings'' is Dconf Editornormally available from your distribution repositories: see https://wiki.gnome.org/Apps/DconfEditor.+For technical reasons, to access plugin preferencesone 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 ==== ==== Printing ====
  
-The settings for printing are treated separately, in the file ''~/.config/Mousepad/mousepadrc''Create this file if it does not exist, then 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.+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]] [[|Back to Top]]
Line 77: Line 89:
 ===== Keybindings ===== ===== Keybindings =====
  
-After its first use, Mousepad will generate the file ''~/.config/Mousepad/accels.scm'', containing the list of configurable keybindings. To customize a keybindinguncomment the corresponding line by removing the semicolon at the beginning, then change the shortcut at the end of the line, without touching the rest.+After its first use, Mousepad will generate the file ''~/.config/Mousepad/accels.scm'', containing the list of configurable keybindings. This file is overwritten by Mousepad at the end of each session, so to customize a keybinding you have to: 
 +  * quit Mousepad; 
 +  * open this file with a different text editor; 
 +  * uncomment the line corresponding to the shortcut you want to customize by removing the semicolon at the beginning
 +  * change the shortcut at the end of the line, without touching the rest. 
 + 
 +As of version 0.5.9, Mousepad has a shortcuts editor that can be accessed from the "Edit" menu or the preferences dialog, "Plugins" tab. However, it requires Libxfce4ui 4.17.5 to work, which is a development version. It is therefore likely that until Xfce 4.18 is released, this plugin will not be available in the versions of Mousepad packaged by your distribution. 
 + 
 +[[|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]] [[|Back to Top]]
Line 86: Line 121:
 Mousepad depends on the following packages: Mousepad depends on the following packages:
  
-  * [[https://wiki.gnome.org/Projects/GLib|GLib]] >=2.52.0 +  * [[https://wiki.gnome.org/Projects/GLib|GLib]] >= 2.52.0 
-  * [[https://www.gtk.org|GTK]] >=3.22.0 +  * [[https://www.gtk.org|GTK]] >= 3.22.0 
-  * [[https://wiki.gnome.org/Projects/GtkSourceView|GtkSourceView]] >=3.24.0 or >= 4.0.0+  * [[https://wiki.gnome.org/Projects/GtkSourceView|GtkSourceView]] >= 3.24.0 or >= 4.0.0
  
 Mousepad optionally depends on the following packages: Mousepad optionally depends on the following packages:
  
   * [[https://wiki.gnome.org/Projects/gspell|gspell]] >= 1.6.0   * [[https://wiki.gnome.org/Projects/gspell|gspell]] >= 1.6.0
 +  * [[https://gitlab.xfce.org/xfce/libxfce4ui|libxfce4ui]] >= 4.17.5
  
 [[|Back to Top]] [[|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 ===== ===== Latest Release =====
-{{rss>https://archive.xfce.org/feeds/project/mousepad 1 date description 2h}}+{{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/|Previous Releases]]**+  * **[[https://archive.xfce.org/src/apps/mousepad/|Download current release]]** (link also contains older versions)
  
 [[|Back to Top]] [[|Back to Top]]