You are not logged in.

#1 2008-09-18 00:41:55

Celarnor
Member
Registered: 2008-09-18
Posts: 3

Awesome + Amazing

I can't for the life of me figure out why I can't get amazing to pipe anything into my bar (using Gigamo's .awesomerc).  The only changes I've made thus far have been to change the file directories to match mine, change the font to one that I know I have and haven't had problems with, and remove the import for the file with passwords for the gmail, etc. widgets.

screen 0
 {
     ######
     styles
     {
         normal 
         {
             # terminus is available from http://www.is-vn.bg/hamster/jimmy-en.html
             font = "Monospace 8" 
             fg = "#a0a0a0"
             bg = "#0a0a0a"
             border = "#0a0a0a"
             shadow = "#111111"
             shadow_offset = "1"
         }
         focus 
         { 
             fg = "#ffffff"
             bg = "#285577" 
             border = "#285577"
         }
         urgent 
         { 
             bg = "#ff5656" 
             fg = "#a0a0a0"
         }
             #bg="#8ba574" green , "#285577" blue
     }
     ######
     general
     {
         border = 1
         snap = 8
         mwfact_lower_limit = 0.1
         mwfact_upper_limit = 0.9
         resize_hints = false
         new_get_focus = true 
         new_become_master = false
         floating_placement = smart
     }
 
 #    ######
 #    titlebar
 #    { 
 #        position = "top" 
 #        text_align = "center" 
 #        styles 
 #        { 
 #             normal { shadow = "#111111" shadow_offset = "1" } 
 #             focus { bg = "#285577" shadow = "#111111" shadow_offset = "1" } 
 #        }
 #        height = "12" 
 #    }
 
     ######
     tags
     {
         tag t { layout = "tile" mwfact = 0.575 }
         tag w { layout = "tilebottom" mwfact = 0.625 }
         tag d { layout = "tilebottom" mwfact = 0.225 }
         tag 4 { layout = "floating" }
         tag 5 { layout = "tile" nmaster = 3 ncol = 3 }
         tag 6 { layout = "floating" }
         tag 7 { layout = "tile" nmaster = 3 ncol = 3 }
         tag 8 { layout = "floating" }
         tag 9 { layout = "tile" nmaster = 3 ncol = 3 }
     }
 
     ######
     layouts
     {
         layout tile { image = "/home/dustin/.awesome/layouts/tileb.png" }
         layout tilebottom { image = "/home/dustin/.awesome/layouts/tilebottomb.png" }
         layout max { image = "/home/dustin/.awesome/layouts/tabb.png" }
         layout floating { image = "/home/dustin/.awesome/layouts/floatb.png" }
     }
 
     ######
     statusbar top
     {
         position = "top"
         height = "14"
   
         ######
         taglist tl
         {
             mouse { button = "1" command = "tag_view" }
             mouse { button = "3" command = "tag_toggleview" }
         }
 
         ######
         layoutinfo li
         {
             mouse { button = "1" command = "tag_setlayout" arg = "+1" }
             mouse { button = "4" command = "tag_setlayout" arg = "+1" }
             mouse { button = "3" command = "tag_setlayout" arg = "-1" }
             mouse { button = "5" command = "tag_setlayout" arg = "-1" }
         }
 
         ######
         textbox mpd_sep { align = "left" text = " " }
         textbox mpd 
         { 
             align = "left" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" } 
             mouse { button = "1" command = "spawn" arg = "mpc toggle" } 
         }
         
         
         textbox vol_sep { align = "left" text = "   " }
         iconbox vol_ib { align = "left" image = "/home/dustin/.awesome/transicons/vol.png" y = "3" resize = "false" }
         textbox vol_sep2 { align = "left" text = " " }
         textbox tb_vol 
         { 
             align = "left" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" } 
         }
         textbox vol_sep3 { align = "left" text = " " }
         progressbar pb_vol
         {
             data master { bg = "#0a0a0a" fg = "#aecf96" fg_center = "#aecf96" fg_end = "#ff5656" fg_off = "#494b4f" bordercolor = "#0a0a0a" }
             width = "10" height = "1" gap = 0 align = "left" vertical = "true"
             mouse { button = "4" command = "spawn" arg = "exec dvol -i 2" }
             mouse { button = "5" command = "spawn" arg = "exec dvol -d 2" }
             mouse { button = "2" command = "spawn" arg = "exec dvol -t" }
             ticks_count = "4" ticks_gap = "1"
         }
 
         textbox cpu_sep { align = "right" text = " " }
         iconbox cpu_ib { align = "right" image = "/home/dustin/.awesome/transicons/cpu.png" y = "3" resize = "false" }
         textbox cpu_sep2 { align = "right" text = " " }
         textbox cpu_freq 
         { 
             align = "right" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" } 
         }
         graph cpugraph
         {
             width = 60 height = "0.85"
             bg = "#494b4f" bordercolor = "#0a0a0a"
             data cpu0 { scale = true draw_style = bottom vertical_gradient = true fg = "#aecf96" fg_center = "#ff5656" fg_end = "#ff0000" }
             align = "right"
         }
 
         textbox mem_sep { align = "right" text = "   " } 
         iconbox mem_ib { align = "right" image = "/home/dustin/.awesome/transicons/mem.png" y = "3" resize = "false" }
         textbox mem_sep2 { align = "right" text = " " }
         textbox tb_mem 
         { 
             align = "right" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" } 
         }
         textbox mem_sep3 { align = "right" text = " " }
         progressbar membar
         {
             data mem { bg = "#0a0a0a" fg_center = "#aecf96" fg_end = "#ff0000" fg = "#aecf96" fg_off = "#494b4f" bordercolor = "#0a0a0a" }
             width = "40" height = "0.7" gap = -1 align = "right"
         }
 
         textbox net_sep { align = "right" text = "   " }
         iconbox down_ib { image = "/home/dustin/.awesome/transicons/down3.png" y = "3" resize = "false" align="right" }
         textbox net_sep2 { align = "right" text = " " }
         textbox down 
         { 
             align = "right" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "0" } 
         }
         textbox net_sep3 { align = "right" text = " " }
         iconbox up_ib { image = "/home/dustin/.awesome/transicons/up3.png" y = "3" resize = "false" align = "right" }
         textbox net_sep4 { align = "right" text = " " }
         textbox up 
         { 
             align = "right" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "0" } 
         }
 
         textbox bat_sep { align = "right" text = "   " }
         textbox battery 
         { 
             align = "right" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1"} 
         } 
 
         textbox mailpacman_sep { align = "right" text = "   " }
         textbox mail 
         { 
             style { fg = "#ffffff" shadow = "#111111" shadow_offset = "1" } 
             mouse { button = "1" command = "spawn" arg = "firefox3 http://www.gmail.com" } 
             align = "right" 
         } 
         textbox mailpacman_sep2 
         { 
             align = "right" 
             text = "/" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" } 
         }
         textbox pacman 
         { 
             style { fg = "#ffffff" shadow = "#111111" shadow_offset = "1" } 
             align = "right" 
         }
         
         
         textbox clock_sep { align = "right" text = "   " }
         textbox clock 
         { 
             align = "right" 
             style { fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" } 
         }
     }
 }
 
 ######
 menu Run:  
 {
     styles
     {
         normal { bg = "#0a0a0a" fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" }
         focus { bg = "#285577" fg ="#ffffff" }
     } 
     y = "0"
     x = "180"
     height = "14"
 }
 
 ######
 menu Manual:
 {
     styles
     {
         normal { bg = "#0a0a0a" fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" }
         focus { bg = "#285577" fg ="#ffffff" }
     }
     y = "0"
     x = "180"
     height = "14"
 }
 
 ######
 menu SSH:
 {
     styles
     {
         normal { bg = "#0a0a0a" fg = "#a0a0a0" shadow = "#111111" shadow_offset = "1" }
         focus { bg = "#285577" fg ="#ffffff" }
     }
     y = "0"
     x = "180"
     height = "14"
 }
 
 ######
 rules
 {
     rule { name = "Gimp" tags = "6" float = "true" }
     rule { name = "Pidgin" tags = "4" float = "true" icon = "/home/dustin/.icons/Somatic-0.2/32x32/apps/gaim.png" }
     rule { name = "Thunar" master = "false" icon = "/home/dustin/.icons/Somatic-0.2/32x32/apps/file-manager.png"}
     rule { name = "Mirage" float = "true" }
     rule { name = "VLC" float = "true" titlebar { position = off } }
     rule { name = "MPlayer" titlebar { position = off } }
     rule { name = "Minefield" tags = "w" icon = "/home/dustin/.icons/Somatic-0.2/32x32/apps/firefox.png" titlebar { position = off} }
     rule { name = "urxvt" icon = "/home/dustin/.icons/Somatic-0.2/32x32/apps/gnome-monitor.png" }
     rule { name = "Tomboy" float = "true" }
 }
 
 ######
 mouse
 {
     root { button = "4" command = "tag_viewnext" }
     root { button = "5" command = "tag_viewprev" }
     root { button = "3" command = "spawn" arg = "exec /home/dustin/.awesome/awesome-menu" }
     client { modkey = {"Mod1"} button = "1" command = "client_movemouse" }
     client { modkey = {"Mod1"} button = "2" command = "client_zoom" }
     client { modkey = {"Mod1"} button = "3" command = "client_resizemouse" }
     titlebar { button = "1" command = "client_movemouse" }
     titlebar { button = "3" command = "client_kill" }
 }
 
 ######
 keys
 {
     key { modkey = {"Mod4"}             key = "Return"      command = "spawn" arg = "exec xterm" }
     key { modkey = {"Mod4"}             key = "space"       command = "tag_setlayout" arg = "+1" }
     key { modkey = {"Mod4", "Shift"}    key = "space"       command = "tag_setlayout" arg = "-1" }
     key { modkey = {"Mod4"}             key = "b"           command = "statusbar_toggle" }
     key { modkey = {"Mod4"}             key = "j"           command = "client_focusnext" } 
     key { modkey = {"Mod4"}             key = "k"           command = "client_focusprev" }
     key { modkey = {"Mod4"}             key = "Tab"         command = "focus_history" arg = "-1" }
     key { modkey = {"Mod4", "Shift"}    key = "j"           command = "client_swapnext" }
     key { modkey = {"Mod4", "Shift"}    key = "k"           command = "client_swapprev" }
     key { modkey = {"Mod4", "Control"}  key = "j"           command = "screen_focus" arg = "+1" }
     key { modkey = {"Mod4", "Control"}  key = "k"           command = "screen_focus" arg = "-1" }
     key { modkey = {"Mod4"}             key = "h"           command = "tag_setmwfact" arg = "-0.05" }
     key { modkey = {"Mod4"}             key = "l"           command = "tag_setmwfact" arg = "+0.05" }
     key { modkey = {"Mod4", "Shift"}    key = "h"           command = "tag_setnmaster" arg = "+1" }
     key { modkey = {"Mod4", "Shift"}    key = "l"           command = "tag_setnmaster" arg = "-1" }
     key { modkey = {"Mod4", "Control"}  key = "h"           command = "tag_setncol" arg = "+1" }
     key { modkey = {"Mod4", "Control"}  key = "l"           command = "tag_setncol" arg = "-1" }
     key { modkey = {"Mod4"}             key = "Left"        command = "tag_viewprev" }
     key { modkey = {"Mod4"}             key = "Right"       command = "tag_viewnext" }
     key { modkey = {"Mod4"}             key = "m"           command = "client_togglemax" }
     key { modkey = {"Mod4", "Shift"}    key = "m"           command = "client_toggleverticalmax" }
     key { modkey = {"Mod4", "Control"}  key = "m"           command = "client_togglehorizontalmax" }
     key { modkey = {"Mod1"}             key = "s"           command = "client_togglescratch" }
     key { modkey = {"Mod1", "Control"}  key = "s"           command = "client_setscratch" }
     key { modkey = {"Mod4", "Control"}  key = "Return"      command = "client_zoom" }
     key { modkey = {"Mod4", "Control"}  key = "space"       command = "client_togglefloating" }
     key { modkey = {"Mod1"}             key = "k"           command = "client_kill" }
     key { modkey = {"Mod1"}             key = "c"           command = "client_kill" }
     key { modkey = {"Mod4", "Shift"}    key = "q"           command = "quit" }
     key { modkey = {"Mod4", "Control"}  key = "r"           command = "exec" arg = "awesome" }
     key { modkey = {"Mod4"}             key = "0"           command = "tag_view" }   
     keylist 
     { 
         modkey = {"Mod4"}                             
         command = "tag_view" 
         keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
         arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
     }
     key { modkey = {"Mod4", "Control"}  key = "0"           command = "tag_toggleview" }
     keylist 
     { 
         modkey = {"Mod4", "Control"}                  
         command = "tag_toggleview" 
         keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
         arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
     }
     key { modkey = {"Mod4", "Shift"}    key = "0"           command = "client_tag" }
     keylist 
     { 
         modkey = {"Mod4", "Shift"}                    
         command = "client_tag" 
         keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
         arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
     }
     key { modkey = {"Mod4", "Shift", "Control"} key = "0"   command = "client_toggletag" }
     keylist 
     { 
         modkey = {"Mod4", "Shift", "Control"}         
         command = "client_toggletag" 
         keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
         arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
     }
 
     ###### Custom app launching binds
     key { modkey = {"Mod4"}             key = "x"           command = "spawn" arg = "urxvtc" }
     key { modkey = {"Mod4"}             key = "f"           command = "spawn" arg = "firefox3" }
     key { modkey = {"Mod4"}             key = "t"           command = "spawn" arg = "thunar" }
     key { modkey = {"Mod4", "Mod1"}     key = "Space"       command = "spawn" arg = "mpc toggle" }
     key { modkey = {"Mod4", "Mod1"}     key = "Up"          command = "spawn" arg = "mpc next" }
     key { modkey = {"Mod4", "Mod1"}     key = "Down"        command = "spawn" arg = "mpc prev" }
     key { modkey = {"Mod4"}             key = "r"           command = "spawn" arg = "exec /home/dustin/.awesome/awesome-menu" }
     key { modkey = {"Mod4"}             key = "F1"          command = "spawn" arg = "for i in /usr/share/man/man?;do ls $i; done | cut -d. -f1 | awesome-menu -e 'urxvtc -e man ' 'Manual:'" }
     key { modkey = {"Mod4"}             key = "F2"          command = "spawn" arg = "find /usr/bin -type f -executable ! -empty | awesome-menu -e 'exec ' Run:" }
     key { modkey = {"Mod4"}             key = "F3"          command = "spawn" arg = "cut -d' ' -f1 ~/.ssh/known_hosts | cut -d, -f1 | awesome-menu -e 'urxvtc -e ssh ' 'SSH:'" 
 }

And the amazing config:

# Gigamo <gigamo@gmail.com> (14/05/08)
#
# Configuration file for amazing (http://github.com/dag/amazing)
require 'statgrab'
require 'find'

module Helpers::PangoMarkup
  def urgent(text)
    foreground("#ff5656", text)
  end
  def normal(text)
    foreground("#888888", text)
  end
  def white(text)
    foreground("#ffffff", text)
  end
end

awesome {
  set :statusbar => "top"

  widget("battery") {
    set :interval => 10

    property("text") {
      dir = ""
      if @state == :charging
        dir = "^"
      elsif @state == :discharging
        dir = "v"
      else
        dir = "="
      end

      if @percentage <= 20
        urgent(" #{dir}#{@percentage.to_i}#{dir} ")
      else
        normal(" #{dir}#{@percentage.to_i}#{dir} ")
      end
    }
  }

  widget("mpd") {
    set :interval => 1

    property("text") {
      case @state
        when :playing : txt = ">>:"; show_info = true
        when :paused : txt = "||:"; show_info = true
        else show_info = false
      end
      if show_info
        " #{txt} #@artist - #@title (#@position/#@length) "
      else # Player is stopped or connection not initialized
        " []: not playing "
      end
    }
  }

  widget("gmail") {
    set :interval => 5.minutes
    set :username => "gigamo"
    set :password => GMAIL_PWD

    property("text") {
#      mailcount = 0
#      Find.find('/home/gig/.mail/default/new') do |path|
#        if not FileTest.directory?(path)
#          mailcount += 1
#        end
#      end
#      if @count > mailcount and @count > 0
#        urgent(" #@count")
#      elsif @count < mailcount and mailcount > 0
#        urgent(" #{mailcount}")
#      else
#        normal(" 0")
#      end
      if @count > 0
        urgent(" #@count")
      else
        normal(" 0")
      end
    }
  }

  widget("pacman") {
    set :interval => 1.hours

    property("text") { 
      if @count > 0
        urgent(" #@count ")
      else
        normal(" 0 ")
      end
    }
  }

  widget("clock") {
    set :interval => 1
    set :format => " %T %d.%m.%Y "
  }

  widget("cpu_usage") {
    set :interval => 2
    set :module => :noop

    property("text") {
      percents = Statgrab.new.cpu_percents
      if percents[:user] >= 50
        urgent(" %.1f%% " % percents[:user])
      else
        white(" %.1f%% " % percents[:user])
      end
    }
  }

  widget("cpu_freq") {
    set :module => :cpu_info
    set :interval => 3

    property ("text") {
      ghz = @speed[0] / 1000
      if @speed[0] >= 1000
        urgent("@ %3.2fGHz " % ghz)
      else 
        normal("@ #{@speed[0].to_i}MHz ")
      end
    }
  }
}

Halp. sad

Offline

#2 2008-09-18 19:27:49

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Awesome + Amazing

Do you have the errors that awesome was giving you? I remember having a problem similar to this a long time ago, and it was something to do with pango

Offline

#3 2008-09-18 19:43:34

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: Awesome + Amazing

I may be wrong, but your .awesomerc seems to be from awesome 2.3 and amazing works only with awesome 3


(lambda ())

Offline

#4 2008-09-18 20:13:01

BabyDoc
Member
Registered: 2008-03-20
Posts: 76

Re: Awesome + Amazing

Amazing is for Awesome2.x so that's not the problem.
It's a long shot but have you added amazing to your xintrc?

Offline

#5 2008-09-19 00:11:59

Celarnor
Member
Registered: 2008-09-18
Posts: 3

Re: Awesome + Amazing

heleos wrote:

Do you have the errors that awesome was giving you? I remember having a problem similar to this a long time ago, and it was something to do with pango

It doesn't give any; it doesn't even even write to its log.

BabyDoc wrote:

Amazing is for Awesome2.x so that's not the problem.
It's a long shot but have you added amazing to your xintrc?

Yes (amazing >> ~/.amazing/logs/amazing.log 2>> ~/.amazing/logs/error.log &).

Offline

#6 2008-09-19 00:31:31

Celarnor
Member
Registered: 2008-09-18
Posts: 3

Re: Awesome + Amazing

I was being stupid; this is the error its giving:

/usr/local/lib/site_ruby/1.8/amazing/config/dsl.rb:22:in `import': (eval):4:in `require': no such file to load -- statgrab (LoadError)
    from (eval):4:in `import'
    from /usr/local/lib/site_ruby/1.8/amazing/config/dsl.rb:14:in `initialize'
    from /usr/local/lib/site_ruby/1.8/amazing/config.rb:15:in `new'
    from /usr/local/lib/site_ruby/1.8/amazing/config.rb:15:in `load_dsl'
    from /usr/local/lib/site_ruby/1.8/amazing/config.rb:9:in `initialize'
    from /usr/local/lib/site_ruby/1.8/amazing/cli/helpers.rb:68:in `new'
    from /usr/local/lib/site_ruby/1.8/amazing/cli/helpers.rb:68:in `parse_config'
    from /usr/local/lib/site_ruby/1.8/amazing/cli.rb:54:in `run'
    from /usr/bin/amazing:19

Offline

Board footer

Powered by FluxBB