mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 06:45:59 +01:00
Impl changeworkspace(e+{n})
This commit is contained in:
parent
2ae088d631
commit
ce9efb7ae3
5 changed files with 11 additions and 13 deletions
|
@ -103,5 +103,5 @@ bind=ALT,8,movetoworkspace,8
|
||||||
bind=ALT,9,movetoworkspace,9
|
bind=ALT,9,movetoworkspace,9
|
||||||
bind=ALT,0,movetoworkspace,10
|
bind=ALT,0,movetoworkspace,10
|
||||||
|
|
||||||
bind=SUPER,mouse_down,workspace,+1
|
bind=SUPER,mouse_down,workspace,e+1
|
||||||
bind=SUPER,mouse_up,workspace,-1
|
bind=SUPER,mouse_up,workspace,e-1
|
|
@ -112,6 +112,6 @@ bind=ALT,8,movetoworkspace,8
|
||||||
bind=ALT,9,movetoworkspace,9
|
bind=ALT,9,movetoworkspace,9
|
||||||
bind=ALT,0,movetoworkspace,10
|
bind=ALT,0,movetoworkspace,10
|
||||||
|
|
||||||
bind=SUPER,mouse_down,workspace,+1
|
bind=SUPER,mouse_down,workspace,e+1
|
||||||
bind=SUPER,mouse_up,workspace,-1
|
bind=SUPER,mouse_up,workspace,e-1
|
||||||
)#";
|
)#";
|
|
@ -49,9 +49,7 @@ void Events::listener_mouseButton(wl_listener* listener, void* data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_mouseAxis(wl_listener* listener, void* data) {
|
void Events::listener_mouseAxis(wl_listener* listener, void* data) {
|
||||||
const auto E = (wlr_pointer_axis_event*)data;
|
g_pInputManager->onMouseWheel((wlr_pointer_axis_event*)data);
|
||||||
|
|
||||||
wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, E->time_msec, E->orientation, E->delta, E->delta_discrete, E->source);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_requestMouse(wl_listener* listener, void* data) {
|
void Events::listener_requestMouse(wl_listener* listener, void* data) {
|
||||||
|
|
|
@ -193,7 +193,9 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
|
||||||
}
|
}
|
||||||
outName = WORKSPACENAME;
|
outName = WORKSPACENAME;
|
||||||
} else {
|
} else {
|
||||||
if (in[0] == 'm') {
|
if (in[0] == 'm' || in[0] == 'e') {
|
||||||
|
bool onAllMonitors = in[0] == 'e';
|
||||||
|
|
||||||
if (!g_pCompositor->m_pLastMonitor) {
|
if (!g_pCompositor->m_pLastMonitor) {
|
||||||
Debug::log(ERR, "Relative monitor workspace on monitor null!");
|
Debug::log(ERR, "Relative monitor workspace on monitor null!");
|
||||||
result = INT_MAX;
|
result = INT_MAX;
|
||||||
|
@ -234,7 +236,7 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(searchID); PWORKSPACE && PWORKSPACE->m_iID != SPECIAL_WORKSPACE_ID) {
|
if (const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(searchID); PWORKSPACE && PWORKSPACE->m_iID != SPECIAL_WORKSPACE_ID) {
|
||||||
if (PWORKSPACE->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID) {
|
if (onAllMonitors || PWORKSPACE->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID) {
|
||||||
currentID = PWORKSPACE->m_iID;
|
currentID = PWORKSPACE->m_iID;
|
||||||
|
|
||||||
if (remains < 0)
|
if (remains < 0)
|
||||||
|
|
|
@ -630,12 +630,10 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
if (e->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
if (e->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
||||||
static const std::string empty = "";
|
|
||||||
|
|
||||||
for (int i = 0; i < syms; ++i)
|
for (int i = 0; i < syms; ++i)
|
||||||
found = g_pKeybindManager->handleKeybinds(MODS, empty, keysyms[i], 0) || found;
|
found = g_pKeybindManager->handleKeybinds(MODS, "", keysyms[i], 0) || found;
|
||||||
|
|
||||||
found = g_pKeybindManager->handleKeybinds(MODS, empty, 0, KEYCODE) || found;
|
found = g_pKeybindManager->handleKeybinds(MODS, "", 0, KEYCODE) || found;
|
||||||
} else if (e->state == WL_KEYBOARD_KEY_STATE_RELEASED) {
|
} else if (e->state == WL_KEYBOARD_KEY_STATE_RELEASED) {
|
||||||
// hee hee
|
// hee hee
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue