Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 07 May 2015, 03:39
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Simple Quake-Terminal alike script
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 10 Mar 2011
Posts: 186

PostPosted: Wed 25 May 2011, 09:40    Post_subject:  Simple Quake-Terminal alike script
Sub_title: because what the world needs is another quake-terminal script

Here's a quake-terminal script for Puppy, using the standard urxvt console. The only dependency that isn't common on Puppy is wmctrl, which can be found here: http://www.murga-linux.com/puppy/viewtopic.php?t=67987

Resolution Independent
Transparency used if available, urxvt psuedo-transparency used if not

Name this script "quake-terminal", and put it somewhere in your path, like /usr/local/bin . Needs to be made executable. Do not name the script rexquakeurxvt, that name needs to be unique to the console that this script opens.



if [ "$(wmctrl -l | grep $quakewindow)" == "" ] ; then
  if [ "$(pidof xcompmgr)" != "" ] ; then
    exec urxvt -depth 32  +sb -fg White -bg rgba:0000/0000/0000/9999 -name $quakewindow &
    exec urxvt -tr +sb -fg White -bg Black -sh 40 -name $quakewindow &
  dataline=$(wmctrl -d | grep '*')
  originX=$(echo "$dataline" | cut -d ' ' -f 11 | cut -d \, -f 1)
  originY=$(echo "$dataline" | cut -d ' ' -f 11 | cut -d \, -f 2)
  width=$(echo "$dataline" | cut -d ' ' -f 12 | cut -d \x -f 1)
  height=$(echo "$dataline" | cut -d ' ' -f 12 | cut -d \x -f 2)
  targetWidthFramed=$(( width - $(( width/8*2)) ))
  wmctrl -F -r $quakewindow -b add,hidden
  wmctrl -F -r $quakewindow -e 0,$originXFramed,$originY,$targetWidthFramed,$targetHeight
  wmctrl -F -r $quakewindow -b remove,hidden
  wmctrl -F -R $quakewindow
elif [ "$(xwininfo -name $quakewindow | grep IsViewable)" == "" ] ; then
  wmctrl -F -r $quakewindow -b remove,hidden
  wmctrl -F -R $quakewindow
  wmctrl -F -r $quakewindow -b add,hidden

In ~/.config/openbox/rc.xml, add this to <applications> section for a better experience:


   <application name="rexquakeurxvt">

These are the keybindings i use, also found in rc.xml


    <keybind key="Pause">
      <action name="Execute">
    <keybind key="F11">
      <action name="Execute">
Back to top
View user's profile Send_private_message 

Joined: 30 Jan 2009
Posts: 444
Location: La Porte City, IA , U.S.A.

PostPosted: Sat 28 May 2011, 23:32    Post_subject:  

too bad it didn't use Xdotool instead of wmctrl.
Its great that it uses standard urxvt console. Cool

3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
Peace and Justice are two sides of the same coin.
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0540s ][ Queries: 11 (0.0093s) ][ GZIP on ]