You are not logged in.

#1 2008-05-01 14:58:22

axion419
Member
Registered: 2007-04-12
Posts: 185

Can someone help me with awesome-menu on awesome-git ?

I updated to the git version of awesome, and I wanted to insert a menu with it.  I looked at the wiki, and was kinda of confused.  my first attempt said the config was ok, but the menu wouldnt launch, so i know i have something screwed up, something simple I imagine.

I want this menu
Is this just bash scripting?

#!/bin/bash
 ####
 #
 # awesome-menu-builder - Simple shell script to build menus for 
 # awesome-menu.
 #
 # Concept from http://www.calmar.ws/tmp/dmenu_do
 #
 ####
 
 # build your menu here with whatever simple names you want to use
 MENU="rxvt
 firefox
 pidgin
 xfe
 vim
 mutt
 logout
 "
 # display the menu and yank the choice made
 CHOICE=$(awesome-menu <<< "${MENU}" "Run: ")
 # parse the choice
 case ${CHOICE%% *} in
     # you only need to put lines here for what you want to run
     # differently than the rest
     rxvt)
         awesome-client <<< "0 spawn rxvt -fg white -bg black"
     ;;
     logout)
         awesome-client <<< "0 quit"
     ;;
     vim|mutt)
         awesome-client <<< "0 spawn rxvt -fg white -bg black -e '${CHOICE}'"
     ;;
     *)
        awesome-client <<< "0 spawn ${CHOICE}"
     ;;
 esac

But, it doesn't tell me what to save this file as or what to use as the menu entry in the awesomerc.  That is where i messed up I imagine.  i created a ~/.awesome/menu folder . saved this file in it, ( i didn't make it executable or give it a file extension - if that matters)

I see this in the wiki for menu's

 key { 
   modkey = {"Mod4"} 
   key = "p" 
   command = "spawn" 
   arg = "exec `cat ~/.awesome/menu | awesome-menu 'Run:'`" 
 }

BUT, im unclear of what to change the "arg" line to "exec ~/.awesome/menu/FILE " i would imagine, but do i remove the " |" and awesome-menu ;Run or leave it in?

It then mentions stylizing the menu, with this

 menu Run:  
 {
   styles
   {
       normal { 
         bg = "#0a0a0a" 
         fg = "#a0a0a0" 
         shadow = "#111111" 
         shadow_offset = "1" 
       }
       focus { 
         bg = "#285577" 
         fg ="#ffffff" 
         shadow = "#111111" 
         shadow_offset = "1" 
       }
   } 
   y = "0"
   x = "180"
   height = "14"
 }

Do i just stick that anywhere in my .awesomerc?  I have been able to chop the config up etc, mostly from looking at gigamo's, but He runs the awesome 2.3, so i cant just copy verbatin from him.  I just need some directions on the parts Im unclear with, and ill be fine.  Thanks ahead of time, Justin.

Offline

#2 2008-05-01 23:05:10

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

Re: Can someone help me with awesome-menu on awesome-git ?

Hi! Axion419,
You should sit down and read the code patiently. It is not that difficult to understand.
Arch is full of scripts and it forces you to learn it. That's the beauty of Arch.
If you want to stick to your mouse, there are many other linux distros good for point-and-click on everything.

To address your questions:

1.The first part of the code you posted IS a bash script and what it does is to pass $MENU to awesome-menu, then the selection becomes $CHOICE.
The CASE part is to run different apps based $CHOICE. The only reason to create such a script is to run some CONSOLE based apps, like mutt or vim. If you run it directly without calling a terminal program (urxvt in this case), nothing will show up.
So, what you need to do is to save this script somewhere and make it executable. Let's called awesome_menu_selection.

2.Then, in your Keybinding config. You should change your 'arg'. This config will let awesome know it should run awesome_menu_selection when you click certain keys.

arg = "~/XXXXX/awesome_menu_selection"

3.You can put your "menu" config either in your .awesomerc, or your can save it as a file and call it from your .awesomerc by "source" that file

Offline

#3 2008-05-01 23:12:34

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

Re: Can someone help me with awesome-menu on awesome-git ?

BTW,
awesome-git = awesome 2.3
awesome = awesome 2.2
awesome3-git = awesome3

Offline

#4 2008-05-02 13:30:27

axion419
Member
Registered: 2007-04-12
Posts: 185

Re: Can someone help me with awesome-menu on awesome-git ?

heh, I understood the code lol, I just couldnt get awesome to launch it right, I think my problem was more with chmod and the 'arg' what you posted didnt work either, but I manage to just make a file called menu, and cat it.  Which works for some programs, but not for the good ones, rtorrent mc ncmpc etc.

Offline

#5 2008-05-02 14:16:33

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

Re: Can someone help me with awesome-menu on awesome-git ?

axion419 wrote:

heh, I understood the code lol, I just couldnt get awesome to launch it right, I think my problem was more with chmod and the 'arg' what you posted didnt work either, but I manage to just make a file called menu, and cat it.  Which works for some programs, but not for the good ones, rtorrent mc ncmpc etc.

Have you tried the default awesome-menu launcher?

arg = "find /usr/bin -type f -executable ! -empty | awesome-menu -e 'exec ' Run:"

Offline

#6 2008-05-02 16:18:22

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

Re: Can someone help me with awesome-menu on awesome-git ?

axion419 wrote:

heh, I understood the code lol, I just couldnt get awesome to launch it right, I think my problem was more with chmod and the 'arg' what you posted didnt work either, but I manage to just make a file called menu, and cat it.  Which works for some programs, but not for the good ones, rtorrent mc ncmpc etc.

Did you notice that all apps which didn't work rely are console-based?

Offline

Board footer

Powered by FluxBB