Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: restart_fluxbox with a keymapping, Mod1 z :restart_fluxbox< Next Oldest | Next Newest >
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Dec. 16 2004,08:36 QUOTE

Thnx for the script, will use it when i need to rewrite the menu (all the important icons are already in place right now). If got 32x32 pix icons (.xtdesktop) and 48x48 pix icons (Suse) so i added: menu.itemHeight: 32 (which makes the icons look great, but the menu itself becomes very large). Funny thing is: when i decreased  the fontsize (from 200 to 50) , the fonts actualy became bigger/humongous actualy!)

! ***** fonts *****
*.font: -*-lucida-small-r-*-*-*-200-*-*-*-*-*



:cool:


--------------
Usb-stick sandisk cruzer titanium 512 Mb:
DSL 2.3 (final)
Firefox (Mozilla 1.06)
WM -biff  -cdplay -clockmon -smixer -usic -top -net -biff -ifinfo -cpuload
gps vnc LinNeighborhood (samba) QtParted bdc
xawtv imagemagick xplanet
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 16 2004,20:59 QUOTE

You may be trying a font size which is not available for a particular font.  This can be verified with xfontsel.  I just checked it on my workstation, and lucida doesn't seem to have a 200 pt size...it skips from 190 to 240.  There also isn't a "small" weight.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 17 2004,14:20 QUOTE

Update on the icons script,
It now will correctly grab the name of a terminal application.  
I haven't gotten "sudo" applications right yet.  There could be a menu command similiar to "xterm -e sudo <command>", or it could be "sudo [su -c] xterm -e <command>", so I haven't figured out how to guess which is being used in order to grab <command>.

Code Sample

#!/bin/bash
inpoot="${HOME}/.fluxbox/menu"
outpoot="${HOME}/.fluxbox/icon_menu"
icon_dir="${HOME}/.fluxbox/icons"

if [ -f "${outpoot}" ]; then
mv -f "${outpoot}" "${outpoot}.bak"
fi
cat "${inpoot}" | while read line; do
full_command=`echo "${line}"|awk -F { '{print $2}'|awk -F } '{print $1}'`
case "${full_command}" in
[aEx]term*-e*|rxvt*-e*|konsole*-e*|gnome-terminal*-e*)
command_name=`echo "${full_command}"|awk -F '-e' '{print $2}'|awk '{print $1}'|awk -F / '{print $NF}'`
;;
*)
command_name=`echo "${full_command}"|awk '{print $1}'|awk -F / '{print $NF}'`
;;
esac

icon_name="${icon_dir}/${command_name}.xpm"
if [ -f "${icon_name}" ]; then
echo "${line} <${icon_name}>" >> ${outpoot}
else
echo "${line}" >> ${outpoot}
fi
done


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 22 2004,13:08 QUOTE

I've found the source of the corrupt menu item...it's in my $full_command variable.  If there is a menu item like this:
[exec] (something) {command | awk '{ print $ }'}
awk cuts at the first '}' instead of the last, so you end up with this as $full_command:
command | awk '{ print $
instead of this:
command | awk '{ print $ }'

I don't know how to fix it yet.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
8 replies since Dec. 15 2004,05:32 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: restart_fluxbox with a keymapping

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code