summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin_pmount.py29
1 files changed, 13 insertions, 16 deletions
diff --git a/examples/plugin_pmount.py b/examples/plugin_pmount.py
index d7c88349..38c4a17c 100644
--- a/examples/plugin_pmount.py
+++ b/examples/plugin_pmount.py
@@ -22,22 +22,19 @@ HOOK_INIT_OLD = ranger.api.hook_init
 
 
 def hook_init(fm):
-    try:
-        fm.execute_console("map {key} shell -p lsblk".format(key=LIST_MOUNTS_KEY))
-        for disk in "abcdefgh":
-            fm.execute_console("map {key}{0} chain shell pmount sd{1}; cd /media/sd{1}".format(
-                disk.upper(), disk, key=MOUNT_KEY))
-            fm.execute_console("map {key}{0} chain cd; chain shell pumount sd{1}".format(
-                disk.upper(), disk, key=UMOUNT_KEY))
-            for part in "123456789":
-                fm.execute_console(
-                    "map {key}{0}{1} chain shell pmount sd{0}{1}; cd /media/sd{0}{1}".format(
-                        disk, part, key=MOUNT_KEY)
-                )
-                fm.execute_console("map {key}{0}{1} chain cd; shell pumount sd{0}{1}".format(
-                    disk, part, key=UMOUNT_KEY))
-    except Exception:
-        pass
+    fm.execute_console("map {key} shell -p lsblk".format(key=LIST_MOUNTS_KEY))
+    for disk in "abcdefgh":
+        fm.execute_console("map {key}{0} chain shell pmount sd{1}; cd /media/sd{1}".format(
+            disk.upper(), disk, key=MOUNT_KEY))
+        fm.execute_console("map {key}{0} chain cd; chain shell pumount sd{1}".format(
+            disk.upper(), disk, key=UMOUNT_KEY))
+        for part in "123456789":
+            fm.execute_console(
+                "map {key}{0}{1} chain shell pmount sd{0}{1}; cd /media/sd{0}{1}".format(
+                    disk, part, key=MOUNT_KEY)
+            )
+            fm.execute_console("map {key}{0}{1} chain cd; shell pumount sd{0}{1}".format(
+                disk, part, key=UMOUNT_KEY))
 
     return HOOK_INIT_OLD(fm)
 
*/ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#
# aerc main configuration

[ui]
#
# Describes the format for each row in a mailbox view. This field is compatible
# with mutt's printf-like syntax. TODO: document properly
#
# Default:
index-format=%4C %Z %D %-17.17n %s

#
# See strftime(3)
#
# Default: %F %l:%M %p (ISO 8501 + 12 hour time)
timestamp-format=%F %l:%M %p

#
# Width of the sidebar, including the border.
#
# Default: 20
sidebar-width=20

#
# Message to display when viewing an empty folder.
#
# Default: (no messages)
empty-message=(no messages)

[viewer]
#
# Specifies the pager to use when displaying emails. Note that some filters
# may add ANSI codes to add color to rendered emails, so you may want to use a
# pager which supports ANSI codes.
#
# Default: less -R
pager=less -R

#
# If an email offers several versions (multipart), you can configure which
# mimetype to prefer. For example, this can be used to prefer plaintext over
# html emails.
#
# Default: text/plain,text/html
alternatives=text/plain,text/html

#
# Default setting to determine whether to show full headers or only parsed
# ones in message viewer.
#
# Default: false
show-headers=false

[compose]
#
# Specifies the command to run the editor with. It will be shown in an embedded
# terminal, though it may also launch a graphical window if the environment
# supports it. Defaults to $EDITOR, or vi.
editor=

[filters]
#
# Filters allow you to pipe an email body through a shell command to render
# certain emails differently, e.g. highlighting them with ANSI escape codes.
#
# The first filter which matches the email's mimetype will be used, so order
# them from most to least specific.
#
# You can also match on non-mimetypes, by prefixing with the header to match
# against (non-case-sensitive) and a comma, e.g. subject,text will match a
# subject which contains "text". Use header,~regex to match against a regex.
subject,~^\[PATCH=@SHAREDIR@/filters/hldiff
text/*=@SHAREDIR@/filters/plaintext
#text/html=@SHAREDIR@/filters/html
#image/*=catimg -w $(tput cols) -