Re: Big Ol' Awesome Config Thread!
I'd try making the wibar a little bigger.
CrunchBang Linux Forums » WM/DE Talk » Big Ol' Awesome Config Thread!
I'd try making the wibar a little bigger.
@Mahatman - the icons seem to scale along with the wibox, at least within any size limits I'm happy to live with ![]()
But thanks anyway...
Edit : some icons scale up with wibox size (nm-applet, autokey), others don't...
Last edited by TassieDevil (2011-08-30 10:39:30)
This may be useful to somebody.
Someone posted a question in this thread about binding multimedia keys in Openbox. Specifically if something like Ctrl-Scrollwheel on the desktop could be harnessed up to adjust volume up and down.
Naturally this got me thinking "now that would be awesome in Awesome!" So after a bit of research and experimentation here's a solution to do that with Pulseaudio :
First the command variables to control pulseaudio :
-- Pulseaudio CLI commands
pa_vol_up = "pacmd set-sink-volume 0 $(printf '0x%x' $(( $(pacmd dump|grep set-sink-volume|cut -f3 -d' ') + 0x500)) )"
pa_vol_dn = "pacmd set-sink-volume 0 $(printf '0x%x' $(( $(pacmd dump|grep set-sink-volume|cut -f3 -d' ') - 0x500)) )"
pa_mute = "pacmd set-sink-mute 0 $(if [ $(pacmd dump |grep set-sink-mute | cut -f 3 -d' ') = 'no' ]; then echo yes; else echo no; fi;)"* The hex value at the end is the volume increment. You can tweak to your liking..
Now we hook them up to Modkey + scroll up/down :
root.buttons
-- Audio Control
awful.button({ modkey }, 4, function()
awful.util.spawn_with_shell(pa_vol_up)
end),
awful.button({ modkey }, 5, function()
awful.util.spawn_with_shell(pa_vol_dn)
end),
awful.button({ modkey }, 6, function()
awful.util.spawn_with_shell(pa_mute)
end)And for good measure, the multimedia keys on my Logitech keyboard (Your keycodes may vary - use "xev" to get the appropriate codes) :
globalkeys
-- Audio Control
awful.key({ nil, }, "#" .. 123,
function()
awful.util.spawn_with_shell(pa_vol_up)
end),
awful.key({ nil, }, "#" .. 122,
function()
awful.util.spawn_with_shell(pa_vol_dn)
end),
awful.key({ nil, }, "#" .. 121,
function()
awful.util.spawn_with_shell(pa_mute)
end)I found the CLI commands here : http://ubuntuforums.org/showthread.php?t=987149
Hope this helps some #! Awesome users ![]()
Last edited by TassieDevil (2011-08-30 11:20:30)
@TassieDevil: huh. I'm not sure what to do about that then...I guess they're using svg's?
@xeNULL
Check out the posts by wlourf and SunJack on page 2 of this thread - they tell you exactly what to do for tint 2, including code you can pretty much plug straight in to rc.lua
I just tried this in my rc.lua
awful.screen.padding( screen[1], { bottom = 22} )It isn't creating any margin in the bottom of the screen. Apps are still overlapping the tint2 panel
@xeNULL : did you create a rule to tell Awesome that the panel type for Tint2 is "floating"? Check the entries from wlourf and SunJack...
@xeNULL :
I added a Tint2 to my screen to try and help you, but I cannot reproduce your problem. If I run a Tint2 panel at the bottom of my screen, maximised windows don't cover it! I didn't have to add any padding or rules to my config.
Are you sure you aren't getting "maximised" and "fullscreen" confused?
Maximised = Mod4 + m (does NOT cover my Tint2)
Fullscreen = Mod4 + f (DOES cover my Tint2, and top wibox)
Try both and see what happens...
Last edited by TassieDevil (2011-08-31 08:32:02)
Maybe this setting for tint2 can help
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 100% 20
panel_margin = 0 0
panel_padding = 0 0 0
panel_dock = 0
wm_menu = 0
panel_layer = bottom
panel_background_id = 1 Hopefully it's ok to ask for help in this thread.
I just installed Awesome and am playing it with it now. I have things like conky, nitrogen, and the nm applet autostarting. But I'm having a lot of trouble this lua language, and getting key bindings to work.
For example, what and where would I input into the .rc.lua for Thunar mapped to Super+f?
One more thing, how are people getting things like File, Browser, etc to appear in the toolbar?
Thanks for any help.
@xeNULL :
I added a Tint2 to my screen to try and help you, but I cannot reproduce your problem. If I run a Tint2 panel at the bottom of my screen, maximised windows don't cover it! I didn't have to add any padding or rules to my config.
Are you sure you aren't getting "maximised" and "fullscreen" confused?
Maximised = Mod4 + m (does NOT cover my Tint2)
Fullscreen = Mod4 + f (DOES cover my Tint2, and top wibox)
Try both and see what happens...
I have tried both.
Maximized - Doesnt cover the awesome toolbar but does cover the tint2 up
fullscreen - just does fullscreen and covers everything
@suNjAck I tried your panel settings. They didn't make any change but thanks for trying to help =]
I know this one! ![]()
strut_policy = follow_size/minimum/none : STRUTs are used by the window manager to decide the size of maximized windows. Should the 'maximized windows' follow tint2 size (follow_size) or use the minimum size (minimum), or use the screen size (none). minimum option is interresting when used with autohide_height parameter.
that's from the tint2 configuration guide. it's set to none right now, if maximized screens are going over it. Try follow_size.
Last edited by thevdude (2011-09-03 12:24:28)
Hello !
Some widgets made with cairo for this wonderful WM :

The script is on deviantArt : http://my.deviantart.com/messages/#/d4dpete
Cool that there so many awesome users
lots of useful info
Last edited by Ganja (2011-10-23 23:15:07)
i have some problem with the mpd widget
i got it showing but it only says ${Title}, ${Artist}"
how do i get it to actually show the info
require("awful")
require("awful.autofocus")
require("awful.rules")
require("beautiful")
require("naughty")
require("vicious")
require("scratch")
beautiful.init("/home/ganja/.config/awesome/themes/custom/theme.lua")
terminal = "urxvtc"
editor = "nano"
browser = "chromium-browser"
filemanager = "thunar"
editor_cmd = terminal .. " -e " .. editor
modkey = "Mod4"
layouts =
{
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier
}
-- }}}
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {
names = { "term", "www", "files", "misc" },
layout = { layouts[2], layouts[2], layouts[2], layouts[2] }
}
for s = 1, screen.count() do
tags[s] = awful.tag(tags.names, s, tags.layout)
end
-- MPD Widget
mpdicon = widget({ type = "imagebox" })
mpdicon.image = image("/home/ganja/.config/awesome/icons/mpd.png")
-- Initialize widget
mpdwidget = widget({ type = "textbox" })
-- Register Widget
vicious.register(mpdwidget, vicious.widgets.mpd, "<span color='#BF5C5C'> ♪</span> ${Title}, ${Artist}", 13)
-- Separator
separator = widget({ type = "textbox" })
separator.text = " :: "
-- Memory widget
memicon = widget({ type = "imagebox" })
memicon.image = image("/home/ganja/.config/awesome/icons/mem.png")
memwidget = widget({ type = "textbox" })
vicious.register(memwidget, vicious.widgets.mem, "mem: $1% ($2MB/$3MB)", 5)
-- CPU Widget
cpuicon = widget({ type = "imagebox" })
cpuicon.image = image("/home/ganja/.config/awesome/icons/cpu.png")
cpuwidget = widget({ type = "textbox" })
vicious.register(cpuwidget, vicious.widgets.cpu, "cpu: $1%", 2)
-- Network Traffic Widget
neticon = widget({ type = "imagebox" })
neticon.image = image( "/home/ganja/.config/awesome/icons/net-wifi4.png" )
netdownicon = widget({ type = "imagebox" })
netdownicon.image = image("/home/ganja/.config/awesome/icons/down.png")
netdownwidget = widget({type = "textbox" })
vicious.register(netdownwidget, vicious.widgets.net, "${eth0 down_kb}", 1)
netupicon = widget({ type = "imagebox" })
netupicon.image = image("/home/ganja/.config/awesome/icons/up.png")
netupwidget = widget({ type = "textbox" })
vicious.register(netupwidget, vicious.widgets.net, "${eth0 up_kb}", 1)
--
mytextclock = awful.widget.textclock({ align = "right" })
mysystray = widget({ type = "systray" })
mywibox = {}
mybottomwibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
)
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = {
{
mytaglist[s],
separator,
mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
mytextclock,
separator,
layout = awful.widget.layout.horizontal.rightleft
}
mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s})
mybottomwibox[s].widgets =
{
{
mysystray,
mpdwidget,
mpdicon,
layout = awful.widget.layout.horizontal.rightleft
},
memicon,
memwidget,
separator,
cpuicon,
cpuwidget,
separator,
neticon,
netdownicon,
netdownwidget,
netupicon,
netupwidget,
layout = awful.widget.layout.horizontal.leftright
}
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)
))
-- }}}
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "å", function () mymainmenu:show({keygrabber=true}) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Standard program
awful.key({ modkey, }, "s", function () scratch.pad.toggle() end),
awful.key({ modkey, }, "x", function () awful.util.spawn(terminal) end),
awful.key({ modkey, }, "f", function () awful.util.spawn(browser) end),
awful.key({ modkey, }, "w", function () awful.util.spawn(filemanager) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
awful.key({ modkey }, "ä",
function ()
awful.prompt.run({ prompt = "Run Lua code: " },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
end)
)
clientkeys = awful.util.table.join(
--awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, }, "d", function (c) scratch.pad.set(c, 0.60, 0.60, true) end),
awful.key({ modkey, }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end)
)
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(9, math.max(#tags[s], keynumber));
end
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewtoggle(tags[screen][i])
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.movetotag(tags[client.focus.screen][i])
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.toggletag(tags[client.focus.screen][i])
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "Gimp" },
properties = { floating = true } },
{ rule = { class = "Chromium" },
properties = { tag = tags[1][2] } },
{ rule = { class = "Wine" },
properties = { floating = true } },
}
-- }}}
client.add_signal("manage", function (c, startup)
-- Enable sloppy focus
c:add_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)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
end)
client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}@ganja, strange behaviour, I've copied the widget below and it works fine (with awesome 3.4.6-1) :
-- Initialize widget
mpdwidget = widget({ type = "textbox" })
-- Register Widget
vicious.register(mpdwidget, vicious.widgets.mpd, "<span color='#BF5C5C'> ♪</span> ${Title}, ${Artist}", 13)@ganja, strange behaviour, I've copied the widget below and it works fine (with awesome 3.4.6-1) :
-- Initialize widget mpdwidget = widget({ type = "textbox" }) -- Register Widget vicious.register(mpdwidget, vicious.widgets.mpd, "<span color='#BF5C5C'> ♪</span> ${Title}, ${Artist}", 13)
well thats strange, ah well i guess ill just have to try more
Last edited by Ganja (2011-10-25 15:09:03)
ignore this
Last edited by Ganja (2011-10-25 15:08:21)
or is there anything i have to do in mpd.conf ?
Maybe you've change something in your mpd; Vicious reads this adress to retrieve the informations : telnet://localhost:6600 with no password. I don't know how to change the defaults settings.
With this script, if everything works fine, the output should be the informations of mpd ;
#!/usr/bin/lua
local echo = "echo 'password \"\"\nstatus\ncurrentsong\nclose'"
local mpdh = "telnet://localhost:6600"
local f = io.popen(echo.." | curl --connect-timeout 1 -fsm 3 "..mpdh)
print (f)
for line in f:lines() do
print (line)
end(it's a part of the mpd.lua widget)
Last edited by wlourf (2011-10-26 15:16:58)
Hello,
A little script for people addicted to this forum
It displays in a pop-up the last messages in the forum :
--script for awesome showing the last messages on crunchbang forums
--in a popup window (naughty.notify)
--by wlourf 30 octobre 2011
--path to the scrunchbang icon
local crunch_icon="/home/wlourf/.config/awesome/crunch-white.png"
--interval = check every X seconds
local interval=600
--time_out = time to display the popup
local time_out=30
--END OF PARAMETERS
local t_msg_old={}
function check_crunch_forum_en()
local f = io.popen("curl -s http://crunchbanglinux.org/forums/search/recent/")
local return_text=""
--put all messages in table t_msg_new
local t_msg_new={}
for line in f:lines() do
if line:find("h3 class=\"hn") ~= nil then
title = line:match("/\">(.-)</a")
end
if line:find("lastpost") ~= nil then
url=line:match("href=\"(.-)\"")
dt=line:match("%d\">(.-)<")
user=line:match("by%s(.-)<")
end
if title ~=nil and url ~= nil and user ~= nil and dt ~=nil then
table.insert(t_msg_new, {url,title,user,dt})
title=nil
user=nil
dt=nil
url=nil
end
end
--first call, copy table t_msg_new in t_msg_old
--is there a better way to copy the table ?
if #t_msg_old == 0 then
for i=1,#t_msg_new do
t_msg_old[i] = {t_msg_new[i][1],t_msg_new[i][2],t_msg_new[i][3],t_msg_new[i][4]}
end
else
--compare the two tables to find new elements
if t_msg_old[1][1] ~= t_msg_new[1][1] then
for i=1,#t_msg_new do
t_msg_new[i][5]=true
for j=1,#t_msg_old do
if t_msg_old[j][1] == t_msg_new[i][1] then
t_msg_new[i][5]=false
break
end
end
--text to display
if t_msg_new[i][5] then
return_text = return_text .. t_msg_new[i][2] .. " (" .. t_msg_new[i][3] .. " " .. t_msg_new[i][4] .. ")\n"
end
end
--copy new table into old table
for i=1,#t_msg_new do
t_msg_old[i] = {t_msg_new[i][1],t_msg_new[i][2],t_msg_new[i][3],t_msg_new[i][4]}
end
end
end
if return_text ~="" then
runcrunch = naughty.notify({title = "crunchbang " .. os.date("%H:%M:%S"), text = return_text , timeout = time_out, icon=crunch_icon,
run = function ()
naughty.destroy(runcrunch)
awful.util.spawn("x-www-browser http://crunchbanglinux.org/forums/search/recent/")
end
})
end
end
--init at awesome's start
check_crunch_forum_en()
--timer
crunch2_timer = timer({timeout = interval})
crunch2_timer:add_signal("timeout", function() check_crunch_forum_en() end)
crunch2_timer:start() And the output :

I would like to open a browser when I click on the pop-up, is it possible ---> ok fixed
Edit : little bug on the capture above (same date and poster for the 2 first posts) corrected
Last edited by wlourf (2011-11-01 10:07:43)
Hello !
Some widgets made with cairo for this wonderful WM :
The script is on deviantArt : http://my.deviantart.com/messages/#/d4dpete
Holy Sh*t!
Holy Sh*t!
Hmm, thank you ;-)
The main features of theses scripts is that the awesome icon and the layout icons are drawn when awesome starts with colours defined in the theme.lua file, so the panel is always homogeneous and ... nice ;-)
I added two widgets last week : a vertical bar and a (single) horizontal bar :

and made some improvments (autosize for the mpd widget and for the text widget, autoscale for the y axis for the graph, alarms ... ).
The script is here : http://wlourf.deviantart.com/gallery/#/d4g6wz0
I post the README, if someone is interested to give this script a try ;-)
Some widgets for awesome wm v1.1
wlourf 14.11.2011Two scripts : icons.lua and cairowidgets.lua.
The main feature of theses scripts is that the awesome icon and the layout icons are drawn
when awesome starts with colours defined in the theme.lua fileIMPORTANT : the file icons.lua creates icons in the theme directory.
Use with care because it writes icons files without warning.
Icons created are :
- theme.awesome_icon
- theme.menu_submenu_icon
- theme.layout_tileleft
- theme.layout_tile
- theme.layout_tiletop
- theme.layout_tilebottom
- theme.layout_fairv
- theme.layout_fairh
- theme.layout_floating
- theme.layout_magnifier
- theme.layout_max
- theme.layout_fullscreen
- theme.layout_spiral
- theme.layout_dwindle
How to use it :1 . Define default colors and other stuff in your theme.lua, for example
theme.colour_bg={{0,0xC6C9CD,0.5}, {0.5,0xE1E4E8,1} , {1,0xC6C9CD,0.5}}
theme.colour_fg={{0,0x000000,0.5}, {0.5,0x000000,1} , {1,0x000000,0.5}}
theme.colour_alarm={{0,0x8383FF,1},{0.5,0x0000FF,1},{1,0x8583FF,1}}theme.panel_height=24
theme.black_bg=true
theme.panel_font="clean"
theme.panel_italic=false
theme.panel_bold=false
theme.panel_font_size=10theme.panel_thickness = 2 --line thickness in fact
If thoses parameters are missing, default values are used.
2. in the rc.lua, load the two files with
require ("icons")
local cw = require ("cairowidgets")3. In the rc.lua, create the widgets you need with one of theses :
- cairo_battery
- cairo_circle
- cairo_double_hbar
- cairo_gradient (I use it to end the bar)
- cairo_graph --Needs a table
- cairo_hbar
- cairo_mpd --requires vicious
- cairo_space
- cairo_textTo know all the available parameters, look in the cairowidgets.lua file
For example, to display the temperature of the cpu in a circle, I use :
--{{{ CPU TEMP ROUND IMAGE
local function set_cpu_temp_image()
local name="/sys/class/hwmon/hwmon1/device/temp1_input"
return cw.cairo_circle({text="Tcpu", font_weight="bold", value=cw.active_cpu_temp(name)})
end
tcpu_widget = widget({ type = "imagebox", name = "tcpu_widget" })
tcpu_widget.image = set_cpu_temp_image()
tcpu_widget_timer = timer({timeout = 10})
tcpu_widget_timer:add_signal("timeout", function() tcpu_widget.image = set_cpu_temp_image() end)
tcpu_widget_timer:start()
-- }}}And don't forget to add the widgets to the wibox
Any feedback is welcome !
http://wlourf.deviantart.com 14.11.2011
I wanted to sort of return my Awesome to the 'traditional' layout, with a clock in the bottom right corner, icons next to it, with the tasklist in the remaining space.
All the colors are based on the Solarized palette, and I tried to find a wallpaper that would go along with it, this is the best I've found.
It took me a while to get the hang of the Lua API, but I finally managed to get something I'm happy with that is "my own".
Still a work in progress, as all things in my life seem to be.
Edit: Couple changes, changed link to github.
Last edited by DanielFGray (2012-02-26 19:59:26)
Depends I guess h8uthemost ...
Can try to help a bit though, am assuming you have rc.lua copied over somewhere in your /home ? If ya do and just want to know which section of the file to add custom key shortcuts to launch thunar ... lemme check mine real quick. Ok only 1/4 know anything about this sucker yet. cannot remember if this is commented out originally in the default rc.lua if it is then uncomment it so Mod4 (aka: Super) is the default modkey. These are apparently a comment in lua > -- two dashes I mean, so if the line below in your rc.lua doesn't already look like that one, uncomment it so that "Mod4" is working.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
Afterwards scrolldown till you find this section.
-- Standard program
Then add summin like the following, these are some keyboard shortcuts I slapped into awesome so far, just add em to the bottom of the list in that section of the file or change whichever ya like that are already there as defaults. Well these are some examples, ya can see in mine, thunar launches when I hit F3 ... I got rid of the modkey as you can see below, cuz am lazy and like launching stuff with 1 F key instead.
Definitely working for me with no problems in Awesome version 3.4.6 .
awful.key({}, "F3", function() awful.util.spawn("thunar") end),
awful.key({}, "F5", function() awful.util.spawn("iceweasel") end),
awful.key({}, "F6", function() awful.util.spawn("leafpad") end),
awful.key({}, "F4", function() awful.util.spawn("gmrun") end),Yours would look like this for "Super + f" to launch thunar.
awful.key({ modkey, }, "f", function() awful.util.spawn("thunar") end),Other one can't really help with, googling and making this stuff up as I go along. Would keep a working backup of your rc.lua as you go. Something goes amiss copy/paste ... restart and you're back to default. Of course after editing the rc.lua file, you have to save the thing and restart awesome for changes to go into effect. Believe I only installed two packages from the repos for awesome, awesome and awesome-extra , dont quote me but could swear I had a toolbar by default and apps show up fine in the sucker. May've had to uncomment something to get it to fire up, if I did ... Can't remember what. I like awesome so far ... Takes some getting used to for sure ...
vll !
PS, Oops ... and thanks to all the folks for sharing some of the awesome tricks they've learned, TY ladies n gents. ![]()
More babbling, although not sure why ... People here are wayyyyyy ahead of me when it comes to awesome and configing the thing. Am pretty sure this has also been said here already, I really should dig through this thread. Probably one of the better awesome info resources someone could find. Finally got around to messing with the default popup menu in awesome and going to post what I found in plain english for posterity or whatever.
Awesome version 3.4.6 setting up the default menu to be less annoying.
You go to your /home/username and in thunar>View> then select "Show hidden files" and in .config folder, lo and behold there's your awesome folder, ( edit: O course if you made a dir and copied the default over ... link about it. Open that sucker and open the rc.lua in your favoritist text editor, scrolldown till you see the following section of the file and here are the changes I made to customize the thing.
mymainmenu = awful.menu({ items = { { "Terminal", terminal },
{ "File Manager", "thunar" },
{ "Browser", "iceweasel" },
{ "Run Program", "gmrun" },
{ "Text Editor", "gedit" },
{ "Scribus", "scribus" },
{ "Gimp", "gimp" },
{ "Awesome", myawesomemenu, beautiful.awesome_icon }
}
})So just in case, gives folks a good example to go by. Hardly ever use a rightclick menu, but if am going to have it, may as well have useful stuff and things I want in it, shrugs. The first one is what will show up in the menu, the second is which app you want to launch when you leftclick on a menu item.
![]()
Updated babble, in case 2Many comes looking for info or somebody else in the #! crowd wants to give awesome wm a tryout. Snatched this from Anonymous, the prolific #!er seen in the forums. Not sure if he said it in this thread tho, n will include it here in case. Adding a title bar to windows in the awesome wm. Does make life a tad bit easier, cuz gives you close and maximize buttons for windows. Plus you can drag the suckers, by left clicking on the titlebar, w/o having to hold down the super ( aka: windows key) and left clicking on em to do it. People probably already know in awesome you can resize a window by holding down the Super key, then right click mouse button and dragging it to the size you want it to be.
Scroll through the rc.lua file for the awesome window manager, until you find this, it's commented out by default with two of these puppies --. Uncomment it, remove the two dashes from in front of the line, save the file, restart awesome and you've got regular title bars for windows and apps/etc.
-- awful.titlebar.add(c, { modkey = modkey })Edit: Yep more babbling am sure this and much more has already been better covered by others here. Just trying to consolidate things a bit. Some babbling about cosmetics with awesome wm.
* Like things old fashioned meself, my preference is a single panel running along the bottom of the screen for an OS. With awesome wm, default the panel was running along the top. Changing that in awesome was really easy, just opened the rc.lua config file for the sucker in my fav text editor and did a search for the word top ... Didn't take long to find the line for the panel or taskbar, then just changed top to bottom and restarted the sucker. To get my panel on the bottom of the screen where I'd wanted it.
* Desktop background thoughts, think all 3 of the default themes backgrounds that came with awesome are butt ugly. Should be no problem changing though, the path to the theme folder is easy to find in the rc.lua file of awesome, will tell ya right where to go to find your theme folder, includin the background.png. Don't see why someone can't just open thunar as root, slap whatever background image they want there, name it the same thing as the png the default theme background image is called and delete the one that came with the theme.
I put up with an eye sore slate gray background for awhile, got fed up, used one of the default theme's and instead of substituting a new png image to replace the uglish default one. I just opted to open that background.png in gimp and spray painted it black .. #! style. ![]()
Last edited by CBizgreat! (2012-03-12 05:13:57)
Posts [ 226 to 250 of 255 ]
CrunchBang Linux Forums » WM/DE Talk » Big Ol' Awesome Config Thread!
Forums powered by PunBB. Hosted by Linode.
Copyright © CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.