diff options
Diffstat (limited to 'sysutils/wmbsdbatt/files/patch-zz-frequency')
-rw-r--r-- | sysutils/wmbsdbatt/files/patch-zz-frequency | 179 |
1 files changed, 0 insertions, 179 deletions
diff --git a/sysutils/wmbsdbatt/files/patch-zz-frequency b/sysutils/wmbsdbatt/files/patch-zz-frequency deleted file mode 100644 index 53a3cb213db0..000000000000 --- a/sysutils/wmbsdbatt/files/patch-zz-frequency +++ /dev/null @@ -1,179 +0,0 @@ ---- backlight_off.xpm Tue Dec 23 19:27:34 2003 -+++ backlight_off.xpm Wed Jan 11 17:40:26 2006 -@@ -56,15 +56,15 @@ - "+@#%&&&%%%&&&&&&&%%%%%%%%&&&%%%%%%%%&&%&&&&%%&&%%&%%%&%&+$", - "+@#%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%&+$", - "+@#%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+$", --"+@#%&&%%%&&&%%%&&&%%%&&&%%%&&&%%%&&&&%&%&&&%&%&&&%%%&&&&+$", --"+@#%&%&&&%&%&&&%&%&&&%&%&&&%&%&&&%&&%&%&%&%&%&%&%&&&%&&&+$", --"+@#%&%&&&%&%&&&%&%&&&%&%&&&%&%&&&%&&%&%&%&%&%&%&%&&&%&&&+$", --"+@#%&%&&&%&%&&&%&%&&&%&%&&&%&%&&&%&&%&%&%&%&%&%&%&&&%&&&+$", --"+@#%&&%%%&&&%%%&&&%%%&&&%%%&&&%%%&&&&%&%&&&%&%&&&%%%&&&&+$", --"+@#%&%&&&%&%&&&%&%&&&%&%&&&%&%&&&%&&%&%&%&%&%&%&%&&&%&&&+$", --"+@#%&%&&&%&%&&&%&%&&&%&%&&&%&%&&&%&&%&%&%&%&%&%&%&&&%&&&+$", --"+@#%&%&&&%&%&&&%&%&&&%&%&&&%&%&&&%&&%&%&%&%&%&%&%&&&%&&&+$", --"+@#%&&%%%&&&%%%&&&%%%&&&%%%&&&%%%&&&&%&%&&&%&%&&&%%%&&&&+$", -+"+@#%&%%%&&&%%%&&&%%%&&&%%%&&&&&&&%%%&&&%%%&&&%%%&&&%%%&&+$", -+"+@#%%&&&%&%&&&%&%&&&%&%&&&%&&&&&%&&&%&%&&&%&%&&&%&%&&&%&+$", -+"+@#%%&&&%&%&&&%&%&&&%&%&&&%&&&&&%&&&%&%&&&%&%&&&%&%&&&%&+$", -+"+@#%%&&&%&%&&&%&%&&&%&%&&&%&&&&&%&&&%&%&&&%&%&&&%&%&&&%&+$", -+"+@#%&%%%&&&%%%&&&%%%&&&%%%&&&&&&&%%%&&&%%%&&&%%%&&&%%%&&+$", -+"+@#%%&&&%&%&&&%&%&&&%&%&&&%&&&&&%&&&%&%&&&%&%&&&%&%&&&%&+$", -+"+@#%%&&&%&%&&&%&%&&&%&%&&&%&&&&&%&&&%&%&&&%&%&&&%&%&&&%&+$", -+"+@#%%&&&%&%&&&%&%&&&%&%&&&%&&&&&%&&&%&%&&&%&%&&&%&%&&&%&+$", -+"+@#%&%%%&&&%%%&&&%%%&&&%%%&&&&&&&%%%&&&%%%&&&%%%&&&%%%&&+$", - "+@#%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&++$", - ".+++++++++++++++++++++++++++++++++++++++++++++++++++++++$.", - "..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.."}; ---- backlight_on.xpm Tue Dec 16 00:59:51 2003 -+++ backlight_on.xpm Wed Jan 11 17:49:48 2006 -@@ -39,7 +39,7 @@ - ".++++...............................++$$$+$$$+$$$+.+++.++@", - ".++++.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.+$$$+$$$+$$$++$+.+$+@", - ".++++.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.+$$$+$$$+$$$+++.+$++@", --".++++$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.+$$$+$$$+$$$++.+$+++@", -+".++++.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.+$$$+$$$+$$$++.+$+++@", - ".++++...............................++$$$+$$$+$$$+.+$+.++@", - ".++++++++++++++++++++++++++++++++++++++++++++++++++$+++$+@", - ".++++...............................++$$$+$$$+$$$+.+++.++@", -@@ -56,15 +56,15 @@ - ".++++++$$$+++++++$$$$$$$$+++$$$$$$$$++$++++$$++$$+$$$+$++@", - ".+++++++++++++++++++++++++++++++++++++$$$$$$$$$$$$$$$$$++@", - ".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@", --".+++++$$$+++$$$+++$$$+++$$$+++$$$++++$+$+++$+$+++$$$+++++@", --".++++$+++$+$+++$+$+++$+$+++$+$+++$++$+$+$+$+$+$+$+++$++++@", --".++++$+++$+$+++$+$+++$+$+++$+$+++$++$+$+$+$+$+$+$+++$++++@", --".++++$+++$+$+++$+$+++$+$+++$+$+++$++$+$+$+$+$+$+$+++$++++@", --".+++++$$$+++$$$+++$$$+++$$$+++$$$++++$+$+++$+$+++$$$+++++@", --".++++$+++$+$+++$+$+++$+$+++$+$+++$++$+$+$+$+$+$+$+++$++++@", --".++++$+++$+$+++$+$+++$+$+++$+$+++$++$+$+$+$+$+$+$+++$++++@", --".++++$+++$+$+++$+$+++$+$+++$+$+++$++$+$+$+$+$+$+$+++$++++@", --".+++++$$$+++$$$+++$$$+++$$$+++$$$++++$+$+++$+$+++$$$+++++@", -+".++++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++$$$+++@", -+".+++$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$+$+++$++@", -+".+++$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$+$+++$++@", -+".+++$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$+$+++$++@", -+".++++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++$$$+++@", -+".+++$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$+$+++$++@", -+".+++$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$+$+++$++@", -+".+++$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$+$+++$++@", -+".++++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++$$$+++@", - ".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@", - " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", - " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ "}; ---- parts.xpm Tue Dec 16 00:59:51 2003 -+++ parts.xpm Wed Jan 11 17:45:26 2006 -@@ -61,13 +61,13 @@ - "+...+@...++...@@...+@...+@...++...+@...++...+@...++###+$###++###$$###+$###+$###++###+$###++###+$###++###", - ".+++..@@@..+++..+++..@@@..+++..+++..@@@..+++..+++.#+++##$$$##+++##+++##$$$##+++##+++##$$$##+++##+++##+++", - ".@@@..@@@..+++..+++..@@@.&+++..+++..+++..+++..+++.#$$$##$$$##+++##+++##$$$##+++##+++##+++##+++##+++##+++", --"@.@.@+.+.++.@.++.@.@+...++...@+...@@...++...++...+$#$#$+#+#++#$#++#$#$+###++###$+###$$###++###++###++###", --"@.@.@+.+.++.@.++.@.@+...++...@+...@@...++...++...+$#$#$+#+#++#$#++#$#$+###++###$+###$$###++###++###++###", --"@.@.@+.+.++.@.++.@.@+...++...@+...@@...++...++...+$#$#$+#+#++#$#++#$#$+###++###$+###$$###++###++###++###", --".+.+..@.@..+.+..@.@..+++&&+++..+++..@@@..+++..+++.#+#+##$#$##+#+##$#$##+++&&+++##+++##$$$&#+++##+++&&$$$", --"+.+.++.+.+@.@.@+.@.@@...+@...++...+@...++...+@...++#+#++#+#+$#$#$+#$#$$###+$###++###+$###++###+$###++###", --"+.+.++.+.+@.@.@+.@.@@...+@...++...+@...++...+@...++#+#++#+#+$#$#$+#$#$$###+$###++###+$###++###+$###++###", --"+.+.++.+.+@.@.@+.@.@@...+@...++...+@...++...+@...++#+#++#+#+$#$#$+#$#$$###+$###++###+$###++###+$###++###", -+"@.@.@+.+.++...++...@+...++...@+...@@...++...++...+$#$#$+#+#++###++###$+###++###$+###$$###++###++###++###", -+"@.@.@+.+.++...++...@+...++...@+...@@...++...++...+$#$#$+#+#++###++###$+###++###$+###$$###++###++###++###", -+"@.@.@+.+.++...++...@+...++...@+...@@...++...++...+$#$#$+#+#++###++###$+###++###$+###$$###++###++###++###", -+".+.+..@.@..+++..@.@..+++&&+++..+++..@@@..+++..+++.#+#+##$#$##+++##$#$##+++&&+++##+++##$$$&#+++##+++&&$$$", -+"+.+.++.+.+@...@+...@@...+@...++...+@...++...+@...++#+#++#+#+$###$+###$$###+$###++###+$###++###+$###++###", -+"+.+.++.+.+@...@+...@@...+@...++...+@...++...+@...++#+#++#+#+$###$+###$$###+$###++###+$###++###+$###++###", -+"+.+.++.+.+@...@+...@@...+@...++...+@...++...+@...++#+#++#+#+$###$+###$$###+$###++###+$###++###+$###++###", - ".@@@..+++..@@@..+++..@@@&&+++..+++..@@@&.+++..+++##$$$##+++##$$$##+++##$$$&&+++##+++##$$$&#+++##+++##+++", - "+++++++++++++++++++++++++++++++....+++....+++++++++++++++++..##+++####+++++++++++++++++#################", - "++++++++++++++++++++++++++++++++.+++..+..++.+++++..++.+++.+..+++##+##++#+++++##++#+++#+#################", ---- wmbsdbatt.c Tue Dec 23 19:27:34 2003 -+++ wmbsdbatt.c Wed Jan 11 18:00:47 2006 -@@ -67,6 +67,7 @@ - int battery_time; - int temperature; - int low; -+ int freq; - #if 0 - int capacity; - int rate; -@@ -79,6 +80,7 @@ - static char *sysctl_battery_time = "hw.acpi.battery.time"; - static char *sysctl_temperature = "hw.acpi.thermal.tz0.temperature"; - static char *sysctl_acline = "hw.acpi.acline"; -+static char *sysctl_frequency = "dev.cpu.0.freq"; - - typedef enum { LIGHTOFF, LIGHTON } light; - -@@ -106,6 +108,7 @@ - void draw_batt(void); - void draw_low(void); - void draw_temp(void); -+void draw_freq(void); - void draw_statusdigit(void); - void draw_pcgraph(void); - void blink_batt(void); -@@ -238,7 +241,6 @@ - } - if (show) { - /* show */ -- draw_all(); - if (charging) { - blink_pos--; - } -@@ -284,6 +286,10 @@ - addr -= 273; - acpi_info.temperature = addr; - -+ if (sysctlbyname(sysctl_frequency, &addr, &len, NULL, 0) == -1) -+ err(1, "sysctlbyname(\"%s\")", sysctl_frequency); -+ acpi_info.freq = addr; -+ - if (sysctlbyname(sysctl_acline, &addr, &len, NULL, 0) == -1) - err(1, "sysctlbyname(\"%s\")", sysctl_acline); - acpi_info.acline = addr; -@@ -372,6 +378,7 @@ - draw_temp(); - #endif - draw_temp(); -+ draw_freq(); - - if (acpi_info.battery_status == CHARGING) - blink_batt(); -@@ -471,13 +478,35 @@ - temp = 0; - - dockapp_copyarea(parts, pixmap, (temp / 10) * 5 + light_offset, 40, 5, -- 9, 23, 46); -+ 9, 32, 46); - dockapp_copyarea(parts, pixmap, (temp % 10) * 5 + light_offset, 40, 5, -- 9, 29, 46); -+ 9, 38, 46); - - /* '°C'. */ -- dockapp_copyarea(parts, pixmap, 10 + light_offset, 49, 5, 9, 36, 46); -- dockapp_copyarea(parts, pixmap, 15 + light_offset, 49, 5, 9, 42, 46); -+ dockapp_copyarea(parts, pixmap, 10 + light_offset, 49, 5, 9, 44, 46); -+ dockapp_copyarea(parts, pixmap, 15 + light_offset, 49, 5, 9, 50, 46); -+ -+} -+ -+void -+draw_freq(void) -+{ -+ int light_offset=0; -+ int freq = acpi_info.freq; -+ -+ if (backlight == LIGHTON) -+ light_offset = 50; -+ -+ if (freq < 0) -+ freq = 0; -+ else if (freq > 9999) -+ freq = 9999; -+ if (freq >= 1000) -+ dockapp_copyarea(parts, pixmap, ((freq / 1000) % 10) * 5 + light_offset, 40, 5, 9, 4, 46); -+ if (freq >= 100) -+ dockapp_copyarea(parts, pixmap, ((freq / 100) % 10) * 5 + light_offset, 40, 5, 9, 10, 46); -+ dockapp_copyarea(parts, pixmap, ((freq / 10) % 10) * 5 + light_offset, 40, 5, 9, 16, 46); -+ dockapp_copyarea(parts, pixmap, (freq % 10) * 5 + light_offset, 40, 5, 9, 22, 46); - - } - |