ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] Firefox, Just Sit Down and Shut Up! --solved (with my workspace


From: TBlittlefoot
Subject: Re: [RP] Firefox, Just Sit Down and Shut Up! --solved (with my workspace scripts)
Date: Tue, 18 Dec 2007 18:23:52 -0800

On Mon, Dec 17, 2007 at 01:27:51AM -0800, TBlittlefoot wrote:
> On Sun, Dec 16, 2007 at 11:18:07PM -0800, TBlittlefoot wrote:
> > How the hell do you get apps like firefox to behave?
> > I want it to open with the rp manual in workspace 2
> > (from a script called in my ratpoisonrc) and just sit 
> > there and shut up until I switch to that workspace
> > and that window.
> > 
> > In case you can't tell, this just pisses me off. Firefox
> > comes with an option to block popups but is itself a
> > popup.
> > 
> > Any guidance here would be much appreciated. 
> > 
> 
> I should have noted that with rudeness set to 0 before
> running the rpwas* scripts, and then adding a 5 second sleep
> after setting up the second workspace, then setting the rudeness
> back to 15, it works.
> 
> But it is a complete horror show of competing and flashing screens.
> for a couple of seconds. Looks like my computer is trying to explode.

If anyone is interested...

Got this all worked out, except that when I switch to ws2 I am greeted
by the root window because of firefox's bullying. No big deal. Just hit
Ctrl-t-t and there's firefox, getting in my face again. 

The rudeness and dedicate commands turned out to be the key.

(As an aside, I am following the development of the dillo web browser.
7 years! To write a lousy web browser that still isn't finished. This is insane.
The problem is not with the developers of the web browser, but with the
demands of the web, which are the demands of the ISPs. Complexity is
technocracy is control...)

I have two workspaces, ws1 has 6 'xterms', some of them running scripts.
Those script are below.

'xterm' 0 appears only as a 1-line frame at the 
bottom of the screen displaying the time and the output of "ratpoison -c 
windows'

ws2 has 2 xterms running applications and firefox in its own window.

(keep in mind that I run as root here)

My ratpoisonrc:

set border 0
set winfmt %n%s%10t
defwinliststyle column
unbind c
bind c exec rxvt -title X -ls -bg white -sl 300 +sb -C 
addhook key banish
set bargravity SE
msgwait 3
# this s my clipboard, (script below):
bind M-a exec /usr/local/bin/rpcb.sh
startup_message off
set transgravity se
set maxsizegravity se
set inputwidth 1000
rudeness 0
exec rpws -i
exec rpws -b 
exec rpws-net.sh
exec rpws-screen.sh

# rpws has all the calls to function ws_init_ commented out except for 
ws_init_ws 2, and
# all the binding creations in ws_bindings commented out except for these two:
# rp_call bind M-1 exec $0 and  1 rp_call bind M-2 exec $0 2

----------------------------------------------

#!/bin/sh

#/usr/local/bin/rpws-net.sh

rpws 2

rp=/usr/local/bin/ratpoison

RP_call ()
{
    $rp -c "$*"
}

RP_call exec firefox file:///usr/doc/ratpoison/html/index.html
RP_call exec rxvt  -g 145X55 -sl 200 +sb -cr brown -title story -e vi 
/root/story
RP_call exec rxvt -g 140X50 -ls -sl 200 +sb -title iptraf -e iptraf -i all -L 
/root/.iptraf-log

exit 0


------------------------------------------------------------------

#!/bin/sh

# /usr/local/bin/rpws-screen.sh:

sleep 2

rpws 1

rp=/usr/local/bin/ratpoison

RP_call ()
{
    $rp -c "$*"
}

RP_call exec rxvt -sl 0 -g 145X50 +sb -bg brown -fg white -cr brown -title a -e 
watch -t -n 1 /usr/local/bin/screenbar.sh
RP_call exec rxvt -ls -g 145X50 -title b -bg white -cr brown -sl 300 +sb -C
RP_call exec rxvt -ls -g 145X50 -title c -bg white -cr brown -sl 300 +sb -C
RP_call exec rxvt -ls -g 145X50 -title d -bg white -cr brown -sl 300 +sb -C
RP_call exec rxvt -ls -g 145X50 -title e -bg white -cr brown -sl 300 +sb -C
RP_call exec rxvt -g 145X50 -sl 200 +sb -cr brown -title f -e vi /root/.calendar
RP_call exec rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title g -e /root/.menu
RP_call exec rxvt  +sb -cr white -title h -e watch -t /usr/local/bin/rpwatch.sh


# order and number the windows

RP_call select a
RP_call number 0
RP_call select b
RP_call number 1
RP_call select c
RP_call number 2
RP_call select d
RP_call number 3
RP_call select e
RP_call number 4
RP_call select f
RP_call number 5
RP_call select g
RP_call number 6
RP_call select h
RP_call number 7
#
#
RP_call select 1
RP_call split 750
# a different screen resolution would require a different number there - mine's 
1024 - use fdump
RP_call shrink
RP_call dedicate
#
RP_call focusdown
RP_call dedicate
#
RP_call select 0 
#
RP_call focusup
#
RP_call select 5
#
RP_call rudeness 15
#
exit 0

------------------------------------------

Other Scripts in order of appearance above:

-------------------------------------------------------

#!/bin/sh

# /usr/local/bin/rpcb.sh

rp=/usr/local/bin/ratpoison

RP_call ()
{
    $rp -c "$*"
}

RP_call split 3/4
RP_call shrink
RP_call focusdown
RP_call exec rxvt -ls -bg darkgreen -fg white -cr yellow -title CB -sl 0 -e vi 
+  /root/.clipboard
while :; do
if ! /usr/bin/ps ax | grep "\.clipboard" &>/dev/null
then
RP_call remove
RP_call focusup
exit 0
fi
done

--------------------------------------------

#/usr/local/bin/screenbar.sh

echo -n "`date +%T` "
ratpoison -c windows | xargs  echo -n 

-------------------------------------------

This is offered as a template. It isn't my actual script, which has a lot
of private stuff in it:

-----------------------------------------------

#!/bin/sh

# /root/.menu 

trap "clear; exit" 2

while true; do

clear

## fill out and uncomment a line below, then do the same
## with the corresponding lines in the second part below
## do the same thing with the submenu(s)

echo "[1]  (MEN) exit -- or Ctrl-c"
echo "[2]  (MEN) edit menu -- restart for changes to take effect"
echo "[3]  (DOC) dhcpd howto in links"
echo "[4]  (ADM) edit ratpoisonrc"
#echo "[5]  (DOC) "
#echo "[6]  (DOC) " 
#echo "[8]  (DOC) " 
#echo "[9]  (DOC) "
#echo "[10] (ADM) "
#echo "[11] (ADM) "
#echo "[13] (ADM) "
#echo "[14] (DOC) "
#echo "[15] (XXX) * submenu (example)"
#echo "[16] (DOC) "
read num

case "$num" in

"1" ) 
 clear ; exit ;;
"2" )
vi /root/.menu ;;
# the '&' causes the app to open in a seperate window and frees up the menu
# otherwise it opens in same window, with no further use of rxvt necessary, as 
above
"3" ) 
rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title dhcp -e links 
/usr/doc/dhcpcd-2.0.4/DHCP.html &  ;;
"4" ) 
rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title dhcp -e vi /root/.ratpoisonrc & ;;
#"5" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"6" ) 
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e  ;;
#"7" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e  ;;
#"8" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"9" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"10" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"11" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"13" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"14" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"15" )
### start submenu -  for other submenus copy this block
#  while true; do
#  clear
#  echo "[1] (FOO)"
#  echo "[2] (FOO)"
#  echo "[3] return to main menu -- ^C to exit main menu too"
#
#read num1 
#
#case "$num1" in
#
#"1" ) 
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"2" ) 
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;
#"3" ) 
#   break ;;
#  * ) 
#  continue ;;
#
#esac
#
#done
#;;
## end submenu block

#"16" )
#rxvt -g 145X50 -ls -sl 0 +sb -cr brown -title foo -e ;;

esac

done

------------------------------------------------------

# /usr/local/bin/rpwatch.sh 

/usr/bin/ps ax | /usr/bin/grep -v "\[\|syslog\|agetty\|rxvt" 
/usr/bin/free -m
/sbin/ifconfig  ppp0 2> /dev/null | /usr/bin/grep inet

-------------------------------------------------------------

Most of the ugly flashing and lingering images are gone, and
I end up looking at my calendar file in ws1. Pretty slick.

A work in progress, of course, but it works pretty dam good!

If anyone finds this useful, I'll be pleased, Email if you
need help tailoring it to your own needs.

I call my setup a "studio". All the other one word terms for
it just don't sound right:

workshop  << too blue collar
shop    << same
suite   << used to describe other types of things in the virtual universe.
office  << too dry and white collar and bureaucratic
lab     << nothing of the arts here, too clinical
laboratory << same
factory   << too industrial
base     << too military
department << ugh
desk      << over-used
desktop   << same

All studios have a number of workspaces, and the word implies something
beyond a mere workshop or lab. A place where crafts and arts and sciences
are practiced.


Tom





reply via email to

[Prev in Thread] Current Thread [Next in Thread]