Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.

@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants