-- The original config files are in: ~/prg/etc/ion3/ -- load in my functions dopath("ion3_functions_xsteve") -- load my winprops -- todo: load only if this file exists!! dopath("cfg_xsteve_winprops") -- override bindings in cfg_bindings.lua -- WScreen context bindings -- -- The bindings in this context are available all the time. -- -- The variable MOD1 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 MOD2 may be redefined to add a -- modifier to some of the F-key bindings. HYPER="Mod4+" defbindings("WScreen", { kpress(MOD2.."F12", None), kpress(MOD1.."comma", None), kpress(MOD1.."period", None), bdoc("Go to n:th screen on multihead setup."), kpress(MOD1.."F1", "ioncore.goto_nth_screen(0)"), kpress(MOD1.."F2", "ioncore.goto_nth_screen(1)"), bdoc("Run a terminal emulator."), kpress("Control+F3", "ioncore.exec_on(_, 'xterm -sl 10000 -sb -vb -e zsh')"), bdoc("Toggle the scratchpad."), kpress("Menu", "mod_sp.toggle_on(_)"), kpress(HYPER.."Shift+L", "ioncore.exec_on(_, 'x+lock')") -- my script to lock the screen }) -- WMPlex context bindings -- -- These bindings work in frames and on screens. The innermost of such -- contexts/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 "_sub:WClientWin" guards are used to ensure that _sub is a client -- window in order to stop Ion from executing the callback with an invalid -- parameter if it is not and then complaining. defbindings("WMPlex", { kpress(MOD2.."F1", None), kpress(MOD2.."F2", None), kpress(MOD2.."F3", None), kpress(MOD2.."F4", None), kpress(MOD2.."F5", None), kpress(MOD2.."F6", None), kpress(MOD2.."F9", None), kpress_wait(MOD1.."C", None), bdoc("Close current object."), kpress_wait(HYPER.."C", "WRegion.rqclose_propagate(_, _sub)"), kpress_wait(MOD1.."L", None), bdoc("Nudge current client window. This might help with some ".. "programs' resizing problems."), kpress_wait(HYPER.."L", "WClientWin.nudge(_sub)", "_sub:WClientWin"), kpress_wait(MOD1.."Return", None), bdoc("Toggle fullscreen mode of current client window."), kpress_wait(HYPER.."Return", "WClientWin.toggle_fullscreen(_sub)", "_sub:WClientWin"), bdoc("Send next key press to current client window. ".. "Some programs may not allow this by default."), kpress(HYPER.."Q", "WClientWin.quote_next(_sub)", "_sub:WClientWin"), bdoc("Query for workspace to go to or create a new one."), kpress(HYPER.."F9", "mod_query.query_workspace(_)"), kpress(MOD1.."G", None), bdoc("Query for a client window to go to."), kpress(HYPER.."G", "mod_query.query_gotoclient(_)"), --kpress(HYPER.."M", "xsteve_run_byclass('mozilla','Mozilla-bin')"), kpress(HYPER.."M", "xsteve_run_byclass('mozilla','Firefox-bin')"), kpress(HYPER.."E", "xsteve_run_byclass('emacs','Emacs')"), }) -- WFrame context 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. defbindings("WFrame", { kpress(MOD1.."T", None), bdoc("Tag current object within the frame."), kpress(HYPER.."T", "WRegion.toggle_tag(_sub)", "_sub:non-nil"), kpress(MOD1.."N", "WFrame.switch_next(_)"), kpress(MOD1.."P", "WFrame.switch_prev(_)"), bdoc("Move current object within the frame left/right."), kpress(HYPER.."comma", "WFrame.dec_index(_, _sub)", "_sub:non-nil"), kpress(HYPER.."period", "WFrame.inc_index(_, _sub)", "_sub:non-nil"), -- my own submap submap(HYPER.."K", { bdoc("Display frame context menu."), kpress("M", "mod_menu.menu(_, _sub, 'ctxmenu')"), kpress("R", "mod_query.query_renameframe(_)"), kpress("X", "show_xprops(_)"), }), submap(MOD1.."K", { --bdoc("Switch to next/previous object within the frame."), --kpress("N", "WFrame.switch_next(_)"), --kpress("P", "WFrame.switch_prev(_)"), kpress("N", None), kpress("P", None), }), kpress(MOD1.."M", None), kpress(MOD1.."A", None), bdoc("Query for a client window to attach to active frame."), kpress(HYPER.."A", "mod_query.query_attachclient(_)"), kpress(MOD1.."R", None), bdoc("Begin move/resize mode."), kpress(HYPER.."R", "WFrame.begin_kbresize(_)"), bdoc("Attach tagged objects to this frame."), kpress(HYPER.."Shift+A", "WFrame.attach_tagged(_)"), }) -- override bindings in cfg_ionws.lua -- Bindings for the tiled workspaces (ionws). These should work on any -- object on the workspace. defbindings("WIonWS", { bdoc("Go to frame above/below/right/left of current frame."), --kpress(MOD1.."P", "WIonWS.goto_dir(_, 'above')"), --kpress(MOD1.."N", "WIonWS.goto_dir(_, 'below')"), kpress(MOD1.."P", None), kpress(MOD1.."N", None), kpress(MOD1.."S", None), kpress(MOD1.."Tab", None), submap(MOD1.."K", { kpress("P", "WIonWS.goto_dir(_, 'above')"), kpress("N", "WIonWS.goto_dir(_, 'below')"), }), submap(HYPER.."X", { -- emacs like splitting commands kpress("2", "WIonWS.split_at(_, _sub, 'bottom', true)"), kpress("3", "WIonWS.split_at(_, _sub, 'right', true)"), kpress("0", "WIonWS.unsplit_at(_, _sub)"), }), }) -- arch-tag: 92a41fd2-b6b0-4ab3-8c9a-3ab53c1061e7