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

My layout is faulty #66

Closed
matthiasbe opened this issue Jan 24, 2019 · 5 comments
Closed

My layout is faulty #66

matthiasbe opened this issue Jan 24, 2019 · 5 comments

Comments

@matthiasbe
Copy link

matthiasbe commented Jan 24, 2019

Hi,
First of all thank for sharing this code publicly :)
I have trouble using your widgets on Awesome WM.

I have cloned the repo in .config/awesome/

This is my config file .config/awesome/rc.lua :

    local brightness_w = require("awesome-wm-widgets.brightness-widget.brightness")
    local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
    local volumearc_widget = require("awesome-wm-widgets.volumearc-widget.volumearc")

    -- Add widgets to the wibox
    s.mywibox:setup {
        layout = wibox.layout.align.horizontal,
        { -- Left widgets
            layout = wibox.layout.fixed.horizontal,
            mylauncher,
            s.mytaglist,
            s.mypromptbox,
        },
        s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,
            wibox.widget.systray(),
            volumearc_widget,
            brightness_w,
            batteryarc_widget,
            mytextclock,
            s.mylayoutbox,
        },
    }

And the result is this

image

Do you have any idea of something I did wrong ?

I'm using debian testing and awesome 4.2.

Thank you for your help ;)
Matthias

@streetturtle
Copy link
Owner

Thank you for trying to use them!
Let's go one by one:

  • VolumeArc
    Widget uses following command to control the volume:

    local GET_VOLUME_CMD = 'amixer -D pulse sget Master'
    local INC_VOLUME_CMD = 'amixer -D pulse sset Master 5%+'
    local DEC_VOLUME_CMD = 'amixer -D pulse sset Master 5%-'
    local TOG_VOLUME_CMD = 'amixer -D pulse sset Master toggle'

    Try to run them in terminal and see if volume changes - maybe the problem is that you don't have alsamixer installed.

  • Brightness
    Same thing, try these commands in terminal first:

    local GET_BRIGHTNESS_CMD = "light -G"   -- "xbacklight -get"
    local INC_BRIGHTNESS_CMD = "light -A 1" -- "xbacklight -inc 5"
    local DEC_BRIGHTNESS_CMD = "light -U 1" -- "xbacklight -dec 5"
  • BatteryArc - the problem is in font size, try to decrease it in here

Please let me know it something from above helped. And sorry for misleading docs.

@streetturtle
Copy link
Owner

Regarding the missing text in batterarc widget there was a problem indeed - the value had a decimal part, so if was overflowing the box, this commit fix it. Also make sure that you have Play font installed. Please let me know if it helped.

@matthiasbe
Copy link
Author

matthiasbe commented Jan 28, 2019

Hello,
Thank you for your quick answers.

I guess I was expecting to get the exact same layout as you showed in screenshots, and I was preoccupied because I did not get the same nice associated text (brightness percentage for example) and gap between icons.

Deducing from your answers, I guess those layout settings have to be set in addition to your widget.

I'm trying your tip about battery arc icon, and I'll get back to you ;)

Matthias

@matthiasbe
Copy link
Author

matthiasbe commented Jan 28, 2019

Pulling changes and installing fonts solved the problem, thanks !

Also I didn't know there was mouse control on the icon, this is pretty cool, even if I'm using keyboard shortcut most of the time.

It's working okay for the volume, but brightness doesn't work as I haven't light installed.
I myself am using xbacklight for shortcuts :

awful.key({ }, "XF86MonBrightnessDown", function ()
    awful.util.spawn("xbacklight -dec 5") end),
awful.key({ }, "XF86MonBrightnessUp", function ()
    awful.util.spawn("xbacklight -inc 5") end),

@streetturtle
Copy link
Owner

Inside the brightness widget code you just need to replace light commands with the ones you use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants