def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This extension is a fork of the [Cinnamon Maximus](https://cinnamon-spices.linuxmint.com/extensions/view/29) extension by Fatih Mete. The main difference with the original is that I removed the blacklist feature in favor of a whitelist feature. I also added a couple of options for troubleshooting and completely removed the top border of undecorated maximized windows."
           ),
         "",
         "## %s" % _("Dependencies"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("The **xprop** and **xwininfo** commands needs to be available on the system."
           ),
         "",
         "- %s %s" % (
             _("Debian based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("These commands are provided by the **x11-utils** package. Linux Mint already has this package installed."
               )),
         "- %s %s" % (
             _("Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("These commands are provided by the **xorg-xprop** and **xorg-xwininfo** packages."
               )),
         "- %s %s" % (
             _("Fedora based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("These commands are provided by the **xorg-x11-utils** package."
               )),
     ])
Exemple #2
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This extension adds some options to modify the default behavior of certain Cinnamon features."
           ),
     ])
Exemple #3
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Extension based on the Gnome Shell extensions [Steal My Focus](https://github.com/v-dimitrov/gnome-shell-extension-stealmyfocus) and [Window Demands Attention Shortcut](https://github.com/awamper/window-demands-attention-shortcut). This extension adds two different behaviors for windows that demand attention. It force them to be activated or a keyboard shortcut can be assigned to activate windows on demand."
           ),
     ])
Exemple #4
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This extension adds some options to modify the default behaviour of certain Cinnamon features."
           ),
         "",
         "\n".join([
             "## Features/Options",
             "",
             "<span style=\"color:red;font-weight: bold;font-size: large;\">Some tweaks have warnings, dependencies, limitations and or known issues that must be read and understood before a tweak is enabled. No worries, nothing <em>fatal</em> could ever happen.</span>",
             "",
             "For detailed explanations of each option/tweak, see this extension help (accessible from this extension settings window).",
             "",
             "- **Applets/Desklets tweaks:** confirmation dialogs can be added to applet/desklet removal to avoid accidental removal. New items can be added to applets/desklets context menus (**Open applet/desklet folder** and **Edit applet/desklet main file**).",
             "- **Hot corners tweaks:** Allows to set a hover activation delay in milliseconds for each hot corner. This tweak is only available for Cinnamon versions lower than 3.2 (Cinnamon 3.2.x already has hot corners delay activation).",
             "- **Desktop area tweaks:** Allows to drag applications from the menu or from the launchers applets into the desktop.",
             "- **Popup menus tweaks:** Allows to change the behavior of the applets menus.",
             "- **Tooltips tweaks:** Allows to tweak the position and show delay of Cinnamon's UI tooltips. The position of the tooltip is only available for Cinnamon versions lower than 3.2 (Cinnamon 3.2.x already has the position of the tooltips changed).",
             "- **Notifications tweaks:** Allows changing the notification popups to the bottom of the screen and change its top/bottom/right margins.",
             "- **Window focus tweaks:** Allows the activation of windows demanding attention with a keyboard shortcut or forced. Tweak based on the gnome-shell extension called [Steal My Focus](https://github.com/v-dimitrov/gnome-shell-extension-stealmyfocus) by [Valentin Dimitrov](https://github.com/v-dimitrov) and another gnome-shell extension called [Window Demands Attention Shortcut](https://github.com/awamper/window-demands-attention-shortcut) by [awamper](https://github.com/awamper).",
             "- **Auto move windows:** Enables the ability to set rules to open determined applications on specific workspaces. Tweak based on the gnome-shell extension called [Auto Move Windows](https://extensions.gnome.org/extension/16/auto-move-windows/) by [Florian Muellner](https://github.com/fmuellner).",
             "- **Window shadows tweaks:** Allows to change the windows shadows to some predefined presets or completely customize the shadows of every single type of window. Tweak based on an extension called [Custom Shadows](https://cinnamon-spices.linuxmint.com/extensions/view/43) created by [mikhail-ekzi](https://github.com/mikhail-ekzi).",
             "- **Windows decorations removal:** Allows to remove the windows decorations from maximized/half-maximized/tiled windows. Tweak based on the Cinnamon extension called [Cinnamon Maximus](https://cinnamon-spices.linuxmint.com/extensions/view/29) by [Fatih Mete](https://github.com/fatihmete) with some options from the gnome-shell extension called [Maximus NG](https://github.com/luispabon/maximus-gnome-shell) by [Luis Pabon](https://github.com/luispabon).",
         ]) if for_readme else "",
     ])
Exemple #5
0
 def get_content_extra(self):
     return md("\n".join([
         "## %s" % _("Inverted menu on top panel"),
         "",
         utils.get_image_container(
             src="./assets/images/inverted-menu-on-top-panel.png",
             alt=_("Inverted menu on top panel")),
     ]))
 def get_content_extra(self):
     return md("\n".join([
         "## %s" % _("Inverted menu on top panel"),
         "",
         utils.get_image_container(
             src="./assets/images/inverted-menu-on-top-panel.png",
             alt=_("Inverted menu on top panel")
         ),
     ]))
 def get_content_extra(self):
     return md("\n".join([
         "## %s" % _("Settings window"),
         "",
         utils.get_image_container(
             src="./assets/images/settings-window.png",
             alt=_("Settings window")
         ),
         "",
     ]))
Exemple #8
0
 def get_content_extra(self):
     return "",
     utils.get_bootstrap_alert(
         heading=md("<strong>(*)</strong> ") + _("Why set a fixed applet width/height?"),
         content=md(
             "\n".join([
                 _("This option is for people that wants to use an instance of this applet at the end of a panel without an icon and without a label (like the button seen on Windows taskbars).")
             ])
         )
     ),
Exemple #9
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This applet is a fork of [Desktop Capture](https://github.com/rjanja/desktop-capture) applet by Rob Adams (a.k.a. rjanja)."
           ),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         _("The principal differences of this fork with the original applet are in usability and of the kind 'do more with less code'."
           ),
         "",
         "- %s" %
         _("More convenient handling of settings. Most settings can be changed directly from the applet menu or its context menu without the need to constantly open the applet settings window."
           ),
         "- %s" %
         _("Keyboard shortcuts are not only available for Cinnamon's built-in features, but for all screenshot/screencast programs."
           ),
         "- %s" %
         _("Settings are immediately available after changed without the need to restart Cinnamon."
           ),
         "- %s" %
         _("The 'Repeat last' item isn't only available for Cinnamon's screenshots, but for any device and any program."
           ),
         "",
     ])
Exemple #10
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This applet is a fork of [Drawer (show/hide applets)](https://cinnamon-spices.linuxmint.com/applets/view/169) applet by [mohammad-sn](https://github.com/mohammad-sn). Its main purpose is to selectively toggle the visibility of a group of applets inside a panel."
           ),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" %
         _("Multiple instances of this fork can be placed in any panel (only one instance per panel)."
           ),
         "- %s" % _("This fork supports vertical panels."),
         "",
     ])
Exemple #11
0
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Usage"),
         "",
         utils.get_bootstrap_alert(
             context="warning",
             content="<strong>%s</strong>" % md(
                 _("Do not try to hide with this applet the Cinnamon's default System Tray applet (nor any other applet that acts as such). The original Drawer applet handles these types of applets in a very *hacky* way (it sets the size of the tray icons to zero when hiding them and sets them back to a hard-coded size when displaying them). I simply removed that behavior from this fork because I refuse to deal with the mess that the system tray mechanism is in Cinnamon."
                   ))),
         "",
         "- %s" %
         _("The applet does its job when it is placed inside the rigth box of a panel (bottom box for vertical panels). Do not place inside any other panel box."
           ),
         "- %s" %
         _("All applets that are placed in front of this applet (or on top of it in vertical panels) will be hidden."
           ),
     ])))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Color Blindness Assistant is a Cinnamon extension that provides tools to assist users with color vision deficiency (CVD)."),
         "",
         "## %s" % _("Features"),
         "",
         _("This extension provides mainly of three features."),
         "",
         "- **%s**: %s" % (_("Color blindness compensation"),
                           _("A user can apply an effect (specific to her/his pathology) that will (might) help her/him to better differentiate colors.")),
         "- **%s**: %s" % (_("Color blindness simulation"),
                           _("A developer can apply an effect that will show her/him how a person with color vision deficiency will (might) see certain color combinations.")),
         "- **%s**: %s" % (_("Color naming"),
                           _("This feature is useful for knowing the name of the color that's immediately under the cursor.")),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This extension is a fork of the [Cinnamon Maximus](https://cinnamon-spices.linuxmint.com/extensions/view/29) extension by Fatih Mete. The main difference with the original is that I removed the blacklist feature in favor of a whitelist feature. I also added a couple of options for troubleshooting and completely removed the top border of undecorated maximized windows."),
         "",
         "## %s" % _("Dependencies"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("The **xprop** and **xwininfo** commands needs to be available on the system."),
         "",
         "- %s %s" % (_("Debian based distributions:"),
                      # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                      _("These commands are provided by the **x11-utils** package. Linux Mint already has this package installed.")),
         "- %s %s" % (_("Archlinux based distributions:"),
                      # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                      _("These commands are provided by the **xorg-xprop** and **xorg-xwininfo** packages.")),
         "- %s %s" % (_("Fedora based distributions:"),
                      # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                      _("These commands are provided by the **xorg-x11-utils** package.")),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet is a fork of the default Window list applet shipped with Cinnamon."),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" % _("Added option to remove the label from the window list buttons."),
         "- %s" % _("Added option to remove the tooltips from the window list buttons."),
         "- %s" % _("Added icons to the window list button's context menu."),
         "- %s" % _("Added option to invert the contex menu items."),
         "- %s" % _("Added option to hide/move the **Preferences** sub menu."),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet creates a menu with a list of all installed extensions in Cinnamon. From each menu item different tasks can be performed:"),
         "",
         "- %s" % _("Enable/Disable the extension"),
         "- %s" % _("Open the extension's settings page"),
         "- %s" % _("Open the extension's Spices page"),
         "- %s" % _("Open the extension folder"),
         "- %s" % _("Open its extension.js file"),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This applet is a fork of [Desktop Capture](https://github.com/rjanja/desktop-capture) applet by Rob Adams (a.k.a. rjanja)."),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         _("The principal differences of this fork with the original applet are in usability and of the kind 'do more with less code'."),
         "",
         "- %s" % _("More convenient handling of settings. Most settings can be changed directly from the applet menu or its context menu without the need to constantly open the applet settings window."),
         "- %s" % _("Keyboard shortcuts are not only available for Cinnamon's built-in features, but for all screenshot/screencast programs."),
         "- %s" % _("Settings are immediately available after changed without the need to restart Cinnamon."),
         "- %s" % _("The 'Repeat last' item isn't only available for Cinnamon's screenshots, but for any device and any program."),
         "",
     ])
Exemple #17
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet is a fork of the default Window list applet shipped with Cinnamon."),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" % _("Added option to remove the label from the window list buttons."),
         "- %s" % _("Added option to remove the tooltips from the window list buttons."),
         "- %s" % _("Added icons to the window list button's context menu."),
         "- %s" % _("Added option to invert the contex menu items."),
         "- %s" % _("Added option to hide/move the **Preferences** sub menu."),
         "",
         "## Inverted menu on top panel" if for_readme else "",
         "",
         "![Inverted menu on top panel](https://odyseus.github.io/CinnamonTools/lib/img/window-list-fork-001.png \"Inverted menu on top panel\")" if for_readme else "",
     ])
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Features"),
         "",
         "- %s" % _("All effects are applied through keyboard shortcuts."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s %s" % (_("All effects applied to windows are inherited by their *clones*. That is, the thumbnails of the windows displayed in [[Alt]] + [[Tab]] window switchers, Expo, etc."),
                      # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                      _("See **Known issues and limitations**.")),
         "",
         "## %s" % _("Known issues and limitations"),
         "",
         "- %s" % _("All effects applied by this extension are transient. Which means that, whenever a window is closed, Cinnamon is restarted or the system is restarted, all effects will be removed/destroyed."),
         "- %s" % _("Thumbnails of windows in the classic application switcher will not inherit the effect of the real windows. This is a limitation of my own; I simply couldn't find the way of doing it."),
     ])
     ))
Exemple #19
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet is a fork of the default Window list applet shipped with Cinnamon."
           ),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" %
         _("Added option to remove the label from the window list buttons."
           ),
         "- %s" %
         _("Added option to remove the tooltips from the window list buttons."
           ),
         "- %s" %
         _("Added icons to the window list button's context menu."),
         "- %s" % _("Added option to invert the contex menu items."),
         "- %s" %
         _("Added option to hide/move the **Preferences** sub menu."),
     ])
Exemple #20
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet creates a menu with a list of all installed extensions in Cinnamon. From each menu item different tasks can be performed:"
           ),
         "",
         "- %s" % _("Enable/Disable the extension"),
         "- %s" % _("Open the extension's settings page"),
         "- %s" % _("Open the extension's Spices page"),
         "- %s" % _("Open the extension folder"),
         "- %s" % _("Open its extension.js file"),
         "",
         "## Settings window" if for_readme else "",
         "",
         "![Settings window](https://odyseus.github.io/CinnamonTools/lib/img/ExtensionsManager-001.png \"Settings window\")"
         if for_readme else "",
     ])
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Xlet's settings window"),
         _("From this xlet settings window, all options can be imported, exported and/or reseted to their defaults."),
         "",
         "- %s" % _("To be able to perform any of these actions, the settings schema needs to be installed in the system. This is done automatically when the xlet is installed from the Cinnamon xlets manager. But if the xlet was installed manually, the settings schema also needs to be installed manually. This is achieved by simply going to the xlet folder and launch the following command:"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s %s" % (_("Command to install the settings schema:"),
                          "`./settings.py install-schema`"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s %s" % (_("Command to uninstall the settings schema:"),
                          "`./settings.py remove-schema`"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("To import/export settings, the **dconf** command needs to be available on the system."),
         "",
     ])
     ))
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Features"),
         "",
         "- %s" % _("All effects are applied through keyboard shortcuts."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s %s" % (
             _("All effects applied to windows are inherited by their *clones*. That is, the thumbnails of the windows displayed in [[Alt]] + [[Tab]] window switchers, Expo, etc."
               ),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("See **Known issues and limitations**.")),
         "",
         "## %s" % _("Known issues and limitations"),
         "",
         "- %s" %
         _("All effects applied by this extension are transient. Which means that, whenever a window is closed, Cinnamon is restarted or the system is restarted, all effects will be removed/destroyed."
           ),
         "- %s" %
         _("Thumbnails of windows in the classic application switcher will not inherit the effect of the real windows. This is a limitation of my own; I simply couldn't find the way of doing it."
           ),
         ""
     ])))
Exemple #23
0
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Xlet's settings window"),
         _("From this xlet settings window, all options can be imported, exported and/or reseted to their defaults."
           ),
         "",
         "- %s" %
         _("To be able to perform any of these actions, the settings schema needs to be installed in the system. This is done automatically when the xlet is installed from the Cinnamon xlets manager. But if the xlet was installed manually, the settings schema also needs to be installed manually. This is achieved by simply going to the xlet folder and launch the following command:"
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s %s" % (_("Command to install the settings schema:"),
                          "`./settings.py install-schema`"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s %s" % (_("Command to uninstall the settings schema:"),
                          "`./settings.py remove-schema`"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("To import/export settings, the **dconf** command needs to be available on the system."
           ),
         "",
     ])))
Exemple #24
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Applet based on the gnome-shell extension called [Desk Changer](https://github.com/BigE/desk-changer) by [Eric Gach](https://github.com/BigE). A wallpaper slideshow applet with multiple profiles support."
           ),
         "",
         "## %s" % _("Features"),
         "",
         "- %s" %
         _("Possibility to create and switch between several profiles. A profile is simply a list of images and/or folders containing images that this applet will use to switch the wallpaper."
           ),
         "- %s" %
         _("Possibility to preview the next wallpaper from this applet menu."
           ),
         "- %s" %
         _("Wallpapers can be switched on demand from the controls found in this applet menu."
           ),
         "- %s" %
         _("The wallpapers rotation can be alphabetically or random."),
         "- %s" %
         _("The wallpapers rotation can be defined by an interval in seconds or hourly."
           ),
         "- %s" %
         _("Possibility to open the next or current wallpapers from this applet menu."
           ),
         "- %s" %
         _("Possibility to display a notification every time the wallpaper is switched."
           ),
         "- %s" %
         _("Configurable hotkeys to switch to next/previous wallpaper."),
         "- %s" %
         _("Read the tooltips of each option on this applet settings window for more details."
           ),
     ])
    def get_content_extra(self):
        return md("{}".format("\n".join([
            "## %s" % _("How to install latest version of translate-shell"),
            "### %s" % _("Option 1. Direct Download"),
            _("This method will only install the trans script into the specified locations."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("For the current user only. **~/.local/bin** needs to be in your PATH."),
            "",
            """```shell
$ wget -O ~/.local/bin/trans git.io/trans && chmod ugo+rx ~/.local/bin/trans
```""",
            "",
            _("For all users without overwriting the installed version."),
            "",
            """```shell
$ sudo wget -O /usr/local/bin/trans git.io/trans && sudo chmod ugo+rx /usr/local/bin/trans
```""",
            "",
            "### %s" %
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Option 2. From Git - [More details](https://github.com/soimort/translate-shell/blob/develop/README.md#option-3-from-git-recommended-for-seasoned-hackers)"),
            _("This method will not just install the trans script but also its man pages. Refer to the link above for more installation details."),
            "",
            """```shell
$ git clone https://github.com/soimort/translate-shell
$ cd translate-shell
$ make
$ sudo make install
```""",
            "",
            "## %s" % _("Extension usage"),
            _("Once installed and enabled, the following shortcuts will be available."),
            "### %s" % _("Global shortcuts (configurable from the extension settings)"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Super]] + [[T]]:** Open translator dialog."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Super]] + [[Shift]] + [[T]]:** Open translator dialog and translate text from clipboard."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Super]] + [[Alt]] + [[T]]:** Open translator dialog and translate from primary selection."),
            "",
            "### %s" % _("Shortcuts available on the translation dialog"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Ctrl]] + [[Enter]]:** Translate text."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Shift]] + [[Enter]]:** Force text translation. Ignores translation history."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Ctrl]] + [[Shift]] + [[C]]:** Copy translated text to clipboard."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Ctrl]] + [[S]]:** Swap languages."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Ctrl]] + [[D]]:** Reset languages to default."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("**[[Escape]]:** Close dialog."),
            "",
            "## %s" % _("Xlet's settings window"),
            _("From this xlet settings window, all options can be imported, exported and/or reseted to their defaults."),
            "",
            "- %s" % _("To be able to perform any of these actions, the settings schema needs to be installed in the system. This is done automatically when the xlet is installed from the Cinnamon xlets manager. But if the xlet was installed manually, the settings schema also needs to be installed manually. This is achieved by simply going to the xlet folder and launch the following command:"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "    - %s %s" % (_("Command to install the settings schema:"),
                             "`./settings.py install-schema`"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "    - %s %s" % (_("Command to uninstall the settings schema:"),
                             "`./settings.py remove-schema`"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("To import/export settings, the **dconf** command needs to be available on the system."),
            "",
        ])
        ))
Exemple #26
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Simple translator applet that will allow to display the translation of any selected text from any application on a system in a popup."
           ),
         "",
         "## %s" % _("Dependencies"),
         "",
         "**%s**" %
         _("If one or more of these dependencies are missing in your system, you will not be able to use this applet."
           ),
         "",
         "### %s" % _("xsel command"),
         "",
         _("XSel is a command-line program for getting and setting the contents of the X selection."
           ),
         "",
         "- %s %s" % (
             _("Debian and Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **xsel**.")),
         "",
         "### %s" % _("xdg-open command"),
         "",
         _("Open a URI in the user's preferred application that handles the respective URI or file type."
           ),
         "",
         "- %s %s %s" % (
             _("Debian and Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("This command is installed with the package called **xdg-utils**."
               ),
             _("Installed by default in modern versions of Linux Mint.")),
         "",
         "### %s" % _("Python 3"),
         "",
         _("It should come already installed in all Linux distributions."),
         "",
         "### %s" % _("requests Python 3 module"),
         "",
         _("Requests allow you to send HTTP/1.1 requests. You can add headers, form data, multi-part files, and parameters with simple Python dictionaries, and access the response data in the same way. It's powered by httplib and urllib3, but it does all the hard work and crazy hacks for you."
           ),
         "",
         "- %s %s %s" % (
             _("Debian and Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("This command is installed with the package called **xdg-utils**."
               ),
             _("Installed by default in modern versions of Linux Mint.")),
         "- %s %s %s" % (
             _("Debian based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **python3-requests**."),
             _("Installed by default in modern versions of Linux Mint.")),
         "- %s %s" % (
             _("Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **python-requests**.")),
         "",
         "**%s**" %
         _("After installing any of the missing dependencies, Cinnamon needs to be restarted"
           ),
         "",
         "**%s** %s" %
         (_("Note:"),
          _("I don't use any other type of Linux distribution (Gentoo based, Slackware based, etc.). If any of the previous packages/modules are named differently, please, let me know and I will specify them in this help file."
            )),
         "",
         "## Translation history window" if for_readme else "",
         "",
         "![Translation history window](https://odyseus.github.io/CinnamonTools/lib/img/PopupTranslator-001.png \"Translation history window\")"
         if for_readme else "",
     ])
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Translation history window"),
         "",
         utils.get_image_container(
             src="./assets/images/translation-history-window.png",
             alt=_("Translation history window")
         ),
         "",
         "## %s" % _("Usage"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("There are 4 *translations mechanisms* (**Left click**, **Middle click**, **Hotkey #1** and **Hotkey #2**). Each translation mechanism can be configured with their own service providers, language pairs and hotkeys."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**First translation mechanism (Left click):** Translates any selected text from any application on your system. A hotkey can be assigned to perform this task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**First translation mechanism ([[Ctrl]] + Left click):** Same as **Left click**, but it will bypass the translation history. A hotkey can be assigned to perform this task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**Second translation mechanism (Middle click):** Same as **Left click**."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "**Second translation mechanism ([[Ctrl]] + Middle click):** Same as [[Ctrl]] + **Left click**."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**Third translation mechanism (Hotkey #1):** Two hotkeys can be configured to perform a translation and a forced translation."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**Fourth translation mechanism (Hotkey #2):** Two hotkeys can be configured to perform a translation and a forced translation."),
         "",
         _("All translations are stored into the translation history. If a string of text was already translated in the past, the popup will display that stored translated text without making use of the provider's translation service."),
         "",
         "## %s" % _("About translation history"),
         "",
         _("I created the translation history mechanism mainly to avoid the abuse of the translation services."),
         "",
         "- %s" % _("If the Google Translate service is \"abused\", Google may block temporarily your IP. Or what is worse, they could change the translation mechanism making this applet useless and forcing me to update its code."),
         "- %s" % _("If the Yandex Translate service is \"abused\", you are \"wasting\" your API keys quota and they will be blocked (temporarily or permanently)."),
         "",
         _("In the context menu of this applet is an item that can open the folder were the translation history file is stored. From there, the translation history file can be backed up or deleted."),
         "",
         "**%s**" % _("NEVER edit the translation history file manually!!!"),
         "",
         "**%s**" % _("If the translation history file is deleted/renamed/moved, Cinnamon needs to be restarted."),
         "",
         "## %s" % _("How to get Yandex translator API keys"),
         "",
         "- %s" % _("Visit one of the following links and register a Yandex account (or use one of the available social services)."),
         # TO TRANSLATORS: URL pointing to website in English
         "    - %s" % (_("English:") + " " + "https://tech.yandex.com/keys/get/?service=trnsl"),
         # TO TRANSLATORS: URL pointing to website in Russian
         "    - %s" % (_("Russian:") + " " + "https://tech.yandex.ru/keys/get/?service=trnsl"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Once you successfully finish creating your Yandex account, you can visit the link provided several times to create several API keys. **DO NOT ABUSE!!!**"),
         "- %s" % _("Once you have several API keys, you can add them to Popup Translator's settings window (one API key per line)."),
         "",
         "### %s" % _("Important notes about Yandex API keys"),
         "",
         "- %s" % _("The API keys will be stored into a preference. Keep your API keys backed up in case you reset Popup Translator's preferences."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**NEVER make your API keys public!!!** The whole purpose of going to the trouble of getting your own API keys is that the only one \"consuming their limits\" is you and nobody else."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("With each Yandex translator API key you can translate **UP TO** 1.000.000 (1 million) characters per day **BUT NOT MORE** than 10.000.000 (10 millions) per month."),
     ])
     ))
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Keyboard shortcuts"),
         _("The keyboard navigation inside this applet menu is very similar to the keyboard navigation used by any other menu on Cinnamon. But it's slightly changed to facilitate tasks and sections handling and edition."),
         "",
         "### %s" % _("When the focus is on a task"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Ctrl]] + [[Spacebar]]: Toggle the completed (checked) state of a task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + \
         _("[[Shift]] + [[Delete]]: Deletes a task and focuses the element above of the deleted task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Alt]] + [[Delete]]: Deletes a task and focuses the element bellow the deleted task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + \
         _("[[Ctrl]] + [[Arrow Up]] or [[Ctrl]] + [[Arrow Down]]: Moves a task inside its tasks list."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Insert]]: Will focus the **New task...** entry of the currently opened task section."),
         "",
         "### %s" % _("When the focus is on a task section"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Arrow Left]] and [[Arrow Right]]: If the tasks list (sub menu) is closed, these keys will open the sub menu. If the sub menu is open, these keys will move the cursor inside the sub menu label to allow the edition of the section text."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Insert]]: Will focus the **New task...** entry inside the task section. If the task section sub menu isn't open, it will be opened."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "### %s" % _("When the focus is on the **New task...** entry"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Ctrl]] + [[Spacebar]]: Toggles the visibility of the tasks list options menu."),
         "",
         "## %s" % _("Known issues"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("**Hovering over items inside the menu doesn't highlight menu items nor sub menus:** This is actually a desired feature. Allowing the items to highlight on mouse hover would cause the entries to loose focus, resulting in the impossibility to keep typing text inside them and constantly forcing us to move the mouse cursor to regain focus."),
         "- **%s** %s" % (_("Task entries look wrong:"), _(
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             "Task entries on this applet have the ability to wrap its text in case one sets a fixed width for them. They also can be multi line ([[Shift]] + [[Enter]] inside an entry will create a new line). Some Cinnamon themes, like the default Mint-X family of themes, set a fixed width and a fixed height for entries inside menus. These fixed sizes makes it impossible to programmatically set a desired width for the entries (at least, I couldn't find a way to do it). And the fixed height doesn't allow the entries to expand, completely breaking the entries capability to wrap its text and to be multi line.")),
         "",
         "### %s" % _("This is how entries should look like"),
         "",
         utils.get_image_container(
             src="./assets/images/correct-entries-styling.png",
             alt=_("Correct entries styling")
         ),
         "",
         "### %s" % _("This is how entries SHOULD NOT look like"),
         "",
         utils.get_image_container(
             src="./assets/images/incorrect-entries-styling.png",
             alt=_("Incorrect entries styling")
         ),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("The only way to fix this (that I could find) is by editing the Cinnamon theme that one is using and remove those fixed sizes. The CSS selectors that needs to be edited are **.menu StEntry**, **.menu StEntry:focus**, **.popup-menu StEntry** and **.popup-menu StEntry:focus**. Depending on the Cinnamon version the theme was created for, one might find just the first two selectors or the last two or all of them. The CSS properties that need to be edited are **width** and **height**. They could be removed, but the sensible thing to do is to rename them to **min-width** and **min-height** respectively. After editing the theme's file and restarting Cinnamon, the entries inside this applet will look and work like they should."),
     ])
     ))
    def get_content_base(self, for_readme):
        return "\n".join([
            "## %s" % _("Description"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("This applet is a fork of [Feeds Reader](https://cinnamon-spices.linuxmint.com/applets/view/149) applet by Jason Jackson (a.k.a. jake1164)."),
            "",
            "## %s" % _("Differences with the original applet"),
            "",
            "- %s" % _("Added keyboard shortcut to be able to open/close the menu."),
            "- %s" % _("Added proper keyboard navigation for the menu."),
            "- %s" % _("Eliminated the need of a stylesheet.css file. The menu will be styled respecting the currently used Cinnamon theme."),
            "- %s" % _("Feeds will only be updated from their online sources if the last check was made after the refresh interval."),
            "- %s" % _("Forced the use of Python 3 in all Python modules/scripts."),
            "",
            "## " + _("Dependencies"),
            "- **feedparser:** " +
            _("The feedparser Python 3 module is a universal feed parser that handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds."),
            _("Install with `pip` (Cinnamon needs to be restarted after installing feedparser if the applet was already placed in a panel):"),
            """
```
sudo pip3 install feedparser
```
            """
            "",
        ])
Exemple #30
0
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Keyboard navigation"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "**%s** %s" %
         (_("Note:"),
          _("Almost all keyboard shortcuts on this menu are the same as the original menu. There are just a couple of differences that I was forced to add to my menu to make some of its features to work."
            )),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Left Arrow]] and [[Right Arrow]] keys:"),
         "    - %s" %
         _("Cycles through the applications box and categories box if the focus is in one of these boxes."
           ),
         "    - %s" %
         _("If the focus is on the custom launchers box, these keys will cycle through this box buttons."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Tab]] key:"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" %
         _("If the applications box or categories box are currently focused, the [[Tab]] key will switch the focus to the custom launchers box."
           ),
         "    - %s" %
         _("If the focus is on the custom launchers box, the focus will go back to the categories box."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Up Arrow]] and [[Down Arrow]] keys:"),
         "    - %s" %
         _("If the applications box or categories box are currently focused, these keys will cycle through the items in the currently highlighted box."
           ),
         "    - %s" %
         _("If the focus is on the custom launchers box, the focus will go back to the categories box."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Page Up]] and [[Page Down]] keys: Jumps to the first and last item of the currently selected box. This doesn't affect the custom launchers."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Menu]] or [[Alt]] + [[Enter]] keys: Opens and closes the context menu (if any) of the currently highlighted item."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Enter]] key: Executes the currently highlighted item."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Escape]] key: It closes the main menu. If a context menu is open, it will close the context menu instead and a second tap of this key will close the main menu."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Shift]] + [[Enter]]: Executes the application as root. This doesn't affect the custom launchers."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Ctrl]] + [[Enter]]: Open a terminal and run application from there. This doesn't affect the custom launchers."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Ctrl]] + [[Shift]] + [[Enter]]: Open a terminal and run application from there, but the application is executed as root. This doesn't affect the custom launchers."
           ),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "## %s" % _("Applications left click extra actions"),
         _("When left clicking an application on the menu, certain key modifiers can be pressed to execute an application in a special way."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Shift]] + **Left click**: Executes application as root."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Ctrl]] + **Left click**: Open a terminal and run application from there."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Ctrl]] + [[Shift]] + **Left click**: Open a terminal and run application from there, but the application is executed as root."
           ),
         "",
         "## %s" % _("About \"Run from terminal\" options"),
         _("These options are meant for debugging purposes (to see the console output after opening/closing a program to detect possible errors, for example). Instead of opening a terminal to launch a program of which one might not know its command, one can do it directly from the menu and in just one step. Options to run from a terminal an application listed on the menu can be found on the applications context menu and can be hidden/shown from this applet settings window."
           ),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("By default, these options will use the system's default terminal emulator (**x-terminal-emulator** on Debian based distributions). Any other terminal emulator can be specified inside the settings window of this applet, as long as said emulator has support for the **-e** argument. I did my tests with **gnome-terminal**, **xterm** and **terminator**. Additional arguments could be passed to the terminal emulator, but it's not supported by me."
           ),
         "",
         "## %s" % _("Favorites handling"),
         _("**Note:** The favorites category will update its content after changing to another category and going back to the favorites category."
           ),
         "",
         "## %s" % _("Troubleshooting/extra information"),
         "1. " + _("Run from terminal."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    1. **%s** %s" %
         (_("Debian based distributions:"),
          _("If the command **x-terminal-emulator** doesn't run the terminal emulator that one wants to be the default, run the following command to set a different default terminal emulator."
            )),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "        - %s" %
         "`sudo update-alternatives --config x-terminal-emulator`",
         "        - %s" %
         _("Type in the number of the selection and hit enter."),
         "    2. **%s** %s" %
         (_("For other distributions:"),
          _("Just set the terminal executable of your choice on this applet settings window."
            )),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "2. %s" %
         _("There is a folder named **icons** inside this applet directory. It contains several symbolic icons (most of them are from the Faenza icon theme) and each icon can be used directly by name (on a custom launcher, for example)."
           ),
     ])))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This extension adds some options to modify the default behaviour of certain Cinnamon features."),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Argos for Cinnamon is an applet that turns executables' standard output into panel dropdown menus. It is inspired by, and fully compatible with, the Gnome Shell extension called [Argos](https://github.com/p-e-w/argos) by [Philipp Emanuel Weidmann](https://github.com/p-e-w), which in turn is inspired by, and fully compatible with, the [BitBar](https://github.com/matryer/bitbar) application for macOS. Argos for Cinnamon supports many [BitBar plugins](https://github.com/matryer/bitbar-plugins) without modifications, giving you access to a large library of well-tested scripts in addition to being able to write your own."),
         "",
         "## %s" % _("Key features"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         ("- %s %s" % (
             _("**100% API compatible with BitBar 1.9.2:** All BitBar plugins that run on Linux (i.e. do not contain macOS-specific code) will work with Argos (else it's a bug)."),
             _("See %s.") % (
                 "**[%s](#bitbar-plugins-with-argos-for-cinnamon-{{lhc_lang_id}})**" % _("BitBar plugins with Argos for Cinnamon"))
         )).strip(),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**Beyond BitBar:** Argos can do everything that BitBar can do, but also some things that BitBar can't do (yet). See the documentation for details."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**Sophisticated asynchronous execution engine:** No matter how long your scripts take to run, Argos will schedule them intelligently and prevent blocking."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("**Unicode support:** Just print your text to stdout. It will be rendered the way you expect."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("**Optimized for minimum resource consumption:** Even with multiple plugins refreshing every second, Argos typically uses less than 1 percent of the CPU."),
         ("- **%s** %s" % (
             _("Fully documented:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             md(_("See %s.") % ("**[%s](#usage-{{lhc_lang_id}})**" % _("Usage")))
         )).strip(),
         "",
         "## %s" % _("Dependencies"),
         "",
         "- **%s:** %s" % (_("xdg-open command"),
                           ("Open a URI in the user's preferred application that handles the respective URI or file type.")),
         "    - %s %s %s" % (_("Debian and Archlinux based distributions:"),
                             _("This command is installed with the package called **xdg-utils**."),
                             _("Installed by default in modern versions of Linux Mint.")),
         "\n"
     ])
 def get_content_extra(self):
     return md("{}".format("\n".join([
         utils.get_bootstrap_alert(
             context="warning",
             content=md(
                 "\n".join([
                     "- %s" % _("This applet requires valid credentials from any of the weather provider services for it to work."),
                     "- %s" % _("The credentials cannot be used until they have been activated by the weather providers.")
                 ])
             )
         ),
         "",
         "## %s" % _("Getting API credentials"),
         "",
         _("Follow the instructions made available by the providers."),
         "",
         "### %s" % _("Weather providers"),
         "",
         "| %s | %s | %s |" % (_("Provider"), _(
             "API credentials instructions"), _("Location finder")),
         "| -- | -- | -- |",
         "| %s | [%s](%s) | [%s](%s) |" % (
             _("Dark Sky"),
             _("Get credentials"), "https://darksky.net/dev",
             _("Find location"), "https://darksky.net/forecast",
         ),
         "| %s | [%s](%s) | [%s](%s) |" % (
             _("OpenWeatherMap"),
             _("Get credentials"), "https://openweathermap.org/appid",
             _("Find location"), "https://openweathermap.org/find",
         ),
         "| %s | [%s](%s) | [%s](%s) |" % (
             _("WeatherBit"),
             _("Get credentials"), "https://www.weatherbit.io/pricing",
             _("Find location"), "https://openweathermap.org/find",
         ),
         "| %s | [%s](%s) | [%s](%s) **(*)** |" % (
             _("Yahoo! Weather"),
             _("Get credentials"), "https://developer.yahoo.com/weather",
             _("Find location"), "http://woeid.rosselliot.co.nz",
         ),
         "",
         "**(*)** %s" % _("WeatherBit uses the same city IDs returned by OpenWeatherMap's location finder in addition to coordinates."),
         "",
         "## %s" % _("Menu layout"),
         "",
         utils.get_image_container(
             src="assets/images/menu-layout.png",
             alt=_("Menu layout")
         ),
         "",
         "1. %s" % _("Current weather condition for the currently selected location."),
         "2. %s" % _("Forecasts for the currently selected location."),
         "3. %s" % _(
             "The time in which the currently displayed data was published by the weather provider. Clicking it will attempt to retrieve updated weather data."),
         "4. %s" % _("Button to open the locations selector menu."),
         "5. %s" % _(
             "Weather provider attribution. When clicked, it opens the weather provider website."),
         "",
         "## %s" % _("Locations manager"),
         "",
         utils.get_bootstrap_alert(
             heading=_("Highlights"),
             content=md(
                 "\n".join([
                     "- %s" % _("The locations manager can be accessed from this applet context menu."),
                     # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                     "- %s" % _("Locations with the exact same *Location ID* and *Provider* are considered duplicated and will be automatically removed when applying changes."),
                     # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                     "- %s" % _("The *Apply changes* button must be pressed for the applet to reflect the changes made in the locations manager."),
                 ])
             )
         ),
         "",
         utils.get_image_container(
             src="assets/images/locations-manager.png",
             alt=_("Locations manager")
         ),
         "",
         "- **%s**: %s" % (
             _("Location name"),
             _("This is an informative field and it isn't used to retrieve weather data. It is used to identify the displayed data in the menu and to generate the items inside the locations selector menu.")
         ),
         "- **%s**: %s" % (
             _("Location ID"),
             _("A city/region ID used by the weather service providers to identify a location.")
         ),
         "   - %s" % _("Dark Sky uses only coordinates."),
         "   - %s" % _("Open Weather Map uses city IDs (the number at the end of a location URL) and coordinates."),
         "   - %s" % _("Yahoo! Weather uses WOEIDs and coordinates."),
         "- **%s**: %s" % (
             _("Language"),
             _("Weather conditions localization. Languages are only used by DarkSky and OpenWeatherMap providers and it only affect weather conditions text. Any other text of the applet UI is localized by the applet itself (if available).")
         ),
         "- **%s**: %s" % (
             _("Forecast days"),
             _("The amount of forecasts to display in the menu.")
         ),
         "- **%s**: %s" % (
             _("Forecast rows/columns"),
             _("The amount of rows/cols to display the forecast days in.")
         ),
         "- **%s**: %s" % (
             _("Provider"),
             _("Weather data provider. All weather providers require proper credentials to function.")
         ),
         "",
         "## %s" % _("Menu theme"),
         "",
         "- %s" % _("This applet supports custom themes to style its menu."),
         "- %s" % _("The default theme (found in APPLET_FOLDER/themes/default.css) only sets a generic styling to accommodate the elements in the menu."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("To use a custom theme, just set the **Menu theme** option to **Custom** and set the **Path to custom style sheet** option to point to a style sheet file."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("To create a custom theme, just make a copy of the default theme file anywhere on the file system, **except** inside the applet folder. The default theme file has the complete list of CSS classes used by this applet."),
         "- %s" % _("For the custom theme changes to be reflected on the menu while the theme file is modified, either Cinnamon can be restarted or the Cinnamon theme can be reloaded."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "Cinnamon provides a command to reload its theme. Just open the **Run command** dialog ([[Alt]] + [[F2]]), type **rt** and press [[Enter]]."),
         "",
         "## %s" % _("Icon theme"),
         "",
         "- %s" % _("This applet supports custom icon themes."),
         "- %s" % _("This applet comes with the possibility to choose 3 icon themes and they are named as follows."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - **%s**: %s" % (_("System"),
                               _("The applet will use the icons provided by the currently selected icon theme for the system.")),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - **%s**: %s" % (_("Built-in"),
                               _("The icons used are the ones found in APPLET_FOLDER/themes/icons.")),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - **%s**: %s" % (_("Custom"), _(
             "The icons used are the ones found in the path defined in the **Path to custom icon theme** option.")),
         "- %s" % _("An icon theme is just a folder that contains specifically named icon files."),
         "- %s" % _("The built-in icon theme is a monochrome theme and is found in APPLET_FOLDER/themes/icons."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("The built-in icon theme can be used as full color or symbolic icons (applet settings **Menu icon type** and **Applet icon type**). The difference is that, if used as a full color theme, the icons will be black no matter if the Cinnamon theme selected has light or dark backgrounds for menus. On the other hand, if it is used as symbolic icons, the color of the icons will be set by the selected Cinnamon theme. Additionally, symbolic icons can be colorized through the custom CSS theme (applet setting **Menu theme**) by styling the `weather-forecast-icon` and `weather-current-icon` classes."),
         "- %s" % _("To create a custom icon theme, the built-in icon theme can be used as a base."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("The built-in icon theme is composed of 36 *real images*, the rest of icons are symbolic links to these *real images*."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Inside the built-in icon theme is a script called **z_symlinkify.bash** that can be used to create an icon theme from scratch. This script also contains the list of *real images* that are used to create the symbolic links."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("A custom icon theme can contain only full colored icons, only symbolic icons or both. The **Menu icon type** and **Applet icon type** applet settings should be set accordingly to the icon type used by the custom theme."),
         "- %s" % _("A custom icon theme can contain SVG or PNG images; although SVG images are preferable due to their ability to scale into any icon size set in this applet settings without loosing quality. Other image types might be used, but I didn't test them."),
         "- %s" % _("A custom icon theme should contain 232 icons to support both full color and symbolic icons. Or half of that (116) to support one or the other."),
     ])
     ))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This applet is a fork of [Weather](https://cinnamon-spices.linuxmint.com/applets/view/17) applet by [mockturtl](https://github.com/mockturtl)."),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" % _("Added support for multiple locations."),
         "- %s" % _("Added support for multiple weather providers."),
         "- %s" % _("This applet caches the weather data used. Which means that weather providers will be contacted only when needed, preventing unnecessary API quota consumption."),
         "- %s" % _("The style sheet of this fork is used to accommodate the layout of its elements and it doesn't modify colors."),
         "- %s" % _("Added detailed tooltip to the applet about the current weather data location."),
         "- %s" % _("Menu layout redesigned."),
         "    - %s" % _("Forecasts can be displayed in one or two rows (or columns if the menu layout is set to vertical)."),
         "    - %s" % _("Forecasts can display the name of the day or the full date."),
         "    - %s" % _("The date in which the weather data was published is always displayed in the menu."),
         "    - %s" % _("More customization options (current weather icon size, forecasts icon size, etc.)."),
         "",
     ])
    def get_content_extra(self):
        return md("{}".format("\n".join([
            "## %s" % _("Extension options details"),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                heading=_("Warning"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                content=_("Some tweaks have warnings, dependencies, limitations and or known issues that must be read and understood before a tweak is enabled. No worries, nothing *fatal* could ever happen.")
            ),
            "",
            "## %s" % _("Table of Content"),
            "",
            "- [%s](#appletsdesklets-tweaks-{{lhc_lang_id}})" % _("Applets/Desklets tweaks"),
            "- [%s](#hot-corners-tweaks-{{lhc_lang_id}})" % _("Hot Corners tweaks"),
            "- [%s](#desktop-area-tweaks-{{lhc_lang_id}})" % _("Desktop area tweaks"),
            "- [%s](#popup-menus-tweaks-{{lhc_lang_id}})" % _("Popup menus tweaks"),
            "- [%s](#tooltips-tweaks-{{lhc_lang_id}})" % _("Tooltips tweaks"),
            "- [%s](#notifications-tweaks-{{lhc_lang_id}})" % _("Notifications tweaks"),
            "- [%s](#window-focus-tweaks-{{lhc_lang_id}})" % _("Window focus tweaks"),
            "- [%s](#window-shadows-tweaks-{{lhc_lang_id}})" % _("Window Shadows tweaks"),
            "- [%s](#auto-move-windows-{{lhc_lang_id}})" % _("Auto move windows"),
            "- [%s](#windows-decorations-removal-{{lhc_lang_id}})" % _(
                "Windows decorations removal"),
            "",
            '<span id="appletsdesklets-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Applets/Desklets tweaks"),
            "- **%s** %s" % (_("Ask for confirmation on applet/desklet removal:"), _(
                "Instead of directly remove the applet/desklet from the context menus, it will ask for confirmation. This option doesn't affect the removal of applets/desklets from the Applets/Desklets manager in Cinnamon settings (there will be no confirmation).")),
            "- **%s** & **%s** %s" % (_("Display \"Open applet/desklet folder\" on context menu for applets/desklets"), _("Display \"Edit applet/desklet main file\" on context menu for applets/desklet:"),
                                      # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                                      _("These options will add new menu items to the applets/desklets context menus. The place where this items will be located is chosen by the option **Where to place the menu item?**.")),
            "",
            '<span id="hot-corners-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Hot Corners tweaks"),
            _("This tweak is only available for Cinnamon versions lower than 3.2. Cinnamon 3.2.x already has hot corners delay activation."),
            "- **%s** %s" % (_("Top left hot corner activation delay:"), _("Crystal clear.")),
            "- **%s** %s" % (_("Top right hot corner activation delay:"), _("Crystal clear.")),
            "- **%s** %s" % (_("Bottom left hot corner activation delay:"), _("Crystal clear.")),
            "- **%s** %s" % (_("Bottom right hot corner activation delay:"), _("Crystal clear.")),
            "",
            '<span id="desktop-area-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Desktop area tweaks"),
            "- **%s** %s" % (_("Enable applications drop to the Desktop:"), _(
                "This tweak enables the ability to drag and drop applications from the menu applet and from the panel launchers applet into the desktop.")),
            "",
            '<span id="popup-menus-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Popup menus tweaks"),
            "##### %s" % _("Panel menus behavior"),
            "**%s** %s" % (_("Note:"), _(
                "This setting affects only the behavior of menus that belongs to applets placed on any panel.")),
            "",
            "- **%s** %s" % (_("Don't eat clicks:"), _("By default, when one opens an applet's menu on Cinnamon and then click on another applet to open its menu, the first click is used to close the first opened menu, and then another click has to be performed to open the menu of the second applet. With this option enabled, one can directly open the menu of any applet even if another applet has its menu open.")),
            "",
            '<span id="tooltips-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Tooltips tweaks"),
            "- **%s** %s" % (_("Avoid mouse pointer overlapping tooltips:"), _("Tooltips on Cinnamon's UI are aligned to the top-left corner of the mouse pointer. This leads to having tooltips overlapped by the mouse pointer. This tweak aligns the tooltip to the bottom-right corner of the mouse pointer (approximately), reducing the possibility of the mouse pointer to overlap the tooltip. This tweak is only available for Cinnamon versions lower than 3.2. Cinnamon 3.2.x already has the position of the tooltips changed.")),
            "- **%s** %s" % (_("Tooltips show delay:"), _("Crystal clear.")),
            "",
            '<span id="notifications-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Notifications tweaks"),
            "- **%s** %s" % (_("Enable notifications open/close animation:"), _("Crystal clear.")),
            "- **%s** %s" % (_("Notifications position:"), _(
                "Notifications can be displayed at the top-right of screen (system default) or at the bottom-right of screen.")),
            "- **%s**" % (_("Distance from panel:")),
            "    - **%s** %s" % (_("For notifications displayed at the top-right of screen:"), _(
                "This is the distance between the bottom border of the top panel (if no top panel, from the top of the screen) to the top border of the notification popup.")),
            "    - **%s** %s" % (_("For notifications displayed at the bottom-right of screen:"), _(
                "This is the distance between the top border of the bottom panel (if no bottom panel, from the bottom of the screen) to the bottom border of the notification popup.")),
            "- **%s** %s" % (_("Notification popup right margin:"), _(
                "By default, the right margin of the notification popup is defined by the currently used theme. This option, set to any value other than 0 (zero), allows to set a custom right margin, ignoring the defined by the theme.")),
            "",
            '<span id="window-focus-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Window focus tweaks"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on the gnome-shell extension called [Steal My Focus](https://github.com/v-dimitrov/gnome-shell-extension-stealmyfocus) by [Valentin Dimitrov](https://github.com/v-dimitrov) and another gnome-shell extension called [Window Demands Attention Shortcut](https://github.com/awamper/window-demands-attention-shortcut) by [awamper](https://github.com/awamper)."),
            "",
            _("Some windows that demands attention will not gain focus regardless of the settings combination on Cinnamon settings. This option will allow you to correct that."),
            "",
            "- **%s**" % _("The activation of windows demanding attention...:"),
            "    - **%s** %s" % (_("...is handled by the system:"), _("Crystal clear.")),
            "    - **%s** %s" % (_("...is immediate:"),
                                 _("will force windows demanding attention to be focused immediately.")),
            "    - **%s** %s" % (_("...is performed with a keyboard shortcut:"),
                                 _("will focus windows demanding attention with a keyboard shortcut.")),
            "- **%s** %s" % (_("Keyboard shortcut:"),
                             _("Set a keyboard shortcut for the option **...is performed with a keyboard shortcut**.")),
            "",
            '<span id="window-shadows-tweaks-{{lhc_lang_id}}"></span>',
            "### %s" % _("Window Shadows tweaks"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on a Cinnamon extension called [Custom Shadows](https://cinnamon-spices.linuxmint.com/extensions/view/43) created by [mikhail-ekzi](https://github.com/mikhail-ekzi). It allows to modify the shadows used by Cinnamon's window manager (Muffin)."),
            "",
            "**%s** %s" % (_("Note:"),
                           _("Client side decorated windows aren't affected by this tweak.")),
            "",
            "##### %s" % _("Shadow presets"),
            "- **%s**" % _("Custom shadows"),
            "- **%s**" % _("Default shadows"),
            "- **%s**" % _("No shadows"),
            "- **%s**" % _("Windows 10 shadows"),
            "",
            '<span id="auto-move-windows-{{lhc_lang_id}}"></span>',
            "### %s" % _("Auto move windows"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on the gnome-shell extension called [Auto Move Windows](https://extensions.gnome.org/extension/16/auto-move-windows/) by [Florian Muellner](https://github.com/fmuellner). It enables the ability to set rules to open determined applications on specific workspaces."),
            "",
            "**%s** %s" % (_("Note:"),
                           # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                           _("If the application that you want to select doesn't show up on the application chooser dialog, read the section on this help file called **Applications not showing up on the applications chooser dialogs**.")),
            "",
            '<span id="windows-decorations-removal-{{lhc_lang_id}}"></span>',
            "### %s" % _("Windows decorations removal"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on the extension called [Cinnamon Maximus](https://cinnamon-spices.linuxmint.com/extensions/view/29) by [Fatih Mete](https://github.com/fatihmete) with some options from the gnome-shell extension called [Maximus NG](https://github.com/luispabon/maximus-gnome-shell) by [Luis Pabon](https://github.com/luispabon). This tweak allows to remove the windows decorations from maximized/half-maximized/tiled windows."),
            "",
            "**%s** %s" % (_("Note:"),
                           # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                           _("If the application that you want to select doesn't show up on the application chooser dialog, read the section on this help file called **Applications not showing up on the applications chooser dialogs**.")),
            "",
            "#### %s" % _("Dependencies"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("This tweak requires two commands available on the system (**xprop** and **xwininfo**) for it to work."),
            "",
            "- %s %s" % (_("Debian based distributions:"),
                         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                         _("These commands are provided by the **x11-utils** package. Linux Mint already has this package installed.")),
            "- %s %s" % (_("Archlinux based distributions:"),
                         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                         _("These commands are provided by the **xorg-xprop** and **xorg-xwininfo** packages.")),
            "- %s %s" % (_("Fedora based distributions:"),
                         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                         _("These commands are provided by the **xorg-x11-utils** package.")),
            "",
            "#### %s" % _("Warnings"),
            "- %s" % _("Client side decorated windows and WINE applications aren't affected by this tweak."),
            "- %s" % _("Close all windows that belongs to an application that is going to be added to the applications list and before applying the settings of this tweak."),
            "- %s" % _("As a general rule to avoid issues, before enabling and configuring this tweak, close all windows currently opened, enable and configure this tweak and then log out and log back in."),
            "",
            "#### %s" % _("Known issues"),
            "- **%s** %s" % (_("Invisible windows:"), _("Sometimes, windows of applications that are configured to remove their decorations can become invisible. The application's icon can still be seen in the panel (taskbar) and when clicked to focus its respective window, the invisible window will block the clicks as if it were visible. To fix this, the window needs to be unmaximized (it will become visible again) and then closed. When reopened, the window should behave normally.")),
            "- **%s** %s" % (_("Applications stuck undecorated:"), _(
                "Some times, an application will get stuck undecorated even after unmaximizing it. Restarting the application will recover its ability to decorate and undecorate itself.")),
            "",
            "#### %s" % _("Alternative"),
            _("There is an alternative way of hiding the title bar of absolutely all maximized windows without exceptions. By editing your Metacity theme (window decorations theme). It works infinitely better and without any of the issues this tweak on this extension has."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("Simply go to `/Path/To/Your/Theme/metacity-1` folder and edit with any text editor the file called **metacity-theme-3.xml**. If that file doesn't exists in your theme, then it should exist one called **metacity-theme-2.xml** or **metacity-theme-1.xml**. Choose the one with the bigger number."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("Find the **frame_geometry** element named **max** (or **maximized** or **normal_max** or **normal_maximized**). Its exact name may vary depending on the theme."),
            "- %s" % _("Basically, one has to set to that element the attribute **has_title** to false, and then set all sizes of all its properties to 0 (zero). Some themes might require to add more properties and set them to 0 (zero) to completely get rid of the title bar."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("Next you will find examples on how to edit the Metacity themes found on the **Mint-X** and **Mint-Y** themes."),
            "",
            "##### %s" % _("For the Metacity theme found on the Mint-X theme"),
            "",
            """```xml
<frame_geometry name="maximized" has_title="false" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
    <distance name="right_width" value="0" />
    <distance name="left_titlebar_edge" value="0"/>
    <distance name="right_titlebar_edge" value="0"/>
    <distance name="title_vertical_pad" value="0"/>
    <border name="title_border" left="0" right="0" top="0" bottom="0"/>
    <border name="button_border" left="0" right="0" top="0" bottom="0"/>
    <distance name="bottom_height" value="0" />
</frame_geometry>
```""",
            "",
            "##### %s" % _("For the Metacity theme found on Mint-Y theme"),
            "",
            """```xml
<frame_geometry name="max" has_title="false" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
    <distance name="right_width" value="0" />
    <distance name="left_titlebar_edge" value="0"/>
    <distance name="right_titlebar_edge" value="0"/>
    <distance name="title_vertical_pad" value="0"/>
    <border name="title_border" left="0" right="0" top="0" bottom="0"/>
    <border name="button_border" left="0" right="0" top="0" bottom="0"/>
    <distance name="bottom_height" value="0" />
    <distance name="button_width" value="0"/>
    <distance name="button_height" value="0"/>
</frame_geometry>
```""",
            "",
            "## %s" % _("General extension issues"),
            "### %s" % _("Applications not showing up on the applications chooser dialogs"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("The application chooser dialog used by the settings window of this extension lists only those applications that have available .desktop files. Simply because these applications are the only ones that any of the tweaks that require an application ID (**Auto move windows** and **Windows decorations removal**) will recognize and handle."),
            "",
            _("Following the [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html), one can create a .desktop file for any application that doesn't appear in the applications list."),
            "## %s" % _("Xlet's settings window"),
            _("From this xlet settings window, all options can be imported, exported and/or reseted to their defaults."),
            "",
            "- %s" % _("To be able to perform any of these actions, the settings schema needs to be installed in the system. This is done automatically when the xlet is installed from the Cinnamon xlets manager. But if the xlet was installed manually, the settings schema also needs to be installed manually. This is achieved by simply going to the xlet folder and launch the following command:"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "    - %s %s" % (_("Command to install the settings schema:"),
                             "`./settings.py install-schema`"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "    - %s %s" % (_("Command to uninstall the settings schema:"),
                             "`./settings.py remove-schema`"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("To import/export settings, the **dconf** command needs to be available on the system."),
            "",
        ])
        ))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This applet is a fork of [Mailnag](https://cinnamon-spices.linuxmint.com/applets/view/244) applet by [Hasan Yavuz](https://github.com/hyOzd) (a.k.a. hyOzd)."),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" % _("Added keyboard shortcut to be able to open/close the menu."),
         "- %s" % _("Added option to keep just one sub-menu open."),
         "- %s" % _("Removed obsolete code. Mostly features that doesn't exist anymore in modern JavaScript."),
         "- %s" % _("Added more notification options that complements with the options existing in Mailnag's."),
         "",
         "## " + _("Dependencies"),
         "",
         "- **mailnag:** " + \
         _("Mailnag is a daemon program that checks POP3 and IMAP servers for new mail."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("Detailed installation instructions can be found on [Mailnag's repository](https://github.com/pulb/mailnag)."),
         _("Cinnamon needs to be restarted after installing Mailnag if the applet was already placed in a panel."),
         "",
         "## " + _("Usage"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("To configure Mailnag, launch its configuration program found in the applications menu, or from this applet context menu or by running the `mailnag-config` command."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "E-mail accounts can be directly added through Mailnag's configuration program or automatically detected by installing [Mailnag GNOME Online Accounts plugin](https://github.com/pulb/mailnag-goa-plugin)."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("The Mailnag plug-in called **DBus Service** needs to be enabled for this applet to be able to use the daemon."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Mailnag can be configured further by editing its configuration file at **~/.config/mailnag/mailnag.cfg**."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("It is recommended to install the Mailnag's optional dependency package `gir1.2-gnomekeyring-1.0` (or whatever the package is called in a given distribution) so Mailnag uses the keyring to store passwords."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("The Mailnag's **LibNotify Notifications** plug-in cannot add notification actions such as mark mails as read or open mail client directly from the notification. These features are available only for Gnome (a limitation hard-coded into the plug-in itself). This applet implements its own configurable notifications to bypass such limitations. Needless to say, if one choses to use the notifications provided by this applet, the **LibNotify Notifications** plug-in must be disabled to avoid receiving duplicated notifications."),
         "",
     ])
    def get_content_extra(self):
        return md("{}".format("\n".join([
            "",
            "## %s" % _("Programs support"),
            "",
            _("In addition to Cinnamon's built-in screenshot/screencast tools, this applet also supports third-party programs to take captures. By default, this applet comes with support for several known programs (Shutter, Gnome Screenshot, XWD, ImageMagic, FFmepg, RecordMyDesktop, Byzanz and Kazam)."),
            "",
            utils.get_bootstrap_alert(
                heading=_("Highlights"),
                content=md("""
- {0}
- {1}
- {2}
- {3}
- {4}
- {5}
- {6}""".format(
                    # TO TRANSLATORS: Do not translate the words "camera" and "recorder".
                    # MARKDOWN string. Respect formatting.
                    _("Programs are stored inside an applet preference. They are grouped by devices. A device called **camera** that contains programs that take screenshots. And a device called **recorder** that contains programs that capture screencasts."),
                    _("Programs can be added/removed/modified as much as needed/wanted from this applet context menu by simply exporting the existent programs, modifying the generated JSON file and importing the modified file again."),
                    _("Commands are exactly that, commands. They are composed of command line arguments , placeholders, and/or flags."),
                    # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                    _(
                        "Placeholders are strings specifically formatted with double curly braces (`{{PLACEHOLDER_NAME}}`) and can be placed in any part of a string. These strings are replaced with dynamically generated data (an applet preference, screen coordinates, etc.) when a command is executed."),
                    # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                    _("Flags are another type of specifically formatted strings surrounded by hashes (`#FLAG_NAME#`) and they always must be placed at the beginning of a string. Flags indicate that an action must be taken before a command is executed."),
                    _("The exported JSON file exemplifies almost all the options, flags and placeholders documented below."),
                    _("The command that will be executed can be previewed before actually executing it by simply right clicking a menu item."),
                ))
            ),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                heading=_("Warnings"),
                content=md("""
- {0}
- {1}
- {2}
- {3}""".format(
                    _("All option names, flags, and placeholders are case sensitive. Command option names are lower cased and use dashes as word separators. Placeholders and flags are upper cased and use low dashes as word separators."),
                    _("An imported JSON file will overwrite an existent preference."),
                    _("Importing a malformed/invalid JSON file will cancel the import operation without modifying an existent preference."),
                    _("There isn't a mechanism to check if a command is available or not on the system the applet is installed. So, use common sense."),
                ))
            ),
            "",
            "### %s" % _("Basic example"),
            "",
            """```
{{
    "camera": {{
        "{pro_name}": {{
            "title": "{pro_title}",
            "cursor": {{
                "on": "{cursor_on}",
                "off": "{cursor_off}"
            }},
            "timer": true,
            "append-1": "{append_1}",
            "menuitems": {{
                "{item_label} 1": "{item_command}",
                "---": "{separator}",
                "{item_label} 2": "{item_command}",
            }}
        }}
    }},
    "recorder": {{
        "{pro_name}": {{
            "title": "{pro_title}",
            "fps": true,
            "cursor": {{
                "on": "{cursor_on}",
                "off": "{cursor_off}"
            }},
            "sound": {{
                "on": "{sound_on}",
                "off": "{sound_off}"
            }},
            "menuitems": {{
                "#{item_label} 1": "{item_command} ({item_label_hash})",
                "---": "{separator}",
                "{item_label} 2": "{item_command}",
            }},
            "stop-command": "{stop_command}"
        }}
    }}
}}
```""".format(
                pro_name=_("Program/Command name"),
                pro_title=_("Name of the program shown on the program selector menu"),
                sound_on=_("Argument to include sound in capture"),
                sound_off=_("Argument to not include sound in capture"),
                stop_command=_("Command to stop recording"),
                separator=_("This is a separator"),
                cursor_on=_("Argument to include cursor in capture"),
                cursor_off=_("Argument to not include cursor in capture"),
                # TO TRANSLATORS: Do not translate the word "APPEND_1".
                append_1=_("The content here will be used to replace the {{APPEND_1}} placeholder"),
                item_label=_("Menu item label"),
                item_label_hash=_("See %s." % ("**%s**" % _("Menu item label flags"))),
                item_command=_("Command to execute when clicking this menu item"),
            ),
            "",
            "### %s" % _("Program options"),
            "",
            "| %s | %s | %s |" % (_("Option"), _("Usage"), _("Description")),
            "| --- | --- | --- |",
            "| `title` | %s | %s |" % (_("Mandatory"), _(
                "This option will be used as the program name in the program selector sub-menu.")),
            "| `menuitems` | %s | %s |" % (_("Mandatory"), _(
                "This option contains all the data that will be used to create the menu items for a program.")),
            "| `stop-command` | %s - %s | %s |" % (_("Mandatory"), _(
                "Recorder only"), _("The command to stop recording a screencast.")),
            "| `timer` | %s - %s | %s |" % (_("Optional"), _("Camera only"),
                                            # TO TRANSLATORS: Do not translate the words "true" and "DELAY".
                                            # MARKDOWN string. Respect formatting.
                                            _("This option is used in combination with the `{{DELAY}}` placeholder. If set to **true**, sets the visibility of the **Capture delay** option inside this applet menu.")),
            "| `fps` | %s - %s | %s |" % (_("Optional"), _("Recorder only"),
                                          # TO TRANSLATORS: Do not translate the word "true".
                                          # MARKDOWN string. Respect formatting.
                                          _("This option, if set to **true**, sets the visibility of the **Frames per second** option inside this applet menu.")),
            "| `cursor` | %s | %s |" % (_("Optional"),
                                        # TO TRANSLATORS: Do not translate the words "on", "off", and "CURSOR".
                                        # MARKDOWN string. Respect formatting.
                                        _("This option is used in combination with the `{{CURSOR}}` placeholder. It must contain two keys named **on** and **off** which respectively must contain a comand line argument for enabling/disabling the display of the mouse cursor on the captured file.")),
            "| `sound` | %s - %s | %s |" % (_("Optional"), _("Recorder only"),
                                            # TO TRANSLATORS: Do not translate the words "on", "off", and "SOUND".
                                            # MARKDOWN string. Respect formatting.
                                            _("This option is used in combination with the `{{SOUND}}` placeholder. It must contain two keys named **on** and **off** which respectively must contain a comand line argument for enabling/disabling the inclusion of sound on the captured file.")),
            "| `append-1` ... `append-10` | %s | %s |" % (_("Optional"), _(
                "These options are used in combination with the `{{APPEND_1}}` to `{{APPEND_10}}` placeholders. This is done to avoid repeating the same arguments on all menu items commands.")),
            "",
            "### %s" % _("Flags"),
            "",
            "#### %s" % _("Menu item label flags"),
            "",
            "| %s | %s |" % (_("Flag"), _("Description")),
            "| --- | --- |",
            "| `#` | %s |" % _(
                "The hash (#) character in front of a menu item label is a flag that inhibits the menu item from changing the state of the applet (the change of the applet icon from normal to recording)."),
            "",
            "#### %s" % _("Menu item command flags"),
            "",
            "| %s | %s |" % (_("Flag"), _("Description")),
            "| --- | --- |",
            "| `#INTERACTIVE_AREA_HELPER#` | %s |" % _(
                "This flag will allow the use of this applet area selector helper. See %s" % ("**[%s](#menu-item-command-interactive-placeholders-{{lhc_lang_id}})**" % _("Menu item command interactive placeholders"))),
            "| `#INTERACTIVE_WINDOW_HELPER#` | %s |" % _(
                "This flag will allow the use of this applet window selector helper. See %s" % ("**[%s](#menu-item-command-interactive-placeholders-{{lhc_lang_id}})**" % _("Menu item command interactive placeholders"))),
            "",
            "### %s" % _("Menu item command placeholders"),
            "",
            "| %s | %s | %s |" % (_("Placeholder"), _("Usage"), _("Description")),
            "| --- | --- | --- |",
            # TO TRANSLATORS: Do not translate the word "append".
            # MARKDOWN string. Respect formatting.
            "| `{{APPEND_1}}` ... `{{APPEND_10}}` |  | %s |" % _(
                "Placeholder for the program options `append-1` to `append-10`."),
            "| `{{CURSOR}}` |  | %s |" % _(
                "The command line argument used to decide if the capture will display the cursor or not."),
            "| `{{DELAY}}` | %s | %s |" % (_("Camera only"), _(
                "Delay in seconds before taking a screenshot.")),
            "| `{{DIRECTORY}}` |  | %s |" % _("The directory used as storage for the captures."),
            "| `{{EXT}}` |  | %s |" % _(
                "The file extension that the generated capture will have. It has to be used in pairs (Example: `{{EXT}}png{{EXT}}`)."),
            "| `{{FILENAME}}` |  | %s |" % _(
                "The file name (no extension included) that the generated capture will have."),
            "| `{{FPS}}` | %s | %s |" % (_("Recorder only"), _(
                "Frames per second (frame rate).")),
            "| `{{RECORDER_DIR}}` |  | %s |" % _(
                "The directory used to store the screencast captures."),
            "| `{{SCREEN_DIMENSIONS}}` |  | %s |" %
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("The screen dimensions with format `widthxheight`. Example: `1440x900`"),

            "| `{{SCREEN_HEIGHT}}`  |  | %s |" % _("The screen height."),
            "| `{{SCREEN_WIDTH}}`  |  | %s |" % _("The screen width."),
            "| `{{SCREENSHOT_DIR}}`  |  | %s |" % _(
                "The directory used to store the screenshot captures."),
            "| `{{SOUND}}` | %s | %s |" % (_("Recorder only"), _(
                "The command line argument used to decide if the capture include sound or not.")),
            "",
            '<span id="menu-item-command-interactive-placeholders-{{lhc_lang_id}}"></span>',
            "",
            "### %s" % _("Menu item command interactive placeholders"),
            "",
            "| %s | %s |" % (_("Placeholder"), _("Description")),
            "| --- | --- |",
            "| `{{I_X}}` | %s |" % _("`x` screen coordinates."),
            "| `{{I_Y}}` | %s |" % _("`y` screen coordinates."),
            "| `{{I_X_Y}}` | %s |" % _("`x` and `y` screen coordinates separated by a comma."),
            "| `{{I_WIDTH}}` | %s |" % _(
                "It could be either the width of a selected area or the width of a selected window."),
            "| `{{I_HEIGHT}}` | %s |" % _(
                "It could be either the height of a selected area or the height of a selected window."),
            "| `{{I_NICE_WIDTH}}` | %s |" % _(
                "Same as `I_WIDTH`, but with `1` added to its value."),
            "| `{{I_NICE_HEIGHT}}` | %s |" % _(
                "Same as `I_HEIGHT`, but with `1` added to its value."),
            "| `{{I_X_WINDOW_ID}}` | %s |" % _("The selected window ID."),
            "| `{{I_X_WINDOW_FRAME}}` | %s |" % _(
                "The 'x-window' property of the selected window."),
            "| `{{I_WM_CLASS}}` | %s |" % _("The selected window class name."),
            "| `{{I_WINDOW_TITLE}}` | %s |" % _("The selected window class title."),
            "",
            "## %s" % _("Cinnamon recorder profiles"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("The built-in Cinnamon recorder uses the GStreamer general-purpose multimedia framework ([GStreamer documentation](https://gstreamer.freedesktop.org/documentation/index.html)). It generates a video file with the `webm` extension using the `vp8enc` encoder and the `webmmux` muxer. This applet exposes the use of the Cinnamon recorder through profiles."),
            "",
            utils.get_bootstrap_alert(
                heading=_("Highlights"),
                content=md("""
- {0}
- {1}
""".format(
                    _("Profiles are stored inside an applet preference."),
                    _("Profiles can be added/removed/modified as much as needed/wanted from this applet context menu by simply exporting the existent profiles, modifying the generated JSON file and importing the modified file again."),
                ))
            ),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                heading=_("Warnings"),
                content=md("""
- {0}
- {1}
- {2}""".format(
                    _("An imported JSON file will overwrite an existent preference."),
                    _("Importing a malformed/invalid JSON file will cancel the import operation without modifying an existent preference."),
                    _("Like everything coming from Gnome, GStreamer is an always-evolving-never-finished-barely-functional piece of software. With that in mind, when using the wrong combination of encoder/muxer, Cinnamon will miserably crash. So, experiment at your own risk."),
                ))
            ),
            "",
            "### %s" % _("Basic example"),
            "",
            _("Below are the two Cinnamon recorder profiles shipped with this applet. The profile named default cannot be modified/deleted."),
            "",
            """```
{
    "default": {
        "title": "Default",
        "description": "Encoder: On2 VP8\\nMuxer: WebM\\nFile extension: webm",
        "file-extension": "webm",
        "pipeline": "vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux"
    },
    "x264enc": {
        "title": "H264",
        "description": "Encoder: H264\\nMuxer: Matroska\\nFile extension: mkv",
        "file-extension": "mkv",
        "pipeline": "x264enc ! queue ! matroskamux"
    }
}
```""",
            "",
            "### %s" % _("Profile options"),
            "",
            _("All profile options are mandatory."),
            "",
            "| %s | %s |" % (_("Option"), _("Description")),
            "| --- | --- |",
            "| `title` | %s |" % _("Name of the profile shown on the profile selector menu."),
            "| `description` | %s |" % _(
                "Basic description of the profile that will be displayed as a tooltip."),
            "| `file-extension` | %s |" % _("The file extension of the generated file."),
            "| `pipeline` | %s |" % _("GStreamer pipeline."),
            "",
            "## %s" % _("Keyboard shortcuts"),
            "",
            _("Keyboard shortcuts are tied to specific capture types."),
            "",
            "## %s" % _("Known issues"),
            "",
            "<h3 class='text-danger'>%s</h3>" % _(
                "Cinnamon 3.0.x and its built-in screenshot mechanism"),
            "",
            "<p class='text-danger'><strong>%s</strong></p>" % _(
                "The Cinnamon's 3.0.x built-in screenshot mechanism is broken!"),
            "",
            "<p class='text-danger'><strong>%s</strong></p>" % _(
                "Do not use it or Cinnamon will crash!"),
            "",
            "<p class='text-danger'><strong>%s</strong></p>" % _(
                "It can only be fixed by building from source the cinnamon package for version 3.0.x with the following patch (%s). Or by simply updating to any other newer version of Cinnamon (3.2.x, 3.4.x, etc.)." % "<a href='https://github.com/linuxmint/Cinnamon/pull/5777'>PR#5777</a>"),
            "",
            "<p class='text-danger'><strong>%s</strong></p>" % _(
                "To permanently dismiss the critical notification displayed when the applet is used under Cinnamon 3.0.x, enable the option found in this applet settings window called \"I read the disclaimer and I'm aware of the consequences\", under the \"Disclaimer\" section."),
            "",
        ])
        ))
Exemple #38
0
    def get_content_extra(self):
        return md("{}".format("\n".join([
            '<span id="usage-{{lhc_lang_id}}"></span>',
            "## %s" % _("Usage"),
            "",
            utils.get_bootstrap_alert(content=md(
                _("I will use the words *plugin* or *script* when referring to a script file associated with an instance of **Argos for Cinnamon** applet."
                  ))),
            "",
            _("After placing a new instance of **Argos for Cinnamon** into a panel, one of the example scripts provided by this applet will be automatically attached to it and a menu will be created based on the output of the executed plugin. These example scripts contain various examples of what **Argos for Cinnamon** can do."
              ),
            "",
            _("A just placed applet will have an initial execution interval of 0 seconds (zero seconds) and an initial applet text rotation interval of 3 seconds (three seconds). The execution interval is set to 0 seconds because the initial example script doesn't have any dynamic data that requires update. And the applet text rotation interval is set to 3 seconds so the text rotation of the example script can be seen in action."
              ),
            "",
            _("For scripts that display non dynamic data, it isn't needed an execution interval. But if your script displays dynamic data (a clock for example), then an execution and/or applet text rotation interval needs to be specified. Both of these values can be set from the applet context menu."
              ),
            "",
            utils.get_bootstrap_alert(content=md(
                _("The three example scripts provided by this applet will produce the exact same output, but they are created using three different languages (**bash_examples.bash**, **python_examples.py** and **ruby_examples.rb**)."
                  ))),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                content="<strong>%s</strong>" %
                _("Never save your custom plugins/scripts inside this applet folder. Otherwise, you will loose them all when there is an update for the applet."
                  )),
            "",
            "### %s" % _("File name format"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("**Argos for Gnome Shell** parses the script's file name to extract certain set of preferences. **Argos for Cinnamon** doesn't parse the script's file name in such way (nor in any other way). All the applet settings can be set from the applet settings window and/or from the applet context menu."
              ),
            "### %s" % _("Output format"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Argos plugins are executables (such as shell scripts **(*)**) that print to standard output lines of the following form:"
              ),
            """```
    TEXT | ATTRIBUTE_1=VALUE ATTRIBUTE_2=VALUE ...
    ```""",
            "",
            _("All attributes are optional, so the most basic plugins simply print lines consisting of text to be displayed. To include whitespace, attribute values may be quoted using the same convention employed by most command line shells."
              ),
            "",
            utils.get_bootstrap_alert(content="<strong>%s</strong>" % _(
                "(*) Not just shell scripts, but also python scripts, ruby scripts or any other script in any other language that can print to standard output."
            )),
            "",
            "### %s" % _("Rendering"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Lines containing only dashes (`---`) are *separators*."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Lines above the first separator belong to the applet button itself. If there are multiple such lines, they are displayed in succession, each of them for a configurable amount of time (rotation interval) before switching to the next. Additionally, all button lines get a dropdown menu item, except if their `dropdown` attribute is set to `false`."
              ),
            "",
            _("Lines below the first separator are rendered as dropdown menu items. Further separators create graphical separator menu items."
              ),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Lines beginning with `--` are rendered in a submenu associated with the preceding unindented line. **Argos for Cinnamon** supports unlimited number of nested submenus."
              ),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("[Emoji codes](http://www.emoji-cheat-sheet.com) like `:horse:` and `:smile:` in the line text are replaced with their corresponding Unicode characters (unless the `emojize` attribute is set to `false`). Note that unpatched Cinnamon does not yet support multicolor emoji."
              ),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("[ANSI SGR escape sequences](https://en.wikipedia.org/wiki/ANSI_escape_code#graphics) and [Pango markup](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) tags may be used for styling. This can be disabled by setting the `ansi` and `useMarkup` attributes, respectively, to `false`."
              ),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Backslash escapes such as `\\n` and `\\t` in the line text are converted to their corresponding characters (newline and tab in this case), which can be prevented by setting the `unescape` attribute to `false`. Newline escapes can be used to create multi-line menu items."
              ),
            "",
            "## %s" % _("Line attributes"),
            "",
            "### %s" % _("Display"),
            _("Control how the line is rendered."),
            "",
            "| %s | %s | %s |" %
            (_("Attribute"), _("Value"), _("Description")),
            "| --- | --- | --- |",
            "| `color` | %s | %s |" % (_("Hex RGB/RGBA or color name"),
                                       _("Sets the text color for the item.")),
            "| `font` | %s | %s |" %
            (_("Font name"), _("Sets the font for the item.")),
            "| `size` | %s | %s |" %
            (_("Font size in points"), _("Sets the font size for the item.")),
            "| `iconName` | %s | %s |" % (
                _("Icon name"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("Sets a menu icon for the item. See the [freedesktop.org icon naming specification](https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) for a list of names that should work anywhere, or run [gtk3-icon-browser](https://developer.gnome.org/gtk3/unstable/gtk3-icon-browser.html) to see the names of all icons in your current icon theme. **Argos only**. **Argos for Cinnamon** also supports a path to an icon file (paths starting with `~/` will be expanded to the user's home folder)."
                  )),
            "| `image`, `templateImage` | %s | %s |" % (
                _("Base64-encoded image file"),
                # TO TRANSLATORS: MARKDOWN string. Respect
                # formatting.
                _("Renders an image inside the item. The image is positioned to the left of the text and to the right of the icon. Cinnamon does not have a concept of *template images*, so `image` and `templateImage` are interchangeable in Argos."
                  )),
            "| `imageWidth`, `imageHeight` | %s | %s |" % (
                _("Width/height in pixels"),
                # TO TRANSLATORS: MARKDOWN string. Respect
                # formatting.
                _("Sets the dimensions of the image. If only one dimension is specified, the image's original aspect ratio is maintained. **Argos only**."
                  )),
            "| `length` | %s | %s |" %
            (_("Length in characters"),
             _("Truncate the line text to the specified number of characters, ellipsizing the truncated part."
               )),
            "| `trim` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |"
            %
            (_("Boolean value"),
             _("If disabled, preserve leading and trailing whitespace of the line text."
               ), _("Enabled by default if not specified.")),
            "| `dropdown` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |"
            %
            (_("Boolean value"),
             _("If disabled and the line is a button line (see above), exclude it from being displayed in the dropdown menu."
               ), _("Enabled by default if not specified.")),
            "| `alternate` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |"
            % (
                _("Boolean value"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If enabled, the item is hidden by default, and shown in place of the preceding item when the [[Alt]] key is pressed."
                  )),
            "| `emojize` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |"
            % (
                _("Boolean value"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If disabled, disable substitution of `:emoji_name:` with emoji characters in the line text."
                  ),
                _("Enabled by default if not specified.")),
            "| `ansi` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |"
            %
            (_("Boolean value"),
             _("If disabled, disable interpretation of ANSI escape sequences in the line text."
               ), _("Enabled by default if not specified.")),
            "| `useMarkup` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |"
            %
            (_("Boolean value"),
             _("If disabled, disable interpretation of Pango markup in the line text. **Argos only**."
               ), _("Enabled by default if not specified.")),
            "| `unescape` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |"
            % (
                _("Boolean value"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If disabled, disable interpretation of backslash escapes such as `\\n` in the line text. **Argos only**."
                  ),
                _("Enabled by default if not specified.")),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Attributes available on **Argos for Cinnamon** only."),
            "",
            "| %s | %s | %s |" %
            (_("Attribute"), _("Value"), _("Description")),
            "| --- | --- | --- |",
            "| `tooltip` | %s | %s |" % (_("Text to display as toolip"),
                                         _("Sets the tooltip for the item.")),
            "| `iconSize` | %s | %s |" % (
                _("An integer from 12 to 512"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("Sets the size for the menu item's icon if any. The size for menu item icons can be defined globally in the settings of an instance of Argos for Cinnamon."
                  )),
            "| `iconIsSymbolic` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |"
            % (
                _("Boolean value"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If enabled, the symbolic version of `iconName` will be used on the item (if exists). This attribute is ignored if the icon defined in `iconName` is a path to an icon file."
                  )),
            "### %s" % _("Actions"),
            _("Define actions to be performed when the user clicks on the line's menu item."
              ),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Action attributes are *not* mutually exclusive. Any combination of them may be associated with the same item, and all actions are executed when the item is clicked."
              ),
            "",
            "| %s | %s | %s |" %
            (_("Attribute"), _("Value"), _("Description")),
            "| --- | --- | --- |",
            "| `command`, `bash` | %s | **[(1)](#about-command-bash-attributes-{{lhc_lang_id}})** %s |"
            %
            (_("A command to execute"),
             _("Runs a command using a default shell specified in the options of an instance of Argos for Cinnamon or specified by the `shell` attribute."
               )),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `shell` | %s | %s |" %
            (_("Path or executable name of a shell program"),
             _("This attribute overrides the default shell set on the settings of an instance of Argos for Cinnamon. This attribute should only be used if one decides to use different shells to execute commands whithin the menu created by an instance of Argos for Cinnamon."
               )),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `shellArgument` | %s | %s |" %
            (_("Argument to pass to a shell program"),
             _("The argument used by a shell program that allows to execute a command. In most shells is '-c'. This attribute overrides the shell argument set on the settings of an instance of Argos for Cinnamon. This attribute should only be used if the shell argument set on the settings of an instance of Argos for Cinnamon isn't compatible with the shell specified in the `shell` attribute."
               )),
            "| `terminal` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |"
            % (
                _("Boolean value"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If disabled, runs the command specified in the `command` or `bash` attributes in the background (i.e. without opening a terminal window). If enabled, a terminal will be opened to execute a command and will be kept open."
                  )),
            "| `param1`, `param2`, ... | %s | %s |" % (
                _("Command line arguments"),
                # TO TRANSLATORS: MARKDOWN string. Respect
                # formatting.
                _("Arguments to be passed to the command specified in the `command` or `bash` attributes. *Note: Provided for compatibility with BitBar only. Argos allows placing arguments directly in the command string.*"
                  )),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `href` | URI | %s |" %
            _("Opens a URI in the application registered to handle it. URIs starting with `http://` launch the web browser, while `file://` URIs open the file in its associated default application. **Argos for Cinnamon** also supports paths starting with `~/` that will be automatically expanded to the user's home folder."
              ),
            "| `eval` | %s | %s |" % (
                _("JavaScript code"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("Passes the code to JavaScript's `eval` function. **Argos only**."
                  )),
            "| `refresh` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |"
            % (
                _("Boolean value"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If enabled, re-runs the plugin, updating its output.")),
            "",
            '<span id="about-command-bash-attributes-{{lhc_lang_id}}"></span>',
            "",
            utils.get_bootstrap_alert(
                heading="<strong>(1)</strong> %s" % _(
                    # TO TRANSLATORS: Full sentence:
                    # About the "command" and "bash" attributes.
                    # Do not translate nor modify the {command} and {bash} placeholders.
                    "About the {command} and {bash} attributes").format(
                        command="<code>command</code>",
                        bash="<code>bash</code>"),
                content=md(
                    _("These attributes are mutually exclusive. I added the `command` attribute because it didn't make much sense to have it named `bash` when Argos for Cinnamon can use any shell, not just Bash. I left the `bash` attribute so any scripts written for BitBar or for the original Argos for Gnome Shell extension can be used without modifications. I will never remove the `bash` attribute while the two previously mentioned tools keep using it."
                      ))),
            "",
            '<span id="about-boolean-attributes-{{lhc_lang_id}}"></span>',
            "",
            utils.get_bootstrap_alert(
                heading="<strong>(2)</strong> %s" %
                _("About boolean attributes"),
                content=md(
                    _("Any boolean attribute can have a value of `true` or `1` (one) to enable a feature/option. Or a value of `false` or `0` (zero) to disable a feature/option. Values are case-insensitive. Any other value will be considered `false`."
                      ))),
            "",
            "### %s" % _("Environment variables"),
            _("Plugin executables are run with the following special environment variables set:"
              ),
            "",
            "| %s | %s |" % (_("Name"), _("Value")),
            "| --- | --- |",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `ARGOS_VERSION` | %s |" %
            _("Version number of the Argos for Cinnamon applet. The presence of this environment variable can also be used to determine that the plugin is actually running in Argos, rather than BitBar or [kargos](https://github.com/lipido/kargos)."
              ),
            "| `ARGOS_MENU_OPEN` | %s |" %
            _("`true` if the dropdown menu was open at the time the plugin was run, and `false` otherwise."
              ),
            "",
            '<span id="bitbar-plugins-with-argos-for-cinnamon-{{lhc_lang_id}}"></span>',
            "",
            "## %s" % _("BitBar plugins with Argos for Cinnamon"),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                heading=_("WARNING!!! DO NOT RANDOMLY TEST SCRIPTS!!!"),
                content=md("""
{0}
{1}
{2}
""".format(
                    "1. %s" %
                    _("Apply common sense. Read and understand what a script does and how demanding it could be."
                      ), "2. %s" %
                    _("Test unknown scripts on an environment from which you can recover easily (for example, a virtual machine)."
                      ), "3. %s" %
                    _("I found one specific case in which a script can freeze and ultimately crash Cinnamon. It's a script that downloads a GIF image from the internet, converts it to Base64 and then that encoded image is inserted into a menu item using the *image* attribute. I will not provide a link to that script, but if you follow the very first advice that I listed here, when you see that script, you will know."
                      )))),
            "",
            _("These screenshots show how some scripts from the BitBar plugin repository look when rendered by Argos compared to the \"canonical\" BitBar rendering (macOS screenshots taken from https://getbitbar.com)."
              ),
            "",
            "| %s | %s | %s |" %
            (_("Plugin"), _("BitBar on macOS"), _("Argos on Cinnamon")),
            "| --- | :---: | :---: |",
            "| [**Ping**](https://getbitbar.com/plugins/Network/ping.10s.sh) | <img src=\"./assets/images/image-ping-bitbar.png\" class=\"img-fluid\" alt=\"Ping/BitBar\"> | <img src=\"./assets/images/image-ping-argos.png\" class=\"img-fluid\" alt=\"Ping/Argos\"> |",
            "| [**Stock Ticker**](https://getbitbar.com/plugins/Finance/gfinance.5m.py) | <img src=\"./assets/images/stock-ticker-bitbar.png\" class=\"img-fluid\" alt=\"Stock Ticker/BitBar\"> | <img src=\"./assets/images/stock-ticker-argos.png\" class=\"img-fluid\" alt=\"Stock Ticker/BitBar\"> |",
            "| [**World Clock**](https://getbitbar.com/plugins/Time/worldclock.1s.sh) | <img src=\"./assets/images/world-clock-bitbar.png\" class=\"img-fluid\" alt=\"World Clock/BitBar\"> | <img src=\"./assets/images/world-clock-argos.png\" class=\"img-fluid\" alt=\"World Clock/BitBar\"> |",
            "| [**ANSI**](https://getbitbar.com/plugins/Tutorial/ansi.sh) | <img src=\"./assets/images/ansi-bitbar.png\" class=\"img-fluid\" alt=\"ANSI/BitBar\"> | <img src=\"./assets/images/ansi-argos.png\" class=\"img-fluid\" alt=\"ANSI/BitBar\"> |",
        ])))
Exemple #39
0
    def get_content_extra(self):
        return md("{}".format("\n".join([
            "### %s" % _("Image featuring different icons for each sub-menu and different icon sizes"),
            "",
            utils.get_image_container(
                src="./assets/images/image-featuring-different-icons-each-sub-menu-and-different-icon-sizes.png",
                alt=_("Image featuring different icons for each sub-menu and different icon sizes")
            ),
            "",
            "## %s" % _("Applet usage"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("After placing a new instance of **Quick Menu** into a panel, an existing directory needs to be chosen for it to create a menu structure with."),
            "- %s" % _("Applications can also be dragged (from Cinnamon menu or any other menu based on it) and dropped into this applet in the panel for quick item creation. This operation makes a copy of the application's .desktop file into the directory configured to be used by this applet."),
            "- %s" % _("Menu items created from .desktop files will be displayed with the icon and name declared inside the .desktop files themselves."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _(
                "Menu items created from .desktop files have a context menu (opened with **Right click** or with the [[Menu]] key). From their context menu one has direct access to edit the .desktop file and also to actions provided by them if any."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _(
                "The menu can be kept open while activating menu items by pressing [[Ctrl]] + **Left click** or with **Middle click**."),
            "",
            "## %s" % _("How to set a different icon for each sub-menu"),
            "",
            "- %s" %
            _("Create a file named .directory inside the folders that will be used to create the sub-menus."),
            "- %s" % _("The content of the .directory file should be exactly as follows."),
            "",
            """```
[Desktop Entry]
Type=Application
Icon=icon name or absolute path to an icon file
```""",
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("The path to the icon has to be a valid icon name or a full path."),
            "",
        ])
        ))
Exemple #40
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet is a custom version of the default Cinnamon Menu applet, but infinitely more customizable."
           ),
         "",
         "## %s" % _("Added options/features"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "**Note:** Read the help file for this applet (Help item on this applet context menu) for detailed information about this applet keyboard navigation and other features."
         if for_readme else "",
         "",
         "- %s" %
         _("Removed Favorites box in favor of a Favorites category."),
         "- %s" % _("Removed applications info box in favor of tooltips."),
         "- %s" %
         _("Removed All Applications category in favor of not having it (LOL)."
           ),
         "- %s" % _("Removed drag&drop capabilities."),
         "- %s" %
         _("Added a custom launchers box that can run any command/script/file."
           ),
         "- %s" %
         _("Custom launchers icons can have a custom size and can be symbolic or full color."
           ),
         "- %s" %
         _("Custom launchers can execute any command (as entered in a terminal) or a path to a file. If the file is an executable script, an attempt to execute it will be made. Otherwise, the file will be opened with the systems handler for that file type."
           ),
         "- %s" %
         _("The size of the Categories/Applications icons can be customized."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("The **Recent Files** category can be hidden. This is for people who want the **Recent Files** category hidden without disabling recent files globally."
           ),
         "- %s" %
         _("The placement of the categories box and the applications box can be swapped."
           ),
         "- %s" %
         _("The placement of the custom launchers box and the search box can be swapped."
           ),
         "- %s" % _("Scrollbars in the applications box can be hidden."),
         "- %s" %
         _("Recently installed applications highlighting can be disabled."),
         "- %s" %
         _("Recently used applications can be remembered and will be displayed on a category called **Recent Applications**. The applications will be sorted by execution time. The order of these applications can be inverted and there is an option to exclude favorites from being listed."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("The default **Add to panel**, **Add to desktop** and **Uninstall** context menu items can be hidden."
           ),
         "- %s" %
         _("The menu editor can be directly opened from this applet context menu without the need to open it from the settings windows of this applet."
           ),
         "- %s" % _("The context menu for applications has 5 new items:"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run as root:** Executes application as root."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" %
         _("**Edit .desktop file:** Open the application's .desktop file with a text editor."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" %
         _("**Open .desktop file folder:** Open the folder where the application's .desktop file is stored."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" %
         _("**Run from terminal:** Open a terminal and run application from there."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" %
         _("**Run from terminal as root:** Same as above but the application is executed as root."
           ),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "## Menu *emulating* the Whisker menu (XFCE)"
         if for_readme else "",
         "",
         "![Whisker menu](https://odyseus.github.io/CinnamonTools/lib/img/CustomCinnamonMenu-001.png \"Whisker menu\")"
         if for_readme else "",
         ""
     ])
Exemple #41
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("The function of this applet is very simple, create a menu based on the files/folders found inside a main folder (specified on this applet settings window). The files will be used to create menu items and the sub folders will be used to create sub-menus."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("I mainly created this applet to replicate the functionality of the XFCE plugin called **Directory Menu** and the KDE widget called **Quick access**."),
         "",
         utils.get_bootstrap_alert(
             context="danger",
             heading=_("Danger"),
             content=_("This applet has to read every single file/folder inside a main folder to create its menu. So, do not try to use this applet to create a menu based on a folder that contains thousands of files!!! Your system may slow down, freeze or even crash!!!")
         ),
         "",
         "## %s" % _("Features"),
         "",
         "- %s" % _("More than one instance of this applet can be installed at the same time."),
         "- %s" % _("A hotkey can be assigned to open/close the menu."),
         "- %s" % _("Menu items to .desktop files will be displayed with the icon and name declared inside the .desktop files themselves."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "The menu can be kept open while activating menu items by pressing [[Ctrl]] + **Left click** or with **Middle click**."),
         "- %s" % _("This applet can create menu and sub-menu items even from symbolic links found inside the main folder."),
         "",
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("Applet based on two gnome-shell extensions ([Todo list](https://github.com/bsaleil/todolist-gnome-shell-extension) and [Section Todo List](https://github.com/tomMoral/ToDoList)). It allows to create simple ToDo lists from a menu on the panel."
           ),
         "",
         "## %s" % _("Applet usage and features"),
         "",
         _("The usage of this applet is very simple. Each task list is represented by a sub menu and each sub menu item inside a sub menu represents a task."
           ),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("To add a new tasks list, simply focus the **New tasks list...** entry, give a name to the tasks list and press [[Enter]]."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("To add a new task, simply focus the **New task...** entry, give a name to the task and press [[Enter]]."
           ),
         "- %s" % _("All tasks lists and tasks can be edited in-line."),
         "- %s" %
         _("Tasks can be marked as completed by changing the checked state of their sub menu items."
           ),
         "- %s" %
         _("Each tasks list can have its own settings for sorting tasks (by name and/or by completed state), remove task button visibility and completed tasks visibility."
           ),
         "- %s" %
         _("Each tasks list can be saved as individual TODO files and also can be exported into a file for backup purposes."
           ),
         "- %s" %
         _("Tasks can be reordered by simply dragging them inside the tasks list they belong to (only if all automatic sorting options for the tasks list are disabled)."
           ),
         "- %s" %
         _("Tasks can be deleted by simply pressing the delete task button (if visible)."
           ),
         "- %s" %
         _("Colorized priority tags support. The background and text colors of a task can be colorized depending on the @tag found inside the task text."
           ),
         "- %s" % _("Configurable hotkey to open/close the menu."),
         "- %s" %
         _("Read the tooltips of each option on this applet settings window for more details."
           ),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Extension based on the Gnome Shell extensions [Steal My Focus](https://github.com/v-dimitrov/gnome-shell-extension-stealmyfocus) and [Window Demands Attention Shortcut](https://github.com/awamper/window-demands-attention-shortcut). This extension adds two different behaviors for windows that demand attention. It force them to be activated or a keyboard shortcut can be assigned to activate windows on demand."),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Simple translator applet that will allow to display the translation of any selected text from any application on a system in a popup."),
         "",
         "## %s" % _("Dependencies"),
         "",
         "**%s**" % _("If one or more of these dependencies are missing in your system, you will not be able to use this applet."),
         "",
         "### %s" % _("xsel command"),
         "",
         _("XSel is a command-line program for getting and setting the contents of the X selection."),
         "",
         "- %s %s" % (
             _("Debian and Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **xsel**.")
         ),
         "",
         "### %s" % _("xdg-open command"),
         "",
         _("Open a URI in the user's preferred application that handles the respective URI or file type."),
         "",
         "- %s %s %s" % (
             _("Debian and Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("This command is installed with the package called **xdg-utils**."),
             _("Installed by default in modern versions of Linux Mint.")
         ),
         "",
         "### %s" % "Python 3",
         "",
         _("It should come already installed in all Linux distributions."),
         "",
         "### %s" % _("requests Python 3 module"),
         "",
         _("Requests allow you to send HTTP/1.1 requests. You can add headers, form data, multi-part files, and parameters with simple Python dictionaries, and access the response data in the same way. It's powered by httplib and urllib3, but it does all the hard work and crazy hacks for you."),
         "",
         "- %s %s %s" % (
             _("Debian and Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("This command is installed with the package called **xdg-utils**."),
             _("Installed by default in modern versions of Linux Mint.")
         ),
         "- %s %s %s" % (
             _("Debian based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **python3-requests**."),
             _("Installed by default in modern versions of Linux Mint.")
         ),
         "- %s %s" % (
             _("Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **python-requests**.")
         ),
         "",
         "**%s**" % _("After installing any of the missing dependencies, Cinnamon needs to be restarted"),
         "",
         "**%s** %s" % (_("Note:"), _("I don't use any other type of Linux distribution (Gentoo based, Slackware based, etc.). If any of the previous packages/modules are named differently, please, let me know and I will specify them in this help file.")),
     ])
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "### %s" % _("Menu emulating the Whisker menu (XFCE)"),
         "",
         utils.get_image_container(
             src="assets/images/menu-emulating-the-whisker-menu.png",
             alt=_("Menu emulating the Whisker menu (XFCE)")
         ),
         "",
         "## %s" % _("Keyboard navigation"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "**%s** %s" % (_("Note:"), _("Almost all keyboard shortcuts on this menu are the same as the original menu. There are just a couple of differences that I was forced to add to my menu to make some of its features to work.")),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Left Arrow]] and [[Right Arrow]] keys:"),
         "    - %s" %
         _("Cycles through the applications box and categories box if the focus is in one of these boxes."),
         "    - %s" %
         _("If the focus is on the custom launchers box, these keys will cycle through this box buttons."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Tab]] key:"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" %
         _("If the applications box or categories box are currently focused, the [[Tab]] key will switch the focus to the custom launchers box."),
         "    - %s" %
         _("If the focus is on the custom launchers box, the focus will go back to the categories box."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Up Arrow]] and [[Down Arrow]] keys:"),
         "    - %s" % _("If the applications box or categories box are currently focused, these keys will cycle through the items in the currently highlighted box."),
         "    - %s" %
         _("If the focus is on the custom launchers box, the focus will go back to the categories box."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Page Up]] and [[Page Down]] keys: Jumps to the first and last item of the currently selected box. This doesn't affect the custom launchers."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Menu]] or [[Alt]] + [[Enter]] keys: Opens and closes the context menu (if any) of the currently highlighted item."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Enter]] key: Executes the currently highlighted item."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Escape]] key: It closes the main menu. If a context menu is open, it will close the context menu instead and a second tap of this key will close the main menu."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("[[Shift]] + [[Enter]]: Executes the application as root. This doesn't affect the custom launchers."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Ctrl]] + [[Enter]]: Open a terminal and run application from there. This doesn't affect the custom launchers."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Ctrl]] + [[Shift]] + [[Enter]]: Open a terminal and run application from there, but the application is executed as root. This doesn't affect the custom launchers."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "## %s" % _("Applications left click extra actions"),
         _("When left clicking an application on the menu, certain key modifiers can be pressed to execute an application in a special way."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Shift]] + **Left click**: Executes application as root."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Ctrl]] + **Left click**: Open a terminal and run application from there."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("[[Ctrl]] + [[Shift]] + **Left click**: Open a terminal and run application from there, but the application is executed as root."),
         "",
         "## %s" % _("About \"Run from terminal\" options"),
         _("These options are meant for debugging purposes (to see the console output after opening/closing a program to detect possible errors, for example). Instead of opening a terminal to launch a program of which one might not know its command, one can do it directly from the menu and in just one step. Options to run from a terminal an application listed on the menu can be found on the applications context menu and can be hidden/shown from this applet settings window."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("By default, these options will use the system's default terminal emulator (**x-terminal-emulator** on Debian based distributions). Any other terminal emulator can be specified inside the settings window of this applet, as long as said emulator has support for the **-e** argument. I did my tests with **gnome-terminal**, **xterm** and **terminator**. Additional arguments could be passed to the terminal emulator, but it's not supported by me."),
         "",
         "## %s" % _("Favorites handling"),
         _("**Note:** The favorites category will update its content after changing to another category and going back to the favorites category."),
         "",
         "## %s" % _("Troubleshooting/extra information"),
         "1. " + _("Run from terminal."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    1. **%s** %s" % (_("Debian based distributions:"),
                               _("If the command **x-terminal-emulator** doesn't run the terminal emulator that one wants to be the default, run the following command to set a different default terminal emulator.")),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "        - %s" % "`sudo update-alternatives --config x-terminal-emulator`",
         "        - %s" % _("Type in the number of the selection and hit enter."),
         "    2. **%s** %s" %
         (_("For other distributions:"),
          _("Just set the terminal executable of your choice on this applet settings window.")),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "2. %s" % _("There is a folder named **icons** inside this applet directory. It contains several symbolic icons (most of them are from the Faenza icon theme) and each icon can be used directly by name (on a custom launcher, for example)."),
     ])
     ))
Exemple #46
0
    def get_content_base(self, for_readme):
        return "\n".join([
            "## %s" % _("Description"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("This applet is a fork of [Feeds Reader](https://cinnamon-spices.linuxmint.com/applets/view/149) applet by Jason Jackson (a.k.a. jake1164)."
              ),
            "",
            "## %s" % _("Differences with the original applet"),
            "",
            "- %s" %
            _("Added keyboard shortcut to be able to open/close the menu."),
            "- %s" % _("Added proper keyboard navigation for the menu."),
            "- %s" %
            _("Eliminated the need of a stylesheet.css file. The menu will be styled respecting the currently used Cinnamon theme."
              ),
            "- %s" %
            _("Feeds will only be updated from their online sources if the last check was made after the refresh interval."
              ),
            "- %s" %
            _("Forced the use of Python 3 in all Python modules/scripts."),
            "",
            "## " + _("Dependencies"),
            "- **feedparser:** " +
            _("The feedparser Python 3 module is a universal feed parser that handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds."
              ),
            _("Install with `pip` (Cinnamon needs to be restarted after installing feedparser if the applet was already placed in a panel):"
              ),
            """
```
sudo pip3 install feedparser
```
            """
            "",
        ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("Applet based on two gnome-shell extensions ([Todo list](https://github.com/bsaleil/todolist-gnome-shell-extension) and [Section Todo List](https://github.com/tomMoral/ToDoList)). It allows to create simple ToDo lists from a menu on the panel."),
         "",
         "## %s" % _("Applet usage and features"),
         "",
         _("The usage of this applet is very simple. Each task list is represented by a sub menu and each sub menu item inside a sub menu represents a task."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "To add a new tasks list, simply focus the **New tasks list...** entry, give a name to the tasks list and press [[Enter]]."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "To add a new task, simply focus the **New task...** entry, give a name to the task and press [[Enter]]."),
         "- %s" % _("All tasks lists and tasks can be edited in-line."),
         "- %s" % _("Tasks can be marked as completed by changing the checked state of their sub menu items."),
         "- %s" % _("Each tasks list can have its own settings for sorting tasks (by name and/or by completed state), remove task button visibility and completed tasks visibility."),
         "- %s" % _("Each tasks list can be saved as individual TODO files and also can be exported into a file for backup purposes."),
         "- %s" % _("Tasks can be reordered by simply dragging them inside the tasks list they belong to (only if all automatic sorting options for the tasks list are disabled)."),
         "- %s" % _("Tasks can be deleted by simply pressing the delete task button (if visible)."),
         "- %s" % _("Colorized priority tags support. The background and text colors of a task can be colorized depending on the @tag found inside the task text."),
         "- %s" % _("Configurable hotkey to open/close the menu."),
         "- %s" % _("Read the tooltips of each option on this applet settings window for more details."),
     ])
Exemple #48
0
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Usage"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("There are 4 *translations mechanisms* (**Left click**, **Middle click**, **Hotkey #1** and **Hotkey #2**). Each translation mechanism can be configured with their own service providers, language pairs and hotkeys."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**First translation mechanism (Left click):** Translates any selected text from any application on your system. A hotkey can be assigned to perform this task."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**First translation mechanism ([[Ctrl]] + Left click):** Same as **Left click**, but it will bypass the translation history. A hotkey can be assigned to perform this task."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Second translation mechanism (Middle click):** Same as **Left click**."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Second translation mechanism ([[Ctrl]] + Middle click):** Same as [[Ctrl]] + **Left click**."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Third translation mechanism (Hotkey #1):** Two hotkeys can be configured to perform a translation and a forced translation."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Fourth translation mechanism (Hotkey #2):** Two hotkeys can be configured to perform a translation and a forced translation."
           ),
         _("All translations are stored into the translation history. If a string of text was already translated in the past, the popup will display that stored translated text without making use of the provider's translation service."
           ),
         "",
         "## %s" % _("About translation history"),
         _("I created the translation history mechanism mainly to avoid the abuse of the translation services."
           ),
         "",
         "- %s" %
         _("If the Google Translate service is \"abused\", Google may block temporarily your IP. Or what is worse, they could change the translation mechanism making this applet useless and forcing me to update its code."
           ),
         "- %s" %
         _("If the Yandex Translate service is \"abused\", you are \"wasting\" your API keys quota and they will be blocked (temporarily or permanently)."
           ),
         _("In the context menu of this applet is an item that can open the folder were the translation history file is stored. From there, the translation history file can be backed up or deleted."
           ),
         "",
         "**%s**" %
         _("NEVER edit the translation history file manually!!!"),
         "",
         "**%s**" %
         _("If the translation history file is deleted/renamed/moved, Cinnamon needs to be restarted."
           ),
         "",
         "## %s" % _("How to get Yandex translator API keys"),
         "- %s" %
         _("Visit one of the following links and register a Yandex account (or use one of the available social services)."
           ),
         # TO TRANSLATORS: URL pointing to website in English
         "    - %s" % (_("English:") + " " +
                       "https://tech.yandex.com/keys/get/?service=trnsl"),
         # TO TRANSLATORS: URL pointing to website in Russian
         "    - %s" % (_("Russian:") + " " +
                       "https://tech.yandex.ru/keys/get/?service=trnsl"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("Once you successfully finish creating your Yandex account, you can visit the link provided several times to create several API keys. **DO NOT ABUSE!!!**"
           ),
         "- %s" %
         _("Once you have several API keys, you can add them to Popup Translator's settings window (one API key per line)."
           ),
         "",
         "### %s" % _("Important notes about Yandex API keys"),
         "- %s" %
         _("The API keys will be stored into a preference. Keep your API keys backed up in case you reset Popup Translator's preferences."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**NEVER make your API keys public!!!** The whole purpose of going to the trouble of getting your own API keys is that the only one \"consuming their limits\" is you and nobody else."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("With each Yandex translator API key you can translate **UP TO** 1.000.000 (1 million) characters per day **BUT NOT MORE** than 10.000.000 (10 millions) per month."
           ),
     ])))
 def get_content_extra(self):
     return md("{}".format("\n".join([
         "## %s" % _("Keyboard shortcuts"),
         _("The keyboard navigation inside this applet menu is very similar to the keyboard navigation used by any other menu on Cinnamon. But it's slightly changed to facilitate tasks and sections handling and edition."),
         "",
         "### %s" % _("When the focus is on a task"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Ctrl]] + [[Spacebar]]: Toggle the completed (checked) state of a task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + \
         _("[[Shift]] + [[Delete]]: Deletes a task and focuses the element above of the deleted task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Alt]] + [[Delete]]: Deletes a task and focuses the element bellow the deleted task."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + \
         _("[[Ctrl]] + [[Arrow Up]] or [[Ctrl]] + [[Arrow Down]]: Moves a task inside its tasks list."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Insert]]: Will focus the **New task...** entry of the currently opened task section."),
         "",
         "### %s" % _("When the focus is on a task section"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Arrow Left]] and [[Arrow Right]]: If the tasks list (sub menu) is closed, these keys will open the sub menu. If the sub menu is open, these keys will move the cursor inside the sub menu label to allow the edition of the section text."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Insert]]: Will focus the **New task...** entry inside the task section. If the task section sub menu isn't open, it will be opened."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "### %s" % _("When the focus is on the **New task...** entry"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("[[Ctrl]] + [[Spacebar]]: Toggles the visibility of the tasks list options menu."),
         "",
         "## %s" % _("Known issues"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- " + _("**Hovering over items inside the menu doesn't highlight menu items nor sub menus:** This is actually a desired feature. Allowing the items to highlight on mouse hover would cause the entries to loose focus, resulting in the impossibility to keep typing text inside them and constantly forcing us to move the mouse cursor to regain focus."),
         "- **%s** %s" % (_("Task entries look wrong:"), _(
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             "Task entries on this applet have the ability to wrap its text in case one sets a fixed width for them. They also can be multi line ([[Shift]] + [[Enter]] inside an entry will create a new line). Some Cinnamon themes, like the default Mint-X family of themes, set a fixed width and a fixed height for entries inside menus. These fixed sizes makes it impossible to programmatically set a desired width for the entries (at least, I couldn't find a way to do it). And the fixed height doesn't allow the entries to expand, completely breaking the entries capability to wrap its text and to be multi line.")),
         "",
         "### %s" % _("This is how entries should look like"),
         "",
         utils.get_image_container(
             src="./assets/images/correct-entries-styling.png",
             alt=_("Correct entries styling")
         ),
         "",
         "### %s" % _("This is how entries SHOULD NOT look like"),
         "",
         utils.get_image_container(
             src="./assets/images/incorrect-entries-styling.png",
             alt=_("Incorrect entries styling")
         ),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("The only way to fix this (that I could find) is by editing the Cinnamon theme that one is using and remove those fixed sizes. The CSS selectors that needs to be edited are **.menu StEntry**, **.menu StEntry:focus**, **.popup-menu StEntry** and **.popup-menu StEntry:focus**. Depending on the Cinnamon version the theme was created for, one might find just the first two selectors or the last two or all of them. The CSS properties that need to be edited are **width** and **height**. They could be removed, but the sensible thing to do is to rename them to **min-width** and **min-height** respectively. After editing the theme's file and restarting Cinnamon, the entries inside this applet will look and work like they should."),
     ])
     ))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("The Multi Translator extension is an extension ported from a gnome-shell extension called [Text Translator](https://github.com/gufoe/text-translator) by [gufoe](https://github.com/gufoe). It provides translation of text by different translation providers (currently [Google](https://translate.google.com), [Yandex](https://translate.yandex.net), [Bing](https://www.bing.com/translator), [Apertium](https://www.apertium.org) and [Transltr](http://transltr.org))."),
         "",
         "## %s" % _("Dependencies"),
         "",
         "**%s**" % _("If one or more of these dependencies are missing in your system, you will not be able to use this extension."),
         "",
         "- %s %s" % (_("xsel command:"),
                      _("XSel is a command-line program for getting and setting the contents of the X selection.")),
         "- %s %s" % (_("trans command:"),
                      _("Command provided by the package translate-shell. Is a simple command line interface for several translation providers (Google Translate, Yandex Translate, Bing Translate and Apertium) which allows you to translate strings in your terminal.")),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("Check translate-shell [dependencies](https://github.com/soimort/translate-shell#dependencies) and [recommended dependencies](https://github.com/soimort/translate-shell#recommended-dependencies)."),
         "",
         "**%s** %s" % (_("Note:"), _("The translate-shell package available on Ubuntu 16.04.x/Linux Mint 18.x repositories is outdated and broken. It can be installed anyway so it will also install its dependencies. But updating to the latest version should be done as described bellow.")),
     ])
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("The function of this applet is very simple, create a menu based on the files/folders found inside a main folder (specified on this applet settings window). The files will be used to create menu items and the sub folders will be used to create sub-menus."),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("I mainly created this applet to replicate the functionality of the XFCE plugin called **Directory Menu** and the KDE widget called **Quick access**."),
         "",
         utils.get_bootstrap_alert(
             context="danger",
             heading=_("Danger"),
             content=_("This applet has to read every single file/folder inside a main folder to create its menu. So, do not try to use this applet to create a menu based on a folder that contains thousands of files!!! Your system may slow down, freeze or even crash!!!")
         ),
         "",
         "## %s" % _("Features"),
         "- %s" % _("More than one instance of this applet can be installed at the same time."),
         "- %s" % _("A hotkey can be assigned to open/close the menu."),
         "- %s" % _("Menu items to .desktop files will be displayed with the icon and name declared inside the .desktop files themselves."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _(
             "The menu can be kept open while activating menu items by pressing [[Ctrl]] + **Left click** or with **Middle click**."),
         "- %s" % _("This applet can create menu and sub-menu items even from symbolic links found inside the main folder."),
     ])
    def get_content_extra(self):
        return md("{}".format("\n".join([
            "### %s" % _("Image featuring different icons for each sub-menu and different icon sizes"),
            "",
            utils.get_image_container(
                src="./assets/images/image-featuring-different-icons-each-sub-menu-and-different-icon-sizes.png",
                alt=_("Image featuring different icons for each sub-menu and different icon sizes")
            ),
            "",
            "## %s" % _("Applet usage"),
            "- " + _("Menu items to .desktop files will be displayed with the icon and name declared inside the .desktop files themselves."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _(
                "The menu can be kept open while activating menu items by pressing [[Ctrl]] + **Left click** or with **Middle click**."),
            "",
            "## %s" % _("How to set a different icon for each sub-menu"),
            "",
            "- %s" %
            _("Create a file at the same level as the folders that will be used to create the sub-menus."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("The file name can be customized, doesn't need to have an extension name and can be a hidden file (a dot file). By default is called **0_icons_for_sub_menus.json**."),
            "- %s" %
            _("Whatever name is chosen for the file, it will be automatically ignored and will never be shown on the menu."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("The path to the icon has to be a full path. A path starting with **~/** can be used and will be expanded to the user's home folder."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("If any sub-folder has more folders that need to have custom icons, just create another **0_icons_for_sub_menus.json** file at the same level that those folders."),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" % _("The content of the file is a *JSON object* and has to look as follows:"),
            "",
            """```
{{
    "{0} #1": "{1} #1",
    "{0} #2": "{1} #2",
    "{0} #3": "{1} #3",
    "{0} #n": "{1} #n"
}}
```""".format(_("Folder name"), _("Icon name or icon path for Folder name")),
            "",
            "**%s** %s" % (_("Warning!!!"),
                           # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                           _("JSON *language* is very strict. Just be sure to ONLY use double quotes. And the last key/value combination DOESN'T have to end with a comma (**Folder name #n** in the previous example).")),
        ])
        ))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("This applet is a fork of [System Monitor](https://cinnamon-spices.linuxmint.com/applets/view/88) applet by Josef Michálek (a.k.a. Orcus)."
           ),
         "",
         "## %s" % _("Differences with the original applet"),
         "",
         "- %s" %
         _("Added keyboard shortcut to be able to launch a custom command."
           ),
         "- %s" %
         _("Added option to hide the graphs background, not just set it transparent."
           ),
         "",
         "## " + _("Dependencies"),
         "- **GTop:** " +
         _("The gtop library reads information about processes and the state of the system."
           ),
         "    - **%s** %s" % (
             _("Debian based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **gir1.2-gtop-2.0**.")),
         "    - **%s** %s" % (
             _("Archlinux based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **libgtop**.")),
         "    - **%s** %s" % (
             _("Fedora based distributions:"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("The package is called **libgtop2**.")),
         "",
         "**%s**" %
         _("Restart Cinnamon after installing the packages for the applet to recognize them."
           ),
     ])
Exemple #54
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet is a custom version of the default Cinnamon Menu applet, but more customizable and without things irrelevant to searching/launching applications."),
         "",
         "## %s" % _("Options/Features"),
         "",
         "- %s" % _("Implemented fuzzy search."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Removed **Favorites** box in favor of a **Favorites** category."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Removed **Places** category."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Removed **Recent Files** category."),
         "- %s" % _("Removed file system search."),
         "- %s" % _("Removed search providers."),
         "- %s" % _("Removed applications info box in favor of tooltips."),
         "- %s" % _("Removed drag&drop capabilities."),
         "- %s" % _("Removed recently installed applications highlighting."),
         "- %s" % _("Added a custom launchers box that can run any command/script/file."),
         "- %s" % _("Custom launchers icons can have a custom size and can be symbolic or full color."),
         "- %s" % _("Custom launchers can execute any command (as entered in a terminal) or a path to a file. If the file is an executable script, an attempt to execute it will be made. Otherwise, the file will be opened with the systems handler for that file type."),
         "- %s" % _("The size of the Categories/Applications icons can be customized."),
         "- %s" % _("The placement of the categories box and the applications box can be swapped."),
         "- %s" % _("The placement of the custom launchers box and the search box can be swapped."),
         "- %s" % _("Scrollbars in the applications box can be hidden."),
         "- %s" % _("Recently used applications can be remembered and will be displayed on a category called **Recently Used**. The applications will be sorted by execution time. The order of these applications can be inverted and there is an option to exclude favorites from being listed."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("The default **Add to panel**, **Add to desktop** and **Uninstall** context menu items can be hidden."),
         "- %s" % _("The menu editor can be directly opened from this applet context menu without the need to open it from the settings windows of this applet."),
         "- %s" % _("The context menu for applications has 5 new items:"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run as root:** Executes application as root."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Edit .desktop file:** Open the application's .desktop file with a text editor."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Open .desktop file folder:** Open the folder where the application's .desktop file is stored."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run from terminal:** Open a terminal and run application from there."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run from terminal as root:** Same as above but the application is executed as root."),
     ])
Exemple #55
0
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Argos for Cinnamon is an applet that turns executables' standard output into panel dropdown menus. It is inspired by, and fully compatible with, the Gnome Shell extension called [Argos](https://github.com/p-e-w/argos) by [Philipp Emanuel Weidmann](https://github.com/p-e-w), which in turn is inspired by, and fully compatible with, the [BitBar](https://github.com/matryer/bitbar) application for macOS. Argos for Cinnamon supports many [BitBar plugins](https://github.com/matryer/bitbar-plugins) without modifications, giving you access to a large library of well-tested scripts in addition to being able to write your own."
           ),
         "",
         "## %s" % _("Key features"),
         "",
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         ("- %s %s" %
          (_("**100% API compatible with BitBar 1.9.2:** All BitBar plugins that run on Linux (i.e. do not contain macOS-specific code) will work with Argos (else it's a bug)."
             ), _("See %s.") %
           ("**[%s](#bitbar-plugins-with-argos-for-cinnamon-{{lhc_lang_id}})**"
            % _("BitBar plugins with Argos for Cinnamon")))).strip(),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Beyond BitBar:** Argos can do everything that BitBar can do, but also some things that BitBar can't do (yet). See the documentation for details."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Sophisticated asynchronous execution engine:** No matter how long your scripts take to run, Argos will schedule them intelligently and prevent blocking."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         _("**Unicode support:** Just print your text to stdout. It will be rendered the way you expect."
           ),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" %
         _("**Optimized for minimum resource consumption:** Even with multiple plugins refreshing every second, Argos typically uses less than 1 percent of the CPU."
           ),
         (
             "- **%s** %s" % (
                 _("Fully documented:"),
                 # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                 md(
                     _("See %s.") %
                     ("**[%s](#usage-{{lhc_lang_id}})**" % _("Usage"))
                 ))).strip(),
         "",
     ])
Exemple #56
0
    def get_content_extra(self):
        return md("{}".format("\n".join([
            "## %s" % _("Extension options details"),
            "<span style=\"color:red;font-weight: bold;font-size: large;\">",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Some tweaks have warnings, dependencies, limitations and or known issues that must be read and understood before a tweak is enabled. No worries, nothing *fatal* could ever happen."
              ),
            "</span>",
            "",
            "### %s" % _("Applets/Desklets tweaks"),
            "- **%s** %s" %
            (_("Ask for confirmation on applet/desklet removal:"),
             _("Instead of directly remove the applet/desklet from the context menus, it will ask for confirmation. This option doesn't affect the removal of applets/desklets from the Applets/Desklets manager in Cinnamon settings (there will be no confirmation)."
               )),
            "- **%s** & **%s** %s" % (
                _("Display \"Open applet/desklet folder\" on context menu for applets/desklets"
                  ),
                _("Display \"Edit applet/desklet main file\" on context menu for applets/desklet:"
                  ),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("These options will add new menu items to the applets/desklets context menus. The place where this items will be located is chosen by the option **Where to place the menu item?**."
                  )),
            "",
            "### %s" % _("Hot Corners tweaks"),
            _("This tweak is only available for Cinnamon versions lower than 3.2. Cinnamon 3.2.x already has hot corners delay activation."
              ),
            "- **%s** %s" %
            (_("Top left hot corner activation delay:"), _("Crystal clear.")),
            "- **%s** %s" %
            (_("Top right hot corner activation delay:"), _("Crystal clear.")),
            "- **%s** %s" % (_("Bottom left hot corner activation delay:"),
                             _("Crystal clear.")),
            "- **%s** %s" % (_("Bottom right hot corner activation delay:"),
                             _("Crystal clear.")),
            "",
            "### %s" % _("Desktop area tweaks"),
            "- **%s** %s" %
            (_("Enable applications drop to the Desktop:"),
             _("This tweak enables the ability to drag and drop applications from the menu applet and from the panel launchers applet into the desktop."
               )),
            "",
            "### %s" % _("Popup menus tweaks"),
            "##### %s" % _("Panel menus behavior"),
            "**%s** %s" %
            (_("Note:"),
             _("This setting affects only the behavior of menus that belongs to applets placed on any panel."
               )),
            "",
            "- **%s** %s" %
            (_("Don't eat clicks:"),
             _("By default, when one opens an applet's menu on Cinnamon and then click on another applet to open its menu, the first click is used to close the first opened menu, and then another click has to be performed to open the menu of the second applet. With this option enabled, one can directly open the menu of any applet even if another applet has its menu open."
               )),
            "",
            "### %s" % _("Tooltips tweaks"),
            "- **%s** %s" %
            (_("Avoid mouse pointer overlapping tooltips:"),
             _("Tooltips on Cinnamon's UI are aligned to the top-left corner of the mouse pointer. This leads to having tooltips overlapped by the mouse pointer. This tweak aligns the tooltip to the bottom-right corner of the mouse pointer (approximately), reducing the possibility of the mouse pointer to overlap the tooltip. This tweak is only available for Cinnamon versions lower than 3.2. Cinnamon 3.2.x already has the position of the tooltips changed."
               )),
            "- **%s** %s" % (_("Tooltips show delay:"), _("Crystal clear.")),
            "",
            "### %s" % _("Notifications tweaks"),
            "- **%s** %s" % (_("Enable notifications open/close animation:"),
                             _("Crystal clear.")),
            "- **%s** %s" %
            (_("Notifications position:"),
             _("Notifications can be displayed at the top-right of screen (system default) or at the bottom-right of screen."
               )),
            "- **%s**" % (_("Distance from panel:")),
            "    - **%s** %s" %
            (_("For notifications displayed at the top-right of screen:"),
             _("This is the distance between the bottom border of the top panel (if no top panel, from the top of the screen) to the top border of the notification popup."
               )),
            "    - **%s** %s" %
            (_("For notifications displayed at the bottom-right of screen:"),
             _("This is the distance between the top border of the bottom panel (if no bottom panel, from the bottom of the screen) to the bottom border of the notification popup."
               )),
            "- **%s** %s" %
            (_("Notification popup right margin:"),
             _("By default, the right margin of the notification popup is defined by the currently used theme. This option, set to any value other than 0 (zero), allows to set a custom right margin, ignoring the defined by the theme."
               )),
            "",
            "### %s" % _("Window focus tweaks"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on the gnome-shell extension called [Steal My Focus](https://github.com/v-dimitrov/gnome-shell-extension-stealmyfocus) by [Valentin Dimitrov](https://github.com/v-dimitrov) and another gnome-shell extension called [Window Demands Attention Shortcut](https://github.com/awamper/window-demands-attention-shortcut) by [awamper](https://github.com/awamper)."
              ),
            "",
            _("Some windows that demands attention will not gain focus regardless of the settings combination on Cinnamon settings. This option will allow you to correct that."
              ),
            "",
            "- **%s**" %
            _("The activation of windows demanding attention...:"),
            "    - **%s** %s" %
            (_("...is handled by the system:"), _("Crystal clear.")),
            "    - **%s** %s" %
            (_("...is immediate:"),
             _("will force windows demanding attention to be focused immediately."
               )),
            "    - **%s** %s" %
            (_("...is performed with a keyboard shortcut:"),
             _("will focus windows demanding attention with a keyboard shortcut."
               )),
            "- **%s** %s" %
            (_("Keyboard shortcut:"),
             _("Set a keyboard shortcut for the option **...is performed with a keyboard shortcut**."
               )),
            "",
            "### %s" % _("Window Shadows tweaks"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on a Cinnamon extension called [Custom Shadows](https://cinnamon-spices.linuxmint.com/extensions/view/43) created by [mikhail-ekzi](https://github.com/mikhail-ekzi). It allows to modify the shadows used by Cinnamon's window manager (Muffin)."
              ),
            "",
            "**%s** %s" %
            (_("Note:"),
             _("Client side decorated windows aren't affected by this tweak.")
             ),
            "",
            "##### %s" % _("Shadow presets"),
            "- **%s**" % _("Custom shadows"),
            "- **%s**" % _("Default shadows"),
            "- **%s**" % _("No shadows"),
            "- **%s**" % _("Windows 10 shadows"),
            "",
            "### %s" % _("Auto move windows"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on the gnome-shell extension called [Auto Move Windows](https://extensions.gnome.org/extension/16/auto-move-windows/) by [Florian Muellner](https://github.com/fmuellner). It enables the ability to set rules to open determined applications on specific workspaces."
              ),
            "",
            "**%s** %s" % (
                _("Note:"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If the application that you want to select doesn't show up on the application chooser dialog, read the section on this help file called **Applications not showing up on the applications chooser dialogs**."
                  )),
            "",
            "### %s" % _("Windows decorations removal"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Tweak based on the extension called [Cinnamon Maximus](https://cinnamon-spices.linuxmint.com/extensions/view/29) by [Fatih Mete](https://github.com/fatihmete) with some options from the gnome-shell extension called [Maximus NG](https://github.com/luispabon/maximus-gnome-shell) by [Luis Pabon](https://github.com/luispabon). This tweak allows to remove the windows decorations from maximized/half-maximized/tiled windows."
              ),
            "",
            "**%s** %s" % (
                _("Note:"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("If the application that you want to select doesn't show up on the application chooser dialog, read the section on this help file called **Applications not showing up on the applications chooser dialogs**."
                  )),
            "",
            "#### %s" % _("Dependencies"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("This tweak requires two commands available on the system (**xprop** and **xwininfo**) for it to work."
              ),
            "",
            "- %s %s" % (
                _("Debian based distributions:"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("These commands are provided by the **x11-utils** package. Linux Mint already has this package installed."
                  )),
            "- %s %s" % (
                _("Archlinux based distributions:"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("These commands are provided by the **xorg-xprop** and **xorg-xwininfo** packages."
                  )),
            "- %s %s" % (
                _("Fedora based distributions:"),
                # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                _("These commands are provided by the **xorg-x11-utils** package."
                  )),
            "",
            "#### %s" % _("Warnings"),
            "- %s" %
            _("Client side decorated windows and WINE applications aren't affected by this tweak."
              ),
            "- %s" %
            _("Close all windows that belongs to an application that is going to be added to the applications list and before applying the settings of this tweak."
              ),
            "- %s" %
            _("As a general rule to avoid issues, before enabling and configuring this tweak, close all windows currently opened, enable and configure this tweak and then log out and log back in."
              ),
            "",
            "#### %s" % _("Known issues"),
            "- **%s** %s" %
            (_("Invisible windows:"),
             _("Sometimes, windows of applications that are configured to remove their decorations can become invisible. The application's icon can still be seen in the panel (taskbar) and when clicked to focus its respective window, the invisible window will block the clicks as if it were visible. To fix this, the window needs to be unmaximized (it will become visible again) and then closed. When reopened, the window should behave normally."
               )),
            "- **%s** %s" %
            (_("Applications stuck undecorated:"),
             _("Some times, an application will get stuck undecorated even after unmaximizing it. Restarting the application will recover its ability to decorate and undecorate itself."
               )),
            "",
            "#### %s" % _("Alternative"),
            _("There is an alternative way of hiding the title bar of absolutely all maximized windows without exceptions. By editing your Metacity theme (window decorations theme). It works infinitely better and without any of the issues this tweak on this extension has."
              ),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" %
            _("Simply go to `/Path/To/Your/Theme/metacity-1` folder and edit with any text editor the file called **metacity-theme-3.xml**. If that file doesn't exists in your theme, then it should exist one called **metacity-theme-2.xml** or **metacity-theme-1.xml**. Choose the one with the bigger number."
              ),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" %
            _("Find the **frame_geometry** element named **max** (or **maximized** or **normal_max** or **normal_maximized**). Its exact name may vary depending on the theme."
              ),
            "- %s" %
            _("Basically, one has to set to that element the attribute **has_title** to false, and then set all sizes of all its properties to 0 (zero). Some themes might require to add more properties and set them to 0 (zero) to completely get rid of the title bar."
              ),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" %
            _("Next you will find examples on how to edit the Metacity themes found on the **Mint-X** and **Mint-Y** themes."
              ),
            "",
            "##### %s" % _("For the Metacity theme found on the Mint-X theme"),
            "",
            """```xml
<frame_geometry name="maximized" has_title="false" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
    <distance name="right_width" value="0" />
    <distance name="left_titlebar_edge" value="0"/>
    <distance name="right_titlebar_edge" value="0"/>
    <distance name="title_vertical_pad" value="0"/>
    <border name="title_border" left="0" right="0" top="0" bottom="0"/>
    <border name="button_border" left="0" right="0" top="0" bottom="0"/>
    <distance name="bottom_height" value="0" />
</frame_geometry>
```""",
            "",
            "##### %s" % _("For the Metacity theme found on Mint-Y theme"),
            "",
            """```xml
<frame_geometry name="max" has_title="false" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
    <distance name="right_width" value="0" />
    <distance name="left_titlebar_edge" value="0"/>
    <distance name="right_titlebar_edge" value="0"/>
    <distance name="title_vertical_pad" value="0"/>
    <border name="title_border" left="0" right="0" top="0" bottom="0"/>
    <border name="button_border" left="0" right="0" top="0" bottom="0"/>
    <distance name="bottom_height" value="0" />
    <distance name="button_width" value="0"/>
    <distance name="button_height" value="0"/>
</frame_geometry>
```""",
            "",
            "## %s" % _("General extension issues"),
            "### %s" %
            _("Applications not showing up on the applications chooser dialogs"
              ),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("The application chooser dialog used by the settings window of this extension lists only those applications that have available .desktop files. Simply because these applications are the only ones that any of the tweaks that require an application ID (**Auto move windows** and **Windows decorations removal**) will recognize and handle."
              ),
            "",
            _("Following the [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html), one can create a .desktop file for any application that doesn't appear in the applications list."
              ),
            "## %s" % _("Xlet's settings window"),
            _("From this xlet settings window, all options can be imported, exported and/or reseted to their defaults."
              ),
            "",
            "- %s" %
            _("To be able to perform any of these actions, the settings schema needs to be installed in the system. This is done automatically when the xlet is installed from the Cinnamon xlets manager. But if the xlet was installed manually, the settings schema also needs to be installed manually. This is achieved by simply going to the xlet folder and launch the following command:"
              ),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "    - %s %s" % (_("Command to install the settings schema:"),
                             "`./settings.py install-schema`"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "    - %s %s" % (_("Command to uninstall the settings schema:"),
                             "`./settings.py remove-schema`"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "- %s" %
            _("To import/export settings, the **dconf** command needs to be available on the system."
              ),
            "",
        ])))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("This applet is a custom version of the default Cinnamon Menu applet, but more customizable and without things irrelevant to searching/launching applications."),
         "",
         "## %s" % _("Options/Features"),
         "",
         "- %s" % _("Implemented fuzzy search."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Removed **Favorites** box in favor of a **Favorites** category."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Removed **Places** category."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("Removed **Recent Files** category."),
         "- %s" % _("Removed file system search."),
         "- %s" % _("Removed search providers."),
         "- %s" % _("Removed applications info box in favor of tooltips."),
         "- %s" % _("Removed drag&drop capabilities."),
         "- %s" % _("Removed recently installed applications highlighting."),
         "- %s" % _("Added a custom launchers box that can run any command/script/file."),
         "- %s" % _("Custom launchers icons can have a custom size and can be symbolic or full color."),
         "- %s" % _("Custom launchers can execute any command (as entered in a terminal) or a path to a file. If the file is an executable script, an attempt to execute it will be made. Otherwise, the file will be opened with the systems handler for that file type."),
         "- %s" % _("The size of the Categories/Applications icons can be customized."),
         "- %s" % _("The placement of the categories box and the applications box can be swapped."),
         "- %s" % _("The placement of the custom launchers box and the search box can be swapped."),
         "- %s" % _("Scrollbars in the applications box can be hidden."),
         "- %s" % _("Recently used applications can be remembered and will be displayed on a category called **Recently Used**. The applications will be sorted by execution time. The order of these applications can be inverted and there is an option to exclude favorites from being listed."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "- %s" % _("The default **Add to panel**, **Add to desktop** and **Uninstall** context menu items can be hidden."),
         "- %s" % _("The menu editor can be directly opened from this applet context menu without the need to open it from the settings windows of this applet."),
         "- %s" % _("The context menu for applications has 5 new items:"),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run as root:** Executes application as root."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Edit .desktop file:** Open the application's .desktop file with a text editor."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Open .desktop file folder:** Open the folder where the application's .desktop file is stored."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run from terminal:** Open a terminal and run application from there."),
         # TO TRANSLATORS: MARKDOWN string. Respect formatting.
         "    - %s" % _("**Run from terminal as root:** Same as above but the application is executed as root."),
     ])
    def get_content_extra(self):
        return md("{}".format("\n".join([
            '<span id="usage-{{lhc_lang_id}}"></span>',
            "## %s" % _("Usage"),
            "",
            utils.get_bootstrap_alert(
                content=md(
                    _("I will use the words *plugin* or *script* when referring to a script file associated with an instance of **Argos for Cinnamon** applet."))
            ),
            "",
            _("After placing a new instance of **Argos for Cinnamon** into a panel, one of the example scripts provided by this applet will be automatically attached to it and a menu will be created based on the output of the executed plugin. These example scripts contain various examples of what **Argos for Cinnamon** can do."),
            "",
            _("A just placed applet will have an initial execution interval of 0 seconds (zero seconds) and an initial applet text rotation interval of 3 seconds (three seconds). The execution interval is set to 0 seconds because the initial example script doesn't have any dynamic data that requires update. And the applet text rotation interval is set to 3 seconds so the text rotation of the example script can be seen in action."),
            "",
            _("For scripts that display non dynamic data, it isn't needed an execution interval. But if your script displays dynamic data (a clock for example), then an execution and/or applet text rotation interval needs to be specified. Both of these values can be set from the applet context menu."),
            "",
            utils.get_bootstrap_alert(
                content=md(_("The three example scripts provided by this applet will produce the exact same output, but they are created using three different languages (**bash_examples.bash**, **python_examples.py** and **ruby_examples.rb**)."))
            ),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                content="<strong>%s</strong>" % _(
                    "Never save your custom plugins/scripts inside this applet folder. Otherwise, you will loose them all when there is an update for the applet.")
            ),
            "",
            "### %s" % _("File name format"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("**Argos for Gnome Shell** parses the script's file name to extract certain set of preferences. **Argos for Cinnamon** doesn't parse the script's file name in such way (nor in any other way). All the applet settings can be set from the applet settings window and/or from the applet context menu."),
            "### %s" % _("Output format"),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Argos plugins are executables (such as shell scripts **(*)**) that print to standard output lines of the following form:"),
            """```
    TEXT | ATTRIBUTE_1=VALUE ATTRIBUTE_2=VALUE ...
    ```""",
            "",
            _("All attributes are optional, so the most basic plugins simply print lines consisting of text to be displayed. To include whitespace, attribute values may be quoted using the same convention employed by most command line shells."),
            "",
            utils.get_bootstrap_alert(
                content="<strong>%s</strong>" % _(
                    "(*) Not just shell scripts, but also python scripts, ruby scripts or any other script in any other language that can print to standard output.")
            ),
            "",
            "### %s" % _("Rendering"),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Lines containing only dashes (`---`) are *separators*."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Lines above the first separator belong to the applet button itself. If there are multiple such lines, they are displayed in succession, each of them for a configurable amount of time (rotation interval) before switching to the next. Additionally, all button lines get a dropdown menu item, except if their `dropdown` attribute is set to `false`."),
            "",
            _("Lines below the first separator are rendered as dropdown menu items. Further separators create graphical separator menu items."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Lines beginning with `--` are rendered in a submenu associated with the preceding unindented line. **Argos for Cinnamon** supports unlimited number of nested submenus."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("[Emoji codes](http://www.emoji-cheat-sheet.com) like `:horse:` and `:smile:` in the line text are replaced with their corresponding Unicode characters (unless the `emojize` attribute is set to `false`). Note that unpatched Cinnamon does not yet support multicolor emoji."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("[ANSI SGR escape sequences](https://en.wikipedia.org/wiki/ANSI_escape_code#graphics) and [Pango markup](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) tags may be used for styling. This can be disabled by setting the `ansi` and `useMarkup` attributes, respectively, to `false`."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Backslash escapes such as `\\n` and `\\t` in the line text are converted to their corresponding characters (newline and tab in this case), which can be prevented by setting the `unescape` attribute to `false`. Newline escapes can be used to create multi-line menu items."),
            "",
            "## %s" % _("Line attributes"),
            "",
            "### %s" % _("Display"),
            _("Control how the line is rendered."),
            "",
            "| %s | %s | %s |" % (_("Attribute"), _("Value"), _("Description")),
            "| --- | --- | --- |",
            "| `color` | %s | %s |" % (_("Hex RGB/RGBA or color name"),
                                       _("Sets the text color for the item.")),
            "| `font` | %s | %s |" % (_("Font name"), _("Sets the font for the item.")),
            "| `size` | %s | %s |" % (_("Font size in points"), _(
                "Sets the font size for the item.")),
            "| `iconName` | %s | %s |" % (_("Icon name"),
                                          # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                                          _("Sets a menu icon for the item. See the [freedesktop.org icon naming specification](https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) for a list of names that should work anywhere, or run [gtk3-icon-browser](https://developer.gnome.org/gtk3/unstable/gtk3-icon-browser.html) to see the names of all icons in your current icon theme. **Argos only**. **Argos for Cinnamon** also supports a path to an icon file (paths starting with `~/` will be expanded to the user's home folder).")),
            "| `image`, `templateImage` | %s | %s |" % (_("Base64-encoded image file"),
                                                        # TO TRANSLATORS: MARKDOWN string. Respect
                                                        # formatting.
                                                        _("Renders an image inside the item. The image is positioned to the left of the text and to the right of the icon. Cinnamon does not have a concept of *template images*, so `image` and `templateImage` are interchangeable in Argos.")),
            "| `imageWidth`, `imageHeight` | %s | %s |" % (_("Width/height in pixels"),
                                                           # TO TRANSLATORS: MARKDOWN string. Respect
                                                           # formatting.
                                                           _("Sets the dimensions of the image. If only one dimension is specified, the image's original aspect ratio is maintained. **Argos only**.")),
            "| `length` | %s | %s |" % (_("Length in characters"), _(
                "Truncate the line text to the specified number of characters, ellipsizing the truncated part.")),
            "| `trim` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |" %
            (_("Boolean value"),
             _("If disabled, preserve leading and trailing whitespace of the line text."), _("Enabled by default if not specified.")),
            "| `dropdown` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |" %
            (_("Boolean value"),
             _("If disabled and the line is a button line (see above), exclude it from being displayed in the dropdown menu."), _("Enabled by default if not specified.")),
            "| `alternate` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |" %
            (_("Boolean value"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("If enabled, the item is hidden by default, and shown in place of the preceding item when the [[Alt]] key is pressed.")),
            "| `emojize` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |" %
            (_("Boolean value"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("If disabled, disable substitution of `:emoji_name:` with emoji characters in the line text."), _("Enabled by default if not specified.")),
            "| `ansi` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |" %
            (_("Boolean value"),
             _("If disabled, disable interpretation of ANSI escape sequences in the line text."), _("Enabled by default if not specified.")),
            "| `useMarkup` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |" %
            (_("Boolean value"),
             _("If disabled, disable interpretation of Pango markup in the line text. **Argos only**."), _("Enabled by default if not specified.")),
            "| `unescape` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s %s |" %
            (_("Boolean value"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("If disabled, disable interpretation of backslash escapes such as `\\n` in the line text. **Argos only**."), _("Enabled by default if not specified.")),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Attributes available on **Argos for Cinnamon** only."),
            "",
            "| %s | %s | %s |" % (_("Attribute"), _("Value"), _("Description")),
            "| --- | --- | --- |",
            "| `tooltip` | %s | %s |" % (_("Text to display as toolip"),
                                         _("Sets the tooltip for the item.")),
            "| `iconSize` | %s | %s |" % (_("An integer from 12 to 512"),
                                          # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                                          _("Sets the size for the menu item's icon if any. The size for menu item icons can be defined globally in the settings of an instance of Argos for Cinnamon.")),
            "| `iconIsSymbolic` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |" %
            (_("Boolean value"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("If enabled, the symbolic version of `iconName` will be used on the item (if exists). This attribute is ignored if the icon defined in `iconName` is a path to an icon file.")),
            "### %s" % _("Actions"),
            _("Define actions to be performed when the user clicks on the line's menu item."),
            "",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            _("Action attributes are *not* mutually exclusive. Any combination of them may be associated with the same item, and all actions are executed when the item is clicked."),
            "",
            "| %s | %s | %s |" % (_("Attribute"), _("Value"), _("Description")),
            "| --- | --- | --- |",
            "| `command`, `bash` | %s | **[(1)](#about-command-bash-attributes-{{lhc_lang_id}})** %s |" % (_("A command to execute"), _(
                "Runs a command using a default shell specified in the options of an instance of Argos for Cinnamon or specified by the `shell` attribute.")),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `shell` | %s | %s |" % (_("Path or executable name of a shell program"), _(
                "This attribute overrides the default shell set on the settings of an instance of Argos for Cinnamon. This attribute should only be used if one decides to use different shells to execute commands whithin the menu created by an instance of Argos for Cinnamon.")),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `shellArgument` | %s | %s |" % (_("Argument to pass to a shell program"), _(
                "The argument used by a shell program that allows to execute a command. In most shells is '-c'. This attribute overrides the shell argument set on the settings of an instance of Argos for Cinnamon. This attribute should only be used if the shell argument set on the settings of an instance of Argos for Cinnamon isn't compatible with the shell specified in the `shell` attribute.")),
            "| `terminal` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |" %
            (_("Boolean value"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("If disabled, runs the command specified in the `command` or `bash` attributes in the background (i.e. without opening a terminal window). If enabled, a terminal will be opened to execute a command and will be kept open.")),
            "| `param1`, `param2`, ... | %s | %s |" % (_("Command line arguments"),
                                                       # TO TRANSLATORS: MARKDOWN string. Respect
                                                       # formatting.
                                                       _("Arguments to be passed to the command specified in the `command` or `bash` attributes. *Note: Provided for compatibility with BitBar only. Argos allows placing arguments directly in the command string.*")),
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `href` | URI | %s |" % _("Opens a URI in the application registered to handle it. URIs starting with `http://` launch the web browser, while `file://` URIs open the file in its associated default application. **Argos for Cinnamon** also supports paths starting with `~/` that will be automatically expanded to the user's home folder."),
            "| `eval` | %s | %s |" % (_("JavaScript code"),
                                      # TO TRANSLATORS: MARKDOWN string. Respect formatting.
                                      _("Passes the code to JavaScript's `eval` function. **Argos only**.")),
            "| `refresh` | **[(2)](#about-boolean-attributes-{{lhc_lang_id}})** %s | %s |" %
            (_("Boolean value"),
             # TO TRANSLATORS: MARKDOWN string. Respect formatting.
             _("If enabled, re-runs the plugin, updating its output.")),
            "",
            '<span id="about-command-bash-attributes-{{lhc_lang_id}}"></span>',
            "",
            utils.get_bootstrap_alert(
                heading="<strong>(1)</strong> %s" % _(
                    # TO TRANSLATORS: Full sentence:
                    # About the "command" and "bash" attributes.
                    # Do not translate nor modify the {command} and {bash} placeholders.
                    "About the {command} and {bash} attributes").format(
                    command="<code>command</code>",
                    bash="<code>bash</code>"),
                content=md(_("These attributes are mutually exclusive. I added the `command` attribute because it didn't make much sense to have it named `bash` when Argos for Cinnamon can use any shell, not just Bash. I left the `bash` attribute so any scripts written for BitBar or for the original Argos for Gnome Shell extension can be used without modifications. I will never remove the `bash` attribute while the two previously mentioned tools keep using it."))
            ),
            "",
            '<span id="about-boolean-attributes-{{lhc_lang_id}}"></span>',
            "",
            utils.get_bootstrap_alert(
                heading="<strong>(2)</strong> %s" % _("About boolean attributes"),
                content=md(_("Any boolean attribute can have a value of `true` or `1` (one) to enable a feature/option. Or a value of `false` or `0` (zero) to disable a feature/option. Values are case-insensitive. Any other value will be considered `false`."))
            ),
            "",
            "### %s" % _("Environment variables"),
            _("Plugin executables are run with the following special environment variables set:"),
            "",
            "| %s | %s |" % (_("Name"), _("Value")),
            "| --- | --- |",
            # TO TRANSLATORS: MARKDOWN string. Respect formatting.
            "| `ARGOS_VERSION` | %s |" % _(
                "Version number of the Argos for Cinnamon applet. The presence of this environment variable can also be used to determine that the plugin is actually running in Argos, rather than BitBar or [kargos](https://github.com/lipido/kargos)."),
            "| `ARGOS_MENU_OPEN` | %s |" % _(
                "`true` if the dropdown menu was open at the time the plugin was run, and `false` otherwise."),
            "",
            '<span id="bitbar-plugins-with-argos-for-cinnamon-{{lhc_lang_id}}"></span>',
            "",
            "## %s" % _("BitBar plugins with Argos for Cinnamon"),
            "",
            utils.get_bootstrap_alert(
                context="warning",
                heading=_("WARNING!!! DO NOT RANDOMLY TEST SCRIPTS!!!"),
                content=md("""
{0}
{1}
{2}
""".format("1. %s" % _("Apply common sense. Read and understand what a script does and how demanding it could be."),
                    "2. %s" % _(
                        "Test unknown scripts on an environment from which you can recover easily (for example, a virtual machine)."),
                    "3. %s" % _("I found one specific case in which a script can freeze and ultimately crash Cinnamon. It's a script that downloads a GIF image from the internet, converts it to Base64 and then that encoded image is inserted into a menu item using the *image* attribute. I will not provide a link to that script, but if you follow the very first advice that I listed here, when you see that script, you will know.")
           )
                )),
            "",
            _("These screenshots show how some scripts from the BitBar plugin repository look when rendered by Argos compared to the \"canonical\" BitBar rendering (macOS screenshots taken from https://getbitbar.com)."),
            "",
            "| %s | %s | %s |" % (_("Plugin"), _("BitBar on macOS"), _("Argos on Cinnamon")),
            "| --- | :---: | :---: |",
            "| [**Ping**](https://getbitbar.com/plugins/Network/ping.10s.sh) | <img src=\"./assets/images/image-ping-bitbar.png\" class=\"img-fluid\" alt=\"Ping/BitBar\"> | <img src=\"./assets/images/image-ping-argos.png\" class=\"img-fluid\" alt=\"Ping/Argos\"> |",
            "| [**Stock Ticker**](https://getbitbar.com/plugins/Finance/gfinance.5m.py) | <img src=\"./assets/images/stock-ticker-bitbar.png\" class=\"img-fluid\" alt=\"Stock Ticker/BitBar\"> | <img src=\"./assets/images/stock-ticker-argos.png\" class=\"img-fluid\" alt=\"Stock Ticker/BitBar\"> |",
            "| [**World Clock**](https://getbitbar.com/plugins/Time/worldclock.1s.sh) | <img src=\"./assets/images/world-clock-bitbar.png\" class=\"img-fluid\" alt=\"World Clock/BitBar\"> | <img src=\"./assets/images/world-clock-argos.png\" class=\"img-fluid\" alt=\"World Clock/BitBar\"> |",
            "| [**ANSI**](https://getbitbar.com/plugins/Tutorial/ansi.sh) | <img src=\"./assets/images/ansi-bitbar.png\" class=\"img-fluid\" alt=\"ANSI/BitBar\"> | <img src=\"./assets/images/ansi-argos.png\" class=\"img-fluid\" alt=\"ANSI/BitBar\"> |",
        ])
        ))
 def get_content_base(self, for_readme):
     return "\n".join([
         "## %s" % _("Description"),
         "",
         _("Applet based on the gnome-shell extension called [Desk Changer](https://github.com/BigE/desk-changer) by [Eric Gach](https://github.com/BigE). A wallpaper slideshow applet with multiple profiles support."),
         "",
         "## %s" % _("Features"),
         "",
         "- %s" % _("Possibility to create and switch between several profiles. A profile is simply a list of images and/or folders containing images that this applet will use to switch the wallpaper."),
         "- %s" % _("Possibility to preview the next wallpaper from this applet menu."),
         "- %s" % _("Wallpapers can be switched on demand from the controls found in this applet menu."),
         "- %s" % _("The wallpapers rotation can be alphabetically or random."),
         "- %s" % _("The wallpapers rotation can be defined by an interval in seconds or hourly."),
         "- %s" % _("Possibility to open the next or current wallpapers from this applet menu."),
         "- %s" % _("Possibility to display a notification every time the wallpaper is switched."),
         "- %s" % _("Configurable hotkeys to switch to next/previous wallpaper."),
         "- %s" % _("Read the tooltips of each option on this applet settings window for more details."),
     ])