SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-09-28 06:43:27

Beesquito
New Member
From: Victoria, BC
Registered: 2009-05-02
Posts: 5

urxvtq woes

First off, I should say that I am running #! Statler Alpha 2 with sid repo's and a liquorix kernel, so this is not on a standard setup.  However, I don't think this will affect what I'm trying to do.  In addition, if this belongs in another subforum (Devel? Support?), then I kindly ask the mods to move it there.

My problem (and partial solution) has to do with the urxvtq script given in the wiki (third script here).  It is supposed to give a quake style drop down terminal.  For reference, here is the script:

#!/bin/sh
# inspired by http://wiki.archlinux.org/index.php/Rxvt-unicode#Improved_Kuake-like_behavior_in_Openbox

if [ -e "/tmp/urxvtq-wid" ]; then
  wid=$( cat /tmp/urxvtq-wid )
 
  if [ -e "/tmp/urxvtq" ]; then 
    xdotool windowunmap $wid    
    rm /tmp/urxvtq
  else                          
    xdotool windowmap $wid
    xdotool windowfocus $wid         
    touch /tmp/urxvtq
  fi
else                            
  urxvtc -name urxvtq -geometry 80x28 #this defines the size of the window
  wid=$(xdotool search --name urxvtq | head -n 1 )
  xdotool windowfocus $wid
  xdotool windowactivate $wid
  touch /tmp/urxvtq
  echo $wid > /tmp/urxvtq-wid
fi

My first problem was that xdotool is not installed by default.  This was quickly fixed, but perhaps this should be mentioned in the wiki article.  Still, the script was not working.  I think the problem was that the standard #! .bashrc formats the title of *rxvt terminals to user@host:dir.  This overrides any setting in .Xdefault, or calling urxvtc with -title or -name.  After commenting the offending lines in .bashrc, I still had to add "-title urxvtq" to the place urxvtc is called in the script.  I needed both -title for xdotool search to work, and -name so that openbox could find and format it correctly (via rc.conf applications section).

Now the drop down terminal works correctly, but I still have a couple of problems.  First, I miss that sweet title formatting on the rest of my terminals.  You can set urxvt's title in .Xdefaults, but it seems to be static.  Second, the drop down terminal seems to pick up some of the formatting from .Xdefaults (correct font and size, some other stuff) but not all of it.  For example, it has a scroll bar even though my .Xdefaults turns them off.  Any ideas how to get these things back without breaking the script again?  I am more than willing to use a totally different script, if need be.

For posterity, I suppose I should mention that the script to ensure urxvtd is already running when urxvtc is run also did not work for me.  It stalled out my computer hard.  Renaming the script to urxtvj (or anything else) fixed this.  So my rc.conf and the script above actually call urxtvj.  Running "urxtvc -title urxtvq" still gave me the user@host title though, so I don't think this matters.

Offline

Help fund CrunchBang, donate to the project!

#2 2010-09-28 07:54:37

luc
#! Die Hard
From: Munich, Germany
Registered: 2010-03-21
Posts: 597

Re: urxvtq woes

there is a drop down terminal called "tilda" (i think in the repos) so if you dont find a better solution with urxvt or are willing to try something else. (if you consider this of topic please ignore it)
luc

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo