You are not logged in.

#1 2009-04-28 16:34:39

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

[solved] awesome - order of widgets in wibox

Hi,

the comment in the rc.lua says: -- Add widgets to the wibox - order matters

For me, order doesn't matter.

I "created" (actually I copied) the mpd widget from the awesome wiki. To display the widget I added it to the wibox widget list but no matter on what position I put it it always shows up right to my taglist.

Here's my rc.lua:
http://pastebin.com/m13dfbe0c

Thanks in advance

barghest

P.S.: Is there something like separators for the statusbar?

Last edited by Barghest (2009-05-01 12:29:52)

Offline

#2 2009-04-28 17:13:26

zaibach
Member
Registered: 2008-10-24
Posts: 5

Re: [solved] awesome - order of widgets in wibox

 mpdwidget = widget({
           type = 'textbox',
           name = 'mpdwidget',
           align = "right"
       })

Order do matters in the context on how the widgets are aligned. Try left,right or center.

Offline

#3 2009-04-28 17:32:58

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: [solved] awesome - order of widgets in wibox

Thanks for this. Now the position is as wanted.

Is there a way to add a "space" between the widgets - they're too close to each other?

Offline

#4 2009-04-29 08:00:58

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: [solved] awesome - order of widgets in wibox

Barghest wrote:

Thanks for this. Now the position is as wanted.

Is there a way to add a "space" between the widgets - they're too close to each other?

I think people have done that before by creating an empty widget and calling it "spacer" and placing it between widgets.  I think there are examples on the awesomeWM community wiki (user-made configs).

See here: http://github.com/stxza/arch-linux-conf … ome/rc.lua

relevant section:

-- Simple spacer we can use to get cleaner code
spacer = " "

-- Separator icon
separatorR = widget({ type = "imagebox", align = "right" })
separatorR.image = image(beautiful.sepic)

separatorL = widget({ type = "imagebox", align = "left" })
separatorL.image = image(beautiful.sepic)

Hope that helps,
Lswest

Looks like he uses the separator to separate out his widgets:

-- Add widgets to the wibox - order matters
   mywibox[s].widgets = { --launcher,
                            taglist[s],
                            layoutbox[s],
                            tasklist[s],
                            promptbox[s],
                            cpuic,
                            usgwidget,
                            tempic,
                            tempwidget,
                            memic,
                            memwidget,
                            fsic,
                            fswidget,
                            wifiic,
                            wifiwidget,
                            batic,
                            batterywidget,
                            volic,
                            volumewidget,
                            separatorR,
                            clockwidget,
                            s == 1 and systray or nil
                        }

So try to create it using a different (blank?) icon.

Last edited by lswest (2009-04-29 08:02:59)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#5 2009-04-29 23:42:36

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: [solved] awesome - order of widgets in wibox

So try to create it using a different (blank?) icon.

If only empty spaces are wanted I would recommend a textbox with just spaces "  ". Or it can contain some separator like: |, /... some people also get creative and use unicode symbols (http://www.alanwood.net/unicode/miscell … mbols.html).

-- {{{ Wibox
-- 
-- Widgets configuration
-- 
-- Reusable separators
myspace          = widget({ type = "textbox", name = "myspace", align = "right" })
myseparator      = widget({ type = "textbox", name = "myseparator", align = "right" })
myspace.text     = " "
myseparator.text = "|"
-- ...

Last edited by anrxc (2009-04-29 23:43:59)


You need to install an RTFM interface.

Offline

#6 2009-04-30 04:25:40

Joe_Arch
Member
Registered: 2008-11-27
Posts: 67

Re: [solved] awesome - order of widgets in wibox

Here's how I put a "||" in between my widgets:

-- Separator icon
separator = widget({ type = "textbox", align = "right"})
separator.text = " || "

You can also just add a few spaces to the end of your widgets, like so:

 -- net widget down
        netwidgetdown = widget(
        {
                type = 'textbox',
                name = 'netwidgetdown',
                align = 'right'
        })
                wicked.register(netwidgetdown, wicked.widgets.net,
                '${wlan0 down}     ', nil, nil,3)

Notice the spaces between } and ' on the last line. That'll put empty space between this widget and whatever is to the right of it.

Offline

#7 2009-04-30 17:29:11

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: [solved] awesome - order of widgets in wibox

Thanks for this.

I saw this in ones rc.lua in the screenshot section, too. Didn't get this idea to add just some special characters. smile

Last edited by Barghest (2009-04-30 17:29:55)

Offline

Board footer

Powered by FluxBB