Feb 16, 2011

Ratmenu









I discovered ratmenu a while back and have been using it ever since.
Here's the script i use to launch it:

#!/bin/sh

ratmenu -font 6x12 -fg "#444" -align center -style dreary \
"ratpoisonrc" "ratpoison -c 'exec urxvt -e vim $HOME/.ratpoisonrc'" \
"ncmpcpp" "ratpoison -c 'exec urxvt -e ncmpcpp'" \
"mail" "ratpoison -c 'exec urxvt -e mutt'" \
"color" "ratpoison -c 'exec zenity --color-selection'" \
"top" "ratpoison -c 'echo $(top -b -n 1 | head -n 24)'" \
"battery" "ratpoison -c 'echo $(cat /proc/acpi/battery/BAT0/state)'" \
"dmesg" "ratpoison -c 'echo $(dmesg | tail)'" \

As this is a shell script it can be written on a single line or in multiple lines as above. If you decide to write it in multiple lines don't forget to separate them with backslashes so that the script is read by the shell as a single line. No backslash on the last line.
The first line is, of course, the shebang. The next line runs ratmenu with the fixed-medium-semicondensed font. I have the menu set up with gray text on a black background.
Lines 3 -9:
> Opens my ratpoison configuration file in vim for quick editing.
> Launches ncmpcpp (music player) in a terminal
> Launches mutt (mail client) in a terminal
> Uses zenity to display a colorpicker. I use this when editing my .Xdefaults and such.
> Pipes top (system information summary) to the ratpoison message area
> Pipes battery information to the ratpoison message area
> Prints the message buffer of the kernel in the ratpoison message area

16 comments:

  1. Looks like a useful tool, I personally don't use linux though.

    ReplyDelete
  2. Anonymous2/17/2011

    I'm curious. What are the benefits of ratmenu? Why should I use it?

    sorry just curious that's all.

    ReplyDelete
  3. @Niko
    It's easy to access. All it takes is a simple keybinding and you can fire up the menu whenever and wherever you want.
    You can add sorts of stuff to the menu. You can start/stop processes without having to type it out in a terminal, mount/umount partitions, check system information..again without the need to open a terminal, start whatever application you desire.
    etc.

    ReplyDelete
  4. Looks decent... for a linux user.

    ReplyDelete
  5. If I only knew how to begin to use linux

    ReplyDelete
  6. @Bilbo
    There are distros out there that are targeted at new users and "just works" out of the box.
    I prefer to build my system from scratch though..
    I did however use a beginners distro when I tried linux for the first time.

    ReplyDelete
  7. interesting post! if only i knew how to work linux

    thatssobro.blogspot.com

    ReplyDelete
  8. Oh yeah, I can see how your blog could be useful to me, keep up the good job

    ReplyDelete
  9. I've been wanting to try ratpoison for a while now... Maybe next week I'll try installing :)

    ReplyDelete
  10. awesome stuff I love *nix :) fluxbox has a menu that looks kind of like that (ofc that's a gui though) following :)

    ReplyDelete
  11. Cool blog. I don't use linux though.

    Following!

    ReplyDelete
  12. I wish I knew a bit more coding,but looks good

    ReplyDelete
  13. Nice man, haven't really familiarised myself with this kind of stuff!

    ReplyDelete
  14. Tried ubuntu on my craptop for a week. It did the job of fixing a bricked harddrive, but for any practical uses, I was unsure how to use it.

    ReplyDelete