profile
viewpoint

Aire-One/awesome-AnimationFramework 32

A Simple Animation Framework for the Awesome WM

Aire-One/awesome-battery_widget 10

A UPowerGlib based battery widget for the Awesome WM with a basic widget template mechanism! 🔋

Aire-One/gstatus 9

🎨 A pretty `git status` command line tool.

Aire-One/ff-open-with 4

A Firefox extension to open URLs with external programs instead of new tab.

GatienBoquet/Stifco-GEB 2

Stifco - Mission 4 - GEB - Node.JS

Aire-One/awesome-slot 1

A declarative API to connect signals for the AwesomeWM

Aire-One/compton 1

Basically compton with some additional features I want on my system 🚀

Aire-One/FruitLister 1

My basic Android App to self-teach Kotlin Android development with MVVM pattern, Dagger Hilt, Retrofit, Room, Navigation Component, DataBinding and Clean Architecture 🚀

Aire-One/adbfs-rootless 0

Mount Android phones on Linux with adb. No root required.

issue commentawesomeWM/awesome

startup_id code doesn't work

Hello, it seems to work as expected in my computer. Spawning xterm gave me the following snid "awesome/xterm/39887-0-lapew_TIME19538582", so setting the c.startup_id didn't fail since the string is not nil...

Maybe, here are some first basic things to check :

  • Are you running Linux? This code is dependent on inspecting Linux specific /proc stuff
  • Do you have the corresponding /proc/"..c.pid.."/environ" file?
  • What are the values you get for both variables value and snid?
nicobross

comment created time in 4 hours

PR opened awesomeWM/awesome

[RFC] Implement wibox.widget.template for the awful.widget.layoutbox

Hello,

With my other PR (#3421) being ready for review, here is the implementation of the template widget for the awful.widget.layoutbox. This branch is based on the other PR, only the last commit (eba12a00f024f9a8fcca15c3f81510005860aca7) is relevant.

With the current implementation, an end-user can use/copypast this code example in the awesomerc.lua to customize the layoutbox:

    s.mylayoutbox = awful.widget.layoutbox {
        screen  = s,
        buttons = {
            awful.button({ }, 1, function () awful.layout.inc( 1) end),
            awful.button({ }, 3, function () awful.layout.inc(-1) end),
            awful.button({ }, 4, function () awful.layout.inc(-1) end),
            awful.button({ }, 5, function () awful.layout.inc( 1) end),
        },
        widget_template = {
            template = wibox.widget.textbox,
            update_callback = function(widget_template, args)
                local layout_name = args and args.screen and awful.layout.getname(awful.layout.get(args.screen)) or "dunno"

                widget_template.widget.text = "custom layoutbox : " .. layout_name
            end,
        },
    }

I open this PR in draft mode, waiting for the other one to be merged. After the merge, I'll rebase this branch, and it'll be ready.

+532 -29

0 comment

10 changed files

pr created time in a day

push eventAire-One/awesome

Aire-One

commit sha b627cdb9b9d7f16457dffbbaf37c9cfe160deec3

add(w.w.template) implement widget as child

view details

Aire-One

commit sha 880ab94294daf57a3dc62097ea0701e6cef679e0

add(w.w.template) constructor `buttons` param

view details

Aire-One

commit sha c9a60af8ec77d7f302120d3fdb11f7f1d7ea906c

fix(w.w.template) fit and layout methods The previous implementation for these methods was a naive attempt at making the base widget working. We need to make sure computing the widget's sizes is more robust for complex widget_template definition.

view details

Aire-One

commit sha 8367cfba927a588341e755567e0f85907bea1893

fix(w.w.template) draw The draw method exists only for widgets. When dealing with more complex widget, this method is not necessary implemented (i.e. with layouts). We need to check the method is defined by the child before calling it.

view details

Aire-One

commit sha 0f556b5c2752e77a31affd4cdb2bd653ff64b677

fix(w.w.template) free queued_updates array This is a small cleanup to not keep in memory a value we don't need. After the update_callback callback is called, we don't need to remember it happens this callback was queued before. (It also prevents a possible memory leak (of a boolean value) when widgets are destroyed)

view details

Aire-One

commit sha 0239c5aa6318fb85273320a1fae1d4b3f76f81a8

doc(w.w.template) module description

view details

Aire-One

commit sha 6c4c94c752858a0721a6f937e043a4fff290628a

doc(w.w.template) current methods

view details

Aire-One

commit sha 15500465416c80f4aae445ef529a9f430f0ead22

doc(w.w.template) 3rd party lib usage example

view details

Aire-One

commit sha 31bbd938410638e632a8430df827f20acc415977

add(spec) more `wibox.widget.template` tests

view details

Aire-One

commit sha fc5ad2daef051e4dc9f58a57f23a2cbc402055d7

add(w.w.template) constructor accepts widget props

view details

Aire-One

commit sha 1087512ed88389f425f4e082a751bee4327a80c7

add(w.w.template) set_template check widget

view details

Aire-One

commit sha 525c3a5029414e341ae461deccce850471cc5e8a

add(w.w.template) template can't be a callback Containers and layouts don't allow to build a widget from a callback, so there is no reason to have this feature here.

view details

Aire-One

commit sha 75d386465faafcaf3c586ebaf215609b02d7b796

fix(tasklist) use the local capi.screen object

view details

Aire-One

commit sha e2de293d7eb86152d8025e98e795d561f6c9a36b

add(layoutbox) Implement wibox.widget.template

view details

push time in a day

Pull request review commentawesomeWM/awesome

[RFC/WIP] Implement wibox.widget.template: An abstract widget that handles a preset of concrete widget.

+--DOC_NO_USAGE++--DOC_HIDE_START+local parent = ...++local gears = require("gears")+local wibox = require("wibox")++local concrete_widget_template_builder+--DOC_HIDE_END++    -- Build the default widget used as a fallback if user doesn't provide a template+    local default_widget = {+        template = wibox.widget.textclock,+        update_callback = function(widget_template, args)+            local text = args.text or "???"+            widget_template.widget.text = text+        end,+    }++--DOC_NEWLINE+    function concrete_widget_template_builder(args)+        -- TODO : this should be made easier+        local ret = args.widget_template+                and args.widget_template.is_widget+                and args.widget_template.widget_name == "wibox.widget.template"+                and args.widget_template+            or wibox.widget.template(+                args.widget_template or default_widget+            )

I went for the easy way : use a basic table with parameters to pass to the template, and if this table doesn't exist, fallback to the default template.

There is no easy way to enforce typing of parameters without overcomplicated checks that doesn't add much to the end user. (And the test I did there was flaky anyway, you just can't find the widget type based on the widget_name property, that's a bad idea.)

Aire-One

comment created time in 3 days

PullRequestReviewEvent

pull request commentawesomeWM/awesome

[RFC/WIP] Implement wibox.widget.template: An abstract widget that handles a preset of concrete widget.

I had some issue to find the time I needed to finish working on this... I think it's now ready! :smile:

All check are green, and I'm not sure how(/whether it's necessary?) to test the remaining lines highlighted by codecov.

Thank you, @sclu1034, for your previous reviews.

Aire-One

comment created time in 3 days

push eventAire-One/awesome

Aire-One

commit sha 525c3a5029414e341ae461deccce850471cc5e8a

add(w.w.template) template can't be a callback Containers and layouts don't allow to build a widget from a callback, so there is no reason to have this feature here.

view details

push time in 3 days

push eventAire-One/awesome

Aire-One

commit sha 31bbd938410638e632a8430df827f20acc415977

add(spec) more `wibox.widget.template` tests

view details

Aire-One

commit sha fc5ad2daef051e4dc9f58a57f23a2cbc402055d7

add(w.w.template) constructor accepts widget props

view details

Aire-One

commit sha 1087512ed88389f425f4e082a751bee4327a80c7

add(w.w.template) set_template check widget

view details

push time in 4 days

push eventAire-One/awesome

Aire-One

commit sha 15500465416c80f4aae445ef529a9f430f0ead22

doc(w.w.template) 3rd party lib usage example

view details

push time in 4 days

push eventAire-One/awesome

Aire-One

commit sha b627cdb9b9d7f16457dffbbaf37c9cfe160deec3

add(w.w.template) implement widget as child

view details

Aire-One

commit sha 880ab94294daf57a3dc62097ea0701e6cef679e0

add(w.w.template) constructor `buttons` param

view details

Aire-One

commit sha c9a60af8ec77d7f302120d3fdb11f7f1d7ea906c

fix(w.w.template) fit and layout methods The previous implementation for these methods was a naive attempt at making the base widget working. We need to make sure computing the widget's sizes is more robust for complex widget_template definition.

view details

Aire-One

commit sha 8367cfba927a588341e755567e0f85907bea1893

fix(w.w.template) draw The draw method exists only for widgets. When dealing with more complex widget, this method is not necessary implemented (i.e. with layouts). We need to check the method is defined by the child before calling it.

view details

Aire-One

commit sha 0f556b5c2752e77a31affd4cdb2bd653ff64b677

fix(w.w.template) free queued_updates array This is a small cleanup to not keep in memory a value we don't need. After the update_callback callback is called, we don't need to remember it happens this callback was queued before. (It also prevents a possible memory leak (of a boolean value) when widgets are destroyed)

view details

Aire-One

commit sha 0239c5aa6318fb85273320a1fae1d4b3f76f81a8

doc(w.w.template) module description

view details

Aire-One

commit sha 6c4c94c752858a0721a6f937e043a4fff290628a

doc(w.w.template) current methods

view details

Aire-One

commit sha a9d05ff6032207b608971506c59bf389b3f88bed

doc(w.w.template) 3rd party lib usage example

view details

push time in 4 days

push eventAire-One/awesome

Aire-One

commit sha 8e4128fd8fe48ca644d6de02654f091d624b11da

doc(w.w.template) usage for library example

view details

push time in 4 days

push eventAire-One/awesome

Aire-One

commit sha 62a9bb984fa4d887c3edfca92d60649af8579c2a

add: make it simple

view details

push time in 4 days

issue commentawesomeWM/awesome-www

Responsiveness and Content Placement

Since we now introduced flexbox in our CSS for the mouse style list, I think we could also use it to stack the two UML table for smaller screens.

I'll transfer the issue to the awesome repo.

Thomashighbaugh

comment created time in 4 days

issue closedawesomeWM/awesome-www

CSS Overflow is Clearly Not Set for the Sidebar

20211121_195045

Clearly Something is Wrong!

Not only is it somewhat hard to understand the vast majority of the documentation pages because they lack examples that coherently demonstrate the usage of whatever it is you found yourself looking at in an actual context users could find themselves in (which is hard to write in the source code comments the docs are being generated from, but some pages seem to manage, so shouldn't that be added to the contribution requirements of the source code?)...

but someone did not appropriately set up the sidebar's overflow in CSS


Solution? Solution!

I would fix this myself, but I am busy at the moment with my config, a project that's gone on for years now and I would like to finish it, so you will have to wade through the css that is applied to what is pulled out of source code and smashed into the documentation site but I can help you with the specific rule you will need to add to the appropiate selector at least.

What It Will Look Like in Code

.whatever-the-selector-is-called {
// ...other random css
overflow: auto;
// or
overflow: hidden 
}

Current State's Probable CSS

its probably set to visible now, which is fine if you don't mind the bleed over I highlighted in my screenshot but personally I can't stand that.

CSS Selector Replacement Rationale

  • auto - adds scrollbars if needed (almost never actually needed, but in case you just have to read the link in the little sidebar space)

  • hidden - because its a link, this works since hovering over the link will make its content appear if not in a popup, on the bottom status bar of most browsers. This should be enough for most people

That's It

Either prevents the bleed over that cannot be read by anyone, regardless of preference.

closed time in 4 days

Thomashighbaugh

issue commentawesomeWM/awesome-www

CSS Overflow is Clearly Not Set for the Sidebar

@Thomashighbaugh probably don't know how we are working, so here are some additional information :

The API documentation is generated from our source code at awesomewm/awesome. The documentation you can read at https://awesomewm.org/doc/api/index.html was built against the stable version when it was released (almost 4 years ago now?).

Since then, we are still working on the git version and the doc evolved a lot. The new version has fixes for your reported bug : Sections names are wrapped and module names (that can't be break) are scrollable (see Elv and Actionless screenshots).

I'll consider this issue resolved and close it.

Thomashighbaugh

comment created time in 4 days

pull request commentawesomeWM/awesome

doc(readme): link to building and testing (fixes #3514)

Fixes awesomeWM/awesome#3514

(I think it works https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)

actionless

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentawesomeWM/awesome

Signalled error: bad argument #3 to 'timeout_add' (number has no integer representation)

 function timer:start()         gdebug.print_error(traceback("timer already started"))         return     end-    self.data.source_id = glib.timeout_add(glib.PRIORITY_DEFAULT, self.data.timeout * 1000, function()+    local timeout_ms = math.floor(self.data.timeout * 1000 + 0.5)

Why do you need to add + 0.5? Shouldn't you use math.ceil instead?

necauqua

comment created time in 7 days

PullRequestReviewEvent

push eventAire-One/awesome

Aire-One

commit sha 766e78c6d1bf545bcc4b4c24797debf99d43d503

doc(w.w.template) module description

view details

Aire-One

commit sha 42c816b460b28430ec0e327ddf9b2c559aa658b8

doc(w.w.template) current methods

view details

Aire-One

commit sha b0fd24bddca51375105b77c452b327b5230c5eb3

doc(w.w.template) usage in libraries [WIP]

view details

Aire-One

commit sha 9bf87bdecde683f4a41e0e4a0f969961bf211e44

fix(tasklist) use the local capi.screen object

view details

Aire-One

commit sha f0f015a7f12429920bff02a01031dac9e473521d

add(layoutbox) Implement wibox.widget.template

view details

Aire-One

commit sha 291cf1a8cd440fe0e32f3a51ee1a708081185f71

Try the layoutbox widget template :)

view details

Aire-One

commit sha 5659bac5123369ff43148030df4f4298445b1155

implement using new template widget

view details

Aire-One

commit sha 9ff5a8997e8cfece9837fcbc4df4c8d4e72268cf

test a customized layoutbox

view details

Aire-One

commit sha a38307554e5c33f64418d7262af5fd35b1a349d3

fix(a.w.layoutbox) widget_template instantiation

view details

Aire-One

commit sha 47c10350d60c9bfa90d3c6120f6ebabe02dd2aaa

use the new template build fonction

view details

push time in 7 days

issue commentawesomeWM/awesome

For some applications, "input passthrough" does not work.

Hello,

I just installed peek, and it seems to work as expected on my computer running awesome git version.

I'll try later with the stable version, to confirm it doesn't work there. But for now, it seems the issue is resolved in with the awesome git version.

meetcw

comment created time in 7 days

Pull request review commentawesomeWM/awesome

fix: make markup available

 local beautiful = require("beautiful")  local calendar_popup = { offset = 0, mt = {} } -local properties = { "markup", "fg_color", "bg_color", "shape", "padding", "border_width", "border_color", "opacity" }+local properties = { "fg_color", "bg_color", "markup", "shape", "padding", "border_width", "border_color", "opacity" }

I have tested whether props.markup is nil or not, because I want to prefer the user-defined function and format string.

Yes, you're right.

sarubo

comment created time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent

startedundefinedDarkness/ss

started time in 8 days

PullRequestReviewEvent

Pull request review commentBlingCorp/bling

Improved swallowing

 local helpers = require(tostring(...):match(".*bling") .. ".helpers") local window_swallowing_activated = false  -- you might want to add or remove applications here-local dont_swallow_classname_list = beautiful.dont_swallow_classname_list+local parent_filter_list = beautiful.parent_filter_list     or { "firefox", "Gimp", "Google-chrome" }-local activate_dont_swallow_filter = beautiful.dont_swallow_filter_activated+local child_filter_list = beautiful.child_filter_list+    or { }+local swallowing_filter = beautiful.swallowing_filter     or true --- checks if client classname matches with any entry of the dont-swallow-list-local function check_if_swallow(c)-    if not activate_dont_swallow_filter then-        return true-    end-    for _, classname in ipairs(dont_swallow_classname_list) do-        if classname == c.class then-            return false+-- check if element exist in table+local function is_in_table(element, table)+    local res = false+    for _, value in pairs(table) do+        if element:match(value) then+            res = true+            break         end     end-    return true+    return res+end++-- checks if parent's classname can be swallowed+local function check_swallow(class, list)+    if not swallowing_filter then+        return true+    else+        return not is_in_table(class, list)+    end end

nit :

if X return true else return Y -> return X or Y

local function check_swallow(class, list)
    return (not swallowing_filter) or (not is_in_table(class, list))
end

Lua stops testing value as soon as it found a trusty value. It means that whenever (not swallowing_filter) is true, (not is_in_table(class, list)) will not be executed.

It can be tested with something like this :

function Y() print('hello') return true end 

-- X or Y
true or Y() -- true
false or Y() -- hello true
eylles

comment created time in 8 days

Pull request review commentBlingCorp/bling

Improved swallowing

 local function manage_clientspawn(c)     if         -- will search for "(parent_client.pid)" inside the parent_pid string         ( tostring(parent_pid):find("("..tostring(parent_client.pid)..")") )-        and check_parent(parent_client.class) and check_client(c.class)+        and check_swallow(parent_client.class, parent_filter_list)+        and check_swallow(c.class, child_filter_list)

Hm, actually, I'm not sure whether the check_swallow function makes sense at all now...

If its only usage is here, it would be easier to test values with is_in_table here (?) (and it would prevent to test not swallowing_filter twice)

eylles

comment created time in 8 days

more