1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | -- -- Ion main configuration file -- -- Modules. load_module("query") load_module("menu") load_module("ionws") load_module("floatws") load_module("dock") -- Set default modifier. Alt should usually be mapped to Mod1 on -- XFree86-based systems. The flying window keys are probably Mod3 -- or Mod4; see the output of 'xmodmap'. DEFAULT_MOD = "Mod1+" -- Maximum delay between clicks in milliseconds to be considered a -- double click. --set_dblclick_delay(250) -- For keyboard resize, time (in milliseconds) to wait after latest -- key press before automatically leaving resize mode (and doing -- the resize in case of non-opaque move). --set_resize_delay(1500) -- Opaque resize? enable_opaque_resize(true) -- Movement commands warp the pointer to frames instead of just -- changing focus. Enabled by default. enable_warp(true) -- Kludges to make apps behave better. include("kludges") -- Make some bindings. include("tzz-ion-bindings") -- Define some menus (menu module required to actually use them) include("ion-menus") -- How to shorten window titles when the full title doesn't fit in -- the available space? The first-defined matching rule that succeeds -- in making the title short enough is used. add_shortenrule("(.*) - Mozilla(<[0-9]+>)", "$1$2$|$1$<...$2") add_shortenrule("(.*) - Mozilla", "$1$|$1$<...") add_shortenrule("XMMS - (.*)", "$1$|...$>$1") add_shortenrule("[^:]+: (.*)(<[0-9]+>)", "$1$2$|$1$<...$2") add_shortenrule("[^:]+: (.*)", "$1$|$1$<...") add_shortenrule("(.*)(<[0-9]+>)", "$1$2$|$1$<...$2") add_shortenrule("(.*)", "$1$|$1$<...") -- List of directories to look for manuals in the F1 man page query. query_man_ "/usr/man", "/usr/share/man", "/usr/X11R6/man", "/usr/local/man" } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | -- Load a library to create common queries. include("querylib") -- Load a library to create menu display callbacks. include("menulib") global_bindings{ -- use the keys *around* the numbers on the keypad to switch -- to workspaces 0 through 6 kpress("KP_Divide", function(s) s:switch_nth(0) end), kpress("KP_Multiply", function(s) s:switch_nth(1) end), kpress("KP_Subtract", function(s) s:switch_nth(2) end), kpress("KP_Add", function(s) s:switch_nth(3) end), kpress("KP_Enter", function(s) s:switch_nth(4) end), kpress("KP_Decimal", function(s) s:switch_nth(5) end), kpress("KP_0", function(s) s:switch_nth(6) end), -- convenient Ion control functionality kpress(DEFAULT_MOD..KEYF11, querylib.query_restart), kpress(DEFAULT_MOD..KEYF12, querylib.query_exit), -- sometimes I need to "walk" through workspaces, instead -- of switching to specific ones kpress(DEFAULT_MOD.."Shift+Left", WScreen.switch_prev), kpress(DEFAULT_MOD.."Shift+Right", WScreen.switch_next), -- these are assigned with xmodmap to keys on my Logitech keyboard kpress("XF86Mail", make_exec_fn("emacs -name gnus -f gnus")), kpress("XF86Standby", make_exec_fn("xlock -mode matrix")), kpress("XF86AudioMute", make_exec_fn("aumix.sh")), kpress("XF86AudioRaiseVolume", make_exec_fn("/usr/bin/aumix -v+3")), kpress("XF86AudioLowerVolume", make_exec_fn("/usr/bin/aumix -v-3")), kpress("Shift+XF86AudioRaiseVolume", make_exec_fn("/usr/bin/aumix -v+1")), kpress("Shift+XF86AudioLowerVolume", make_exec_fn("/usr/bin/aumix -v-1")), kpress("XF86AudioPlay", make_exec_fn("xmms --play")), kpress("XF86AudioStop", make_exec_fn("xmms --pause")), kpress("XF86AudioPrev", make_exec_fn("xmms --rew")), kpress("XF86AudioNext", make_exec_fn("xmms --fwd")), -- I run a lot of terminals, so this is a way to make sure that no -- matter what X resources are loaded, I get a consistent look to my -- terminals. kpress("XF86PowerOff", make_exec_fn("Eterm -f yellow --shade 100 --term-name xterm --double-buffer -L 500000 --font -misc-fixed-bold-r-normal--14-130-75-75-c-70-iso10646-1")), kpress("Mod1+XF86PowerOff", make_exec_fn("xterm -bg black -fg yellow -fn -misc-fixed-bold-r-normal--14-130-75-75-c-70-iso10646-1 -cr blue -geometry 80x50 -name term")), -- essential programs for me kpress("XF86Start", make_exec_fn("emacs")), kpress("XF86Search", make_exec_fn("mozilla")), -- miscellaneous menus kpress("Print", make_bigmenu_fn("mainmenu")), mpress("Button2", make_pmenu_fn("windowlist")), mpress("Button3", make_pmenu_fn("mainmenu")), } mplex_bindings{ kpress_waitrel(DEFAULT_MOD.."Return", make_mplex_clientwin_fn(WClientWin.toggle_fullscreen)), -- Alt+W is short and sweet, yet hard to press accidentally kpress_waitrel(DEFAULT_MOD.."W", WMPlex.close_sub_or_self), } genframe_bindings{ -- Tag an object kpress(DEFAULT_MOD.."Shift+A", WGenFrame.attach_tagged), -- Tag viewed object kpress(DEFAULT_MOD.."T", make_mplex_sub_fn(WRegion.toggle_tag)), -- 6 and 4 on the keypad go back and forth between tabs. -- this is very essential to my setup. I couldn't use Ion without -- these key bindings. kpress("KP_6", WGenFrame.switch_next), kpress("KP_4", WGenFrame.switch_prev), -- miscellaneous frame-oriented bindings kpress(DEFAULT_MOD.."A", querylib.query_attachclient), kpress(DEFAULT_MOD.."G", querylib.query_gotoclient), kpress(DEFAULT_MOD.."F3", querylib.query_exec), kpress(DEFAULT_MOD.."F4", querylib.query_ssh), kpress(DEFAULT_MOD.."F5", querylib.query_editfile), kpress(DEFAULT_MOD.."F6", querylib.query_runfile), kpress(DEFAULT_MOD.."F7", querylib.query_lua), kpress(DEFAULT_MOD.."F9", querylib.query_workspace), kpress(DEFAULT_MOD.."M", make_menu_fn("ctxmenu")), mpress("Button3", make_pmenu_fn("ctxmenu"),"tab"), } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |