You are not logged in.
Pages: 1
Hello,
I'm using Awesome WM and I try to make my task bar look like this:
http://i1219.photobucket.com/albums/dd4 … -dirty.png
So when an application is launched, I only want the icon to be at the left of the taskbar. Does someone know how to perform this?
I tried with looking the function of awful and beautiful, trying to change this code in rc.lua
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({
theme = { width = 250 }
})
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))or these variables in theme.lua
tasklist_[bg|fg]_[focus|urgent] but nothing worked.
At this time, my taskbar look like this:
http://img15.hostingpics.net/pics/54206 … 8scrot.png
Thanks in advance ![]()
-- mod edit: converted images to links, please see forum guidelines on images --
Last edited by Trilby (2014-10-23 18:59:59)
Offline
There is a way to use gnome and awesome together.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
I don't want to use gnome, I just want to customize the taskbar
Offline
You should be able to achieve this by changing the tasklist creation.
According to the (unfortunately sometimes lacking) documentation (https://awesome.naquadah.org/doc/api/mo … klist.html),
you need to use a different update_function and base_widget.
Copy the code from the common.list_update function (/usr/share/awesome/lib/awful/widget/common.lua) to your own update function.
Change it so that it only displays the icon:
local widget_common = require("awful.widget.common")
function my_list_update(w, buttons, label, data, objects)
-- update the widgets, creating them if needed
w:reset()
for i, o in ipairs(objects) do
local cache = data[o]
local ib, tb, bgb, m, l
if cache then
ib = cache.ib
tb = cache.tb
bgb = cache.bgb
m = cache.m
else
ib = wibox.widget.imagebox()
tb = wibox.widget.textbox()
bgb = wibox.widget.background()
m = wibox.layout.margin(tb, 4, 4)
l = wibox.layout.fixed.horizontal()
-- All of this is added in a fixed widget
l:fill_space(true)
l:add(ib)
l:add(m)
-- And all of this gets a background
bgb:set_widget(l)
bgb:buttons(widget_common.create_buttons(buttons, o))
data[o] = {
ib = ib,
tb = tb,
bgb = bgb,
m = m
}
end
local text, bg, bg_image, icon = label(o)
bgb:set_bg(bg)
if type(bg_image) == "function" then
bg_image = bg_image(tb,o,m,objects,i)
end
bgb:set_bgimage(bg_image)
ib:set_image(icon)
w:add(bgb)
end
endCreate/change your tasklist (this goes into the for s = 1, screen.count() do - section):
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons, nil, my_list_update, wibox.layout.fixed.horizontal())Since you want the icons right beside the taglist, add it to the left layout:
left_layout:add(mytasklist[s])and remove/comment out the
layout:set_middle(mytasklist[s])part.
Offline
Pages: 1