Skip to content
Draft
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
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ option(
type: 'boolean',
value: true,
description: 'Install wayland-logout',
)
)
57 changes: 56 additions & 1 deletion metadata/dock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,26 @@
<default>true</default>
</option>
<option name="autohide_duration" type="int">
<_short>Autohide duration</_short>
<_short>Animation duration</_short>
<_long>
Time (in milliseconds) the panel takes to expand and retract
</_long>
<default>300</default>
</option>
<option name="autohide_show_delay" type="int">
<_short>Autohide show delay</_short>
<_long>
Amount of time (in milliseconds) the cursor needs to be in the zone before showing.
</_long>
<default>300</default>
</option>
<option name="autohide_hide_delay" type="int">
<_short>Autohide hide delay</_short>
<_long>
Amount of time (in milliseconds) the cursor needs to be out of the zone before hiding.
</_long>
<default>500</default>
</option>
<option name="position" type="string">
<_short>Position</_short>
<default>bottom</default>
Expand All @@ -26,11 +43,49 @@
<value>bottom</value>
<_name>Bottom</_name>
</desc>
<desc>
<value>left</value>
<_name>Left</_name>
</desc>
<desc>
<value>right</value>
<_name>Right</_name>
</desc>
</option>
<option name="orientation" type="string">
<_short>Icons orientation</_short>
<default>match</default>
<desc>
<value>match</value>
<_name>Match dock position</_name>
</desc>
<desc>
<value>horizontal</value>
<_name>Normal</_name>
</desc>
<desc>
<value>left</value>
<_name>Orient components to the left</_name>
</desc>
<desc>
<value>right</value>
<_name>Orient components to the right</_name>
</desc>
</option>
<option name="max_per_line" type="int">
<_short>Max icons per line</_short>
<_long>If greater than 0, the dock will have a maximum number of entries per line, after which a new line is created.</_long>
<default>0</default>
</option>
<option name="dock_height" type="int">
<_short>Dock height</_short>
<default>100</default>
</option>
<option name="dock_width" type="int">
<_short>Dock width</_short>
<default>100</default>
</option>

<option name="icon_height" type="int">
<_short>Dock icons height</_short>
<default>72</default>
Expand Down
81 changes: 78 additions & 3 deletions metadata/panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,76 @@
<default></default>
</option>
<option name="widgets_left" type="string">
<_short>Widgets Left</_short>
<_short>Widgets Left/Top</_short>
<_long>
Widgets placed in the left zone of the bar, or top if the bar is vertical.
</_long>
<default>menu spacing4 launchers window-list</default>
</option>
<option name="widgets_center" type="string">
<_short>Widgets Center</_short>
<default>none</default>
</option>
<option name="widgets_right" type="string">
<_short>Widgets Right</_short>
<_short>Widgets Right/Bottom</_short>
<_long>
Widgets placed in the right zone of the bar, or bottom if the bar is vertical.
</_long>
<default>volume network battery clock</default>
</option>
<option name="minimal_height" type="int">
<_short>Minimal Height</_short>
<_long>
Minimum height the panel takes.
</_long>
<default>24</default>
</option>
<option name="minimal_width" type="int">
<_short>Minimal Width</_short>
<_long>
Minimum width the panel takes.
</_long>
<default>24</default>
</option>
<option name="span_full_edge" type="bool">
<_short>Span whole side</_short>
<_long>
Wether the pannel should extend all the way to the left and right ; or top and bottom depending on orientation.
</_long>
<default>true</default>
</option>
<option name="force_center" type="bool">
<_short>Force centering by elements</_short>
<_long>
If on, the panel elements are centered around the middle of it, and thus the edge it runs along. This will lead to unused space on the side that has the least space taken up by the widgets.
</_long>
<default>false</default>
</option>
<option name="autohide" type="bool">
<_short>Autohide</_short>
<default>false</default>
</option>
<option name="autohide_duration" type="int">
<_short>Autohide Duration</_short>
<_short>Animation duration</_short>
<_long>
Time (in milliseconds) the panel takes to expand and retract
</_long>
<default>300</default>
</option>
<option name="autohide_show_delay" type="int">
<_short>Autohide show delay</_short>
<_long>
Amount of time (in milliseconds) the cursor needs to be in the zone before showing.
</_long>
<default>300</default>
</option>
<option name="autohide_hide_delay" type="int">
<_short>Autohide hide delay</_short>
<_long>
Amount of time (in milliseconds) the cursor needs to be out of the zone before hiding.
</_long>
<default>500</default>
</option>
<option name="position" type="string">
<_short>Panel Position</_short>
<default>top</default>
Expand All @@ -44,6 +91,34 @@
<value>bottom</value>
<_name>Bottom</_name>
</desc>
<desc>
<value>left</value>
<_name>Left</_name>
</desc>
<desc>
<value>right</value>
<_name>Right</_name>
</desc>
</option>
<option name="orientation" type="string">
<_short>Elements orientation</_short>
<default>match</default>
<desc>
<value>match</value>
<_name>Match panel position</_name>
</desc>
<desc>
<value>horizontal</value>
<_name>Normal</_name>
</desc>
<desc>
<value>left</value>
<_name>Orient components to the left</_name>
</desc>
<desc>
<value>right</value>
<_name>Orient components to the right</_name>
</desc>
</option>
<option name="edge_offset" type="int">
<_short>Edge offset</_short>
Expand Down
17 changes: 11 additions & 6 deletions src/dock/dock-app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <gdk/wayland/gdkwayland.h>
#include <css-config.hpp>


namespace
{
extern zwlr_foreign_toplevel_manager_v1_listener toplevel_manager_v1_impl;
Expand Down Expand Up @@ -44,14 +43,21 @@ class WfDockApp::impl
zwlr_foreign_toplevel_manager_v1 *toplevel_manager = NULL;
};

void WfDockApp::on_config_reload()
{
for (auto& d : priv->docks)
{
d.second->handle_config_reload();
}
}

void WfDockApp::on_activate()
{
WayfireShellApp::on_activate();
new CssFromConfigInt("dock/icon_height", ".toplevel-icon {-gtk-icon-size:", "px;}");
IconProvider::load_custom_icons();

/* At this point, wayland connection has been initialized,
* and hopefully outputs have been created */
/* At this point, wayland connection has been initialized, and hopefully outputs have been created */
auto gdk_display = gdk_display_get_default();
auto display = gdk_wayland_display_get_wl_display(gdk_display);

Expand Down Expand Up @@ -83,9 +89,8 @@ void WfDockApp::handle_new_output(WayfireOutput *output)

void WfDockApp::handle_output_removed(WayfireOutput *output)
{
/* Send an artificial output leave.
* This is useful because in this way the toplevel can safely destroy
* its icons created on that particular output */
/* Send an artificial output leave. This is useful because in this way the toplevel can safely destroy its
* icons created on that particular output */
for (auto& toplvl : priv->toplevels)
{
toplvl.second->handle_output_leave(output->wo);
Expand Down
Loading