xmatom Napisano Maj 10, 2009 Zgłoszenie Share Napisano Maj 10, 2009 Otóż napisałem dzisiaj skrypta do automatycznego wykrywania pod montowanych systemów plików. #!/bin/bash cat /etc/mtab |grep /dev/sd | sed -e "s/[^ ]*//;s/ \//\//;s/ .*//" >~/.fsdt cat /etc/mtab |grep //*.*.*.*/ | sed -e "s/[^ ]*//;s/ \//\//;s/ .*//" >>~/.fsdt len=`wc -l ~/.fsdt | sed "s/ \/.*//"` todo=2 todo1=1 while [ $todo -le $len ] do if [ $todo = 2 ] then text=`cat ~/.fsdt | sed -e "$todo,$len d"` else text=`cat ~/.fsdt | sed -e "$todo,$len d ; 1,$todo1 d" ` todo1=$[todo1 + 1] fi echo "\${offset 240}\${color blue}$text:\${color }\$alignr\${fs_free $text }/\${fs_size $text } " echo "\${offset 240}\${fs_bar 4,180 $text}" todo=$[todo + 1] done Problem Polega na tym że na terminalu działa dobrze A na Conkym ucina go w pewnym momencie Na terminalu ${offset 240}${color blue}/:${color }$alignr${fs_free / }/${fs_size / } ${offset 240}${fs_bar 4,180 /} ${offset 240}${color blue}/usr:${color }$alignr${fs_free /usr }/${fs_size /usr } ${offset 240}${fs_bar 4,180 /usr} ${offset 240}${color blue}/home:${color }$alignr${fs_free /home }/${fs_size /home } ${offset 240}${fs_bar 4,180 /home} ${offset 240}${color blue}/boot:${color }$alignr${fs_free /boot }/${fs_size /boot } ${offset 240}${fs_bar 4,180 /boot} ${offset 240}${color blue}/media/DANE:${color }$alignr${fs_free /media/DANE }/${fs_size /media/DANE } ${offset 240}${fs_bar 4,180 /media/DANE} ${offset 240}${color blue}/media/system-xp:${color }$alignr${fs_free /media/system-xp }/${fs_size /media/system-xp } ${offset 240}${fs_bar 4,180 /media/system-xp} ${offset 240}${color blue}/media/GRY:${color }$alignr${fs_free /media/GRY }/${fs_size /media/GRY } ${offset 240}${fs_bar 4,180 /media/GRY} ${offset 240}${color blue}/media/Programs:${color }$alignr${fs_free /media/Programs }/${fs_size /media/Programs } ${offset 240}${fs_bar 4,180 /media/Programs} ${offset 240}${color blue}/mnt/net/user:${color }$alignr${fs_free /mnt/net/user }/${fs_size /mnt/net/user } ${offset 240}${fs_bar 4,180 /mnt/net/user} ${offset 240}${color blue}/mnt/net/Prog:${color }$alignr${fs_free /mnt/net/Prog }/${fs_size /mnt/net/Prog } ${offset 240}${fs_bar 4,180 /mnt/net/Prog} Na conkym Problem Mój conky rc # Create own window instead of using desktop (requibluein nautilus) own_window yes own_window_hints undecorated,below,skip_taskbar background no # Use double buffering (blueuces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer yes use_xft yes # Update interval in seconds update_interval 5.0 # Minimum size of text area minimum_size 400 5 # Draw shades? draw_shades yes # Text stuff draw_outline no # amplifies text if yes draw_borders no uppercase no # set to yes if you want all text to be in uppercase draw_borders no border_margin no draw_graph_borders no border_width 0 draw_outline no stippled_borders 0 # Default colors and also border colors, blue90 == #e5e5e5 default_color white default_shade_color black default_outline_color white own_window_colour brown own_window_transparent yes # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text gap_x 20 gap_y 20 # stuff after 'TEXT' will be formatted on screen override_utf8_locale no xftfont :size=8 xftalpha 0.8 TEXT ${offset 240}${font :size=12:weight=bold}Time${font }${hr 1} ${offset 240}${font :size=30:weight=bold}${time %H:%M:%S}${font} ${offset 240}${color blue}${time %a,} ${color }${time %e %B %G}${color blue} UpTime: ${color }$uptime ${offset 240}${font :size=12:weight=bold}Host${font }${hr 1} ${offset 240}${color blue}Hostname: ${color }$alignr${execi 30 hostname} ${offset 240}${color blue}Ip: ${color }$alignr ${addr eth0} ${offset 240}${color blue}Kernel:${color }$alignr$kernel ${offset 240}${font :size=12:weight=bold}Cpu${font }${hr 1} ${offset 240}${color blue}CPU1:${color }$alignr ${cpu cpu1}% ${acpitemp} ${offset 240}${cpugraph cpu1 20,180 000000 000000} ${offset 240}${color blue}CPU2:${color }$alignr ${cpu cpu2}% ${acpitemp} ${offset 240}${cpugraph cpu2 20,180 000000 000000} ${offset 240}${color blue}Highest CPU: ${offset 240}${color ffffff} ${top name 1}$alignr${top_mem cpu 1} ${offset 240}${color ffffff} ${top name 2}$alignr${top cpu 2} ${offset 240}${color ffffff} ${top name 3}$alignr${top cpu 3} ${offset 240}${color ffffff} ${top name 4}$alignr${top cpu 4} ${offset 240}${font :size=12:weight=bold}Memory${font }${hr 1} ${offset 240}${color blue}Memory: ${color }$alignr $memperc% $mem/$memmax ${offset 240}${membar 4,180} ${offset 240}${color blue}Swap: ${color }$alignr $swapperc% $swap/$swapmax ${offset 240}${swapbar 4,180} ${offset 240}${color blue}Processes: ${color }$alignr$processes ${offset 240}${color blue}Running: ${color }$alignr$running_processes ${offset 240}${color blue}Highest Memory: ${offset 240}${color ffffff} ${top_mem name 1}$alignr${top_mem mem 1} ${offset 240}${color ffffff} ${top_mem name 2}$alignr${top_mem mem 2} ${offset 240}${color ffffff} ${top_mem name 3}$alignr${top_mem mem 3} ${offset 240}${color ffffff} ${top_mem name 4}$alignr${top_mem mem 4} ${offset 240}${font :size=12:weight=bold}File Systems${font }${hr 1} ${execp /home/ms/test/conky/fsdetect.sh} #tu jest problem ${offset 240}${font :size=12:weight=bold}Net${font }${hr 1} ${offset 240}${color}Up: ${color }$alignr${upspeed eth0} k/s ${offset 240}${upspeedgraph eth0 20,180 000000 000000} ${offset 240}${color}Down: ${color }$alignr${downspeed eth0}k/s${color} ${offset 240}${downspeedgraph eth0 20,180 000000 000000} Z guóy dziękuje z pomoc. Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
@WalDo Napisano Maj 10, 2009 Zgłoszenie Share Napisano Maj 10, 2009 Off topic pod mątowanych systemów plików.Człowieku! Zlituj się, oszczędź... Nie wiem czy się śmiać czy płakać. Nie myślałeś o zainstalowaniu wtyczki słownika ortograficznego pod Firefoksa? Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
Rekomendowane odpowiedzi