Mail particularly addressed to Mikhael Goikhman, as
he helped me with this one before...
Problem: trying to get pager/GotoPage "wrap-around".
I use a 4 row desktop. So I assume that the leftmost
page is page.nx == 0, and the rightmost page is
page.nx == 3. Putting the following in my rc and testing
confirms this suspicion.
Key Left A M GotoPage 0 +0p
Key Right A M GotoPage 3 +0p
To address my desire for the wrap-around feature, you once
supplied me with the following:
Key Left A M PipeRead \
`perl -e 'print "GotoPage ", \
eval "($[page.nx] + 4) % 5", " +0p"`
Key Right A M PipeRead \
`perl -e 'print "GotoPage ", \
eval "($[page.nx] + 0) % 5", " +0p"`
The above did indeed do what I meant, but I wanted to
find a way for my usual page-changing keystrokes (C-Right,
C-Left) to "just work" with the wrap-around as well.
I tried:
Key Left A M PipeRead \
`perl -e 'print "GotoPage ", \
eval "($[page.nx] == 0) ? 3 : $[page.nx] - 1", " +0p"`
Key Right A M PipeRead \
`perl -e 'print "GotoPage ", \
eval "($[page.nx] == 3) ? 0 : $[page.nx] + 1", " +0p"`
But this does not work. So as a debugging measure, I tried
Key F12 A N Exec exec \
`perl -le 'print STDERR "current page.nx: $[page.nx]\n", \
"dest page.nx: ", \
eval "($[page.nx] == 0) ? 3 : $[page.nx] - 1", "\n"'`
and it turns out (tailing ~/.X.err on SuSE) that I always see
(irrespective of which page I am on):
current page.nx: 0
dest page.nx: 3
So, probably small surprise that my attempt to use the ?: operator
isn't doing what I want...
Could my stupidity, error be pointed out? Or is it a bug?
TIA.
Michael
--
Michael Fischer Happiness is a config option.
michael_at_visv.net Recompile and be happy.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sun Jun 16 2002 - 17:13:14 BST