Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions data/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,41 @@
border-radius: 3px;
color: #41A6B5;
}

.wf-panel .workspace-switcher {
background-color: #222222FF;
padding-top: 0px;
padding-bottom: 1px;
padding-right: 1px;
padding-left: 0px;
}

.wf-panel .workspace-switcher .workspace.active {
background-color: #005577FF;
margin-top: 1px;
margin-left: 1px;
}

.wf-panel .workspace-switcher .workspace.inactive {
background-color: #0077AAFF;
margin-top: 1px;
margin-left: 1px;
}

.wf-panel .workspace-switcher .workspace .view {
background-color: #0000AA77;
border: 1px solid #222
}

.wf-panel .workspace-switcher .workspace .view.active {
background-color: #FF00AA77;
border: 1px solid #222
}

.wf-panel .workspace-switcher .workspace .view.inactive {
background-color: #00FFAA77;
border: 1px solid #222
}
.excellent {
color: #00ff00;
}
Expand Down
23 changes: 23 additions & 0 deletions metadata/panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -467,5 +467,28 @@ Set to -1 to only run it by clicking the button.
<min>1</min>
</option>
</group>
<group>
<_short>Workspace Switcher</_short>
<option name="workspace_switcher_mode" type="string">
<_short>Workspace switcher widget mode</_short>
<desc>
<value>classic</value>
<_name>Classic</_name>
</desc>
<desc>
<value>popover</value>
<_name>Popover</_name>
</desc>
<default>classic</default>
</option>
<option name="workspace_switcher_target_height" type="double">
<_short>Target height for workspace switcher widget in pixels</_short>
<default>20</default>
</option>
<option name="workspace_switcher_render_views" type="bool">
<_short>Render rectangles for each window</_short>
<default>true</default>
</option>
</group>
</plugin>
</wf-shell>
1 change: 1 addition & 0 deletions src/panel/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ widget_sources = [
'widgets/tray/item.cpp',
'widgets/tray/host.cpp',
'widgets/tray/dbusmenu.cpp',
'widgets/workspace-switcher.cpp',
]

deps = [
Expand Down
15 changes: 15 additions & 0 deletions src/panel/panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "widgets/network.hpp"
#include "widgets/spacing.hpp"
#include "widgets/separator.hpp"
#include "widgets/workspace-switcher.hpp"
#ifdef HAVE_PULSE
#include "widgets/volume.hpp"
#endif
Expand Down Expand Up @@ -211,6 +212,20 @@ class WayfirePanel::impl
}
}

if (name == "workspace-switcher")
{
if (WayfireIPC::get_instance()->connected)
{
return Widget(new WayfireWorkspaceSwitcher(output));
} else
{
std::cerr <<
"Wayfire IPC not connected, which is required to load workspace-switcher widget." <<
std::endl;
return nullptr;
}
}

if (auto pixel = widget_with_value(name, "spacing"))
{
return Widget(new WayfireSpacing(*pixel));
Expand Down
Loading
Loading