Skip to content
Merged
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
5 changes: 5 additions & 0 deletions metadata/panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,11 @@
<_long>Enable live window previews when hovering over application buttons in the window list instead of the title tooltip.</_long>
<default>false</default>
</option>
<option name="window_list_no_text" type="bool">
<_short>Hide text</_short>
<_long>Show only icons for window list</_long>
<default>false</default>
</option>
</group>
<group>
<_short>Workspace Switcher</_short>
Expand Down
4 changes: 4 additions & 0 deletions src/panel/widgets/window-list/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ void WayfireWindowListLayout::allocate_vfunc(const Gtk::Widget& widget,
{
// Keep window buttons square on a vertical panel.
per_child = width;
} else if (window_list->hide_label)
{
// Use square buttons for no label mode
per_child = height;
} else
{
per_child = width / child_count;
Expand Down
1 change: 1 addition & 0 deletions src/panel/widgets/window-list/toplevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <sys/mman.h>

#include "toplevel.hpp"
#include "wf-option-wrap.hpp"
#include "window-list.hpp"
#include "gtk-utils.hpp"

Expand Down
4 changes: 2 additions & 2 deletions src/panel/widgets/window-list/window-list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void WayfireWindowList::update_layout()
{
if (t.second)
{
t.second->set_hide_text(is_vertical());
t.second->set_hide_text(is_vertical() || hide_label.value());
}
}

Expand Down Expand Up @@ -526,7 +526,7 @@ void WayfireWindowList::handle_toplevel_manager(zwlr_foreign_toplevel_manager_v1
void WayfireWindowList::handle_new_toplevel(zwlr_foreign_toplevel_handle_v1 *toplevel)
{
toplevels[toplevel] = std::make_unique<WayfireToplevel>(this, toplevel);
toplevels[toplevel]->set_hide_text(is_vertical());
toplevels[toplevel]->set_hide_text(is_vertical() || hide_label.value());
}

void WayfireWindowList::handle_toplevel_closed(zwlr_foreign_toplevel_handle_v1 *toplevel)
Expand Down
3 changes: 3 additions & 0 deletions src/panel/widgets/window-list/window-list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class WayfireWindowList : public Gtk::Box, public WayfireWidget
std::shared_ptr<WayfireWindowListLayout> layout;

public:

WfOption<bool> hide_label{"panel/window_list_no_text"};

std::map<zwlr_foreign_toplevel_handle_v1*,
std::unique_ptr<WayfireToplevel>> toplevels;
std::map<ext_foreign_toplevel_handle_v1*,
Expand Down
5 changes: 4 additions & 1 deletion wf-shell.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,10 @@ commands_output_max_chars = 10
# window_list_icon_size = 16

# Enable Live window preview tooltips. Requires copy-capture plugin and foreign toplevel.
# winsow_list_live_window_previews = false
# window_list_live_window_previews = false

# Hide Text from window list, showing only icon
# window_list_no_text = false

### WORKSPACE SWITCHER ###

Expand Down
Loading