-- -- Ion ionws module configuration file -- -- Bindings for the tiled workspaces (ionws). These should work on any -- object on the workspace. ionws_bindings{ -- Very easy to type. I use these a lot. kpress(DEFAULT_MOD.."Down", WIonWS.goto_below), kpress(DEFAULT_MOD.."Up", WIonWS.goto_above), kpress(DEFAULT_MOD.."Right", WIonWS.goto_right), kpress(DEFAULT_MOD.."Left", WIonWS.goto_left), } -- Frame bindings. These work in (Ion/tiled-style) frames. Some bindings -- that are common to all frame types and multiplexes are defined in -- ion-bindings.lua. ionframe_bindings{ submap(DEFAULT_MOD.."Z", { -- (R)esize kpress("R", WIonFrame.begin_resize), -- Like maximizing, some bindings that are *much* saner than the -- defaults. -- (S)plit submap("S", { -- (H)orizontally kpress("H", function(frame) frame:split("bottom") end), -- (V)ertically kpress("V", function(frame) frame:split("right") end), }), -- Toggle transients between the bottom and top of their parent window. kpress("D", make_mplex_clientwin_fn(WClientWin.toggle_transients_pos)), -- Removes the current frame. kpress("X", WIonFrame.relocate_and_close), }), -- Click on a tab to switch to it. mclick("Button1", WGenFrame.p_switch_tab, "tab"), -- Doubleclick to windowshade, which is kind of weird in ion. mdblclick("Button1", WIonFrame.toggle_shade, "tab"), -- You can move windows between frames by dragging their tabs. mdrag("Button1", WGenFrame.p_tabdrag, "tab"), -- And you can resize a window by dragging its border. mdrag("Button1", WGenFrame.p_resize, "border"), -- Middle button works pretty much the same as the left button. mclick("Button2", WGenFrame.p_switch_tab, "tab"), mdrag("Button2", WGenFrame.p_tabdrag, "tab"), -- Alt+ will also resize the frame. mdrag(DEFAULT_MOD.."Button3", WGenFrame.p_resize), } -- Frame resize mode bindings -- These are kind of counterintuitive at first. There are some bindings on the -- ion wiki that are much more DWIM than these; I might put those in -- eventually. -- -- The way these work is that each of the arrows affects the frame border on -- the side corresponding to that arrow. The arrow by itself grows the frame. -- Shift and the arrow shrink the frame. Pressing escape or return is a signal -- that you're done. ionframe_moveres_bindings{ kpress("AnyModifier+Escape", WIonFrame.cancel_resize), kpress("AnyModifier+Return", WIonFrame.end_resize), kpress("Left", function(f) f:do_resize( 1, 0, 0, 0) end), kpress("Right",function(f) f:do_resize( 0, 1, 0, 0) end), kpress("Up", function(f) f:do_resize( 0, 0, 1, 0) end), kpress("Down", function(f) f:do_resize( 0, 0, 0, 1) end), kpress("Shift+Left", function(f) f:do_resize(-1, 0, 0, 0) end), kpress("Shift+Right",function(f) f:do_resize( 0,-1, 0, 0) end), kpress("Shift+Up", function(f) f:do_resize( 0, 0,-1, 0) end), kpress("Shift+Down", function(f) f:do_resize( 0, 0, 0,-1) end), }