mirror of
https://github.com/hyprwm/Hypr.git
synced 2025-12-26 13:50:03 +01:00
Limit workspace from 1 to 10 (relative switching)
This commit is contained in:
parent
63d0b11f9c
commit
b5a66c165d
3 changed files with 4 additions and 1 deletions
|
|
@ -8,7 +8,6 @@ As the name suggests
|
|||
While Wayland is the future
|
||||
|
||||
I still want Xorg
|
||||
|
||||
<br/>
|
||||
|
||||
<p align="center">
|
||||
|
|
|
|||
|
|
@ -1756,6 +1756,8 @@ void CWindowManager::moveActiveFocusTo(char dir) {
|
|||
}
|
||||
|
||||
void CWindowManager::relativeWorkspace(int relativenum) {
|
||||
if (activeWorkspaceID + relativenum < lowerWorkspaceLimit) return;
|
||||
if (activeWorkspaceID + relativenum > upperWorkspaceLimit) return;
|
||||
changeWorkspaceByID(activeWorkspaceID + relativenum);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ public:
|
|||
std::deque<int> activeWorkspaces;
|
||||
int lastActiveWorkspaceID = 1;
|
||||
int activeWorkspaceID = 1;
|
||||
int upperWorkspaceLimit = 10;
|
||||
int lowerWorkspaceLimit = 1;
|
||||
|
||||
// Not really pipes, but files. Oh well. Used for IPC.
|
||||
SIPCPipe m_sIPCBarPipeIn = {ISDEBUG ? "/tmp/hypr/hyprbarind" : "/tmp/hypr/hyprbarin", 0};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue