You are not logged in.

#1 2008-04-23 17:45:32

sebastorama
Member
Registered: 2008-04-23
Posts: 10

[Solved] Amazing Issue

Hi, I'm new to Arch, and liked it a lot. It's very similar to my old Gentoo (light, simpler), and is less 'time consumer'.
I like tiling WM, and was a pretty customized and elegant ion3 setup.
When migred to Arch, I decided to try Awesome+amazing.

I installed awesome-2.3 from git and amazing from the config branch from git too.
Awesome is up and running, with some 'widgets' made by me in simple bash script, but, I can't put amazing on.
When I try
"amazing" or even "amazing /home/sebastorama/.amazing/config.rb" I get this error message:

F, [2008-04-23T14:43:54.215513 #19410] FATAL -- : Unable to parse configuration file, exiting

I'm pretty annoyed with that. Found nothing about in google and other sources...
And sorry about my poor english =p

Last edited by sebastorama (2008-04-23 23:25:47)

Offline

#2 2008-04-23 20:07:32

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: [Solved] Amazing Issue

First of all, if you're going to use amazing, you won't need any bash scripts.

And the answer to your problem is, you simply have no config file. smile Should be named config.rb in ~/.amazing

Offline

#3 2008-04-23 20:08:02

phabulosa
Member
From: Mountain View, CA
Registered: 2007-10-17
Posts: 182
Website

Re: [Solved] Amazing Issue

post your config.rb here

Offline

#4 2008-04-23 20:12:55

sebastorama
Member
Registered: 2008-04-23
Posts: 10

Re: [Solved] Amazing Issue

Gigamo wrote:

First of all, if you're going to use amazing, you won't need any bash scripts.

And the answer to your problem is, you simply have no config file. smile Should be named config.rb in ~/.amazing

Yeap =p I know that.. I have some bash scripts cause I cannot put Amazing up working..

My config file:

# Gigamo <gigamo@gmail.com> (22/04/08)
#
# Configuration file for amazing (http://github.com/dag/amazing)
# Only works with amazing's 'config' branch.
import "#{ENV["HOME"]}/.passwords.rb" # GMAIL_PWD

BLINK = {}
COLOR = { :urgent => "#ff5656",
          :normal => "#a0a0a0" }

awesome {
  set :statusbar => "top"

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

    property("text") {
      # Set some hacky direction 'symbols'
      case @state 
        when :charging : dir = "^"
        when :discharging : dir = "v"
        else dir = "="
      end
      " #{dir}#{@percentage.to_i}#{dir} "
    }

    property("fg") {
      if @percentage <= 20 : COLOR[:urgent]
      else COLOR[:normal]
      end
    }
  }

  widget("alsa") {
    set :property => "data master"
    set :interval => 1.minutes
  }

  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") {
      # Make the widget blink upon new mail!
      BLINK[@identifier] ||= []
      if @count > 0
        if BLINK[@identifier].empty?
          BLINK[@identifier] << IO.popen("#{ENV["HOME"]}/bin/blink.rb 1.0 0 top #@identifier fg #{COLOR[:urgent]} #{COLOR[:normal]}")
        end
      else
        BLINK[@identifier].each do |blinker|
          Process.kill("SIGINT", blinker.pid)
        end
      end
      # The actual string that's displayed
      " #@count"
    }
  }

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

    property("text") { " #@count " }

    property("fg") {
      if @count > 0 : COLOR[:urgent]
      else COLOR[:normal]
      end
    }
  }

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

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

    property("text") { " #{@usage[1].to_i}%/#{@usage[2].to_i}% " }

    property("fg") {
      if @usage[0].to_i >= 50 : COLOR[:urgent]
      else "#ffffff"
      end
    }
  }

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

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

    property("fg") {
      if @speed[0] >= 1000 : COLOR[:urgent]
      else COLOR[:normal]
      end
    }
  }
}

Yeah, it's Gigamo's config file =p

Offline

#5 2008-04-23 20:34:19

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: [Solved] Amazing Issue

If that file is located in ~/.amazing, and you are running the config branch, that should work. double check that it is in that location.

Also may want to remove the import, suppose you don't have that file.

PS2, for that config to work you need your widgets in .awesomerc named like they are in my config.rb

Last edited by Gigamo (2008-04-23 20:35:20)

Offline

#6 2008-04-23 22:29:30

sebastorama
Member
Registered: 2008-04-23
Posts: 10

Re: [Solved] Amazing Issue

Gigamo wrote:

If that file is located in ~/.amazing, and you are running the config branch, that should work. double check that it is in that location.

Also may want to remove the import, suppose you don't have that file.

PS2, for that config to work you need your widgets in .awesomerc named like they are in my config.rb

Yeah, they are defined in .awesomerc as well since my .awesomerc is yours with some little modifications =p.
I'll try to rebuild Amazing, and ensure it's from config branch, I'll post the results soon.

Thx for backup and support...

Last edited by sebastorama (2008-04-23 22:29:57)

Offline

#7 2008-04-23 23:24:18

sebastorama
Member
Registered: 2008-04-23
Posts: 10

Re: [Solved] Amazing Issue

Solved =p

The problem was the 'Import'. Thx for your support =p
(I was some blind these days and passed some time analyzing the amazing code. Discovered that the problem isn't that the config file doesn't exist, is that it has something wrong. And found the Import problematic line =p... Maybe you should post your ~/.credit_card.rb with your ~/.password.rb in your repository cool .. hehe.. Need some coffee.. How blind I was...)

- Ps: I saw your suggestion to remove Import only now =// hehe .. Thx =p

Last edited by sebastorama (2008-04-23 23:44:33)

Offline

Board footer

Powered by FluxBB