mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-24 02:19:49 +01:00
added a main_mod for moving and resizing
This commit is contained in:
parent
8aadccd9e4
commit
d44c5a9f16
2 changed files with 5 additions and 2 deletions
|
@ -10,6 +10,7 @@ rounding=0
|
|||
max_fps=60 # max fps for updates of config & animations
|
||||
layout=0 # 0 - dwindle (default), 1 - master
|
||||
focus_when_hover=1 # 0 - do not switch the focus when hover (only for tiling)
|
||||
main_mod=SUPER # For moving, resizing
|
||||
|
||||
|
||||
# Execs
|
||||
|
|
|
@ -14,6 +14,7 @@ void ConfigManager::init() {
|
|||
configValues["gaps_in"].intValue = 5;
|
||||
configValues["gaps_out"].intValue = 20;
|
||||
configValues["rounding"].intValue = 5;
|
||||
configValues["main_mod"].strValue = "SUPER";
|
||||
|
||||
configValues["focus_when_hover"].intValue = 1;
|
||||
|
||||
|
@ -378,6 +379,7 @@ void ConfigManager::applyKeybindsToX() {
|
|||
|
||||
|
||||
xcb_ungrab_key(g_pWindowManager->DisplayConnection, XCB_GRAB_ANY, g_pWindowManager->Screen->root, XCB_MOD_MASK_ANY);
|
||||
xcb_ungrab_button(g_pWindowManager->DisplayConnection, XCB_GRAB_ANY, g_pWindowManager->Screen->root, XCB_MOD_MASK_ANY);
|
||||
|
||||
for (auto& keybind : KeybindManager::keybinds) {
|
||||
xcb_grab_key(g_pWindowManager->DisplayConnection, 1, g_pWindowManager->Screen->root,
|
||||
|
@ -391,12 +393,12 @@ void ConfigManager::applyKeybindsToX() {
|
|||
xcb_grab_button(g_pWindowManager->DisplayConnection, 0,
|
||||
g_pWindowManager->Screen->root, XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE,
|
||||
XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC, g_pWindowManager->Screen->root, XCB_NONE,
|
||||
1, KeybindManager::modToMask("SUPER"));
|
||||
1, KeybindManager::modToMask(configValues["main_mod"].strValue));
|
||||
|
||||
xcb_grab_button(g_pWindowManager->DisplayConnection, 0,
|
||||
g_pWindowManager->Screen->root, XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE,
|
||||
XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC, g_pWindowManager->Screen->root, XCB_NONE,
|
||||
3, KeybindManager::modToMask("SUPER"));
|
||||
3, KeybindManager::modToMask(configValues["main_mod"].strValue));
|
||||
|
||||
xcb_flush(g_pWindowManager->DisplayConnection);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue