View Full Version : scrotwm - want to test my port?
aragon
June 29th, 2009, 04:46
Hi,
I've created a port of scrotwm (http://www.peereboom.us/scrotwm/html/scrotwm.html) and thought I'd offer it up here before submitting it for addition to the ports tree. Please feel free to test it.
Download the attached file and extract it into /usr/ports/x11-wm. It'll create /usr/ports/x11-wm/scrotwm, which you cd into and run make install.
Regards,
Aragon
FLY
June 29th, 2009, 18:41
Good job! :beer
Daisuke_Aramaki
June 30th, 2009, 02:12
I will give it a shot right now, and post my reply. Thanks for this one aragon.
aragon
June 30th, 2009, 02:19
Something I've noticed with scrotwm is that it seems to not grab any key bindings if it is started up from .xsession prior to any other windows being open. I'm not sure what the deal is, but I've written to its author and will try debug it into submission if I don't hear from him.
In the mean time, if you're starting it up from .xsession, start a backgrounded xterm first, followed by a short sleep (0.2 works for me), and then scrotwm. Your desktop will load up with an xterm already open, and scrotwm key bindings will work 100%.
Example .xsession:
xterm &
sleep 0.2
scrotwm
Daisuke_Aramaki
June 30th, 2009, 13:11
Works fine aragon. Default key bindings work fine as well.
:beer
aragon
July 1st, 2009, 10:46
Works fine aragon. Default key bindings work fine as well.
:beer
Thanks for testing, guys!
I'm curious about this strange behaviour I'm experiencing with key bindings. It seems you aren't experiencing it? Are you starting scrotwm from .xsession, and if so, can you share it here? What version of BSD and Xorg are you running?
estrabd
July 1st, 2009, 17:51
Hi,
I've created a port of scrotwm (http://www.peereboom.us/scrotwm/html/scrotwm.html) and thought I'd offer it up here before submitting it for addition to the ports tree. Please feel free to test it.
Download the attached file and extract it into /usr/ports/x11-wm. It'll create /usr/ports/x11-wm/scrotwm, which you cd into and run make install.
Regards,
Aragon
I was just looking for this in ports, and here you have posted it just 2 days ago. Thanks! I'll try it. :)
aragon
July 1st, 2009, 21:13
Thanks, looking forward to it, estrabd!
Latest news is that it's in! Should hit your ports directories soon.
Daisuke_Aramaki
July 2nd, 2009, 10:29
Thanks for testing, guys!
I'm curious about this strange behaviour I'm experiencing with key bindings. It seems you aren't experiencing it? Are you starting scrotwm from .xsession, and if so, can you share it here? What version of BSD and Xorg are you running?
I run 7.2 stable with the latest Xorg mate. And i use .xinitrc to launch X. so in addition to the mundane startup tasks, i have just exec scrotwm. And all the default keybindings work without any tweaking. Only minor issue so far is the color setup, for some reason some rgb entries never get inherited. But i will look into it in detail tonight.
Hope that helps.
/edit
scrotwm in action on my EEE.
http://omploader.org/vMXgwZQ (http://omploader.org/vMXgwZA)
estrabd
July 2nd, 2009, 22:41
Thanks, looking forward to it, estrabd!
Latest news is that it's in! Should hit your ports directories soon.
It worked like a charm. Thanks!!
Brett
snesreviews
March 4th, 2010, 12:20
Hi There - just wanted to pop in and say thanks for the port - it works a treat!
I have a suggestion though (and I know this may not be in the "spirit" of scrotwm) - can you include a little start script as well like "startscrotwm" (literally with just the launch command inside)? This is just for consistency with the other window managers.
I spent a while fighting with this but the issue ended up being that I launched "xinit scrotwm" rather than "xinit /path/to/scrotwm" *slaps head*. No big deal - just might save someone else the 30 mins I just lost falsely blaming your port :).
aragon
March 4th, 2010, 18:11
Sure can. How complex is the script? Paste it here if you can, or email me please.
snesreviews
March 5th, 2010, 10:47
Sure can. How complex is the script? Paste it here if you can, or email me please.
Sure, here is all I'm using:
#!/bin/sh
xinit `which scrotwm`
I think scrotwm itself checks if a window manager is already running so the script doesn't need to be smart - just accessible to people who don't change their x setup every day :)
aragon
April 5th, 2010, 23:08
Hey. I finally got 'round to updating scrotwm and integrating a start script. Attached is a patch to update your port skeleton. Please let me know if you test it. Seems to work for me here, so I'll be submitting it soon. :)
snesreviews
April 6th, 2010, 23:47
Thanks - it works great on my machine! Note I usually use $(command) when scripting as well but then again I usually use Bash as opposed to plain old Bourne.
The one thing that worries me is that when I use syntax highlighting on vim, it doesn't like the dollar round brackets syntax with the Bourne shebang but it likes them fine if you have a Bash shebang which makes me think there may be some legacy versions of Bourne out there that don't support it (which is why I used backticks instead in my example). I don't know what the FreeBSD de Facto is, but works fine with the version I have!
Stilgart
April 29th, 2010, 21:39
Hi,
First of all, thanks for this port.
I also had some trouble with key bindings, but I managed to fix it by replacing
xmodmap $HOME/.Xmodmap
exec scrotwm > $HOME/.xsession-errors 2>&1
with
xterm -e "xmodmap $HOME/.Xmodmap" &
exec scrotwm > $HOME/.xsession-errors 2>&1
in my .xinitrc file.
For information, here is what I have in ~/.Xmodmap (I am using the right-Ctrl key for compose stuff):
keycode 109 = Multi_key
Now, scrotwm is working as expected. Thank you again! :)
purgatori
May 6th, 2010, 08:46
Hey, I too have encountered the phenomena of bindings not working in scrotwm. I tried using the same .xsession setup as outlined above, but while this did result in xterm loading, none of the key-bindings were picked up, and when I used the ALT+(key) combination, it produced nonsense output on the terminal instead of causing scrotwm itself to do anything. Are there any other solutions I can try?
Stilgart
May 8th, 2010, 03:40
Did you use aragon's .xsession or my .xinitrc for our own .xsession file ?
On my box, the bindings involving the mouse were working in all cases (with and without the "xterm trick").
I also realized that running:
xmodmap $HOME/.Xmodmap
in a terminal was enough to make all the other bindings work afterwards.
aragon
May 8th, 2010, 03:58
I encounter this issue too. Unfortunately I have no idea what's causing it, and the developers of scrotwm are unable to reproduce it. The xterm trick has worked for me too. If it's not working for you, try add a 0.5 second sleep statement after launching xterm.
purgatori
May 8th, 2010, 21:55
@Stilgart: I tried Aragon's .xsession, but I didn't try your .xinitrc in my own .xsession because I wasn't sure what I needed to put in my .xmodmap file -- I use the standard US keyboard layout, so would 'keycode 109 = Multi_key' work for me, or do I need to put something else in there?
@aragon: I tried adding the 0.5 delay as you suggested, but still no dice :(
Stilgart
May 9th, 2010, 00:25
@purgatori: If you don't want any change for the key mapping, just create an empty .Xmodmap file. Hopeful, this will do the trick.
@aragon: Even a 30 seconds delay did not work for me. I really need to run xmodmap in some terminal. Which key do you use as a Mod key for scrotwm ? I am using the "Windows" key here.
aragon
May 10th, 2010, 00:14
Also using the winkey. I actually always run xmodmap in my xsession files - have a default set of mappings that I use on all my workstations. I still need to load xterm before scrotwm starts up or its key bindings don't work.
purgatori
May 10th, 2010, 05:30
Ok, still not working for me :( Here is my .xsession file, so that you guys can tell me what, if anything, I'm doing wrong:
#!/bin/sh
exec wmii
#xterm -e "xmodmap $HOME/.Xmodmap" &
#sleep 0.5
#exec scrotwm
#exec lxsession
#exec startkde
Note: of course, when I attempt to run scrotwm instead of wmii or one of the other listed wm/des, I uncomment the scrotwm entry, along with the sleep and xterm commands.
Stilgart
May 11th, 2010, 01:00
I have just realized that the most important part of the trick is to put "xterm" and "exec scrotwm" separated by a "&".
Did you test :
xterm -e "xmodmap $HOME/.Xmodmap" &
sleep 0.5
exec scrotwm
or
xterm -e "xmodmap $HOME/.Xmodmap" &
sleep 0.5 &
exec scrotwm
?
Try the second one if you did not. The first one do not work on my box while the second one do.
By the way, I have changed my .xinitrc. Here is my new (complete) version :
#!/bin/sh
xmodmap $HOME/.Xmodmap
xrdb -merge $HOME/.Xresources
arora & exec scrotwm > $HOME/.xsession-errors 2>&1
I put arora instead of xterm, this is more useful for me and makes the script less odd. :-)
purgatori
May 14th, 2010, 02:35
Originally, I didn't have the & -- as you can see in my .xsession -- but I tried it with the &, and it still doesn't work :(
nORKy
May 18th, 2010, 09:10
HI,
me, some keys binding work, some don't work...
Ex: workspace keys binding (next, prev, move, ..) don't work, layer switch, spawn_term, resize works..
I don't understand
Xorg 7.5, nouveau driver, dual monitor (xrandr), .xinitrc (startx), rxvt-unicode + zsh
my xinitrc :
xset b off
fbsetbg -l
synergys &
urxvtd -q -f -o
exec ck-launch-session scrotwm
exit 0
Stilgart
May 18th, 2010, 22:13
Hi again,
This bug is quite strange. I do not understand what is really happening (and I don't like this). Moreover, I run into a similar bug on a Debian (unstable) box yesterday :
Sometimes (I am not able to reproduced it :( ), the flash plugin on Debian get mad and when I close iceweasel, scrotwm's key bindings stop working. After launching xterm from tty1, all works again. There is an problem with event handling in scrotwm, but I did not manage to find out where exactly.
@nORKy : maybe you should try to launch a window before scortwm. Something like :
urxvt & exec ck-launch-session scrotwm
Scrotwm really is a great window manager. If only someone could get rid of this bug.
nORKy
May 19th, 2010, 08:58
@nORKy : maybe you should try to launch a window before scortwm. Something like :
urxvt & exec ck-launch-session scrotwm
It changes nothings. The term starts, but, workspace bindings don't work.
I have the scrotwm.conf that comes with port.
nORKy
May 19th, 2010, 09:28
I found the problem : I'm a non-us keyboard. (fr)
But, I don't known how to resolv it
Stilgart
May 19th, 2010, 11:07
I have a simple way to solve this issue. I also have an AZERTY keyboard. So here is my scrotwm.conf :
http://chadok.info/~cmouille/dot.scrotwm.conf
For information:
- The mod key is the "windows" key.
- I have commented all my stuff for mpd/mpc.
@aragon: is there an easy way to provide to the user a scrotwm.conf depending on the type of keyboard in use during the install of scrotwm ?
nORKy
May 19th, 2010, 14:30
thanks Stilgart, it works fine
nORKy
May 19th, 2010, 16:01
I have a new bug.
I use syngerys (freebsd) to use my mouse and kbd with a Windows host (client).
When I switch the layer to fullscreen mode, the mouse in Windows can move, but buttons don't work ; I must switch to horizontal/vertical mode.
aragon
May 20th, 2010, 20:14
@aragon: is there an easy way to provide to the user a scrotwm.conf depending on the type of keyboard in use during the install of scrotwm ?
I don't know, but my first question would be: how am I going to generate and test all the possible confs for the various keyboards out there?
nORKy
May 21st, 2010, 14:56
does someone known why I don't have windows borders ?
color_focus = purple
color_unfocus = grey
Stilgart
May 27th, 2010, 19:18
@aragon : Hum. It is indeed an issue. Well, I suppose that the best that can be done is to prompt some warning message if the layout is not standart qwerty.
@nORKy : These settings work fine here. And I did not see any option about the border size in the man page. :(
nORKy
May 31st, 2010, 09:16
@stilgart : I killed my X and restarted. Now, is works (?!)
joel@
June 12th, 2010, 13:37
I'd like to see some examples of bar_action scripts. Anyone? :)
aragon
June 14th, 2010, 01:35
A while ago I started writing a fairly elaborate bar_action script, but as I added more to it I noticed it was eating up a lot of CPU time. Don't know about you guys, but I use small WMs like scrotwm on my notebook mainly to keep CPU consumption at a minimum and so increase battery life. My elaborate bar_action script got out of hand in that regard, but here it is anyway:
#!/bin/sh
IFS=" "
SPEED=1
iostat -n 0 -w ${SPEED} | { while read tin tout cus cni csy cin cid; do
## Battery status
#
ACLINE=$( sysctl -n hw.acpi.acline )
BATTSTATE=$( sysctl -n hw.acpi.battery.state )
BATTLIFE=$( sysctl -n hw.acpi.battery.life )
BATTTIME=$( sysctl -n hw.acpi.battery.time )
MESSAGE="Batt: "
case ${BATTSTATE} in
0)
if [ ${BATTLIFE} -ge 1 ]; then
MESSAGE="${MESSAGE} ${BATTLIFE}%"
fi
;;
1)
if [ ${BATTLIFE} -ge 1 ]; then
MESSAGE="${MESSAGE} ${BATTLIFE}%"
if [ ${BATTTIME} -ge 1 ]; then
MESSAGE="${MESSAGE}, $((${BATTTIME}/60))h$((${BATTTIME}%60))m"
fi
fi
;;
2)
if [ ${BATTLIFE} -ge 1 -a ${ACLINE} -eq 1 ]; then
if [ ${ACLINE} -eq 1 ]; then
MESSAGE="${MESSAGE} ${BATTLIFE}%, charging"
else
MESSAGE="${MESSAGE} ${BATTLIFE}%"
fi
fi
;;
7)
MESSAGE=""
;;
*)
MESSAGE="${MESSAGE} unknown(${BATTSTATE})"
;;
esac
## CPU status
#
if [ -n "${cid}" -a "${cid}" != "id" ]; then
MESSAGE="${MESSAGE} || CPU: $((100-${cid}))%, $(sysctl -n dev.cpu.0.freq)MHz, $(sysctl -n hw.acpi.thermal.tz0.temperature)"
else
continue
fi
echo ${MESSAGE}
done }
I started adding network status to it, but stopped when I saw how much CPU time it required.
aragon
June 14th, 2010, 01:45
In my frustration described above I started writing something in C that would do the same thing 100 times more efficiently. Maybe one day I'll finish enough of it so as to make it kind of a text-only version of conky/gkrellm. :)
For now it just reports CPU and Battery information using FreeBSD's C APIs. If you build it with WITH_DWM defined it'll add a "-x" argument that'll print output to X11's root window title so as to work with DWM.
Example invocation:
statf -f "CPU: %cl %cc || %bsD{On AC}%bl{Batt: %bl %bsc{(charging)}%bsd{%bt}}"
Which will print something like:
CPU: 1% 800MHz || Batt: 70% 4h42m
Contributions welcome. :)
eyebone
August 8th, 2010, 10:40
hej aragon,
i'am not sure if this is a problem with the port or a general problem with scrotwm, havent testsed this onto openbsd. i ran in such errors:
https://forums.freebsd.org/showthread.php?t=16722
maybe u have an idea how to solve it.
regards,
Stilgart
August 9th, 2010, 17:46
Hi again,
I have just updated scrotwm on my box and it appears that I do not have to use the trick of launching a window before scrotwm in order to have working key bindings anymore. :)
I am not sure if this is due to the new version of scrotwm or a previous upgrade of (part of) xorg, but this is good news anyway.
@nORKy : is this okay for you too ?
nORKy
September 14th, 2010, 13:59
bindings is OK
I have no border on windows but it's not a problem
aragon
January 3rd, 2011, 23:20
Hey. For anyone else who has been affected by the keyboard binding issue, it looks like it's fixed in 0.9.27. Should be in ports soon, or grab the patch here (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/153583).
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.