RSS Feed

Ratpoison : add a conky bar

Posted on

Recently, I’ve been trying to integrate conky with ratpoison.

Conky is a free softwaresystem monitor for the X Window System.

With other window managers like fluxbox, conky would look like this :

But this won’t be useful on ratpoison for two major reasons :

  1. Ratpoison opens each program in a new window; conky will be too.
  2. Since programs take all the space, you won’t see conky while using an application
The solution will be to put conky alone on a bar somewhere on the screen. To do so, you dedicate a zone that ratpoison won’t use. You do this in ~/.ratpoisonrc :
~/.ratpoisonrc
Advertisements

Ratpoison : a list of configuration examples

Posted on

Ratpoison is not the most famous window manager, unfortunatly. Because of that, configuration examples can be hard to find. Here is a lit of ratpoisonrc you can use with your wm.

FYI : ratpoison uses the configuration file called .ratpoisonrc located in your user folder. It should be ~/.ratpoisonrc

Configuration 1 : lucky13linux

# .ratpoisonrc
###########################################################
# some ratpoison eye candy
set border 0
set barpadding 0 0 0 0
set padding 0 0 0 0
set fgcolor yellow
set bgcolor red
set font -xos4-terminus-medium-r-normal-*-*-140-*-*-c-*-iso8859-1
# REBIND DEFAULT ESCAPE TO space
escape C-space
# BIND KEYS -- keep in alphabetical order
# NOTE: can overwrite, just don't overwrite navigation n,p
bind W exec sleep 5; import -window root screen-$(date +%Y%m%d%H%M%S).png
bind f exec firefox
###########################################################
# DEFINE KEYS
# -- use keys similar to dwm to ease transitions
# and because they don't clobber much else...
# motion and wm control
definekey top M-Tab next
definekey top C-M-Tab prev
definekey top C-M-r restart
# applications and utilities
definekey top M-P exec $(dmenu_path|dmenu)
definekey top M-Y exec slock
definekey top M-F exec /opt/firefox/firefox
definekey top M-S exec /opt/sylpheed-1.0.6/bin/sylpheed
definekey top M-G exec gvim
definekey top M-D exec dillo
definekey top M-Z exec aterm -T screen -e screen -DR
definekey top M-M exec aterm -T mc -e mc
definekey top M-X exec /usr/games/xtris
definekey top M-C exec aterm -T calcurse -e calcurse
definekey top M-V exec aterm -T vifm -e vifm
definekey top M-T exec aterm -T tunes -e mocp --theme transparent-background
definekey top M-E exec emelfm
###########################################################
# ALIASES
alias screenshot exec import -window root screenshot-$(date +%Y%m%d%H%M%S).png
alias dscreenshot exec sleep 5; import -window root screenshot-$(date +%Y%m%d%H%M%S).png

Configuration 2 : chris71mach1

Comments: didn’t work by default for my computer

chris71match1’s comment : RatPoision has got to be one of the best window managers out there for linux. If you are more of a minimalist with your workstations, or just like to make things yours, RatPoison is definitely for you. I have been working on this and tweaking this config file for a while now, and I am finally happy with it to the point of using it on multiple boxes. This file has become a collaborative effort between what I have gotten from other .ratpoisonrc files and what I have added and bound for myself. I have left lines from other people in here, in hopes that they may become useful to myself or somebody else down the road.

# This is Chris--'s .ratpoisonrc file
#
# $Id: sample.ratpoisonrc,v 1.6 2003/09/10 22:25:32 sabetts Exp $

# Set the prefix key to that of screen's default
escape less

#Set the contrl-t key to something easier
# this will change the behavior of ratpoison to use a single control key instead of the combination of the ctrl-t.
# The control key set by this string is the "right click start" key on the right side of Windows ready keyboards.
definekey top Menu readkey root
definekey root Menu link less
bind Menu other
bind less other

# Gets rid of that ugly crosshairs default cursor
# and set the background to black
#exec xsetbg -fit -onroot -fullscreen -brighten 80 /home/user/GNUstep/Library/WindowMaker/Backgrounds/linuxos.jpg
exec Esetroot -scale /home/user/folder/folder/image.png -cursor_name left_ptr
exec xsetroot -cursor_name left_ptr

# Emulate screen by starting with a new xterm

# Bind e to our favorite editor, and make it transparent so we can see our background
bind e exec /usr/bin/Eterm -O -f '#e0e0e0' -F fixed --color12 '#0080ff' --exec screen

# bind s to interactively run a surfraw query on freshmeat
#bind s colon exec xterm -e freshmeat 

# bind b (`b' for browse) to open our favorite web browser
bind b exec firefox

# Use the name of the program rather than the title in the window list
defwinname name

#Make key bindings that allow for the fast switching to ratpoison windows numbered 10 and above.
bind N gnext
bind P gprev
bind parenright select 10
bind exclam select 11
bind at select 12
bind numbersign select 13
bind dollar select 14
bind percent select 15
bind asciicircum select 16
bind ampersand select 17
bind asterisk select 18
bind parenleft select 19

# bind M-! to store the current frame layout in slot #1
#bind M-exclam exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`"

#bind M-1 to restore the frame layout in slot #1
#bind M-1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`"

# Do the same for slot #2 and bind it to M-@ and M-2, respectively.

# Give ourselves another slot on M-# and M-3, respectively.
#bind M-0 exec /home/user/bin/fssave 0
#bind M-1 exec /home/user/bin/fssave 1
#bind M-2 exec /home/user/bin/fssave 2
#bind M-3 exec /home/user/bin/fssave 3
#bind M-4 exec /home/user/bin/fssave 4
#bind M-5 exec /home/user/bin/fssave 5
#bind M-6 exec /home/user/bin/fssave 6
#bind M-7 exec /home/user/bin/fssave 7
#bind M-8 exec /home/user/bin/fssave 8
#bind M-9 exec /home/user/bin/fssave 9
#bind M-parenright exec /home/user/bin/fssave 10
#bind M-exclam exec /home/user/bin/fssave 11
#bind M-at exec /home/user/bin/fssave 12
#bind M-numbersign exec /home/user/bin/fssave 13
#bind M-dollar exec /home/user/bin/fssave 14
#bind M-percent exec /home/user/bin/fssave 15
#bind M-asciicircum exec /home/user/bin/fssave 16
#bind M-ampersand exec /home/user/bin/fssave 17
#bind M-asterisk exec /home/user/bin/fssave 18
#bind M-parenleft exec /home/user/bin/fssave 19

# Here's a hack from John Meacham:

#bind a exec ratpoison -d :0.0 -c "echo `date +'%r - %A %n    %D - %B'`  `cal | tail +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\ $(date +%e)\ /\<$(date +%e)\>/\"`"
# make sure to have ccal installed on your box so you can use this calendar feature
bind d exec ratpoison -d :0.0 -c "echo `ccal`"
bind m exec /home/user/.ratmenu/debian.menu
bind exclam colon exec

# it produces output like the following in the message window, very handy:
#         +-----------------------+
#         |05:05:24 PM - Tuesday  |
#         |   09/09/03 - September|
#         |                       |
#         |Su Mo Tu We Th Fr Sa   |
#         |    1  2  3  4  5  6   |
#         | 7  8< 9>10 11 12 13   |
#         |14 15 16 17 18 19 20   |
#         |21 22 23 24 25 26 27   |
#         |28 29 30               |
#         +-----------------------+
#
#
bind t exec thunderbird
# set bgcolor #080808
# set fgcolor #ff9000
#
exec keylaunch
exec xscreensaver -no-splash
bind x exec xscreensaver-command -lock
deffgcolor #FF9000
defbgcolor #000000
defbargravity center
warp on
# these last few lines are actually starting the apps that we use all day every day.
# these apps will start as soon as you start ratpoison.
# note that the Eterm shell has a screen session coming up with it.  make sure your .screenrc is set up for this.
exec /usr/bin/Eterm -O -f '#e0e0e0' -F fixed --color12 '#0080ff' --exec screen
exec firefox
exec thunderbird

To see other configuration from dotfiles.org : click here.

Configuration 3 : phraktured

Comments : handy for the volume part, try google cached copy if link is broken

startup_message off

escape C-z
bind Escape abort

#rudeness is a bitwise or of the following values:
# 1    Transient windows may raise.
# 2    Normal windows may raise.
# 4    New transient windows end up in the foreground.
# 8    New normal windows end up in the foreground.
rudeness 13
warp off

set winname title
set wingravity center
set transgravity center
set border 3
set barborder 3
set padding 0 1 0 0
set barpadding 1 1
set inputwidth 800
set bargravity center
set font "Liberation Mono:size=10"
set bgcolor black
set fgcolor orange
set fwcolor chocolate
set bwcolor black

# Blank Monitor
#bind grave exec xset dpms force off
bind grave exec xscreensaver-command -lock
bind s-L exec xscreensaver-command -lock

bind w exec /usr/share/ratpoison/allwindows.sh
bind C-w exec /usr/share/ratpoison/allwindows.sh

# Stuff

# Applications
bind b exec firefox
bind C-b exec firefox

bind c exec urxvt
bind C-c exec urxvt

alias dmenu exec $(dmenu_path | dmenu -fn fixed -nb black -nf orange -sb orange -sf black || true)
bind x dmenu
bind C-x dmenu

# Sticky Windows
bind d dedicate
bind C-d dedicate

# Undo
bind u undo
bind C-u undo

# Printscreen!
definekey top Print exec import -window root ~/ss-`date +%Y%m%d%H%M%S`.png

# Date/Time
bind C-a exec ratpoison -c "echo `date +'%r - %A %n    %D - %B'`  `cal | tail -n +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\ $(date +%e) /\<$(date +%e)\>/\"`"
bind C-s exec ratpoison -c "echo $(date +'%a %b %d %I:%M%p')"

# Volume
definekey top S-XF86AudioRaiseVolume exec ratvolume Master 3%+
definekey top S-XF86AudioMute exec ratvolume Master 0
definekey top S-XF86AudioLowerVolume exec ratvolume Master 3%-
definekey top XF86AudioRaiseVolume exec ratvolume PCM 3%+
definekey top XF86AudioMute exec ratvolume PCM 0
definekey top XF86AudioLowerVolume exec ratvolume PCM 3%-

definekey top s-Up exec ratvolume PCM 3%+
definekey top s-Down exec ratvolume PCM 3%-

# Focus
definekey top M-Tab next
definekey top M-ISO_Left_Tab prev

# Navigation
definekey top C-S-Up focusup
definekey top C-S-Left focusleft
definekey top C-S-Down focusdown
definekey top C-S-Right focusright
definekey top s-Left prevscreen
definekey top s-Right nextscreen

# Workspaces
exec rpws init 3 -a
definekey top C-M-1 rpws1
definekey top C-M-2 rpws2
definekey top C-M-3 rpws3
definekey top C-M-Left rpwsp
definekey top C-M-Right rpwsn

Configuration 4 : kiddconfigs

Comment: Take a look at kidd other config files, it can be interesting

# find /mnt/hda1/music/  -iname "*$1*-*" | sed -s 's/ /\\ /g'| sed -e 's/(/\\(/g'\ | sed -e 's/)/\\)/g' | xargs mplayer
#set font -etl-*-*-r-*-*-*-400-*-*-*-*-*-*
#defbargravity center
exec xmodmap .xmodmap

set border 3
set fwcolor orange

set barpadding 0 0 0 0
set padding 0 0 0 0

#set bgcolor black
#set fgcolor yellow
set font -*-fixed-*-*-*-*-20-*-*-*-*-*-*-*
#set font -*-terminus-*-*-*-*-20-*-*-*-*-*-*-*

#set font -*-lucida-medium-r-*-*-30-*-*-*-p-*-*-*
unmanage Buddy List
unmanage Downloads
#defbarpadding 0 0 0 0
set framesels "hjklasdfgyuiopqwertnmzxcvb"
#defpadding 0 0 0 0
#defbgcolor darkblue
#deffgcolor grey
#deffont -*-lucida-medium-r-*-*-30-*-*-*-p-*-*-*

exec rpws init 5 -ka
exec xset -b

#exec declare ant_vol=0
#addhook switchwin banish

#1001 ways to set wallpapers
#exec xsetbg walls/2001.jpg
#exec feh --bg-tile wall/ingruppo136.jpg
#exec Esetroot -scale kandinsky.comp-8.jpg
#exec feh --bg-scale screen_lynucs_57778899745ef24c25b5a3_1.jpg
#exec ~/bin/selectwall.pl ~/wall/
#exec xsetroot -solid black -cursor_name left_ptr
alias wallpaper exec ~/bin/wallpaper.pl
#menu
#bind m exec amixer set Master 0
#bind m exec ~/bin/menu

#switching windows
bind w exec ~/bin/windows
bind C-w exec ~/bin/windows
bind e expose
bind Escape abort

#terminals.  Now using urxvt
bind c exec urxvt
bind C-c exec urxvt -tr -tint ivory -sh 10
#bind c exec urxvt -tr -tint ivory -sh 10
#bind C-c exec urxvt
#bind c exec aterm
#bind C-c exec aterm
#bind c exec gnome-terminal

#locking screen
#bind x exec xlock
bind x exec xlock -mode starfish -erasedelay 0 -erasetime 0 -nice 20
definekey top M-F4 exec ~/bin/fuckyou.pl

#bind m exec ratmen OPERA opera MPLAYER 'gmplayer -quiet' Gvim gvim GSlApt 'kdesu -c gslapt' FIREFOX 'firefox' GQView gqview 'MPLAYER NOSOUND' 'gmplayer -nosound' &

#REBINDS PARTICULARS
#bind C-a exec ~/bin/hora
#bind a exec ~/bin/hora

#aliases
alias reload exec ratpoison -c "source $HOME/.ratpoisonrc"
alias screenshot exec ~/bin/screenshot
alias screenpaste exec ~/bin/screenshot; ~/bin/imup.sh /tmp/screen.jpg
alias wall exec ~/bin/selectwall.pl
alias expose exec ~/bin/expose.pl
alias rsem exec ratpoison -c "echo `rem -c+`"
alias r exec ratpoison -c "echo `rem`"
#alias rmen exec ratpoison -c "echo `rem -c`"
alias popout exec ~/bin/popout.sh
alias kf exec killall firefox-bin
#reminders
bind exclamdown r
bind C-exclamdown rsem

#workspaces
bind C-1 exec rpws 1
bind C-2 exec rpws 2
bind C-3 exec rpws 3
bind C-4 exec rpws 4
bind C-5 exec rpws 5
bind C-6 exec rpws 6

#frames n'spliting
bind u undo
bind C-u undo

bind v hsplit
bind C-v hsplit
bind s split
bind C-s split
bind q remove
bind o only
bind c-o only

# definekey top M-h focusleft
# definekey top M-l focusright
# definekey top M-k focusup
# definekey top M-j focusdown

#bind M-! to store the current frame layout in slot #1
bind M-exclam exec $RATPOISON -c "setenv fs1 `$RATPOISON -c 'fdump'`"
#bind M-1 to restore the frame layout in slot #1
bind M-1 exec $RATPOISON -c "frestore `$RATPOISON -c 'getenv fs1'`"

#play.sh
##bind P exec name=`ratpoison -c "prompt Play "`; find /mnt/hda1/music/  -iname "*$name*-*" | sed -s 's/ /\\ /g'| sed -e 's/(/\\(/g'\ | sed -e 's/)/\\)/g' | xargs mplayer

#bind P exec ( ~/bin/play.sh ; exit 0 ) #play now embeeded in rat-finder.pl

#bind n exec ( killall mplayer ; exit 0 ) #next

#bind h exec killall -STOP mplayer #halt

#bind g exec killall -CONT mplayer #go

#bind d exec killall play.sh #destroy :)

#escape M-x

bind a exec ratpoison -d :0.0 -c "echo `date +'%r - %A %n    %D - %B'`  `cal -m | tail -n +2 | sed -e 's/^\(lu\|mo\)/\n\n \\1/i' -e 's/.*/ & /' -e \"s/\ $(date +%e)\ /\<$(date +%e)\>/\"`"

#if mouse is broken
newkmap mouse
definekey mouse C-p ratrelwarp 0 -4
definekey mouse k ratrelwarp 0 -4
definekey mouse M-p ratrelwarp 0 -128
definekey mouse K ratrelwarp 0 -128
definekey mouse C-n ratrelwarp 0 4
definekey mouse j ratrelwarp 0 4
definekey mouse M-n ratrelwarp 0 128
definekey mouse J ratrelwarp 0 128
definekey mouse C-b ratrelwarp -4 0
definekey mouse h ratrelwarp -4 0
definekey mouse M-b ratrelwarp -128 0
definekey mouse H ratrelwarp -128 0
definekey mouse C-f ratrelwarp 4 0
definekey mouse l ratrelwarp 4 0
definekey mouse M-f ratrelwarp 128 0
definekey mouse L ratrelwarp 128 0
definekey mouse g ratrelwarp 0 -1280
definekey mouse G ratrelwarp 0 1280
definekey mouse M-less ratrelwarp 0 -1280
definekey mouse M-greater ratrelwarp 0 1280
definekey mouse C-l ratwarp 640 512
definekey mouse C-a ratrelwarp -1280 0
definekey mouse C-e ratrelwarp 1280 0
definekey mouse space ratclick 1
definekey mouse C-space rathold down 1
definekey mouse C-g set topkmap top
bind semicolon set topkmap mouse

#new testing stuff
definekey top C-ntilde exec
#definekey top C-ntilde exec ~/bin/enye.pl
bind ntilde focus
bind C-ntilde focus
bind C-asciitilde focus

#preparing for switch to us-keyb
bind C-Ntilde colon
bind Ntilde colon

bind dead_acute nextscreen
bind C-dead_acute inext
bind C-Tab nextscreen
#ratpoison -c 'fdump' | sed 's/,/\n/g' | sed '/^ *$/d' | sort -n -k 19 | head -1 | sed -r 's/.*:width ([0-9]+) :height ([0-9]+).*/\1x\2/'

bind period inext
bind C-period inext
bind comma iprev
bind C-comma iprev

#screen
bind F12 exec ~/bin/f12.sh

#great stuff
#more on http://raimonster.googlepages.com/rat-finder
bind j exec ~/bin/ratfinder/Unix-RatFinder/script/rat-finder.pl
bind C-j exec ~/bin/ratfinder/Unix-RatFinder/script/rat-finder.pl 

#ratpoisonrc

bind plus exec ~/bin/rat-volume.sh 10%+
bind ccedilla exec ~/bin/rat-volume.sh 10%-
newkmap vol
definekey vol plus exec ~/bin/rat-volume.sh 10%+
definekey vol ccedilla exec ~/bin/rat-volume.sh 10%-
definekey vol Return set topkmap top

bind M-F2 gmove 2
bind M-F3 gmove 3
bind M-F4 gmove 4
bind M-F5 gmove 5
bind M-F1 gmove 0
rudeness 12

definekey top s-0 select 0
definekey top s-1 select 1
definekey top s-2 select 2
definekey top s-3 select 3
definekey top s-4 select 4
definekey top s-5 select 5
definekey top s-6 select 6
definekey top s-7 select 7
definekey top s-8 select 8
definekey top s-9 select 9

Ratpoison : the perfect wm

Posted on

If you have been running Linux for some time, you have probably notices desktop environments could be heavy, too heavy. Ever since I noticed that, I wish I could find a desktop environment that would simply be a dos-like screen in which I would call a browser, for example, within the terminal.

Searching on google for lighter DE (desktop environments), I stumbled across XFCE and LXDE. Both are very simple and fast, but none offers the flexibility I was looking for. I then looked for window managers (WM). I played for some time with wmii, but it was still too bloated for me. I then discovered Ratpoison. I was amazed by the simplicity of the WM. Basically, every single program opens full-screen, in its very own window. For example, if you open Chromium (which is lighter than Firefox :P) and then, say leafpad, both will be on their on window, meaning you will only see one at a time. To switch between the two, you simply have to call a keybinding followed by the window number. So simple! Of course, you can make both programs show on one screen, each taking half of the space.

Before continuing, here are some links for deeper understanding and screenshots from the official website.

Screenshots :

Poll #1

Posted on

Here we go, our first poll for the blog. We want to know : how did you hear about us? Using a search engine, a friend, a forum? Tell us how and don’t forget to comment!

Fedora 15, disponible en téléchargement

Posted on

Eh oui! Vous avez bien lu! Fedora 15 est disponible en téléchargement  depuis le 24 mai!

Bon, depuis quelque temps, on observe un réelle guerre de beauté. Avec le renouvellement de l’interface d’Ubuntu, Fedora ne pouvait rien faire d’autres que de créer un toute nouvelle interface qui me rappelle étrangement celle de Meego par son intuitivité et son ergonomie.

Essayez cette nouvelle version qui brille par son nouveau GNOME3.

Liens :

Hello world!

Posted on

Welcome to day2daylinux.wordpress.com! This is my first blog. It will be about Linux, everyday Linux. So get ready for a ton of articles, tutorials, videos and stuff like this that will blow you mind away! Be ready to take the control back!