Merge lp:~lynx333/cairo-dock-plug-ins-extras/HDDtemperature into lp:~cairo-dock-team/cairo-dock-plug-ins-extras/third-party

Proposed by Reali$t
Status: Merged
Approved by: Matthieu Baerts
Approved revision: 200
Merged at revision: 201
Proposed branch: lp:~lynx333/cairo-dock-plug-ins-extras/HDDtemperature
Merge into: lp:~cairo-dock-team/cairo-dock-plug-ins-extras/third-party
Diff against target: 365 lines (+335/-0)
5 files modified
HDDtemperature/HDDtemperature (+21/-0)
HDDtemperature/HDDtemperature.conf (+114/-0)
HDDtemperature/HDDtemperature.sh (+140/-0)
HDDtemperature/README (+43/-0)
HDDtemperature/auto-load.conf (+17/-0)
To merge this branch: bzr merge lp:~lynx333/cairo-dock-plug-ins-extras/HDDtemperature
Reviewer Review Type Date Requested Status
Matthieu Baerts Approve
Review via email: mp+75489@code.launchpad.net

Description of the change

This applet implements HDD temperature monitoring

To post a comment you must log in.
Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello Reali$t and thank you for this merge proposal!

But... there is no change between your branch and the main branch :)
Don't hesitate to have a look to this wiki page: http://www.glx-dock.org/ww_page.php?p=Help%20us%20with%20BZR&lang=en#8-The%20use%20of%20bazaar

So if you want to add a file or directory, launch this command:
  cd cairo-dock-plug-ins-extras
  bzr add SOMETHING

If you want to check if you've added all files and edit the right files:
  bzr status
  bzr cdiff

If you want to "commit" (create a new revision)
  bzr commit -m "My applet: Doing something"

If you want to "push" (upload your branch to a server)
  bzr push lp:~lynx333/cairo-dock-plug-ins-extras/HDDtemperature

Please post a new comment after that ;)

review: Needs Fixing
Revision history for this message
Reali$t (lynx333) wrote :

> But... there is no change between your branch and the main branch :)

Hello, Matthieu,

I apologize for the inconvenience, it's my first trial of using Launchpad :)

Many thanks for your detailed instructions, I hope everything is ok now
http://bazaar.launchpad.net/~lynx333/cairo-dock-plug-ins-extras/HDDtemperature/files/head:/HDDtemperature/

Regards

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Thank you for sharing this new applet ;)

review: Approve
201. By Reali$t

HDDtemp: 'no refresh' bug fixed

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello

If there is any new revisions after the merge of your branch, can you re-submit this merge proposal? There is a "Resubmit proposal" button on this page or you can start a new one ;)

I guess I can add your rev 201 on the main branch. Thank you

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'HDDtemperature'
=== added file 'HDDtemperature/HDDtemperature'
--- HDDtemperature/HDDtemperature 1970-01-01 00:00:00 +0000
+++ HDDtemperature/HDDtemperature 2011-09-16 16:54:24 +0000
@@ -0,0 +1,21 @@
1#!/usr/bin/python
2
3# This is a part of the external demo applet for Cairo-Dock
4# Copyright : (C) 2010-2011 by Nochka85, Fabounet and atttbe
5# E-mail : fabounet@glx-dock.org
6#
7# This program is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public License
9# as published by the Free Software Foundation; either version 2
10# of the License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# ERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16# http://www.gnu.org/licenses/licenses.html#GPL
17
18from CDBashApplet import CDBashApplet
19
20if __name__ == '__main__':
21 CDBashApplet().run()
022
=== added file 'HDDtemperature/HDDtemperature.conf'
--- HDDtemperature/HDDtemperature.conf 1970-01-01 00:00:00 +0000
+++ HDDtemperature/HDDtemperature.conf 2011-09-16 16:54:24 +0000
@@ -0,0 +1,114 @@
1#!en;0.0.1
2
3#[gtk-about]
4[Icon]
5#j+[0;128] Desired icon size for this applet
6#{Set to 0 to use the default applet size}
7icon size = 0;0
8
9#s Name of the icon as it will appear in its label in the dock :
10name = HDD temperature
11
12#S+ Image's filename :
13#{Let empty to use the default one.}
14icon =
15
16#d Name of the dock it belongs to:
17dock name =
18
19order=
20
21#F[Applet's Handbook]
22frame_hand=
23#A
24handbook=HDDtemperature
25
26#[gtk-convert]
27[Desklet]
28
29#j+[48;512] Desklet's dimension (width x height) :
30#{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.}
31size = 96;96
32
33#i[-2048;2048] Desklet's position (x ; y) :
34#{Depending on your WindowManager, you can move it with ALT + left_click}
35x position=0
36#i[-2048;2048] ...
37y position=0
38
39#b Is detached from the dock ?
40initially detached=false
41#l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Accessibility :
42#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)}
43accessibility=0
44#b Should be visible on all desktops ?
45sticky=true
46
47#b Lock position ?
48#{If locked, the desklet can't be moved by simply dragging it with the left mouse button. Of course you can still move it with ALT + left_click.}
49locked = false
50
51#I[-180;180] Rotation :
52#{in degrees.}
53rotation = 0
54
55use size=
56
57#F[Decorations;gtk-orientation-portrait]
58frame_deco=
59
60#o+ Choose a decoration theme for this desklet :
61#{Choose the 'personnal' one to define your own decorations below.}
62decorations = default
63
64#v
65sep_deco =
66
67#S+ Background image :
68#{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.}
69bg desklet =
70#e+[0;1] Background tansparency :
71bg alpha = 1
72#i+[0;256] Left offset :
73#{in pixels. Use this to adjust the left position of the drawings.}
74left offset = 0
75#i+[0;256] Top offset :
76#{in pixels. Use this to adjust the top position of the drawings.}
77top offset = 0
78#i+[0;256] Right offset :
79#{in pixels. Use this to adjust the right position of the drawings.}
80right offset = 0
81#i+[0;256] Bottom offset :
82#{in pixels. Use this to adjust the bottom position of the drawings.}
83bottom offset = 0
84#S+ Foreground image :
85#{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.}
86fg desklet =
87#e+[0;1] Foreground tansparency :
88fg alpha = 1
89
90#[gtk-preferences]
91[Configuration]
92
93#s One or more device drive path to monitor:
94para_hdds = /dev/sda /dev/sdb /dev/sdc /dev/sdd
95
96#b Show maximum temperature on icon?
97para_show = true
98
99#i[1;15] Time interval for checking (minutes):
100para_time = 3
101
102#i[20;180] Alert temperature value (°C by default)
103#{It should conform to units used by hddtemp daemon}
104para_alert = 55
105
106#i[0;900] Pop up bubble duration (in seconds)
107#{0 for permanent show}
108para_dur = 5
109
110#i[1024;65535] Port number to listen to hddtemp daemon (7634 by default)
111para_port = 7634
112
113#s Separator between fields used by hddtemp daemon ( | by default)
114para_sep = |
0115
=== added file 'HDDtemperature/HDDtemperature.sh'
--- HDDtemperature/HDDtemperature.sh 1970-01-01 00:00:00 +0000
+++ HDDtemperature/HDDtemperature.sh 2011-09-16 16:54:24 +0000
@@ -0,0 +1,140 @@
1#!/bin/bash
2
3# This is a part of the external applets for Cairo-Dock
4#
5# Copyright : (C) 2010-2011 by Nochka85
6# modified by matttbe for the new API
7# modified by Fabounet for the new interface
8# E-mail : nochka85@glx-dock.org
9#
10#
11# This program is free software; you can redistribute it and/or
12# modify it under the terms of the GNU General Public License
13# as published by the Free Software Foundation; either version 2
14# of the License, or (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# ERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20# http://www.gnu.org/licenses/licenses.html#GPL
21
22### This is a part of the external applet HDDtemperature for cairo-dock
23### Author : Reali$t
24### Rev : 14 sep 2011
25
26. /usr/share/cairo-dock/plug-ins/Dbus/CDBashApplet.sh $*
27
28#############################################################################################################
29
30is_daemon()
31{
32if [ -z `pidof hddtemp` ]; then
33 call ShowDialog "string:\"'hddtemp' daemon is not running!\r Type in terminal to run it:\r service hddtemp start\"" "int32:0"
34 call SetQuickInfo "string:"
35 return 1
36fi
37}
38
39#############################################################################################################
40
41on_click()
42{
43
44is_daemon
45ret_val=$?
46if [ "$ret_val" -ne "0" ]; then
47 exit
48fi
49
50DURATION=`get_conf_param "para_dur"`
51
52FULL_INFO=`cat store | tr '\n' "\r "`
53
54call ShowDialog "string:'$FULL_INFO'" "int32:$DURATION"
55}
56
57#############################################################################################################
58
59begin()
60{
61 is_daemon
62 ret_val=$?
63 if [ "$ret_val" -ne "0" ]; then
64 exit
65 fi
66
67HDDS=`get_conf_param "para_hdds"`
68SHOW_ICON=`get_conf_param "para_show"`
69TIME_INT=`get_conf_param "para_time"`
70ALERT_LEVEL=`get_conf_param "para_alert"`
71HDDT_port=`get_conf_param "para_port"`
72SEPARATOR=`get_conf_param "para_sep"`
73SEPARATOR=${SEPARATOR:0:1}
74
75 HDTEMP=$(ncat localhost $HDDT_port | awk -F $SEPARATOR -v HDDS_awk="$HDDS" '{
76 if (NF<5) exit; # 5 fields per device
77 T=0
78 for(i=0;(i<=NF-5);i+=5) {
79 if (HDDS_awk ~ $(i+2)) {
80 string_awk=string_awk $(i+2) " ("$(i+3)"): " $(i+4) "°" $(5) FS
81 if (T<$(i+4)) T=$(i+4) # max temperature will be shown
82 }
83 }
84 string_awk=string_awk T
85 print string_awk
86 }')
87
88 set -- "$HDTEMP"
89 IFS="$SEPARATOR"
90 declare -a Array=($*)
91 len_Array=${#Array[@]}
92 let "len_Array-=1" # numbering from 0
93 unset IFS
94
95 if [ $SHOW_ICON = "true" ]; then
96 call SetQuickInfo "string:'${Array[len_Array]}''°'"
97 fi
98
99 if [ ${Array[len_Array]} -ge $ALERT_LEVEL ]; then
100 call Animate "string:fire" "int32:900"
101 else
102 call Animate "string:fire" "int32:0"
103 fi
104
105 cp /dev/null store
106 for i in "${Array[@]:0:$len_Array}"; do # to last-but-one (before temperature)
107 echo "$i" >> store
108 done
109
110 echo "dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock
111 org.cairodock.CairoDock.ReloadModule string:HDDtemperature" \
112 | at now + $TIME_INT min # refresh in background
113}
114
115#############################################################################################################
116
117end()
118{
119rm -f store
120}
121
122#############################################################################################################
123
124reload()
125{
126
127SHOW_ICON=`get_conf_param "para_show"`
128
129if [ $SHOW_ICON = "false" ]; then
130 call SetQuickInfo "string:"
131fi
132
133begin
134}
135
136#############################################################################################################
137
138run $*
139
140exit 0
0141
=== added file 'HDDtemperature/README'
--- HDDtemperature/README 1970-01-01 00:00:00 +0000
+++ HDDtemperature/README 2011-09-16 16:54:24 +0000
@@ -0,0 +1,43 @@
1HDDtemperature applet for Cairo-Dock shows maximal temperature of your hard disk drives
2getting values from 'hddtemp' daemon (see: man hddtemp )
3
4Author : Reali$t helped by Matttbe and Nochka85's demo script
5E-mail : lynx333[at]mail333.com
6Rev : 14.09.2011
7
8
9INSTALLATION:
10-------------
11
121) The name of this applet is "HDDtemperature"; it is placed in a folder "~/.config/cairo-dock/third-party"
13
14So, files in "~/.config/cairo-dock/third-party/HDDtemperature" directory are:
15
16"auto-load.conf" : the file describing the applet
17"icon" : the default icon of the applet
18"HDDtemperature" : the python script, without extension
19"HDDtemperature.sh" : the script in bash, actually applet's code
20"HDDtemperature.conf" : the config file of the applet
21"preview" : a preview of the applet
22
23
242) Make the files "HDDtemperature" and "HDDtemperature.sh" executable:
25
26 chmod a+x ~/.config/cairo-dock/third-party/HDDtemperature/HDDtemperature
27
28 chmod a+x ~/.config/cairo-dock/third-party/HDDtemperature/HDDtemperature.sh
29
30
313) Check whether 'hddtemp' daemon is running:
32
33 ps -f -C hddtemp
34
35If no, start it:
36
37 service hddtemp start
38
39(Read more about 'hddtemp' utility in its manual)
40
41
424) Turn the applet on and customize it (if you wish) in the "System" section of "Configure" menu of Cairo-Dock.
43
044
=== added file 'HDDtemperature/auto-load.conf'
--- HDDtemperature/auto-load.conf 1970-01-01 00:00:00 +0000
+++ HDDtemperature/auto-load.conf 2011-09-16 16:54:24 +0000
@@ -0,0 +1,17 @@
1[Register]
2
3# Author of the applet
4author = Reali$t
5
6# A short description of the applet and how to use it.
7description = This applet shows maximal temperature of your hard disk drives \n getting values from 'hddtemp' daemon (see: man hddtemp). \n Left-click shows more information about HD drives.
8
9# Category of the applet : 2 = files, 3 = internet, 4 = Desktop, 5 = accessory, 6 = system, 7 = fun
10category = 6
11
12# Version of the applet; change it everytime you change something in the config file. Don't forget to update the version both in this file and in the config file.
13version = 0.0.1
14
15# Default icon to use if no icon has been defined by the user. If not specified, or if the file is not found, the "icon" file will be used.
16icon = icon
17
018
=== added file 'HDDtemperature/icon'
1Binary files HDDtemperature/icon 1970-01-01 00:00:00 +0000 and HDDtemperature/icon 2011-09-16 16:54:24 +0000 differ19Binary files HDDtemperature/icon 1970-01-01 00:00:00 +0000 and HDDtemperature/icon 2011-09-16 16:54:24 +0000 differ
=== added file 'HDDtemperature/preview'
2Binary files HDDtemperature/preview 1970-01-01 00:00:00 +0000 and HDDtemperature/preview 2011-09-16 16:54:24 +0000 differ20Binary files HDDtemperature/preview 1970-01-01 00:00:00 +0000 and HDDtemperature/preview 2011-09-16 16:54:24 +0000 differ

Subscribers

People subscribed via source and target branches

to all changes: