X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=etc%2Fcfg_ioncore.lua;h=4cfe2a336132b8cabc1942b8ee224cf3529aebc3;hp=b10b46c3e31bca7cfb9144f7960b3239dbe5a7bb;hb=de22e45179cb3bafa490294d31d47f361047a30a;hpb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d diff --git a/etc/cfg_ioncore.lua b/etc/cfg_ioncore.lua index b10b46c..4cfe2a3 100644 --- a/etc/cfg_ioncore.lua +++ b/etc/cfg_ioncore.lua @@ -65,7 +65,7 @@ defbindings("WScreen", { kpress(META.."F9", "ioncore.create_ws(_)"), bdoc("Display the main menu."), - kpress(ALTMETA.."F12", "mod_query.query_menu(_, 'mainmenu', 'Main menu:')"), + kpress(ALTMETA.."F12", "mod_query.query_menu(_, _sub, 'mainmenu', 'Main menu:')"), --kpress(ALTMETA.."F12", "mod_menu.menu(_, _sub, 'mainmenu', {big=true})"), mpress("Button3", "mod_menu.pmenu(_, _sub, 'mainmenu')"), @@ -178,13 +178,9 @@ defbindings("WMPlex.toplevel", { bdoc("Query for a client window to go to."), kpress(META.."G", "mod_query.query_gotoclient(_)"), - bdoc("Query for a client window to attach."), - kpress(META.."A", "mod_query.query_attachclient(_)"), - bdoc("Display context menu."), - --kpress(META.."M", "mod_menu.menu(_, _sub, 'ctxmenu')"), - kpress(META.."M", "mod_query.query_menu(_, 'ctxmenu', 'Context menu:')"), - + --kpress(META.."M", "mod_menu.menu(_, _chld, 'ctxmenu')"), + kpress(META.."M", "mod_query.query_menu(_, _chld, 'ctxmenu', 'Context menu:')"), }) @@ -201,7 +197,7 @@ defbindings("WFrame", { }), bdoc("Display context menu."), - mpress("Button3", "mod_menu.pmenu(_, _sub, 'ctxmenu')"), + mpress("Button3", "mod_menu.pmenu(_, _chld, 'ctxmenu')"), bdoc("Begin move/resize mode."), kpress(META.."R", "WFrame.begin_kbresize(_)"), @@ -229,6 +225,9 @@ defbindings("WFrame.toplevel", { bdoc("Tag current object within the frame."), kpress(META.."T", "WRegion.set_tagged(_sub, 'toggle')", "_sub:non-nil"), + bdoc("Query for a client window to attach."), + kpress(META.."A", "mod_query.query_attachclient(_)"), + submap(META.."K", { bdoc("Switch to n:th object within the frame."), kpress("1", "WFrame.switch_nth(_, 0)"), @@ -255,7 +254,7 @@ defbindings("WFrame.toplevel", { kpress("V", "WFrame.maximize_vert(_)"), bdoc("Attach tagged objects to this frame."), - kpress("A", "WFrame.attach_tagged(_)"), + kpress("A", "ioncore.tagged_attach(_)"), }), }) @@ -330,7 +329,8 @@ defbindings("WMoveresMode", { -- Main menu defmenu("mainmenu", { - submenu("Programs", "appmenu"), + menuentry("Run...", "mod_query.query_exec(_)"), + menuentry("Terminal", "ioncore.exec_on(_, XTERM or 'xterm')"), menuentry("Lock screen", "ioncore.exec_on(_, 'xlock')"), menuentry("Help", "mod_query.query_man(_)"), menuentry("About Ion", "mod_query.show_about_ion(_)"), @@ -339,19 +339,6 @@ defmenu("mainmenu", { }) --- Application menu -defmenu("appmenu", { - menuentry("XTerm", "ioncore.exec_on(_, 'xterm')"), - menuentry("W3M", "ioncore.exec_on(_, ':w3m -v')"), - menuentry("Rxvt", "ioncore.exec_on(_, 'rxvt')"), - menuentry("Opera", "ioncore.exec_on(_, 'opera')"), - menuentry("Links", "ioncore.exec_on(_, ':links')"), - menuentry("Konqueror", "ioncore.exec_on(_, 'konqueror')"), - menuentry("Dillo", "ioncore.exec_on(_, 'dillo')"), - menuentry("Run...", "mod_query.query_exec(_)"), -}) - - -- Session control menu defmenu("sessionmenu", { menuentry("Save", "ioncore.snapshot()"), @@ -361,18 +348,23 @@ defmenu("sessionmenu", { }) --- Context menu (frame/client window actions) +-- Context menu (frame actions etc.) defctxmenu("WFrame", "Frame", { + -- Note: this propagates the close to any subwindows; it does not + -- destroy the frame itself, unless empty. An entry to destroy tiled + -- frames is configured in cfg_tiling.lua. 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(_)"), - menuentry("Clear tags", "ioncore.clear_tags()"), - menuentry("Window info", "mod_query.show_tree(_, _sub)"), + -- Low-priority entries + menuentry("Attach tagged", "ioncore.tagged_attach(_)", { priority = 0 }), + menuentry("Clear tags", "ioncore.clear_tags()", { priority = 0 }), + menuentry("Window info", "mod_query.show_tree(_, _sub)", { priority = 0 }), +}) + + +-- Context menu for groups (workspaces, client windows) +defctxmenu("WGroup", "Group", { + menuentry("Toggle tag", "WRegion.set_tagged(_, 'toggle')"), + menuentry("De/reattach", "ioncore.detach(_, 'toggle')"), }) @@ -380,5 +372,11 @@ defctxmenu("WFrame", "Frame", { defctxmenu("WGroupWS", "Workspace", { menuentry("Close", "WRegion.rqclose(_)"), menuentry("Rename", "mod_query.query_renameworkspace(nil, _)"), + menuentry("Attach tagged", "ioncore.tagged_attach(_)"), }) + +-- Context menu for client windows +defctxmenu("WClientWin", "Client window", { + menuentry("Kill", "WClientWin.kill(_)"), +})