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.
Code: Select all
#!/bin/sh
quakewindow=rexquakeurxvt
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 &
else
exec urxvt -tr +sb -fg White -bg Black -sh 40 -name $quakewindow &
fi
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)
originXFramed=$((width/8))
targetWidthFramed=$(( width - $(( width/8*2)) ))
targetHeight=$((height/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
else
wmctrl -F -r $quakewindow -b add,hidden
fi
Code: Select all
<application name="rexquakeurxvt">
<decor>no</decor>
<skip_pager>yes</skip_pager>
<skip_taskbar>yes</skip_taskbar>
<iconic>yes</iconic>
<desktop>all</desktop>
<layer>above</layer>
</application>
Code: Select all
<keybind key="Pause">
<action name="Execute">
<command>quake-terminal</command>
</action>
</keybind>
<keybind key="F11">
<action name="Execute">
<command>quake-terminal</command>
</action>
</keybind>