«

»

Jul 23

Compiling “Ipager” for better workspace-switching

ipager-1.1.0.tarA shot of Ipager doing its thing on my fluxbox desktop.

To put it simply, Ipager is an awesome program. Whenever I use Gnome, one of the applets that’s always on my gnome-panel is the workspace-switcher applet. One of the major problems with that app is the size. Workspace-switcher is TINY and there’s no setting to change that nor will there ever be as it’s an applet made to live inside the gnome-panel.

Ever since I came back to Fluxbox (as opposed to Gnome) I always missed the workspace-switcher applet. In trying to find a viable replacement for Fluxbox aside from running an instance of the gnome-panel (which is totally do-able by the way as it’s a separate program you can call from the CLI with “gnome-panel”) I stumbled upon Ipager.

Ipager is extremely poorly documented, no longer developed (from the state of the developer’s website), and not available in any kind of binary package in the Ubuntu repositories… yea I know… it sounds pretty sketchy at this point. How could poor documentation, no binary and no support be a recipe for “Winning”? Well for one… LOOK at it! It’s a work of art! Another major plus is the fact that every single aspect of it is utterly configurable to the core. If you’ve ever gotten down configuring another desktop customization program called “conky” you will be right at home here with the exception that Ipager is not as complex.

Preparing the Ipager Source-code for Compilation:

First, download the tarball containing the source-code for Ipager. Extract the tarball to a directory of your choosing and let’s get ready to modify some files before we start to build it.

First use your favorite text editor to open up the following files:

  • iconfig.cpp
  • wm.cpp
Add “#include <stdlib.h>” [excluding quotations] to the section of existing includes at the top of each of the files above. Save those changes and close the files out. Next open the  ”./ipager-1.1.0/SConstruct” file in the root directory of the ipager source code [with your text editor]. We’re going to change the following four lines of the file starting at line 118:
Original:
            CPPPATH = imlib2_env.Dictionary()['CPPPATH'],
            CCFLAGS = imlib2_env.Dictionary()['CCFLAGS'],
            LIBPATH = imlib2_env.Dictionary()['LIBPATH'],
            LIBS    = imlib2_env.Dictionary()['LIBS']

Modified:

            CPPATH = imlib2_env.Dictionary().get('CPPATH'),
            CCFLAGS = imlib2_env.Dictionary().get('CCFLAGS'),
            LIBPATH = imlib2_env.Dictionary().get('LIBPATH'),
            LIBS    = imlib2_env.Dictionary().get('LIBS')

Save the changes and close the files out. With the modifications in place we’re ready to start the build.

Build Procedure:

Before we build the source, we need to install a few programs. Ipager uses SCONS (which stands for “Software CONStructor”) instead of a makefile. SCONS uses python scripts instead of a makefile in the traditional sense because they are considered easier to write in most cases than a makefile. So we’ll need to install SCONS as well as another library from the Ubuntu repositories “imlib2″; also since SCONS uses python scripts, we’ll need the python wrapper for “imlib2″ let’s install those guys so we can get to the good stuff.

$sudo aptitude install scons libimlib2-dev python-kaa-imlib2
*If you don’t have “aptitude” installed then you know what to do… sudo apt-get install aptitude*

UPDATE: For Ubuntu 12.04 you’ll need to install “libxmu-dev” as well. In addition to the programs mentioned above you will need the meta-package “build-essentials” which will set you up with everything needed to compile C code.

Alright at this point keep your terminal open and surf to the directory where you extracted the Ipager source and start the build process.

$cd ~/Downloads/ipager-1.1.0/
$scons
$sudo scons install 

Nifty, at this point Ipager should be installed and the output of “whereis ipager” should look something like this:

$whereis ipager
ipager: /usr/local/bin/ipager

With Ipager installed let’s get it working now.

Configuring Ipager:

You’ll need to excuse me for a moment while I document the hell out of the configuration for Ipager because it is largely undocumented on the internet and this program deserves to find new-life and live on.

First download the sample configuration files here.

Extract those configuration files and let’s take a look at the file “custom1.conf”:

# Custom1.conf theme for ipager developed
#    by Eric from ConfigNewton.com

# Space in between the workspaces
icon.spacing:      10

# Standard width for workspaces
icon.min_width:    160
# Width during mouseover for workspaces
icon.max_width:    185
# Standard height for workspaces
icon.min_height:   85
# Height during mouseover for workspaces
icon.max_height:   115
icon.maximize_threshold: 0.9

#
# IPager window position
#   as measured from the upper lefthand
#   corner of the screen.
ipager.window.x: 850
ipager.window.y: 950

display_sticky_windows:   yes
display_shaded_windows:   yes

#
# Button to switch workspaces
#
#
# [ left | right | middle | any ]
# or
# set of buttons like:
#    left, right
#    middle, right
#
switch_workspace.button: any

#
# Delta (in pixels)
#
# when an workspace icon changes its size
# IPager compare new values and previous.
# If they differ less then 'zoom.recreate_icon_delta' then
# IPager continues to use an old icon and just zoom it.
# If the sizes differ more 'zoom.recreate_icon_delta's value,
# then IPager creates a new icon picture.
# it is not very efficient to create icons often.
#
zoom.recreate_icon_delta: 3

# Defines style of zooming icons. Should an icon spacing be expandig or
# an active workspace icon lays over other (cross them)?
#
#   [zoomAndExpand | over]
#
zoom.type: over

display_workspace_number: yes
workspace_number.color:   #FFFFFF

# Font Options
#   Ubuntu's default font directory is located at
#   /usr/share/fonts/truetype/... find the directory
#   for the font you like and use that as the value
#   for ttf_font_path. ttf_font is the exact filename
#   of the font you want to use [excluding ".ttf"]
#   the "/16" following is the size of the font.
ttf_font_path: /usr/share/fonts/truetype/ubuntu-font-family/
ttf_font: Ubuntu-B/16

#
# Background image for IPager window
#   uncomment this option to fill an
#   empty workspace with an image of
#   your choice
#ipager.background.image: /path/to/image.png

#
# Colors (#RRGGBB)
#
ipager.background.color:
ipager.border.color:

workspace.background.color:
workspace.border.color: #FFFFFF
active_workspace.background.color:
active_workspace.border.color:  #FF0000

window.background.color:        #20419f
window.border.color:		#77a6ff
active_window.background.color: #22769b
active_window.border.color:     #aae0ff

selection_color: 	#71d6b3
#
# Option to display program icons
#
#
# [ yes | mouseOver ]
# or
# leave this option commented-out
# for the default behavior of "never"
#
display_window_icon:	yes

You can see the vast number of options that Ipager is able to support, nearly every aspect of its visual appearance is configurable. Play around with it and post any cool modifications to themes or pictures in the comments.

6 comments

1 ping

Skip to comment form

  1. lomoz

    thanks, more than useful.. i had to install libxmu-dev to succesfully install ipager.. but I’m on an Xubuntu box if that makes any difference in this case

    1. Eric

      Interesting, I run a Xubuntu-laptop with XFCE disabled instead running fluxbox as my desktop environment and I don’t think I needed “libxmu-dev”. Although it’s been a while so I could easily be wrong, anyways I’m glad you were able to get it working and leave it in the comments for others in case they have trouble. It really is a sick program ehh?

  2. JanPenguin

    Hi Eric,

    Thanks alot. ^^

    I was building ipager from the source. Debian doesn’t have ipager package yet.
    I followed above instruction to build and install it. It worked out flawless.

    I had to play around the two variables in the configuration file.
    Below values works for my Xorg 1400×900 mode.
    ipager.window.x: 0
    ipager.window.y: 800

    It generates a run-time warning message of Imlib2:
    This program is calling the Imlib call:
    imlib_render_image_on_drawable();
    With the parameter:
    image
    being NULL. Please fix your program.

    The program works though. I will read through the configuration options later on.

  3. LionelB

    Great, thanks!

    I also run fluxbox (on Xubuntu and CentOS), and there’s really no workspace pager to touch ipager for functionality and aesthetics.

    Shame no-one has taken over maintenance and got it into the distros – unfortunately I don’t have the know-how…

  4. Joseph

    Hi Eric, thanks. It’s very useful, I install and configure the ipager accronding to your tutorial.
    However, there still exist a problem that I cannot figure it out:

    I found that I can not make the ipager sticky on the desktop just like slit dockapp or conky do.
    When I execute the `show desktop` command, it also becomes minimium, and I cannot find it again.

    I want to know whether there is some configure item to solve the problem? thanks anymore.

    1. Eric

      My guess is that this is going to come down to some kind of weird compositing issue. I’ve seen the behavior you’re describing before. Certain window managers can interfere with the behavior of apps that write directly to the desktop (like conky or the slit). Unfortunately without knowing more about your circumstances I can’t help. Although I’ve always found those issues to be convoluted as well. For instance Conky never seems to run right when using the nautilus window manager inside of gnome; desktop icons will be obscured etc. perhaps a comment fairy will come and give us a solution.

  1. Fluxbox: An introduction and “How-To” » ConfigNewton.com

    [...] that start along with Fluxbox. It is in this file that you might want to add common programs like Ipager, or nm-applet to manage your network connections. Fluxbox by default will load nothing; which means [...]

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>