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
36 changes: 35 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>Autohide 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,28 @@
<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="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
61 changes: 58 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 even spacing</_short>
<_long>
If on, the left and right of the panel always take the same amount of space and the panel is always centered on the middle of the screen. 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>Autohide 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,14 @@
<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="edge_offset" type="int">
<_short>Edge offset</_short>
Expand Down
15 changes: 11 additions & 4 deletions src/dock/dock-app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,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 @@ -84,8 +91,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 */
* 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