Git Product home page Git Product logo

rpbar's Introduction

rpbar

Intro

Here's a screenshot. rpbar is the small bar at the bottom.

The 'default' way to switch windows in Ratpoison is to press C-t-w to get the window list, find the number of the window you want to switch to (let's say it's 2), and press C-t-2 to switch. rpbar is a simple taskbar that gives a permanent display of the windows in the current group in order to make the first C-t-w unnecesary. As a concession to The Rat, clicking on a window title will select that window. This is useful for one-handed window selection.

The main inspiration is the simple task bars you get in other minimalistic window managers such as Awesome or wmii. rpbar's appearance is modeled on these task bars.

The other inspiration is ratbar.pl. rpbar does less that ratbar.pl, but does it better. As far as I can tell, ratbar.pl uses polling to update its window list. This makes it unresponsive, which is very annoying. rpbar uses Ratpoison's hook feature to refresh as soon as you select windows, close windows, change groups, etc. It's not as fast as it would be if it were part of Ratpoison, but it's pretty usable.

How it works

rpbar is a pretty simple C++ project. It consists of two executables:

  • rpbar runs in the background. It gets the window list from Ratpoison and displays it using the Xlib library.
  • rpbarsend sends a message to rpbar, telling it to refresh its window list. It should be invoked by Ratpoison hooks.

Compilation and usage

Obviously, you should have a working g++ toolchain. You'll also need Xlib and Xft. If you're using Ubuntu or Debian, what you need is in the build-essential, libx11-dev and libxft-dev apt packages. Then you should:

  1. Type make to compile.

  2. Put rpbar and rpbarsend in your path.

  3. Add the following to your .ratpoisonrc:

     # tell ratpoison to ignore rpbar
     unmanage rpbar
     # leave space for bars
     set padding 0 14 0 14
     # start rpbar 
     exec rpbar
     # hooks
     addhook switchwin exec rpbarsend
     addhook switchframe exec rpbarsend
     addhook switchgroup exec rpbarsend
     addhook deletewindow exec rpbarsend
     # RP versions >= 1.4.6 (from the git repo) have these hooks.
     # Recommended!
     # addhook titlechanged exec rpbarsend
     # addhook newwindow exec rpbarsend
    
  4. Restart Ratpoison or manually execute rpbar (it should run in the background).

Now, what if you don't like the colors? The font size? The bar height? Right now, the only way to change them is changing settings.hh and recompiling, a la dwm. I know, it's unfriendly. I'll eventually add the capability to read a config file at startup and/or take command line arguments.

Thanks

  • horgh for revamping font drawing with Xft

Status

I consider rpbar to be alpha. Maybe beta. It's "good enough" for my daily use, but it's pretty rough in the edges. Caveat emptor.

rpbar's People

Contributors

dimatura avatar horgh avatar xtaran avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.