<commit_before>--
-- Ion ionws module configuration file
--

-- Bindings for the tiled workspaces (ionws). These should work on any 
-- object on the workspace.

defbindings("WIonWS", {
    bdoc("Split current frame vertically."),
    kpress(MOD1.."S", "WIonWS.split_at(_, _sub, 'bottom', true)"),
    
    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.."Tab", "WIonWS.goto_dir(_, 'right')"),
    submap(MOD1.."K", {
        kpress("Tab", "WIonWS.goto_dir(_, 'left')"),
        
        bdoc("Split current frame horizontally."),
        kpress("S", "WIonWS.split_at(_, _sub, 'right', true)"),
        
        bdoc("Destroy current frame."),
        kpress("X", "WIonWS.unsplit_at(_, _sub)"),
    }),
})


-- 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.

--defbindings("WFrame-on-WIonWS", {
--})

-- WFloatFrame context menu extras

if mod_menu then
    defctxmenu("WIonWS", {
        menuentry("Destroy frame", 
                  "WIonWS.unsplit_at(_, _sub)"),
        submenu("Flip&transpose", {          
            menuentry("Flip", "_:node_of(_sub):parent():flip()"),
            menuentry("Transpose", "_:node_of(_sub):parent():transpose()"),
            menuentry("Flip at root", "_:split_tree():flip()"),
            menuentry("Transpose at root", "_:split_tree():transpose()"),
        }),
        submenu("Split", {
            menuentry("Vertically", 
                      "WIonWS.split_at(_, _sub, 'bottom', true)"),
            menuentry("Horizontally", 
                       "WIonWS.split_at(_, _sub, 'right', true)"),
            menuentry("Vertically at root", 
                      "WIonWS.split_top(_, 'bottom')"),
            menuentry("Horizontally at root", 
                      "WIonWS.split_top(_, 'right')"),
        }),
        submenu("Floating split", {
            menuentry("Vertically", 
                      "WIonWS.split_at(_, _sub, 'floating:bottom', true)"),
            menuentry("Horizontally", 
                      "WIonWS.split_at(_, _sub, 'floating:right', true)"),
            menuentry("Vertically at root", 
                      "WIonWS.split_top(_, 'floating:bottom')"),
            menuentry("Horizontally at root", 
                      "WIonWS.split_top(_, 'floating:right')"),
        }),
    })
end
<commit_msg>Changes in ionws context menu.<commit_after>--
-- Ion ionws module configuration file
--

-- Bindings for the tiled workspaces (ionws). These should work on any 
-- object on the workspace.

defbindings("WIonWS", {
    bdoc("Split current frame vertically."),
    kpress(MOD1.."S", "WIonWS.split_at(_, _sub, 'bottom', true)"),
    
    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.."Tab", "WIonWS.goto_dir(_, 'right')"),
    submap(MOD1.."K", {
        kpress("Tab", "WIonWS.goto_dir(_, 'left')"),
        
        bdoc("Split current frame horizontally."),
        kpress("S", "WIonWS.split_at(_, _sub, 'right', true)"),
        
        bdoc("Destroy current frame."),
        kpress("X", "WIonWS.unsplit_at(_, _sub)"),
    }),
})


-- 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.

--defbindings("WFrame-on-WIonWS", {
--})

-- WFloatFrame context menu extras

if mod_menu then
    defctxmenu("WIonWS", {
        menuentry("Destroy frame", 
                  "WIonWS.unsplit_at(_, _sub)"),
        submenu("Flip&transpose", {          
            menuentry("Flip", "_:node_of(_sub):parent():flip()"),
            menuentry("Transpose", "_:node_of(_sub):parent():transpose()"),
            menuentry("Flip at root", "_:split_tree():flip()"),
            menuentry("Transpose at root", "_:split_tree():transpose()"),
        }),
        submenu("Split", {
            menuentry("Vertically", 
                      "WIonWS.split_at(_, _sub, 'bottom', true)"),
            menuentry("Horizontally", 
                       "WIonWS.split_at(_, _sub, 'right', true)"),
            menuentry("Vertically at root", 
                      "WIonWS.split_top(_, 'bottom')"),
            menuentry("Horizontally at root", 
                      "WIonWS.split_top(_, 'right')"),
        }),
        submenu("Toggle floating", {
            menuentry("Left", 
                      "WIonWS.set_floating_at(_, _sub, 'toggle', 'left')"),
            menuentry("Right", 
                      "WIonWS.set_floating_at(_, _sub, 'toggle', 'right')"),
            menuentry("Up", 
                      "WIonWS.set_floating_at(_, _sub, 'toggle', 'up')"),
            menuentry("Down", 
                      "WIonWS.set_floating_at(_, _sub, 'toggle', 'down')"),
        }),
    })
end

{'fraction_non_alphanumeric': 0.1716831683168317, 'fraction_numerical': 0.0019801980198019802, 'mean_word_length': 2.262919896640827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5128454', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1617, 'n_words': 320}