Archive for the ‘openbox’ Category

One step closer to useful

UI usability is consistently my no. 1 time-suck. I’ve ‘wasted’ countless hours config’ing and reconfig’ing GNOME panels into assumed-need sorts. I’ve given up and returned to Mac & heeded again the siren call to Linux’ potential simplicity.

My latest spin *was* playing with screen-maximizing UI’s: task-bar-less environments, panel-over-top window-titlebars, then I turned wanna-be tablet with the iPen.

But I’ll not deny, the best ‘inspiration’ has been the non-existent-yet(?) Microsoft Courier. Here’s a list of the bits, related & not, which I’ve come up with:

Dual-pane

My 13″ macbook is nearly-exactly 2×9″ screens. Yes, this is very Courier-esque. Especially if I use Linux’ dragbox in between panes! But the benefit here is window management. In Xwindows-land, there’s lots of these things called ‘window managers’. They’re supposed to, y’know.. manage windows. What do they ACTUALLY do? Place windows in wierd locations & sizes which require you to use a taskbar, alt-tab or expose’ your day away. I’m not down with that. Time for a ’tiling” window manager. Yet I’m just looking for 2 panels, and on a 13″ screen, that’s plenty. If I config my window-placer-thing to throw some of my apps on the left, I (craziest idea ever) can expect them to be there. I know where they are! Which leads me to my next point..

Priority

Since I’m not fussin’ with my 9 windows that are open, wondering where to look for ‘em (something a taskbar is supposed to do, but doesn’t supply the requisite window-parallel usage scenario).. anyways, since I’m not wasting time placing windows, I can focus on what I’m supposed to be doing: being a human with responsibilities over resources and being creative and learning. Those are the categories my applications have taken: email, calendar & files on the left, OpenOffice, Journal & Web on the right.

Lists, lists, lists!

Perhaps this is more iphone-y than anything, but there’s some goodness to be had with the removal of clutter (and there’s plenty on the web!) Yet, I use google calendar & email all day long. I don’t need another cal or mail app, I just need a browser open with these bits in it. But even these apps aren’t clean. Facebook, Yahoo Mail, Google Mail, Google Reader AND Google Calendar ALL have sidebars. Why, oh why do we need sidebars? They take up sooo much screen real-estate, especially after you scroll.

Bad:

What you get when viewing web-apps half-screen'd or in portrait

What you get when viewing web-apps half-screen'd or in portrait

Good:

Ahh, mobile: a clutter-free web-experience!

Ahh, mobile: a clutter-free web-experience!

You just have to load the mobile versions of the webapps you use. To find them, I viewed them on my phone & checked the url. I’ve also found the ‘print’ versions of yahoo news to be similarly readable.

Conditions: sure forcing all my windows into 2 locations (left/right) & 2 states (half-screen or maximized) is ‘limiting’, but I’m a limited human! I need some parallels here to stay sane. I can’t be moving & resizing windows all day long.

Perhaps I’m just getting old, and will eventually regress into the old lady who only has one window open (maximized) at a time. Until then, this is a good compromise.

Read Google Calendars from Orage!

Holy crap! My fav toolbar calendar is more than just a calendar! It does alarms & full ICS input & output! With a little scripting & cron, I get the day’s events with one click!

#!/bin/sh
cd ~/tmp
wget http://www.google.com/calendar/ical/--your-private-gcal--url/basic.ics
mv basic.ics calname.ics

Just repeat the wget & mv for all calendars, add an hourly cron job & add the files to orage’s preferences/foreign calendars tab!

Love is simplicity!

A Better Openbox transparency

I’m lately in love with openbox for it’s simplicity and lack of screen-coverage. Sure I could have setup my desktop within xubuntu, but I wanted to expand my horizons.

My original theory was for netbook application, maximizing screen real estate & reducing the hard drive & processor use. But lately, I’ve been toying with xcompmgr, hardly a ‘wise’ use of resources.

While Urukrama has a wonderfully extensive Openbox config page, I didn’t find the “make all inactive windows 60% transparent” like I was looking for.

A little googling gave me the solution I was after, but it was insanly processor/battery intensive! (That’s what ya get for writing an infinite loop! ) At first I tried putting a “sleep” command in the loop, and that did tremendous wonders for retaining processor use, and slowing down my frantic computer-work pace. Still, I wasn’t pleased.

So here, without further ado, is my xcompmgr+transset-df+perl script for setting all non-active windows:

#!/usr/bin/perl -w

# This script is a modification my M.Wallace of the
# original written by Andrei Perhinschi
# and is licensed under the GNU GPL license
# http://www.gnu.org/licenses/gpl.html

# Much thanks goes to Daniel Forchheimer (http://www.forchheimer.se/)
# for creating transset-df and the eutotrans
# script from which this script gets its inspiration

if ( !defined $ARGV[0] || !defined $ARGV[1] || !defined $ARGV[2] ) {
die "Usage: focustran-once <unfocused value> <focused value> <refresh value (secs)>\n";
}

# default values
$trans_val = $ARGV[0];
$opaque_val = $ARGV[1];
$sleep_val = $ARGV[2];

# grab all window IDs
@win_ids = `xwininfo -root -all`;
foreach my $win_id ( @win_ids ) {
unless ( $win_id =~ /has\ no\ name/ || $win_id !~ /0x/ || $win_id =~ /Desktop/ ) {
 $win_id =~ /\ \"/;
 $win_id = "$`";
 $win_id =~ s/\s//g;
 push @id_lines, $win_id;
 }
}

#print "ID_LINES:@id_lines\n";

# find my active window
my $active_id = `xprop -root  | grep "_NET_ACTIVE_WINDOW(WINDOW): window id # "`;
$active_id =~ /\#\s/;
$active_id = "$'";
chomp $active_id;

# set the active window to non-transparent value
system ( "transset-df --id $active_id $opaque_val" );

# make all other windows transparent
foreach my $win_id ( @id_lines ) {
# set active window to opaque_val and old window to trans_val
if ( $win_id ne $active_id ) {
system ( "transset-df --id $win_id $trans_val" );
 }
}

Then just add these lines to ./config/openbox/rc.xml (around line 302 for me):

    <context name="Client">
      <mousebind button="Left" action="Press">
        <action name="execute">
        <execute>perl ~/bin/focustrans-once.pl .6 1 0</execute>
        </action>
      </mousebind>
    </context>

Trouble is, I use mouse-raises windows, not click-to-focus! Anyone got some help for me, be it X11 active window or openbox mouse-motion-detect?