Conky-cli - awesome-client = no go?

So, I've recently switched to Awesome from Xmonad (yes, it's MUCH easier to configure, unless you know haskell of course). Everything has gone fairly well except that I can't get conky-cli to work with the awesome-client statusbar.  I'm running the patched version of conky and I've followed the tutorials on the awesome website, but for whatever reason all that appears in the statusbar are dashes used as placeholders for the textboxes. I've tried this using the non-patched conky-cli, also unsuccessfully.
I'm running awesome-git, which appears to be v2.3.rc1.25.g96fe2ec (Productivity Breaker).  The following are my sample configs (I've disabled the other conky stats until I know this is working):
[thayer@dublin:~] $ cat .conkyrc
background no
no_buffers yes
out_to_console yes
update_interval 1
uppercase no
use_spacer none
total_run_times 0
TEXT
0 widget_tell clock ${time %a %b %d %I:%M%P}
Relevant portion of .awesomerc:
statusbar bottom
position = bottom
width = 0
height = 0
textbox clock { align = "right" text = "-" }
If I run conky on its own, it spits out the expected text:
[thayer@dublin:~] $ conky
0 widget_tell clock Wed Apr 16 08:04pm
And my .xinitrc file:
conky | awesome-client &
urxvt &
exec awesome
Last edited by thayer (2008-04-17 03:13:54)

omega_0815 wrote:
That should get conky to work, if it doesn't work try starting conky without piping to awesome-client in .xinitrc.
I have conky running here with awesome-git for the same reasons you mentioned, but I will take a look at amazing this weekend.
Hope that solves your issue.
Thanks omega, I had actually tried that syntax before, but it didn't work for me.   BUT... since you mentioned that it DOES work for you, I decided to poke around a bit more and I figured out that if I add 'text' as well as the statusbar name it works fine:
0 widget_tell bottom mpd text $mpd_smart
0 widget_tell bottom spacer1 text ::
0 widget_tell bottom cpuload text ${cpu cpu1}% / ${cpu cpu2}% ${loadavg 1} ${loadavg 2 3}
0 widget_tell bottom spacer2 text ::
0 widget_tell bottom cputemp text ${i8k_cpu_temp}c ${freq_g 1}/${freq_g 2}GHz
0 widget_tell bottom spacer3 text ::
0 widget_tell bottom memory text $memperc% ($mem)
0 widget_tell bottom spacer4 text ::
0 widget_tell bottom power text ${if_empty ${exec awk '{print $2}' /proc/acpi/ac_adapter/AC/state | grep 'on-line'}}${else}${endif}$battery $battery_time
0 widget_tell bottom spacer5 text ::
0 widget_tell bottom network text ${if_empty ${exec ifconfig wlan0 | grep 'inet addr:'}}${downspeed eth0}K/s ${upspeed eth0}K/s${else}${exec iwconfig wlan0 | grep 'Signal level' | cut -d= -f3 | awk '{print 100+$1 "%"}'} ${exec iwgetid | cut -d\" -f2 | awk '{print $1}'} ${downspeed wlan0}K/s ${upspeed wlan0}K/s${endif}
0 widget_tell bottom spacer6 text ::
0 widget_tell bottom clock text ${time %a %b %d %I:%M%P}

Similar Messages

  • Can't get conky-cli and bash scripts to both display in dwm statusbar!

    I'm trying to configure my dwm status bar to display some simple information using conky-cli and bash scripts. At first I tried just letting conky run the bash scripts (for network and volume state), but this increased my cpu usage by about 5%, which is significant considering I normally have 1-3% usage when idle. Also, I wanted to keep conky because it makes the display of certain information easy, such as cpu & RAM usage.
    The problem is I'm having trouble getting both to display side by side. Here are the relevant parts of my .xinitrc:
    network(){
    iwconfig wlan0 2>&1 | grep -q no\ wireless\ extensions\. && {
    echo wired
    exit 0
    essid=`iwconfig wlan0 | awk -F '"' '/ESSID/ {print $2}'`
    stngth=`iwconfig wlan0 | awk -F '=' '/Quality/ {print $2}' | cut -d '/' -f 1`
    bars=`expr $stngth / 10`
    case $bars in
    0) bar='[-------]' ;;
    1) bar='[#------]' ;;
    2) bar='[##-----]' ;;
    3) bar='[###----]' ;;
    4) bar='[####---]' ;;
    5) bar='[#####--]' ;;
    6) bar='[######-]' ;;
    7) bar='[#######]' ;;
    *) bar='[--!!!--]' ;;
    esac
    echo $essid$bar
    exit 0
    volume(){
    vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
    echo Vol: $vol%
    exit 0
    conky | while true; read line; do xsetroot -name "`$line` `volume` `network` `date '+%a %m-%d-%Y %I:%M%p'`"; done &
    exec dwm
    (let me know if it would help to post any other files)
    For some reason when I run this I only get the network/volume scripts and date running, updating every second (I think). The conky line just doesn't show up. I don't know what could be wrong, since I didn't see any error messages.
    An even better solution would be to just have shell scripts to display CPU and MEM usage. I have a dual-core cpu, cpu0 and cpu1. I'd like to see both percentages if possible, or at least a percentage that is an accurate average of the two or something. In conky-cli I have something that shows:
    cpu0/1: xx% xx%
    Also, seeing RAM usage would help a lot. In conky it shows:
    mem: xx% (xxxMB)
    These are the ways I would like to have bash scripts show them, if possible, but I have zero skill in bash programming. I made this an option in case it's easier/cleaner/less resource hungry than a conky solution. Personally, if they're about the same in these aspects, I would prefer something with conky and the shell scripts because conky is so extensible, yet it's only flaw is executing scripts with minimal resource usage.
    Help?

    Thanks. I was thinking of using load average to save a few characters, but I didn't quite understand the numbers. I'll try that once I get to my Linux box, but could you please explain or post a link to something that explains load average (what's low, high, normal, etc.)?
    EDIT: I found a website that explains loadavg. I now have my dwm status bar displaying it perfectly (yay!). Now I just need to add a few more things like battery status, etc. and I might be done. I'll probably post here if I have more questions, though.
    Thanks for your help!
    Last edited by Allamgir (2009-07-18 14:41:11)

  • [SOLVED] dwm + dzen2 + conky-cli misconfigured

    I have been trying to pipe conky status to dzen2 and it is doing my head in.
    My .xinitrc
    #!/bin/sh
    # ~/.xinitrc
    setxkbmap -option terminate:ctrl_alt_bksp &
    eval `cat ~/.fehbg` &
    numlockx &
    xscreensaver -no-splash &
    # Dzen & conky
    conky | dzen2 -fg '#dcdcdc' -bg '#3f3f3f' -ta r -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' &
    # Start dwm
    exec ck-launch-session ~/Scripts/dwm-start
    .conkyrc
    background no
    out_to_console yes
    update_interval 2
    total_run_times 0
    use_spacer none
    double_buffer yes
    TEXT
    ${if_existing /sys/class/power_supply/BAT0/present}^fg(#999999)BAT^fg()${battery_percent}%${else}AC${endif} * CPU ${cpu cpu1}% RAM ${memperc}% * / ${fs_used_perc /}% /home ${fs_used_perc /home}% * PKG ${execpi 900 ~/Scripts/pacman-up.pl} * ${if_existing /proc/net/route ra0}Down ${downspeedf ra0}K/s Up ${upspeedf ra0}K/s ${else} ${if_existing /proc/net/route eth0} Down ${downspeedf ra0}K/s Up ${upspeedf ra0}K/s${endif} ${endif}* ${time %I:%M%P}
    Start dwm script
    conky | while read line; do
    xsetroot -name "$line";
    done | while true; do
    dwm > /dev/null; done;
    Could anyone point me at what I am doing wrong? I have tried following examples in the forums, including this one and this one -- but I either end up with dwm 5.7.2 in the corner, or conky prints out the ^fg etc...
    Any help would be appreciated at this point...
    Last edited by jasonwryan (2009-11-20 06:11:51)

    Thanks for the suggestions Skanky. The broken line in conky was a copy/paste error into the browser - it is a single line conky (I've edited the OP to reflect that).
    I think it is a problem with the way conky-cli and dzen work together. If I run:
    echo "testing" | dzen2 -fg '#dcdcdc' -bg '#3f3f3f' -ta r -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -p
    it prints as expected.
    Similarly, if I comment the conky | dzen2 line in .xinintrc and just run conky-cli from the start script it works...
    Trying to get then to work together, however, is another matter.
    /edit
    Some progress: it seems that it is being drawn - if I Mod-Shift-q the dwm status bar briefly disappears and I can see conky momentarily. I tried starting conky | dzen2 after dwm but that didn't work.
    I have also added some options, which seem to have helped, my .xinintrc entry now looks like:
    conky | dzen2 -x '500' -e '' -fg '#dcdcdc' -bg '#3f3f3f' -ta r -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -p &
    Last edited by jasonwryan (2009-11-19 16:57:13)

  • 2 Factor Authentication with a CLI XMPP client

    So, I've been in the process of attempting to completely migrating from GUI to CLI and have been looking for a way to access my Facebook messenger from a CLI XMPP client. However, I have 2 Factor authentication setup on my Facebook and cannot find any way of getting around that. The XMPP client I've been trying to use is mcabber. Could someone either show me how to use mcabber and 2 factor auth, or point me in the right direction to another client that supports it. Thanks guys!

    If you want to use custom authentication plugin then OAM provides a way to create a custom authentication module and you can orchestrate your steps based on your conditions. See http://docs.oracle.com/cd/E21764_01/doc.1111/e12491/authnapi.htm for more details.
    Hope this helps,
    Sagar

  • [solved] Cannot compile conky-cli (compiler cannot create executables)

    I'm having what seems to be a pretty common problem, but I cannot solve it. I've searched google and the forums, and I'm sure the answer is very easy, but I'm just stuck.
    ==> Starting build()...
    checking for a BSD-compatible install... /bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output file name...
    configure: error: in `/tmp/yaourt-tmp-heleos/aur-conky-cli/conky-cli/src/conky-1.7.1.1':
    configure: error: C compiler cannot create executables
    See `config.log' for more details.
    make: *** No targets specified and no makefile found. Stop.
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build conky-cli package.
    If someone could point me in the right direction that would be great
    Solved my own problem! Looks like it was a change I made to my makepkg.conf.... Does anyone have a CFLAGS that's safe for an i7?
    Last edited by heleos (2009-08-25 01:07:24)

    Do you (or someone else) have a pkgbuild that you would like to share? I'm in need of the ecj compiler, but didn't find a pkgbuild in aur (unlessed I missed it somehow)
    Kind regards,
    Simon

  • Dzen2 and conky-cli issue

    Hello I'm trying to set up dzen2 with conky-cli, here's my configs etc:
    /bin/dzconky:
    FG='#aaaaaa'
    BG='#1a1a1a'
    FONT='-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*'
    conky | dzen2 -e -h '16' -w '600' -ta r -fg $FG -bg $BG -fn $FONT
    .conkyrc:
    background no
    out_to_console yes
    update_interval 1.0
    total_run_times 0
    use_spacer no
    TEXT
    ${time "%A %-d. %B %H:%M}
    And when i try to run dzconky, this appears:
    [roberth@Magda ~]$ dzconky
    usage: dzen2 [-v] [-p [seconds]] [-m [v|h]] [-ta <l|c|r>] [-sa <l|c|r>]
    [-x <pixel>] [-y <pixel>] [-w <pixel>] [-tw <pixel>] [-u]
    [-e <string>] [-l <lines>] [-fn <font>] [-bg <color>] [-fg <color>]
    [roberth@Magda ~]$
    Where is the error, and by the way, how do I get the same as xft-sans-10 with dzen2?
    Last edited by Roberth (2007-12-16 20:49:02)

    thayer wrote:
    I believe you must add the path to terminus in your xorg.conf... at least that's what I had to do:
    Section "Files"
    FontPath "/usr/share/fonts/local" # added for Terminus
    EndSection
    Thank you that helped.

  • Preventing conky-cli from changing size in dwm

    Having conky-cli in the status bar suits my needs perfectly, but there's one annoying problem. When the amount of numbers are changing, the width of the conky-bar changes. This makes the width of the windowtitle to the left of it change continuously as well.
    How can i make conky-cli having a fixed width?
    Last edited by schnitz (2009-09-12 00:19:21)

    Have you tried using the
    maximum_width
    option in your config file?

  • Ratpoison + dzen2 + conky-cli [SOLVED]

    Hello,
    I am currently trying to mix ratpoison up a little bit with the dzen2 statusbar. The bar appears and everything, no issues there, but as soon as I fire up a frame with rp it overlaps the bar! I figured that there should be some option for makin dzen2 always staying on top but I can't find anything regarding that feature(if it exists). Anyone with ideas?
    Here is my .xinitrc: (don't mind the long sleep, that will be corrected sooner or later ;))
    1 #!/bin/bash
    2
    3 (sleep 15s && conky | dzen2 -e '' -h '16' -w '1980' -ta r -fg '#aaaaaa' -bg '#1a1a1a' -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -p) &
    4 exec ratpoison
    /David
    Last edited by dlind (2010-07-27 15:32:50)

    splittercode wrote:
    in .ratpoisonrc
    padding left top right bottom
    replace left, right, top, and bottom with the number of pixels to leave blank for your statusbar
    for example, to leave 16px blank at top
    'padding 0 16 0 0'
    Thank you for the reply.
    I have the value 'defpadding 0 0 0 0' in my .ratpoisonrc, changing the second value to 16 doesn't do anything though. I tampered with all of the values to see if it altered the frames in some way, but nothing happened.
    New ideas? :)
    /David

  • Finding a decent cli mail client.

    So I've been using mutt for a little while now and besides the setup and annoying default keys, I really enjoy using it.  Lately, though, I've been trying to set it up to hit different IMAP accounts with no success and I'm about about to throw the towel in on it.
    I hear cone isn't bad for multi account and GPG usage, but the fonts are corrupted when I start it up...it's just junk output.
    I didn't really like Alpine for enough reasons that I won't even consider using it again.
    SO...based on this stuff, would I be able to get suggestions for a new mailing client that's a configurable as mutt, supports multiple accounts and GPG?  I'm willing to try working with mutt some more and cone, but it's really starting to aggravate me that there isn't something out there that (generally speaking) 'just works', without having to use some messy hack or having at least a decent man page (I'm looking at you, cone).

    I use mutt + offlineimap + 5 different imap accounts and the whole things works flawlessly (all credit to Brisbin33's excellent walkthrough...). Throw in the fact that you can change all the keybinds, and I doubt you will find a better solution.
    FWIW: I posted a very short list of 5 alternate mail clients on Friday: it may prove helpful: http://jasonwryan.com/post/911160906/mail

  • Client focus awesome wm

    i have the bad habit of using keyboard to navigate among awesome clients and forgetting that the mouse in an inconvenient position (ie conferring focus to the client that it is positioned over rather than the one which i have chosen with mod4+j/k).  i have perused the rc.lua file briefly but im not that familliar with the object model of awesome (at least the way its defined there) so im reluctant to hack away if someone else has a cut and paste solution.  awesome is awesome, but its an acquired taste.
    TIA

    that worked, thanks anrxc.  however it would be convenient to be able to toggle soft focus as the need arises.  i tried to edit the rc.lua file to incorporate this functionality but it seems the soft focus is still disabled (like i want it to be 99% of the time) when i try to enable it with "modkey+Shift s"
    global variable to tell awesome whether the follow the mouse:
    makesloppy = 1
    added global keybinding for toggling makesloppy
    -- Toggle Sloppy focus
    awful.key({ modkey, "Shift" }, "s",
    function ()
    if makesloppy then
    makesloppy = 0
    else
    makesloppy = 1
    end
    end)
    in the hooks section which you pointed out earlier, added a conditional to the focus statement
    awful.hooks.mouse_enter.register(function (c)
    -- Sloppy focus, but disabled for magnifier layout
    if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
    and awful.client.focus.filter(c)
    and makesloppy then
    client.focus = c
    end
    end)
    my stupid mistake is going to pop right out at you!
    Last edited by poopship21 (2009-10-27 18:28:25)

  • Awesome systray is not showing all icons, perhaps overlapping widgets?

    I have a problem with my Awesome configuration that results in some of the icons being missing or partially missing from my systray. I suspect this is because of some overlapping, since they are partially hidden. You can see the problem in the top right corner.
    rc.lua:
    -- Standard awesome library
    require("awful")
    require("awful.autofocus")
    require("awful.rules")
    -- Theme handling library
    require("beautiful")
    -- Notification library
    require("naughty")
    --Wiget Library
    require("vicious")
    -- awesoMPD Widget
    --require("awesompd/awesompd")
    -- {{{ Variable definitions
    -- Themes define colours, icons, and wallpapers
    beautiful.init("/usr/share/awesome/themes/blind-alien/theme.lua")
    -- This is used later as the default terminal and editor to run.
    terminal = "urxvt"
    editor = os.getenv("EDITOR") or "vim"
    editor_cmd = terminal .. " -e " .. editor
    -- Enable or disable widgets:
    -- You also have to edit the wiboxes!
    useSysInfo = true
    usePacman = true
    useMpd = true
    useWifi = false
    useNet = true
    useBat = false
    useCpu = true
    useMem = true
    useTemp = false
    -- Widget Settings
    cpuCores = 2 --Number of CPU Cores
    thermalZone = "coretemp.0" --Thermal Zone to read cpu temperature from (check vicious docu)
    thermalData = "core" --Data Source: "proc", "core" or "sys"
    netAdapter = "eth0" --Network adapter to monitor
    wifiAdapter = "wlan0" --Wifi adapter for wifi widget
    pacUpdate = "yaourt -Sy" --Command to update pacman cache
    pacUpgrade = "yaourt -Su" --Command to upgrade system
    networkManager = terminal .. " -e wicd-curses"
    battery = "BAT1" --Battery to monitor
    widthMpd = 420 --Width of MPD widget
    -- Widget update intervals in seconds
    updateCpu = 1
    updatePac = 1801
    updateMpd = 1
    updateWifi = 7
    updateNet = 1
    updateBat = 31
    updateMem = 7
    -- For Dual-Screen setups:
    -- Set "dualScreen" to "2" if you want a different, optimized widget layout for every screen.
    -- If you set it to "-1" it will copy the same widget layout to both screens. (default Awesome behavior)
    dualScreen = -1
    screencount = screen.count()
    -- Default modkey.
    -- Usually, Mod4 is the key with a logo between Control and Alt.
    -- If you do not like this or do not have such a key,
    -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
    -- However, you can use another modifier like Mod1, but it may interact with others.
    modkey = "Mod4"
    -- Table of layouts to cover with awful.layout.inc, order matters.
    layouts =
    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.magnifier,
    awful.layout.suit.floating,
    awful.layout.suit.max
    -- {{{ Tags
    -- Define a tag table which will hold all screen tags.
    tags = {
    --names = { "1", "2", "3", "4", "5", "6"},
    --names = { "⌘", "♐", "⌥", "ℵ"},
    --names = { "⠪", "⠫", "⠬", "⠭", "⠮", "⠳"},
    names = { "⠐", "⠡", "⠪", "⠵", "⠻", "⠿" },
    --names = { " ∙", "⠡", "⠲", "⠵", "⠻", "⠿"},
    --names = { " ⠐ ", " ⠡ ", " ⠲ ", " ⠵ ", " ⠾ ", " ⠿ "},
    --names = { "⢷", "⣨", "⡪", "⣌", "⣪", "⡝"},
    layout = {
    layouts[8], layouts[8], layouts[8], layouts[5], layouts[8], layouts[8]
    for s = 1, screencount do
    tags[s] = awful.tag(tags.names, s, tags.layout)
    end
    -- {{{ Menu
    -- Create a laucher widget and a main menu
    myawesomemenu = {
    { "manual", terminal .. " -e man awesome" },
    { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
    { "restart WM", awesome.restart },
    { "logout", awesome.quit },
    { "shutdown" , "sudo /sbin/halt -p" },
    { "reboot" , "sudo /sbin/reboot" }
    myinternet = {
    { "Chromium", "chromium" },
    { "Firefox" , "firefox" },
    { "IM" , "pidgin" },
    { "IRC" , "xchat"}
    mymedia = {
    { "Spotify", "spotify" },
    { "Rhythmbox", "rhythmbox" },
    { "ncmpcpp", "urxvt -e ncmpcpp" },
    { "Gnome Mplayer", "gnome-mplayer" },
    { "VLC" , "vlc" }
    mygraphics = {
    { "GIMP" , "gimp" },
    { "Inkscape" , "inkscape" },
    { "Image viewer" , "eog" }
    myoffice = {
    { "Base" , "lobase" },
    { "Calc" , "localc" },
    { "Impress" , "loimpress" },
    { "LibreOffice" , "loffice" },
    { "Writer" , "lowriter" },
    { "Lyx" , "lyx" },
    { "Document viewer" , "evince" }
    mysystem = {
    { "htop" , "urxvt -e htop" },
    { "Partition" , "gksudo gparted" },
    { "Sys mon" , "gnome-system-monitor" }
    myutilities = {
    { "Gedit" , "gedit" },
    { "Virtualbox" , "VirtualBox" },
    { "File Manager" , "nautilus --no-desktop" }
    myplaces = {
    { "Home" , "nautilus --no-desktop /home/johan/" },
    { "Documents" , "nautilus --no-desktop /home/johan/Documents/" },
    { "Downloads" , "nautilus --no-desktop /home/johan/Downloads/" },
    { "Music" , "nautilus --no-desktop /home/johan/Music/" },
    { "Pictures" , "nautilus --no-desktop /home/johan/Pictures/" }
    myserverplaces = {
    { "Server root" , "nautilus --no-desktop /srv/" },
    { "Downloads" , "nautilus --no-desktop /srv/download/" },
    { "Movies" , "nautilus --no-desktop /srv/movies/" },
    { "Tv-Series" , "nautilus --no-desktop /srv/tv-series/" },
    { "Misc" , "nautilus --no-desktop /srv/misc/" }
    mymainmenu = awful.menu({ items = {
    { "Terminal", terminal },
    { "Places" , myplaces },
    { "Server" , myserverplaces },
    { "Internet" , myinternet },
    { "Media" , mymedia },
    { "Graphics" , mygraphics },
    { "Office" , myoffice },
    { "Utilities" , myutilities },
    { "Systools" , mysystem },
    { "Awesome", myawesomemenu }
    mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
    menu = mymainmenu })
    -- Separators
    bubble = widget({ type = "textbox" })
    spacer = widget({ type = "textbox" })
    space = widget({ type = "textbox" })
    separator = widget({ type = "textbox" })
    bracketl = widget({ type = "textbox" })
    bracketr = widget({ type = "textbox" })
    vertline = widget({ type = "textbox" })
    dash = widget({ type = "textbox" })
    bubble.text = " ∘ "
    spacer.text = " "
    space.text = " "
    --separator.text = "<span font_desc='ClearlyU'> ⡾ </span>"
    separator.text = "] ["
    vertline.text = "|"
    dash.text = "-"
    bracketl.text = "["
    bracketr.text = "]"
    -- Status Labels
    cpuLabel = {}
    for s = 1, cpuCores do
    cpuLabel[s] = widget({ type = "textbox" })
    cpuLabel[s].text = "Core " .. s
    end
    rlabel = widget({ type = "textbox" })
    rlabel.text = "Root:"
    hlabel = widget({ type = "textbox" })
    hlabel.text = "Home:"
    -- WIDGETS --
    -- OS info
    if useSysInfo == true then
    sys = widget({ type = "textbox" })
    vicious.register(sys, vicious.widgets.os, "$1 $2")
    end
    -- Pacman updates
    if usePacman == true then
    -- Widget
    pnoghosticon = widget({ type = "imagebox" })
    pnoghosticon.image = image(beautiful.widget_pacnoghost)
    pnoghosticon.visible = true
    pghosticon = awful.widget.launcher({
    image = beautiful.widget_pacghost,
    command = terminal .. " -e " .. pacUpgrade .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
    pghosticon.visible = false
    -- Icon
    -- picon = widget({ type = "imagebox" })
    -- picon.image = image(beautiful.widget_pacnew)
    -- Use the Pacman icon as launcher to update the package list (change to fit your package-management system)
    picon = awful.widget.launcher({
    image = beautiful.widget_pacnew,
    command = pacUpdate .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
    runpicon = awful.widget.launcher({
    image = beautiful.widget_pacman_run,
    command = pacUpdate .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
    runpicon.visible = false
    pacup = widget({ type = "textbox" })
    vicious.register(pacup, vicious.widgets.pkg,
    function(widget, args)
    local nr = tonumber(args[1])
    if nr ~= 0 then
    pnoghosticon.visible = false
    pghosticon.visible = true
    picon.visible = false
    runpicon.visible = true
    else
    pghosticon.visible = false
    pnoghosticon.visible = true
    runpicon.visible = false
    picon.visible = true
    end
    end, updatePac, "Arch")
    end
    -- MPD Widget
    if useMpd == true then
    -- PLAY, STOP, PREV/NEXT Buttons
    -- requires modification of /usr/share/awesome/lib/awful/widget/launcher.lua
    -- b = util.table.join(w:buttons(), button({}, 1, nil, function () util.spawn(args.command) end))
    -- to:
    -- b = util.table.join(w:buttons(), button({}, 1, nil, function () util.spawn_with_shell(args.command) end))
    music_play = awful.widget.launcher({
    image = beautiful.widget_play,
    command = "mpc toggle && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
    music_pause = awful.widget.launcher({
    image = beautiful.widget_pause,
    command = "mpc toggle && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
    music_pause.visible = false
    music_stop = awful.widget.launcher({
    image = beautiful.widget_stop,
    command = "mpc stop && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
    music_prev = awful.widget.launcher({
    image = beautiful.widget_prev,
    command = "mpc prev && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
    music_next = awful.widget.launcher({
    image = beautiful.widget_next,
    command = "mpc next && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
    mpdicon = widget({ type = "imagebox" })
    mpdicon.image = image(beautiful.widget_mpd)
    -- Initialize widget
    mpdwidget = widget({ type = "textbox" })
    --mpdwidget.wrap = "none"
    mpdwidget.width = widthMpd
    --mpdwidget.wrap = "word_char"
    -- Register Widget
    --vicious.register(mpdwidget, vicious.widgets.mpd, "(${state}) : ${Artist} - ${Title} ]", 13)
    -- Set the maximum width of the MPD widget inside the string.format function as "%.<length>s"
    vicious.register(mpdwidget, vicious.widgets.mpd,
    function(widget, args)
    --local maxlength = 85
    local font = beautiful.font
    local string = args["{Artist}"] .. " - " .. args["{Title}"]
    --local string = "[" .. args["{state}"] .. "]" .. " : " .. args["{Artist}"] .. " - " .. args["{Title}"]
    --[[ if maxlength < string.len(string) then
    return "<span font_desc='" .. font .. "'>" .. string.sub(string, 0, maxlength-6) .. "</span> ..."
    else
    return "<span font_desc='" .. font .. "'>" .. string .. "</span>"
    end]]
    if args["{state}"] == "Play" then
    music_play.visible = false
    music_pause.visible = true
    else
    music_play.visible = true
    music_pause.visible = false
    end
    return string
    end, updateMpd)
    end
    ---- WIFI Widget
    --if useWifi == true then
    -- wifiwidget = widget({ type = "textbox" })
    -- wifiwidget.width = 22
    -- wifiwidget.align = "right"
    -- --wifiimage = widget({ type = "imagebox" })
    -- wifiimage0 = awful.widget.launcher({
    -- image = beautiful.widget_wifi0,
    -- command = networkManager
    -- wifiimage0.image.visible = true
    -- wifiimage1 = awful.widget.launcher({
    -- image = beautiful.widget_wifi1,
    -- command = networkManager
    -- wifiimage1.image.visible = false
    -- wifiimage2 = awful.widget.launcher({
    -- image = beautiful.widget_wifi2,
    -- command = networkManager
    -- wifiimage2.image.visible = false
    -- wifiimage3 = awful.widget.launcher({
    -- image = beautiful.widget_wifi3,
    -- command = networkManager
    -- wifiimage3.image.visible = false
    -- wifiimage4 = awful.widget.launcher({
    -- image = beautiful.widget_wifi4,
    -- command = networkManager
    -- wifiimage4.image.visible = false
    -- -- Register Widget
    -- -- change to the desired network adapter if needed
    -- --vicious.register(wifiwidget, vicious.widgets.wifi, "~ ${link}%", 5, "wlan0")
    -- vicious.register(wifiwidget, vicious.widgets.wifi,
    -- function(widget, args)
    -- if tonumber(args["{link}"]) > 75 then
    -- wifiimage0.visible = false
    -- wifiimage1.visible = false
    -- wifiimage2.visible = false
    -- wifiimage3.visible = false
    -- wifiimage4.visible = true
    -- elseif tonumber(args["{link}"]) > 50 then
    -- wifiimage0.visible = false
    -- wifiimage1.visible = false
    -- wifiimage2.visible = false
    -- wifiimage3.visible = true
    -- wifiimage4.visible = false
    -- elseif tonumber(args["{link}"]) > 25 then
    -- wifiimage0.visible = false
    -- wifiimage1.visible = false
    -- wifiimage2.visible = true
    -- wifiimage3.visible = false
    -- wifiimage4.visible = false
    -- elseif tonumber(args["{link}"]) > 0 then
    -- wifiimage0.visible = false
    -- wifiimage1.visible = true
    -- wifiimage2.visible = false
    -- wifiimage3.visible = false
    -- wifiimage4.visible = false
    -- else
    -- wifiimage0.visible = true
    -- wifiimage1.visible = false
    -- wifiimage2.visible = false
    -- wifiimage3.visible = false
    -- wifiimage4.visible = false
    -- end
    -- return string.format("%02d%%", tonumber(args["{link}"]))
    -- end, updateWifi, wifiAdapter)
    --end
    -- NETWORK Widget
    if useNet == true then
    dnicon = widget({ type = "imagebox" })
    upicon = widget({ type = "imagebox" })
    dnicon.image = image(beautiful.widget_down)
    upicon.image = image(beautiful.widget_up)
    -- Initialize widget
    netdnwidget = widget({ type = "textbox" })
    netdnwidget.width = 55
    --netdnwidget.align = "right"
    netupwidget = widget({ type = "textbox" })
    netupwidget.width = 55
    --netupwidget.align = "right"
    -- Register widget
    -- change to the desired network adapter if needed
    --vicious.register(netdnwidget, vicious.widgets.net, "${eth0 down_kb} kB/s", 1)
    --vicious.register(netupwidget, vicious.widgets.net, "${eth0 up_kb} kB/s", 1)
    -- The following code formats the output to fill with zeroes at the beginning i.e. 013 kB/s instead of 13 kB/s.
    -- It also automatically switches to MB/s if there is more than 999 kB/s
    vicious.register(netdnwidget, vicious.widgets.net,
    function(widget, args)
    if tonumber(args["{" .. netAdapter .. " down_kb}"]) > 999 then
    return string.format("%04.1f MB/s", tonumber(args["{" .. netAdapter .. " down_mb}"]))
    else
    return string.format("%03d kB/s", tonumber(args["{" .. netAdapter .. " down_kb}"]))
    end
    end, updateNet)
    vicious.register(netupwidget, vicious.widgets.net,
    function(widget, args)
    if tonumber(args["{" .. netAdapter .. " up_kb}"]) > 999 then
    return string.format("%04.1f MB/s", tonumber(args["{" .. netAdapter .. " up_mb}"]))
    else
    return string.format("%03d kB/s", tonumber(args["{" .. netAdapter .. " up_kb}"]))
    end
    end, updateNet)
    end
    ---- BATTERY widget
    --if useBat == true then
    -- baticon = widget({ type = "imagebox" })
    -- --baticon.image = image(beautiful.widget_batfull)
    -- --Initialize widget
    -- batwidget = widget({ type = "textbox" })
    -- batwidget.width = 22
    -- batwidget.align = "right"
    -- --Register widget
    -- --vicious.register(batwidget, vicious.widgets.bat, "$1$2", 31, "BAT1")
    -- vicious.register(batwidget, vicious.widgets.bat,
    -- function(widget, args)
    -- if string.match(args[1], "[+↯]") then
    -- baticon.image = image(beautiful.widget_ac)
    -- elseif tonumber(args[2]) > 40 then
    -- baticon.image = image(beautiful.widget_batfull)
    -- elseif tonumber(args[2]) > 20 then
    -- baticon.image = image(beautiful.widget_batlow)
    -- else
    -- baticon.image = image(beautiful.widget_batempty)
    -- end
    -- if tonumber(args[2]) == 100 then
    -- return "Full"
    -- end
    -- return args[2] .. "%"
    -- end, updateBat, battery)
    --end
    -- {{{ CPU
    --if useTemp == true then
    -- -- Core Temp
    -- tempwidget = widget({ type = "textbox" })
    -- tempwidget.width = 26
    -- tempwidget.align = "right"
    -- vicious.register(tempwidget, vicious.widgets.thermal, "$1 C", updateCpu, { thermalZone, thermalData })
    -- --vicious.register(tempwidget, vicious.widgets.thermal, "$1°C", 5, { "thermal_zone0", "sys" })
    -- -- Icon
    -- tempicon = widget({ type = "imagebox" })
    -- tempicon.image = image(beautiful.widget_temp)
    --end
    -- Readout
    if useCpu == true then
    -- Icon
    cpuicon = widget({ type = "imagebox" })
    cpuicon.image = image(beautiful.widget_cpu)
    -- Core 1 Meter
    cpubar = {}
    freq = {}
    displayCores = {}
    displayCpu = {}
    for s = 1, cpuCores do
    cpubar[s] = awful.widget.progressbar()
    cpubar[s]:set_width(50)
    cpubar[s]:set_height(6)
    cpubar[s]:set_vertical(false)
    cpubar[s]:set_background_color("#434343")
    --cpubar:set_color(beautiful.fg_normal)
    cpubar[s]:set_gradient_colors({ beautiful.fg_normal, beautiful.fg_normal, beautiful.fg_normal, beautiful.bar })
    --Delete the following line if you want to put the widget on the left side of the wibox
    cpubar[s].layout = awful.widget.layout.horizontal.rightleft
    vicious.register(cpubar[s], vicious.widgets.cpu, "$" .. s, updateCpu)
    awful.widget.layout.margins[cpubar[s].widget] = { top = 6 }
    -- Frequency
    freq[s] = widget({ type = "textbox" })
    freq[s].width = 44
    freq[s].align = "right"
    --vicious.register(freq1, vicious.widgets.cpufreq, "$2 GHz", 9, "cpu0")
    vicious.register(freq[s], vicious.widgets.cpufreq,
    function(widget, args)
    return string.format("%03.1f GHz", args[2])
    end, updateCpu, "cpu" .. s - 1)
    -- Cache that shit
    vicious.cache(vicious.widgets.cpu)
    end
    end
    -- }}} CPU
    -- {{{ MEM
    if useMem == true then
    -- Icon
    memicon = widget({ type = "imagebox" })
    memicon.image = image(beautiful.widget_mem)
    -- Percentage
    --mem = widget({ type = "textbox" })
    --vicious.register(mem, vicious.widgets.mem, "$1%")
    -- Meter
    membar = awful.widget.progressbar()
    membar:set_width(50)
    membar:set_height(6)
    membar:set_vertical(false)
    membar:set_background_color("#434343")
    --membar:set_color(beautiful.fg_normal )
    membar:set_gradient_colors({ beautiful.fg_normal, beautiful.fg_normal, beautiful.fg_normal, beautiful.bar })
    --This bar should be placed on the right side of the wibox unless
    --it's a dual-screen config in which case the default (leftright)
    --layout is used... change that if you need!
    if screencount ~= dualScreen then
    membar.layout = awful.widget.layout.horizontal.rightleft
    end
    --Register the widget
    vicious.register(membar, vicious.widgets.mem, "$1", updateMem)
    -- Align progressbars
    awful.widget.layout.margins[membar.widget] = { top = 6 }
    -- MEM Usage
    --mem_total = widget({ type = "textbox" })
    --vicious.register(mem_total, vicious.widgets.mem, "$3 MB", 9)
    --mem_used = widget({ type = "textbox" })
    --vicious.register(mem_total, vicious.widgets.mem, "$2 MB", 9,)
    -- Cache that shit
    vicious.cache(vicious.widgets.mem)
    end
    -- }}} MEM
    -- Create a textclock widget
    mytextclock = awful.widget.textclock({ align = "right" }, "%H:%M")
    awful.widget.layout.margins[mytextclock] = { top = -1 }
    -- Create a systray
    mysystray = widget({ type = "systray"})
    -- Create a wibox for each screen and add it
    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))
    mytasklist = {}
    mytasklist.buttons = awful.util.table.join(awful.button({}, 1, function(c)
    if not c:isvisible() then
    awful.tag.viewonly(c:tags()[1])
    end
    client.focus = c
    c:raise()
    end),
    awful.button({}, 3, function()
    if instance then
    instance:hide()
    instance = nil
    else
    instance = awful.menu.clients({ 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))
    for s = 1, screencount do
    -- Set a screen margin for borders
    awful.screen.padding(screen[s], { top = 0 })
    -- Create a promptbox for each screen
    mypromptbox[s] = awful.widget.prompt()
    -- 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)))
    mylayoutbox[s].resize = false
    -- Create a taglist widget
    mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
    awful.widget.layout.margins[mytaglist[s]] = { top = -2 }
    -- WARNING: In order to properly view the tasklist some lua files have been modified. For the
    -- tasklist_floating_icon icon to be placed on the left side of the task name instead of the
    -- right alignment, /usr/share/awesome/lib/awful/widget/tasklist.lua in function new(label, buttons) the
    -- variable widgets.textbox has to be modified like this:
    -- remove bg_align = "right" and
    -- modify the left margin from 2 to icon width + 2 (i.e.: 18).
    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(function(c)
    return awful.widget.tasklist.label.currenttags(c, s,
    -- WARNING: Requires modified /usr/share/awesome/lib/awful/widget/tasklist.lua !!!
    -- This basically hides the application icons on the tasklist. If you don't want this or
    -- prefer not to change your tasklist.lua remove the following line!
    { hide_icon = true })
    end, mytasklist.buttons)
    awful.widget.layout.margins[mytasklist[s]] = { top = 2 }
    -- WIBOXES --
    -- Here we create the wiboxes if it's not a dual-screen layout
    if screencount ~= dualScreen then
    -- Create the wibox
    mywibox[s] = awful.wibox({ position = "top", screen = s, border_width = 0, height = 18 })
    -- Add widgets to the wibox - order matters
    mywibox[s].widgets = {
    mytaglist[s],
    mypromptbox[s],
    displaySysInfo,
    layout = awful.widget.layout.horizontal.leftright
    mytextclock,
    mylayoutbox[s],
    s == 1 and mysystray or nil,
    mytasklist[s],
    layout = awful.widget.layout.horizontal.rightleft
    mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 18 })
    mybottomwibox[s].widgets = {
    space, music_play, music_pause, music_stop, music_prev, music_next, space, mpdwidget,
    layout = awful.widget.layout.horizontal.leftright
    spacer,
    bracketr,
    -- spacer, batwidget, spacer, baticon, spacer,
    -- separator,
    -- spacer, wifiwidget, spacer, wifiimage0, wifiimage1, wifiimage2, wifiimage3, wifiimage4, spacer,
    -- separator,
    -- spacer, tempwidget, spacer, tempicon, spacer,
    -- separator,
    spacer, freq[1], spacer, cpubar[1], spacer,
    --cpuLabel[1], spacer,
    cpuicon, spacer,
    separator,
    spacer, membar, spacer, memicon, spacer,
    separator,
    spacer, netupwidget, spacer, upicon, spacer, separator, spacer, netdnwidget, spacer, dnicon, spacer,
    separator,
    space, pghosticon, pnoghosticon, runpicon, picon, space,
    bracketl,
    layout = awful.widget.layout.horizontal.rightleft
    end
    end
    if screencount == dualScreen then
    -- Here we create the wiboxes if it is a dual screen configuration:
    mywibox[1] = awful.wibox({ position = "top", screen = 1, border_width = 0, height = 18 })
    -- Add widgets to the wibox - order matters
    mywibox[1].widgets = {
    mytaglist[1],
    spacer,
    mypromptbox[1],
    mytasklist[1],
    layout = awful.widget.layout.horizontal.leftright
    spacer,
    mytextclock,
    -- spacer,
    mylayoutbox[1],
    -- spacer,
    -- mytasklist[1],
    layout = awful.widget.layout.horizontal.rightleft
    mybottomwibox[1] = awful.wibox({ position = "bottom", screen = 1, border_width = 0, height = 18 })
    mybottomwibox[1].widgets = {
    space, music_play, music_pause, music_stop, music_prev, music_next, space, mpdwidget,
    layout = awful.widget.layout.horizontal.leftright
    space,
    s == 1 and mysystray or nil,
    layout = awful.widget.layout.horizontal.rightleft
    mywibox[2] = awful.wibox({ position = "top", screen = 2, border_width = 0, height = 18 })
    mywibox[2].widgets = {
    space,
    mytaglist[2],
    spacer,
    mypromptbox[2],
    layout = awful.widget.layout.horizontal.leftright
    spacer,
    mytextclock,
    space,
    mylayoutbox[2],
    spacer,
    mytasklist[2],
    layout = awful.widget.layout.horizontal.rightleft
    mybottomwibox[2] = awful.wibox({ position = "bottom", screen = 2, border_width = 0, height = 18 })
    mybottomwibox[2].widgets = {
    spacer,
    bracketl,
    spacer, sys, spacer,
    separator,
    space, runpicon, picon, pghosticon, pnoghosticon, space,
    separator,
    spacer, dnicon, spacer, netdnwidget, spacer, separator, spacer, upicon, spacer, netupwidget, spacer,
    separator,
    spacer, memicon, spacer, membar, spacer,
    bracketr,
    layout = awful.widget.layout.horizontal.leftright
    spacer,
    bracketr,
    spacer, tempwidget, spacer, tempicon, spacer,
    separator,
    spacer, freq[2], spacer, cpubar[2], spacer,
    cpuLabel[2], spacer,
    cpuicon, spacer,
    separator,
    spacer, freq[1], spacer, cpubar[1], spacer,
    cpuLabel[1], spacer,
    cpuicon, spacer,
    bracketl,
    layout = awful.widget.layout.horizontal.rightleft
    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({ }, "Print", function () awful.util.spawn("gnome-screenshot") end),
    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, }, "w", function() mymainmenu:show({ keygrabber = true }) end),
    --Volume manipulation
    -- awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn("amixer set Master 5+") end),
    -- awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn("amixer set Master 5-") 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, }, "Return", function() awful.util.spawn(terminal) 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 }, "x",
    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, }, "q", 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" }, "m", function () awful.util.spawn("urxvt -T ncmpcpp -e 'ncmpcpp'") end),
    awful.key({ modkey, "Shift" }, "w", function () awful.util.spawn("chromium") end),
    awful.key({ modkey, }, "b", function () awful.util.spawn("nautilus --no-desktop") end),
    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, screencount 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,
    size_hints_honor = false,
    focus = true,
    keys = clientkeys,
    buttons = clientbuttons
    rule = { class = "MPlayer" },
    properties = { floating = true }
    rule = { class = "pinentry" },
    properties = { floating = true }
    rule = { class = "gimp" },
    properties = { floating = true }
    { rule = { class = "firefox" },
    properties = { tag = tags[1][2] } },
    { rule = { class = "Chromium" },
    properties = { tag = tags[1][2] } },
    { rule = { class = "Pidgin" },
    properties = { tag = tags[1][3] } },
    { rule = { class = "Xchat" },
    properties = {tag = tags[1][4] } },
    -- Set Firefox to always map on tags number 2 of screen 1.
    -- { rule = { class = "Firefox" },
    -- properties = { tag = tags[1][2] } },
    -- {{{ Signals
    -- Signal function to execute when a new client appears.
    client.add_signal("manage", function(c, startup)
    -- Add a titlebar
    -- awful.titlebar.add(c, { modkey = modkey })
    -- 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)
    -- {{{ Tag signal handler - selection
    -- - ASCII tags 1 [2] 3 4...
    -- - start with tag 1 named [1] in tag setup
    for s = 1, screencount do
    for t = 1, #tags[s] do
    tags[s][t]:add_signal("property::selected", function ()
    if tags[s][t].selected then
    tags[s][t].name = "[" .. tags[s][t].name .. "]"
    else--]]
    --tags[s][t].name = tags[s][t].name:gsub("[%[%]]", "")
    --[[ end
    end)
    end
    end
    I have tried to search around for a solution to this, but I am coming up short. Any idea on how to solve this?
    Last edited by kveras (2011-11-21 09:01:47)

    First of all, did you check the wiki and forums? We'll help you, but you have to try to fix it yourself first.
    You will need to provide more info if you want help.
    Did you set up Gnome to force fallback mode?
    Did you look at the Gnome wiki article? There's a few sections that sound like what your looking to do, but the examples are USING OTHER WM's. They still might be able to point you in the right direction.

  • Udisks and udisk-glue -- How to set up with awesome wm?

    Hi,
    I'm trying to get my optical drives and USB drives to automount (running awesome wm launched with SLiM).
    Based on this link:  http://awesome.naquadah.org/wiki/Automounting
    I've decided to try to do it with udisks and udisk-glue.
    1)  I have a relatively new arch install that has udisks2, do I need to do anything different because of that?
    2)  I understand that I need to make a udisk-glue.conf file (according to the link above)
        (a) Where do I put it?  (which directory)
        (b) Should I make any changes to this version?
    filter disks {
    optical = false
    partition_table = false
    usage = filesystem
    match disks {
    automount = true
    automount_options = sync
    post_mount_command = "echo \'naughty.notify({title = \"USB:\", text =\"mounted %device_file on %mount_point\", timeout = 10})\' | awesome-client"
    post_unmount_command = "echo \'naughty.notify({title = \"USB:\", text =\"unmounted %device_file on %mount_point\", timeout = 10})\' | awesome-client"
    filter optical {
    optical = true
    match optical {
    automount = true
    automount_options = ro
    post_mount_command = "echo \'naughty.notify({title = \"CD-Rom:\", text =\"mounted %device_file on %mount_point\", timeout = 10})\' | awesome-client"
    post_mount_command = "echo \'udisks_glue:mount_device(\"%device_file\",\"%mount_point\",\"Cdrom\")\' | awesome-client"
    post_unmount_command = "echo \'naughty.notify({title = \"CD-Rom:\", text =\"unmounted %device_file on %mount_point\", timeout = 10})\' | awesome-client"
    Thank you for your advice!

    I believe udisks-glue needs udisks not udisks2. As for the configuration, have you checked the manpage for udisks-glue?
    As an alternative, you could try devmon (part of the udevil package).

  • [SOLVED] Awesome 3.5 using english keyboard layout instead of Xorg's

    Keyboard layout was OK on 3.4.
    For 3.5 and git version, Awesome defaults to english layout. Calling awesome.restart() (e.g. with SUPER+SHIFT+R) will correctly set the layout according to Xorg config. That's quite annoying indeed.
    Only Awesome is affected, i.e. all other applications will use the Xorg config. So basically the affected parts are
    * key bindings
    * Run command
    * Run lua code
    Using
    * up to date x86_64 system
    * blank user session
    * startx and 'exec awesome' as the sole command.
    I couldn't find any related issue on the web, seems strange to me since I shouldn't be the only one using a non-english keyboard layout !
    Any idea ?
    Last edited by Ambrevar (2013-08-02 20:01:32)

    Same here, but as with nomorewindows case, I just need to restart awesome, but I need to do it every time I boot. Both my console and X are configured to dvorak, but in X it's set through .xinitrc.
    I'm going to try and see whether putting
    echo "awesome.restart()" | awesome-client
    into my .xinitrc will help.
    By the way, my .xinitrc starts awesome in the following way:
    awesome & wmpid=$!
    [whole bunch of misery involving mpd, urxvt and setting the keymap in X]
    [above for restarting awesome]
    wait $wmpid

  • [Solved] Conky+dwm

    I'm planning to use Conky as a nice status bar for dwm. Will it work using the out_to_console=yes option or do I need to install conky-cli for that?
    Last edited by De Mysteriis (2009-02-12 12:36:12)

    I believe you'll need conky-cli (that's what I use anyway) otherwise it'll do weird things with your desktop regardless of the console output setting.

  • [Solved] Conky, Borders and AwesomeWM

    Just wondering if it possible to remove the outline border of Conky on AwesomeWM.  I got rid of the shadowing around it due to compton by doing the following:
    compton --config ~/.compton.conf --shadow-exclude 'n:a:Conky' -b &
    But no matter what I did I still get the border around Conky.
    Here is compton configuration file.
    http://pastebin.com/rwCn3gNn
    And here is my conky config file.
    http://pastebin.com/Kewtxm1x
    Still struggling to get it removed.   Here is a screenshot also.
    Last edited by z1lt0id (2014-07-20 22:06:02)

    It's been a really long time since I used conky so this is a bit of a shot in the dark, but you could try:
    1. Set own_window_type to either "desktop" or "override" in your .conkyrc
    2. Create a rule for conky in awesome's rc.lua that sets the property, border_width = 0

Maybe you are looking for