Tuesday, October 30, 2012

Conky!

Here's my .conkryc

Mine:
# note that the $xmms2_* and $mpd_* stuff will only work if you have support for them built into conky

alignment top_right
double_buffer yes
update_interval 5.0
Maximum_width 200
own_window yes
own_window_type desktop # Try also 'normal' or 'override'

TEXT
$nodename - $sysname $kernel on $machine
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
 / $color${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
 Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s
$hr
#${color grey}MPD: $mpd_status $mpd_artist - $mpd_title from $mpd_album at $mpd_vol
#Bitrate: $mpd_bitrate\n" "Progress: $mpd_bar
#${color grey}XMMS2: $xmms2_status $xmms2_artist - $xmms2_title from $xmms2_album
Progress: $xmms2_bar
${color grey}Name  PID CPU% MEM%
 ${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
 ${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
 ${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
 ${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${tail /var/log/Xorg.0.log 3}";
$hr
${execpi 60 DJS=`date +%_d`; cal | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color orange}'"$DJS"'$color'/}
# if using the latest conky, replace the last line with:
# ${execpi 60 DJS=`date +%-d`; cal -h | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color orange}'"$DJS"'$color'/}

Other stuff you could add: 

background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 200
maximum_width 200
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 12
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
TEXT
${font sans-serif:bold:size=8}${color yellow}SYSTEM ${hr 2}$color
$sysname $kernel $alignr $machine
Host:$alignr$nodename
AMD Athlon 64 X2 $alignr${freq_g cpu0}Ghz
Uptime:$alignr$uptime
File System: $alignr${fs_type}
Battery:$alignr${battery}${battery_percent}%
${font sans-serif:bold:size=8}${color yellow}DATE ${hr 2}$color
${alignc 59}${font sans-serif:bold:size=26}${time %H:%M:%S}${font}
${alignc}${font sans-serif:bold:size=8}${Time %A %m %d %Y}
${font sans-serif:bold:size=8}${color yellow}PROCESSORS ${hr 2}$color
CPU1: ${cpu cpu1}% ${cpubar cpu1}
RAM:      ${alignc} $mem / $memmax $alignr $memperc%
SYSTEM: $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
SWAP:    $alignc ${swap} / ${swapmax} $alignr ${swapperc}%
${font sans-serif:bold:size=8}${color yellow}TEMPERATURE ${hr 2}$color
PCI adapter Temperature:$alignr${hwmon 1 temp 1} ${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C
V. device Temperature:$alignr${acpitemp} ${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C
HDA Temperature:$alignr${hddtemp} ${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C
${font sans-serif:bold:size=8}${color yellow}TOP PROCESSES ${hr 2}$color
${top_mem name 1}${alignr}${top mem 1} %
${top_mem name 2}${alignr}${top mem 2} %
${top_mem name 3}${alignr}${top mem 3} %
${top_mem name 4}${alignr}${top mem 4} %
${top_mem name 5}${alignr}${top mem 5} %
${font sans-serif:bold:size=8}${color yellow}WEATHER ${hr 2}$color
Update: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK last_update - }
Weather: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK weather - }
Temperature: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK temperature}${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C
Cloud: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK cloud_cover -}
Humidity: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK humidity}%
Preasure: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK pressure -}hPa
Wind: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK wind_speed}km/h
Wind Direction: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK wind_dir}
Wind Direction: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WMKK wind_dir_DEG}${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}
${font sans-serif:bold:size=8}${color yellow}NETWORK ${hr 2}$color${if_existing /proc/net/route wlan0}$
$alignc ....Wireless....
WAN IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
IP address: $alignr ${addr wlan0}
ESSID: $alignr ${wireless_essid wlan0}
Connection quality: $alignr ${wireless_link_qual_perc wlan0}%
Downloads:$alignr${downspeed wlan0}/s
${downspeedgraph wlan0 8,200 F57900 FCAF3E}
Total Downloads:$alignr${totaldown wlan0}
Uploads:$alignr${upspeed wlan0}/s
${upspeedgraph wlan0 8,200 F57900 FCAF3E}
Total Uploads:$alignr${totalup wlan0}
${else}${if_existing /proc/net/route eth1}
$alignc ....Wireless....
WAN IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
IP address: $alignr ${addr eth1}
ESSID: $alignr ${wireless_essid eth1}
Connection quality: $alignr ${wireless_link_qual_perc eth1}%
Downloads:$alignr${downspeed eth1}/s
${downspeedgraph eth1 8,200 F57900 FCAF3E}
Total Downloads:$alignr$${totaldown eth1}
Uploads:$alignr${upspeed eth1}/s
${upspeedgraph eth1 8,200 F57900 FCAF3E}
Total Uploads:$alignr${totalup eth1}
${else}${if_existing /proc/net/route eth0}
$alignc ....Cable....
WAN IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
IP address: $alignr ${addr eth0}
ESSID: $alignr ${wireless_essid eth0}
Connection quality: $alignr ${wireless_link_qual_perc eth0}%
Downloads:$alignr${downspeed eth0}/s
${downspeedgraph eth1 8,200 F57900 FCAF3E}
Total Downloads:$alignr$${totaldown eth0}
Uploads:$alignr${upspeed eth0}/s
${upspeedgraph eth0 8,200 F57900 FCAF3E}
Total Uploads:$alignr${totalup eth0}
${else}${font sans-serif:bold:size=8}${font}Network Unavailable${endif}

Monday, October 15, 2012

xtide: Harmonics and shitz.


Done on a Debian 6 system.

Ok, so you've set up xTide, but you don't live in the US of A and you need to compile your own harmonics data. So you need tideEditor:

tideEditor (finally got this to work, with plenty of help from Dave - the guy who wrote tide editor. Thanks, Dave.)

The download site will mention you will need the following software: libtcd and Qt 4.x.
You can do this through Synaptic, if it's easier for you.

For libtcd, you will also need:
libtcd-dev

For Qt4, you will need:
libqt4-dev
... and all its associated dependencies (probably).

= Install both libtcd and Qt4.x before trying to install tideEditor. =

Compiling tideEditor:

The command to link up the CPP libraries will differ for Debian (on the date this post was made). So if you went through the readme and the command there didn't work, try this (it should all be on a single line):

CPPFLAGS="-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support"

The other flags remain the same. Edit the path to the QT4 directory as necessary.

Here's how it went for mine:

user@domin$ ./configure \
CPPFLAGS="-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support" \
LDFLAGS="-L$QT4DIR/lib"
user@domin$  make
user@domin$ su
Password:
user@domin$  make install

Proceed as instructed in the read me. If I get it to work successfully, I will include more detailed instructions here. If you got it working and want to help out on this, feel free to post the associated instructions in the comments section.

If you suddenly realize (to great sadness) you don't have a .tcd file to feed into tide editor, read on.

This is intended to be a more detailed version of the "Expert" section at the xTide website, which, for all intents and purposes, should be considered before whatever I write here.

I will also assume that you already have xTide (and the minimal dependencies) installed. Do it from  or with aptitude/apt-get/Synaptic. No problem there.

Stuff you'll need:

1) Congen 1.6

2) Harmgen3
   which needs to be backed up with:
   2.1) Octave 3.4.3
        - I tried installing one with Octave 3.2x and it worked.
   2.2) Congen 1.6

3) Harmbase2
   which needs to be backed up with:
   3.1) Postgres 9.2.2        Source code here: http://www.postgresql.org/ftp/source/v9.1.2/
   3.2) libtcd (you probably already have this)
         - libtcd0 from the debian repository didn't work for me. Either try libtcd-dev, or compile from source yourself.
   3.3) libdstr
   3.3.1) libecpg-dev (I needed this, but it wasn't listed on xTides)
          - under the impression I installed this through Synaptic

Get it all here:
http://www.flaterco.com/xtide/files.html

Download everything and dump it all somewhere you can easily find it.

1) Compile the source codes and/or install the necessary software as summarized in the table below. Dependencies have to be installed before actual_software, dependencies_2 before dependencies.
So install from up to down and right to left.

==============================================================
Actual_Software |DEPENDENCIES                |DEPENDENCIES_2
================|============================|================
tideEditor      |-libtcd                     |NIL
                |-libtcd-dev                 |NIL
                |-Qt4.x                      |NIL
----------------|----------------------------|----------------
congen-1.6.2    |-libcongen header file      |NIL
----------------|----------------------------|----------------
harmgen-3.1     |-Congen1.6                  |NIL
                |-Octave3.3.4                |-textlive
                |                            |-gpref
                |                            |-glpk
----------------|----------------------------|----------------
harmbase2       |-Postgres9.2.2              |NIL
                |-Congen1.6                  |see above
                |-libtcd(alreadyinstalled)   |NIL
                |-libdstr                    |NIL
===============================================================

Note:

Configure Postgres 9.2.2 with the following command:
./configure --prefix=/usr

as opposed to the usual ./configure.

If all goes well and Postgres installs right, Harmbase2 should configure and install with no issue.

If Harmbase2 complains it can’t find whatever header files, the line below should do it.

./configure CPPFLAGS="-I/usr/local/pgsql/include" LDFLAGS="-L/usr/local/pgsql/lib"

Adjust the path to the header file and its associated library accordingly.

This worked for me. If manage to get a tide file in, i’ll update.