You are not logged in.

#1 2019-02-14 16:40:25

bedtime
Member
Registered: 2019-02-12
Posts: 68

Awesome: how to disable taskbar icons? And adding status line...

I've been able to disable icons in the application window which are near the title, but the taskbar icons remain, and they look quite out of place. Note the VLC icon below:
pic1resized.png

Here is my rc.lua (relevant lines of code only):

awful.screen.connect_for_each_screen(function(s)
    -- Wallpaper

    -- Each screen has its own tag table.
    awful.tag({ "I", "II", "III" }, s, awful.layout.layouts[1])

    -- Create a promptbox for each screen
    s.mypromptbox = awful.widget.prompt()
    -- Create an imagebox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    s.mylayoutbox = awful.widget.layoutbox(s)
    s.mylayoutbox:buttons(awful.util.table.join(
                           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)))
    -- Create a taglist widget
    s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)

    -- Create a tasklist widget
    s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)

    -- Create the wibox
    s.mywibox = awful.wibar({ position = "top", screen = s })


  -- 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(),
            mytextclock,
	    --rootwidget,
            s.mylayoutbox,
        },
    }
end)
-- }}}

-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}


-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
    -- buttons for the titlebar
    local buttons = awful.util.table.join(
        awful.button({ }, 1, function()
            client.focus = c
            c:raise()
            awful.mouse.client.move(c)
        end),
        awful.button({ }, 3, function()
            client.focus = c
            c:raise()
            awful.mouse.client.resize(c)
        end)
    )

    awful.titlebar(c) : setup {
        { -- Left
            --awful.titlebar.widget.iconwidget(c),
            buttons = buttons,
            layout  = wibox.layout.fixed.horizontal
        },
        { -- Middle
            { -- Title
                align  = "center",
                widget = awful.titlebar.widget.titlewidget(c)
            },
            buttons = buttons,
            layout  = wibox.layout.flex.horizontal
        },
        { -- Right
            awful.titlebar.widget.floatingbutton (c),
            awful.titlebar.widget.maximizedbutton(c),
            awful.titlebar.widget.stickybutton   (c),
            awful.titlebar.widget.ontopbutton    (c),
            awful.titlebar.widget.closebutton    (c),
            layout = wibox.layout.fixed.horizontal()
        },
        layout = wibox.layout.align.horizontal
    }
end)

-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
    if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
        and awful.client.focus.filter(c) then
        client.focus = c
    end
end)

client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}

...


Question #2:

Also, I'd also like to be able to run my own text through the status bar at the top (near the clock). I've had this working before, but don't remember how I did it.

Currently, I have:

rc.lua (only relevant lines shown):

-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget


-- {{{ Wibar
-- Create a textclock widget
--mytextclock = wibox.widget.textclock()
mytextclock = wibox.widget.textclock(" %a %b %d %H.%M.%S ", 1)


hellowibox = "Hello Wibox!"
rootwidget  = wibox.widget {     
        {
            markup        = hellowibox,
            widget        = wibox.widget.textbox
        },
        bg     = '#000000',
	fg	= '#00ffff',	--cyan
        layout = wibox.container.background
    }


awful.screen.connect_for_each_screen(function(s)
    -- Wallpaper

    -- Each screen has its own tag table.
    awful.tag({ "I", "II", "III" }, s, awful.layout.layouts[1])

    -- Create a promptbox for each screen
    s.mypromptbox = awful.widget.prompt()
    -- Create an imagebox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    s.mylayoutbox = awful.widget.layoutbox(s)
    s.mylayoutbox:buttons(awful.util.table.join(
                           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)))
    -- Create a taglist widget
    s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)

    -- Create a tasklist widget
    s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)

    -- Create the wibox
    s.mywibox = awful.wibar({ position = "top", screen = s })


  -- 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(),
            mytextclock,
	    rootwidget,-- My status widget!
            s.mylayoutbox,
        },
    }
end)
-- }}}

This code causes 'Hello Wibox!' to be shown to the right of the clock (NOT shown in pic above), but I've yet to be able to update and change it. I've tried:

echo -e 'hellowidget = "new text"' | awesome-client

This command seems to be accepted without error, but the widget status line remains the same. I also tried the suggestion in the Arch Linux wiki and was also a no-go:

Passing content to widgets with awesome-client
You can easily send text to an awesome widget. Just create a new widget:

mywidget = widget({ type = "textbox", name = "mywidget" })
mywidget.text = "initial text"

To update the text from an external source, use awesome-client:
echo -e 'mywidget.text = "new text"' | awesome-client

Do not forget to add the widget to your wibox.

...

The widget didn't appear in the status line. Not sure if I added the widget correctly, though, as I could not find an example to online of how to do it. I just tried copying the other widget styles and that didn't work for me.

Ideas?

Offline

#2 2019-02-16 17:55:31

bedtime
Member
Registered: 2019-02-12
Posts: 68

Re: Awesome: how to disable taskbar icons? And adding status line...

This VLC icon thing is driving me mad. yikes

I tried doing a search for *vlc* and deleted every icon I came across. Then I commented out the icon in the vlc .desktop file:

/usr/share/applications/vlc.desktop:

#Icon=vlc
Icon=

THE ICON IS STILL THERE!!! yikes

Then I read online that VLC actually hardcoded their icon into the program:
https://bugs.launchpad.net/ubuntu/+sour … bug/530797

There must be a way to get rid of it or disable in Awesome?

Offline

#3 2019-02-16 17:57:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Awesome: how to disable taskbar icons? And adding status line...

Just use mpv...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2019-02-17 17:01:35

bedtime
Member
Registered: 2019-02-12
Posts: 68

Re: Awesome: how to disable taskbar icons? And adding status line...

jasonwryan wrote:

Just use mpv...

I'd prefer to use VLC for now, but mpv is a great alternative.

Offline

Board footer

Powered by FluxBB