-- Context menu (frame/client window actions) defmenu("ctxmenu", { menuentry("Close", WMPlex.close_sub_or_self), menuentry("Relocate and close", function(f) f:relocate_and_close() end), menuentry("Kill", make_mplex_clientwin_fn(WClientWin.kill)), menuentry("Rename", querylib.query_rename), menuentry("(Un)tag", make_mplex_sub_fn(WRegion.toggle_tag)), menuentry("Attach tagged", WGenFrame.attach_tagged), menuentry("Clear tags", clear_tags), menuentry("Attach floating", function(f) f:attach_new({type="WFloatWS"}):goto() end), menuentry("Attach split", function(f) f:attach_new({type="WIonWS"}):goto() end), menuentry("Detach transient", make_mplex_clientwin_fn(detach_topmost_transient)), menuentry("Execute lua code", querylib.query_lua), }) -- Context menu for floating frames -- add sticky toggle. defmenu("ctxmenu-floatframe", { menuentry("Close", WMPlex.close_sub_or_self), menuentry("Kill", make_mplex_clientwin_fn(WClientWin.kill)), menuentry("(Un)tag", make_mplex_sub_fn(WRegion.toggle_tag)), menuentry("Attach tagged", WGenFrame.attach_tagged), menuentry("Clear tags", clear_tags), menuentry("(Un)stick", function(f) f:toggle_sticky() end), menuentry("Attach split", function(f) f:attach_new({type="WIonWS"}):goto() end), menuentry("Execute lua code", querylib.query_lua), }) ionws_bindings { kpress(DEFAULT_MOD.."F", WIonWS.goto_right), kpress(DEFAULT_MOD.."B", WIonWS.goto_left), kpress(DEFAULT_MOD.."Control+Left", WIonWS.goto_left), kpress(DEFAULT_MOD.."Control+Right", WIonWS.goto_right), kpress(DEFAULT_MOD.."Control+Up", WIonWS.goto_above), kpress(DEFAULT_MOD.."Control+Down", WIonWS.goto_below), } global_bindings { kpress(SECOND_MOD.."F1", make_bigmenu_fn("mainmenu")), kpress(SECOND_MOD.."F2", make_exec_fn("x-terminal-emulator")), kpress(SECOND_MOD.."F3", querylib.query_exec), kpress(DEFAULT_MOD.."F5", function(s) s:switch_nth(4) end), kpress(DEFAULT_MOD.."F6", function(s) s:switch_nth(5) end), kpress(DEFAULT_MOD.."F7", function(s) s:switch_nth(6) end), kpress(DEFAULT_MOD.."F8", function(s) s:switch_nth(7) end), kpress("F5", function(s) s:switch_nth(0) end), kpress("F6", function(s) s:switch_nth(1) end), kpress("F7", function(s) s:switch_nth(2) end), kpress("F8", function(s) s:switch_nth(3) end), kpress(DEFAULT_MOD.."F4", function(scr) scr:attach_new({ type=default_ws_type, switchto=true }) end), kpress(SECOND_MOD.."F4", querylib.query_workspace), kpress(DEFAULT_MOD.."F9", function() end), kpress(DEFAULT_MOD.."F9", nil), kpress(SECOND_MOD.."F12", function () end), -- dummy function kpress(SECOND_MOD.."F12", nil), mpress("Button3", make_pmenu_fn("mainmenu")), kpress(DEFAULT_MOD.."Shift+Left", WScreen.switch_prev), kpress(DEFAULT_MOD.."Shift+Right", WScreen.switch_next), kpress(DEFAULT_MOD.."Left", function () end), kpress(DEFAULT_MOD.."Left", nil), kpress(DEFAULT_MOD.."Right", function () end), kpress(DEFAULT_MOD.."Right", nil), kpress("Scroll_Lock", make_exec_fn("setmixer -V vol -5 | head -1 | osd_cat -o 25 -s 2 -d 2 -f'-adobe-courier-bold-r-*-*-24-*-*-*-*-150-*-1'")), kpress("Pause", make_exec_fn("setmixer -V vol +5 | head -1 | osd_cat -o 25 -s 2 -d 2 -f'-adobe-courier-bold-r-*-*-24-*-*-*-*-150-*-1'")), } genframe_bindings { kpress(SECOND_MOD.."F1", make_bigmenu_fn("mainmenu")), kpress(SECOND_MOD.."F4", function () end), -- dummy function kpress(SECOND_MOD.."F4", nil), kpress(SECOND_MOD.."F5", function () end), -- dummy function kpress(SECOND_MOD.."F5", nil), kpress(SECOND_MOD.."F6", function () end), -- dummy function kpress(SECOND_MOD.."F6", nil), kpress(SECOND_MOD.."F9", function () end), -- dummy function kpress(SECOND_MOD.."F9", nil), kpress(SECOND_MOD.."F12", function () end), -- dummy function kpress(SECOND_MOD.."F12", nil), kpress(SECOND_MOD.."F2", make_exec_fn("x-terminal-emulator")), kpress(DEFAULT_MOD.."Escape", WGenFrame.toggle_tab), } -- Main menu defmenu("mainmenu", { submenu("Programs", "appmenu"), menuentry("Lock screen", make_exec_fn("xlock")), menuentry("Help", querylib.query_man), menuentry("About Ion", querylib.show_aboutmsg), submenu("Styles", "stylemenu"), submenu("Exit", "exitmenu"), }) -- Application menu defmenu("appmenu", { menuentry("Emacs", make_exec_fn("emacs")), menuentry("Terminal", make_exec_fn("x-terminal-emulator")), menuentry("Mozilla", make_exec_fn("mozilla")), menuentry("XawTV", make_exec_fn("xawtv")), menuentry("Sound", make_exec_fn("x-terminal-emulator -e aumix")), -- The query module must also be loaded for this binding to work. menuentry("Run...", querylib.query_exec), }) -- Main menu defmenu("mainmenusplit", { submenu("Programs", "appmenu"), menuentry("Lock screen", make_exec_fn("xlock")), menuentry("Help", querylib.query_man), menuentry("About Ion", querylib.show_aboutmsg), submenu("Styles", "stylemenu"), submenu("Exit", "exitmenu"), menuentry("Attach split", function(f) f:current():attach_new({type="WIonWS"}):goto() end), }) global_bindings { mpress("Button3", make_pmenu_fn("mainmenusplit")), }