X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=etc%2Fcfg_ioncore.lua;h=b10b46c3e31bca7cfb9144f7960b3239dbe5a7bb;hp=acf7e947a36bc7b5726ebc8cfcde4382d2aab8a4;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/etc/cfg_ioncore.lua b/etc/cfg_ioncore.lua index acf7e94..b10b46c 100644 --- a/etc/cfg_ioncore.lua +++ b/etc/cfg_ioncore.lua @@ -36,10 +36,12 @@ defbindings("WScreen", { bdoc("Switch to next/previous object within current screen."), kpress(META.."comma", "WScreen.switch_prev(_)"), kpress(META.."period", "WScreen.switch_next(_)"), - + submap(META.."K", { bdoc("Go to first region demanding attention or previously active one."), - kpress("K", "ioncore.goto_activity() or ioncore.goto_previous()"), + kpress("K", "mod_menu.grabmenu(_, _sub, 'focuslist')"), + -- Alternative without (cyclable) menu + --kpress("K", "ioncore.goto_activity() or ioncore.goto_previous()"), --bdoc("Go to previous active object."), --kpress("K", "ioncore.goto_previous()"), @@ -115,21 +117,27 @@ defbindings("WClientWin", { defbindings("WGroupCW", { bdoc("Toggle client window group full-screen mode"), - kpress_wait(META.."Return", - "WClientWin.set_fullscreen(_:bottom(), 'toggle')"), + kpress_wait(META.."Return", "WGroup.set_fullscreen(_, 'toggle')"), }) -- WMPlex context bindings -- -- These bindings work in frames and on screens. The innermost of such --- contexts/objects always gets to handle the key press. Most of these --- bindings define actions on client windows. (Remember that client windows --- can be put in fullscreen mode and therefore may not have a frame.) +-- contexts/objects always gets to handle the key press. defbindings("WMPlex", { bdoc("Close current object."), kpress_wait(META.."C", "WRegion.rqclose_propagate(_, _sub)"), + + submap(META.."K", { + bdoc("Detach (float) or reattach an object to its previous location."), + -- By using _chld instead of _sub, we can detach/reattach queries + -- attached to a group. The detach code checks if the parameter + -- (_chld) is a group 'bottom' and detaches the whole group in that + -- case. + kpress("D", "ioncore.detach(_chld, 'toggle')", "_chld:non-nil"), + }), }) -- Frames for transient windows ignore this bindmap @@ -182,9 +190,8 @@ defbindings("WMPlex.toplevel", { -- 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. +-- These bindings are common to all types of frames. Some additional +-- frame bindings are found in some modules' configuration files. defbindings("WFrame", { submap(META.."K", { @@ -359,6 +366,8 @@ defctxmenu("WFrame", "Frame", { menuentry("Close", "WRegion.rqclose_propagate(_, _sub)"), menuentry("Kill", "WClientWin.kill(_sub)", "_sub:WClientWin"), + menuentry("De/reattach", "ioncore.detach(_sub, 'toggle')", + "_sub:non-nil"), menuentry("Toggle tag", "WRegion.set_tagged(_sub, 'toggle')", "_sub:non-nil"), menuentry("Attach tagged", "WFrame.attach_tagged(_)"), @@ -367,11 +376,9 @@ defctxmenu("WFrame", "Frame", { }) --- Context menu for screens -defctxmenu("WScreen", "Screen", { - menuentry("New workspace", "ioncore.create_ws(_)"), - menuentry("New empty workspace", - "ioncore.create_ws(_, nil, true)"), - menuentry("Close workspace","WRegion.rqclose(_sub)"), +-- Context menu for workspaces +defctxmenu("WGroupWS", "Workspace", { + menuentry("Close", "WRegion.rqclose(_)"), + menuentry("Rename", "mod_query.query_renameworkspace(nil, _)"), })