about summary refs log tree commit diff stats
path: root/html/054static_dispatch.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/054static_dispatch.cc.html')
-rw-r--r--html/054static_dispatch.cc.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/html/054static_dispatch.cc.html b/html/054static_dispatch.cc.html
index b639bdb8..7dc4043e 100644
--- a/html/054static_dispatch.cc.html
+++ b/html/054static_dispatch.cc.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 <title>Mu - 054static_dispatch.cc</title>
-<meta name="Generator" content="Vim/7.4">
+<meta name="Generator" content="Vim/8.0">
 <meta name="plugin-version" content="vim7.4_v2">
 <meta name="syntax" content="cpp">
 <meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
@@ -15,21 +15,21 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color
 a { color:#eeeeee; text-decoration: none; }
 a:hover { text-decoration: underline; }
 * { font-size: 12pt; font-size: 1em; }
+.LineNr { color: #444444; }
 .CommentedCode { color: #6c6c6c; }
 .muRecipe { color: #ff8700; }
+.cSpecial { color: #008000; }
 .muData { color: #ffff00; }
-.LineNr { color: #444444; }
+.Identifier { color: #c0a020; }
+.Delimiter { color: #800080; }
 .traceContains { color: #008000; }
+.Conceal { color: #4e4e4e; }
 .traceAbsent { color: #c00000; }
-.Delimiter { color: #800080; }
 .Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; }
-.cSpecial { color: #008000; }
-.Conceal { color: #4e4e4e; }
 .Comment { color: #9090ff; }
 .Comment a { color:#0000ee; text-decoration:underline; }
 .Constant { color: #00a0a0; }
 .Special { color: #c00000; }
-.Identifier { color: #c0a020; }
 -->
 </style>
 
lor: #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 */
# Tested with ranger 1.7.2
#
# This plugin creates a bunch of keybindings used to mount and unmount
# the devices using pmount(1).
#
# alt+m       <letter>            <digit>: mount /dev/sd<letter><digit>
# alt+m       <uppercase letter>         : mount /dev/sd<letter>
# alt+shift+m <letter>            <digit>: unmount /dev/sd<letter><digit>
# alt+shift+m <uppercase letter>         : unmount /dev/sd<letter>
# alt+shift+n                            : list the devices

import ranger.api

MOUNT_KEY = '<alt>m'
UMOUNT_KEY = '<alt>M'
LIST_MOUNTS_KEY = '<alt>N'

old_hook_init = 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))
    finally:
        return old_hook_init(fm)
ranger.api.hook_init = hook_init