Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Refactor task widget #147

Closed
wants to merge 1 commit into from
Closed

Conversation

Kasper24
Copy link
Contributor

@Kasper24 Kasper24 commented Dec 6, 2021

  • Converted the global show signal into proper methods, show/toggle/hide
  • No enable function, calling bling.widget.task_widget will return an object with the above methods
  • Added the abillity to position the widget differently each time that it is showed. This with the change listed below allows it to align to the currently hovered task widget instead of having a static positon.
  • Added the option to provide a wibox, widget and offset arguements to the show method, allowing to the align the task preview to another widget (possibly the hovered task widget).
    This is done by the following code:
task_preview:show(client, {wibox = awful.screen.focused().wibar, widget = task_widget, offset = { y = 100}})

Minor changes:

  • Removed the _fn from the placement arguement to keep it consistent with other awesome wiboxes
  • Removed the 'widget' prefix from the arguement provided to the object.

Those 2 aren't that important and can be undone though.

@Kasper24 Kasper24 requested a review from javacafe01 as a code owner December 6, 2021 00:46
@javacafe01
Copy link
Member

@Kasper24 Looks good! I still have no Linux machine (laptop will come in a few days), so once I get it I'll test your PR and give it the thumbs up. Or, we can have @Nooo37 test it as well and merge.

@javacafe01
Copy link
Member

@Kasper24 Works fine for me, just needs docs.

task_preview_box.x = s.geometry.x + widget_x
task_preview_box.y = s.geometry.y + widget_y
end
-- awesome.connect_signal("bling::task_preview::visibility", function(s, v, c)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to keep this for a few months so we can notify the user that this signal is deprecated.

@javacafe01
Copy link
Member

Merged into #99

@javacafe01 javacafe01 closed this Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants