diff options
| author | Cyril Levis <cyrinux@users.noreply.github.com> | 2023-01-08 14:19:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-08 14:19:18 +0100 |
| commit | 3173fbdc4a2b0a306cf56e282524bcb33914ab96 (patch) | |
| tree | df37edc12ca160e37376580a2d58f5f2075f0bc9 /src/Compositor.cpp | |
| parent | b1104b1ca70372c377289efe6ed99f2d1f6a1ca3 (diff) | |
feat: dispatcher, add workspace renaming (#1336)
* feat: dispatcher, add workspace renaming
Co-authored-by: vaxerski <vaxry@vaxry.net>
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 35e30b77..6b72465d 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -391,11 +391,10 @@ void CCompositor::startCompositor() { if (sd_booted() > 0) // tell systemd that we are ready so it can start other bond, following, related units sd_notify(0, "READY=1"); - else + else Debug::log(LOG, "systemd integration is baked in but system itself is not booted à la systemd!"); #endif - // This blocks until we are done. Debug::log(LOG, "Hyprland is ready, running the event loop!"); wl_display_run(m_sWLDisplay); @@ -2071,6 +2070,20 @@ CWorkspace* CCompositor::createNewWorkspace(const int& id, const int& monid, con return PWORKSPACE; } +void CCompositor::renameWorkspace(const int& id, const std::string& name) { + const auto PWORKSPACE = getWorkspaceByID(id); + + if (!PWORKSPACE) + return; + + if (isWorkspaceSpecial(id)) + return; + + Debug::log(LOG, "renameWorkspace: Renaming workspace %d to '%s'", id, name); + wlr_ext_workspace_handle_v1_set_name(PWORKSPACE->m_pWlrHandle, name.c_str()); + PWORKSPACE->m_szName = name; +} + void CCompositor::setActiveMonitor(CMonitor* pMonitor) { if (m_pLastMonitor == pMonitor) return; |
