Set the modifier key to your liking in .ion2/ion.lua. I use "Mod4+" which is the windows key on my system. On reading my config files, I've realised that I use Mod4+Ctrl+key for "alternative", not Mod4+Shift+key as I said in my previous email.
You obviously get the full list of commands by reading the files but here is a quick start. Items marked with a star * will almost certainly need changing to suit your setup. X,Y means DEFAULT_MOD+X then Y with any or no modifier.
Basic movement (vi-style):
H frame left
J frame down
K frame up
L frame right
U tab left
I tab right
Y workspace previous
O workspace next
Ctrl+Movement: move active frame to new location, don't think it works across workspaces
Frames:
C close
Ctrl+C kill
A attach tagged
G goto client
M,H maximise horizontally
M,V maximise vertically
Enter toggle fullscreen
S,H split horizontally (note that my horiz splits are ion's vert...
S,V split vertically ...splits and vice versa)
R enter resize mode (use vi keys again, then Enter or Esc)
N,R resize kludge (_N_aughty app, _R_esize kludge!)
N,K kill client (_N_aughty app, _K_ill)
Tabs:
1..0 [number keys] switch to nth tab
Workspaces:
W goto/create workspace
Ctrl+W rename workspace
Ctrl+1..0 switch to nth workspace
Launching apps:
D ion-man (_D_ocumentation)
X xterm
Z ion-ssh (_Z_oom)
F,E email client* (_F_ast _E_mail)
F,W web browser*(_F_ast _W_eb)
F,I image viewer* (_F_ast _I_mage)
B browse webpage*
V view file*
E edit file*
Miscellaneous:
Q quit
Ctrl+Q restart
Space toggle dock
Floating workspaces:
work this out for yourself, there aren't many bindings but I've removed ones where ion's defaults would otherwise conflict.
There are certainly errors in my config files, I haven't changed them since the last syntax change, but they do work for me.
Regards,
Tom
-- -- Ion ion bindings configuration file. Global bindings and bindings -- common to screens and all types of frames only. See modules' -- configuration files for other bindings. --
-- Load a library to create common queries.
include("querylib")
-- Load a library to create menu display callbacks.
include("menulib")
-- global_bindings {{{
-- Global_bindings are available all the time. The functions given here
-- should accept WScreens as parameter.
-- The variable DEFAULT_MOD should contain a string of the form 'Mod1+'
-- where Mod1 maybe replaced with the modifier you want to use for most
-- of the bindings. Similarly SECOND_MOD may be redefined to add a
-- modifier to some of the F-key bindings.
global_bindings{
kpress(DEFAULT_MOD.."Control+1", function(s) s:switch_nth(0) end),
kpress(DEFAULT_MOD.."Control+2", function(s) s:switch_nth(1) end),
kpress(DEFAULT_MOD.."Control+3", function(s) s:switch_nth(2) end),
kpress(DEFAULT_MOD.."Control+4", function(s) s:switch_nth(3) end),
kpress(DEFAULT_MOD.."Control+5", function(s) s:switch_nth(4) end),
kpress(DEFAULT_MOD.."Control+6", function(s) s:switch_nth(5) end),
kpress(DEFAULT_MOD.."Control+7", function(s) s:switch_nth(6) end),
kpress(DEFAULT_MOD.."Control+8", function(s) s:switch_nth(7) end),
kpress(DEFAULT_MOD.."Control+9", function(s) s:switch_nth(8) end),
kpress(DEFAULT_MOD.."Control+0", function(s) s:switch_nth(9) end),
kpress(DEFAULT_MOD.."Y", WScreen.switch_prev),
kpress(DEFAULT_MOD.."O", WScreen.switch_next),
submap(DEFAULT_MOD.."F") {
kpress("AnyModifier+E", make_exec_fn("xterm -T mutt -e 'resize > /dev/null;
mutt'")),
kpress("AnyModifier+G", make_exec_fn("gimp")),
kpress("AnyModifier+I", make_exec_fn("gqview")),
kpress("AnyModifier+W", make_exec_fn("firefox")),
kpress("AnyModifier+X", make_exec_fn("xmms")),
},
kpress(DEFAULT_MOD.."T", make_exec_fn("xterm")),
-- Create a new workspace with a default name.
kpress(DEFAULT_MOD.."W",
function(scr)
scr:attach_new({ type=default_ws_type, switchto=true })
end),
--kpress(DEFAULT_MOD.."Control+M", make_bigmenu_fn("mainmenu"))
}
--�}}}
-- mplex_bindings {{{
-- These bindings work in frames and on screens. The innermost of such
-- objects always gets to handle the key press. Essentially these bindings
-- are used to define actions on client windows. (Remember that client
-- windows can be put in fullscreen mode and therefore may not have a
-- frame.)
--
-- The make_*_fn functions are used to call functions on the object currently
-- managed by the screen or frame or the frame itself. Essentially e.g.
-- make_current_clientwin_fn(fn) expands to
--
-- function(mplex)
-- local reg=mplex:current()
-- if obj_is(reg, "WClientWin") then
-- fn(reg)
-- end
-- end
--
-- For details see the document "Ion: Configuring and extending with Lua".
mplex_bindings{
kpress_waitrel(DEFAULT_MOD.."C", WRegion.close_sub_or_self),
kpress_waitrel(DEFAULT_MOD.."Shift+C", make_current_clientwin_fn(WClientWin.kill)),
submap(DEFAULT_MOD.."N") {
kpress_waitrel("AnyModifier+K",
make_current_clientwin_fn(WClientWin.kill)),
kpress_waitrel("AnyModifier+R",
make_current_clientwin_fn(WClientWin.broken_app_resize_kludge)),
},
kpress_waitrel(DEFAULT_MOD.."Return",
make_current_clientwin_fn(WClientWin.toggle_fullscreen)),
}
-- }}}
-- genframe_bindings {{{
-- These bindings are common to all types of frames. The rest of frame
-- bindings that differ between frame types are defined in the modules'
-- configuration files.
genframe_bindings{
kpress(DEFAULT_MOD.."1", function(s) s:switch_nth(0) end),
kpress(DEFAULT_MOD.."2", function(s) s:switch_nth(1) end),
kpress(DEFAULT_MOD.."3", function(s) s:switch_nth(2) end),
kpress(DEFAULT_MOD.."4", function(s) s:switch_nth(3) end),
kpress(DEFAULT_MOD.."5", function(s) s:switch_nth(4) end),
kpress(DEFAULT_MOD.."6", function(s) s:switch_nth(5) end),
kpress(DEFAULT_MOD.."7", function(s) s:switch_nth(6) end),
kpress(DEFAULT_MOD.."8", function(s) s:switch_nth(7) end),
kpress(DEFAULT_MOD.."9", function(s) s:switch_nth(8) end),
kpress(DEFAULT_MOD.."0", function(s) s:switch_nth(9) end),
kpress(DEFAULT_MOD.."I", WGenFrame.switch_next),
kpress(DEFAULT_MOD.."U", WGenFrame.switch_prev),
kpress(DEFAULT_MOD.."Control+I", WGenFrame.move_current_to_next_index),
kpress(DEFAULT_MOD.."Control+U", WGenFrame.move_current_to_prev_index),
submap(DEFAULT_MOD.."M") {
kpress("AnyModifier+H", WGenFrame.maximize_horiz),
kpress("AnyModifier+V", WGenFrame.maximize_vert),
},
mpress("Button3", make_pmenu_fn("ctxmenu"), "tab"),
mclick("Button4", WGenFrame.switch_next, "tab"),
mclick("Button5", WGenFrame.switch_prev, "tab"),
}
-- }}}
-- Queries {{{
-- The bindings that pop up queries are defined here. The bindings to edit
-- text in queries etc. are defined in the query module's configuration file
-- query.lua. If you are not going to load the query module, you might as
-- well comment out the following include statement. This should free up
-- some memory and prevent non-working bindings from being defined.
include("querylib.lua")
if querylib then
-- Frame-level queries
genframe_bindings{
kpress(DEFAULT_MOD.."A", querylib.query_attachclient),
kpress(DEFAULT_MOD.."B", querylib.make_execfile_fn("Browse:",
querylib.make_script_lookup_fn("/home/twp/bin/browse"))),
kpress(DEFAULT_MOD.."D", querylib.query_man),
kpress(DEFAULT_MOD.."E", querylib.make_execfile_fn("Edit:",
querylib.make_script_lookup_fn("/home/twp/bin/edit"))),
kpress(DEFAULT_MOD.."E", querylib.query_editfile),
kpress(DEFAULT_MOD.."G", querylib.query_gotoclient),
kpress(DEFAULT_MOD.."X", querylib.query_exec),
--kpress(DEFAULT_MOD.."V", querylib.make_execfile_fn("View:",
querylib.make_script_lookup_fn("/home/twp/bin/view"))),
kpress(DEFAULT_MOD.."V", querylib.query_runfile),
kpress(DEFAULT_MOD.."W", querylib.query_workspace),
kpress(DEFAULT_MOD.."Control+X", querylib.query_lua),
kpress(DEFAULT_MOD.."Z", querylib.query_ssh),
}
-- Screen-level queries. Queries generally appear in frames to be
-- consistent although do not affect the frame, but these two are
-- special.
global_bindings{
kpress(DEFAULT_MOD.."Control+Q", querylib.query_restart),
kpress(DEFAULT_MOD.."Q", querylib.query_exit),
}
end
-- }}}
--
-- Ion ionws module configuration file
--
-- Bindings for the tiled workspaces (ionws). These should work on any
-- object on the workspace.
function ionws_move_current(ws, frame, dir)
local c = frame:current()
local other = nil
if dir == "left" then
other = ws:left_of(frame) or ws:rightmost()
elseif dir == "right" then
other = ws:right_of(frame) or ws:leftmost()
elseif dir == "up" then
other = ws:above(frame) or ws:lowest()
elseif dir == "down" then
other = ws:below(frame) or ws:topmost()
else
return
end
if c and obj_is(other, "WMPlex") then
other:attach(c, { switchto = true })
end
if other then
other:goto()
end
end
ionws_bindings{
kpress(DEFAULT_MOD.."H", WIonWS.goto_left),
kpress(DEFAULT_MOD.."J", WIonWS.goto_below),
kpress(DEFAULT_MOD.."K", WIonWS.goto_above),
kpress(DEFAULT_MOD.."L", WIonWS.goto_right),
kpress(DEFAULT_MOD.."Control+H", function(ws, frame) ionws_move_current(ws, frame,
"left") end),
kpress(DEFAULT_MOD.."Control+J", function(ws, frame) ionws_move_current(ws, frame,
"down") end),
kpress(DEFAULT_MOD.."Control+K", function(ws, frame) ionws_move_current(ws, frame,
"up") end),
kpress(DEFAULT_MOD.."Control+L", function(ws, frame) ionws_move_current(ws, frame,
"right") end),
}
-- 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{
--kpress(DEFAULT_MOD.."--N", WIonFrame.relocate_and_close),
kpress(DEFAULT_MOD.."R", WIonFrame.begin_resize),
submap(DEFAULT_MOD.."S"){
kpress("AnyModifier+H",
function(frame) frame:split_empty("bottom") end),
kpress("AnyModifier+V",
function(frame) frame:split_empty("right") end),
},
mclick("Button1", WGenFrame.p_switch_tab, "tab"),
mdblclick("Button1", WIonFrame.toggle_shade, "tab"),
mdrag("Button1", WGenFrame.p_tabdrag, "tab"),
mdrag("Button1", WGenFrame.p_resize, "border"),
}
-- Frame resize mode bindings
ionframe_moveres_bindings{
kpress("AnyModifier+Escape", WIonFrame.cancel_resize),
kpress("AnyModifier+Return", WIonFrame.end_resize),
kpress("H", function(f) f:do_resize( 1, 0, 0, 0) end),
kpress("J", function(f) f:do_resize( 0, 0, 0, 1) end),
kpress("K", function(f) f:do_resize( 0, 0, 1, 0) end),
kpress("L", function(f) f:do_resize( 0, 1, 0, 0) end),
kpress("Shift+H", function(f) f:do_resize(-1, 0, 0, 0) end),
kpress("Shift+J", function(f) f:do_resize( 0, 0, 0,-1) end),
kpress("Shift+K", function(f) f:do_resize( 0, 0,-1, 0) end),
kpress("Shift+L", function(f) f:do_resize( 0,-1, 0, 0) end),
}
--
-- Ion floatws module configuration file
--
-- Bindings for PWM-style floating frame workspaces. These should work
-- on any object on the workspace.
floatws_bindings{
kpress(DEFAULT_MOD .. "L",
function(ws) ws:circulate():raise() end),
kpress(DEFAULT_MOD .. "H",
function(ws) ws:backcirculate():raise() end),
}
-- Frame bindings. These work in (floating/PWM-style) frames. Some bindings
-- that are common to all frame types and multiplexes are defined in
-- ion-bindings.lua.
floatframe_bindings{
kpress(DEFAULT_MOD .. "R", WFloatFrame.begin_resize),
mpress("Button1", WRegion.raise, "tab"),
mpress("Button1", WRegion.raise, "border"),
mclick("Button1", WGenFrame.p_switch_tab, "tab"),
mdrag("Button1", WFloatFrame.p_move, "tab"),
mdrag("Button1", WGenFrame.p_resize, "border"),
mdblclick("Button1", WFloatFrame.toggle_shade, "tab"),
mclick(DEFAULT_MOD .. "Button1", WRegion.raise),
mdrag(DEFAULT_MOD .. "Button1", WFloatFrame.p_move),
mclick("Button2", WGenFrame.p_switch_tab, "tab"),
mdrag("Button2", WGenFrame.p_tabdrag, "tab"),
mclick(DEFAULT_MOD .. "Button3", WRegion.lower),
mdrag(DEFAULT_MOD .. "Button3", WGenFrame.p_resize),
}
-- Frame move/resize mode bindings
floatframe_moveres_bindings{
kpress("AnyModifier+Escape", WFloatFrame.cancel_resize),
kpress("AnyModifier+Return", WFloatFrame.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("F", function(f) f:do_resize(1, 0, 0, 0) end),
kpress("B", function(f) f:do_resize(0, 1, 0, 0) end),
kpress("P", function(f) f:do_resize(0, 0, 1, 0) end),
kpress("N", 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),
kpress("Shift+F", function(f) f:do_resize(-1, 0, 0, 0) end),
kpress("Shift+B", function(f) f:do_resize( 0,-1, 0, 0) end),
kpress("Shift+P", function(f) f:do_resize( 0, 0,-1, 0) end),
kpress("Shift+N", function(f) f:do_resize( 0, 0, 0,-1) end),
kpress(DEFAULT_MOD.."Left", function(f) f:do_move(-1, 0) end),
kpress(DEFAULT_MOD.."Right",function(f) f:do_move( 1, 0) end),
kpress(DEFAULT_MOD.."Up", function(f) f:do_move( 0,-1) end),
kpress(DEFAULT_MOD.."Down", function(f) f:do_move( 0, 1) end),
kpress(DEFAULT_MOD.."F", function(f) f:do_move(-1, 0) end),
kpress(DEFAULT_MOD.."B", function(f) f:do_move( 1, 0) end),
kpress(DEFAULT_MOD.."P", function(f) f:do_move( 0,-1) end),
kpress(DEFAULT_MOD.."N", function(f) f:do_move( 0, 1) end),
}
