Compare commits

...

314 Commits

Author SHA1 Message Date
7415a6830f release 2.1.0 2014-12-31 01:04:50 +03:00
c23846f7b4 update readme 2014-12-28 16:49:43 +03:00
e957a2723b Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-12-26 02:31:29 +03:00
5369bbda65 remove script 2014-12-26 02:31:13 +03:00
6a8842163e update text in version.h 2014-12-25 00:14:03 +03:00
56e7ee3d11 approve translation 2014-12-24 00:05:40 +03:00
ce72c46cd9 Merge pull request #40 from underr/master
pt_BR translation
2014-12-24 00:00:59 +03:00
78ab09c1da pt_BR translation 2014-12-23 14:21:32 -02:00
498a965488 add skel to create rpm and debs 2014-12-23 10:32:18 +03:00
d1d4a97fa4 apply fix to extscripts 2014-12-22 06:19:25 +03:00
8f1e8606d4 update Ukrainian transaltion 2014-12-18 01:37:06 +03:00
b682c6dbd6 update Spanish translation 2014-12-16 09:36:02 +03:00
c8bf047e76 implement #36
fix (?) initialization
update translations
2014-12-15 02:41:39 +03:00
a336d9aa04 fix #37 2014-12-12 01:04:31 +03:00
2272b0c2c0 auto commit 2014-12-12 00:02:48 +03:00
0533ee8cd5 add #38 2014-12-07 03:04:35 +03:00
be792a4c5a add graphical settings 2014-12-03 04:33:13 +00:00
997e13706b add comments to template 2014-11-29 22:48:52 +03:00
6bcb6798a2 fix #37 2014-11-28 21:02:45 +03:00
4e3593a2a9 fix build 2014-11-25 04:00:01 +03:00
4b471593c7 update changelogs 2014-11-24 09:36:17 +03:00
695a85be29 update translations, implement copy method 2014-11-21 05:13:01 +03:00
bae34ba898 update translations, version and readme 2014-11-21 03:28:11 +03:00
93db63b16c * fix naming
* fix notification
2014-11-20 06:13:09 +03:00
0cd2ff6813 rewrite all ui interfaces t oKDE standards 2014-11-20 06:01:56 +03:00
222db43dc1 update extscripts and dp ui files to kde standards 2014-11-20 04:21:24 +03:00
e4be3b2e02 simplify custom script class
remove QGraphicsView border
2014-11-20 04:07:14 +03:00
543e39a7ac Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-11-20 03:18:53 +03:00
ca60a85241 update graphicalitem 2014-11-19 16:19:23 +03:00
2c3c575493 * add .desktop suffix to files if they have not
* remove frameshape
2014-11-19 15:04:10 +03:00
5f37a9d8c7 fix direction 2014-11-19 12:28:43 +03:00
c3420a8393 some simplification of graphicalitem 2014-11-19 12:08:54 +03:00
5ce3a5c213 fix configuration 2014-11-19 11:14:55 +03:00
179a97b01b implement tooltip to configuration interface 2014-11-18 12:58:56 +03:00
f0c79a4dab implement contextual menu to listWidgets 2014-11-18 11:54:23 +03:00
f56f319075 some update on graphical items 2014-11-18 06:56:22 +03:00
f7b7d5b6b4 fix run 2014-11-17 17:38:02 +03:00
3193de1a85 implement ExtScripts configuration 2014-11-17 17:04:31 +03:00
8cdfdd4e81 start work on porting extscripts to *.desktop configuration 2014-11-17 10:29:09 +03:00
16d7ca2005 update extscript to inherit from QDialog 2014-11-17 10:01:57 +03:00
e54ab7e1a5 small update 2014-11-16 22:37:55 +03:00
a335979830 implement grapicalitem settings 2014-11-16 13:33:09 +03:00
8460d07875 implement tryDelete() method 2014-11-16 11:40:16 +03:00
5ec26c7747 implement graphical item to aw (except for configuration) 2014-11-14 07:16:55 +03:00
8aafdb6fc4 update gi to use desktop conf files 2014-11-14 04:19:53 +03:00
9eedaf246f rename ring to circle 2014-11-13 12:03:48 +03:00
e7714042bb yet another fix margin 2014-11-13 11:21:51 +03:00
0f4bbbfba1 some intermediate commit 2014-11-12 05:16:05 +03:00
7069758b73 add colorsettings to DP tooltip
remove deprecated settings from AW
2014-11-10 01:53:27 +03:00
bbc9d72606 fix margin 2014-11-10 00:51:43 +03:00
b53b1111f9 fix tooltip to DP 2014-11-09 08:22:05 +03:00
64fdc4bebe move tooltip to proxydiwget 2014-11-09 04:50:22 +03:00
583046e195 update translations 2014-11-08 18:41:33 +03:00
71b3a4e6ab implement #35 2014-11-07 05:36:36 +03:00
4b90fac0c4 implement #28 2014-11-07 04:56:32 +03:00
2fa0acf13d some intermediate commit 2014-11-06 20:42:53 +03:00
0f9d2e52ab fix #24 2014-11-04 00:06:22 +03:00
373bab14db some edit of external scripts 2014-11-04 00:04:13 +03:00
7e095c4349 implement script function 2014-11-03 06:33:39 +03:00
a4af7ffc07 some improvemance of external scripts 2014-11-03 05:03:14 +03:00
0ab4878b22 update translations 2014-11-01 23:26:47 +03:00
1748829901 implement script feature to the widget 2014-10-31 07:20:14 +03:00
6a41fa2b8a implement script feature to dataengine 2014-10-31 06:13:49 +03:00
2cd04e1f7f end work on extscript class 2014-10-31 04:43:17 +03:00
0a61d926f8 create properties 2014-10-31 01:54:35 +03:00
45c248b101 some intermediate commit 2014-10-30 01:05:09 +03:00
6a784d2e28 remove install script from git pkgbuild 2014-10-27 04:33:16 +03:00
13023a4985 add workaround for #34 to AW 2014-10-27 04:20:13 +03:00
6463ed3bf7 add pkgbuild-git 2014-10-26 17:06:39 +03:00
5bf3847bc9 add checkupdates function 2014-10-15 16:41:31 +04:00
4fc2e238bd fix regexp matching 2014-10-14 05:15:13 +04:00
c18bb61521 implement about window 2014-10-12 15:01:07 +04:00
9e82210463 implement autoupdate function to aw (see #32) 2014-10-11 03:38:19 +04:00
171d545562 add skel for #32 2014-10-10 23:36:11 +04:00
c6fa1f2a79 update tasks 2014-10-08 22:39:39 +04:00
14cee9dbc7 release 2.0.5 2014-10-05 00:20:09 +04:00
5759273e4c add workaroud for resizing 2014-10-04 01:17:34 +04:00
4387bb1e76 some fixes which was introduced with the latest patches 2014-10-02 06:13:10 +04:00
03af5f0e49 upd task, add ability to use $ symbol over $$ 2014-10-02 05:10:02 +04:00
7f6afbcb4d add resizing 2014-10-01 03:15:28 +04:00
4a320bc5d6 more correct destuction 2014-10-01 02:59:47 +04:00
29d34525a3 fix plasma crash caused by label destruction 2014-10-01 02:57:06 +04:00
0ab74b493c fix #31, update submodules 2014-10-01 02:33:10 +04:00
952fa97fcc Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-10-01 02:02:13 +04:00
677ed1ab5e fix update netdev 2014-10-01 02:01:18 +04:00
deb0b3bdbb chenge forceupdate logic 2014-09-29 00:59:19 +04:00
20c85f0d42 fix number of issue 2014-09-28 23:12:33 +04:00
f9a37f0cb2 edit echange log, fix #20 2014-09-26 01:43:22 +04:00
0c8013c26b add tooltip bottom 2014-09-26 01:41:27 +04:00
6b9e19ed58 Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-09-25 23:25:08 +04:00
432ab694fd update changelog 2014-09-25 23:24:33 +04:00
c506183247 fix battery tooltip 2014-09-24 09:51:46 +04:00
fe822518d5 release 2014-09-21 21:50:03 +04:00
1f9e8221f0 release 2.0.4
battery fixes
2014-09-21 21:49:02 +04:00
d7e93e83a3 release 2.0.3 2014-09-21 21:23:26 +04:00
17c3383616 fix aw geometry 2014-09-21 20:43:27 +04:00
830bab7cb6 add support of several $bat tags. Update translations 2014-09-21 20:19:57 +04:00
0b3832cc32 some work 2014-09-18 21:57:59 +04:00
e64ca5ec08 update TODO 2014-09-16 08:54:08 +04:00
84b93098f2 release 2.0.2 2014-09-16 00:04:31 +04:00
17bef06c98 some fixes, prepare to release 2.0.2 2014-09-15 20:28:09 +04:00
db7573de80 update DP translations 2014-09-15 10:04:57 +04:00
4907496a2e fix text edit dp configuration interface 2014-09-14 00:01:23 +04:00
43daae5529 edit temp conversion 2014-09-13 03:06:00 +04:00
1d1fe469f8 rewrite DP configuration interface 2014-09-12 19:29:31 +04:00
99049164be fix cpu* tags
fix notifiations
2014-09-12 00:03:18 +04:00
f61948d9b3 fix (?) notifications 2014-09-11 00:00:08 +04:00
ea54c54d42 add fan tags 2014-09-10 23:51:14 +04:00
c843c5260d Merge pull request #23 from Lemueler/master
Add Chinese translation for awesome-widgets
2014-09-10 21:52:44 +04:00
a8912074dd Modify Chinese translations 2014-09-10 22:56:21 +08:00
2be0edcb40 Add Chinese translations 2014-09-10 22:40:32 +08:00
fcf7ca233f release 2.0.1 2014-09-10 11:18:36 +04:00
aa127574c4 fix label edge's shading 2014-09-09 03:12:20 +04:00
d72f827984 fix empty values 2014-09-09 02:29:59 +04:00
b7d607bfcc add support of custom interfaces 2014-09-09 02:09:58 +04:00
c727947557 update install script 2014-09-09 00:39:02 +04:00
6864e5bda0 update screenshots and link 2014-09-09 00:34:20 +04:00
4babb3ba04 release 2.0.0 2014-09-09 00:19:20 +04:00
e0aadc48c4 fix acoffline variable 2014-09-09 00:00:57 +04:00
18b6fc6eef update changelog 2014-09-08 02:22:50 +04:00
5406f6f66f update readme 2014-09-08 01:57:18 +04:00
ab966504cc update translations, fix layout, some edit of formating
prepare to release 2.0.0
(I plan to update all translations with next releases)
2014-09-08 01:52:40 +04:00
ce761db924 change layout to gridlayout
remove deprecated functions
2014-09-08 00:36:55 +04:00
f91c80b5b1 rollback taging 2014-09-08 00:09:41 +04:00
97fbb4acc1 update install scripts 2014-09-07 19:40:12 +04:00
554354ce36 update trasnaltions 2014-09-06 16:06:47 +04:00
c007fabe12 some fixes 2014-09-06 15:43:53 +04:00
3b11e39e99 change color 2014-09-05 19:43:04 +04:00
653cc4fd84 add button to insert tag 2014-09-05 11:47:05 +04:00
eae742c559 update translations 2014-09-05 11:22:56 +04:00
e339f5aa1a start porting translations 2014-09-05 11:16:56 +04:00
21a1d8cd1b update to upstream changes 2014-09-04 21:20:44 +04:00
0ea17555b1 update to use cfontdialog 2014-09-04 21:04:44 +04:00
eec87be7a2 add html text interaction 2014-09-04 03:32:37 +04:00
0cd293c4c3 add support of battery tooltip 2014-09-03 22:14:50 +04:00
e5c70b9535 more correct interaction with DataEngines 2014-09-03 15:08:33 +04:00
3ef68f7a43 fix tooltip adding processing 2014-09-03 14:58:01 +04:00
1fbc9e315e update formating 2014-09-03 14:52:52 +04:00
28dafcb721 add ex name 2014-09-02 22:52:17 +04:00
4164c7fe04 commit before renaming 2014-09-02 22:49:17 +04:00
bc8aadc17b fix temperature 2014-09-02 22:20:43 +04:00
cd48ac8245 fix cpu reading 2014-09-02 22:16:13 +04:00
0751d080eb move back layout settings 2014-09-02 22:06:01 +04:00
6c6cfe9a04 fix time and uptime 2014-09-02 21:55:23 +04:00
b61d514cb2 add notification module
fix definition of network deivce
2014-09-02 04:30:43 +04:00
a5c352bc06 add contextual actions
fix icons
2014-09-02 03:56:34 +04:00
54174974b1 edit supported information
update desktop panel to tag changes
2014-09-02 03:29:17 +04:00
fd81fda9a1 fix tooltip
fix memory
remove layout settings
more correct parsing
2014-09-02 02:42:34 +04:00
c69957e905 add configuration interface slots 2014-09-02 01:10:27 +04:00
a65f4cb02f commit before tests 2014-09-01 20:58:47 +04:00
3b89b30a98 fix formating 2014-09-01 12:57:10 +04:00
5921bd4c1d add tooltip 2014-09-01 12:35:43 +04:00
5b26d835df end work on deinteraction module 2014-09-01 03:49:00 +04:00
38c4d3bfaf work on data update 2014-08-31 20:21:06 +04:00
eac50a8799 plasmoid fixes 2014-08-31 18:45:43 +04:00
6e5a068ad2 add battery dataengine 2014-08-31 18:35:35 +04:00
7f639805e6 add connectToEngine() function 2014-08-31 18:07:18 +04:00
8a6650f833 add findKeys() function
it's time to drink!
2014-08-30 18:17:37 +04:00
96cfeb520d add keys 2014-08-30 18:14:56 +04:00
7cd80e14a7 create initialization skeleton 2014-08-30 17:40:25 +04:00
b55d453aeb add checkboxes to tooltip window 2014-08-30 16:30:58 +04:00
7eb5197318 add configChanged() function 2014-08-30 16:17:42 +04:00
e603ad9977 add configAccepted() function 2014-08-30 15:56:05 +04:00
068a976499 add createConfigurationInterface() function 2014-08-30 15:24:19 +04:00
5b44fa5c75 starting of porting ptm to C++ 2014-08-29 10:50:37 +04:00
87614084ab more pretty deconfig page 2014-08-29 10:22:47 +04:00
8ccad0b86c more temperature units: Reaumur, cm^-1, kJ/mol, kcal/mol (really, I use
cm^-1)
2014-08-29 02:19:34 +04:00
0240dee6ea rewrite advanced config to better view 2014-08-29 01:59:14 +04:00
81105fb12d remove dublicates 2014-08-28 23:00:08 +04:00
93abb86340 update to use submodules 2014-08-28 15:35:57 +04:00
5584ba0e9f update to use submodules 2014-08-28 15:21:41 +04:00
2c35031549 add toggle panel configuration 2014-08-28 12:28:52 +04:00
d28d7156ce add raw support to hide panels 2014-08-28 03:06:48 +04:00
123cfcb475 fix according to netctl#9 2014-08-09 20:21:30 +04:00
7fa541bc06 rewrite dataengine to use task 2014-08-07 19:44:29 +04:00
03574461a9 update notifications 2014-08-02 18:36:12 +04:00
f588c9af8d update files 2014-08-02 18:21:39 +04:00
ee39ac9203 add background settings to the tooltip 2014-08-02 17:49:25 +04:00
5ea8c97094 add mpris support 2014-08-02 11:54:57 +04:00
edf3a72564 edited todo list 2014-07-30 19:57:23 +04:00
b9c9aac686 fix twinkle of desktop panel 2014-07-23 17:58:01 +04:00
7dd7251a45 fixes in desktop-panel 2014-07-22 09:49:55 +04:00
1ccbc264ed fix naming 2014-07-21 22:45:22 +04:00
334189b8a1 prerelease 1.11.0 2014-07-21 22:02:54 +04:00
6c7d6a5443 update russian readme 2014-07-09 18:54:54 +04:00
e37f2a7190 add support of tags to cmd 2014-07-09 13:50:46 +04:00
baf21549d5 update eng readme and changlelog 2014-07-09 13:32:33 +04:00
07c2abd5bc update translations 2014-07-09 13:14:48 +04:00
2ea73b2261 add support of desktop label to ptm 2014-07-09 13:12:52 +04:00
7c3b47693e update translations 2014-07-09 10:53:54 +04:00
0fe67ce323 initialization of translation files 2014-07-09 10:34:38 +04:00
bfb7d72faf change lineedit to combobox 2014-07-09 09:59:04 +04:00
662b952961 ended work on ptm-desktop-panel 2014-07-09 09:42:58 +04:00
a81cbe3d9c add interaction with craphical interface 2014-07-09 08:55:33 +04:00
0462bb186e Started work on ptm-desktop-panel widget 2014-07-09 01:00:24 +04:00
9985fe6260 add desktop section to the sysmon 2014-07-08 19:08:08 +04:00
11a6f01ae3 prepare to release 1.10.3
+ added ability to set transparent background
2014-07-08 10:12:20 +04:00
43ee40a65d release 1.10.2 2014-06-11 04:23:46 +04:00
f9eb27964f release 1.10.1 2014-06-10 10:44:34 +04:00
bab9f58b35 try again fix of initialization 2014-06-10 10:42:15 +04:00
608908fd02 fix checking of qmmp 2014-06-10 09:57:30 +04:00
178bbd0bc0 fix first initialization 2014-06-10 09:42:21 +04:00
f8a02a48ac fix 2014-06-10 09:30:31 +04:00
cf39fba9c2 fix error in ps dataengine 2014-06-10 09:27:26 +04:00
6643852822 edit desktop files 2014-06-10 07:59:05 +04:00
7145a1d33e release 1.10.0 2014-06-09 16:57:25 +04:00
a3c1f4ea66 fix force update function 2014-06-09 16:55:51 +04:00
a6ddd53308 small fix 2014-06-09 15:58:04 +04:00
744f3bc04b add setKeys() function 2014-06-09 15:57:15 +04:00
afdf86f03a update archives 2014-06-09 15:41:30 +04:00
8f2784d2a2 prepare to release 1.10.0 2014-06-09 15:41:01 +04:00
926da88c10 fix ps 2014-06-09 15:39:55 +04:00
ea287c21b1 fix player 2014-06-09 15:34:11 +04:00
c0561a95e0 fix hddtemp 2014-06-09 15:20:22 +04:00
b7d1802ca8 fix gpu and gputemp 2014-06-09 15:17:31 +04:00
c659f16d7e fix custom command 2014-06-09 15:10:51 +04:00
79cbfc4b32 fix pkg 2014-06-09 15:04:40 +04:00
61e2a380b9 add support of multithreading to all functions of dataengine 2014-06-09 13:35:52 +04:00
64bc89ba75 edit changelog (prerelease 1.10.0?) 2014-06-09 03:35:58 +04:00
926d112d22 add support of multithreading to dataengine (only for custom command
now)
2014-06-09 03:23:14 +04:00
e205664fec small fix pt_BR files 2014-06-09 01:48:45 +04:00
5d13c8289f Merge branch 'master' of https://github.com/underr/pytextmonitor into underr-master
Conflicts:
	README.md
	sources/ptm/po/pt_BR.po
2014-06-09 01:37:44 +04:00
7ac5d68b02 Fixed 'u's problem 2014-06-08 14:53:13 -03:00
69b5bdec66 Updated Brazillian Portuguese translation and README 2014-06-08 14:51:24 -03:00
5ce7aac9dd edit header of uk.po 2014-06-06 11:48:52 +04:00
80eb7983fc update Ukrainian translation 2014-06-06 01:24:44 +04:00
7e2b1384ae edited script 2014-06-05 19:30:23 +04:00
d573cc7491 update fr translation 2014-06-05 19:25:09 +04:00
b380000d2f Merge pull request #18 from Mermouy/master
fr-translation update
2014-06-05 19:06:09 +04:00
50d96574f5 fr-translation update 2014-06-05 16:19:09 +02:00
d6819e3771 update spanish translation 2014-06-05 10:25:20 +04:00
a54b3064fe add debug information 2014-06-04 22:55:29 +04:00
a0288bcf96 edited readme and changelog 2014-06-04 22:53:51 +04:00
f1e22f122e add support of stretch 2014-06-04 22:49:47 +04:00
52f85836a2 edit size of fields in configuration interface 2014-06-04 16:32:54 +04:00
2ad638c158 edit changelog 2014-06-02 16:00:55 +04:00
cebf3b9aea add support of debug to widget 2014-06-02 15:59:11 +04:00
e32a37043a debug settings for dataengine is read now from environment 2014-06-02 14:44:48 +04:00
246430dc28 small edit of PKGBUILD 2014-06-02 14:29:35 +04:00
dd4471a0d2 fix typo 2014-06-02 14:18:48 +04:00
31c612cfd2 add debug support in DataEngine 2014-06-02 14:16:18 +04:00
2201f4d4a2 remove runtime libraries from dep list, since they aren't needed 2014-06-02 12:16:29 +04:00
886e24d4af add double quotes 2014-06-01 23:34:53 +04:00
fbf5f649ee update Ukrainian translation
fix typo and errors in Russian texts (thanks to Viktor Slobodyan)
2014-06-01 23:29:28 +04:00
7fc7b68358 added support of $hddtotmb and $hddtotgb tags 2014-05-31 14:12:04 +04:00
9904e5d6c6 fix typo 2014-05-29 18:17:15 +04:00
e10f3396b9 added ability to use vertical layout 2014-05-29 18:13:32 +04:00
25ff5a9189 fix charset 2014-05-29 00:54:43 +04:00
41b1282488 edited readme 2014-05-29 00:42:38 +04:00
5d46988745 small fix 2014-05-29 00:33:23 +04:00
71823471cc fix bug with saving settings
added 'enable popup message'
2014-05-29 00:30:23 +04:00
fe580ef806 removed util.py
removed createNotifyrc function
2014-05-28 23:27:05 +04:00
b1f8340774 fix version 2014-05-28 22:43:19 +04:00
e868b03454 fix icons 2014-05-28 22:23:49 +04:00
632adfa54c refactoring of configuration interface 2014-05-28 21:52:55 +04:00
4476ec8e45 fix default tab in configuration interface 2014-05-28 20:27:17 +04:00
b4f7b6e65a updated readme 2014-05-28 18:07:11 +04:00
77349e797f small changes in supporting scripts 2014-05-28 10:24:26 +04:00
e7b6e4a3bf added support of disable ooption to dataengine 2014-05-27 16:15:49 +04:00
3d8f88d935 added support of disable option to dataengine 2014-05-27 15:52:08 +04:00
1eed0f458c update notification for clementine 2014-05-27 12:09:41 +04:00
9b581a882f updated gui translations 2014-05-27 12:07:03 +04:00
6ba1288c50 moved player settings from plasmoid to dataengine
try to fix creating a lot of zombies
2014-05-27 09:11:53 +04:00
926c283338 updated changlelog 2014-05-27 01:31:32 +04:00
8519eb51bd added create_diff
+added tags $*tot*
2014-05-27 01:30:20 +04:00
f05b256306 updated changelog 2014-05-26 12:22:00 +04:00
6fd7bad8f9 changed from md readme to html 2014-05-26 12:18:39 +04:00
6f4ecbd107 fix typo 2014-05-24 20:27:07 +04:00
9f392c3a19 edited update netdevice 2014-05-24 18:08:03 +04:00
e04430e36c added Ukrainian readme 2014-05-24 17:09:08 +04:00
68759513a9 added Ukrainian translation. Thanks to Виктор Слободян 2014-05-24 16:27:24 +04:00
62164f8229 added support of text update contextual action 2014-05-24 16:06:45 +04:00
7c5e02217b prepare to add updateText function 2014-05-24 14:15:48 +04:00
23cd74132a set pkgcmd combobox untranslatable 2014-05-23 12:08:38 +04:00
5dfb02bf9d removed checking playerName in getPlayerInfo() 2014-05-23 12:04:24 +04:00
2d0a92eec1 fix reading clementine 2014-05-23 11:52:04 +04:00
359e81ff93 yaf of pt_BR translation 2014-05-23 11:48:15 +04:00
1bd80ba786 updated changelog 2014-05-22 11:51:18 +04:00
2a04414600 update readme 2014-05-22 11:49:46 +04:00
fe51e67ba4 added support of clementine to plasmoid 2014-05-22 11:45:20 +04:00
e208be7894 added support of clementine to dataengine 2014-05-22 11:41:39 +04:00
26bf118d50 remove message from install 2014-05-22 03:07:11 +04:00
86da48bbca update readme 2014-05-22 03:06:43 +04:00
d081a64889 edited supporting materials 2014-05-22 02:49:28 +04:00
3d2c09647a update pt_BR translation and fix small typos 2014-05-22 02:46:27 +04:00
c7a99a6d0d Merge pull request #16 from underr/master
Brazillian Portuguese translation
2014-05-22 02:45:35 +04:00
c0a273f9f7 added support of hddtempcmd to GUI
edited readme call
2014-05-22 02:43:54 +04:00
5d724ac688 Brazillian Portuguese translation 2014-05-21 19:18:44 -03:00
8e318a99d0 added support of cmd to dataengine 2014-05-22 01:27:50 +04:00
5c861b3814 release 1.9.0 2014-05-21 19:56:59 +04:00
5cf068875c Merge pull request #15 from Mermouy/master
update fr translation
2014-05-21 19:47:00 +04:00
80366e59bb fr translation 2014-05-21 17:01:15 +02:00
a6a94f0e49 update 2014-05-20 11:13:02 +04:00
6a74802261 fix typo 2014-05-20 11:08:21 +04:00
c44e98d8a1 fix 2014-05-20 11:07:24 +04:00
b872a66088 added status of translation 2014-05-20 11:06:50 +04:00
74d54d6268 fix typo 2014-05-20 10:48:52 +04:00
2ad6d76d4e updated readme (added link) 2014-05-20 10:47:15 +04:00
878dac158e added TRANSLATORS.md 2014-05-20 10:44:51 +04:00
2de09cec32 prepare to release 1.9.0
+ added support of several custom commands
* fix parsing pkg label
2014-05-20 10:07:01 +04:00
90ca8c89f5 added support of several custom commands to dataengine 2014-05-20 09:48:07 +04:00
757d7b703f update Spain translations 2014-05-19 23:05:32 +04:00
5d3e377ffb yet another update readme (hope actual for 1.9.0) 2014-05-19 21:29:10 +04:00
9b5a6908d7 fix typo 2014-05-19 21:23:22 +04:00
f54ba7a6cf updated en readme 2014-05-19 21:22:11 +04:00
7427183981 fix typo 2014-05-19 11:57:06 +04:00
109328e33b rollback fr translation 2014-05-19 11:55:28 +04:00
ec62e93e4e prepare to add support of several custom command 2014-05-19 03:06:29 +04:00
1a6d97800c added hdd speed label 2014-05-19 02:48:00 +04:00
b09e90a0e5 added context menu 2014-05-19 00:59:48 +04:00
c1f18a31bf release 1.8.3 2014-05-12 23:56:52 +04:00
962478a27a release 1.8.2 2014-05-08 00:31:06 +04:00
4857c6658f fix =) 2014-05-03 04:39:44 +04:00
4416298e88 removed unneeded lines in ptm/CMakeLists.txt 2014-05-03 04:38:20 +04:00
111 changed files with 16279 additions and 8876 deletions

7
.gitignore vendored
View File

@ -1,4 +1,7 @@
sources/build
sources/usr
*src.tar.xz
*src.tar.gz
*src.tar.[gx]z
*pkg.tar.[gx]z
build
src
pkg

12
.gitmodules vendored Normal file
View File

@ -0,0 +1,12 @@
[submodule "sources/3rdparty/pdebug"]
path = sources/3rdparty/pdebug
url = https://github.com/arcan1s/qtadds-pdebug.git
[submodule "sources/3rdparty/task"]
path = sources/3rdparty/task
url = https://github.com/arcan1s/qtadds-taskadds-qprocess.git
[submodule "sources/3rdparty/tasks"]
path = sources/3rdparty/tasks
url = https://github.com/mhogomchungu/tasks.git
[submodule "sources/3rdparty/fontdialog"]
path = sources/3rdparty/fontdialog
url = https://github.com/arcan1s/qtadds-fontdialog.git

View File

@ -2,4 +2,8 @@ Current developers:
Evgeniy Alekseev aka arcanis <esalexeev (at) gmail (dot) com>
Translators:
@Mermouy (french translations)
@Mermouy (French translation)
Ernesto Avilés Vzqz (Spanish translation)
@underr (Brazillian Portuguese translation)
Виктор Слободян (Ukrainian translation)
Steve Lemuel (Chinese translation)

223
CHANGELOG
View File

@ -1,23 +1,142 @@
Ver.2.1.0:
+ add support of custom scripts
+ add support of desktop preview to DP
+ add bar support
+ add autoupdate function
- remove custom command
- fix #34
* fix notifications
* rewrite UI to KDE standards
* fix margins on graphical objects
* rewrite DP abd DE to use library calls
* edit GPU properties definition
* edit regexp matching
Ver.2.0.5:
+ add tooltip bottom (#30)
* fix network interface update
* fix battery tooltip bug
* edit DP layout (#31)
Ver.2.0.4:
* more correct work with batteries
Ver.2.0.3:
+ add support of several $bat tags
* edit layout
Ver.2.0.2:
+ add $fan* tags
+ add Chinese translation (thanks to @Lemueler)
+ add net devices checking is it p2p device
- remove ps stats from notification
* yet another fix cpu* and cpucl*
* rewrite DP configuration interface
* fix non-standard temp units
Ver.2.0.1:
+ add support of custom interfaces
* fix label edge's shading
* fix cpu*, cpucl*, gpu*, ps* tags
Ver.2.0.0:
+ add new widget - awesome widget
+ add new tags $hddfreemb, $hddfreegb, $memusedmb, $memusedgb, $memfreemb $memfreegb, $swapfreemb, $swapfreegb
+ add new DataEngine - battery
+ add new tooltip - battery
+ add new temperature units cm^-1, kcal/mol, kJ/mol, Reamur
+ add ability to hide panels by hotkey pressing
- remove widget pytextmonitor
- remove separate fields
- remove README
* project has been renamed to Awesome Widgets
* rename tag $custom (time) to $ctime
* rename tag $custom (uptime) to $cuptime
* rename tag $time (player) to $duration
* rename tag $number to $ndesktop
* rename tag $name to $desktop
* rename tag $total to $tdesktops
* debug flag is DEBUG now
* rewrite project to C++
* tooltip doesn't depend on widget now
* text align now can be configured only by using HTML tags
* move battery and AC settings to DataEngine
* changes in configuration interface
Ver.1.11.0:
+ add ability to disable background image
+ add desktop DataEngine
+ add PTM desktop panel
+ add desktop label (tags $name, $number, $total)
+ add ability to interact with players using mpris
* rewrite to use submodules
* rewrite dataengine to use tasks
* fix nvidia temperature definition
Ver.1.10.2:
- fix error with tempUnits in hddtemp label
Ver.1.10.1:
- fix error with number formats in ps label
- fix first initialization of DataEngine
- fix checking of qmmp
Ver.1.10.0:
+ add tags $hddtotmb, $hddtotgb
+ add tags $memtotmb, $memtotgb, $swaptotmb, $swaptotgb
+ add ability for force update text
+ add support of clementine
+ add support of hddtemp cmd
+ add support of disable option for HDDDEV and GPUDEV
+ add error checking of DataEngine variables
+ add multithreading to DataEngine
+ add ability to disable popup messages
+ add ability to use vertical layout
+ add ability to add stretch
+ add ability to show debug information (set environment variable 'PTM_DEBUG' to 'yes')
+ add Brazillian Portuguese translation (@underr)
+ add Ukrainian translation (Виктор Слободян)
- remove util.py
- remove createNotifyrc since it isn't needed
* refactoring of configuration interface
* player settings was moved from plasmoid to dataengine
* edit readme call
* change readme from md to html
Ver.1.9.0:
+ add support of several custom commands ($customN)
+ add hdd speed label ($hddrN, $hddwN)
+ add actions to context menu (open readme and run ksysguard)
- remove doubleclick event
* fix parsing pkg label
Ver.1.8.3:
+ add Spanish translation (thanks to Ernesto Avilés Vzqz)
+ add readme to the package
Ver.1.8.2:
+ add different temperature units (Farenheit and Kelvin)
Ver.1.8.1:
* change pkg update time to hour
Ver.1.8.0:
+ added scrollbar to configuration interface
+ added AC lines configuration
+ added $hddmbN, %hddgbN tags
+ added support of ps ($ps, $pscount, $pstotal tags)
+ added support of package managers ($pkgcountN tags)
+ add scrollbar to configuration interface
+ add AC lines configuration
+ add $hddmbN, $hddgbN tags
+ add support of ps ($ps, $pscount, $pstotal tags)
+ add support of package managers ($pkgcountN tags)
* refactoring of DataEngine
Ver.1.7.4:
+ added support more than 10 tags in cpu, cpuclock, hdd, hddtemp, temp labels
+ add support more than 10 tags in cpu, cpuclock, hdd, hddtemp, temp labels
- format bug fixes
* changes in custom uptime format
Ver.1.7.3:
+ added tags $memgb, $swapgb
+ added readme directory
+ added french translation (@Mermouy)
+ add tags $memgb, $swapgb
+ add readme directory
+ add french translation (@Mermouy)
- fix tooltip for custom uptime format
- fix #12
* more refactoring to the god of refactoring
@ -26,108 +145,108 @@ Ver.1.7.3:
* player_name now has str type
Ver.1.7.2:
+ added tags $dd, $d, $hh, $h, $mm, $m to custom uptime format
+ added scalling to tooltips
+ added dataengine configuration from ptm
+ added custom command to dataengine
- removed custom command from ptm
- removed tags $ds, $hs, $ms
+ add tags $dd, $d, $hh, $h, $mm, $m to custom uptime format
+ add scalling to tooltips
+ add dataengine configuration from ptm
+ add custom command to dataengine
- remove custom command from ptm
- remove tags $ds, $hs, $ms
Ver.1.7.1:
- removed error label
- remove error label
* fix bug with zero values in tooltip
Ver.1.7.0:
+ added support of several tags in temperature label
+ added tags $cpuN, $cpuclN, $hddN, $tempN, $hddtempN, $up, $down
+ added label with custom command
+ added tooltips for CPU, CPU clock, memory, swap and network labels
- removed tags @@...@@, $temp, $ccpu, $ccpucl, $net
+ add support of several tags in temperature label
+ add tags $cpuN, $cpuclN, $hddN, $tempN, $hddtempN, $up, $down
+ add label with custom command
+ add tooltips for CPU, CPU clock, memory, swap and network labels
- remove tags @@...@@, $temp, $ccpu, $ccpucl, $net
* changes in settings
* ptm now does not require net-tools
* refactoring
Ver.1.6.1:
+ added support of several devices in hddtemp label
+ add support of several devices in hddtemp label
- fixed #6
Ver.1.6.0:
+ added $custom tag to time and uptime labels (#8)
+ add $custom tag to time and uptime labels (#8)
+ russian translation
- fixed #6, #10
* changed license to GPLv3
* changed project build
- fix #6, #10
* change license to GPLv3
* change project build
Ver.1.5.3:
+ added $album, $progress and $time tags to player label (#7)
- fixed zero swap
+ add $album, $progress and $time tags to player label (#7)
- fix zero swap
Ver.1.5.2:
+ added $isotime, $shorttime and $longtime tags to time label
+ add $isotime, $shorttime and $longtime tags to time label
Ver.1.5.1:
+ added time label
+ add time label
Ver.1.5.0:
+ added player label
+ add player label
Ver.1.4.0:
+ added notifications
+ add notifications
Ver.1.3.6:
- fixed #1, #2
- fix #1, #2
Ver.1.3.5:
- fix bug with definition network device
Ver.1.3.4:
+ added double click event
+ added auto selection of network device
- fixed yet another plasma crash
+ add double click event
+ add auto selection of network device
- fix yet another plasma crash
Ver.1.3.3:
* edited reading temperature device
* edit reading temperature device
Ver.1.3.2b:
- fixed plasma crash
- fix plasma crash
Ver.1.3.2:
+ added GPU, GPU temperature, HDD and HDD temperature labels
+ added $ccpu and $ccpucl tags
+ add GPU, GPU temperature, HDD and HDD temperature labels
+ add $ccpu and $ccpucl tags
- bug fixes
* optimization and refactoring
Ver.1.2.2:
+ added tooltip to lineEdit
+ add tooltip to lineEdit
Ver.1.2.1:
* if battery doesn't exist return 'off'
* if AC doesn't exist return '(?)'
Ver.1.2.0:
+ added $ac tag to battery label
+ added battery and ac device configurations
+ added error cheking
+ add $ac tag to battery label
+ add battery and ac device configurations
+ add error cheking
* $bat tag now reading from /sys/*
Ver.1.1.4:
* changed parsing acpi output (battery label)
* change parsing acpi output (battery label)
Ver.1.1.3:
+ added font weight
* edited font setup line. Now setup for font family works normaly
+ add font weight
* edit font setup line. Now setup for font family works normaly
* small bug fix
Ver.1.1.2:
+ added CPU clock lable
+ added function to update network device (100*time_interval)
+ changed update sliders
+ add CPU clock lable
+ add function to update network device (100*time_interval)
+ change update sliders
Ver.1.1.1:
+ added $swapmb, $memmb, $netdev, @@netdev=...@@ tags
+ add $swapmb, $memmb, $netdev, @@netdev=...@@ tags
- some bug fixes
* widget consists of several labels
* edited configuration interface
* edit configuration interface
Ver.1.0:
First release

View File

@ -1,3 +1,122 @@
Вер.2.1.0:
+ добавлена функция автообновления
+ добавлена поддерка кастомных скриптов
+ добавлена поддержка превью рабочего стола для DP
+ добавлена поддержка баров
- удалена поддержка кастомных команд
- фикс #34
* исправлены уведомления
* переписан UI в соответствии со стандартами KDE
* исправлены границы для графических объектов
* переписан DP и DE на использование библиотечных функций
* изменено определение свойств GPU
* изменен поиск регулярных выражений
Вер.2.0.5:
+ добавлен нижний край к тултипу (#30)
* исправлен баг с обновлением сетевого интерфейса
* исправлен баг с тултипом батареи
* отредактирована разметка DP (#31)
Вер.2.0.4:
* более корректная работа с батареями
Вер.2.0.3:
+ добавлена поддержка нескольких тегов $bat
* отредактирована разметка
Вер.2.0.2:
+ добавлены теги $fan*
+ добавлен китайский перевод (спасибо @Lemueler)
+ добавлена проверка сетевых устройств на p2p
- удалено ps stats из уведомлений
* еще один фикс тегов cpu* и cpucl
* переписан конфигурационный интерфейс DP
* исправлены нестандартные единицы температуры
Вер.2.0.1:
+ добавлена поддержка кастомных интерфейсов
* фикс затенения краев поля
* фикс тегов cpu*, cpucl*, gpu*, ps*
Вер.2.0.0:
+ добавлен виджет awesome widget
+ новые теги $hddfreemb, $hddfreegb, $memusedmb, $memusedgb, $memfreemb $memfreegb, $swapfreemb, $swapfreegb
+ новый DataEngine - battery
+ новый тултип - battery
+ новые температурные единицы см^-1, ккал/моль, кДж/моль, Реамюр
+ добавлена возможность скрывать панели по хоткею
- удален виджет pytextmonitor
- убраны отдельные поля
- удалены README
* проект переименован в Awesome Widgets
* тег $custom (время) переименован в $ctime
* тег $custom (время работы) переименован в $cuptime
* тег $time (плеер) переименован в $duration
* тег $number переименован в $ndesktop
* тег $name переименован в $desktop
* тег $total переименован в $tdesktops
* дебаг флаг теперь DEBUG
* проект полностью переписан на C++
* тултип независит теперь от самого виджета
* настройка выравнивания текста теперь осуществляется только HTML тегами
* настройки батареи и адаптора питания вынесены в DataEngine
* изменения в конфигурационном интерфейсе
Вер.1.11.0:
+ добавлена возможность отключения фона
+ добавлен desktop DataEngine
+ добавлен виджет PTM desktop panel
+ добавлено поле текущий рабочий стол (теги $name, $number, $total)
+ добавлена возможность взаимодействия с плеерами через mpris
* добавлено использование сабмодулей
* dataengine переписан с использованием tasks
* фикс чтения температуры nvidia
Вер.1.10.2:
- фикс ошибки с tempUnits в поле hddtemp
Вер.1.10.1:
- пофикшена ошибка с форматами чисел в поле ps
- пофикшена инициализация значений в DataEngine
- пофикшена проверка qmmp
Вер.1.10.0:
+ добавлены теги $hddtotmb, $hddtotgb
+ добавлены теги $memtotmb, $memtotgb, $swaptotmb, $swaptotgb
+ добавлена возможность форсированного обновления
+ добавлена поддержка clementine
+ добавлена поддержка команды hddtemp
+ добавлены поддержка disable для HDDDEV и GPUDEV
+ добавлена многопоточность в DataEngine
+ добавлена проверка ошибок для переменных DataEngine
+ добавлена возможность отключения всплывающих сообщений
+ добавлена возможность использовать вертикальную разметку
+ добавлена возможность добавить пустое пространство
+ добавлена возможность вывода отладочной информации (установите переменную окружения 'PTM_DEBUG' в 'yes')
+ добавлен перевод Brazillian Portuguese (@underr)
+ добавлена украинская локализация (Виктор Слободян)
- удален util.py
- удалены функции createNotifyrc, поскольку они больше не нужны
* рефакторинг конфигурационного интерфейса
* настройки плеера были перенесены из виджета в dataengine
* исправлен вызов readme под четырехсимвольное обозначение
* перенос readme с md на html
Вер.1.9.0:
+ добавлена поддержка нескольких кастомных команд ($customN)
+ добавлено поле скорости hdd ($hddrN, $hddwN)
+ добавлены действия в контекстное меню (открыть readme и запустить ksysguard)
* исправлен парсинг поля pkg
- убрано событие по двойному клику
Вер.1.8.3:
+ добавлен испанский перевод (Ernesto Avilés Vzqz)
+ добавлены файлы readme
Вер.1.8.2:
+ добавлены различные температурные единицы (Farenheit и Kelvin)
Вер.1.8.1:
* поле pkg теперь обновляется раз в час

View File

@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
pytextmonitor
awesome-widgets
Copyright (C) 2013-2014 Evgeniy Alekseev
This program is free software: you can redistribute it and/or modify
@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
pytextmonitor Copyright (C) 2013 Evgeniy Alekseev
awesome-widgets Copyright (C) 2013 Evgeniy Alekseev
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

View File

@ -1,30 +1,29 @@
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com>
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
pkgname=kdeplasma-applets-pytextmonitor
_pkgname=pytextmonitor
pkgver=1.8.1
pkgname=kdeplasma-applets-awesome-widgets
_pkgname=awesome-widgets
pkgver=2.1.0
pkgrel=1
pkgdesc="Minimalistic Plasmoid script written on Python2. It looks like widgets in Awesome WM"
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('i686' 'x86_64')
url="http://arcanis.name/projects/pytextmonitor"
license=('GPLv3')
depends=('kdebase-workspace' 'kdebindings-python2' 'lm_sensors')
url="http://arcanis.name/projects/awesome-widgets"
license=('GPL3')
depends=('kdebase-workspace' 'lm_sensors')
optdepends=("amarok: for music player monitor"
"clementine: for music player monitor"
"catalyst: for GPU monitor"
"hddtemp: for HDD temperature monitor"
"mpd: for music player monitor"
"net-tools: for popup messages"
"nvidia-utils: for GPU monitor"
"qmmp: for music player monitor"
"sysstat: for popup messages")
"qmmp: for music player monitor")
makedepends=('automoc4' 'cmake')
source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install=${pkgname}.install
md5sums=('de872b28c48b9b4903dcfa50158595dc')
md5sums=('37d9ad08b2b4623d2ab9089facf4b5ff')
backup=('usr/share/config/extsysmon.conf')
prepare() {
[[ -d ${srcdir}/build ]] && rm -rf "${srcdir}/build"
rm -rf "${srcdir}/build"
mkdir "${srcdir}/build"
}

40
PKGBUILD-git Normal file
View File

@ -0,0 +1,40 @@
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
pkgname=kdeplasma-applets-awesome-widgets
_pkgname=awesome-widgets
pkgver=2.0.5
pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('i686' 'x86_64')
url="http://arcanis.name/projects/awesome-widgets"
license=('GPL3')
depends=('kdebase-workspace' 'lm_sensors')
optdepends=("amarok: for music player monitor"
"clementine: for music player monitor"
"catalyst: for GPU monitor"
"hddtemp: for HDD temperature monitor"
"mpd: for music player monitor"
"nvidia-utils: for GPU monitor"
"qmmp: for music player monitor")
makedepends=('automoc4' 'cmake')
source=(${_pkgname}::git+https://github.com/arcan1s/awesome-widgets/)
md5sums=('SKIP')
backup=('usr/share/config/extsysmon.conf')
prepare() {
rm -rf "${srcdir}/build"
mkdir "${srcdir}/build"
}
build () {
cd "${srcdir}/build"
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) \
"../${_pkgname}/sources"
make
}
package() {
cd "${srcdir}/build"
make DESTDIR="${pkgdir}" install
}

192
README.md
View File

@ -1,194 +1,51 @@
pytextmonitor
=============
awesome-widgets (ex-pytextmonitor)
==================================
Information
-----------
PyTextMonitor is a minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm.
**NOTE** LOOKING FOR TRANSLATORS!
A collection of minimalistic widgets which looks like Awesome Window Manager widgets.
Configuration
-------------
For edited output you must open Settings window and setup output format in lines:
* tag `$time` - time in default format. For example, *fri Nov 6 04:48:01 2013*
* tag `$isotime` - time in iso format
* tag `$shorttime` - time in short locale format
* tag `$longtime` - time in long locale format
* tag `$custom` - custom time format
* tag `$uptime` - uptime, *---d--h--m*
* tag `$custom` - custom uptime format
* tag `$cpu` - total load cpu, *%*
* tag `$cpuN` - load CPU for core N, *%*
* tag `$cpucl` - average cpu clock, *MHz*
* tag `$cpuclN` - cpu clock for core N, *MHz*
* tag `$tempN` - temperature for device N. For example, `$temp0`
* tag `$gpu` - GPU usage, *%*. `aticonfig` or `nvidia-smi` must be installed
* tag `$gputemp` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
* tag `$mem` - usage memory, *%*
* tag `$memmb` - usage memory, *MB*
* tag `$memgb` - usage memory, *GB*
* tag `$swap` - swap, *%*
* tag `$swapmb` - swap, *MB*
* tag `$swapgb` - swap, *GB*
* tag `$hddN` - usage for mount point N, *%*. For example, `$hdd0`
* tag `$hddtempN` - temperature for HDD N. For example, `$hddtemp0`
* tag `$down` - download speed, *KB/s*
* tag `$up` - upload speed, *KB/s*
* tag `$netdev` - current network device
* tag `$bat` - battery charge, *%*
* tag `$ac` - status AC device. Return (\*) if AC device is online or *( )* if offline
* tag `$album` - current song album. One of supported music players must be installed
* tag `$artist` - current song artist. One of supported music players must be installed
* tag `$progress` - current song progress. One of supported music players must be installed
* tag `$time` - current song duration. One of supported music players must be installed
* tag `$title` - current song title. One of supported music players must be installed
* tag `$pscount` - number of running processes
* tag `$pstotal` - total number of processes
* tag `$ps` - list of running processes
* tag `$pkgcountN` - number of packages, which available to upgrade for command N. For example, `$pkgcount0`
* tag `$custom` - returns output for custom command
**NOTE** [LOOKING FOR TRANSLATORS!](https://github.com/arcan1s/awesome-widgets/issues/14)
Label order will changed if you change slider position. HTML tags in label work normally.
Features
========
**NOTE** you don't may set to show `$cpu` tag in swap label for example. **`$cpu` will work only in cpu label**.
* easy and fully configurable native Plasma widget which may be used as Conky widget or as Awesome-like information panel
* panel which shows active desktop status
* clear Conky-like configuration with html tags support
* custom command support (it may be simple action as well as special custom tag)
* graphical item support - tooltips, bars
Advanced settings
-----------------
**Custom time**
See [links](#Links) for more details.
* tag `$dddd` - weekday in long format
* tag `$ddd` - weekday in short format
* tag `$dd` - day
* tag `$d` - day without zero
* tag `$MMMM` - month in long format
* tag `$MMM` - month in short format
* tag `$MM` - month
* tag `$M` - month without zero
* tag `$yyyy` - year
* tag `$yy` - year in short format
* tag `$hh` - hours
* tag `$h` - hours without zero
* tag `$mm` - minutes
* tag `$m` - minutes without zero
* tag `$ss` - seconds
* tag `$s` - seconds without zero
**Custom uptime**
* tag `$dd` - uptime days
* tag `$d` - uptime days without zero
* tag `$hh` - uptime hours
* tag `$h` - uptime hours without zero
* tag `$mm` - uptime minutes
* tag `$m` - uptime minutes without zero
**Temperature devices**
List of devices, which will be observed in temp label (combo box items come from `sensors`). List widget is editable, delete key will remove current item.
**Mount points**
List of mount points, which will be observed in hdd label (combo box items come from `mount`). List widget is editable, delete key will remove current item.
**HDD**
List of hard disk devices, which will be observed in hddtem label (combo box items come from `find`). List widget is editable, delete key will remove current item.
**Network directory**
Path to directory, which contains network devices information. Default is `/sys/class/net`. Required for auto select network device.
**Network device**
Use specified device as active. Combo box items come from **network directory**. Will disable auto select network device.
**Battery device**
File with battery information. File (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.
**AC online tag**
Line which will be shown when AC is online.
**AC offline tag**
Line which will be shown when AC is offline.
**AC device**
File with AC information. File (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online.
**Music player**
Select one of supported music playes for player label.
Tooltip settings
----------------
Since version 1.7.0 CPU, CPU clock, memory, swap and network labels support graphical tooltip. To enable them just make the needed checkboxes a fully checked. The number of stored values can be set in the tab. Colors of graphs are configurable too.
DataEngine settings
-------------------
**Custom command**
*NOTE* This can cause the computer freeze.
A command, which will be run for custom label.
**GPU device**
Select one of supported GPU devices. `auto` will enable auto selection. Default is `auto`.
**HDD**
Select one of HDDs for HDD temperature monitor. `all` will enable monitor for all devices. Default is `all`.
**MPD address**
Address of MPD server. Default is `localhost`.
**MPD port**
Port of MPD server. Default is `6600`.
**Package manager**
List of commands, which will be run. Number of null lines is a number of unneeded lines. Defaults:
* *Arch*: `PKGCMD=pacman -Qu`, `PKGNULL=0`
* *Debian*: `PKGCMD=apt-show-versions -u -b`, `PKGNULL=0`
* *Ubuntu*: `PKGCMD=aptitude search '~U'`, `PKGNULL=0`
* *Fedora*: `PKGCMD=yum list updates`, `PKGNULL=3`
* *FreeBSD*: `PKGCMD=pkg_version -I -l '<'`, `PKGNULL=0`
* *Mandriva*: `PKGCMD=urpmq --auto-select`, `PKGNULL=0`
DataEngine configuration
------------------------
You may edit DataEngine configuration. It is `/usr/share/config/extsysmon.conf` or `$HOME/share/config/extsysmon.conf` depending on the type of installation. Uncomment needed line and edit it.
**Didn't find required feature?** [Just ask for it!](https://github.com/arcan1s/awesome-widgets/issues)
Instruction
===========
Dependencies
------------
* kdebase-workspace
* kdebindings-python2
* lm_sensors (*for definition temperature device*)
* sysstat (*for notification*)
Optional dependencies
---------------------
* proprietary video driver
* hddtemp (make sure that it may be run with `sudo` without password. Just add following line to `/etc/sudoers`: `$USERNAME ALL=NOPASSWD: /usr/bin/hddtemp`)
* music player (amarok, mpd or qmmp)
* hddtemp
* music player (mpd or supported MPRIS)
Make dependencies
-----------------
* automoc4
* cmake
* kdebase-runtime
Installation
------------
* download sources
* install
@ -208,9 +65,14 @@ Additional information
TODO (wish list)
----------------
See [milestones](https://github.com/arcan1s/awesome-widgets/milestones) for more details.
Links
-----
* [Homepage](http://arcanis.name/projects/pytextmonitor/)
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Py+Text+Monitor?content=157124)
* [Homepage](http://arcanis.name/projects/awesome-widgets/)
* [Migration to 2.*](http://arcanis.name/en/2014/09/04/migration-to-v2/)
* [Scripts and bars](http://arcanis.name/en/2014/12/19/aw-v21-bells-and-whistles/)
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Awesome+Widgets?content=157124)
* DataEngine on [kde-look](http://kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773)
* Archlinux [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-pytextmonitor/) package
* Archlinux [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-awesome-widgets/) package

View File

@ -1,12 +1,10 @@
#!/bin/bash
# update english readme
cp README.md readme/en.md
SRCDIR="sources"
VERSION=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $3}' | cut -c 1).\
$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $3}' | cut -c 1).\
$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $3}' | cut -c 1)
MAJOR=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $3}' | sed 's/.$//g')
MINOR=$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $3}' | sed 's/.$//g')
PATCH=$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $3}' | sed 's/.$//g')
VERSION="${MAJOR}.${MINOR}.${PATCH}"
# build dataengine
ARCHIVE="ext-sysmon"
@ -18,8 +16,8 @@ tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
rm -rf "${ARCHIVE}"
# build widget
ARCHIVE="pytextmonitor"
FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING readme"
ARCHIVE="awesome-widgets"
FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING"
IGNORELIST="build usr"
# create archive
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
@ -27,7 +25,7 @@ IGNORELIST="build usr"
cp -r "${SRCDIR}" "${ARCHIVE}"
for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done
for FILE in ${IGNORELIST[*]}; do rm -rf "${ARCHIVE}/${FILE}"; done
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
rm -rf "${ARCHIVE}"
# update md5sum

View File

@ -0,0 +1,11 @@
post_install() {
kbuildsycoca4 > /dev/null 2>&1
}
post_upgrade() {
post_install "$1"
}
post_remove() {
post_install "$1"
}

View File

@ -1,24 +0,0 @@
func_update() {
cat << EOF
Update plasmoids...
EOF
kbuildsycoca4 > /dev/null 2>&1
}
post_install() {
func_update
cat << EOF
Make sure that \`hddtemp\` can be run with sudo without password
EOF
}
post_upgrade() {
func_update
cat << EOF
Make sure that \`hddtemp\` can be run with sudo without password
EOF
}
post_remove() {
func_update
}

View File

@ -1,216 +0,0 @@
pytextmonitor
=============
Information
-----------
PyTextMonitor is a minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm.
**NOTE** LOOKING FOR TRANSLATORS!
Configuration
-------------
For edited output you must open Settings window and setup output format in lines:
* tag `$time` - time in default format. For example, *fri Nov 6 04:48:01 2013*
* tag `$isotime` - time in iso format
* tag `$shorttime` - time in short locale format
* tag `$longtime` - time in long locale format
* tag `$custom` - custom time format
* tag `$uptime` - uptime, *---d--h--m*
* tag `$custom` - custom uptime format
* tag `$cpu` - total load cpu, *%*
* tag `$cpuN` - load CPU for core N, *%*
* tag `$cpucl` - average cpu clock, *MHz*
* tag `$cpuclN` - cpu clock for core N, *MHz*
* tag `$tempN` - temperature for device N. For example, `$temp0`
* tag `$gpu` - GPU usage, *%*. `aticonfig` or `nvidia-smi` must be installed
* tag `$gputemp` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
* tag `$mem` - usage memory, *%*
* tag `$memmb` - usage memory, *MB*
* tag `$memgb` - usage memory, *GB*
* tag `$swap` - swap, *%*
* tag `$swapmb` - swap, *MB*
* tag `$swapgb` - swap, *GB*
* tag `$hddN` - usage for mount point N, *%*. For example, `$hdd0`
* tag `$hddtempN` - temperature for HDD N. For example, `$hddtemp0`
* tag `$down` - download speed, *KB/s*
* tag `$up` - upload speed, *KB/s*
* tag `$netdev` - current network device
* tag `$bat` - battery charge, *%*
* tag `$ac` - status AC device. Return (\*) if AC device is online or *( )* if offline
* tag `$album` - current song album. One of supported music players must be installed
* tag `$artist` - current song artist. One of supported music players must be installed
* tag `$progress` - current song progress. One of supported music players must be installed
* tag `$time` - current song duration. One of supported music players must be installed
* tag `$title` - current song title. One of supported music players must be installed
* tag `$pscount` - number of running processes
* tag `$pstotal` - total number of processes
* tag `$ps` - list of running processes
* tag `$pkgcountN` - number of packages, which available to upgrade for command N. For example, `$pkgcount0`
* tag `$custom` - returns output for custom command
Label order will changed if you change slider position. HTML tags in label work normally.
**NOTE** you don't may set to show `$cpu` tag in swap label for example. **`$cpu` will work only in cpu label**.
Advanced settings
-----------------
**Custom time**
* tag `$dddd` - weekday in long format
* tag `$ddd` - weekday in short format
* tag `$dd` - day
* tag `$d` - day without zero
* tag `$MMMM` - month in long format
* tag `$MMM` - month in short format
* tag `$MM` - month
* tag `$M` - month without zero
* tag `$yyyy` - year
* tag `$yy` - year in short format
* tag `$hh` - hours
* tag `$h` - hours without zero
* tag `$mm` - minutes
* tag `$m` - minutes without zero
* tag `$ss` - seconds
* tag `$s` - seconds without zero
**Custom uptime**
* tag `$dd` - uptime days
* tag `$d` - uptime days without zero
* tag `$hh` - uptime hours
* tag `$h` - uptime hours without zero
* tag `$mm` - uptime minutes
* tag `$m` - uptime minutes without zero
**Temperature devices**
List of devices, which will be observed in temp label (combo box items come from `sensors`). List widget is editable, delete key will remove current item.
**Mount points**
List of mount points, which will be observed in hdd label (combo box items come from `mount`). List widget is editable, delete key will remove current item.
**HDD**
List of hard disk devices, which will be observed in hddtem label (combo box items come from `find`). List widget is editable, delete key will remove current item.
**Network directory**
Path to directory, which contains network devices information. Default is `/sys/class/net`. Required for auto select network device.
**Network device**
Use specified device as active. Combo box items come from **network directory**. Will disable auto select network device.
**Battery device**
File with battery information. File (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.
**AC online tag**
Line which will be shown when AC is online.
**AC offline tag**
Line which will be shown when AC is offline.
**AC device**
File with AC information. File (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online.
**Music player**
Select one of supported music playes for player label.
Tooltip settings
----------------
Since version 1.7.0 CPU, CPU clock, memory, swap and network labels support graphical tooltip. To enable them just make the needed checkboxes a fully checked. The number of stored values can be set in the tab. Colors of graphs are configurable too.
DataEngine settings
-------------------
**Custom command**
*NOTE* This can cause the computer freeze.
A command, which will be run for custom label.
**GPU device**
Select one of supported GPU devices. `auto` will enable auto selection. Default is `auto`.
**HDD**
Select one of HDDs for HDD temperature monitor. `all` will enable monitor for all devices. Default is `all`.
**MPD address**
Address of MPD server. Default is `localhost`.
**MPD port**
Port of MPD server. Default is `6600`.
**Package manager**
List of commands, which will be run. Number of null lines is a number of unneeded lines. Defaults:
* *Arch*: `PKGCMD=pacman -Qu`, `PKGNULL=0`
* *Debian*: `PKGCMD=apt-show-versions -u -b`, `PKGNULL=0`
* *Ubuntu*: `PKGCMD=aptitude search '~U'`, `PKGNULL=0`
* *Fedora*: `PKGCMD=yum list updates`, `PKGNULL=3`
* *FreeBSD*: `PKGCMD=pkg_version -I -l '<'`, `PKGNULL=0`
* *Mandriva*: `PKGCMD=urpmq --auto-select`, `PKGNULL=0`
DataEngine configuration
------------------------
You may edit DataEngine configuration. It is `/usr/share/config/extsysmon.conf` or `$HOME/share/config/extsysmon.conf` depending on the type of installation. Uncomment needed line and edit it.
Instruction
===========
Dependencies
------------
* kdebase-workspace
* kdebindings-python2
* lm_sensors (*for definition temperature device*)
* sysstat (*for notification*)
Optional dependencies
---------------------
* proprietary video driver
* hddtemp (make sure that it may be run with `sudo` without password. Just add following line to `/etc/sudoers`: `$USERNAME ALL=NOPASSWD: /usr/bin/hddtemp`)
* music player (amarok, mpd or qmmp)
Make dependencies
-----------------
* automoc4
* cmake
* kdebase-runtime
Installation
------------
* download sources
* install
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` ../
make && make install
Also you may install it to `/`:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ../
make && sudo make install
Additional information
======================
TODO (wish list)
----------------
Links
-----
* [Homepage](http://arcanis.name/projects/pytextmonitor/)
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Py+Text+Monitor?content=157124)
* DataEngine on [kde-look](http://kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773)
* Archlinux [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-pytextmonitor/) package

View File

@ -1,213 +0,0 @@
pytextmonitor
=============
Информация
----------
PyTextMonitor - минималистичный плазмоид, написанный на Python2. Он выглядит, как виджеты в Awesome WM.
Настройка
---------
Для редактирования внешнего виде, откройте окно настроек и установите требуемый формат в поля:
* тег `$time` - время в стандартном формате. Например, *fri Nov 6 04:48:01 2013*
* тег `$isotime` - время в ISO формате
* тег `$shorttime` - время в коротком формате
* тег `$longtime` - время в длинном формате
* тег `$custom` - свой формат времени
* тег `$uptime` - время работы, *---d--h--m*
* тег `$custom` - свой формат аптайма
* тег `$cpu` - общая загрузка CPU, *%*
* тег `$cpuN` - загрузка CPU для ядра N, *%*
* тег `$cpucl` - средняя частота CPU, *MHz*
* тег `$cpuclN` - частота CPU для ядра N, *MHz
* тег `$tempN` - температура для устройства N. Например, `$temp0`
* тег `$gpu` - использование GPU, *%*. `aticonfig` или `nvidia-smi` должны быть установлены
* тег `$gputemp` - температура GPU. `aticonfig` или `nvidia-smi` должны быть установлены
* тег `$mem` - использование RAM, *%*
* тег `$memmb` - использование RAM, *MB*
* тег `$memgb` - использование RAM, *GB*
* тег `$swap` - swap, *%*
* тег `$swapmb` - swap, *MB*
* тег `$swapgb` - swap, *GB*
* тег `$hddN` - использование точки монтирования N, *%*. Например, `$hdd0`
* тег `$hddtempN` - температура HDD N. Например, `$hddtemp0`
* тег `$down` - скорость загрузки, *KB/s*
* тег `$up` - скорость отдачи, *KB/s*
* тег `$netdev` - текущий сетевой интерфейс
* тег `$bat` - заряд батареи, *%*
* тег `$ac` - статус адаптора питания. Возвращает (\*), если AC подключен или *( )*, если нет
* тег `$album` - альбом. Один из поддерживаемых плееров должен быть установлен
* тег `$artist` - исполнитель. Один из поддерживаемых плееров должен быть установлен
* тег `$progress` - прогресс. Один из поддерживаемых плееров должен быть установлен
* тег `$time` - длительность. Один из поддерживаемых плееров должен быть установлен
* тег `$title` - название. Один из поддерживаемых плееров должен быть установлен
* тег `$pscount` - число запущенных процессов
* тег `$pstotal` - общее число процессов
* тег `$ps` - список процессов
* тег `$pkgcountN` - число пакетов, которые могут быть обновлены, для команды N. Например, `$pkgcount0`
* тег `$custom` - возвращает результат своей команды
Порядок полей изменится, если вы измените позицию слайдеров. HTML теги в полях работают корректно.
**ЗАМЕЧАНИЕ** вы не можете установить тег `$cpu`, например, в поле swap. **`$cpu` будет работать только в поле CPU**.
Расширенные настройки
---------------------
**Свой формат времени**
* тег `$dddd` - день недели в длинном формате
* тег `$ddd` - день недели в коротком формате
* тег `$dd` - день
* тег `$d` - день без нуля
* тег `$MMMM` - месяц в длинном формате
* тег `$MMM` - месяц в коротком формате
* тег `$MM` - месяц
* тег `$M` - месяц без нуля
* тег `$yyyy` - год
* тег `$yy` - год в коротком формате
* тег `$hh` - часы
* тег `$h` - часы без нуля
* тег `$mm` - минуты
* тег `$m` - минуты без нуля
* тег `$ss` - секунды
* тег `$s` - секунды без нуля
**Свой формат аптайма**
* тег `$dd` - дни аптайма
* тег `$d` - дни аптайма без нуля
* тег `$hh` - часы аптайма
* тег `$h` - часы аптайма без нуля
* тег `$mm` - минуты аптайма
* тег `$m` - минуты аптайма без нуля
**Датчики температуры**
Список датчиков, которые будут наблюдаться в поле temo (содержимое комбо бокса берется из `sensors`). Виджет редактируем, клавиша delete удалит текущую строку.
**Точки монтирования**
Список точек монтирования, которые будут наблюдаться в поле hdd (содержимое комбо бокса берется из `mount`). Виджет редактируем, клавиша delete удалит текущую строку.
**HDD**
Список HDD, которые будут наблюдаться в поле hddtemp (содержимое комбо бокса берется из `find`). Виджет редактируем, клавиша delete удалит текущую строку.
**Директория с сетевыми интерфейсами**
Путь к директории, которая содержит информацию о сетевых интерфейсах. По умолчанию `/sys/class/net`. Требуется для определения сетевого устройства.
**Сетевое устройство**
Использовать указанный интерфейс, как активный. Содержимое комбо бокса берется из **директории с сетевыми интерфейсами**. Эта опция отключит авто определение интерфейса.
**Устройство батареи**
Файл с информацией о батарее. Данный файл (`/sys/class/power_supply/BAT0/capacity` по умолчанию) должен содержать только заряд батареи в процентах.
**AC online тег**
Строка, которая будет показана, когда AC онлайн.
**AC offline тег**
Строка, которая будет показана, когда AC оффлайн.
**Устройство AC**
Файл с информацией об адапторе питания. Данный файл (`/sys/class/power_supply/AC/online` по умолчанию) должен содержать `1`, если адаптор подключен.
**Музыкальные плеер**
Выберете один из поддерживаемых музыкальных плееров.
Настройки тултипа
-----------------
Начиная с версии 1.7.0 поля CPU, частота CPU, память, swap и сеть поддерживают графический тултип. Чтобы включить их, просто сделайте требуемые чекбоксы полностью чекнутыми. Число хранимых значений может быть выставленно в данной вкладке. Цвета графиков также настраиваются.
Настройки DataEngine
--------------------
**Своя команда**
*ЗАМЕЧАНИЕ* Может вызвать зависание компьютера.
Команда, которая будет запущена для соответствующего поля.
**Устройство GPU**
Выберете одно из поддерживаемых устройств GPU. `auto` включит автоматическое определение. По умолчанию `auto`.
**HDD**
Выберете один из HDD для монитора его температуры. `all` включит монитор для всех доступных устройств. По умолчанию `all`.
**Адрес MPD**
Адрес MPD сервера. По умолчанию `localhost`.
**Порт MPD**
Порт MPD сервера. По умолчанию `6600`.
**Package manager**
Список команд, которые будут запущены. Число пустых строк - число ненужных для подсчета строк. Стандартные настройки:
* *Arch*: `PKGCMD=pacman -Qu`, `PKGNULL=0`
* *Debian*: `PKGCMD=apt-show-versions -u -b`, `PKGNULL=0`
* *Ubuntu*: `PKGCMD=aptitude search '~U'`, `PKGNULL=0`
* *Fedora*: `PKGCMD=yum list updates`, `PKGNULL=3`
* *FreeBSD*: `PKGCMD=pkg_version -I -l '<'`, `PKGNULL=0`
* *Mandriva*: `PKGCMD=urpmq --auto-select`, `PKGNULL=0`
Настройка DataEngine
--------------------
Вы можете отредактировать настройки DataEngine вручную. Откройте файл `/usr/share/config/extsysmon.conf` или `$HOME/.kde4/share/config/extsysmon.conf`, в зависимости от типа установки. Раскомментируйте требуемые строки и отредактируйте их.
Инструкция
==========
Зависимости
-----------
* kdebase-workspace
* kdebindings-python2
* lm_sensors (*для определения датчиков температуры*)
* sysstat (*для уведомлений*)
Опциональные зависимости
------------------------
* проприетарный видеодрайвер
* hddtemp (убедитесь, что может быть запущен с `sudo` без пароля. Просто добавьте следующую строку в `/etc/sudoers`: `$USERNAME ALL=NOPASSWD: /usr/bin/hddtemp`)
* музыкальный плеер (amarok, mpd или qmmp)
Зависимости сборки
------------------
* automoc4
* cmake
* kdebase-runtime
Установка
---------
* скачать исходный архив
* установить
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` ../
make && make install
Для установки в `/`:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ../
make && sudo make install
Дополнительная информация
=========================
TODO (wish list)
----------------
Ссылки
------
* [Домашняя страница](http://arcanis.name/projects/pytextmonitor/)
* Виджет на [kde-look](http://kde-look.org/content/show.php/Py+Text+Monitor?content=157124)
* DataEngine на [kde-look](http://kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773)
* Пакет для Archlinux в [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-pytextmonitor/)

BIN
screenshots/config_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
screenshots/config_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
screenshots/config_03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
screenshots/config_04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
screenshots/config_05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

218
sources/3rdparty/about/about.ui vendored Normal file
View File

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>About</class>
<widget class="QWidget" name="About">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<height>359</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_About">
<attribute name="title">
<string>About</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QScrollArea" name="scrollArea_about">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_about">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>418</width>
<height>284</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_name">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_version">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_description">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_links">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<spacer name="spacer_about">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_ackn">
<attribute name="title">
<string>Acknowledgement</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QScrollArea" name="scrollArea_ackn">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_ackn">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>418</width>
<height>284</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label_translators">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_trdparty">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<spacer name="spacer_ackn">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>229</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QLabel" name="label_license">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

1
sources/3rdparty/fontdialog vendored Submodule

1
sources/3rdparty/pdebug vendored Submodule

Submodule sources/3rdparty/pdebug added at 294a590bb9

1
sources/3rdparty/task vendored Submodule

Submodule sources/3rdparty/task added at d2798204a1

1
sources/3rdparty/tasks vendored Submodule

Submodule sources/3rdparty/tasks added at 230bdecd2c

View File

@ -5,23 +5,34 @@ cmake_policy (SET CMP0002 OLD)
cmake_policy (SET CMP0011 NEW)
cmake_policy (SET CMP0015 NEW)
project (pytextmonitor)
set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 8)
set (PROJECT_VERSION_PATCH 1)
project (awesome-widgets)
set (PROJECT_AUTHOR "Evgeniy Alekseev")
set (PROJECT_CONTACT "esalexeev@gmail.com")
set (PROJECT_LICENSE "GPLv3")
set (PROJECT_VERSION_MAJOR 2)
set (PROJECT_VERSION_MINOR 1)
set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC)
string (TIMESTAMP CURRENT_YEAR "%Y")
message (STATUS "Project: ${PROJECT_NAME}")
message (STATUS "Version: ${PROJECT_VERSION}")
message (STATUS "Build date: ${CURRENT_DATE}")
# flags
if (CMAKE_COMPILER_IS_GNUCXX)
set (ADD_CXX_FLAGS "-Wall")
set (CMAKE_CXX_FLAGS "-O0 ${ADD_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set (CMAKE_CXX_FLAGS "-Wall -Wno-cpp -std=c++11")
set (CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
else ()
message (STATUS "Unknown compiler")
message (STATUS "Unknown compiler")
endif ()
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
set (PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
add_subdirectory (ext-sysmon)
add_subdirectory (ptm)
add_subdirectory (awesome-widget)
add_subdirectory (desktop-panel)

View File

@ -0,0 +1,46 @@
# set project name
set (SUBPROJECT plasma_applet_awesome-widget)
set (PLUGIN_NAME ${SUBPROJECT})
message (STATUS "Subproject ${SUBPROJECT}")
# find required libaries
find_package (KDE4 REQUIRED)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_subdirectory (po)
include (KDE4Defaults)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR}
../ext-sysmon
${CMAKE_CURRENT_BINARY_DIR}/../ext-sysmon)
# set sources
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp
../ext-sysmon/extscript.cpp)
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
file (GLOB SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui)
file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
set (SUBPROJECT_DESKTOPS ${CMAKE_CURRENT_SOURCE_DIR}/desktops)
# prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
# make
qt4_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER})
kde4_add_ui_files (SUBPROJECT_SOURCE ${SUBPROJECT_UI})
kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE} ${TASK_MOC_SOURCE})
target_link_libraries (${PLUGIN_NAME} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
# install
install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})
install (DIRECTORY ${SUBPROJECT_DESKTOPS} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})

View File

@ -0,0 +1,534 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AdvancedWindow</class>
<widget class="QWidget" name="AdvancedWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>588</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Advanced</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea_advanced">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="contents_advanced">
<property name="geometry">
<rect>
<x>0</x>
<y>-250</y>
<width>675</width>
<height>822</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<layout class="QHBoxLayout" name="layout_popup">
<item>
<spacer name="spacer_popup">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_popup">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable popup on mouse click</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_background">
<item>
<spacer name="spacer_background">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_background">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable background</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_timeFormat">
<item>
<widget class="QLabel" name="label_timeFormat">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Custom time format</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_timeFormat">
<property name="toolTip">
<string>$dddd - long weekday
$ddd - short weekday
$dd - day
$d - day w\o zero
$MMMM - long month
$MMM - short month
$MM - month
$M - month w\o zero
$yyyy - year
$yy - short year
$hh - hours (24 only)
$h - hours w\o zero (24 only)
$mm - minutes
$m - minutes w\o zero
$ss - seconds
$s - seconds w\o zero</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_uptimeFormat">
<item>
<widget class="QLabel" name="label_uptimeFormat">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Custom uptime format</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_uptimeFormat">
<property name="toolTip">
<string>$dd - uptime days
$d - uptime days without zero
$hh - uptime hours
$h - uptime hours without zero
$mm - uptime minutes
$m - uptime minutes without zero</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_tempUnits">
<item>
<widget class="QLabel" name="label_tempUnits">
<property name="text">
<string>Temperature units</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_tempUnits">
<item>
<property name="text">
<string notr="true">Celsius</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Fahrenheit</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Kelvin</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Reaumur</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">cm^-1</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">kJ/mol</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">kcal/mol</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_tempDevice">
<item>
<widget class="QLabel" name="label_tempDevice">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Temperature devices</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_tempDevice">
<property name="toolTip">
<string>Editable</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_fanDevice">
<item>
<widget class="QLabel" name="label_fanDevice">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Fan devices</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_fanDevice">
<property name="toolTip">
<string>Editable</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_mount">
<item>
<widget class="QLabel" name="label_mount">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Mount points</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_mount">
<property name="toolTip">
<string>Editable</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_hddSpeedDevice">
<item>
<widget class="QLabel" name="label_hddSpeedDevice">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>HDD devices (speed)</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_hddSpeedDevice">
<property name="toolTip">
<string>Editable</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_hddDevice">
<item>
<widget class="QLabel" name="label_hddDevice">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>HDD devices (temp)</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_hddDevice">
<property name="toolTip">
<string>Editable</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_netdev">
<item>
<widget class="QCheckBox" name="checkBox_netdev">
<property name="toolTip">
<string>Disable auto select device and set specified device</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Set network device</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_netdev">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_acOnline">
<item>
<widget class="QLabel" name="label_acOnline">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>AC online tag</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_acOnline">
<property name="toolTip">
<string>Line, which returns when AC is online</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_acOffline">
<item>
<widget class="QLabel" name="label_acOffline">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>AC offline tag</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_acOffline">
<property name="toolTip">
<string>Line, which returns when AC is offline</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_bars">
<item>
<layout class="QHBoxLayout" name="layout_barsAdd">
<item>
<widget class="QLabel" name="label_bars">
<property name="text">
<string>Bars</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer_bars">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_bars">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_bars">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_updates">
<item>
<spacer name="spacer_updates">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_updates">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Check for updates</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="spacer_advanced">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AppearanceWindow</class>
<widget class="QWidget" name="AppearanceWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>594</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Appearance</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea_appearance">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="contents_appearance">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>684</width>
<height>578</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<layout class="QHBoxLayout" name="layout_interval">
<item>
<widget class="QLabel" name="label_interval">
<property name="text">
<string>Time interval</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_interval">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
<property name="singleStep">
<number>500</number>
</property>
<property name="value">
<number>2000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_font">
<item>
<widget class="QLabel" name="label_font">
<property name="text">
<string>Font</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="fontComboBox">
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_size">
<item>
<widget class="QLabel" name="label_size">
<property name="text">
<string>Font size</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_size">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>12</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_color">
<item>
<widget class="QLabel" name="label_color">
<property name="text">
<string>Font color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_style">
<item>
<widget class="QLabel" name="label_style">
<property name="text">
<string>Font style</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_style">
<item>
<property name="text">
<string notr="true">normal</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">italic</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_weight">
<item>
<widget class="QLabel" name="label_weight">
<property name="text">
<string>Font weight</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_weight">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>900</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>400</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="spacer_text">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,503 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awesome-widget.h"
#include <KStandardDirs>
#include <Plasma/ToolTipManager>
#include <QDesktopServices>
#include <QDir>
#include <QGraphicsGridLayout>
#include <QGraphicsProxyWidget>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkInterface>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QProcessEnvironment>
#include <QTextCodec>
#include <QTimer>
#include "customlabel.h"
#include "graphicalitem.h"
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
#include "version.h"
AwesomeWidget::AwesomeWidget(QObject *parent, const QVariantList &args)
: Plasma::Applet(parent, args)
{
// debug
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
if (debugEnv == QString("yes"))
debug = true;
else
debug = false;
setBackgroundHints(DefaultBackground);
setAspectRatioMode(Plasma::IgnoreAspectRatio);
setHasConfigurationInterface(true);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
// text format init
formatLine.append(QString(""));
formatLine.append(QString(""));
}
AwesomeWidget::~AwesomeWidget()
{
if (debug) qDebug() << PDEBUG;
}
void AwesomeWidget::checkUpdates()
{
if (debug) qDebug() << PDEBUG;
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(replyRecieved(QNetworkReply *)));
manager->get(QNetworkRequest(QUrl(VERSION_API)));
}
QList<QAction *> AwesomeWidget::contextualActions()
{
if (debug) qDebug() << PDEBUG;
return contextMenu;
}
void AwesomeWidget::createActions()
{
if (debug) qDebug() << PDEBUG;
contextMenu.clear();
contextMenu.append(new QAction(QIcon::fromTheme(QString("utilities-system-monitor")),
i18n("Run ksysguard"), this));
connect(contextMenu[0], SIGNAL(triggered(bool)), this, SLOT(showKsysguard()));
contextMenu.append(new QAction(QIcon::fromTheme(QString("text-x-readme")),
i18n("Show README"), this));
connect(contextMenu[1], SIGNAL(triggered(bool)), this, SLOT(showReadme()));
contextMenu.append(new QAction(QIcon::fromTheme(QString("stock-refresh")),
i18n("Update text"), this));
connect(contextMenu[2], SIGNAL(triggered(bool)), this, SLOT(updateNetworkDevice()));
connect(contextMenu[2], SIGNAL(triggered(bool)), extsysmonEngine, SLOT(updateAllSources()));
connect(contextMenu[2], SIGNAL(triggered(bool)), sysmonEngine, SLOT(updateAllSources()));
contextMenu.append(new QAction(QIcon::fromTheme(QString("system-software-update")),
i18n("Check for updates"), this));
connect(contextMenu[3], SIGNAL(triggered(bool)), this, SLOT(checkUpdates()));
}
QString AwesomeWidget::getNetworkDevice()
{
if (debug) qDebug() << PDEBUG;
QString device = QString("lo");
if (configuration[QString("useCustomNetdev")].toInt() == 2)
device = configuration[QString("customNetdev")];
else {
QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces();
for (int i=0; i<rawInterfaceList.count(); i++)
if ((rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsUp)) &&
(!rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsLoopBack)) &&
(!rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsPointToPoint)))
device = rawInterfaceList[i].name();
}
return device;
}
int AwesomeWidget::getNumberCpus()
{
if (debug) qDebug() << PDEBUG;
QString cmd = QString("grep -c ^processor /proc/cpuinfo");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed().toInt();
}
float AwesomeWidget::getTemp(const float temp)
{
if (debug) qDebug() << PDEBUG;
float convertedTemp = temp;
if (configuration[QString("tempUnits")] == QString("Celsius"))
;
else if (configuration[QString("tempUnits")] == QString("Fahrenheit"))
convertedTemp = temp * 9.0 / 5.0 + 32.0;
else if (configuration[QString("tempUnits")] == QString("Kelvin"))
convertedTemp = temp + 273.15;
else if (configuration[QString("tempUnits")] == QString("Reaumur"))
convertedTemp = temp * 0.8;
else if (configuration[QString("tempUnits")] == QString("cm^-1"))
convertedTemp = (temp + 273.15) * 0.695;
else if (configuration[QString("tempUnits")] == QString("kJ/mol"))
convertedTemp = (temp + 273.15) * 8.31;
else if (configuration[QString("tempUnits")] == QString("kcal/mol"))
convertedTemp = (temp + 273.15) * 1.98;
return convertedTemp;
}
QStringList AwesomeWidget::getTimeKeys()
{
if (debug) qDebug() << PDEBUG;
QStringList timeKeys;
timeKeys.append(QString("dddd"));
timeKeys.append(QString("ddd"));
timeKeys.append(QString("dd"));
timeKeys.append(QString("d"));
timeKeys.append(QString("MMMM"));
timeKeys.append(QString("MMM"));
timeKeys.append(QString("MM"));
timeKeys.append(QString("M"));
timeKeys.append(QString("yyyy"));
timeKeys.append(QString("yy"));
timeKeys.append(QString("hh"));
timeKeys.append(QString("h"));
timeKeys.append(QString("mm"));
timeKeys.append(QString("m"));
timeKeys.append(QString("ss"));
timeKeys.append(QString("s"));
return timeKeys;
}
void AwesomeWidget::init()
{
if (debug) qDebug() << PDEBUG;
// dataengines
extsysmonEngine = dataEngine(QString("ext-sysmon"));
sysmonEngine = dataEngine(QString("systemmonitor"));
connect(sysmonEngine, SIGNAL(sourceAdded(QString)), this, SLOT(addDiskDevice(QString)));
timeEngine = dataEngine(QString("time"));
// tooltip
toolTip = Plasma::ToolTipContent();
toolTip.setMainText(QString("Awesome Widget"));
toolTip.setSubText(QString(""));
toolTipScene = new QGraphicsScene();
toolTipView = new QGraphicsView(toolTipScene);
toolTipView->setStyleSheet(QString("background: transparent"));
toolTipView->setContentsMargins(0, 0, 0, 0);
toolTipView->setFrameShape(QFrame::NoFrame);
toolTipView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
toolTipView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Plasma::ToolTipManager::self()->setContent(this, toolTip);
// body
createActions();
mainLayout = new QGraphicsGridLayout();
mainLayout->setContentsMargins(1, 1, 1, 1);
setLayout(mainLayout);
textLabel = new CustomLabel(this, debug);
textLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
QGraphicsProxyWidget *pw = new QGraphicsProxyWidget(this);
pw->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
textLabel->setAttribute(Qt::WA_TranslucentBackground, true);
pw->setWidget(textLabel);
mainLayout->addItem(pw, 0, 0);
// read variables
configChanged();
timer = new QTimer(this);
timer->setSingleShot(false);
timer->setInterval(configuration[QString("interval")].toInt());
connect(timer, SIGNAL(timeout()), this, SLOT(updateText()));
connect(timer, SIGNAL(timeout()), this, SLOT(updateTooltip()));
timer->start();
// check for updates
connect(this, SIGNAL(thereIsUpdates(QString)), this, SLOT(showUpdates(QString)));
if (configuration[QString("checkUpdates")].toInt() == 2)
checkUpdates();
}
void AwesomeWidget::replyRecieved(QNetworkReply *reply)
{
if (debug) qDebug() << PDEBUG;
QString answer = reply->readAll();
if (!answer.contains(QString("tag_name"))) return;
QString version = QString(VERSION);
if (debug) qDebug() << PDEBUG << answer;
for (int i=0; i<answer.split(QString("tag_name")).count(); i++) {
version = answer.split(QString("tag_name"))[1].split(QChar(','))[0];
version.remove(QChar('"'));
version.remove(QChar(':'));
version.remove(QString("V."));
break;
}
int old_major = QString(VERSION).split(QChar('.'))[0].toInt();
int old_minor = QString(VERSION).split(QChar('.'))[1].toInt();
int old_patch = QString(VERSION).split(QChar('.'))[2].toInt();
int new_major = QString(version).split(QChar('.'))[0].toInt();
int new_minor = QString(version).split(QChar('.'))[1].toInt();
int new_patch = QString(version).split(QChar('.'))[2].toInt();
if ((old_major < new_major) ||
((old_major == new_major) && (old_minor < new_minor)) ||
((old_major == new_major) && (old_minor == new_minor) && (old_patch < new_patch)))
emit(thereIsUpdates(version));
}
void AwesomeWidget::addDiskDevice(const QString source)
{
if (debug) qDebug() << PDEBUG;
QRegExp diskRegexp = QRegExp(QString("disk/(?:md|sd|hd)[a-z|0-9]_.*/Rate/(?:rblk)"));
if (diskRegexp.indexIn(source) > -1) {
QStringList splitSource = source.split(QChar('/'));
QString device = splitSource[0] + QString("/") + splitSource[1];
diskDevices.append(device);
}
}
QStringList AwesomeWidget::findKeys()
{
if (debug) qDebug() << PDEBUG;
QStringList selectedKeys;
for (int i=0; i<keys.count(); i++)
if (configuration[QString("text")].contains(QString("$") + keys[i])) {
if (debug) qDebug() << PDEBUG << ":" << "Found key" << keys[i];
selectedKeys.append(keys[i]);
}
return selectedKeys;
}
QStringList AwesomeWidget::getKeys()
{
if (debug) qDebug() << PDEBUG;
QStringList allKeys;
// time
allKeys.append(QString("time"));
allKeys.append(QString("isotime"));
allKeys.append(QString("shorttime"));
allKeys.append(QString("longtime"));
allKeys.append(QString("ctime"));
// uptime
allKeys.append(QString("uptime"));
allKeys.append(QString("cuptime"));
// cpuclock
for (int i=counts[QString("cpu")]-1; i>=0; i--)
allKeys.append(QString("cpucl") + QString::number(i));
allKeys.append(QString("cpucl"));
// cpu
for (int i=counts[QString("cpu")]-1; i>=0; i--)
allKeys.append(QString("cpu") + QString::number(i));
allKeys.append(QString("cpu"));
// temperature
for (int i=counts[QString("temp")]-1; i>=0; i--)
allKeys.append(QString("temp") + QString::number(i));
for (int i=counts[QString("fan")]-1; i>=0; i--)
allKeys.append(QString("fan") + QString::number(i));
// gputemp
allKeys.append(QString("gputemp"));
// gpu
allKeys.append(QString("gpu"));
// memory
allKeys.append(QString("memmb"));
allKeys.append(QString("memgb"));
allKeys.append(QString("memfreemb"));
allKeys.append(QString("memfreegb"));
allKeys.append(QString("memtotmb"));
allKeys.append(QString("memtotgb"));
allKeys.append(QString("memusedmb"));
allKeys.append(QString("memusedgb"));
allKeys.append(QString("mem"));
// swap
allKeys.append(QString("swapmb"));
allKeys.append(QString("swapgb"));
allKeys.append(QString("swapfreemb"));
allKeys.append(QString("swapfreegb"));
allKeys.append(QString("swaptotmb"));
allKeys.append(QString("swaptotgb"));
allKeys.append(QString("swap"));
// hdd
for (int i=counts[QString("mount")]-1; i>=0; i--) {
allKeys.append(QString("hddmb") + QString::number(i));
allKeys.append(QString("hddgb") + QString::number(i));
allKeys.append(QString("hddfreemb") + QString::number(i));
allKeys.append(QString("hddfreegb") + QString::number(i));
allKeys.append(QString("hddtotmb") + QString::number(i));
allKeys.append(QString("hddtotgb") + QString::number(i));
allKeys.append(QString("hdd") + QString::number(i));
}
// hdd speed
for (int i=counts[QString("disk")]-1; i>=0; i--) {
allKeys.append(QString("hddr") + QString::number(i));
allKeys.append(QString("hddw") + QString::number(i));
}
// hdd temp
for (int i=counts[QString("hddtemp")]-1; i>=0; i--) {
allKeys.append(QString("hddtemp") + QString::number(i));
allKeys.append(QString("hddtemp") + QString::number(i));
}
// network
allKeys.append(QString("down"));
allKeys.append(QString("up"));
allKeys.append(QString("netdev"));
// battery
allKeys.append(QString("ac"));
for (int i=counts[QString("bat")]-1; i>=0; i--)
allKeys.append(QString("bat") + QString::number(i));
allKeys.append(QString("bat"));
// player
allKeys.append(QString("album"));
allKeys.append(QString("artist"));
allKeys.append(QString("duration"));
allKeys.append(QString("progress"));
allKeys.append(QString("title"));
// ps
allKeys.append(QString("pscount"));
allKeys.append(QString("pstotal"));
allKeys.append(QString("ps"));
// package manager
for (int i=counts[QString("pkg")]-1; i>=0; i--)
allKeys.append(QString("pkgcount") + QString::number(i));
// custom
for (int i=counts[QString("custom")]-1; i>=0; i--)
allKeys.append(QString("custom") + QString::number(i));
// desktop
allKeys.append(QString("desktop"));
allKeys.append(QString("ndesktop"));
allKeys.append(QString("tdesktops"));
return allKeys;
}
QStringList AwesomeWidget::findGraphicalItems()
{
if (debug) qDebug() << PDEBUG;
QStringList orderedKeys;
for (int i=0; i<graphicalItems.count(); i++)
orderedKeys.append(graphicalItems[i]->getName() + graphicalItems[i]->getBar());
orderedKeys.sort();
QStringList selectedKeys;
for (int i=orderedKeys.count()-1; i>=0; i--)
if (configuration[QString("text")].contains(QString("$") + orderedKeys[i])) {
if (debug) qDebug() << PDEBUG << ":" << "Found key" << orderedKeys[i];
selectedKeys.append(orderedKeys[i]);
}
return selectedKeys;
}
void AwesomeWidget::getGraphicalItems()
{
if (debug) qDebug() << PDEBUG;
graphicalItems.clear();
// create directory at $HOME
QString localDir = KStandardDirs::locateLocal("data", "plasma_applet_awesome-widget/desktops");
if (KStandardDirs::makeDir(localDir))
if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_applet_awesome-widget/desktops");
QStringList names;
for (int i=0; i<dirs.count(); i++) {
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
for (int j=0; j<files.count(); j++) {
if (!files[j].endsWith(QString(".desktop"))) continue;
if (names.contains(files[j])) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
names.append(files[j]);
graphicalItems.append(new GraphicalItem(0, files[j], dirs, debug));
}
}
}
GraphicalItem *AwesomeWidget::getItemByTag(const QString tag)
{
if (debug) qDebug() << PDEBUG;
GraphicalItem *item = nullptr;
for (int i=0; i< graphicalItems.count(); i++) {
if ((graphicalItems[i]->getName() + graphicalItems[i]->getBar()) != tag) continue;
item = graphicalItems[i];
break;
}
return item;
}
void AwesomeWidget::showKsysguard()
{
if (debug) qDebug() << PDEBUG;
QString cmd = QString("ksysguard");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
}
void AwesomeWidget::showReadme()
{
if (debug) qDebug() << PDEBUG;
QDesktopServices::openUrl(QString("http://arcanis.name/projects/awesome-widgets/"));
}
void AwesomeWidget::showUpdates(QString version)
{
if (debug) qDebug() << PDEBUG;
QString text;
text += i18n("Current version : %1", QString(VERSION)) + QString("\n");
text += i18n("New version : %1", version) + QString("\n\n");
text += i18n("Click \"Ok\" to download");
int select = QMessageBox::information(0, i18n("There are updates"), text, QMessageBox::Ok | QMessageBox::Cancel);
switch(select) {
case QMessageBox::Ok:
QDesktopServices::openUrl(QString(RELEASES) + version);
break;
}
}
K_EXPORT_PLASMA_APPLET(awesome-widget, AwesomeWidget)

View File

@ -0,0 +1,151 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWESOME_WIDGET_H
#define AWESOME_WIDGET_H
#include <Plasma/Applet>
#include <Plasma/DataEngine>
#include <Plasma/ToolTipContent>
#include <ui_about.h>
#include <ui_advanced.h>
#include <ui_appearance.h>
#include <ui_deconfig.h>
#include <ui_tooltipconfig.h>
#include <ui_widget.h>
class CustomLabel;
class ExtScript;
class GraphicalItem;
class QGraphicsGridLayout;
class QGraphicsScene;
class QNetworkReply;
class AwesomeWidget : public Plasma::Applet
{
Q_OBJECT
public:
AwesomeWidget(QObject *parent, const QVariantList &args);
~AwesomeWidget();
QString getNetworkDevice();
int getNumberCpus();
float getTemp(const float temp);
QStringList getTimeKeys();
void init();
// de configuration
QMap<QString, QString> readDataEngineConfiguration();
void writeDataEngineConfiguration(const QMap<QString, QString> settings);
QMap<QString, QString> updateDataEngineConfiguration(const QMap<QString, QString> rawConfig);
public slots:
// contextual actions
void showKsysguard();
void showReadme();
void showUpdates(QString version);
// dataengine
void addDiskDevice(const QString source);
void connectToEngine();
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
void disconnectFromEngine();
// configuration interface
void configAccepted();
void configChanged();
// update events
void sendNotification(const QString eventId, const QString message);
void updateNetworkDevice(const bool delay = true);
void updateText(const bool clear = false);
void updateTooltip();
private slots:
void checkUpdates();
void reinit();
void replyRecieved(QNetworkReply *reply);
// configuration interface
void addBar();
void addCustomScript();
void addNewPkgCommand(QTableWidgetItem *item);
void contextMenuBars(const QPoint pos);
void contextMenuCustomCommand(const QPoint pos);
void contextMenuPkgCommand(const QPoint pos);
void copyBar(const QString original);
void copyCustomCommand(const QString original);
void editBar(QListWidgetItem *item);
void editCustomCommand(QListWidgetItem *item);
void editFanItem(QListWidgetItem *item);
void editHddItem(QListWidgetItem *item);
void editHddSpeedItem(QListWidgetItem *item);
void editMountItem(QListWidgetItem *item);
void editTempItem(QListWidgetItem *item);
void setFontFormating();
void setFormating();
signals:
void thereIsUpdates(QString version);
protected:
QList<QAction *> contextualActions();
void createConfigurationInterface(KConfigDialog *parent);
private:
// functions
void createActions();
QStringList findKeys();
QStringList getKeys();
QStringList findGraphicalItems();
void getGraphicalItems();
GraphicalItem *getItemByTag(const QString tag);
QList<ExtScript *> initScripts();
// ui
QGraphicsGridLayout *mainLayout = nullptr;
CustomLabel *textLabel = nullptr;
QTimer *timer = nullptr;
QList<QAction *> contextMenu;
// tooltip
Plasma::ToolTipContent toolTip;
QGraphicsScene *toolTipScene = nullptr;
QGraphicsView *toolTipView = nullptr;
// values
int networkDeviceUpdate;
QMap<QString, int> counts;
QMap<QString, QList<float>> tooltipValues;
QMap<QString, QString> values;
// debug
bool debug;
// data engine
Plasma::DataEngine *extsysmonEngine = nullptr;
Plasma::DataEngine *sysmonEngine = nullptr;
Plasma::DataEngine *timeEngine = nullptr;
// configuration interface
Ui::About uiAboutConfig;
Ui::AdvancedWindow uiAdvancedConfig;
Ui::AppearanceWindow uiAppConfig;
Ui::ConfigWindow uiWidConfig;
Ui::DEWindow uiDEConfig;
Ui::TooltipWindow uiTooltipConfig;
// configuration
QMap<QString, QString> configuration;
QStringList diskDevices, keys, formatLine, foundKeys;
QList<GraphicalItem *> graphicalItems;
QStringList foundBars;
};
#endif /* AWESOME_WIDGET_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,97 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "customlabel.h"
#include <QGraphicsSceneMouseEvent>
#include <QTextCodec>
#include "awesome-widget.h"
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
CustomLabel::CustomLabel(AwesomeWidget *wid, const bool debugCmd)
: QLabel(0),
widget(wid),
debug(debugCmd)
{
setWordWrap(false);
}
CustomLabel::~CustomLabel()
{
if (debug) qDebug() << PDEBUG;
}
void CustomLabel::setPopupEnabled(const bool state)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
enablePopup = state;
}
void CustomLabel::mousePressEvent(QMouseEvent *event)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
if ((enablePopup) && (event->button() == Qt::LeftButton)) {
QString cmd, text;
TaskResult process;
// kernel
cmd = QString("uname -rsm");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Kernel: %1<br>").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// hostname
cmd = QString("uname -n");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Hostname: %1<br>").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// whoami
cmd = QString("whoami");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Whoami: %1<br>").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// uptime
cmd = QString("uptime");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Uptime: %1").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
widget->sendNotification(QString("system"), text);
}
emit(QWidget::mousePressEvent(event));
}

View File

@ -0,0 +1,45 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef CUSTOMLABEL_H
#define CUSTOMLABEL_H
#include <QLabel>
class AwesomeWidget;
class CustomLabel : public QLabel
{
Q_OBJECT
public:
CustomLabel(AwesomeWidget *wid, const bool debugCmd = false);
~CustomLabel();
void setPopupEnabled(const bool state);
protected:
void mousePressEvent(QMouseEvent *event);
private:
AwesomeWidget *widget;
bool debug;
bool enablePopup;
};
#endif /* CUSTOMLABEL_H */

View File

@ -0,0 +1,432 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DEWindow</class>
<widget class="QWidget" name="DEWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>582</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">DE</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea_dattaengine">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="contents_dattaengine">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>684</width>
<height>566</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="0">
<layout class="QHBoxLayout" name="layout_hddtempCmd">
<item>
<widget class="QLabel" name="label_hddtempCmd">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>hddtemp cmd</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_hddtempCmd"/>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="layout_gpudev">
<item>
<widget class="QLabel" name="label_gpudev">
<property name="text">
<string>GPU device</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_gpudev">
<item>
<property name="text">
<string notr="true">auto</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">disable</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">nvidia</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ati</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="layout_hdddev">
<item>
<widget class="QLabel" name="label_hdddev">
<property name="text">
<string>HDD</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_hdddev"/>
</item>
</layout>
</item>
<item row="8" column="0">
<layout class="QHBoxLayout" name="layout_playerSelect">
<item>
<widget class="QLabel" name="label_playerSelect">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Music player</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_playerSelect">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string notr="true">mpris</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mpd</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout" name="layout_mpdport">
<item>
<widget class="QLabel" name="label_mpdport">
<property name="text">
<string>MPD port</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_mpdport">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>50000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>6600</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="layout_mpdaddress">
<item>
<widget class="QLabel" name="label_mpdaddress">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>MPD address</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_mpdaddress"/>
</item>
</layout>
</item>
<item row="10" column="0">
<spacer name="spacer_dataengine">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="layout_acpi">
<item>
<widget class="QLabel" name="label_acpi">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ACPI path</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_acpi">
<property name="toolTip">
<string>&quot;/sys/class/power_supply/&quot; by default</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0">
<layout class="QVBoxLayout" name="layout_mpris">
<item>
<widget class="QLabel" name="label_mprisInfo">
<property name="text">
<string>&lt;b&gt;NOTE:&lt;/b&gt; Player DBus interface should be an active</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_mprisSelect">
<item>
<widget class="QLabel" name="label_mpris">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>MPRIS player name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_mpris">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">auto</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">amarok</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">audacious</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">clementine</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">deadbeef</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">vlc</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">qmmp</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">xmms2</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="9" column="0">
<layout class="QVBoxLayout" name="layout_pkgCommand">
<item>
<widget class="QTableWidget" name="tableWidget_pkgCommand">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="toolTip">
<string>Editable
del - remove item</string>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Package manager</string>
</property>
</column>
<column>
<property name="text">
<string>Null lines</string>
</property>
</column>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="layout_custom">
<item>
<layout class="QHBoxLayout" name="layout_customAdd">
<item>
<widget class="QLabel" name="label_custom">
<property name="text">
<string>Custom scripts</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer_custom">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_custom">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_custom">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,606 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awesome-widget.h"
#include <QRegExp>
#include <math.h>
#include "graphicalitem.h"
#include <pdebug/pdebug.h>
void AwesomeWidget::connectToEngine()
{
if (debug) qDebug() << PDEBUG;
QRegExp regExp;
// battery
regExp = QRegExp(QString("(^|bar[0-9].*)(ac|bat.*)"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("batteryTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->connectSource(QString("battery"),
this, configuration[QString("interval")].toInt());
// cpu
regExp = QRegExp(QString("(^|bar[0-9].*)cpu(?!cl).*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->connectSource(QString("cpu/system/TotalLoad"),
this, configuration[QString("interval")].toInt());
for (int i=0; i<counts[QString("cpu")]; i++)
sysmonEngine->connectSource(QString("cpu/cpu") + QString::number(i) + QString("/TotalLoad"),
this, configuration[QString("interval")].toInt());
}
// cpuclock
regExp = QRegExp(QString("cpucl.*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuclTooltip")].toInt() == 2)) {
sysmonEngine->connectSource(QString("cpu/system/AverageClock"),
this, configuration[QString("interval")].toInt());
for (int i=0; i<counts[QString("cpu")]; i++)
sysmonEngine->connectSource(QString("cpu/cpu") + QString::number(i) + QString("/clock"),
this, configuration[QString("interval")].toInt());
}
// custom command
regExp = QRegExp(QString("custom.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("custom"),
this, configuration[QString("interval")].toInt());
// desktop
regExp = QRegExp(QString(".*desktop.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("desktop"),
this, configuration[QString("interval")].toInt());
// disk speed
regExp = QRegExp(QString("hdd[rw].*"));
if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("disk")].split(QString("@@")).count(); i++) {
sysmonEngine->connectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/rblk"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/wblk"),
this, configuration[QString("interval")].toInt());
}
// fan
regExp = QRegExp(QString("fan.*"));
if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("fanDevice")].split(QString("@@")).count(); i++)
sysmonEngine->connectSource(configuration[QString("fanDevice")].split(QString("@@"))[i],
this, configuration[QString("interval")].toInt());
// gpu
regExp = QRegExp(QString("(^|bar[0-9].*)gpu"));
if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->connectSource(QString("gpu"),
this, configuration[QString("interval")].toInt());
// gputemp
regExp = QRegExp(QString("gputemp"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("gputemp"),
this, configuration[QString("interval")].toInt());
// mount
regExp = QRegExp(QString("(^|bar[0-9].*)hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
for (int i=0; i<configuration[QString("mount")].split(QString("@@")).count(); i++) {
sysmonEngine->connectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/filllevel"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/freespace"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/usedspace"),
this, configuration[QString("interval")].toInt());
}
// hddtemp
regExp = QRegExp(QString("hddtemp.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("hddtemp"),
this, configuration[QString("interval")].toInt());
// memory
regExp = QRegExp(QString("(^|bar[0-9].*)mem.*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("memTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->connectSource(QString("mem/physical/free"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("mem/physical/used"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("mem/physical/application"),
this, configuration[QString("interval")].toInt());
}
// network
networkDeviceUpdate = 0;
regExp = QRegExp(QString("(down|up|netdev)"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("downTooltip")].toInt() == 2)) {
sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"),
this, configuration[QString("interval")].toInt());
}
// package manager
regExp = QRegExp(QString("pkgcount.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("pkg"),
this, 60*60*1000, Plasma::AlignToHour);
// player
regExp = QRegExp(QString("(album|artist|duration|progress|title)"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("player"),
this, configuration[QString("interval")].toInt());
// ps
regExp = QRegExp(QString("ps.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->connectSource(QString("ps"),
this, configuration[QString("interval")].toInt());
// swap
regExp = QRegExp(QString("(^|bar[0-9].*)swap.*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("swapTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->connectSource(QString("mem/swap/free"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("mem/swap/used"),
this, configuration[QString("interval")].toInt());
}
// temp
regExp = QRegExp(QString("temp.*"));
if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("tempDevice")].split(QString("@@")).count(); i++)
sysmonEngine->connectSource(configuration[QString("tempDevice")].split(QString("@@"))[i],
this, configuration[QString("interval")].toInt());
// time
regExp = QRegExp(QString("(^|iso|short|long|c)time"));
if (foundKeys.indexOf(regExp) > -1)
timeEngine->connectSource(QString("Local"),
this, 1000);
// uptime
regExp = QRegExp(QString("(^|c)uptime"));
if (foundKeys.indexOf(regExp) > -1)
sysmonEngine->connectSource(QString("system/uptime"),
this, configuration[QString("interval")].toInt());
}
void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Source" << sourceName;
// regular expressions
QRegExp cpuRegExp = QRegExp(QString("cpu/cpu.*/TotalLoad"));
QRegExp cpuclRegExp = QRegExp(QString("cpu/cpu.*/clock"));
QRegExp hddrRegExp = QRegExp(QString("disk/.*/Rate/rblk"));
QRegExp hddwRegExp = QRegExp(QString("disk/.*/Rate/wblk"));
QRegExp mountFillRegExp = QRegExp(QString("partitions/.*/filllevel"));
QRegExp mountFreeRegExp = QRegExp(QString("partitions/.*/freespace"));
QRegExp mountUsedRegExp = QRegExp(QString("partitions/.*/usedspace"));
QRegExp netRecRegExp = QRegExp(QString("network/interfaces/.*/receiver/data"));
QRegExp netTransRegExp = QRegExp(QString("network/interfaces/.*/transmitter/data"));
QRegExp tempRegExp = QRegExp(QString("lmsensors/.*"));
if (data.keys().isEmpty()) return;
if (sourceName == QString("battery")) {
for (int i=0; i<data.keys().count(); i++) {
if (data.keys()[i] == QString("ac")) {
if (data[QString("ac")].toBool())
values[QString("ac")] = configuration[QString("acOnline")];
else
values[QString("ac")] = configuration[QString("acOffline")];
} else {
values[data.keys()[i]] = QString("%1").arg(data[data.keys()[i]].toFloat(), 3, 'f', 0);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*bat"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != data.keys()[i]) continue;
values[foundBars[j]] = values[data.keys()[i]];
}
}
}
}
if ((configuration[QString("batteryTooltip")].toInt() == 2) &&
(!isnan(data[QString("bat")].toFloat()))) {
if (tooltipValues[QString("bat")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("bat")].takeFirst();
if (data[QString("ac")].toBool())
tooltipValues[QString("bat")].append(data[QString("bat")].toFloat());
else
tooltipValues[QString("bat")].append(-data[QString("bat")].toFloat());
}
} else if (sourceName == QString("cpu/system/TotalLoad")) {
values[QString("cpu")] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*cpu(?!cl).*"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("cpu")) continue;
values[foundBars[j]] = QString("%1").arg(data[QString("value")].toFloat());
}
}
if ((configuration[QString("cpuTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) {
if (tooltipValues[QString("cpu")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("cpu")].takeFirst();
tooltipValues[QString("cpu")].append(data[QString("value")].toFloat());
}
} else if (sourceName.contains(cpuRegExp)) {
QString number = sourceName;
number.remove(QString("cpu/cpu"));
number.remove(QString("/TotalLoad"));
values[QString("cpu") + number] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*cpu(?!cl).*"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != (QString("cpu") + number)) continue;
values[foundBars[j]] = values[QString("cpu") + number];
}
}
} else if (sourceName == QString("cpu/system/AverageClock")) {
values[QString("cpucl")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
if ((configuration[QString("cpuclTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) {
if (tooltipValues[QString("cpucl")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("cpucl")].takeFirst();
tooltipValues[QString("cpucl")].append(data[QString("value")].toFloat());
}
} else if (sourceName.contains(cpuclRegExp)) {
QString number = sourceName;
number.remove(QString("cpu/cpu"));
number.remove(QString("/clock"));
values[QString("cpucl") + number] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
} else if (sourceName == QString("custom")) {
for (int i=0; i<data.keys().count(); i++)
values[data.keys()[i]] = data[data.keys()[i]].toString();
} else if (sourceName == QString("desktop")) {
values[QString("desktop")] = data[QString("currentName")].toString();
values[QString("ndesktop")] = QString("%1").arg(data[QString("currentNumber")].toInt());
values[QString("tdesktops")] = QString("%1").arg(data[QString("number")].toInt());
} else if (sourceName.contains(hddrRegExp)) {
QString device = sourceName;
device.remove(QString("/Rate/rblk"));
for (int i=0; i<counts[QString("disk")]; i++)
if (configuration[QString("disk")].split(QString("@@"))[i] == device) {
values[QString("hddr") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 0);
break;
}
} else if (sourceName.contains(hddwRegExp)) {
QString device = sourceName;
device.remove(QString("/Rate/wblk"));
for (int i=0; i<counts[QString("disk")]; i++)
if (configuration[QString("disk")].split(QString("@@"))[i] == device) {
values[QString("hddw") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 0);
break;
}
} else if (sourceName == QString("gpu")) {
values[QString("gpu")] = QString("%1").arg(data[QString("GPU")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*gpu"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("gpu")) continue;
values[foundBars[j]] = values[QString("gpu")];
}
}
} else if (sourceName == QString("gputemp")) {
values[QString("gputemp")] = QString("%1").arg(getTemp(data[QString("GPUTemp")].toFloat()), 4, 'f', 1);
} else if (sourceName.contains(mountFillRegExp)) {
QString mount = sourceName;
mount.remove(QString("partitions"));
mount.remove(QString("/filllevel"));
for (int i=0; i<counts[QString("mount")]; i++)
if (configuration[QString("mount")].split(QString("@@"))[i] == mount) {
values[QString("hdd") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*hdd([0-9].*"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != (QString("hdd") + QString::number(i))) continue;
values[foundBars[j]] = values[QString("hdd") + QString::number(i)];
}
}
}
} else if (sourceName.contains(mountFreeRegExp)) {
QString mount = sourceName;
mount.remove(QString("partitions"));
mount.remove(QString("/freespace"));
for (int i=0; i<counts[QString("mount")]; i++)
if (configuration[QString("mount")].split(QString("@@"))[i] == mount) {
values[QString("hddfreemb") + QString::number(i)] = QString("%1").arg(
data[QString("value")].toFloat() / 1024.0, 5, 'f', 0);
values[QString("hddfreegb") + QString::number(i)] = QString("%1").arg(
data[QString("value")].toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
break;
}
} else if (sourceName.contains(mountUsedRegExp)) {
QString mount = sourceName;
mount.remove(QString("partitions"));
mount.remove(QString("/usedspace"));
for (int i=0; i<counts[QString("mount")]; i++)
if (configuration[QString("mount")].split(QString("@@"))[i] == mount) {
values[QString("hddmb") + QString::number(i)] = QString("%1").arg(
data[QString("value")].toFloat() / 1024.0, 5, 'f', 0);
values[QString("hddgb") + QString::number(i)] = QString("%1").arg(
data[QString("value")].toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
// total
values[QString("hddtotmb") + QString::number(i)] = QString("%1").arg(
values[QString("hddfreemb") + QString::number(i)].toInt() +
values[QString("hddmb") + QString::number(i)].toInt());
values[QString("hddtotgb") + QString::number(i)] = QString("%1").arg(
values[QString("hddfreegb") + QString::number(i)].toFloat() +
values[QString("hddgb") + QString::number(i)].toFloat(),
5, 'f', 1);
break;
}
} else if (sourceName == QString("hddtemp")) {
for (int i=0; i<data.keys().count(); i++)
for (int j=0; j<counts[QString("hddtemp")]; j++)
if (data.keys()[i] == configuration[QString("hdd")].split(QString("@@"))[j]) {
values[QString("hddtemp") + QString::number(j)] = QString("%1").arg(getTemp(data[data.keys()[i]].toFloat()), 4, 'f', 1);
break;
}
} else if (sourceName == QString("mem/physical/application")) {
values[QString("memmb")] = QString("%1").arg(data[QString("value")].toFloat() / 1024.0, 5, 'f', 0);
values[QString("memgb")] = QString("%1").arg(data[QString("value")].toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
} else if (sourceName == QString("mem/physical/free")) {
values[QString("memfreemb")] = QString("%1").arg(data[QString("value")].toFloat() / 1024.0, 5, 'f', 0);
values[QString("memfreegb")] = QString("%1").arg(data[QString("value")].toFloat() / (1024.0 * 1024.0), 4, 'f', 1);
} else if (sourceName == QString("mem/physical/used")) {
values[QString("memusedmb")] = QString("%1").arg(data[QString("value")].toFloat() / 1024.0, 0, 'f', 0);
values[QString("memusedgb")] = QString("%1").arg(data[QString("value")].toFloat() / (1024.0 * 1024.0), 4, 'f', 1);
// total
values[QString("memtotmb")] = QString("%1").arg(
values[QString("memusedmb")].toInt() + values[QString("memfreemb")].toInt(), 5);
values[QString("memtotgb")] = QString("%1").arg(
values[QString("memusedgb")].toFloat() + values[QString("memfreegb")].toFloat(),
4, 'f', 1);
// percentage
values[QString("mem")] = QString("%1").arg(100.0 * values[QString("memmb")].toFloat() / values[QString("memtotmb")].toFloat(),
5, 'f', 1);
if ((configuration[QString("memTooltip")].toInt() == 2) &&
(!isnan(values[QString("mem")].toFloat()))) {
if (tooltipValues[QString("mem")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("mem")].takeFirst();
tooltipValues[QString("mem")].append(values[QString("mem")].toFloat());
}
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*mem"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("mem")) continue;
values[foundBars[j]] = values[QString("mem")];
}
}
} else if (sourceName.contains(netRecRegExp)) {
values[QString("down")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
if ((configuration[QString("downTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) {
if (tooltipValues[QString("down")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("down")].takeFirst();
tooltipValues[QString("down")].append(data[QString("value")].toFloat());
}
networkDeviceUpdate++;
if (networkDeviceUpdate >= 30) {
networkDeviceUpdate = 0;
if (configuration[QString("useCustomNetdev")].toInt() == 0) {
sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"), this);
sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"), this);
updateNetworkDevice(false);
sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"),
this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"),
this, configuration[QString("interval")].toInt());
}
}
} else if (sourceName.contains(netTransRegExp)) {
values[QString("up")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
if ((configuration[QString("downTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) {
if (tooltipValues[QString("up")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("up")].takeFirst();
tooltipValues[QString("up")].append(data[QString("value")].toFloat());
}
} else if (sourceName == QString("pkg")) {
for (int i=0; i<data.keys().count(); i++)
values[data.keys()[i].toLower()] = QString("%1").arg(data[data.keys()[i]].toInt(), 2);
} else if (sourceName == QString("player")) {
values[QString("album")] = data[QString("album")].toString();
values[QString("artist")] = data[QString("artist")].toString();
values[QString("duration")] = data[QString("duration")].toString();
values[QString("progress")] = data[QString("progress")].toString();
values[QString("title")] = data[QString("title")].toString();
} else if (sourceName == QString("ps")) {
values[QString("ps")] = data[QString("ps")].toString();
values[QString("pscount")] = QString("%1").arg(data[QString("psCount")].toInt(), 2);
values[QString("pstotal")] = QString("%1").arg(data[QString("psTotal")].toInt(), 3);
} else if (sourceName == QString("mem/swap/free")) {
values[QString("swapfreemb")] = QString("%1").arg(data[QString("value")].toFloat() / 1024.0, 5, 'f', 0);
values[QString("swapfreegb")] = QString("%1").arg(data[QString("value")].toFloat() / (1024.0 * 1024.0), 4, 'f', 1);
} else if (sourceName == QString("mem/swap/used")) {
values[QString("swapmb")] = QString("%1").arg(data[QString("value")].toFloat() / 1024.0, 5, 'f', 0);
values[QString("swapgb")] = QString("%1").arg(data[QString("value")].toFloat() / (1024.0 * 1024.0), 4, 'f', 1);
// total
values[QString("swaptotmb")] = QString("%1").arg(
values[QString("swapmb")].toInt() + values[QString("swapfreemb")].toInt(), 5);
values[QString("swaptotgb")] = QString("%1").arg(
values[QString("swapgb")].toFloat() + values[QString("swapfreegb")].toFloat(), 4, 'f', 1);
// percentage
values[QString("swap")] = QString("%1").arg(100.0 * values[QString("swapmb")].toFloat() / values[QString("swaptotmb")].toFloat(),
5, 'f', 1);
if ((configuration[QString("swapTooltip")].toInt() == 2) &&
(!isnan(values[QString("swap")].toFloat()))) {
if (tooltipValues[QString("swap")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("swap")].takeFirst();
tooltipValues[QString("swap")].append(values[QString("swap")].toFloat());
}
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*swap"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("swap")) continue;
values[foundBars[j]] = values[QString("swap")];
}
}
} else if (sourceName.contains(tempRegExp)) {
if (data[QString("units")].toString() == QString("rpm")) {
for (int i=0; i<counts[QString("fan")]; i++)
if (sourceName == configuration[QString("fanDevice")].split(QString("@@"))[i]) {
values[QString("fan") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 1);
break;
}
} else {
for (int i=0; i<counts[QString("temp")]; i++)
if (sourceName == configuration[QString("tempDevice")].split(QString("@@"))[i]) {
values[QString("temp") + QString::number(i)] = QString("%1").arg(getTemp(data[QString("value")].toFloat()), 4, 'f', 1);
break;
}
}
} else if (sourceName == QString("Local")) {
values[QString("time")] = data[QString("DateTime")].toDateTime().toString(Qt::TextDate);
values[QString("isotime")] = data[QString("DateTime")].toDateTime().toString(Qt::ISODate);
values[QString("shorttime")] = data[QString("DateTime")].toDateTime().toString(Qt::SystemLocaleShortDate);
values[QString("longtime")] = data[QString("DateTime")].toDateTime().toString(Qt::SystemLocaleLongDate);
QStringList timeKeys = getTimeKeys();
values[QString("ctime")] = configuration[QString("customTime")];
for (int i=0; i<timeKeys.count(); i++)
values[QString("ctime")].replace(QString("$") + timeKeys[i],
data[QString("DateTime")].toDateTime().toString(timeKeys[i]));
} else if (sourceName == QString("system/uptime")) {
int uptime = data[QString("value")].toFloat();
int seconds = uptime - uptime % 60;
int minutes = seconds / 60 % 60;
int hours = ((seconds / 60) - minutes) / 60 % 24;
int days = (((seconds / 60) - minutes) / 60 - hours) / 24;
values[QString("uptime")] = QString("%1d%2h%3m").arg(days, 3).arg(hours, 2).arg(minutes, 2);
values[QString("cuptime")] = configuration[QString("customUptime")];
values[QString("cuptime")].replace(QString("$dd"), QString("%1").arg(days, 3, 10, QChar('0')));
values[QString("cuptime")].replace(QString("$d"), QString("%1").arg(days));
values[QString("cuptime")].replace(QString("$hh"), QString("%1").arg(hours, 2, 10, QChar('0')));
values[QString("cuptime")].replace(QString("$h"), QString("%1").arg(hours));
values[QString("cuptime")].replace(QString("$mm"), QString("%1").arg(minutes, 2, 10, QChar('0')));
values[QString("cuptime")].replace(QString("$m"), QString("%1").arg(minutes));
}
}
void AwesomeWidget::disconnectFromEngine()
{
if (debug) qDebug() << PDEBUG;
QRegExp regExp;
// battery
regExp = QRegExp(QString("(^|bar[0-9].*)(ac|bat.*)"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("batteryTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->disconnectSource(QString("battery"), this);
// cpu
regExp = QRegExp(QString("(^|bar[0-9].*)cpu(?!cl).*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->disconnectSource(QString("cpu/system/TotalLoad"), this);
for (int i=0; i<counts[QString("cpu")]; i++)
sysmonEngine->disconnectSource(QString("cpu/cpu") + QString::number(i) + QString("/TotalLoad"), this);
}
// cpuclock
regExp = QRegExp(QString("cpucl.*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuclTooltip")].toInt() == 2)) {
sysmonEngine->disconnectSource(QString("cpu/system/AverageClock"), this);
for (int i=0; i<counts[QString("cpu")]; i++)
sysmonEngine->disconnectSource(QString("cpu/cpu") + QString::number(i) + QString("/clock"), this);
}
// custom command
regExp = QRegExp(QString("custom.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("custom"), this);
// desktop
regExp = QRegExp(QString(".*desktop.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("desktop"), this);
// disk speed
regExp = QRegExp(QString("hdd[rw].*"));
if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("disk")].split(QString("@@")).count(); i++) {
sysmonEngine->disconnectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/rblk"), this);
sysmonEngine->disconnectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/wblk"), this);
}
// fan
regExp = QRegExp(QString("fan.*"));
if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("fanDevice")].split(QString("@@")).count(); i++)
sysmonEngine->disconnectSource(configuration[QString("fanDevice")].split(QString("@@"))[i], this);
// gpu
regExp = QRegExp(QString("(^|bar[0-9].*)gpu"));
if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->disconnectSource(QString("gpu"), this);
// gputemp
regExp = QRegExp(QString("gputemp"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("gputemp"), this);
// mount
regExp = QRegExp(QString("(^|bar[0-9].*)hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
for (int i=0; i<configuration[QString("mount")].split(QString("@@")).count(); i++) {
sysmonEngine->disconnectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/filllevel"), this);
sysmonEngine->disconnectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/freespace"), this);
sysmonEngine->disconnectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/usedspace"), this);
}
// hddtemp
regExp = QRegExp(QString("hddtemp.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("hddtemp"), this);
// memory
regExp = QRegExp(QString("(^|bar[0-9].*)mem.*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("memTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->disconnectSource(QString("mem/physical/free"), this);
sysmonEngine->disconnectSource(QString("mem/physical/used"), this);
sysmonEngine->disconnectSource(QString("mem/physical/application"), this);
}
// network
regExp = QRegExp(QString("(down|up|netdev)"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("downTooltip")].toInt() == 2)) {
sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"), this);
sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"), this);
}
// package manager
regExp = QRegExp(QString("pkgcount.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("pkg"), this);
// player
regExp = QRegExp(QString("(album|artist|duration|progress|title)"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("player"), this);
// ps
regExp = QRegExp(QString("ps.*"));
if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("ps"), this);
// swap
regExp = QRegExp(QString("(^|bar[0-9].*)swap.*"));
if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("swapTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->disconnectSource(QString("mem/swap/free"), this);
sysmonEngine->disconnectSource(QString("mem/swap/used"), this);
}
// temp
regExp = QRegExp(QString("temp.*"));
if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("tempDevice")].split(QString("@@")).count(); i++)
sysmonEngine->disconnectSource(configuration[QString("tempDevice")].split(QString("@@"))[i], this);
// time
regExp = QRegExp(QString("(^|iso|short|long|c)time"));
if (foundKeys.indexOf(regExp) > -1)
timeEngine->disconnectSource(QString("Local"), this);
// uptime
regExp = QRegExp(QString("(^|c)uptime"));
if (foundKeys.indexOf(regExp) > -1)
sysmonEngine->disconnectSource(QString("system/uptime"), this);
}

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=bar3
Comment=Simple bat bar
X-AW-Value=bat
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=bar0
Comment=Simple cpu bar
X-AW-Value=cpu
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=bar1
Comment=Simple mem bar
X-AW-Value=mem
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=bar2
Comment=Simple swap bar
X-AW-Value=swap
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100

View File

@ -0,0 +1,23 @@
[Desktop Entry]
Encoding=UTF-8
# name should be barN and uniq
Name=bar100500
Comment=Template for the AW bars
# value to show. Supported types are
# cpu, cpu[0-9], mem, swap, bat
X-AW-Value=cpu
# active color, RGBA
# you should use double quotes
X-AW-ActiveColor="0,0,0,255"
# inactive color, RGBA
# you should use double quotes
X-AW-InactiveColor="255,255,255,255"
# bar type. Supported types are
# Horizontal, Vertical, Circle
X-AW-Type=Horizontal
# direction. LeftToRight or RightToLeft
X-AW-Direction=LeftToRight
# height in pixels
X-AW-Height=25
# width in pixels
X-AW-Width=100

View File

@ -0,0 +1,470 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "graphicalitem.h"
#include "ui_graphicalitem.h"
#include <QBuffer>
#include <QColorDialog>
#include <QDebug>
#include <QDir>
#include <QGraphicsEllipseItem>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QSettings>
#include <pdebug/pdebug.h>
GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName, const QStringList directories, const bool debugCmd)
: QDialog(parent),
fileName(desktopName),
dirs(directories),
debug(debugCmd),
ui(new Ui::GraphicalItem)
{
readConfiguration();
ui->setupUi(this);
connect(ui->pushButton_activeColor, SIGNAL(clicked()), this, SLOT(changeColor()));
connect(ui->pushButton_inactiveColor, SIGNAL(clicked()), this, SLOT(changeColor()));
}
GraphicalItem::~GraphicalItem()
{
if (debug) qDebug() << PDEBUG;
delete ui;
}
QString GraphicalItem::getImage(const float value)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Value" << value;
if (_bar == QString("none")) return QString("");
QColor active = stringToColor(_activeColor);
QColor inactive = stringToColor(_inactiveColor);
float percent = value / 100.0;
int scale[2] = {1, 1};
QPen pen = QPen();
QGraphicsScene *scene = new QGraphicsScene();
scene->setBackgroundBrush(QBrush(Qt::NoBrush));
QGraphicsView *view = new QGraphicsView(scene);
view->setStyleSheet(QString("background: transparent"));
view->setContentsMargins(0, 0, 0, 0);
view->setFrameShape(QFrame::NoFrame);
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
view->resize(_width + 5.0, _height + 5.0);
// paint
switch(_type) {
case Vertical:
pen.setWidth(_width);
// inactive
pen.setColor(inactive);
scene->addLine(0.5 * _width, -0.5 * _width, 0.5 * _width, (1.0 - percent) * _height - 0.5 * _width, pen);
// active
pen.setColor(active);
scene->addLine(0.5 * _width, (1.0 - percent) * _height + 0.5 * _width, 0.5 * _width, _height + 0.5 * _width, pen);
// scale
scale[1] = -2 * (int)_direction + 1;
break;
case Circle:
QGraphicsEllipseItem *circle;
pen.setWidth(1.0);
// inactive
pen.setColor(inactive);
circle = scene->addEllipse(0.0, 0.0, _width, _height, pen, QBrush(inactive, Qt::SolidPattern));
circle->setSpanAngle(- (1.0 - percent) * 360.0 * 16.0);
circle->setStartAngle(90.0 * 16.0 - percent * 360.0 * 16.0);
// active
pen.setColor(active);
circle = scene->addEllipse(0.0, 0.0, _width, _height, pen, QBrush(active, Qt::SolidPattern));
circle->setSpanAngle(- percent * 360.0 * 16.0);
circle->setStartAngle(90.0 * 16.0);
// scale
scale[0] = -2 *(int)_direction + 1;
break;
default:
pen.setWidth(_height);
// inactive
pen.setColor(inactive);
scene->addLine(percent * _width + 0.5 * _height, 0.5 * _height, _width + 0.5 * _height, 0.5 * _height, pen);
// active
pen.setColor(active);
scene->addLine(-0.5 * _height, 0.5 * _height, percent * _width - 0.5 * _height, 0.5 * _height, pen);
// scale
scale[0] = -2 * (int)_direction + 1;
break;
}
// convert
QPixmap pixmap = QPixmap::grabWidget(view).transformed(QTransform().scale(scale[0], scale[1]));
QByteArray byteArray;
QBuffer buffer(&byteArray);
pixmap.save(&buffer, "PNG");
QString url = QString("<img src=\"data:image/png;base64,%1\"/>").arg(QString(byteArray.toBase64()));
delete view;
delete scene;
return url;
}
QString GraphicalItem::getFileName()
{
if (debug) qDebug() << PDEBUG;
return fileName;
}
QString GraphicalItem::getName()
{
if (debug) qDebug() << PDEBUG;
return _name;
}
QString GraphicalItem::getComment()
{
if (debug) qDebug() << PDEBUG;
return _comment;
}
QString GraphicalItem::getBar()
{
if (debug) qDebug() << PDEBUG;
return _bar;
}
QString GraphicalItem::getActiveColor()
{
if (debug) qDebug() << PDEBUG;
return _activeColor;
}
QString GraphicalItem::getInactiveColor()
{
if (debug) qDebug() << PDEBUG;
return _inactiveColor;
}
GraphicalItem::Type GraphicalItem::getType()
{
if (debug) qDebug() << PDEBUG;
return _type;
}
QString GraphicalItem::getStrType()
{
if (debug) qDebug() << PDEBUG;
QString value;
switch(_type) {
case Vertical:
value = QString("Vertical");
break;
case Circle:
value = QString("Circle");
break;
default:
value = QString("Horizontal");
break;
}\
return value;
}
GraphicalItem::Direction GraphicalItem::getDirection()
{
if (debug) qDebug() << PDEBUG;
return _direction;
}
QString GraphicalItem::getStrDirection()
{
if (debug) qDebug() << PDEBUG;
QString value;
switch (_direction) {
case RightToLeft:
value = QString("RightToLeft");
break;
default:
value = QString("LeftToRight");
break;
}
return value;
}
int GraphicalItem::getHeight()
{
if (debug) qDebug() << PDEBUG;
return _height;
}
int GraphicalItem::getWidth()
{
if (debug) qDebug() << PDEBUG;
return _width;
}
void GraphicalItem::setName(const QString name)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Name" << name;
_name = name;
}
void GraphicalItem::setComment(const QString comment)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Comment" << comment;
_comment = comment;
}
void GraphicalItem::setBar(const QString bar)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Bar" << bar;
_bar = bar;
if ((!_bar.contains(QRegExp(QString("cpu(?!cl).*")))) &&
(!_bar.contains(QRegExp(QString("gpu")))) &&
(!_bar.contains(QRegExp(QString("mem")))) &&
(!_bar.contains(QRegExp(QString("swap")))) &&
(!_bar.contains(QRegExp(QString("hdd[0-9].*")))) &&
(!_bar.contains(QRegExp(QString("bat.*")))))
_bar = QString("none");
}
void GraphicalItem::setActiveColor(const QString color)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Color" << color;
_activeColor = color;
}
void GraphicalItem::setInactiveColor(const QString color)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Color" << color;
_inactiveColor = color;
}
void GraphicalItem::setType(const QString type)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Type" << type;
if (type == QString("Vertical"))
_type = Vertical;
else if (type == QString("Circle"))
_type = Circle;
else
_type = Horizontal;
}
void GraphicalItem::setDirection(const QString direction)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Direction" << direction;
if (direction == QString("RightToLeft"))
_direction = RightToLeft;
else
_direction = LeftToRight;
}
void GraphicalItem::setHeight(const int height)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Height" << height;
if (height <= 0) return;
_height = height;
}
void GraphicalItem::setWidth(const int width)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Width" << width;
if (width <= 0) return;
_width = width;
}
void GraphicalItem::readConfiguration()
{
if (debug) qDebug() << PDEBUG;
for (int i=dirs.count()-1; i>=0; i--) {
if (!QDir(dirs[i]).entryList(QDir::Files).contains(fileName)) continue;
QSettings settings(dirs[i] + QDir::separator() + fileName, QSettings::IniFormat);
settings.beginGroup(QString("Desktop Entry"));
setName(settings.value(QString("Name"), _name).toString());
setComment(settings.value(QString("Comment"), _comment).toString());
setBar(settings.value(QString("X-AW-Value"), _bar).toString());
setActiveColor(settings.value(QString("X-AW-ActiveColor"), _activeColor).toString());
setInactiveColor(settings.value(QString("X-AW-InactiveColor"), _inactiveColor).toString());
setType(settings.value(QString("X-AW-Type"), getStrType()).toString());
setDirection(settings.value(QString("X-AW-Direction"), getStrDirection()).toString());
setHeight(settings.value(QString("X-AW-Height"), QString::number(_height)).toInt());
setWidth(settings.value(QString("X-AW-Width"), QString::number(_width)).toInt());
settings.endGroup();
}
}
void GraphicalItem::showConfiguration(const QStringList tags)
{
if (debug) qDebug() << PDEBUG;
ui->label_nameValue->setText(_name);
ui->lineEdit_comment->setText(_comment);
ui->comboBox_value->addItems(tags);
ui->comboBox_value->addItem(_bar);
ui->comboBox_value->setCurrentIndex(ui->comboBox_value->count() - 1);
ui->pushButton_activeColor->setText(_activeColor);
ui->pushButton_inactiveColor->setText(_inactiveColor);
ui->comboBox_type->setCurrentIndex((int)_type);
ui->comboBox_direction->setCurrentIndex((int)_direction);
ui->spinBox_height->setValue(_height);
ui->spinBox_width->setValue(_width);
int ret = exec();
if (ret != 1) return;
setName(ui->label_nameValue->text());
setComment(ui->lineEdit_comment->text());
setBar(ui->comboBox_value->currentText());
setActiveColor(ui->pushButton_activeColor->text().remove(QChar('&')));
setInactiveColor(ui->pushButton_inactiveColor->text().remove(QChar('&')));
setType(ui->comboBox_type->currentText());
setDirection(ui->comboBox_direction->currentText());
setHeight(ui->spinBox_height->value());
setWidth(ui->spinBox_width->value());
writeConfiguration();
}
void GraphicalItem::tryDelete()
{
if (debug) qDebug() << PDEBUG;
for (int i=0; i<dirs.count(); i++)
if (debug) qDebug() << PDEBUG << ":" << "Remove file" << dirs[i] + QDir::separator() + fileName <<
QFile::remove(dirs[i] + QDir::separator() + fileName);
}
void GraphicalItem::writeConfiguration()
{
if (debug) qDebug() << PDEBUG;
QSettings settings(dirs[0] + QDir::separator() + fileName, QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("Encoding"), QString("UTF-8"));
settings.setValue(QString("Name"), _name);
settings.setValue(QString("Comment"), _comment);
settings.setValue(QString("X-AW-Value"), _bar);
settings.setValue(QString("X-AW-ActiveColor"), _activeColor);
settings.setValue(QString("X-AW-InactiveColor"), _inactiveColor);
settings.setValue(QString("X-AW-Type"), getStrType());
settings.setValue(QString("X-AW-Direction"), getStrDirection());
settings.setValue(QString("X-AW-Height"), _height);
settings.setValue(QString("X-AW-Width"), _width);
settings.endGroup();
settings.sync();
}
void GraphicalItem::changeColor()
{
if (debug) qDebug() << PDEBUG;
QColor color = stringToColor(((QPushButton *)sender())->text());
QColor newColor = QColorDialog::getColor(color, 0, i18n("Select color"),
QColorDialog::ShowAlphaChannel);
if (!newColor.isValid()) return;
QStringList colorText;
colorText.append(QString("%1").arg(newColor.red()));
colorText.append(QString("%1").arg(newColor.green()));
colorText.append(QString("%1").arg(newColor.blue()));
colorText.append(QString("%1").arg(newColor.alpha()));
((QPushButton *)sender())->setText(colorText.join(QChar(',')));
}
QColor GraphicalItem::stringToColor(const QString color)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Color" << color;
QColor qcolor;
QStringList listColor = color.split(QChar(','));
while (listColor.count() < 4)
listColor.append(QString("0"));
qcolor.setRed(listColor[0].toInt());
qcolor.setGreen(listColor[1].toInt());
qcolor.setBlue(listColor[2].toInt());
qcolor.setAlpha(listColor[3].toInt());
return qcolor;
}

View File

@ -0,0 +1,98 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef GRAPHICALITEM_H
#define GRAPHICALITEM_H
#include <QColor>
#include <QDialog>
namespace Ui {
class GraphicalItem;
}
class GraphicalItem : public QDialog
{
Q_OBJECT
public:
enum Direction {
LeftToRight = 0,
RightToLeft
};
enum Type {
Horizontal = 0,
Vertical,
Circle
};
explicit GraphicalItem(QWidget *parent = 0, const QString desktopName = QString(),
const QStringList directories = QStringList(), const bool debugCmd = false);
~GraphicalItem();
QString getImage(const float value);
// get methods
QString getFileName();
QString getName();
QString getComment();
QString getBar();
QString getActiveColor();
QString getInactiveColor();
Type getType();
QString getStrType();
Direction getDirection();
QString getStrDirection();
int getHeight();
int getWidth();
// set methods
void setName(const QString name = QString("none"));
void setComment(const QString comment = QString("empty"));
void setBar(const QString bar = QString("cpu"));
void setActiveColor(const QString color = QString("0,0,0,130"));
void setInactiveColor(const QString color = QString("255,255,255,130"));
void setType(const QString type = QString("Horizontal"));
void setDirection(const QString direction = QString("LeftToRight"));
void setHeight(const int height = 100);
void setWidth(const int width = 100);
public slots:
void readConfiguration();
void showConfiguration(const QStringList tags = QStringList());
void tryDelete();
void writeConfiguration();
private slots:
void changeColor();
private:
QColor stringToColor(const QString color);
QString fileName;
QStringList dirs;
bool debug;
Ui::GraphicalItem *ui;
// properties
QString _name = QString("none");
QString _comment = QString("empty");
QString _bar = QString("cpu");
QString _activeColor = QString("0,0,0,130");
QString _inactiveColor = QString("255,255,255,130");
Type _type = Horizontal;
Direction _direction = LeftToRight;
int _height = 100;
int _width = 100;
};
#endif /* GRAPHICALITEM_H */

View File

@ -0,0 +1,293 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicalItem</class>
<widget class="QDialog" name="GraphicalItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>416</width>
<height>325</height>
</rect>
</property>
<property name="windowTitle">
<string>Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layout_name">
<item>
<widget class="QLabel" name="label_name">
<property name="text">
<string>Name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_nameValue">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_comment">
<item>
<widget class="QLabel" name="label_comment">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Comment</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_comment"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_value">
<item>
<widget class="QLabel" name="label_value">
<property name="text">
<string>Value</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_value">
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_activeColor">
<item>
<widget class="QLabel" name="label_activeColor">
<property name="text">
<string>Active color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_activeColor">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_inactiveColor">
<item>
<widget class="QLabel" name="label_inactiveColor">
<property name="text">
<string>Inactive color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_inactiveColor">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_type">
<item>
<widget class="QLabel" name="label_type">
<property name="text">
<string>Type</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_type">
<item>
<property name="text">
<string notr="true">Horizontal</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Vertical</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Circle</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_direction">
<item>
<widget class="QLabel" name="label_direction">
<property name="text">
<string>Direction</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_direction">
<item>
<property name="text">
<string notr="true">LeftToRight</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">RightToLeft</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_height">
<item>
<widget class="QLabel" name="label_height">
<property name="text">
<string>Height</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_height">
<property name="maximum">
<number>2000</number>
</property>
<property name="singleStep">
<number>25</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_width">
<item>
<widget class="QLabel" name="label_width">
<property name="text">
<string>Width</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_width">
<property name="maximum">
<number>2000</number>
</property>
<property name="singleStep">
<number>25</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>GraphicalItem</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>GraphicalItem</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -0,0 +1,25 @@
[Desktop Entry]
Encoding=UTF-8
Name=Awesome Widget
Comment=A minimalistic Plasmoid
Comment[en]=A minimalistic Plasmoid
Comment[es]=Un plasmoide minimalista
Comment[es]=Un script Plasmoïde minimaliste
Comment[pt_BR]=Um script Plasmoid
Comment[ru]=Минималистичный плазмоид
Comment[uk]=Мінімалістичний плазмоїд
X-KDE-ServiceTypes=Plasma/Applet
Type=Service
Icon=utilities-system-monitor
X-KDE-Library=plasma_applet_awesome-widget
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=awesome-widget
X-KDE-PluginInfo-Version=@PROJECT_VERSION@
X-KDE-PluginInfo-Website=http://arcanis.name/projects/awesome-widgets/
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3
X-KDE-PluginInfo-EnabledByDefault=true

View File

@ -0,0 +1,14 @@
[Global]
IconName=system
Name=Awesome Widget
Comment=Awesome widget information
[Event/system]
Name=System information
Comment=System information
Action=Popup
[Event/tag]
Name=Tag information
Comment=Tag information
Action=Popup

View File

@ -0,0 +1,25 @@
find_package(KDE4 REQUIRED)
find_package(Gettext REQUIRED)
if (NOT GETTEXT_MSGFMT_EXECUTABLE)
message(FATAL_ERROR "Please install the msgfmt binary")
endif (NOT GETTEXT_MSGFMT_EXECUTABLE)
file (GLOB _po_files *.po)
set (_gmoFiles)
foreach (_current_PO_FILE ${_po_files})
get_filename_component (_lang ${_current_PO_FILE} NAME_WE)
set (_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
add_custom_command (OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES/
RENAME plasma_applet_awesome-widget.mo)
list (APPEND _gmoFiles ${_gmoFile})
endforeach (_current_PO_FILE)
add_custom_target (pofiles ALL DEPENDS ${_gmoFiles})

View File

@ -0,0 +1,835 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-11-21 05:12+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: English <kde-russian@lists.kde.ru>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "Run ksysguard"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "Show README"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "Update text"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr "Check for updates"
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Current version : %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "New version : %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Click \"Ok\" to download"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "There are updates"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Tag: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Comment: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Name: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Exec: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "Package manager"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "Null lines"
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Version %1\n"
"(build date %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "A set of minimalistic plasmoid widgets"
#: configuration.cpp:430
msgid "Links:"
msgstr "Links:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Homepage"
#: configuration.cpp:432
msgid "Repository"
msgstr "Repository"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Bugtracker"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Translation issue"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "AUR packages"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "This software is licensed under %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Translators: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "This software uses: %1"
#: configuration.cpp:448
msgid "Widget"
msgstr "Widget"
#: configuration.cpp:449
msgid "Advanced"
msgstr "Advanced"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "Tooltip"
#: configuration.cpp:451
msgid "Appearance"
msgstr "Appearance"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "DataEngine"
#: configuration.cpp:453
msgid "About"
msgstr "About"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Enter file name"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "File name"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Edit"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Copy"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "Remove"
#: configuration.cpp:1037
msgid "Select font"
msgstr "Select font"
#: graphicalitem.cpp:442
msgid "Select color"
msgstr "Select color"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "Enable popup on mouse click"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Enable background"
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "Custom time format"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "Custom uptime format"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "Temperature units"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "Temperature devices"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "Editable"
#: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Fan devices"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "Mount points"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "HDD (speed)"
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "HDD (temp)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr "Disable auto select device and set specified device"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "Set network device"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "AC online tag"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "Line, which returns when AC is online"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "AC offline tag"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "Line, which returns when AC is offline"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Bars"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Add"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Time interval"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Font"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Font size"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Font color"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Font style"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Font weight"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "hddtemp cmd"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "GPU device"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Music player"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "MPD port"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "MPD address"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr "ACPI path"
#: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/\" by default"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>NOTE:</b> Player DBus interface should be an active"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "MPRIS player name"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Editable\n"
"del - remove item"
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr "Custom scripts"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr "Configuration"
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr "Name"
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr "Comment"
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Value"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Active color"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Inactive color"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Type"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Direction"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Height"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Width"
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Number of values for tooltips"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "Background"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "CPU color"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "CPU clock color"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Memory color"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Swap color"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Download speed color"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Upload speed color"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "Battery active color"
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr "Battery inactive color"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "esalexeev@gmail.com"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Time interval"
#~ msgid "Desktop check cmd"
#~ msgstr "Desktop check cmd"
#~ msgid "Custom command"
#~ msgstr "Custom command"
#~ msgid "Battery device"
#~ msgstr "Battery device"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgid "Vertical layout"
#~ msgstr "Vertical layout"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Add stretch to left/top of the layout"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Add stretch to right/bottom of the layout"
#~ msgid "Advanced configuration"
#~ msgstr "Advanced configuration"
#~ msgid "Appearance configuration"
#~ msgstr "Appearance configuration"
#~ msgid "Tooltip configuration"
#~ msgstr "Tooltip configuration"
#~ msgid "Widget configuration"
#~ msgstr "Widget configuration"
#~ msgid "Form"
#~ msgstr "Form"
#~ msgid "Network directory"
#~ msgstr "Network directory"
#~ msgid "\"/sys/class/net\" by default"
#~ msgstr "\"/sys/class/net\" by default"
#~ msgid "Custom command to run"
#~ msgstr "Custom command to run"
#~ msgid "Time"
#~ msgstr "Time"
#~ msgid ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgstr ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgid "Uptime"
#~ msgstr "Uptime"
#~ msgid ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgstr ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgstr ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgid "CPU Clock"
#~ msgstr "CPU Clock"
#~ msgid ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgstr ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgid "Temperature"
#~ msgstr "Temperature"
#~ msgid "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgstr "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgid "GPU"
#~ msgstr "GPU"
#~ msgid "$gpu - gpu usage, %"
#~ msgstr "$gpu - gpu usage, %"
#~ msgid "GPU Temp"
#~ msgstr "GPU Temp"
#~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - physical temperature on GPU"
#~ msgid "Memory"
#~ msgstr "Memory"
#~ msgid ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgstr ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgid "Swap"
#~ msgstr "Swap"
#~ msgid ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgstr ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgid ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgstr ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgid "HDD speed"
#~ msgstr "HDD speed"
#~ msgid ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgstr ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgid "HDD temp"
#~ msgstr "HDD temp"
#~ msgid ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Network"
#~ msgid ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgstr ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgid "Battery"
#~ msgstr "Battery"
#~ msgid ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgstr ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgid ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgstr ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgid "Processes"
#~ msgstr "Processes"
#~ msgid ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgstr ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgid ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgstr ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgid ""
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgid "Widget settings"
#~ msgstr "Widget settings"
#~ msgid "pacman -Qu"
#~ msgstr "pacman -Qu"
#~ msgid "apt-show-versions -u -b"
#~ msgstr "apt-show-versions -u -b"
#~ msgid "aptitude search '~U'"
#~ msgstr "aptitude search '~U'"
#~ msgid "yum list updates"
#~ msgstr "yum list updates"
#~ msgid "pkg_version -I -l '<'"
#~ msgstr "pkg_version -I -l '<'"
#~ msgid "urpmq --auto-select"
#~ msgstr "urpmq --auto-select"
#~ msgid "amarok"
#~ msgstr "amarok"
#~ msgid "mpd"
#~ msgstr "mpd"
#~ msgid "qmmp"
#~ msgstr "qmmp"
#~ msgid "auto"
#~ msgstr "auto"
#~ msgid "nvidia"
#~ msgstr "nvidia"
#~ msgid "ati"
#~ msgstr "ati"
#~ msgid "$hddN - usage for mount point N (from 0), %. Example: $hdd0"
#~ msgstr "$hddN - usage for mount point N (from 0), %. Example: $hdd0"
#~ msgid ""
#~ "$ds - uptime days\n"
#~ "$hs - uptime hours\n"
#~ "$ms - uptime minutes"
#~ msgstr ""
#~ "$ds - uptime days\n"
#~ "$hs - uptime hours\n"
#~ "$ms - uptime minutes"
#~ msgid ""
#~ "Command to run, example:\n"
#~ "wget -qO- http://ifconfig.me/ip - get external IP"
#~ msgstr ""
#~ "Command to run, example:\n"
#~ "wget -qO- http://ifconfig.me/ip - get external IP"
#~ msgid "@@/;@@ - mount point usage, %"
#~ msgstr "@@/;@@ - mount point usage, %"
#~ msgid "@@/dev/sda@@ - physical temperature on /dev/sda"
#~ msgstr "@@/dev/sda@@ - physical temperature on /dev/sda"
#~ msgid ""
#~ "$net - network speed, down/up, KB/s\n"
#~ "$netdev - current network device\n"
#~ "@@eth0@@ - disable auto select device and set specified device"
#~ msgstr ""
#~ "$net - network speed, down/up, KB/s\n"
#~ "$netdev - current network device\n"
#~ "@@eth0@@ - disable auto select device and set specified device"

View File

@ -0,0 +1,771 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Ernesto Avilés Vzqz <whippiii@gmail.com>, 2014.
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-12-15 19:51-0500\n"
"Last-Translator: Ernesto Avilés Vázquez\n"
"Language-Team: Spanish <kde-i18n-doc@kde.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "Ejecutar ksysguard"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "Mostrar el README"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "Actualizar texto"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr "Comprobar actualizaciones"
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Versión actual: %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "Nueva versión: %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Haz clic en «Ok» para descargar"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Hay actualizaciones disponibles"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Etiqueta: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Comentario: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Nombre: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Ejecutar: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "Gestor de paquetes"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "Número de líneas nulas"
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Versión %1\n"
"(fecha de construcción %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Un conjunto de plasmoides minimalistas"
#: configuration.cpp:430
msgid "Links:"
msgstr "Enlaces:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Página principal"
#: configuration.cpp:432
msgid "Repository"
msgstr "Repositorio"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Reporte de errores"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Problemas de traducción"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Paquetes AUR"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "Este software está licenciado bajo %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Traductores: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "Este software usa: %1"
#: configuration.cpp:448
msgid "Widget"
msgstr "Widget"
#: configuration.cpp:449
msgid "Advanced"
msgstr "Avanzado"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "Ventana emergente"
#: configuration.cpp:451
msgid "Appearance"
msgstr "Apariencia"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "DataEngine"
#: configuration.cpp:453
msgid "About"
msgstr "Acerca de"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Inserta el nombre de archivo"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Nombre de archivo"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Editar"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Copiar"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "Eliminar"
#: configuration.cpp:1037
msgid "Select font"
msgstr "Elegir tipo de letra"
#: graphicalitem.cpp:442
msgid "Select color"
msgstr "Elegir color"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "Habilitar ventana emergente al hacer clic"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Habilitar fondo"
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "Formato personalizado para la hora"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - día de la semana en formato largo\n"
"$ddd - día de la semana en formato corto\n"
"$dd - día\n"
"$d - día (sin ceros)\n"
"$MMMM - mes en formato largo\n"
"$MMM - mes en formato corto\n"
"$MM - mes\n"
"$M - mes (sin ceros)\n"
"$yyyy - año\n"
"$yy - año en formato largo\n"
"$hh - horas (solo formato de 24 horas)\n"
"$h - horas (sin ceros, solo formato de 24 horas)\n"
"$mm - minutos\n"
"$m - minutos (sin ceros)\n"
"$ss - segundos\n"
"$s - segundos (sin ceros)"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "Formato personalizado para el tiempo de actividad del sistema"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - días\n"
"$d - días (sin ceros)\n"
"$hh - horas\n"
"$h - horas (sin ceros)\n"
"$mm - minutos\n"
"$m - minutos (sin ceros)"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "Unidades de temperatura"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "Dispositivos de temperatura"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "Editable"
#: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Dispositivos de ventilación"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "Puntos de montaje"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "Discos duros (velocidad)"
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "Discos duros (temperatura)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr "Inhabilitar selección automática del dispositivo y especificar uno"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "Establecer dispositivo de red"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "Etiqueta para alimentación conectada"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "Línea devuelta si la alimentación está conectada"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "Etiqueta para la alimentación desconectada"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "Línea devuelta si la alimentación está desconectada"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Barras"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Añadir"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Intervalo de tiempo"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Tipo de letra"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Tamaño de letra"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Color de letra"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Estilo de letra"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Grosor de la letra"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "Comando hddtemp"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Dispositivo de GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "Disco duro"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Reproductor de música"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Puerto de MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "Dirección de MPD"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr "Ruta ACPI"
#: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" por defecto"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>NOTA:</b> La interfaz DBus del reproductor debería estar activada"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "Nombre del reproductor MPRIS"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Editable\n"
"del - eliminar elemento"
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr "Scripts personalizados"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr "Configuración"
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr "Nombre"
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr "Comentario"
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Valor"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Color de activo"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Color de inactivo"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Tipo"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Dirección"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Alto"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Ancho"
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"Las etiquetas para CPU, frecuencia de la CPU, memoria, swap y red soportan "
"ventanas emergentes. Para habilitarlas marca las cajas de selección "
"necesarias."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Número de valores para las ventanas emergentes"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "Fondo"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "Color de la CPU"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "Color de la frecuencia de la CPU"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Color de la memoria"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Color de la swap"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Color de la velocidad de recepción"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Color de la velocidad de envío"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "Color de la batería activa"
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr "Color de la batería inactiva"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"Puedes encontrar información detallada en el <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">sitio del proyecto</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Tu nombre"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "Tu email"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Intervalo de tiempo"
#~ msgid "Custom command"
#~ msgstr "Comando personalizado"
#~ msgid "Battery device"
#~ msgstr "Dispositivo de batería"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" por defecto"
#~ msgid "Vertical layout"
#~ msgstr "Orientación vertical"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Añadir extensión a la izquierda/superior de la distribución"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Añadir extensión a la derecha/inferior de la distribución"
#~ msgid "Form"
#~ msgstr "Formulario"
#~ msgid "Network directory"
#~ msgstr "Directorio de la red"
#~ msgid "\"/sys/class/net\" by default"
#~ msgstr "\"/sys/class/net\" por defecto"
#~ msgid "Custom command to run"
#~ msgstr "Comando personalizado para ejecutar"
#~ msgid "Time"
#~ msgstr "Hora"
#~ msgid ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgstr ""
#~ "$time - hora en el formato por defecto\n"
#~ "$isotime - hora en formato ISO\n"
#~ "$shorttime - hora en formato corto\n"
#~ "$longtime - hora en formato largo\n"
#~ "$custom - hora en formato personalizado"
#~ msgid "Uptime"
#~ msgstr "Tiempo de actividad"
#~ msgid ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgstr ""
#~ "$uptime - tiempo de actividad del sistema\n"
#~ "$custom - formato personalizado"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgstr ""
#~ "$cpu - carga total de la CPU, %\n"
#~ "$cpu0 - carga de la CPU para el núcleo 0, %\n"
#~ "...\n"
#~ "$cpu9 - carga de la CPU para el núcleo 9, %\n"
#~ "...\n"
#~ "$cpuN - carga de la CPU para el núcleo N, %"
#~ msgid "CPU Clock"
#~ msgstr "Frecuencia de la CPU"
#~ msgid ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgstr ""
#~ "$cpucl - frecuencia de la CPU promedio, MHz\n"
#~ "$cpucl0 - frecuencia de la CPU para el núcleo 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - frecuencia de la CPU para el núcleo 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - frecuencia de la CPU para el núcleo N, MHz"
#~ msgid "Temperature"
#~ msgstr "Temperatura"
#~ msgid "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgstr ""
#~ "$tempN - temperatura física en el dispositivo N (a partir de 0). Ejemplo: "
#~ "$temp0"
#~ msgid "GPU"
#~ msgstr "GPU"
#~ msgid "$gpu - gpu usage, %"
#~ msgstr "$gpu - uso de la GPU, %"
#~ msgid "GPU Temp"
#~ msgstr "Temperatura de la GPU"
#~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - temperatura física de la GPU"
#~ msgid "Memory"
#~ msgstr "Memoria"
#~ msgid ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgstr ""
#~ "$mem - uso de la RAM, %\n"
#~ "$memmb - uso de la RAM, MB\n"
#~ "$memgb - uso de la RAM, GB\n"
#~ "$memtotmb - uso total de la RAM, MB\n"
#~ "$memtotgb - uso total de la RAM, GB"
#~ msgid "Swap"
#~ msgstr "Swap"
#~ msgid ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgstr ""
#~ "$swap - uso de la swap, %\n"
#~ "$swapmb - uso de la swap, MB\n"
#~ "$swapgb - uso de la swap, GB\n"
#~ "$swaptotmb - uso total de la swap, MB\n"
#~ "$swaptotgb - uso total de la swap, GB"
#~ msgid ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgstr ""
#~ "$hddN - uso para el punto de montaje N (a partir de 0), %. Ejemplo: "
#~ "$hdd0\n"
#~ "$hddmbN - uso para el punto de montaje N (a partir de 0), MB. Ejemplo: "
#~ "$hddmb0\n"
#~ "$hddgbN - uso para el punto de montaje N (a partir de 0), GB. Ejemplo: "
#~ "$hddgb0\n"
#~ "$hddtotmbN - uso total para el punto de montaje N (a partir de 0), MB. "
#~ "Ejemplo: $hddtotmb0\n"
#~ "$hddtotgbN - uso total para el punto de montaje N (a partir de 0), GB. "
#~ "Ejemplo: $hddtotgb0"
#~ msgid "HDD speed"
#~ msgstr "Velocidad del disco duro"
#~ msgid ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgstr ""
#~ "$hddrN - velocidad de lectura del disco N (a partir de 0), KB/s. Por "
#~ "ejemplo: $hddr0\n"
#~ "$hddwN - velocidad de escritura del disco N (a partir de 0), KB/s. Por "
#~ "ejemplo: $hddw0"
#~ msgid "HDD temp"
#~ msgstr "Temperatura del disco duro"
#~ msgid ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr ""
#~ "$hddtempN - temperatura física en el dispositivo N (a partir de 0). "
#~ "Ejemplo: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Red"
#~ msgid ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgstr ""
#~ "$down - velocidad de recepción, KB/s\n"
#~ "$up - velocidad de envío, KB/s\n"
#~ "$netdev - dispositivo de red actual"
#~ msgid "Battery"
#~ msgstr "Batería"
#~ msgid ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgstr ""
#~ "$bat - carga de la batería, %\n"
#~ "$ac - estado de la alimentación"
#~ msgid ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgstr ""
#~ "$album - álbum de la canción\n"
#~ "$artist - artista de la canción\n"
#~ "$progress - progreso de la canción\n"
#~ "$time - duración de la canción\n"
#~ "$title - título de la canción"
#~ msgid "Processes"
#~ msgstr "Procesos"
#~ msgid ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgstr ""
#~ "$pscount - número de procesos en ejecución\n"
#~ "$pstotal - total de procesos en ejecución\n"
#~ "$ps - listado de procesos en ejecución separados por coma"
#~ msgid ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgstr ""
#~ "$pkgcountN - número de paquetes con actualizaciones disponibles, comando "
#~ "N. Por ejemplo $pkgcount0"
#~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr ""
#~ "$customN - obtener la salida de ejecución del comando personalizado N (a "
#~ "partir de 0). Por ejemplo: $custom0"
#~ msgid "Widget settings"
#~ msgstr "Configuración del componente"
#~ msgid "pacman -Qu"
#~ msgstr "pacman -Qu"
#~ msgid "apt-show-versions -u -b"
#~ msgstr "apt-show-versions -u -b"
#~ msgid "aptitude search '~U'"
#~ msgstr "aptitude search '~U'"
#~ msgid "yum list updates"
#~ msgstr "yum list updates"
#~ msgid "pkg_version -I -l '<'"
#~ msgstr "pkg_version -I -l '<'"
#~ msgid "urpmq --auto-select"
#~ msgstr "urpmq --auto-select"

View File

@ -0,0 +1,41 @@
#!/bin/sh
BASEDIR="../" # root of translatable sources
PROJECT="plasma_applet_awesome-widget" # project name
BUGADDR="https://github.com/arcan1s/awesome-widgets/issues" # MSGID-Bugs
WDIR=$(pwd) # working dir
echo "Preparing rc files"
cd "${BASEDIR}"
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' -o -name '*.py' | sort > "${WDIR}/rcfiles.list"
xargs --arg-file=${WDIR}/rcfiles.list extractrc > "${WDIR}/rc.cpp"
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> "${WDIR}/rc.cpp"
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> "${WDIR}/rc.cpp"
echo "Done preparing rc files"
echo "Extracting messages"
cd "${WDIR}"
cd "${BASEDIR}"
find . -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.py' | sort > "${WDIR}/infiles.list"
echo "rc.cpp" >> "${WDIR}/infiles.list"
cd "${WDIR}"
xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" --language=Python \
--files-from=infiles.list -D "${BASEDIR}" -D "${WDIR}" -o "${PROJECT}.pot" || { echo "error while calling xgettext. aborting."; exit 1; }
echo "Done extracting messages"
echo "Merging translations"
catalogs=$(find . -name '*.po')
for cat in $catalogs; do
echo $cat
msgmerge -o "$cat.new" "$cat" "${PROJECT}.pot"
mv "$cat.new" "$cat"
done
echo "Done merging translations"
echo "Cleaning up"
cd "${WDIR}"
rm -f rcfiles.list infiles.list rc.cpp
echo "Done"

View File

@ -0,0 +1,827 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
# Mermouy <mermouy@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:20+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: French <kde-russian@lists.kde.ru>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "Lancer ksysguard"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "Voir le README"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "Mettre à jour le texte"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr ""
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr ""
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr ""
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr ""
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr ""
#: configuration.cpp:307
msgid "Tag: %1"
msgstr ""
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr ""
#: configuration.cpp:382
msgid "Name: %1"
msgstr ""
#: configuration.cpp:384
msgid "Exec: %1"
msgstr ""
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "Gestionnaire de paquets"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "Nombre d'éléments pour les conseils"
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr ""
#: configuration.cpp:430
msgid "Links:"
msgstr ""
#: configuration.cpp:431
msgid "Homepage"
msgstr ""
#: configuration.cpp:432
msgid "Repository"
msgstr ""
#: configuration.cpp:433
msgid "Bugtracker"
msgstr ""
#: configuration.cpp:434
msgid "Translation issue"
msgstr ""
#: configuration.cpp:435
msgid "AUR packages"
msgstr ""
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr ""
#: configuration.cpp:445
msgid "Translators: %1"
msgstr ""
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr ""
#: configuration.cpp:448
msgid "Widget"
msgstr "Widget"
#: configuration.cpp:449
msgid "Advanced"
msgstr "Avancé"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "Conseil"
#: configuration.cpp:451
msgid "Appearance"
msgstr "Apparence"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "Moteur de données"
#: configuration.cpp:453
msgid "About"
msgstr ""
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr ""
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr ""
#: configuration.cpp:793 configuration.cpp:819
#, fuzzy
msgid "Edit"
msgstr "Modifiable"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr ""
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "Supprimer"
#: configuration.cpp:1037
msgid "Select font"
msgstr ""
#: graphicalitem.cpp:442
#, fuzzy
msgid "Select color"
msgstr "Couleur de la police"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "Popup lors d'un click souris"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr ""
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "Format de l'heure personnalisé"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - Jour de la semaine long\n"
"$ddd - Jour de la semaine court\n"
"$dd - jour\n"
"$d - jour sans zéro\n"
"$MMMM - mois long\n"
"$MMM - mois court\n"
"$MM - mois\n"
"$M - mois sans zéro\n"
"$yyyy - année\n"
"$yy - année courte\n"
"$hh - heures (24 uniquement)\n"
"$h - heures sans zéro (24 uniquement)\n"
"$mm - minutes\n"
"$m - minutes sans zéro\n"
"$ss - secondes\n"
"$s - secondes sans zéro"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "Temps de fonctionnement personalisé"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - temps de fonctionnement en jours\n"
"$d - temps de fonctionnement en jours sans zéro\n"
"$hh - temps de fonctionnement en heures\n"
"$h - temps de fonctionnement en heures sans zéro\n"
"$mm - temps de fonctionnement en minutes\n"
"$m - temps de fonctionnement en minutes sans zéro"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "Unités de température"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "Temperature des périphériques"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "Modifiable"
#: po/rc.cpp:50 rc.cpp:50
#, fuzzy
msgid "Fan devices"
msgstr "Périphérique d'alimentation"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "Points de montage"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "Périphériques HDD (la vitesse)"
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "Périphériques HDD (température)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr ""
"Désactiver la sélection automatique de périphériques et le sélectionner "
"manuellement"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "Sélectionner le périphérique réseau"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "Tag alimentation branchée"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "Ligne qui est renvoyée lorsque l'alimentation est branchée"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "Tag alimentation débranchée"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "Ligne, qui est renvoyée lorsque l'alimentation est débranchée"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr ""
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Ajouter"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Intervalle"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Police"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Taille de la police"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Couleur de la police"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Style de la police"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Épaisseur de la police"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "Commande de température HDD"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Périphérique graphique"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "Disque dur"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Lecteur audio"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Port MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "Adresse MPD"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr ""
#: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" par défaut"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr ""
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr ""
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Modifiable\n"
"del - supprimer un élément"
#: po/rc.cpp:159 rc.cpp:159
#, fuzzy
msgid "Custom scripts"
msgstr "Personnalisé"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr ""
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr ""
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr ""
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr ""
#: po/rc.cpp:177 rc.cpp:177
#, fuzzy
msgid "Active color"
msgstr "Batterie"
#: po/rc.cpp:180 rc.cpp:180
#, fuzzy
msgid "Inactive color"
msgstr "Batterie"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr ""
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr ""
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr ""
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr ""
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"CPU, horloge du CPU, mémoire vive, mémoire swap et noms réseau supportent "
"les conseils visuels. Pour les activer cochez simplement les cases "
"correspondantes."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Nombre d'éléments pour les conseils"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr ""
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "Couleur processeur"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "Couleur de l'horloge processeur"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Couleur de la mémoire"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Couleur de la mémoire d'échange"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Couleur de la vitesse de téléchargement"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Couleur du téléversement"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr ""
#: po/rc.cpp:225 rc.cpp:225
#, fuzzy
msgid "Battery inactive color"
msgstr "Batterie"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"D'avantage d'informations se trouvent sur <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">la page du projet</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "esalexeev@gmail.com"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Intervalle"
#~ msgid "Custom command"
#~ msgstr "Commande personnalisée"
#~ msgid "Battery device"
#~ msgstr "Batterie"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" par défaut"
#~ msgid "Vertical layout"
#~ msgstr "Positionnement vertical"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Étirer le positionnement vers haut/gauche"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Étirer le positionnement vers bas/droite"
#~ msgid "Form"
#~ msgstr "Entrées"
#~ msgid "Network directory"
#~ msgstr "Voisinage réseau"
#~ msgid "\"/sys/class/net\" by default"
#~ msgstr "\"/sys/class/net\" par défaut"
#~ msgid "Custom command to run"
#~ msgstr "Commande personnalisée à exécuter"
#~ msgid "Time"
#~ msgstr "Durée"
#~ msgid ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgstr ""
#~ "$time - l'heure au format par défaut\n"
#~ "$isotime - l'heure au format ISO\n"
#~ "$shorttime - l'heure format court\n"
#~ "$longtime - l'heure au format log\n"
#~ "$custom - l'heure, format personnalisé"
#~ msgid "Uptime"
#~ msgstr "temps de fonctionnement"
#~ msgid ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgstr ""
#~ "$uptime - temps de fonctionnement\n"
#~ "$custom - format personnalisé"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgstr ""
#~ "$cpu - charge totale du processeur, %\n"
#~ "$cpu0 - charge du processeur pour le coeur 0, %\n"
#~ "...\n"
#~ "$cpuN - charge processeur pour le coeur N, %"
#~ msgid "CPU Clock"
#~ msgstr "Horloge processeur"
#~ msgid ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgstr ""
#~ "$cpucl - Moyenne de l'horloge du processeur, MHz\n"
#~ "$cpucl0 - Horloge du coeur 0, MHz\n"
#~ "...\n"
#~ "$cpuclN - Horloge du coeur N, MHz"
#~ msgid "Temperature"
#~ msgstr "Température"
#~ msgid "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgstr ""
#~ "$tempN - Température physique du périphérique N (à partir de 0). Exemple: "
#~ "$temp0"
#~ msgid "GPU"
#~ msgstr "Processeur graphique"
#~ msgid "$gpu - gpu usage, %"
#~ msgstr "$gpu - utilisation du processeur graphique, %"
#~ msgid "GPU Temp"
#~ msgstr "Temp du processeur graphique"
#~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - Température physique du processeur graphique"
#~ msgid "Memory"
#~ msgstr "Mémoire"
#~ msgid ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgstr ""
#~ "$mem - utilisation de la RAM, %\n"
#~ "$memmb - utilisation de la RAM, MB\n"
#~ "$memgb - utilisation de la RAM, GB\n"
#~ "$memtotmb - RAM, MB\n"
#~ "$memtotgb - RAM, GB"
#~ msgid "Swap"
#~ msgstr "mémoire d'échange (swap)"
#~ msgid ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgstr ""
#~ "$swap - utilisation swap, %\n"
#~ "$swapmb - utilisation swap, MB\n"
#~ "$swapgb - utilisation swap, MB\n"
#~ "$swaptotmb - swap, MB\n"
#~ "$swaptotgb - swap, GB"
#~ msgid ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgstr ""
#~ "$hddN - utilisation du point de montage N (à partir de 0), %. Exemple: "
#~ "$hdd0\n"
#~ "$hddmbN - utilisation du point de montage N (à partir de 0), MB. Exemple: "
#~ "$hddmb0\n"
#~ "$hddgbN - utilisation du point de montage N (à partir de 0), GB. Exemple: "
#~ "$hddgb0\n"
#~ "$hddtotmbN - taille totale de point de montage N (à partir de 0), MB. "
#~ "Exemple: $hddtotmb0\n"
#~ "$hddtotgbN - taille totale de point de montage N (à partir de 0), GB. "
#~ "Exemple: $hddtotgb0"
#~ msgid "HDD speed"
#~ msgstr "Vitesse HDD"
#~ msgid ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgstr ""
#~ "$hddrN - vitesse de lecture HDD N (à partir de 0), KB/s. Exemple: $hddr0\n"
#~ "$hddwN - vitesse d'écriture HDD N (à partir de 0), KB/s. Exemple: $hddw0"
#~ msgid "HDD temp"
#~ msgstr "Température HDD"
#~ msgid ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr ""
#~ "$hddtempN - température physique du périphérique N (à partir de 0). "
#~ "Exemple: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Réseau"
#~ msgid ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgstr ""
#~ "$down - vitesse de téléchargement, KB/s\n"
#~ "$up - vitesse ascendante, KB/s\n"
#~ "$netdev - périphérique réseau actuel"
#~ msgid "Battery"
#~ msgstr "Batterie"
#~ msgid ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgstr ""
#~ "$bat - charge de la batterie, %\n"
#~ "$ac - état de l'alimentation"
#~ msgid ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgstr ""
#~ "$album - album du morceau\n"
#~ "$artist - artiste du morceau\n"
#~ "$progress - avancement du morceau\n"
#~ "$time - durée du morceau\n"
#~ "$title - titre du morceau"
#~ msgid "Processes"
#~ msgstr "Processus"
#~ msgid ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgstr ""
#~ "$pscount - nombre de processus actifs\n"
#~ "$pstotal - nombre total de processus actifs\n"
#~ "$ps - liste des processus actifs séparés par une virgule"
#~ msgid ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgstr ""
#~ "$pkgcountN - nombre de paquets à mettre à jour, commande N. Par exemple "
#~ "$pkgcount0"
#~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr ""
#~ "$customN - sortie d'une commande personnelle N (à partir de 0). Exemple: "
#~ "$custom0"
#~ msgid "Widget settings"
#~ msgstr "Paramètres de l'applet"
#~ msgid "pacman -Qu"
#~ msgstr "pacman -Qu"
#~ msgid "apt-show-versions -u -b"
#~ msgstr "apt-show-versions -u -b"
#~ msgid "aptitude search '~U'"
#~ msgstr "aptitude search '~U'"
#~ msgid "yum list updates"
#~ msgstr "yum list updates"
#~ msgid "pkg_version -I -l '<'"
#~ msgstr "pkg_version -I -l '<'"
#~ msgid "urpmq --auto-select"
#~ msgstr "urpmq --auto-select"
#~ msgid "$hddN - usage for mount point N (from 0), %. Example: $hdd0"
#~ msgstr ""
#~ "$hddN - espace occupé sur le point de montage N (à partir de 0), %. "
#~ "Exemple: $hdd0"
#~ msgid "amarok"
#~ msgstr "amarok"
#~ msgid "mpd"
#~ msgstr "mpd"
#~ msgid "qmmp"
#~ msgstr "qmmp"
#~ msgid "auto"
#~ msgstr "auto"
#~ msgid "nvidia"
#~ msgstr "nvidia"
#~ msgid "ati"
#~ msgstr "ati"
#~ msgid ""
#~ "$ds - uptime days\n"
#~ "$hs - uptime hours\n"
#~ "$ms - uptime minutes"
#~ msgstr ""
#~ "$ds - uptime days\n"
#~ "$hs - uptime hours\n"
#~ "$ms - uptime minutes"
#~ msgid ""
#~ "Command to run, example:\n"
#~ "wget -qO- http://ifconfig.me/ip - get external IP"
#~ msgstr ""
#~ "Command to run, example:\n"
#~ "wget -qO- http://ifconfig.me/ip - get external IP"
#~ msgid "@@/;@@ - mount point usage, %"
#~ msgstr "@@/;@@ - mount point usage, %"
#~ msgid "@@/dev/sda@@ - physical temperature on /dev/sda"
#~ msgstr "@@/dev/sda@@ - physical temperature on /dev/sda"
#~ msgid ""
#~ "$net - network speed, down/up, KB/s\n"
#~ "$netdev - current network device\n"
#~ "@@eth0@@ - disable auto select device and set specified device"
#~ msgstr ""
#~ "$net - network speed, down/up, KB/s\n"
#~ "$netdev - current network device\n"
#~ "@@eth0@@ - disable auto select device and set specified device"

View File

@ -0,0 +1,469 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr ""
#: awesome-widget.cpp:98
msgid "Show README"
msgstr ""
#: awesome-widget.cpp:101
msgid "Update text"
msgstr ""
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr ""
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr ""
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr ""
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr ""
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr ""
#: configuration.cpp:307
msgid "Tag: %1"
msgstr ""
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr ""
#: configuration.cpp:382
msgid "Name: %1"
msgstr ""
#: configuration.cpp:384
msgid "Exec: %1"
msgstr ""
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr ""
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr ""
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr ""
#: configuration.cpp:430
msgid "Links:"
msgstr ""
#: configuration.cpp:431
msgid "Homepage"
msgstr ""
#: configuration.cpp:432
msgid "Repository"
msgstr ""
#: configuration.cpp:433
msgid "Bugtracker"
msgstr ""
#: configuration.cpp:434
msgid "Translation issue"
msgstr ""
#: configuration.cpp:435
msgid "AUR packages"
msgstr ""
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr ""
#: configuration.cpp:445
msgid "Translators: %1"
msgstr ""
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr ""
#: configuration.cpp:448
msgid "Widget"
msgstr ""
#: configuration.cpp:449
msgid "Advanced"
msgstr ""
#: configuration.cpp:450
msgid "Tooltip"
msgstr ""
#: configuration.cpp:451
msgid "Appearance"
msgstr ""
#: configuration.cpp:452
msgid "DataEngine"
msgstr ""
#: configuration.cpp:453
msgid "About"
msgstr ""
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr ""
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr ""
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr ""
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr ""
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr ""
#: configuration.cpp:1037
msgid "Select font"
msgstr ""
#: graphicalitem.cpp:442
msgid "Select color"
msgstr ""
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr ""
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr ""
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr ""
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr ""
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr ""
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr ""
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr ""
#: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr ""
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr ""
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr ""
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr ""
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr ""
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr ""
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr ""
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr ""
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr ""
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr ""
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr ""
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr ""
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr ""
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr ""
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr ""
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr ""
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr ""
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr ""
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr ""
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr ""
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr ""
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr ""
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr ""
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr ""
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr ""
#: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr ""
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr ""
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr ""
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr ""
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr ""
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr ""
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr ""
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr ""
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr ""
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr ""
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr ""
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr ""
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr ""
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr ""
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr ""
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr ""
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr ""
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr ""
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr ""
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr ""
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr ""
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr ""
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr ""
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr ""
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr ""
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr ""
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr ""
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr ""
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr ""

View File

@ -0,0 +1,757 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-12-24 00:04+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Brazilian Portuguese <kde-russian@lists.kde.ru>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 1.5\n"
"X-Language: pt_BR\n"
"X-Source-Language: en\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "Abrir ksysguard"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "Mostrar README"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "Atualizar texto"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr "Checar por atualizações"
#: awesome-widget.cpp:491
#, qt-format
msgid "Current version : %1"
msgstr "Versão atual: %1"
#: awesome-widget.cpp:492
#, qt-format
msgid "New version : %1"
msgstr "Nova versão: %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Clique \"Ok\" para baixar"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Há atualizações disponíveis"
#: configuration.cpp:307
#, qt-format
msgid "Tag: %1"
msgstr "Tag: %1"
#: configuration.cpp:308 configuration.cpp:383
#, qt-format
msgid "Comment: %1"
msgstr "Comentário: %1"
#: configuration.cpp:382
#, qt-format
msgid "Name: %1"
msgstr "Nome: %1"
#: configuration.cpp:384
#, qt-format
msgid "Exec: %1"
msgstr "Exec: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "Gerenciador de pacotes"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "Linhas nulas"
#: configuration.cpp:428
#, qt-format
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Versão: %1\n"
"(data de compilação %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Um conjunto de widgets plasmoid minimalistas."
#: configuration.cpp:430
msgid "Links:"
msgstr "Links:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Homepage"
#: configuration.cpp:432
msgid "Repository"
msgstr "Repositório"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Bugtracker"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Problema na tradução"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Pacotes AUR"
#: configuration.cpp:437
#, qt-format
msgid "This software is licensed under %1"
msgstr "Este software é licenciado sob %1"
#: configuration.cpp:445
#, qt-format
msgid "Translators: %1"
msgstr "Tradutores: %1"
#: configuration.cpp:446
#, qt-format
msgid "This software uses: %1"
msgstr "Este software usa: %1"
#: configuration.cpp:448
msgid "Widget"
msgstr "Widget"
#: configuration.cpp:449
msgid "Advanced"
msgstr "Avançado"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "Dica de contexto"
#: configuration.cpp:451
msgid "Appearance"
msgstr "Aparência"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "Engine de dados"
#: configuration.cpp:453
msgid "About"
msgstr "Sobre"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Digite o nome de arquivo"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Nome de arquivo"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Editar"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Copiar"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "Remover"
#: configuration.cpp:1037
msgid "Select font"
msgstr "Selecionar fonte"
#: graphicalitem.cpp:442
msgid "Select color"
msgstr "Selecionar cor"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "Ativar popup no clique do mouse"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Ativar plano de fundo"
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "Formato de hora personalizado"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - dia da semana completo\n"
"$ddd - dia da semana curto\n"
"$dd - dia\n"
"$d - dia com zero\n"
"$MMMM - mês completo\n"
"$MMM - mês curto\n"
"$MM - mês\n"
"$M - mês com zero\n"
"$hh - horas (somente 24)\n"
"$h - horas sem zeros (somente 24)\n"
"$mm - minutos\n"
"$m - minutos sem zeros\n"
"$ss - segundos\n"
"$s segundos sem zeros"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "Tempo em atividade com formato personalizado"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - tempo em atividade em dias\n"
"$d - tempo em atividade em dias sem zeros\n"
"$hh - tempo em atividade em horas\n"
"$h - tempo em atividade em horas sem zeros\n"
"$mm - tempo em atividade em minutos\n"
"$m - tempo em atividade em minuto sem zeros"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "Unidades de temperatura"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "Dispositivos de temperatura"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "Editável"
#: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Dispositivos de ventilação"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "Pontos de montagem"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "Dispositivos HDD (velocidade) "
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "Dispositivos HDD (temperatura)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr ""
"Desativar auto seleção de dispositivos e escolher um dispositivo específico"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "Escolher dispositivo de rede"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "Rótulo com carregador conectado"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "Linha, que aparece quando o carregador está conectado"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "Rótulo com carregador desconectado"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "Linha, que aparece quando o carregador está offline"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Barras"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Adicionar"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Intervalo de tempo"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Tamanho da fonte"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Tamanho da fonte"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Cor da fonte"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Estilo da fonte"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Grossura da fonte"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "comando hddtemp "
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Dispositivo GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Reprodutor de áudio"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Porta do MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "Endereço do MPD"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr "Caminho ACPI"
#: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" por padrão"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>NOTA:</> Interface do player DBus deverá ser uma ativa"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "Nome do player MPRIS"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Editável\n"
"del - remover item"
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr "Scripts customizados"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr "Configuração"
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr "NOme"
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr "Comentário"
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Valor"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Cor ativa"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Cor inativa"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Tipo"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Direção"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Altura"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Largura"
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"Os rótulos de CPU, frequência de GPU, memória, swap e rede suportam dica de "
"contexto gráfica. Para ativá-los, basta selecionar a caixa necessária."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Número de valores para dicas de contexto"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "Plano de fundo"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "Cor da CPU"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "Cor do relógio da CPU"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Cor da memória"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Cor da swap"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Cor da velocidade de download"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Cor da velocidade de upload"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "Cor da bateria ativa"
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr "Cor da bateria inativa"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a "
"href=\"http://arcanis.name/projects/awesome-widgets/\">project homepage</a>"
msgstr ""
"Informações detalhadas podem ser encontradas na <a "
"href=\"http://arcanis.name/projects/awesome-widgets/\">página do projeto</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "under"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "under@insicuri.net"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Intervalo de tempo"
#~ msgid "Custom command"
#~ msgstr "Comando personalizado"
#~ msgid "Battery device"
#~ msgstr "Dispositivo do carregador"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" por padrão"
#~ msgid "Vertical layout"
#~ msgstr "Layout vertical"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Adicionar esticamento à esquerda/topo do layout"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Adicionar esticamento à direita/inferior do layout"
#~ msgid "Form"
#~ msgstr "Forma"
#~ msgid "Network directory"
#~ msgstr "Diretório de rede"
#~ msgid "\"/sys/class/net\" by default"
#~ msgstr "\"/sys/class/power_supply/AC/online\" por padrão"
#~ msgid "Custom command to run"
#~ msgstr "Comando personalizado para usar"
#~ msgid "Time"
#~ msgstr "Hora"
#~ msgid ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgstr ""
#~ "$time - hora no formato padrão\n"
#~ "$isotime - hora no formato ISO\n"
#~ "$shorttime - hora em formato curto \n"
#~ "$longtime - hora em formato completo\n"
#~ "$custom - hora em formato personalizado"
#~ msgid "Uptime"
#~ msgstr "Tempo em atividade"
#~ msgid ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgstr ""
#~ "$uptime - tempo em atividade do sistema\n"
#~ "$custom - formato personalizado "
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgstr ""
#~ "$cpu - carga total da CPU, %\n"
#~ "$cpu0 - carga total para o núcleo 0 da CPU, %\n"
#~ "...\n"
#~ "$cpu9 - carga total para o núcleo 9 da CPU, %\n"
#~ "...\n"
#~ "$cpuN - carga total para o núcleo N da CPU, %"
#~ msgid "CPU Clock"
#~ msgstr "Frequência da CPU "
#~ msgid ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgstr ""
#~ "$cpucl - frequência média da CPU, MHz\n"
#~ "$cpucl0 - frequência da CPU para o núcleo 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - frequência da CPU para o núcleo 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - frequência da CPU para o núcleo N, MHz"
#~ msgid "Temperature"
#~ msgstr "Temperatura "
#~ msgid "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgstr ""
#~ "$hddtempN - temperatura física no dispositivo N (começando por 0). "
#~ "Exemplo: $hddtemp0"
#~ msgid "GPU"
#~ msgstr "GPU"
#~ msgid "$gpu - gpu usage, %"
#~ msgstr "$gpu - uso da GPU, %"
#~ msgid "GPU Temp"
#~ msgstr "Temperatura da GPU"
#~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - temperatura física da GPU"
#~ msgid "Memory"
#~ msgstr "Memória"
#~ msgid ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgstr ""
#~ "$mem - uso de RAM, %\n"
#~ "$memmb - uso de RAM, MB\n"
#~ "$memgb - uso de RAM, GB\n"
#~ "$memtotmb - RAM total, MB\n"
#~ "$memtotgb - RAM total, GB"
#~ msgid "Swap"
#~ msgstr "Swap"
#~ msgid ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgstr ""
#~ "$swap - uso de swap, %\n"
#~ "$swapmb - uso de swap, MB\n"
#~ "$swapgb - uso de swap, GB\n"
#~ "$swaptotmb - swap total, MB\n"
#~ "$swaptotgb - swap total, GB"
#~ msgid ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgstr ""
#~ "$hddN - uso do ponto de montagem N (começando por 0), %. Exemplo: $hdd0\n"
#~ "$hddmbN - uso do ponto de montagem N (começando por 0), MB. Exemplo: "
#~ "$hddmb0\n"
#~ "$hddgbN - uso do ponto de montagem N (começando por 0), GB. Exemplo: "
#~ "$hddgbN0\n"
#~ "$hddtotmbN - tamanho total do ponto de montagem N (começando por 0), MB. "
#~ "Exemplo: $hddtotmbN\n"
#~ "$hddtotgbN - tamanho total do ponto de montagem N (começando por 0), GB. "
#~ "Exemplo: $hddtogbN"
#~ msgid "HDD speed"
#~ msgstr "Velocidade do HDD"
#~ msgid ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgstr ""
#~ "$hddrN - velocidade de leitura do HDD (começando por 0), KB/s. Exemplo: "
#~ "$hddr0\n"
#~ "$hddwN - velocidade de escrita do HDD (começando por 0), Kb/s. Exemplo: "
#~ "$hddw0"
#~ msgid "HDD temp"
#~ msgstr "Temperatura do HDD "
#~ msgid ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr ""
#~ "$hddtempN - temperatura física no dispositivo N (começando por 0). "
#~ "Exemplo: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Rede"
#~ msgid ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgstr ""
#~ "$down - velocidade de download, KB/s\n"
#~ "$up - velocidade de upload, KB/s\n"
#~ "$netdev - dispositivo de rede atual"
#~ msgid "Battery"
#~ msgstr "Bateria"
#~ msgid ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgstr ""
#~ "bateria - carga da bateria, %\n"
#~ "$ac - status do carregador"
#~ msgid ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgstr ""
#~ "$album - album da música\n"
#~ "$artist - artista da música\n"
#~ "$progress - progresso da música\n"
#~ "$time - duração da música\n"
#~ "$title - título da música"
#~ msgid "Processes"
#~ msgstr "Processos "
#~ msgid ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgstr ""
#~ "$pscount - número de processos rodando\n"
#~ "$pstotal - número total de processos rodando\n"
#~ "$ps - lista dos processos rodando separados por vírgula"
#~ msgid ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgstr ""
#~ "$pkgcountN - número de pacotes disponíveis para atualizar, comando N. Por "
#~ "exemplo $pkgcount0"
#~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr ""
#~ "$customN - leia a saída de um comando personalizado N (a partir de N). "
#~ "Exemplo: `$custom0`"

View File

@ -0,0 +1,835 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-11-21 05:12+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "Запустить ksysguard"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "Показать README"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "Обновить текст"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr "Проверить обновления"
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Текущая версия : %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "Новая версия : %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Нажмите \"Ok\" для загрузки"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Найдены обновления"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Тег: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Комментарий: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Имя: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Команда: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "Пакетный менеджер"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "Число пустых линий"
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Версия %1\n"
"(дата сборки %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Коллекция минималистичных плазмоидов"
#: configuration.cpp:430
msgid "Links:"
msgstr "Ссылки:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Домашняя страница"
#: configuration.cpp:432
msgid "Repository"
msgstr "Репозиторий"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Баг-трекер"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Тикет перевода"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Пакеты в AUR"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "Данное приложение лицензировано под %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Переводчики: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "Данное приложение использует: %1"
#: configuration.cpp:448
msgid "Widget"
msgstr "Виджет"
#: configuration.cpp:449
msgid "Advanced"
msgstr "Расширенные"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "Тултип"
#: configuration.cpp:451
msgid "Appearance"
msgstr "Внешний вид"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "DataEngine"
#: configuration.cpp:453
msgid "About"
msgstr "О программе"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Введите имя файла"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Имя файла"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Править"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Копировать"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "Удалить"
#: configuration.cpp:1037
msgid "Select font"
msgstr "Выберете шрифт"
#: graphicalitem.cpp:442
msgid "Select color"
msgstr "Выберете цвет"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "Включить сообщения по клику мыши"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Включить фон"
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "Свой формат времени"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - день недели (длинный)\n"
"$ddd - день недели (короткий)\n"
"$dd - день\n"
"$d - день без 0\n"
"$MMMM - месяц (длинный)\n"
"$MMM - месяц (короткий)\n"
"$MM - месяц\n"
"$M - месяц без 0\n"
"$yyyy - год\n"
"$yy - год (короткий)\n"
"$hh - часы (24)\n"
"$h - часы без 0 (24)\n"
"$mm - минуты\n"
"$m - минуты без 0\n"
"$ss - секунды\n"
"$s - секунды без 0"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "Свой формат аптайма"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - дни аптайма\n"
"$d - дни аптайма без нулей\n"
"$hh - часы аптайма\n"
"$h - часы аптайма без нулей\n"
"$mm - минуты аптайма\n"
"$m - минуты аптайма без нулей"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "Температурные единицы"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "Температурные устройства"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "Редактируемо"
#: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Кулеры"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "Точки монтирования"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "HDD (скорость)"
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "HDD (температура)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr "Отключить автовыбор устройства и использовать указанное"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "Выберете сетевое устройство"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "AC подключен"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "Строка, возвращаемая при подключенном адаптере питания"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "AC отключен"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "Строка, возвращаемая при отключенном адаптере питания"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Бары"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Добавить"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Интервал обновления"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Шрифт"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Размер шрифта"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Цвет шрифта"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Стиль шрифта"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Ширина шрифта"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "Команда hddtemp"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Устройство GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Музыкальный плеер"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Порт сервера MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "Адрес сервера MPD"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr "Пусть к ACPI"
#: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/\" по умолчанию"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>ВНИМАНИЕ:</b> DBus интерфейс плеера должен быть активен"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "Имя плеера в MPRIS"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Редактируемо\n"
"del - удалить строку"
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr "Свои скрипты"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr "Настройка"
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr "Имя"
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr "Комментарий"
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Значение"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Активный цвет"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Неактивный цвет"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Тип"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Направление"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Высота"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Ширина"
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"Поля \"CPU\", \"Частота CPU\", \"Память\", \"Swap\", \"Сеть\" поддерживают "
"графический тултип. Чтобы включить его, просто сделайте требуемые чекбоксы "
"полностью чекнутыми."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Число хранящихся значений"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "Фон"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "Цвет CPU"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "Цвет частоты CPU"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Цвет памяти"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Цвет swap"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Цвет скорости загрузки"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Цвет скорости отдачи"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "Цвет заряжаемой батареи"
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr "Цвет разряжаемой батареи"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"Подробная информация может быть найдена на <a href=\"http://arcanis.name/ru/"
"projects/awesome-widgets/\">домашней странице проекта</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "esalexeev@gmail.com"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Интервал обновления"
#~ msgid "Desktop check cmd"
#~ msgstr "Команда для проверки рабочего стола"
#~ msgid "Custom command"
#~ msgstr "Своя команда"
#~ msgid "Battery device"
#~ msgstr "Устройство батареи"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" по умолчанию"
#~ msgid "Vertical layout"
#~ msgstr "Вертикальная разметка"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Добавить пустое место слева/вверху виджета"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Добавить пустое место справа/внизу виджета"
#~ msgid "Advanced configuration"
#~ msgstr "Расширенная настройка"
#~ msgid "Appearance configuration"
#~ msgstr "Настройка внешнего вида"
#~ msgid "Tooltip configuration"
#~ msgstr "Настройка тултипа"
#~ msgid "Widget configuration"
#~ msgstr "Настройка виджета"
#~ msgid "Form"
#~ msgstr "Form"
#~ msgid "Network directory"
#~ msgstr "Путь к интерфейсам"
#~ msgid "\"/sys/class/net\" by default"
#~ msgstr "\"/sys/class/net\" по умолчанию"
#~ msgid "Custom command to run"
#~ msgstr "Своя команда для запуска"
#~ msgid "Time"
#~ msgstr "Время"
#~ msgid ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgstr ""
#~ "$time - время в стандартном формате\n"
#~ "$isotime - время в ISO формате\n"
#~ "$shorttime - время в коротком формате\n"
#~ "$longtime - время в длинном формате\n"
#~ "$custom - свой формат времени"
#~ msgid "Uptime"
#~ msgstr "Время работы"
#~ msgid ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgstr ""
#~ "$uptime - время работы\n"
#~ "$custom - свой формат"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgstr ""
#~ "$cpu - общая загрузка CPU, %\n"
#~ "$cpu0 - загрузка CPU для ядра 0, %\n"
#~ "...\n"
#~ "$cpu9 - загрузка CPU для ядра 9, %\n"
#~ "...\n"
#~ "$cpuN - загрузка CPU для ядра N, %"
#~ msgid "CPU Clock"
#~ msgstr "Частота CPU"
#~ msgid ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgstr ""
#~ "$cpucl - средняя частота CPU, MHz\n"
#~ "$cpucl0 - частота CPU для ядра 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - частота CPU для ядра 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - частота CPU для ядра N, MHz"
#~ msgid "Temperature"
#~ msgstr "Температура"
#~ msgid "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgstr ""
#~ "$tempN - физическая температура на устройстве N (от 0). Пример: $temp0"
#~ msgid "GPU"
#~ msgstr "GPU"
#~ msgid "$gpu - gpu usage, %"
#~ msgstr "$gpu - использование GPU, %"
#~ msgid "GPU Temp"
#~ msgstr "Температура GPU"
#~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - физическая температура на GPU"
#~ msgid "Memory"
#~ msgstr "Память"
#~ msgid ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgstr ""
#~ "$mem - использование RAM, %\n"
#~ "$memmb - использование RAM, MB\n"
#~ "$memgb - использование RAM, GB\n"
#~ "$memtotmb - RAM, MB\n"
#~ "$memtotgb - RAM, GB"
#~ msgid "Swap"
#~ msgstr "Swap"
#~ msgid ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgstr ""
#~ "$swap - использование swap, %\n"
#~ "$swapmb - использование swap, MB\n"
#~ "$swapgb - использование swap, GB\n"
#~ "$swaptotmb - swap, MB\n"
#~ "$swaptotgb - swap, GB"
#~ msgid ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgstr ""
#~ "$hddN - использование точки монтирования N (от 0), %. Пример: $hdd0\n"
#~ "$hddmbN - использование точки монтирования N (от 0), MB. Пример: $hddmb0\n"
#~ "$hddgbN - использование точки монтирования N (от 0), GB. Пример: $hddgb0\n"
#~ "$hddtotmbN - размер точки монтирования N (от 0), MB. Пример: $hddtotmb0\n"
#~ "$hddtotgbN - размер точки монтирования N (от 0), GB. Пример: $hddtotgb0"
#~ msgid "HDD speed"
#~ msgstr "Скорость HDD"
#~ msgid ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgstr ""
#~ "$hddrN - скорость записи на HDD N (от 0), KB/s. Например: $hddr0\n"
#~ "$hddwN - скорость чтения с HDD N (от 0), KB/s. Например: $hddw0"
#~ msgid "HDD temp"
#~ msgstr "Температура HDD"
#~ msgid ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr "$hddtempN - температура на устройстве N (от 0). Пример: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Сеть"
#~ msgid ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgstr ""
#~ "$down - скорость скачки, KB/s\n"
#~ "$up - скорость загрузки, KB/s\n"
#~ "$netdev - текущее устройство"
#~ msgid "Battery"
#~ msgstr "Батарея"
#~ msgid ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgstr ""
#~ "$bat - заряд батареи, %\n"
#~ "$ac - статус адаптера питания"
#~ msgid ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgstr ""
#~ "$album - альбом\n"
#~ "$artist - исполнитель\n"
#~ "$progress - прогресс\n"
#~ "$time - продолжительность\n"
#~ "$title - название"
#~ msgid "Processes"
#~ msgstr "Процессы"
#~ msgid ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgstr ""
#~ "$pscount - число запущенных процессов\n"
#~ "$pstotal - общее число процессов\n"
#~ "$ps - список запущенных процессов, разделенных запятыми"
#~ msgid ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgstr ""
#~ "$pkgcountN - число пакетов, которые доступны для обновления, для команды "
#~ "N. Например, $pkgcount0"
#~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr ""
#~ "$customN - получить информацию из своей команды N. Например $custom0"
#~ msgid ""
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$name - имя рабочего стола\n"
#~ "$number - номер рабочего стола\n"
#~ "$total - общее число рабочих столов"
#~ msgid "Widget settings"
#~ msgstr "Настройки виджета"
#~ msgid "pacman -Qu"
#~ msgstr "pacman -Qu"
#~ msgid "apt-show-versions -u -b"
#~ msgstr "apt-show-versions -u -b"
#~ msgid "aptitude search '~U'"
#~ msgstr "aptitude search '~U'"
#~ msgid "yum list updates"
#~ msgstr "yum list updates"
#~ msgid "pkg_version -I -l '<'"
#~ msgstr "pkg_version -I -l '<'"
#~ msgid "urpmq --auto-select"
#~ msgstr "urpmq --auto-select"
#~ msgid "amarok"
#~ msgstr "amarok"
#~ msgid "mpd"
#~ msgstr "mpd"
#~ msgid "qmmp"
#~ msgstr "qmmp"
#~ msgid "auto"
#~ msgstr "auto"
#~ msgid "nvidia"
#~ msgstr "nvidia"
#~ msgid "ati"
#~ msgstr "ati"
#~ msgid "$hddN - usage for mount point N (from 0), %. Example: $hdd0"
#~ msgstr "$hddN - использование точки монтирования N (от 0), %. Пример: $hdd0"
#~ msgid ""
#~ "$ds - uptime days\n"
#~ "$hs - uptime hours\n"
#~ "$ms - uptime minutes"
#~ msgstr ""
#~ "$ds - дни работы\n"
#~ "$hs - часы\n"
#~ "$ms - минуты"
#~ msgid ""
#~ "Command to run, example:\n"
#~ "wget -qO- http://ifconfig.me/ip - get external IP"
#~ msgstr ""
#~ "Команда для запуска, например:\n"
#~ "wget -qO- http://ifconfig.me/ip - получить внешний IP"
#~ msgid "@@/;@@ - mount point usage, %"
#~ msgstr "@@/;@@ - использование точки монтирования, %"
#~ msgid "@@/dev/sda@@ - physical temperature on /dev/sda"
#~ msgstr "@@/dev/sda@@ - физическая температура /dev/sda"
#~ msgid ""
#~ "$net - network speed, down/up, KB/s\n"
#~ "$netdev - current network device\n"
#~ "@@eth0@@ - disable auto select device and set specified device"
#~ msgstr ""
#~ "$net - скорость передачи данных, down/up, KB/s\n"
#~ "$netdev - используемое устройство\n"
#~ "@@eth0@@ - отключить автовыбор устройства и установить указанное"

View File

@ -0,0 +1,746 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:22+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n"
"Language: ua\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "Запустити ksysguard"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "Показати README"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "Оновити текст"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr "Шукати оновлення"
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Поточна версія : %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "Нова версія : %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Натисніть \"Ok\" для завантаження"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Знайдені оновлення"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Тег: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Коментар: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Ім’я: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Команда: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "Пакетний менеджер"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "Кількість пустих рядків"
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Версія %1\n"
"(дата створення %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Набір мінімалістичних плазмоїдів"
#: configuration.cpp:430
msgid "Links:"
msgstr "Посилання:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Домашня сторінка"
#: configuration.cpp:432
msgid "Repository"
msgstr "Репозиторій"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Баг-трекер"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Тікет перекладу"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Пакети в AUR"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "Цю програму ліцензовано під %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Перекладачі: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "Ця програма використовує: %1"
#: configuration.cpp:448
msgid "Widget"
msgstr "Віджет"
#: configuration.cpp:449
msgid "Advanced"
msgstr "Розширені"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "Підказки"
#: configuration.cpp:451
msgid "Appearance"
msgstr "Зовнішній вигляд"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "DataEngine"
#: configuration.cpp:453
msgid "About"
msgstr "Про програму"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Введіть ім’я файлу"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Ім’я файлу"
#: configuration.cpp:793 configuration.cpp:819
#, fuzzy
msgid "Edit"
msgstr "Редагувати"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Копіювати"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "Видалити"
#: configuration.cpp:1037
msgid "Select font"
msgstr "Оберіть шрифт"
#: graphicalitem.cpp:442
#, fuzzy
msgid "Select color"
msgstr "Оберіть колір"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "Включити спливаючі підказки при натисканні клавіші миші"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Включити фон"
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "Свій формат часу"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - день тижня (довгий)\n"
"$ddd - день тижня (короткий)\n"
"$dd - день\n"
"$d - день без нулів\n"
"$MMMM - місяць (довгий)\n"
"$MMM - місяць (короткий)\n"
"$MM - місяць\n"
"$M - місяць без нулів\n"
"$yyyy - рік\n"
"$yy - рук (короткий)\n"
"$hh - години (24)\n"
"$h - години без нулів (24)\n"
"$mm - хвилини\n"
"$m - хвилини без нулів\n"
"$ss - секунди\n"
"$s - секунди без нулів"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "Свій формат аптайму (uptime)"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - дні аптайму\n"
"$d - дні аптайму без нулів\n"
"$hh - години аптайму\n"
"$h - години аптайму без нулів\n"
"$mm - хвилини аптайму\n"
"$m - хвилини аптайму без нулів"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "Одиниці виміру температури"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "Температурні пристрої"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "Можна редагувати"
#: po/rc.cpp:50 rc.cpp:50
#, fuzzy
msgid "Fan devices"
msgstr "Кулери"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "Точки монтування"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "HDD (швидкість)"
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "HDD (температура)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr "Відключити автоматичний вибір пристрою та використовувати вказаний"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "Оберіть мережевий пристрій"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "AC підключений"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "Рядок, що повертається при підключеному адаптері живлення"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "AC відключений"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "Рядок, що повертається при відключеному адаптері живлення"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Бари"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Додати"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Інтервал оновлення"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Шрифт"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Розмір шрифту"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Колір шрифту"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Стиль шрифту"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Ширина шрифту"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "Команда hddtemp"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Пристій GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Музичний плеєр"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Порт сервера MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "Адреса сервера MPD"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr "Шлях до ICPI"
#: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/\" за замовчуванням"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>УВАГА:</b> DBus інтерфейс плеєра має бути активним"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "Ім’я плеєру в MPRIS"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Можна редагувати\n"
"del - видалити рядок"
#: po/rc.cpp:159 rc.cpp:159
#, fuzzy
msgid "Custom scripts"
msgstr "Свої скрипти"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr "Налаштування"
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr "Ім’я"
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr "Коментар"
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Значення"
#: po/rc.cpp:177 rc.cpp:177
#, fuzzy
msgid "Active color"
msgstr "Активний колір"
#: po/rc.cpp:180 rc.cpp:180
#, fuzzy
msgid "Inactive color"
msgstr "Неактивний колір"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Тип"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Напрямок"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Висота"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Ширина"
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip."
"To enable them just make needed checkbox fully checked."
msgstr ""
"Поля \"CPU\", \"Частота CPU\", \"Пам’ять\", \"Swap\" та \"Мережа\" "
"підтримують графічні підказки. Щоб їх задіяти, просто зробіть необхідні "
"чекбокси повністю чекнутими."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Кількість значень для підказки"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "Фон"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "Колір CPU"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "Колір частоти CPU"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Колір пам’яті"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Колір swap"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Колір швидкості скачування"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Колір швидкості віддачі"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "Колір батареї, що заряджається"
#: po/rc.cpp:225 rc.cpp:225
#, fuzzy
msgid "Battery inactive color"
msgstr "Колір батарєї, що розряджається"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"Детальна інформація може бути знайдена на <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">домашній сторінці проекту</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Slobodyan Victor"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "sarumyan@i.ua"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Інтервал оновлення"
#~ msgid "Custom command"
#~ msgstr "Своя команда"
#~ msgid "Battery device"
#~ msgstr "Пристрій батареї"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" за замовчуванням"
#~ msgid "Vertical layout"
#~ msgstr "Вертикальна розмітка"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Додати порожнє місце ліворуч/вгорі віджету"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Додати порожнє місце праворуч/внизу віджету"
#~ msgid "Form"
#~ msgstr "Form"
#~ msgid "Network directory"
#~ msgstr "Шлях до інтерфейсів"
#~ msgid "\"/sys/class/net\" by default"
#~ msgstr "\"/sys/class/net\" за замовчуванням"
#~ msgid "Custom command to run"
#~ msgstr "Виконання своєї команди"
#~ msgid "Time"
#~ msgstr "Час"
#~ msgid ""
#~ "$time - time in default format\n"
#~ "$isotime - time in ISO format\n"
#~ "$shorttime - time in short format\n"
#~ "$longtime - time in log format\n"
#~ "$custom - custom time format"
#~ msgstr ""
#~ "$time - час у стандартному форматі\n"
#~ "$isotime - час у форматі ISO\n"
#~ "$shorttime - час в короткому форматі\n"
#~ "$longtime - час у довгому форматі\n"
#~ "$custom - свій формат часу"
#~ msgid "Uptime"
#~ msgstr "Час роботи"
#~ msgid ""
#~ "$uptime - system uptime\n"
#~ "$custom - custom format"
#~ msgstr ""
#~ "$uptime - час роботи\n"
#~ "$custom - свій формат"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid ""
#~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n"
#~ "...\n"
#~ "$cpu9 - load CPU for core 9, %\n"
#~ "...\n"
#~ "$cpuN - load CPU for core N, %"
#~ msgstr ""
#~ "$cpu - загальне завантаження CPU, %\n"
#~ "$cpu0 - завантаження CPU для ядра 0, %\n"
#~ "...\n"
#~ "$cpu9 - завантаження CPU для ядра 9, %\n"
#~ "...\n"
#~ "$cpuN - завантаження CPU для ядра N, %"
#~ msgid "CPU Clock"
#~ msgstr "Частота CPU"
#~ msgid ""
#~ "$cpucl - average CPU clock, MHz\n"
#~ "$cpucl0 - CPU clock for core 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - CPU clock for core 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - CPU clock for core N, MHz"
#~ msgstr ""
#~ "$cpucl - середня частота CPU, MHz\n"
#~ "$cpucl0 - частота CPU для ядра 0, MHz\n"
#~ "...\n"
#~ "$cpucl9 - частота CPU для ядра 9, MHz\n"
#~ "...\n"
#~ "$cpuclN - частота CPU для ядра N, MHz"
#~ msgid "Temperature"
#~ msgstr "Температура"
#~ msgid "$tempN - physical temperature on device N (from 0). Example: $temp0"
#~ msgstr "$tempN - фізична температура на пристрої N (від 0). Приклад: $temp0"
#~ msgid "GPU"
#~ msgstr "GPU"
#~ msgid "$gpu - gpu usage, %"
#~ msgstr "$gpu - використання gpu, %"
#~ msgid "GPU Temp"
#~ msgstr "Температура GPU"
#~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - фізична температура на GPU"
#~ msgid "Memory"
#~ msgstr "Пам’ять"
#~ msgid ""
#~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n"
#~ "$memgb - RAM usage, GB\n"
#~ "$memtotmb - total RAM, MB\n"
#~ "$memtotgb - total RAM, GB"
#~ msgstr ""
#~ "$mem - використання RAM, %\n"
#~ "$memmb - використання RAM, MB\n"
#~ "$memgb - використання RAM, GB"
#~ msgid "Swap"
#~ msgstr "Swap"
#~ msgid ""
#~ "$swap - swap usage, %\n"
#~ "$swapmb - swap usage, MB\n"
#~ "$swapgb - swap usage, GB\n"
#~ "$swaptotmb - total swap, MB\n"
#~ "$swaptotgb - total swap, GB"
#~ msgstr ""
#~ "$swap - використання swap, %\n"
#~ "$swapmb - використання swap, MB\n"
#~ "$swapgb - використання swap, GB$swaptotmb - swap, MB\n"
#~ "$swaptotgb - swap, GB"
#~ msgid ""
#~ "$hddN - usage for mount point N (from 0), %. Example: $hdd0\n"
#~ "$hddmbN - usage for mount point N (from 0), MB. Example: $hddmb0\n"
#~ "$hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0\n"
#~ "$hddtotmbN - total size of mount point N (from 0), MB. Example: "
#~ "$hddtotmb0\n"
#~ "$hddtotgbN - total size of mount point N (from 0), GB. Example: $hddtotgb0"
#~ msgstr ""
#~ "$hddN - використання точки монтування N (від 0), %. Приклад: $hdd0\n"
#~ "$hddmbN - використання точки монтування N (від 0), MB. Приклад: $hddmb0\n"
#~ "$hddgbN - використання точки монтування N (від 0), GB. Приклад: $hddgb0\n"
#~ "$hddtotmbN - розмір точки монтування N (від 0), MB. Приклад: $hddtotmb0\n"
#~ "$hddtotgbN - розмір точки монтування N (від 0), GB. Приклад: $hddtotgb0"
#~ msgid "HDD speed"
#~ msgstr "Швидкість HDD"
#~ msgid ""
#~ "$hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0\n"
#~ "$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0"
#~ msgstr ""
#~ "$hddrN - швидкість читання HDD N (від 0), KB/s. Приклад: $hddr0\n"
#~ "$hddwN - швидкість запису HDD N (від 0), KB/s. Приклад: $hddw0"
#~ msgid "HDD temp"
#~ msgstr "Температура HDD"
#~ msgid ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr ""
#~ "$hddtempN - фізична температура на пристрої N (від 0). Приклад: $hddtemp"
#~ msgid "Network"
#~ msgstr "Мережа"
#~ msgid ""
#~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n"
#~ "$netdev - current network device"
#~ msgstr ""
#~ "$down - швидкість скачування, KB/s\n"
#~ "$up - швидкість віддачі, KB/s\n"
#~ "$netdev - поточний мережевий пристрій"
#~ msgid "Battery"
#~ msgstr "Батарея"
#~ msgid ""
#~ "$bat - battery charge, %\n"
#~ "$ac - AC status"
#~ msgstr ""
#~ "$bat - заряд батареї, %\n"
#~ "$ac - статус адаптера живлення"
#~ msgid ""
#~ "$album - song album\n"
#~ "$artist - song artist\n"
#~ "$progress - song progress\n"
#~ "$time - song duration\n"
#~ "$title - song title"
#~ msgstr ""
#~ "$album - альбом\n"
#~ "$artist - виконавець\n"
#~ "$progress - прогрес\n"
#~ "$time - тривалість\n"
#~ "$title - назва"
#~ msgid "Processes"
#~ msgstr "Процеси"
#~ msgid ""
#~ "$pscount - number of running processes\n"
#~ "$pstotal - total number of running processes\n"
#~ "$ps - list of running processes comma separated"
#~ msgstr ""
#~ "$pscount - кількість запущених процесів\n"
#~ "$pstotal - загальна кількість процесів\n"
#~ "$ps - перелік запущених процесів, розділених комами"
#~ msgid ""
#~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0"
#~ msgstr ""
#~ "$pkgcountN - кількість пакетів, що доступні для оновлення, для команди N. "
#~ "Наприклад: $pkgcount0"
#~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr ""
#~ "$customN - отримати інформацію зі своєї команди N. Наприклад `$custom0`"
#~ msgid "Widget settings"
#~ msgstr "Налаштування віджету"

View File

@ -0,0 +1,519 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Steve Lemuel <wlemuel@hotmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-10 22:50+0800\n"
"Last-Translator: Steve Lemuel <wlemuel@hotmail.com>\n"
"Language-Team: American English <kde-i18n-doc@kde.org>\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:95
msgid "Run ksysguard"
msgstr "运行任务管理器"
#: awesome-widget.cpp:98
msgid "Show README"
msgstr "显示帮助文档"
#: awesome-widget.cpp:101
msgid "Update text"
msgstr "刷新文本"
#: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Check for updates"
msgstr ""
#: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr ""
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr ""
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr ""
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr ""
#: configuration.cpp:307
msgid "Tag: %1"
msgstr ""
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr ""
#: configuration.cpp:382
msgid "Name: %1"
msgstr ""
#: configuration.cpp:384
msgid "Exec: %1"
msgstr ""
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager"
msgstr "包管理器"
#: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines"
msgstr "空行"
#: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr ""
#: configuration.cpp:430
msgid "Links:"
msgstr ""
#: configuration.cpp:431
msgid "Homepage"
msgstr ""
#: configuration.cpp:432
msgid "Repository"
msgstr ""
#: configuration.cpp:433
msgid "Bugtracker"
msgstr ""
#: configuration.cpp:434
msgid "Translation issue"
msgstr ""
#: configuration.cpp:435
msgid "AUR packages"
msgstr ""
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr ""
#: configuration.cpp:445
msgid "Translators: %1"
msgstr ""
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr ""
#: configuration.cpp:448
msgid "Widget"
msgstr "窗口小部件"
#: configuration.cpp:449
msgid "Advanced"
msgstr "高级设置"
#: configuration.cpp:450
msgid "Tooltip"
msgstr "提示"
#: configuration.cpp:451
msgid "Appearance"
msgstr "外观"
#: configuration.cpp:452
msgid "DataEngine"
msgstr "数据引擎"
#: configuration.cpp:453
msgid "About"
msgstr ""
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr ""
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr ""
#: configuration.cpp:793 configuration.cpp:819
#, fuzzy
msgid "Edit"
msgstr "可编辑的"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr ""
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove"
msgstr "移除"
#: configuration.cpp:1037
msgid "Select font"
msgstr "选择字体"
#: graphicalitem.cpp:442
#, fuzzy
msgid "Select color"
msgstr "选择字体"
#: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click"
msgstr "鼠标点击时弹出对话框"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "启用背景"
#: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format"
msgstr "自定义时间格式"
#: po/rc.cpp:12 rc.cpp:12
msgid ""
"$dddd - long weekday\n"
"$ddd - short weekday\n"
"$dd - day\n"
"$d - day w\\o zero\n"
"$MMMM - long month\n"
"$MMM - short month\n"
"$MM - month\n"
"$M - month w\\o zero\n"
"$yyyy - year\n"
"$yy - short year\n"
"$hh - hours (24 only)\n"
"$h - hours w\\o zero (24 only)\n"
"$mm - minutes\n"
"$m - minutes w\\o zero\n"
"$ss - seconds\n"
"$s - seconds w\\o zero"
msgstr ""
"$dddd - 详细工作日\n"
"$ddd - 简短工作日\n"
"$dd - 日\n"
"$d - 日 w\\o 零\n"
"$MMMM - 详细月份\n"
"$MMM - 简短月份\n"
"$MM - 月\n"
"$M - 月 w\\o 零\n"
"$yyyy - 年\n"
"$yy - 简短年份\n"
"$hh - 小时 (24 小时制)\n"
"$h - 小时 w\\o 零 (24 小时制)\n"
"$mm - 分\n"
"$m - 分 w\\o 零\n"
"$ss - 秒\n"
"$s - 秒 w\\o 零"
#: po/rc.cpp:30 rc.cpp:30
msgid "Custom uptime format"
msgstr "自定义启动时间显示格式"
#: po/rc.cpp:33 rc.cpp:33
msgid ""
"$dd - uptime days\n"
"$d - uptime days without zero\n"
"$hh - uptime hours\n"
"$h - uptime hours without zero\n"
"$mm - uptime minutes\n"
"$m - uptime minutes without zero"
msgstr ""
"$dd - 运行天数\n"
"$d - 运行天数不显示0\n"
"$hh - 运行小时数\n"
"$h - 运行小时数不显示0\n"
"$mm - 运行分钟数\n"
"$m - 运行分钟数不显示0"
#: po/rc.cpp:41 rc.cpp:41
msgid "Temperature units"
msgstr "温度单位"
#: po/rc.cpp:44 rc.cpp:44
msgid "Temperature devices"
msgstr "温度传感器"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 po/rc.cpp:71 rc.cpp:47
#: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable"
msgstr "可编辑的"
#: po/rc.cpp:50 rc.cpp:50
#, fuzzy
msgid "Fan devices"
msgstr "外界电源设备"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points"
msgstr "挂载点"
#: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)"
msgstr "硬盘(高速)"
#: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "硬盘(临时)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device"
msgstr "禁用自动选择设备和设置特殊设备"
#: po/rc.cpp:77 rc.cpp:77
msgid "Set network device"
msgstr "设置网络设备"
#: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag"
msgstr "外接电源使用中标签"
#: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online"
msgstr "外接电源使用时显示线条"
#: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag"
msgstr "外接电源未使用标签"
#: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline"
msgstr "外接电源未使用时显示线条"
#: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr ""
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "添加"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "时间周期"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "字体"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "字体大小"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "字体颜色"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "字体样式"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "字体宽度"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "硬盘温度显示命令"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "GPU 设备"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "硬盘"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "音乐播放器"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "MPD 端口"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "MPD 地址"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr ""
#: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "默认为 \"/sys/class/power_supply/AC/online\""
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>提示:</b> 播放器 DBus 应当处于激活状态"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "MPRIS 播放器名"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"可编辑的\n"
"del - 移除项目"
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr ""
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr ""
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr ""
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr ""
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr ""
#: po/rc.cpp:177 rc.cpp:177
#, fuzzy
msgid "Active color"
msgstr "电池使用状态提示颜色"
#: po/rc.cpp:180 rc.cpp:180
#, fuzzy
msgid "Inactive color"
msgstr "电池未使用状态提示颜色"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr ""
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr ""
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr ""
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr ""
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"CPU CPU 时钟,内存,虚拟内存和网络连接标签均支持图形化提示显示。 请在相应复"
"选框中勾选以启用该功能。 "
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "提示的数值"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "背景"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "CPU 颜色"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "CPU 时钟颜色"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "内存显示颜色"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "虚拟内存颜色"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "下载速度颜色"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "上传速度颜色"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "电池使用状态提示颜色"
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr "电池未使用状态提示颜色"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"详情请参照 <a href=\"http://arcanis.name/projects/ awesome-widgets/\">项目主"
"页</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "用户名"
#: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "用户邮箱"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "时间周期"
#~ msgid "Desktop check cmd"
#~ msgstr "检测桌面命令"
#~ msgid "Custom command"
#~ msgstr "自定义命令"
#~ msgid "Battery device"
#~ msgstr "电池设备"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "默认为 \"/sys/class/power_supply/BAT0/capacity\""

View File

@ -0,0 +1,166 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awesome-widget.h"
#include <KNotification>
#include <Plasma/ToolTipManager>
#include <QGraphicsGridLayout>
#include <QGraphicsView>
#include <math.h>
#include "customlabel.h"
#include "graphicalitem.h"
#include <pdebug/pdebug.h>
void AwesomeWidget::reinit()
{
if (debug) qDebug() << PDEBUG;
if (configuration[QString("background")].toInt() == 0)
setBackgroundHints(NoBackground);
if (configuration[QString("popup")].toInt() == 0)
textLabel->setPopupEnabled(false);
else
textLabel->setPopupEnabled(true);
updateText(true);
keys = getKeys();
foundKeys = findKeys();
getGraphicalItems();
foundBars = findGraphicalItems();
updateNetworkDevice(false);
connectToEngine();
}
void AwesomeWidget::sendNotification(const QString eventId, const QString message)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Event" << eventId;
if (debug) qDebug() << PDEBUG << ":" << "Message" << message;
KNotification *notification = new KNotification(eventId);
notification->setComponentData(KComponentData("plasma_applet_awesome-widget"));
notification->setTitle(QString("Awesome Widget ::: ") + eventId);
notification->setText(message);
notification->sendEvent();
delete notification;
}
void AwesomeWidget::updateNetworkDevice(const bool delay)
{
if (debug) qDebug() << PDEBUG;
if (delay)
networkDeviceUpdate = 30;
else
values[QString("netdev")] = getNetworkDevice();
}
void AwesomeWidget::updateText(const bool clear)
{
if (debug) qDebug() << PDEBUG;
QString text = configuration[QString("text")];
if (!clear) {
text.replace(QString("$$"), QString("$\\$\\"));
for (int i=0; i<foundKeys.count(); i++)
text.replace(QString("$") + foundKeys[i], values[foundKeys[i]]);
for (int i=0; i<foundBars.count(); i++)
text.replace(QString("$") + foundBars[i], getItemByTag(foundBars[i])->getImage(values[foundBars[i]].toFloat()));
text.replace(QString("$\\$\\"), QString("$$"));
}
textLabel->setText(formatLine[0] + text + formatLine[1]);
mainLayout->itemAt(0, 0)->updateGeometry();
updateGeometry();
}
void AwesomeWidget::updateTooltip()
{
if (debug) qDebug() << PDEBUG;
toolTipView->resize(100.0 * counts[QString("tooltip")], 105.0);
// boundaries
QMap<QString, float> boundaries;
boundaries[QString("cpu")] = 100.0;
boundaries[QString("cpucl")] = 4000.0;
boundaries[QString("mem")] = 100.0;
boundaries[QString("swap")] = 100.0;
boundaries[QString("down")] = 1.0;
if (configuration[QString("downTooltip")].toInt() == 2) {
for (int i=0; i<tooltipValues[QString("down")].count(); i++)
if (boundaries[QString("down")] < tooltipValues[QString("down")][i])
boundaries[QString("down")] = tooltipValues[QString("down")][i];
for (int i=0; i<tooltipValues[QString("up")].count(); i++)
if (boundaries[QString("down")] < tooltipValues[QString("up")][i])
boundaries[QString("down")] = tooltipValues[QString("up")][i];
boundaries[QString("down")] *= 1.2;
}
boundaries[QString("up")] = boundaries[QString("down")];
boundaries[QString("bat")] = 100.0;
// create image
toolTipScene->clear();
QPen pen = QPen();
if (configuration[QString("useTooltipBackground")].toInt() == 2)
toolTipScene->setBackgroundBrush(QColor(configuration[QString("tooltipBackground")]));
else
toolTipScene->setBackgroundBrush(QBrush(Qt::NoBrush));
bool down = false;
bool isBattery = false;
QStringList trueKeys;
if (tooltipValues.contains(QString("cpu"))) trueKeys.append(QString("cpu"));
if (tooltipValues.contains(QString("cpucl"))) trueKeys.append(QString("cpucl"));
if (tooltipValues.contains(QString("mem"))) trueKeys.append(QString("mem"));
if (tooltipValues.contains(QString("swap"))) trueKeys.append(QString("swap"));
if (tooltipValues.contains(QString("down"))) trueKeys.append(QString("down"));
if (tooltipValues.contains(QString("up"))) trueKeys.append(QString("up"));
if (tooltipValues.contains(QString("bat"))) trueKeys.append(QString("bat"));
for (int i=0; i<trueKeys.count(); i++) {
float normX = 100.0 / (float)tooltipValues[trueKeys[i]].count();
float normY = 100.0 / (1.5 * boundaries[trueKeys[i]]);
if (trueKeys[i] == QString("bat"))
isBattery = true;
else
isBattery = false;
if (!isBattery) pen.setColor(QColor(configuration[trueKeys[i] + QString("Color")]));
float shift = i * 100.0;
if (down) shift -= 100.0;
for (int j=0; j<tooltipValues[trueKeys[i]].count()-1; j++) {
float x1 = j * normX + shift;
float y1 = - fabs(tooltipValues[trueKeys[i]][j]) * normY + 5.0;
float x2 = (j + 1) * normX + shift;
float y2 = - fabs(tooltipValues[trueKeys[i]][j+1]) * normY + 5.0;
if (isBattery) {
if (tooltipValues[trueKeys[i]][j+1] > 0)
pen.setColor(QColor(configuration[QString("batteryColor")]));
else
pen.setColor(QColor(configuration[QString("batteryInColor")]));
}
toolTipScene->addLine(x1, y1, x2, y2, pen);
}
if (trueKeys[i] == QString("down")) down = true;
}
toolTip.setImage(QPixmap::grabWidget(toolTipView));
Plasma::ToolTipManager::self()->setContent(this, toolTip);
}

View File

@ -0,0 +1,295 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TooltipWindow</class>
<widget class="QWidget" name="TooltipWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>594</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Tooltip</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QLabel" name="label_tooltip">
<property name="text">
<string>CPU, CPU clock, memory, swap and network labels support graphical tooltip. To enable them just make needed checkbox fully checked.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="scrollArea_tooltip">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="contents_tooltip">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>684</width>
<height>542</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QHBoxLayout" name="layout_tooltipNum">
<item>
<widget class="QLabel" name="label_tooltipNum">
<property name="text">
<string>Number of values for tooltips</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_tooltipNum">
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>25</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_background">
<item>
<widget class="QCheckBox" name="checkBox_background">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Background</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_background"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_cpuColor">
<item>
<widget class="QCheckBox" name="checkBox_cpu">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>CPU color</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_cpu"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_cpuclockColor">
<item>
<widget class="QCheckBox" name="checkBox_cpuclock">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>CPU clock color</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_cpuclock"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_memColor">
<item>
<widget class="QCheckBox" name="checkBox_mem">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Memory color</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_mem"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_swapColor">
<item>
<widget class="QCheckBox" name="checkBox_swap">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Swap color</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_swap"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_downColor">
<item>
<widget class="QCheckBox" name="checkBox_down">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Download speed color</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_down"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_upColor">
<item>
<widget class="QLabel" name="label_up">
<property name="text">
<string>Upload speed color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_up"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_batteryColor">
<item>
<widget class="QCheckBox" name="checkBox_battery">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Battery active color</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_battery"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_batteryInColor">
<item>
<widget class="QLabel" name="label_batteryIn">
<property name="text">
<string>Battery inactive color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_batteryIn"/>
</item>
</layout>
</item>
<item>
<spacer name="spacer_tooltip">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>289</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfigWindow</class>
<widget class="QWidget" name="ConfigWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>600</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>600</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Widget</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Detailed information may be found on &lt;a href=&quot;http://arcanis.name/projects/awesome-widgets/&quot;&gt;project homepage&lt;/a&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layput_mainFormating">
<item>
<widget class="QPushButton" name="pushButton_font">
<property name="text">
<string>Font</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_br">
<property name="icon">
<iconset theme="stock_text_indent">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainFormatingCenter1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_bold">
<property name="icon">
<iconset theme="format-text-bold">
<normaloff/>
</iconset>
</property>
<property name="shortcut">
<string>Ctrl+B</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_italic">
<property name="icon">
<iconset theme="format-text-italic">
<normaloff/>
</iconset>
</property>
<property name="shortcut">
<string>Ctrl+I</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_underline">
<property name="icon">
<iconset theme="format-text-underline">
<normaloff/>
</iconset>
</property>
<property name="shortcut">
<string>Ctrl+U</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_strike">
<property name="icon">
<iconset theme="format-text-strikethrough">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainFormatingCenter2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_left">
<property name="icon">
<iconset theme="format-justify-left">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_center">
<property name="icon">
<iconset theme="format-justify-center">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_right">
<property name="icon">
<iconset theme="format-justify-right">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_fill">
<property name="icon">
<iconset theme="format-justify-fill">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainFormatingCenter3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="comboBox_tags">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_tags">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTextEdit" name="textEdit_elements">
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,36 @@
# set project name
set (SUBPROJECT plasma_applet_desktop-panel)
message (STATUS "Subproject ${SUBPROJECT}")
# find required libaries
find_package (KDE4 REQUIRED)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_subdirectory (po)
include (KDE4Defaults)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR})
# set sources
set (PLUGIN_NAME ${SUBPROJECT})
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp)
file (GLOB SUBPROJECT_UI *.ui)
# prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
# make
kde4_add_ui_files (SUBPROJECT_SOURCE ${SUBPROJECT_UI})
kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE})
target_link_libraries (${PLUGIN_NAME} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
# install
install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})

View File

@ -0,0 +1,357 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AppearanceWidget</class>
<widget class="QWidget" name="AppearanceWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>343</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>320</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Apearance</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_active">
<attribute name="title">
<string>Active desktop</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea_active">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_active">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>448</width>
<height>289</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layout_fontActive">
<item>
<widget class="QLabel" name="label_fontActive">
<property name="text">
<string>Font</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="fontComboBox_fontActive"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontSizeActive">
<item>
<widget class="QLabel" name="label_fontSizeActive">
<property name="text">
<string>Font size</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontSizeActive">
<property name="minimum">
<number>7</number>
</property>
<property name="maximum">
<number>48</number>
</property>
<property name="value">
<number>12</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontColorActive">
<item>
<widget class="QLabel" name="label_fontColorActive">
<property name="text">
<string>Font color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_fontColorActive"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontWeightActive">
<item>
<widget class="QLabel" name="label_fontWeightActive">
<property name="text">
<string>Font weight</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontWeightActive">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>900</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>400</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontStyleActive">
<item>
<widget class="QLabel" name="label_fontStyleActive">
<property name="text">
<string>Font style</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_fontStyleActive">
<item>
<property name="text">
<string notr="true">normal</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">italic</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_active">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>119</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_inactive">
<attribute name="title">
<string>Inactive desktop</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea_inactive">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_inactive">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>448</width>
<height>289</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="layout_fontInactive">
<item>
<widget class="QLabel" name="label_fontInactive">
<property name="text">
<string>Font</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="fontComboBox_fontInactive"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontSizeInactive">
<item>
<widget class="QLabel" name="label_fontSizeInactive">
<property name="text">
<string>Font size</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontSizeInactive">
<property name="minimum">
<number>7</number>
</property>
<property name="maximum">
<number>48</number>
</property>
<property name="value">
<number>12</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontColorInactive">
<item>
<widget class="QLabel" name="label_fontColorInactive">
<property name="text">
<string>Font color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_fontColorInactive"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontWeightInactive">
<item>
<widget class="QLabel" name="label_fontWeightInactive">
<property name="text">
<string>Font weight</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontWeightInactive">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>900</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>400</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_fontStyleInactive">
<item>
<widget class="QLabel" name="label_fontStyleInactive">
<property name="text">
<string>Font style</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_fontStyleInactive">
<item>
<property name="text">
<string notr="true">normal</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">italic</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_inactive">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>119</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,634 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "desktop-panel.h"
#include <KConfigDialog>
#include <KGlobal>
#include <KStandardDirs>
#include <KWindowSystem>
#include <Plasma/Containment>
#include <Plasma/Corona>
#include <Plasma/Theme>
#include <Plasma/ToolTipManager>
#include <QDebug>
#include <QDesktopWidget>
#include <QFile>
#include <QGraphicsGridLayout>
#include <QGraphicsProxyWidget>
#include <QGraphicsView>
#include <QMouseEvent>
#include <QProcessEnvironment>
#include <QTextCodec>
#include <QTimer>
#include <fontdialog/fontdialog.h>
#include <pdebug/pdebug.h>
CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const bool debugCmd)
: QLabel(0),
debug(debugCmd),
number(num),
widget(wid)
{
if (debug) qDebug() << PDEBUG << ":" << "Init label" << number;
}
CustomPlasmaLabel::~CustomPlasmaLabel()
{
if (debug) qDebug() << PDEBUG;
}
int CustomPlasmaLabel::getNumber()
{
if (debug) qDebug() << PDEBUG;
return number;
}
void CustomPlasmaLabel::enterEvent(QEvent *event)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Event" << event->type();
if (event->type() == QEvent::Enter)
widget->paintTooltip(number);
emit(QLabel::enterEvent(event));
}
void CustomPlasmaLabel::mousePressEvent(QMouseEvent *event)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
if (event->button() == Qt::LeftButton)
widget->setCurrentDesktop(number);
emit(QLabel::mousePressEvent(event));
}
DesktopPanel::DesktopPanel(QObject *parent, const QVariantList &args)
: Plasma::Applet(parent, args)
{
// debug
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
if (debugEnv == QString("yes"))
debug = true;
else
debug = false;
setBackgroundHints(DefaultBackground);
setAspectRatioMode(Plasma::IgnoreAspectRatio);
setHasConfigurationInterface(true);
// text format init
currentFormatLine.append(QString(""));
currentFormatLine.append(QString(""));
formatLine.append(QString(""));
formatLine.append(QString(""));
}
DesktopPanel::~DesktopPanel()
{
if (debug) qDebug() << PDEBUG;
}
void DesktopPanel::init()
{
if (debug) qDebug() << PDEBUG;
layout = new QGraphicsGridLayout();
layout->setContentsMargins(1, 1, 1, 1);
setLayout(layout);
// tooltip
toolTip = Plasma::ToolTipContent();
toolTipScene = new QGraphicsScene();
toolTipView = new QGraphicsView(toolTipScene);
toolTipView->setStyleSheet(QString("background: transparent"));
toolTipView->setContentsMargins(0, 0, 0, 0);
toolTipView->setFrameShape(QFrame::NoFrame);
toolTipView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
toolTipView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Plasma::ToolTipManager::self()->setContent(this, toolTip);
// read variables
configChanged();
connect(this, SIGNAL(activate()), this, SLOT(changePanelsState()));
connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SLOT(updateText(int)));
}
DesktopPanel::DesktopWindowsInfo DesktopPanel::getInfoByDesktop(const int num)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Number" << num;
DesktopWindowsInfo info;
info.desktop = KWindowSystem::workArea(num);
QList<WId> windows = KWindowSystem::windows();
for (int i=0; i<windows.count(); i++) {
KWindowInfo winInfo = KWindowSystem::windowInfo(windows[i],
NET::Property::WMDesktop | NET::Property::WMGeometry |
NET::Property::WMState | NET::Property::WMWindowType);
if (!winInfo.isOnDesktop(num)) continue;
if (winInfo.windowType(NET::WindowTypeMask::NormalMask) == NET::WindowType::Normal) {
if (winInfo.isMinimized()) continue;
info.windows.append(winInfo.geometry());
info.winId.append(windows[i]);
} else if (winInfo.windowType(NET::WindowTypeMask::DesktopMask) == NET::WindowType::Desktop) {
info.desktopId.append(windows[i]);
}
}
return info;
}
QList<Plasma::Containment *> DesktopPanel::getPanels()
{
if (debug) qDebug() << PDEBUG;
QList<Plasma::Containment *> panels;
for (int i=0; i<containment()->corona()->containments().count(); i++)
if (containment()->corona()->containments()[i]->containmentType() == Plasma::Containment::PanelContainment)
panels.append(containment()->corona()->containments()[i]);
return panels;
}
QString DesktopPanel::panelLocationToStr(Plasma::Location loc)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Location" << loc;
switch(loc) {
case Plasma::TopEdge:
return i18n("Top Edge");
case Plasma::BottomEdge:
return i18n("Bottom Edge");
case Plasma::LeftEdge:
return i18n("Left Edge");
case Plasma::RightEdge:
return i18n("Right Edge");
default:
return i18n("Unknown Position (%1)", loc);
}
}
QString DesktopPanel::parsePattern(const QString rawLine, const int num)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Raw line" << rawLine;
if (debug) qDebug() << PDEBUG << ":" << "Number" << num;
QString line, fullMark, mark;
line = rawLine;
if (KWindowSystem::currentDesktop() == num + 1)
mark = configuration[QString("mark")];
else
mark = QString("");
fullMark = QString("%1").arg(mark, configuration[QString("mark")].count(), QLatin1Char(' '));
if (line.contains(QString("$fullmark")))
line.replace(QString("$fullmark"), fullMark);
if (line.contains(QString("$mark")))
line.replace(QString("$mark"), mark);
if (line.contains(QString("$name")))
line.replace(QString("$name"), desktopNames[num]);
if (line.contains(QString("$number")))
line.replace(QString("$number"), QString::number(num + 1));
if (line.contains(QString("$total")))
line.replace(QString("$total"), QString::number(desktopNames.count()));
return line;
}
void DesktopPanel::reinit()
{
if (debug) qDebug() << PDEBUG;
// clear
// labels
for (int i=0; i<proxyWidgets.count(); i++) {
layout->removeItem(proxyWidgets[i]);
proxyWidgets[i]->setWidget(0);
delete labels[i];
delete proxyWidgets[i];
}
labels.clear();
proxyWidgets.clear();
desktopNames.clear();
// add
int total = KWindowSystem::numberOfDesktops();
for (int i=1; i<total+1; i++)
desktopNames.append(KWindowSystem::desktopName(i));
// layout
if (configuration[QString("background")].toInt() == 0)
setBackgroundHints(NoBackground);
// labels
for (int i=0; i<desktopNames.count(); i++) {
proxyWidgets.append(new QGraphicsProxyWidget(this));
labels.append(new CustomPlasmaLabel(this, i, debug));
labels[i]->setWordWrap(false);
labels[i]->setAttribute(Qt::WA_TranslucentBackground, true);
proxyWidgets[i]->setWidget(labels[i]);
if (configuration[QString("layout")].toInt() == 0)
layout->addItem(proxyWidgets[i], 0, i);
else
layout->addItem(proxyWidgets[i], i, 0);
}
updateText(KWindowSystem::currentDesktop());
for (int i=0; i<proxyWidgets.count(); i++) {
labels[i]->adjustSize();
proxyWidgets[i]->setGeometry(labels[i]->geometry());
}
emit(KWindowSystem::setCurrentDesktop(KWindowSystem::currentDesktop()));
}
void DesktopPanel::changePanelsState()
{
if (debug) qDebug() << PDEBUG;
QList<Plasma::Containment *> panels = getPanels();
for (int i=0; i<panels.count(); i++) {
if ((!configuration[QString("panels")].split(QChar(','))
.contains(QString::number(i))) &&
(configuration[QString("panels")] != QString("-1")))
continue;
bool wasVisible = panels[i]->view()->isVisible();
int winId = panels[i]->view()->winId();
if (wasVisible) {
if (debug) qDebug() << PDEBUG << ":" << "Hide panel";
KWindowInfo oldInfo = KWindowSystem::windowInfo(winId, NET::WMState);
oldState = oldInfo.state();
panels[i]->view()->setVisible(false);
} else {
if (debug) qDebug() << PDEBUG << ":" << "Show panel";
panels[i]->view()->setVisible(true);
KWindowSystem::clearState(winId, NET::KeepAbove);
KWindowSystem::setState(winId, oldState | NET::StaysOnTop);
KWindowSystem::setOnAllDesktops(winId, true);
}
}
}
void DesktopPanel::paintTooltip(const int active)
{
if (debug) qDebug() << PDEBUG;
if (active == activeTooltip) return;
// prepare
// clear
toolTip.setImage(0);
toolTip.setWindowsToPreview(QList<WId>());
activeTooltip = active;
DesktopWindowsInfo info = getInfoByDesktop(active + 1);
float margin = 5.0 * info.desktop.width() / 400.0;
toolTipView->resize(info.desktop.width() + 2.0 * margin, info.desktop.height() + 2.0 * margin);
toolTipScene->clear();
toolTipScene->setBackgroundBrush(QBrush(Qt::NoBrush));
// borders
toolTipScene->addLine(0, 0, 0, info.desktop.height() + 2.0 * margin);
toolTipScene->addLine(0, info.desktop.height() + 2.0 * margin,
info.desktop.width() + 2.0 * margin, info.desktop.height() + 2.0 * margin);
toolTipScene->addLine(info.desktop.width() + 2.0 * margin, info.desktop.height() + 2.0 * margin,
info.desktop.width() + 2.0 * margin, 0);
toolTipScene->addLine(info.desktop.width() + 2.0 * margin, 0, 0, 0);
if (configuration[QString("tooltipType")].toInt() == 1) {
// only contours
QPen pen = QPen();
pen.setWidthF(2.0 * info.desktop.width() / 400.0);
pen.setColor(QColor(configuration[QString("tooltipColor")]));
for (int i=0; i<info.windows.count(); i++) {
toolTipScene->addLine(info.windows[i].left() + margin, info.windows[i].bottom() + margin,
info.windows[i].left() + margin, info.windows[i].top() + margin, pen);
toolTipScene->addLine(info.windows[i].left() + margin, info.windows[i].top() + margin,
info.windows[i].right() + margin, info.windows[i].top() + margin, pen);
toolTipScene->addLine(info.windows[i].right() + margin, info.windows[i].top() + margin,
info.windows[i].right() + margin, info.windows[i].bottom() + margin, pen);
toolTipScene->addLine(info.windows[i].right() + margin, info.windows[i].bottom() + margin,
info.windows[i].left() + margin, info.windows[i].bottom() + margin, pen);
}
toolTip.setImage(QPixmap::grabWidget(toolTipView).scaledToWidth(configuration[QString("tooltipWidth")].toInt()));
} else if (configuration[QString("tooltipType")].toInt() == 2) {
// clean desktop
toolTip.setWindowsToPreview(info.desktopId);
} else {
// desktop preview
toolTip.setWindowsToPreview(info.winId);
}
Plasma::ToolTipManager::self()->setContent(this, toolTip);
}
void DesktopPanel::setCurrentDesktop(const int number)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Set desktop" << number + 1;
KWindowSystem::setCurrentDesktop(number + 1);
}
void DesktopPanel::updateText(const int active)
{
if (debug) qDebug() << PDEBUG;
QString line, text;
for (int i=0; i<labels.count(); i++) {
if (debug) qDebug() << PDEBUG << ":" << "Label" << i;
line = parsePattern(configuration[QString("pattern")], i);
if (active == i + 1)
text = currentFormatLine[0] + line + currentFormatLine[1];
else
text = formatLine[0] + line + formatLine[1];
labels[i]->setText(text);
}
int height = 0;
int width = 0;
for (int i=0; i<proxyWidgets.count(); i++) {
labels[i]->adjustSize();
proxyWidgets[i]->setGeometry(labels[i]->geometry());
if (configuration[QString("layout")].toInt() == 0) {
width += proxyWidgets[i]->geometry().width();
if (height < proxyWidgets[i]->geometry().height())
height = proxyWidgets[i]->geometry().height();
} else {
height += proxyWidgets[i]->geometry().height();
if (width < proxyWidgets[i]->geometry().width())
width = proxyWidgets[i]->geometry().width();
}
}
layout->setMinimumSize(width, height);
}
// configuration interface
void DesktopPanel::createConfigurationInterface(KConfigDialog *parent)
{
if (debug) qDebug() << PDEBUG;
QWidget *appWidget = new QWidget;
uiAppConfig.setupUi(appWidget);
QWidget *configWidget = new QWidget;
uiWidConfig.setupUi(configWidget);
QWidget *toggleWidget = new QWidget;
uiToggleConfig.setupUi(toggleWidget);
uiWidConfig.textEdit_elements->setPlainText(configuration[QString("pattern")]);
if (configuration[QString("tooltip")].toInt() == 0)
uiWidConfig.checkBox_tooltip->setCheckState(Qt::Unchecked);
else
uiWidConfig.checkBox_tooltip->setCheckState(Qt::Checked);
uiWidConfig.comboBox_tooltipType->setCurrentIndex(configuration[QString("tooltipType")].toInt());
uiWidConfig.spinBox_tooltip->setValue(configuration[QString("tooltipWidth")].toInt());
uiWidConfig.kcolorcombo_tooltipColor->setColor(QColor(configuration[QString("tooltipColor")]));
if (configuration[QString("background")].toInt() == 0)
uiWidConfig.checkBox_background->setCheckState(Qt::Unchecked);
else
uiWidConfig.checkBox_background->setCheckState(Qt::Checked);
if (configuration[QString("layout")].toInt() == 0)
uiWidConfig.checkBox_layout->setCheckState(Qt::Unchecked);
else
uiWidConfig.checkBox_layout->setCheckState(Qt::Checked);
uiWidConfig.comboBox_mark->setItemText(uiWidConfig.comboBox_mark->count()-1, configuration[QString("mark")]);
uiWidConfig.comboBox_mark->setCurrentIndex(uiWidConfig.comboBox_mark->count()-1);
KConfigGroup cg = config();
CFont font(cg.readEntry("currentFontFamily", "Terminus"));
font.setPointSize(cg.readEntry("currentFontSize", 10));
font.setCurrentColor(QColor(cg.readEntry("currentFontColor", "#ff0000")));
font.setHtmlWeight(cg.readEntry("currentFontWeight", 400));
font.setItalic(cg.readEntry("currentFontStyle", "normal") == QString("italic"));
uiAppConfig.fontComboBox_fontActive->setCurrentFont(font.toQFont());
uiAppConfig.spinBox_fontSizeActive->setValue(font.pointSize());
uiAppConfig.kcolorcombo_fontColorActive->setColor(font.color());
if (font.italic())
uiAppConfig.comboBox_fontStyleActive->setCurrentIndex(1);
else
uiAppConfig.comboBox_fontStyleActive->setCurrentIndex(0);
uiAppConfig.spinBox_fontWeightActive->setValue(font.htmlWeight());
font = CFont(cg.readEntry("fontFamily", "Terminus"));
font.setPointSize(cg.readEntry("fontSize", 10));
font.setCurrentColor(QColor(cg.readEntry("fontColor", "#000000")));
font.setHtmlWeight(cg.readEntry("fontWeight", 400));
font.setItalic(cg.readEntry("fontStyle", "normal") == QString("italic"));
uiAppConfig.fontComboBox_fontInactive->setCurrentFont(font.toQFont());
uiAppConfig.spinBox_fontSizeInactive->setValue(font.pointSize());
uiAppConfig.kcolorcombo_fontColorInactive->setColor(font.color());
if (font.italic())
uiAppConfig.comboBox_fontStyleInactive->setCurrentIndex(1);
else
uiAppConfig.comboBox_fontStyleInactive->setCurrentIndex(0);
uiAppConfig.spinBox_fontWeightInactive->setValue(font.htmlWeight());
uiToggleConfig.listWidget_list->clear();
QList<Plasma::Containment *> panels = getPanels();
for (int i=0; i<panels.count(); i++) {
QListWidgetItem *item = new QListWidgetItem(panelLocationToStr(panels[i]->location()), uiToggleConfig.listWidget_list);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
if ((configuration[QString("panels")].split(QChar(','))
.contains(QString::number(i))) ||
(configuration[QString("panels")] == QString("-1")))
item->setCheckState(Qt::Checked);
else
item->setCheckState(Qt::Unchecked);
}
parent->addPage(configWidget, i18n("Widget"), Applet::icon());
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
parent->addPage(toggleWidget, i18n("Toggle panels"), QString("plasma"));
connect(uiWidConfig.pushButton_tags, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_br, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_font, SIGNAL(clicked(bool)), this, SLOT(setFontFormating()));
connect(uiWidConfig.pushButton_bold, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_italic, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_underline, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_strike, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_left, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_center, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_right, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_fill, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
}
void DesktopPanel::configAccepted()
{
if (debug) qDebug() << PDEBUG;
KConfigGroup cg = config();
cg.writeEntry("pattern", uiWidConfig.textEdit_elements->toPlainText());
cg.writeEntry("tooltip", QString::number(uiWidConfig.checkBox_tooltip->checkState()));
cg.writeEntry("tooltipType", QString::number(uiWidConfig.comboBox_tooltipType->currentIndex()));
cg.writeEntry("tooltipWidth", QString::number(uiWidConfig.spinBox_tooltip->value()));
cg.writeEntry("tooltipColor", uiWidConfig.kcolorcombo_tooltipColor->color().name());
cg.writeEntry("background", QString::number(uiWidConfig.checkBox_background->checkState()));
cg.writeEntry("layout", QString::number(uiWidConfig.checkBox_layout->checkState()));
cg.writeEntry("mark", uiWidConfig.comboBox_mark->currentText());
cg.writeEntry("currentFontFamily", uiAppConfig.fontComboBox_fontActive->currentFont().family());
cg.writeEntry("currentFontSize", uiAppConfig.spinBox_fontSizeActive->value());
cg.writeEntry("currentFontColor", uiAppConfig.kcolorcombo_fontColorActive->color().name());
cg.writeEntry("currentFontWeight", uiAppConfig.spinBox_fontWeightActive->value());
cg.writeEntry("currentFontStyle", uiAppConfig.comboBox_fontStyleActive->currentText());
cg.writeEntry("fontFamily", uiAppConfig.fontComboBox_fontInactive->currentFont().family());
cg.writeEntry("fontSize", uiAppConfig.spinBox_fontSizeInactive->value());
cg.writeEntry("fontColor", uiAppConfig.kcolorcombo_fontColorInactive->color().name());
cg.writeEntry("fontWeight", uiAppConfig.spinBox_fontWeightInactive->value());
cg.writeEntry("fontStyle", uiAppConfig.comboBox_fontStyleInactive->currentText());
QStringList indexes;
for (int i=0; i<uiToggleConfig.listWidget_list->count(); i++)
if (uiToggleConfig.listWidget_list->item(i)->checkState() == Qt::Checked)
indexes.append(QString::number(i));
if (indexes.count() == uiToggleConfig.listWidget_list->count())
cg.writeEntry("panels", QString("-1"));
else
cg.writeEntry("panels", indexes.join(QChar(',')));
}
void DesktopPanel::configChanged()
{
if (debug) qDebug() << PDEBUG;
KConfigGroup cg = config();
configuration[QString("pattern")] = cg.readEntry("pattern", "[$fullmark$number/$total: $name]");
configuration[QString("tooltip")] = cg.readEntry("tooltip", "2");
configuration[QString("tooltipType")] = cg.readEntry("tooltipType", "0");
configuration[QString("tooltipWidth")] = cg.readEntry("tooltipWidth", "200");
configuration[QString("tooltipColor")] = cg.readEntry("tooltipColor", "#ffffff");
configuration[QString("background")] = cg.readEntry("background", "2");
configuration[QString("layout")] = cg.readEntry("layout", "0");
configuration[QString("mark")] = cg.readEntry("mark", "¤");
configuration[QString("panels")] = cg.readEntry("panels", "-1");
CFont font = CFont(cg.readEntry("currentFontFamily", "Terminus"));
font.setPointSize(cg.readEntry("currentFontSize", 10));
font.setCurrentColor(QColor(cg.readEntry("currentFontColor", "#ff0000")));
font.setHtmlWeight(cg.readEntry("currentFontWeight", 400));
font.setItalic(cg.readEntry("currentFontStyle", "normal") == QString("italic"));
QString fontStyle;
if (font.italic())
fontStyle = QString("italic");
else
fontStyle = QString("normal");
currentFormatLine[0] = QString("<html><head><style type=\"text/css\">p, li { white-space: pre-wrap; }</style>\
</head><body style=\"font-family:'%1'; font-size:%2pt; font-weight:%3; font-style:%4; color:%5;\">")
.arg(font.family())
.arg(font.pointSize())
.arg(font.htmlWeight())
.arg(fontStyle)
.arg(font.color().name());
currentFormatLine[1] = QString("</body></html>");
font = CFont(cg.readEntry("fontFamily", "Terminus"));
font.setPointSize(cg.readEntry("fontSize", 10));
font.setCurrentColor(QColor(cg.readEntry("fontColor", "#000000")));
font.setHtmlWeight(cg.readEntry("fontWeight", 400));
font.setItalic(cg.readEntry("fontStyle", "normal") == QString("italic"));
if (font.italic())
fontStyle = QString("italic");
else
fontStyle = QString("normal");
formatLine[0] = QString("<html><head><style type=\"text/css\">p, li { white-space: pre-wrap; }</style>\
</head><body style=\"font-family:'%1'; font-size:%2pt; font-weight:%3; font-style:%4; color:%5;\">")
.arg(font.family())
.arg(font.pointSize())
.arg(font.htmlWeight())
.arg(fontStyle)
.arg(font.color().name());
formatLine[1] = QString("</body></html>");
reinit();
}
void DesktopPanel::setFontFormating()
{
if (debug) qDebug() << PDEBUG;
CFont defaultFont = CFont(uiAppConfig.fontComboBox_fontInactive->currentFont().family(),
uiAppConfig.spinBox_fontSizeInactive->value(),
400, false, uiAppConfig.kcolorcombo_fontColorInactive->color());
CFont font = CFontDialog::getFont(i18n("Select font"), defaultFont,
false, false);
QString selectedText = uiWidConfig.textEdit_elements->textCursor().selectedText();
uiWidConfig.textEdit_elements->insertPlainText(QString("<span style=\"color:%1; font-family:'%2'; font-size:%3pt;\">")
.arg(font.color().name()).arg(font.family()).arg(font.pointSize()) +
selectedText + QString("</span>"));
}
void DesktopPanel::setFormating()
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Sender" << sender();
QString selectedText = uiWidConfig.textEdit_elements->textCursor().selectedText();
if (sender() == uiWidConfig.pushButton_tags)
uiWidConfig.textEdit_elements->insertPlainText(QString("$") + uiWidConfig.comboBox_tags->currentText());
else if (sender() == uiWidConfig.pushButton_br)
uiWidConfig.textEdit_elements->insertPlainText(QString("<br>\n"));
else if (sender() == uiWidConfig.pushButton_bold)
uiWidConfig.textEdit_elements->insertPlainText(QString("<b>") + selectedText + QString("</b>"));
else if (sender() == uiWidConfig.pushButton_italic)
uiWidConfig.textEdit_elements->insertPlainText(QString("<i>") + selectedText + QString("</i>"));
else if (sender() == uiWidConfig.pushButton_underline)
uiWidConfig.textEdit_elements->insertPlainText(QString("<u>") + selectedText + QString("</u>"));
else if (sender() == uiWidConfig.pushButton_strike)
uiWidConfig.textEdit_elements->insertPlainText(QString("<s>") + selectedText + QString("</s>"));
else if (sender() == uiWidConfig.pushButton_left)
uiWidConfig.textEdit_elements->insertPlainText(QString("<p align=\"left\">") + selectedText + QString("</p>"));
else if (sender() == uiWidConfig.pushButton_center)
uiWidConfig.textEdit_elements->insertPlainText(QString("<p align=\"center\">") + selectedText + QString("</p>"));
else if (sender() == uiWidConfig.pushButton_right)
uiWidConfig.textEdit_elements->insertPlainText(QString("<p align=\"right\">") + selectedText + QString("</p>"));
else if (sender() == uiWidConfig.pushButton_fill)
uiWidConfig.textEdit_elements->insertPlainText(QString("<p align=\"justify\">") + selectedText + QString("</p>"));
}
#include "desktop-panel.moc"

View File

@ -0,0 +1,125 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef DESKTOP_PANEL_H
#define DESKTOP_PANEL_H
#include <Plasma/Applet>
#include <Plasma/ToolTipContent>
#include <QLabel>
#include <ui_appearance.h>
#include <ui_toggle.h>
#include <ui_widget.h>
class QGraphicsGridLayout;
class QGraphicsProxyWidget;
class QGraphicsScene;
class DesktopPanel;
class CustomPlasmaLabel : public QLabel
{
Q_OBJECT
public:
CustomPlasmaLabel(DesktopPanel *wid,
const int num,
const bool debugCmd = false);
~CustomPlasmaLabel();
int getNumber();
protected:
void enterEvent(QEvent *event);
void mousePressEvent(QMouseEvent *event);
private:
// debug
bool debug;
// variables
int number;
DesktopPanel *widget;
};
class DesktopPanel : public Plasma::Applet
{
Q_OBJECT
typedef struct {
QRect desktop;
QList<WId> desktopId;
QList<QRect> windows;
QList<WId> winId;
} DesktopWindowsInfo;
public:
DesktopPanel(QObject *parent, const QVariantList &args);
~DesktopPanel();
void init();
DesktopWindowsInfo getInfoByDesktop(const int num);
QString parsePattern(const QString rawLine, const int num);
public slots:
// configuration interface
void configAccepted();
void configChanged();
// events
void changePanelsState();
void paintTooltip(const int active);
void setCurrentDesktop(const int number);
private slots:
void reinit();
void setFontFormating();
void setFormating();
void updateText(const int active);
protected:
void createConfigurationInterface(KConfigDialog *parent);
private:
// functions
QList<Plasma::Containment *> getPanels();
QString panelLocationToStr(Plasma::Location loc);
// ui
QGraphicsGridLayout *layout;
QList<QGraphicsProxyWidget *> proxyWidgets;
QList<CustomPlasmaLabel *> labels;
// tooltip
Plasma::ToolTipContent toolTip;
QGraphicsScene *toolTipScene;
QGraphicsView *toolTipView;
// debug
bool debug;
int activeTooltip = -1;
int oldState;
// configuration interface
Ui::AppearanceWidget uiAppConfig;
Ui::ConfigWindow uiWidConfig;
Ui::ToggleWindow uiToggleConfig;
// configuration
QMap<QString, QString> configuration;
QStringList desktopNames, currentFormatLine, formatLine;
};
K_EXPORT_PLASMA_APPLET(desktop-panel, DesktopPanel)
#endif /* DESKTOP_PANEL_H */

View File

@ -0,0 +1,25 @@
[Desktop Entry]
Encoding=UTF-8
Name=Desktop Panel
Comment=A minimalistic Plasmoid
Comment[en]=A minimalistic Plasmoid
Comment[es]=Un plasmoide minimalista
Comment[es]=Un script Plasmoïde minimaliste
Comment[pt_BR]=Um script Plasmoid
Comment[ru]=Минималистичный плазмоид
Comment[uk]=Мінімалістичний плазмоїд
X-KDE-ServiceTypes=Plasma/Applet
Type=Service
Icon=utilities-system-monitor
X-KDE-Library=plasma_applet_desktop-panel
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=desktop-panel
X-KDE-PluginInfo-Version=@PROJECT_VERSION@
X-KDE-PluginInfo-Website=http://arcanis.name/projects/awesome-widgets/
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3
X-KDE-PluginInfo-EnabledByDefault=true

View File

@ -0,0 +1,24 @@
find_package(KDE4 REQUIRED)
find_package(Gettext REQUIRED)
if (NOT GETTEXT_MSGFMT_EXECUTABLE)
message(FATAL_ERROR "Please install the msgfmt binary")
endif (NOT GETTEXT_MSGFMT_EXECUTABLE)
file (GLOB _po_files *.po)
set (_gmoFiles)
foreach (_current_PO_FILE ${_po_files})
get_filename_component (_lang ${_current_PO_FILE} NAME_WE)
set (_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
add_custom_command (OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES/ RENAME plasma_applet_desktop-panel.mo)
list (APPEND _gmoFiles ${_gmoFile})
endforeach (_current_PO_FILE)
add_custom_target (pofiles ALL DEPENDS ${_gmoFiles})

View File

@ -0,0 +1,201 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-12-15 02:41+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: English <kde-russian@lists.kde.ru>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr "Top Edge"
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr "Bottom Edge"
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr "Left Edge"
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr "Right Edge"
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr "Unknown Position (%1)"
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "Widget"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "Appearance"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr "Toggle panels"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Select font"
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr "Active desktop"
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "Font"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "Font size"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "Font color"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "Font weight"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "Font style"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr "Inactive desktop"
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr "To control panels please set widget shortcut."
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr "Mark"
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr "A mark which will be shown if this desktop is active"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Add"
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr "Tooltip width"
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr "px"
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr "Window border color on tooltip"
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr "Enable background"
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "Vertical layout"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Enable tooltip"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Windows"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Contours"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Clean desktop"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "esalexeev@gmail.com"
#~ msgid "Show windows instead of contours"
#~ msgstr "Show windows instead of contours"
#~ msgid "Time interval"
#~ msgstr "Time interval"
#~ msgid "Command to change desktop"
#~ msgstr "Command to change desktop"
#~ msgid "Command which will change the current desktop"
#~ msgstr "Command which will change the current desktop"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Add stretch to left/top of the layout"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Add stretch to right/bottom of the layout"
#~ msgid "Pattern"
#~ msgstr "Pattern"
#~ msgid ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgid "Set font family"
#~ msgstr "Set font family"
#~ msgid "Set font color"
#~ msgstr "Set font color"
#~ msgid "Set font weight"
#~ msgstr "Set font weight"
#~ msgid "Set font style"
#~ msgstr "Set font style"

View File

@ -0,0 +1,167 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Ernesto Avilés Vzqz <whippiii@gmail.com>, 2014.
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-12-15 19:56-0500\n"
"Last-Translator: Ernesto Avilés Vázquez\n"
"Language-Team: Spanish <kde-i18n-doc@kde.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr "Borde superior"
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr "Borde inferior"
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr "Borde izquierdo"
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr "Borde derecho"
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr "Posición desconocida (%1)"
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "Widget"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "Apariencia"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr "Conmutar paneles"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Elegir tipo de letra"
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr "Escritorio activo"
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "Tipo de letra"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "Tamaño de letra"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "Color de letra"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "Grosor de letra"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "Estilo de letra"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr "Escritorio inactivo"
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr ""
"Para controlar los paneles establece el atajo del teclado para el widget."
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr "Marca"
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr "Una marca será mostrada si este escritorio está activo"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Añadir"
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr "Ancho de la ventana emergente"
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr "px"
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr "Color del borde de la ventana emergente"
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr "Habilitar fondo"
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "Orientación vertical"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Habilitar ventana emergente"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Ventanas"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Contornos"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Limpiar escritorio"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Tu nombre"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "Tu email"
#~ msgid "Time interval"
#~ msgstr "Intervalo de tiempo"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Añadir extensión a la izquierda/superior de la distribución"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Añadir extensión a la derecha/inferior de la distribución"

View File

@ -0,0 +1,40 @@
#!/bin/sh
BASEDIR="../" # root of translatable sources
PROJECT="plasma_applet_desktop-panel" # project name
BUGADDR="https://github.com/arcan1s/awesome-widgets/issues" # MSGID-Bugs
WDIR=`pwd` # working dir
echo "Preparing rc files"
cd "${BASEDIR}"
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' -o -name '*.py' | sort > "${WDIR}/rcfiles.list"
xargs --arg-file=${WDIR}/rcfiles.list extractrc > "${WDIR}/rc.cpp"
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> "${WDIR}/rc.cpp"
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> "${WDIR}/rc.cpp"
echo "Done preparing rc files"
echo "Extracting messages"
cd "${WDIR}"
cd "${BASEDIR}"
find . -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.py' | sort > "${WDIR}/infiles.list"
echo "rc.cpp" >> "${WDIR}/infiles.list"
cd "${WDIR}"
xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" --language=Python \
--files-from=infiles.list -D "${BASEDIR}" -D "${WDIR}" -o "${PROJECT}.pot" || { echo "error while calling xgettext. aborting."; exit 1; }
echo "Done extracting messages"
echo "Merging translations"
catalogs=$(find . -name '*.po')
for cat in $catalogs; do
echo $cat
msgmerge -o "$cat.new" "$cat" "${PROJECT}.pot"
mv "$cat.new" "$cat"
done
echo "Done merging translations"
echo "Cleaning up"
cd "${WDIR}"
rm -f rcfiles.list infiles.list rc.cpp
echo "Done"

View File

@ -0,0 +1,167 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
# Mermouy <mermouy@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-06-05 19:24+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: French <kde-french@lists.kde.ru>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr ""
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr ""
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr ""
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr ""
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr ""
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "Widget"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "Apparence"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr ""
#: desktop-panel.cpp:596
msgid "Select font"
msgstr ""
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr ""
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "Police"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "Taille de la police"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "Couleur de la police"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "Épaisseur de la police"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "Style de la police"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr ""
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr ""
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr ""
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr ""
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr ""
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr ""
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr ""
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr ""
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr ""
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr ""
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr ""
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr ""
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "Positionnement vertical"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr ""
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr ""
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr ""
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr ""
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "esalexeev@gmail.com"
#~ msgid "Time interval"
#~ msgstr "Intervalle"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Étirer le positionnement vers haut/gauche"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Étirer le positionnement vers bas/droite"

View File

@ -0,0 +1,156 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr ""
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr ""
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr ""
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr ""
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr ""
#: desktop-panel.cpp:473
msgid "Widget"
msgstr ""
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr ""
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr ""
#: desktop-panel.cpp:596
msgid "Select font"
msgstr ""
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr ""
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr ""
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr ""
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr ""
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr ""
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr ""
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr ""
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr ""
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr ""
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr ""
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr ""
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr ""
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr ""
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr ""
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr ""
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr ""
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr ""
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr ""
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr ""
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr ""
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr ""
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr ""
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr ""
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr ""
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr ""

View File

@ -0,0 +1,168 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-12-24 00:05+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Brazilian Portuguese <kde-russian@lists.kde.ru>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 1.5\n"
"X-Language: pt_BR\n"
"X-Source-Language: C\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr "Canto do topo"
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr "Canto de baixo"
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr "Canto esquerdo"
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr "Canto direito"
#: desktop-panel.cpp:201
#, qt-format
msgid "Unknown Position (%1)"
msgstr "Posição desconhecida (%1)"
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "Widget"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "Aparência"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr "Ativar painéis"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Selecionar fonte"
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr "Desktop ativo"
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "Fonte"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "Tamanho da fonte"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "Cor da fonte"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "Grossura da fonte"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "Estilo da fonte"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr "Desktop inativo"
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr "Para controlar paines por favor defina o atalho do widget"
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr "Marca"
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr "Uma marca a ser mostrada se este desktop estiver ativo"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Adicionar"
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr "Largura da dica de contexto"
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr "px"
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr "Cor da borda de janela na dica de contexto"
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr "Ativar plano de fundo"
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "Layout vertical"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Ativar dica de contexto"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Janelas"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Contornos"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Limpar desktop"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "under"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "under@insicuri.net"
#~ msgid "Time interval"
#~ msgstr "Intervalo de tempo"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Adicionar esticamento à esquerda/topo do layout"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Adicionar esticamento à direita/inferior do layout"

View File

@ -0,0 +1,189 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-12-15 02:41+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr "Верхний край"
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr "Нижний край"
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr "Левый край"
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr "Правый край"
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr "Неизвестное положение (%1)"
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "Виджет"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "Внешний вид"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr "Скрыть панели"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Выберете шрифт"
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr "Активный рабочий стол"
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "Шрифт"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "Размер шрифта"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "Цвет шрифта"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "Толщина шрифта"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "Стиль шрифта"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr "Неактивный рабочий стол"
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr "Чтобы управлять панелями, настройте комбинацию клавиш."
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr "Метка"
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr "Метка, которая будет показана, если данный рабочий стол активен"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Добавить"
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr "Ширина тултипа"
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr "px"
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr "Цвет границ окна в тултипе"
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr "Включить фон"
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "Вертикальная разметка"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Включить тултип"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Окна"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Контуры"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Пустой рабочий стол"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Evgeniy Alekseev"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "esalexeev@gmail.com"
#~ msgid "Show windows instead of contours"
#~ msgstr "Показывать окна вместо контуров"
#~ msgid "Time interval"
#~ msgstr "Интервал обновления"
#~ msgid "Command to change desktop"
#~ msgstr "Команда"
#~ msgid "Command which will change the current desktop"
#~ msgstr "Команда которая изменит текущий рабочий стол"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Добавить пустое место слева/сверху виджета"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Добавить пустое место справа/снизу виджета"
#~ msgid "Pattern"
#~ msgstr "Шаблон"
#~ msgid ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$mark - показать метку, если данный рабочий стол активен\n"
#~ "$name - имя рабочего стола\n"
#~ "$number - номер рабочего стола\n"
#~ "$total - общее число рабочий столов"

View File

@ -0,0 +1,167 @@
# Copyright (C) 2014
# This file is distributed under the same license as the PyTextMonitor package.
#
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-06-06 01:23+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Ukrainian <kde-ukrainian@lists.kde.ru>\n"
"Language: ua\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr "Верхній край"
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr "Нижній край"
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr "Лівий край"
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr "Правий край"
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr "Невідоме положення (%1)"
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "Віджет"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "Зовнішній вигляд"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr "Перемикання панелей"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Вибрати шрифт"
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr "Активний робочий стіл"
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "Шрифт"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "Розмір шрифту"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "Колір шрифту"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "Ширина шрифту"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "Стиль шрифту"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr "Неактивний робочий стіл"
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr "Для управління панелями будьдаска встановіть комбінацію клавіш для віджету"
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr "Позначка"
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr "Позначка, що буде показана, якщо цей робочий стіл є активним"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Додати"
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr "Ширина підказки"
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr "px"
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr "Колір границі вікна підказки"
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr "Включити фон"
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "Вертикальна розмітка"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Включити підказки"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Вікна"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Контури"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Очистити робочий стіл"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Slobodyan Victor"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "sarumyan@i.ua"
#~ msgid "Time interval"
#~ msgstr "Інтервал оновлення"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Додати порожнє місце ліворуч/вгорі віджету"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Додати порожнє місце праворуч/внизу віджету"

View File

@ -0,0 +1,187 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Steve Lemuel <wlemuel@hotmail.com>, 2014.
# Evgeniy Alekseev <esalexeev@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-15 10:04+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: American English <kde-russian@lists.kde.ru>\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:193
msgid "Top Edge"
msgstr "顶部边缘"
#: desktop-panel.cpp:195
msgid "Bottom Edge"
msgstr "底部边缘"
#: desktop-panel.cpp:197
msgid "Left Edge"
msgstr "左端边缘"
#: desktop-panel.cpp:199
msgid "Right Edge"
msgstr "右端边缘"
#: desktop-panel.cpp:201
msgid "Unknown Position (%1)"
msgstr "未知位置(%1"
#: desktop-panel.cpp:473
msgid "Widget"
msgstr "窗口小部件"
#: desktop-panel.cpp:474
msgid "Appearance"
msgstr "外观"
#: desktop-panel.cpp:475
msgid "Toggle panels"
msgstr "控制面板状态切换(显示/隐藏)"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "选择字体"
#: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop"
msgstr "当前激活桌面"
#: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font"
msgstr "字体"
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
msgid "Font size"
msgstr "字体大小"
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
msgid "Font color"
msgstr "字体颜色"
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
msgid "Font weight"
msgstr "字体宽度"
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
msgid "Font style"
msgstr "字体样式"
#: po/rc.cpp:21 rc.cpp:21
msgid "Inactive desktop"
msgstr "未激活桌面"
#: po/rc.cpp:39 rc.cpp:39
msgid "To control panels please set widget shortcut."
msgstr "设置控制面板的快捷键"
#: po/rc.cpp:42 rc.cpp:42
msgid "Mark"
msgstr "标记"
#: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active"
msgstr "当前桌面处于激活状态下,该当标记显示。 "
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "添加"
#: po/rc.cpp:63 rc.cpp:63
msgid "Tooltip width"
msgstr ""
#: po/rc.cpp:66 rc.cpp:66
msgid "px"
msgstr ""
#: po/rc.cpp:69 rc.cpp:69
msgid "Window border color on tooltip"
msgstr ""
#: po/rc.cpp:72 rc.cpp:72
msgid "Enable background"
msgstr "启用背景"
#: po/rc.cpp:75 rc.cpp:75
msgid "Vertical layout"
msgstr "垂直布局"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr ""
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr ""
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr ""
#: po/rc.cpp:87 rc.cpp:87
#, fuzzy
msgid "Clean desktop"
msgstr "当前激活桌面"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "用户名"
#: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "用户邮箱"
#~ msgid "Time interval"
#~ msgstr "时间间隔"
#~ msgid "Command to change desktop"
#~ msgstr "桌面切换命令"
#~ msgid "Command which will change the current desktop"
#~ msgstr "当前桌面更改命令"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "添加左上角拉伸"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "添加右下角拉伸"
#~ msgid "Pattern"
#~ msgstr "样式"
#~ msgid ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$mark - 当前桌面处于激活状态时,显示标记\n"
#~ "$name - 桌面名称\n"
#~ "$number - 桌面数量\n"
#~ "$total - 桌面总数量"

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ToggleWindow</class>
<widget class="QWidget" name="ToggleWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>343</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>320</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Toggle</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>464</width>
<height>327</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_info">
<property name="text">
<string>To control panels please set widget shortcut.</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_list"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,472 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfigWindow</class>
<widget class="QWidget" name="ConfigWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>721</width>
<height>420</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>320</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Widget</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="9" column="0">
<layout class="QHBoxLayout" name="layout_mark">
<item>
<widget class="QLabel" name="label_mark">
<property name="text">
<string>Mark</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_mark">
<property name="toolTip">
<string>A mark which will be shown if this desktop is active</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">#</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">$</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">%</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">&amp;</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">*</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">@</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">¤</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">¶</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">·</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">º</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">×</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">†</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">•</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">(current)</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="layput_mainFormating">
<item>
<widget class="QPushButton" name="pushButton_font">
<property name="text">
<string>Font</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_br">
<property name="icon">
<iconset theme="stock_text_indent">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainFormatingCenter1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_bold">
<property name="icon">
<iconset theme="format-text-bold">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
<property name="shortcut">
<string>Ctrl+B</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_italic">
<property name="icon">
<iconset theme="format-text-italic">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
<property name="shortcut">
<string>Ctrl+I</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_underline">
<property name="icon">
<iconset theme="format-text-underline">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
<property name="shortcut">
<string>Ctrl+U</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_strike">
<property name="icon">
<iconset theme="format-text-strikethrough">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainFormatingCenter2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_left">
<property name="icon">
<iconset theme="format-justify-left">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_center">
<property name="icon">
<iconset theme="format-justify-center">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_right">
<property name="icon">
<iconset theme="format-justify-right">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_fill">
<property name="icon">
<iconset theme="format-justify-fill">
<normaloff>../awesome-widget</normaloff>../awesome-widget</iconset>
</property>
</widget>
</item>
<item>
<spacer name="spacer_mainFormatingCenter3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="comboBox_tags">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string notr="true">fullmark</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mark</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">name</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">number</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">total</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_tags">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QTextEdit" name="textEdit_elements">
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="layout_tooltip">
<item>
<widget class="QLabel" name="label_tooltip">
<property name="text">
<string>Tooltip width</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_tooltip">
<property name="suffix">
<string>px</string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>25</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout" name="layout_tooltipColor">
<item>
<widget class="QLabel" name="label_tooltipColor">
<property name="text">
<string>Window border color on tooltip</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_tooltipColor"/>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="layout_background">
<item>
<spacer name="spacer_background">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_background">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable background</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="layout_layout">
<item>
<spacer name="spacer_layout">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_layout">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Vertical layout</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="layout_tooltip_2">
<item>
<widget class="QCheckBox" name="checkBox_tooltip">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Enable tooltip</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_tooltipType">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Windows</string>
</property>
</item>
<item>
<property name="text">
<string>Contours</string>
</property>
</item>
<item>
<property name="text">
<string>Clean desktop</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -1,27 +1,39 @@
# set project name
set (SUBPROJECT plasma_engine_extsysmon)
set (PLUGIN_NAME ${SUBPROJECT})
message (STATUS "Subproject ${SUBPROJECT}")
# find required libaries
find_package (KDE4 REQUIRED)
include (KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR})
set (PLUGIN_NAME ${SUBPROJECT})
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB SUBPROJECT_SOURCE *.cpp)
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp)
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
file (GLOB SUBPROJECT_UI *.ui)
file (GLOB SUBPROJECT_CONF *.conf)
set (SUBPROJECT_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/scripts)
# prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
# make
kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE})
qt4_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER})
kde4_add_ui_files (SUBPROJECT_SOURCE ${SUBPROJECT_UI})
kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE} ${TASK_MOC_SOURCE})
target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS})
# install
install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
install (FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR})
install (DIRECTORY ${SUBPROJECT_SCRIPTS} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME} USE_SOURCE_PERMISSIONS)

View File

@ -0,0 +1,351 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "extscript.h"
#include "ui_extscript.h"
#include <QDebug>
#include <QDir>
#include <QSettings>
#include <QTextCodec>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
ExtScript::ExtScript(QWidget *parent, const QString scriptName, const QStringList directories, const bool debugCmd) :
QDialog(parent),
fileName(scriptName),
dirs(directories),
debug(debugCmd),
ui(new Ui::ExtScript)
{
_name = fileName;
readConfiguration();
ui->setupUi(this);
}
ExtScript::~ExtScript()
{
if (debug) qDebug() << PDEBUG;
delete ui;
}
QString ExtScript::getComment()
{
if (debug) qDebug() << PDEBUG;
return _comment;
}
QString ExtScript::getExec()
{
if (debug) qDebug() << PDEBUG;
return _exec;
}
QString ExtScript::getFileName()
{
if (debug) qDebug() << PDEBUG;
return fileName;
}
int ExtScript::getInterval()
{
if (debug) qDebug() << PDEBUG;
return _interval;
}
QString ExtScript::getName()
{
if (debug) qDebug() << PDEBUG;
return _name;
}
QString ExtScript::getPrefix()
{
if (debug) qDebug() << PDEBUG;
return _prefix;
}
ExtScript::Redirect ExtScript::getRedirect()
{
if (debug) qDebug() << PDEBUG;
return _redirect;
}
QString ExtScript::getStrRedirect()
{
if (debug) qDebug() << PDEBUG;
QString value;
switch (_redirect) {
case stdout2stderr:
value = QString("stdout2stderr");
break;
case stderr2stdout:
value = QString("stderr2stdout");
break;
default:
value = QString("nothing");
break;
}
return value;
}
bool ExtScript::hasOutput()
{
if (debug) qDebug() << PDEBUG;
return _output;
}
bool ExtScript::isActive()
{
if (debug) qDebug() << PDEBUG;
return _active;
}
void ExtScript::setActive(const bool state)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
_active = state;
}
void ExtScript::setComment(const QString comment)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Comment" << comment;
_comment = comment;
}
void ExtScript::setExec(const QString exec)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Executable" << exec;
_exec = exec;
}
void ExtScript::setHasOutput(const bool state)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
_output = state;
}
void ExtScript::setInterval(const int interval)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Interval" << interval;
if (interval <= 0) return;
_interval = interval;
}
void ExtScript::setName(const QString name)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Name" << name;
_name = name;
}
void ExtScript::setPrefix(const QString prefix)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Prefix" << prefix;
_prefix = prefix;
}
void ExtScript::setRedirect(const QString redirect)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Redirect" << redirect;
if (redirect == QString("stdout2sdterr"))
_redirect = stdout2stderr;
else if (redirect == QString("stderr2sdtout"))
_redirect = stderr2stdout;
else
_redirect = nothing;
}
void ExtScript::readConfiguration()
{
if (debug) qDebug() << PDEBUG;
for (int i=dirs.count()-1; i>=0; i--) {
if (!QDir(dirs[i]).entryList(QDir::Files).contains(fileName)) continue;
QSettings settings(dirs[i] + QDir::separator() + fileName, QSettings::IniFormat);
settings.beginGroup(QString("Desktop Entry"));
setName(settings.value(QString("Name"), _name).toString());
setComment(settings.value(QString("Comment"), _comment).toString());
setExec(settings.value(QString("Exec"), _exec).toString());
setPrefix(settings.value(QString("X-AW-Prefix"), _prefix).toString());
setActive(settings.value(QString("X-AW-Active"), QVariant(_active).toString()).toString() == QString("true"));
setHasOutput(settings.value(QString("X-AW-Output"), QVariant(_output).toString()).toString() == QString("true"));
setRedirect(settings.value(QString("X-AW-Redirect"), getStrRedirect()).toString());
setInterval(settings.value(QString("X-AW-Interval"), _interval).toInt());
settings.endGroup();
}
if (!_output)
setRedirect(QString("stdout2stderr"));
}
ExtScript::ScriptData ExtScript::run(const int time)
{
if (debug) qDebug() << PDEBUG;
ScriptData response;
response.active = _active;
response.name = _name;
response.refresh = false;
if (!_active) return response;
if (time != _interval) return response;
response.refresh = true;
QStringList cmdList;
if (!_prefix.isEmpty())
cmdList.append(_prefix);
cmdList.append(_exec);
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmdList.join(QChar(' '));
TaskResult process = runTask(cmdList.join(QChar(' ')));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString info = QString::number(process.exitCode) + QString(":") +
QTextCodec::codecForMib(106)->toUnicode(process.error).trimmed();
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
switch(_redirect) {
case stdout2stderr:
if (debug) qDebug() << PDEBUG << ":" << "Debug" << info;
if (debug) qDebug() << PDEBUG << ":" << "Output" << qoutput;
break;
case stderr2stdout:
response.output = info + QString("\t") + qoutput;
break;
default:
if (debug) qDebug() << PDEBUG << ":" << "Debug" << info;
response.output = qoutput;
break;
}
return response;
}
void ExtScript::showConfiguration()
{
if (debug) qDebug() << PDEBUG;
ui->lineEdit_name->setText(_name);
ui->lineEdit_comment->setText(_comment);
ui->lineEdit_command->setText(_exec);
ui->lineEdit_prefix->setText(_prefix);
if (_active)
ui->checkBox_active->setCheckState(Qt::Checked);
else
ui->checkBox_active->setCheckState(Qt::Unchecked);
if (_output)
ui->checkBox_output->setCheckState(Qt::Checked);
else
ui->checkBox_output->setCheckState(Qt::Unchecked);
ui->comboBox_redirect->setCurrentIndex((int)_redirect);
ui->spinBox_interval->setValue(_interval);
int ret = exec();
if (ret != 1) return;
setName(ui->lineEdit_name->text());
setComment(ui->lineEdit_comment->text());
setExec(ui->lineEdit_command->text());
setPrefix(ui->lineEdit_prefix->text());
setActive(ui->checkBox_active->checkState() == Qt::Checked);
setHasOutput(ui->checkBox_output->checkState() == Qt::Checked);
setRedirect(ui->comboBox_redirect->currentText());
setInterval(ui->spinBox_interval->value());
writeConfiguration();
}
void ExtScript::tryDelete()
{
if (debug) qDebug() << PDEBUG;
for (int i=0; i<dirs.count(); i++)
if (debug) qDebug() << PDEBUG << ":" << "Remove file" << dirs[i] + QDir::separator() + fileName <<
QFile::remove(dirs[i] + QDir::separator() + fileName);
}
void ExtScript::writeConfiguration()
{
if (debug) qDebug() << PDEBUG;
QSettings settings(dirs[0] + QDir::separator() + fileName, QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("Encoding"), QString("UTF-8"));
settings.setValue(QString("Name"), _name);
settings.setValue(QString("Comment"), _comment);
settings.setValue(QString("Exec"), _exec);
settings.setValue(QString("X-AW-Prefix"), _prefix);
settings.setValue(QString("X-AW-Active"), QVariant(_active).toString());
settings.setValue(QString("X-AW-Output"), QVariant(_active).toString());
settings.setValue(QString("X-AW-Redirect"), getStrRedirect());
settings.setValue(QString("X-AW-Interval"), _interval);
settings.endGroup();
settings.sync();
}

View File

@ -0,0 +1,94 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef EXTSCRIPT_H
#define EXTSCRIPT_H
#include <QDialog>
namespace Ui {
class ExtScript;
}
class ExtScript : public QDialog
{
Q_OBJECT
public:
enum Redirect {
stdout2stderr = 0,
nothing,
stderr2stdout
};
typedef struct {
bool active;
QString name;
QString output;
bool refresh;
} ScriptData;
explicit ExtScript(QWidget *parent = 0, const QString scriptName = QString(),
const QStringList directories = QStringList(), const bool debugCmd = false);
~ExtScript();
// get methods
QString getComment();
QString getExec();
QString getFileName();
int getInterval();
QString getName();
QString getPrefix();
Redirect getRedirect();
QString getStrRedirect();
bool hasOutput();
bool isActive();
// set methods
void setActive(const bool state = true);
void setComment(const QString comment = QString("empty"));
void setExec(const QString exec = QString("/usr/bin/true"));
void setHasOutput(const bool state = true);
void setInterval(const int interval = 1);
void setName(const QString name = QString("none"));
void setPrefix(const QString prefix = QString(""));
void setRedirect(const QString redirect = QString("nothing"));
public slots:
void readConfiguration();
ScriptData run(const int time);
void showConfiguration();
void tryDelete();
void writeConfiguration();
private:
QString fileName;
QStringList dirs;
bool debug;
Ui::ExtScript *ui;
// properties
bool _active = true;
QString _comment = QString("empty");
QString _exec = QString("/usr/bin/true");
int _interval = 1;
QString _name = QString("none");
bool _output = true;
QString _prefix = QString("");
Redirect _redirect = nothing;
};
#endif /* EXTSCRIPT_H */

View File

@ -0,0 +1,283 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ExtScript</class>
<widget class="QDialog" name="ExtScript">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>420</width>
<height>301</height>
</rect>
</property>
<property name="windowTitle">
<string>Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layout_name">
<item>
<widget class="QLabel" name="label_name">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_name"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_comment">
<item>
<widget class="QLabel" name="label_comment">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Comment</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_comment"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_command">
<item>
<widget class="QLabel" name="label_command">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Command</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_command"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_prefix">
<item>
<widget class="QLabel" name="label_prefix">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Prefix</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_prefix"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_active">
<item>
<spacer name="spacer_active">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_active">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Active</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_output">
<item>
<spacer name="spacer_output">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_output">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Has output</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_redirect">
<item>
<widget class="QLabel" name="label_redirect">
<property name="text">
<string>Redirect</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_redirect">
<item>
<property name="text">
<string notr="true">stdout2stderr</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">nothing</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">stderr2stdout</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_interval">
<item>
<widget class="QLabel" name="label_interval">
<property name="text">
<string>Interval</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_interval">
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ExtScript</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ExtScript</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -1,20 +1,24 @@
# Configuration file for Extended Systemmonitor DataEngine
# Uncomment needed lines
# $kdehome/share/config/extsysmon.conf
# Custom command
#CUSTOM=wget -qO- http://ifconfig.me/ip
# ACPI devices
#ACPIPATH=/sys/class/power_supply/
# Set GPU device
# May be 'nvidia' (for nvidia), 'ati' (for ATI RADEON), 'ignore' or 'auto'
# May be 'nvidia' (for nvidia), 'ati' (for ATI RADEON), 'disable' or 'auto'
#GPUDEV=auto
# Set block device for hddtemp comma separated or use 'all'
# Set block device for hddtemp comma separated or use 'all' or 'disable'
#HDDDEV=all
# Set MPD settings
#MPDADDRESS=localhost
#MPDPORT=6600
# MPRIS player name or 'auto'. In the most cases it should be a player name
# DBus path is org.mpris.MediaPlayer2.amarok
#MPRIS=auto
# Package upgrade info
## from vicious
## Arch: PKGCMD=pacman -Qu PKGNULL=0
@ -27,3 +31,6 @@
#PKGCMD=pacman -Qu
# Number of null lines for commands, comma separated
#PKGNULL=0
# Player name. Supported players are 'mpd', 'mpris'
#PLAYER=mpris

View File

@ -1,18 +1,18 @@
/***************************************************************************
* This file is part of pytextmonitor *
* This file is part of awesome-widgets *
* *
* pytextmonitor is free software: you can redistribute it and/or *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* pytextmonitor is distributed in the hope that it will be useful, *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with pytextmonitor. If not, see http://www.gnu.org/licenses/ *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
@ -21,110 +21,191 @@
#include <Plasma/DataContainer>
#include <KDE/KGlobal>
#include <KDE/KStandardDirs>
#include <KDE/KWindowSystem>
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QProcess>
#include <QProcessEnvironment>
#include <QRegExp>
#include <QTextCodec>
#include <QThread>
#include <extscript.h>
#include <pdebug/pdebug.h>
#include <task/taskadds.h>
ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args)
: Plasma::DataEngine(parent, args)
{
Q_UNUSED(args)
Q_UNUSED(args);
// debug
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
if (debugEnv == QString("yes"))
debug = true;
else
debug = false;
setMinimumPollingInterval(333);
readConfiguration();
initScripts();
}
QString ExtendedSysMon::getAllHdd()
{
QProcess command;
if (debug) qDebug() << PDEBUG;
QStringList devices;
QString qoutput = QString("");
QString dev;
command.start("find /dev -name [hs]d[a-z]");
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
dev = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i];
devices.append(dev);
}
QString cmd = QString("find /dev -name [hms]d[a-z]");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++)
devices.append(qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]);
if (debug) qDebug() << PDEBUG << ":" << "Device list" << devices;
return devices.join(QChar(','));
}
QString ExtendedSysMon::getAutoGpu()
{
QProcess command;
QString gpu = QString("");
QString qoutput = QString("");
command.start("lspci");
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
if (debug) qDebug() << PDEBUG;
QString gpu = QString("disable");
QString cmd = QString("lspci");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
if (qoutput.toLower().contains("nvidia"))
gpu = QString("nvidia");
else if (qoutput.toLower().contains("radeon"))
gpu = QString("ati");
if (debug) qDebug() << PDEBUG << ":" << "Device" << gpu;
return gpu;
}
QString ExtendedSysMon::getAutoMpris()
{
if (debug) qDebug() << PDEBUG;
QString mpris;
QString cmd = QString("bash -c \"qdbus 'org.mpris.MediaPlayer2.*'\"");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(cmd);
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
if (qoutput.split(QChar('\n'))[0].split(QChar('.')).count() > 3)
mpris = qoutput.split(QChar('\n'))[0].split(QChar('.'))[3];
if (debug) qDebug() << PDEBUG << ":" << "Player found" << mpris;
return mpris;
}
void ExtendedSysMon::initScripts()
{
if (debug) qDebug() << PDEBUG;
// create directory at $HOME
QString localDir = KStandardDirs::locateLocal("data", "plasma_engine_extsysmon/scripts");
if (KStandardDirs::makeDir(localDir))
if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
QStringList names;
for (int i=0; i<dirs.count(); i++) {
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
for (int j=0; j<files.count(); j++) {
if (!files[j].endsWith(QString(".desktop"))) continue;
if (names.contains(files[j])) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
names.append(files[j]);
externalScripts.append(new ExtScript(0, files[j], dirs, debug));
times.append(1);
}
}
}
QStringList ExtendedSysMon::sources() const
{
if (debug) qDebug() << PDEBUG;
QStringList source;
source.append(QString("battery"));
source.append(QString("custom"));
source.append(QString("desktop"));
source.append(QString("gpu"));
source.append(QString("gputemp"));
source.append(QString("hddtemp"));
source.append(QString("pkg"));
source.append(QString("player"));
source.append(QString("ps"));
if (debug) qDebug() << PDEBUG << ":" << "Sources" << source;
return source;
}
void ExtendedSysMon::readConfiguration()
{
if (debug) qDebug() << PDEBUG;
// pre-setup
QMap<QString, QString> rawConfig;
rawConfig[QString("CUSTOM")] = QString("wget -qO- http://ifconfig.me/ip");
rawConfig[QString("ACPIPATH")] = QString("/sys/class/power_supply/");
rawConfig[QString("GPUDEV")] = QString("auto");
rawConfig[QString("HDDDEV")] = QString("all");
rawConfig[QString("HDDTEMPCMD")] = QString("sudo hddtemp");
rawConfig[QString("MPDADDRESS")] = QString("localhost");
rawConfig[QString("MPDPORT")] = QString("6600");
rawConfig[QString("MPRIS")] = QString("auto");
rawConfig[QString("PKGCMD")] = QString("pacman -Qu");
rawConfig[QString("PKGNULL")] = QString("0");
rawConfig[QString("PLAYER")] = QString("mpris");
QString fileName = KGlobal::dirs()->findResource("config", "extsysmon.conf");
QFile confFile(fileName);
bool ok = confFile.open(QIODevice::ReadOnly);
if (!ok) {
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
QFile configFile(fileName);
if (!configFile.open(QIODevice::ReadOnly)) {
configuration = updateConfiguration(rawConfig);
return;
}
QString fileStr;
QStringList value;
while (true) {
fileStr = QString(confFile.readLine()).trimmed();
if (fileStr[0] == QChar('#')) continue;
if (fileStr[0] == QChar(';')) continue;
fileStr = QString(configFile.readLine()).trimmed();
if ((fileStr.isEmpty()) && (!configFile.atEnd())) continue;
if ((fileStr[0] == QChar('#')) && (!configFile.atEnd())) continue;
if ((fileStr[0] == QChar(';')) && (!configFile.atEnd())) continue;
if (fileStr.contains(QChar('='))) {
value.clear();
for (int i=1; i<fileStr.split(QChar('=')).count(); i++)
value.append(fileStr.split(QChar('='))[i]);
rawConfig[fileStr.split(QChar('='))[0]] = value.join(QChar('='));
}
if (confFile.atEnd())
break;
if (configFile.atEnd()) break;
}
confFile.close();
configFile.close();
configuration = updateConfiguration(rawConfig);
return;
}
QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, QString> rawConfig)
{
if (debug) qDebug() << PDEBUG;
QMap<QString, QString> config;
QString key, value;
// remove spaces and copy source map
@ -132,351 +213,400 @@ QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, Q
key = rawConfig.keys()[i];
value = rawConfig[key];
key.remove(QChar(' '));
if ((key != QString("CUSTOM")) && (key != QString("PKGCMD")))
if ((key != QString("HDDTEMPCMD")) &&
(key != QString("PKGCMD")))
value.remove(QChar(' '));
config[key] = value;
}
// update values
if (config[QString("GPUDEV")] == QString("auto"))
// gpudev
if (config[QString("GPUDEV")] == QString("disable"))
config[QString("GPUDEV")] = QString("disable");
else if (config[QString("GPUDEV")] == QString("auto"))
config[QString("GPUDEV")] = getAutoGpu();
else if ((config[QString("GPUDEV")] != QString("ati")) &&
(config[QString("GPUDEV")] != QString("nvidia")))
config[QString("GPUDEV")] = getAutoGpu();
// hdddev
if (config[QString("HDDDEV")] == QString("all"))
config[QString("HDDDEV")] = getAllHdd();
else if (config[QString("HDDDEV")] == QString("disable"))
config[QString("HDDDEV")] = QString("");
else {
QStringList deviceList = config[QString("HDDDEV")].split(QChar(','), QString::SkipEmptyParts);
QStringList devices;
QRegExp diskRegexp = QRegExp("/dev/[hms]d[a-z]$");
for (int i=0; i<deviceList.count(); i++)
if ((QFile::exists(deviceList[i])) &&
(diskRegexp.indexIn(deviceList[i]) > -1))
devices.append(deviceList[i]);
if (devices.isEmpty())
config[QString("HDDDEV")] = getAllHdd();
else
config[QString("HDDDEV")] = devices.join(QChar(','));
}
// pkgcmd
for (int i=config[QString("PKGNULL")].split(QString(","), QString::SkipEmptyParts).count();
i<config[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts).count()+1;
i++)
config[QString("PKGNULL")] += QString(",0");
// player
if ((config[QString("PLAYER")] != QString("mpd")) &&
(config[QString("PLAYER")] != QString("mpris")))
config[QString("PLAYER")] = QString("mpris");
for (int i=0; i<config.keys().count(); i++)
if (debug) qDebug() << PDEBUG << ":" <<
config.keys()[i] + QString("=") + config[config.keys()[i]];
return config;
}
QString ExtendedSysMon::getCustomCmd(const QString cmd)
QMap<QString, QVariant> ExtendedSysMon::getBattery(const QString acpiPath)
{
QProcess command;
QString qoutput = QString("");
command.start(QString("bash -c \"") + cmd + QString("\""));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput()).trimmed();
return qoutput;
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "ACPI path" << acpiPath;
QMap<QString, QVariant> battery;
battery[QString("ac")] = false;
battery[QString("bat")] = 0;
QFile acFile(acpiPath + QString("/AC/online"));
if (acFile.open(QIODevice::ReadOnly)) {
if (QString(acFile.readLine()).trimmed().toInt() == 1)
battery[QString("ac")] = true;
}
acFile.close();
// batterites
QStringList allDevices = QDir(acpiPath).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
QStringList batDevices;
QRegExp batRegexp = QRegExp(QString("BAT.*"));
for (int i=0; i<allDevices.count(); i++)
if (allDevices[i].contains(batRegexp))
batDevices.append(allDevices[i]);
for (int i=0; i<batDevices.count(); i++) {
QFile batFile(acpiPath + QString("/") + batDevices[i] + QString("/capacity"));
if (batFile.open(QIODevice::ReadOnly))
battery[QString("bat") + QString::number(i)] = QString(batFile.readLine()).trimmed().toInt();
batFile.close();
}
float number = 0.0;
float average = 0.0;
for (int i=0; i<battery.keys().count(); i++) {
if (battery.keys()[i] == QString("ac")) continue;
if (battery.keys()[i] == QString("bat")) continue;
average += battery[battery.keys()[i]].toInt();
number++;
}
battery[QString("bat")] = int(average / number);
return battery;
}
QMap<QString, QVariant> ExtendedSysMon::getCurrentDesktop()
{
if (debug) qDebug() << PDEBUG;
int number = KWindowSystem::currentDesktop();
int total = KWindowSystem::numberOfDesktops();
QMap<QString, QVariant> currentDesktop;
currentDesktop[QString("currentName")] = KWindowSystem::desktopName(number);
currentDesktop[QString("currentNumber")] = number;
QStringList list;
for (int i=1; i<total+1; i++)
list.append(KWindowSystem::desktopName(i));
currentDesktop[QString("list")] = list.join(QString(";;"));
currentDesktop[QString("number")] = total;
return currentDesktop;
}
float ExtendedSysMon::getGpu(const QString device)
{
float gpu = 0.0;
if ((device != QString("nvidia")) && (device != QString("ati")))
return gpu;
QProcess command;
QString qoutput;
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Device" << device;
if (device == QString("nvidia")) {
command.start(QString("nvidia-smi -q -d UTILIZATION"));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
float value = 0.0;
if ((device != QString("nvidia")) && (device != QString("ati")))
return value;
QString cmd = QString("");
if (device == QString("nvidia"))
cmd = QString("nvidia-smi -q -x");
else if (device == QString("ati"))
cmd = QString("aticonfig --od-getclocks");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(QString("bash -c \"") + cmd + QString("\""));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
if (configuration[QString("GPUDEV")] == QString("nvidia"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("Gpu"))) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("<gpu_util>"))) {
QString load = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
.split(QChar(' '), QString::SkipEmptyParts)[2]
.remove(QString("<gpu_util>"))
.remove(QString("</gpu_util>"))
.remove(QChar('%'));
gpu = load.toFloat();
value = load.toFloat();
}
}
}
else if (device == QString("ati")) {
command.start(QString("aticonfig --od-getclocks"));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
else if (configuration[QString("GPUDEV")] == QString("ati"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("load"))) {
QString load = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
.split(QChar(' '), QString::SkipEmptyParts)[3]
.remove(QChar('%'));
gpu = load.toFloat();
value = load.toFloat();
}
}
}
return gpu;
return value;
}
float ExtendedSysMon::getGpuTemp(const QString device)
{
float gpuTemp = 0.0;
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Device" << device;
float value = 0.0;
if ((device != QString("nvidia")) && (device != QString("ati")))
return gpuTemp;
QProcess command;
QString qoutput;
if (device == QString("nvidia")) {
command.start(QString("nvidia-smi -q -d TEMPERATURE"));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
return value;
QString cmd = QString("");
if (device == QString("nvidia"))
cmd = QString("nvidia-smi -q -x");
else if (device == QString("ati"))
cmd = QString("aticonfig --od-gettemperature");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(QString("bash -c \"") + cmd + QString("\""));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
if (configuration[QString("GPUDEV")] == QString("nvidia"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("Gpu"))) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("<gpu_temp>"))) {
QString temp = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
.split(QChar(' '), QString::SkipEmptyParts)[2];
gpuTemp = temp.toFloat();
.remove(QString("<gpu_temp>"))
.remove(QString("C</gpu_temp>"));
value = temp.toFloat();
}
}
}
else if (device == QString("ati")) {
command.start(QString("aticonfig --od-gettemperature"));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
else if (configuration[QString("GPUDEV")] == QString("ati"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("Temperature"))) {
QString temp = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
.split(QChar(' '), QString::SkipEmptyParts)[4];
gpuTemp = temp.toFloat();
value = temp.toFloat();
}
}
}
return gpuTemp;
return value;
}
float ExtendedSysMon::getHddTemp(const QString device)
float ExtendedSysMon::getHddTemp(const QString cmd, const QString device)
{
float hddTemp = 0.0;
QProcess command;
QString qoutput = QString("");
command.start(QString("sudo hddtemp ") + device);
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput()).trimmed();
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
if (debug) qDebug() << PDEBUG << ":" << "Device" << device;
float value = 0.0;
TaskResult process = runTask(cmd + QString(" ") + device);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
if (qoutput.split(QChar(':'), QString::SkipEmptyParts).count() >= 3) {
QString temp = qoutput.split(QChar(':'), QString::SkipEmptyParts)[2];
temp.remove(QChar(0260)).remove(QChar('C'));
hddTemp = temp.toFloat();
value = temp.toFloat();
}
return hddTemp;
return value;
}
QStringList ExtendedSysMon::getPlayerInfo(const QString playerName,
const QString mpdAddress,
const QString mpdPort)
QMap<QString, QVariant> ExtendedSysMon::getPlayerInfo(const QString playerName,
const QString mpdAddress,
const QString mpdPort,
QString mpris)
{
QStringList info;
// album
info.append(QString("unknown"));
// artist
info.append(QString("unknown"));
// progress
info.append(QString("0"));
// duration
info.append(QString("0"));
// title
info.append(QString("unknown"));
if ((playerName != QString("amarok")) &&
(playerName != QString("mpd")) &&
(playerName != QString("qmmp")))
return info;
QProcess command;
QString qoutput = QString("");
QString qstr;
if (playerName == QString("amarok")) {
// amarok
command.start("qdbus org.kde.amarok /Player GetMetadata");
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
qstr = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i];
if (qstr.split(QString(": "), QString::SkipEmptyParts).count() > 1) {
if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("album"))
info[0] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("artist"))
info[1] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("time"))
info[3] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("title"))
info[4] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
}
}
command.start("qdbus org.kde.amarok /Player PositionGet");
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
qstr = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i];
int time = qstr.toInt() / 1000;
info[2] = QString::number(time);
}
}
else if (playerName == QString("mpd")) {
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "player" << playerName;
if (debug) qDebug() << PDEBUG << ":" << "MPD" << mpdAddress + QString(":") + mpdPort;
if (debug) qDebug() << PDEBUG << ":" << "MPRIS" << mpris;
QMap<QString, QVariant> info;
info[QString("album")] = QString("unknown");
info[QString("artist")] = QString("unknown");
info[QString("duration")] = QString("0");
info[QString("progress")] = QString("0");
info[QString("title")] = QString("unknown");
QString cmd;
if (playerName == QString("mpd"))
// mpd
command.start(QString("bash -c \"echo 'currentsong\nstatus\nclose' | curl --connect-timeout 1 -fsm 3 telnet://") +
mpdAddress + QString(":") + mpdPort + QString("\""));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
cmd = QString("bash -c \"echo 'currentsong\nstatus\nclose' | curl --connect-timeout 1 -fsm 3 telnet://%1:%2\"")
.arg(mpdAddress)
.arg(mpdPort);
else if (playerName == QString("mpris")) {
// players which supports mpris
if (mpris == "auto")
mpris = getAutoMpris();
cmd = QString("bash -c \"qdbus org.mpris.%1 /Player GetMetadata && qdbus org.mpris.%1 /Player PositionGet\"")
.arg(mpris);
}
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
QString qstr = QString("");
if (playerName == QString("mpd"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
qstr = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i];
if (qstr.split(QString(": "), QString::SkipEmptyParts).count() > 1) {
if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Album"))
info[0] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
info[QString("album")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Artist"))
info[1] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
info[QString("artist")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("time")) {
info[3] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed().split(QString(":"))[0];
info[2] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed().split(QString(":"))[1];
}
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Title"))
info[4] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
info[QString("duration")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed().split(QString(":"))[0];
info[QString("progress")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed().split(QString(":"))[1];
} else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Title"))
info[QString("title")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
}
}
}
else if (playerName == QString("qmmp")) {
// qmmp
command.start("qmmp --status");
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
else if (playerName == QString("mpris"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
qstr = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i];
if ((qstr.split(QString(" = "), QString::SkipEmptyParts).count() > 1) || (qstr.at(0) == QChar('['))) {
if (qstr.split(QString(" = "), QString::SkipEmptyParts)[0] == QString("ALBUM"))
info[0] = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(" = "), QString::SkipEmptyParts)[0] == QString("ARTIST"))
info[1] = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
else if ((qstr.at(0) == QChar('[')) && (!qstr.contains("[stopped]"))) {
QString time = qstr.split(QString(" "), QString::SkipEmptyParts)[2].trimmed();
info[2] = QString::number(time.split(QString("/"), QString::SkipEmptyParts)[0].split(QString(":"), QString::SkipEmptyParts)[0].toInt() * 60 +
time.split(QString("/"), QString::SkipEmptyParts)[0].split(QString(":"), QString::SkipEmptyParts)[1].toInt());
info[3] = QString::number(time.split(QString("/"), QString::SkipEmptyParts)[1].split(QString(":"), QString::SkipEmptyParts)[0].toInt() * 60 +
time.split(QString("/"), QString::SkipEmptyParts)[1].split(QString(":"), QString::SkipEmptyParts)[1].toInt());
}
else if (qstr.split(QString(" = "), QString::SkipEmptyParts)[0] == QString("TITLE"))
info[4] = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
if (qstr.split(QString(": "), QString::SkipEmptyParts).count() > 1) {
if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("album"))
info[QString("album")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("artist"))
info[QString("artist")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("time"))
info[QString("duration")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("title"))
info[QString("title")] = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
} else {
int time = qstr.toInt() / 1000;
info[QString("progress")] = QString::number(time);
}
}
}
return info;
}
QStringList ExtendedSysMon::getPsStats()
QMap<QString, QVariant> ExtendedSysMon::getPsStats()
{
int psCount = 0;
if (debug) qDebug() << PDEBUG;
QMap<QString, QVariant> psStats;
QString cmd, qoutput;
cmd = QString("ps --no-headers -o command");
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
QStringList psList;
QProcess command;
QString qoutput = QString("");
command.start(QString("ps --no-headers -o command"));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput()).trimmed();
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++)
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i] != QString("ps --no-headers -o command")) {
psCount++;
if (!qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("ps ")))
psList.append(qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]);
}
QStringList psStats;
psStats.append(QString::number(psCount));
psStats.append(psList.join(QString(",")));
command.start(QString("ps -e --no-headers -o command"));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput()).trimmed();
int psTotal = qoutput.split(QChar('\n'), QString::SkipEmptyParts).count();
psStats.append(QString::number(psTotal));
psStats[QString("psCount")] = psList.count();
psStats[QString("ps")] = psList.join(QString(","));
cmd = QString("ps -e --no-headers -o command");
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
psStats[QString("psTotal")] = qoutput.split(QChar('\n'), QString::SkipEmptyParts).count();
return psStats;
}
int ExtendedSysMon::getUpgradeInfo(const QString pkgCommand, const int pkgNull)
int ExtendedSysMon::getUpgradeInfo(const QString cmd)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(QString("bash -c \"") + cmd + QString("\""));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
int count = 0;
QProcess command;
QString qoutput = QString("");
command.start(QString("bash -c \"") + pkgCommand + QString("\""));
command.waitForFinished(-1);
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput()).trimmed();
count = qoutput.split(QChar('\n'), QString::SkipEmptyParts).count();
return (count - pkgNull);
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++)
if (!qoutput.isEmpty())
count++;
return count;
}
bool ExtendedSysMon::sourceRequestEvent(const QString &name)
bool ExtendedSysMon::sourceRequestEvent(const QString &source)
{
return updateSourceEvent(name);
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Source" << source;
return updateSourceEvent(source);
}
bool ExtendedSysMon::updateSourceEvent(const QString &source)
{
QString key;
if (source == QString("custom")) {
key = QString("custom");
QString value = getCustomCmd(configuration[QString("CUSTOM")]);
setData(source, key, value);
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Source" << source;
if (source == QString("battery")) {
QMap<QString, QVariant> battery = getBattery(configuration[QString("ACPIPATH")]);
setData(source, QString("ac"), battery[QString("ac")].toBool());
for (int i=0; i<battery.keys().count(); i++) {
if (battery.keys()[i] == QString("ac")) continue;
setData(source, battery.keys()[i], battery[battery.keys()[i]].toInt());
}
else if (source == QString("gpu")) {
key = QString("GPU");
float value = getGpu(configuration[QString("GPUDEV")]);
setData(source, key, value);
}
else if (source == QString("gputemp")) {
key = QString("GPUTemp");
float value = getGpuTemp(configuration[QString("GPUDEV")]);
setData(source, key, value);
}
else if (source == QString("hddtemp")) {
} else if (source == QString("custom")) {
for (int i=0; i<externalScripts.count(); i++) {
ExtScript::ScriptData data = externalScripts[i]->run(times[i]);
if (!data.active) return true;
if (data.refresh) {
times[i] = 1;
setData(source, QString("custom") + QString::number(i), data.output);
} else
times[i]++;
}
} else if (source == QString("desktop")) {
QMap<QString, QVariant> desktop = getCurrentDesktop();
for (int i=0; i<desktop.keys().count(); i++)
setData(source, desktop.keys()[i], desktop[desktop.keys()[i]]);
} else if (source == QString("gpu")) {
setData(source, QString("GPU"), getGpu(configuration[QString("GPUDEV")]));
} else if (source == QString("gputemp")) {
setData(source, QString("GPUTemp"), getGpuTemp(configuration[QString("GPUDEV")]));
} else if (source == QString("hddtemp")) {
QStringList deviceList = configuration[QString("HDDDEV")].split(QChar(','), QString::SkipEmptyParts);
for (int i=0; i<deviceList.count(); i++) {
float value = getHddTemp(deviceList[i]);
setData(source, deviceList[i], value);
}
}
else if (source == QString("pkg")) {
for (int i=0; i<configuration[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts).count(); i++) {
key = QString("pkgCount") + QString::number(i);
int value = getUpgradeInfo(configuration[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts)[i],
configuration[QString("PKGNULL")].split(QString(","), QString::SkipEmptyParts)[i].toInt());
setData(source, key, value);
}
}
else if (source == QString("player")) {
QStringList value;
// amarok
value = getPlayerInfo(QString("amarok"));
key = QString("amarok_album");
setData(source, key, value[0]);
key = QString("amarok_artist");
setData(source, key, value[1]);
key = QString("amarok_progress");
setData(source, key, value[2]);
key = QString("amarok_duration");
setData(source, key, value[3]);
key = QString("amarok_title");
setData(source, key, value[4]);
// mpd
value = getPlayerInfo(QString("mpd"),
configuration[QString("MPDADDRESS")],
configuration[QString("MPDPORT")]);
key = QString("mpd_album");
setData(source, key, value[0]);
key = QString("mpd_artist");
setData(source, key, value[1]);
key = QString("mpd_progress");
setData(source, key, value[2]);
key = QString("mpd_duration");
setData(source, key, value[3]);
key = QString("mpd_title");
setData(source, key, value[4]);
// qmmp
value = getPlayerInfo(QString("qmmp"));
key = QString("qmmp_album");
setData(source, key, value[0]);
key = QString("qmmp_artist");
setData(source, key, value[1]);
key = QString("qmmp_progress");
setData(source, key, value[2]);
key = QString("qmmp_duration");
setData(source, key, value[3]);
key = QString("qmmp_title");
setData(source, key, value[4]);
}
else if (source == QString("ps")) {
QStringList value = getPsStats();
key = QString("psCount");
setData(source, key, value[0].toInt());
key = QString("ps");
setData(source, key, value[1]);
key = QString("psTotal");
setData(source, key, value[2].toInt());
for (int i=0; i<deviceList.count(); i++)
setData(source, deviceList[i],
getHddTemp(configuration[QString("HDDTEMPCMD")], deviceList[i]));
} else if (source == QString("pkg")) {
for (int i=0; i<configuration[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts).count(); i++)
setData(source, QString("pkgCount") + QString::number(i),
getUpgradeInfo(configuration[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts)[i]));
} else if (source == QString("player")) {
QMap<QString, QVariant> player = getPlayerInfo(configuration[QString("PLAYER")],
configuration[QString("MPDADDRESS")],
configuration[QString("MPDPORT")],
configuration[QString("MPRIS")]);
for (int i=0; i<player.keys().count(); i++)
setData(source, player.keys()[i], player[player.keys()[i]]);
} else if (source == QString("ps")) {
QMap<QString, QVariant> ps = getPsStats();
for (int i=0; i<ps.keys().count(); i++)
setData(source, ps.keys()[i], ps[ps.keys()[i]]);
}
return true;
}

View File

@ -1,24 +1,28 @@
/***************************************************************************
* This file is part of pytextmonitor *
* This file is part of awesome-widgets *
* *
* pytextmonitor is free software: you can redistribute it and/or *
* awesome-widgets is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* pytextmonitor is distributed in the hope that it will be useful, *
* awesome-widgets is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with pytextmonitor. If not, see http://www.gnu.org/licenses/ *
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef EXTSYSMON_H
#define EXTSYSMON_H
#include <Plasma/DataEngine>
#include <QProcess>
class ExtScript;
class ExtendedSysMon : public Plasma::DataEngine
{
@ -27,30 +31,37 @@ class ExtendedSysMon : public Plasma::DataEngine
public:
ExtendedSysMon(QObject *parent, const QVariantList &args);
// update functions
QString getCustomCmd(const QString cmd);
QMap<QString, QVariant> getBattery(const QString acpiPath);
QMap<QString, QVariant> getCurrentDesktop();
float getGpu(const QString device);
float getGpuTemp(const QString device);
float getHddTemp(const QString device);
QStringList getPlayerInfo(const QString playerName,
const QString mpdAddress = 0,
const QString mpdPort = 0);
QStringList getPsStats();
int getUpgradeInfo(const QString pkgCommand,
const int pkgNull = 0);
float getHddTemp(const QString cmd, const QString device);
QMap<QString, QVariant> getPlayerInfo(const QString playerName,
const QString mpdAddress = 0,
const QString mpdPort = 0,
QString mpris = 0);
QMap<QString, QVariant> getPsStats();
int getUpgradeInfo(const QString cmd);
protected:
bool sourceRequestEvent(const QString &name);
bool sourceRequestEvent(const QString &source);
bool updateSourceEvent(const QString &source);
QStringList sources() const;
private:
// configuration
QMap<QString, QString> configuration;
QList<ExtScript *> externalScripts;
QList<int> times;
bool debug;
// reread configuration
QString getAllHdd();
QString getAutoGpu();
QString getAutoMpris();
void initScripts();
void readConfiguration();
QMap<QString, QString> updateConfiguration(const QMap<QString, QString> rawConfig);
};
#endif /* EXTSYSMON_H */

View File

@ -1,7 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Name=Extended SystemMonitor DataEngine
Comment=Adds gpu, gputemp and hddtemp to DataEngine
Comment=Adds some additional functions to System DataEngine
ServiceTypes=Plasma/DataEngine
Type=Service
Icon=utilities-system-monitor
@ -16,5 +16,5 @@ X-KDE-PluginInfo-Name=ext-sysmon
X-KDE-PluginInfo-Version=@PROJECT_VERSION@
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3
X-KDE-PluginInfo-License=GPL3
X-KDE-PluginInfo-EnabledByDefault=true

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Name=aw-get-external-ip
Comment=Custom command to get external IP
Exec=curl ip4.telize.com
X-AW-Prefix=
X-AW-Active=true
X-AW-Output=true
X-AW-Redirect=nothing
X-AW-Interval=1

View File

@ -0,0 +1,18 @@
[Desktop Entry]
Encoding=UTF-8
Name=aw-script-template
Comment=Template for external script
# path to command
Exec=/path/to/some/command
# usually you need to leave this field blank
# use this field to setup script language for example
X-AW-Prefix=/prefix/to/command/if/required
# is the script active. true or false
X-AW-Active=false
# is the script has output. true or false
X-AW-Output=false
# use redirect for the script
# stderr2stdout, nothing, stdout2stderr
X-AW-Redirect=nothing
# update interval in default AW intervals
X-AW-Interval=1

View File

@ -1,33 +0,0 @@
# set project name
set (SUBPROJECT pytextmonitor)
# for notifications
set (PLUGIN_NAME plasma_applet_pytextmonitor)
message (STATUS "Subproject ${SUBPROJECT}")
# find required libaries
find_package (KDE4 REQUIRED)
include (KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../)
add_subdirectory (po)
# set sources
set (SUBPROJECT_CODE_DIR "contents/code")
set (SUBPROJECT_UI_DIR "contents/ui")
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
file (GLOB SUBPROJECT_SOURCE ${SUBPROJECT_CODE_DIR}/*.py)
file (GLOB SUBPROJECT_UI ${SUBPROJECT_UI_DIR}/*.ui)
# prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
# install
install (FILES ${SUBPROJECT_SOURCE} DESTINATION "share/apps/plasma/plasmoids/${SUBPROJECT}/${SUBPROJECT_CODE_DIR}")
install (FILES ${SUBPROJECT_UI} DESTINATION "share/apps/plasma/plasmoids/${SUBPROJECT}/${SUBPROJECT_UI_DIR}")
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR} RENAME "plasma-applet-${SUBPROJECT}.desktop")
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION "share/apps/plasma/plasmoids/${SUBPROJECT}")
install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})

View File

@ -1,36 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# Copyright 2012 Alex Oleshkevich <alex.oleshkevich@gmail.com> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., #
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #
############################################################################
from util import *
class Config():
def __init__(self, applet):
self.applet = applet
self.config = self.applet.config()
def get(self, key, default = ''):
return self.config.readEntry(key, default).toString()
def set(self, key, value):
self.config.writeEntry(key, value)

View File

@ -1,236 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyKDE4.kdecore import *
from PyKDE4.kdeui import *
import commands
import config
class ConfigDefinition:
def __init__(self, parent, configpage, defaults):
"""class definition"""
self.parent = parent
self.configpage = configpage
self.defaults = defaults
def configAccepted(self):
"""function to accept settings"""
settings = config.Config(self.parent)
# update local variables
settings.set('interval', self.configpage.ui.spinBox_interval.value())
settings.set('font_family', str(self.configpage.ui.fontComboBox.currentFont().family()))
settings.set('font_size', self.configpage.ui.spinBox_fontSize.value())
settings.set('font_color', str(self.configpage.ui.kcolorcombo.color().name()))
settings.set('font_style', str(self.configpage.ui.comboBox_style.currentText()))
settings.set('font_weight', self.configpage.ui.spinBox_weight.value())
settings.set('custom_time', str(self.configpage.ui.lineEdit_timeFormat.text()))
settings.set('custom_uptime', str(self.configpage.ui.lineEdit_uptimeFormat.text()))
item = QStringList()
for i in range(self.configpage.ui.listWidget_tempDevice.count()):
item.append(self.configpage.ui.listWidget_tempDevice.item(i).text())
settings.set('temp_device', str(item.join(QString('@@'))))
item = QStringList()
for i in range(self.configpage.ui.listWidget_mount.count()):
item.append(self.configpage.ui.listWidget_mount.item(i).text())
settings.set('mount', str(item.join(QString('@@'))))
item = QStringList()
for i in range(self.configpage.ui.listWidget_hddDevice.count()):
item.append(self.configpage.ui.listWidget_hddDevice.item(i).text())
settings.set('hdd', str(item.join(QString('@@'))))
settings.set('netdir', str(self.configpage.ui.lineEdit_netdir.text()))
settings.set('netdevBool', self.configpage.ui.checkBox_netdev.checkState())
settings.set('custom_netdev', str(self.configpage.ui.comboBox_netdev.currentText()))
settings.set('battery_device', str(self.configpage.ui.lineEdit_batdev.text()))
settings.set('ac_device', str(self.configpage.ui.lineEdit_acdev.text()))
settings.set('ac_online', str(self.configpage.ui.lineEdit_acOnline.text()))
settings.set('ac_offline', str(self.configpage.ui.lineEdit_acOffline.text()))
settings.set('player_name', str(self.configpage.ui.comboBox_playerSelect.currentText()))
settings.set('tooltip_num', self.configpage.ui.spinBox_tooltipNum.value())
for label in ['cpu', 'cpuclock', 'mem', 'swap', 'down', 'up']:
settings.set(self.defaults['confColor'][label], str(self.configpage.kcolorcombos[label].color().name()))
dataengineConfig = unicode(KGlobal.dirs().localkdedir()) + "/share/config/extsysmon.conf"
try:
with open(dataengineConfig, 'w') as deConfigFile:
deConfigFile.write("CUSTOM=" + str(self.configpage.ui.lineEdit_customCommand.text()) + "\n")
deConfigFile.write("GPUDEV=" + str(self.configpage.ui.comboBox_gpudev.currentText()) + "\n")
deConfigFile.write("HDDDEV=" + str(self.configpage.ui.comboBox_hdddev.currentText()) + "\n")
deConfigFile.write("MPDADDRESS=" + str(self.configpage.ui.lineEdit_mpdaddress.text()) + "\n")
deConfigFile.write("MPDPORT=" + str(self.configpage.ui.spinBox_mpdport.value()) + "\n")
item = QStringList()
for i in range(self.configpage.ui.listWidget_pkgCommand.count()):
item.append(self.configpage.ui.listWidget_pkgCommand.item(i).text())
pkgCmd = []
pkgNull = []
for command in item:
try:
pkgCmd.append(str(command.split(QString(":"))[0]))
pkgNull.append(str(command.split(QString(":"))[1]))
except:
pkgCmd.append(str(command))
pkgNull.append("0")
deConfigFile.write("PKGCMD=" + ','.join(pkgCmd) + "\n")
deConfigFile.write("PKGNULL=" + ','.join(pkgNull) + "\n")
except:
pass
# disconnecting from source and clear layout
self.parent.disconnectFromSource()
labelOrder = "---------------"
for label in self.defaults['order'].keys():
if (self.configpage.checkboxes[self.defaults['order'][label]].checkState() > 0):
pos = self.configpage.sliders[self.defaults['order'][label]].value() - 1
labelOrder = labelOrder[:pos] + label + labelOrder[pos+1:]
settings.set(self.defaults['confFormat'][self.defaults['order'][label]], str(self.configpage.lineedits[self.defaults['order'][label]].text()))
settings.set(self.defaults['confBool'][self.defaults['order'][label]], self.configpage.checkboxes[self.defaults['order'][label]].checkState())
labelOrder = ''.join(labelOrder.split('-'))
settings.set('label_order', labelOrder)
# reinitializate
self.parent.reInit()
def createConfigurationInterface(self, parent):
"""function to setup configuration window"""
settings = config.Config(self.parent)
font = QFont(str(settings.get('font_family', 'Terminus')), settings.get('font_size', 12).toInt()[0], 400, False)
self.configpage.ui.spinBox_interval.setValue(settings.get('interval', 2000).toInt()[0])
self.configpage.ui.fontComboBox.setCurrentFont(font)
self.configpage.ui.spinBox_fontSize.setValue(settings.get('font_size', 12).toInt()[0])
self.configpage.ui.kcolorcombo.setColor(QColor(str(settings.get('font_color', '#000000'))))
font = str(settings.get('font_style', 'normal'))
if (font == 'normal'):
self.configpage.ui.comboBox_style.setCurrentIndex(0)
else:
self.configpage.ui.comboBox_style.setCurrentIndex(1)
self.configpage.ui.spinBox_weight.setValue(settings.get('font_weight', 400).toInt()[0])
self.configpage.ui.lineEdit_timeFormat.setText(str(settings.get('custom_time', '$hh:$mm')))
self.configpage.ui.lineEdit_uptimeFormat.setText(str(settings.get('custom_uptime', '$ds,$hs,$ms')))
commandOut = commands.getoutput("sensors")
for item in commandOut.split("\n\n"):
for device in item.split("\n"):
if (device.find('\xc2\xb0C') > -1):
try:
tempdev = 'lmsensors/' + item.split("\n")[0] + '/' + '_'.join(device.split(":")[0].split())
self.configpage.ui.comboBox_tempDevice.addItem(tempdev)
except:
pass
self.configpage.ui.listWidget_tempDevice.clear()
for item in str(settings.get('temp_device', '')).split('@@'):
if (len(item) > 0):
self.configpage.ui.listWidget_tempDevice.addItem(item)
commandOut = commands.getoutput("mount")
for item in commandOut.split("\n"):
try:
mount = item.split(' on ')[1].split(' type ')[0]
self.configpage.ui.comboBox_mount.addItem(mount)
except:
pass
self.configpage.ui.listWidget_mount.clear()
for item in str(settings.get('mount', '/')).split('@@'):
self.configpage.ui.listWidget_mount.addItem(item)
commandOut = commands.getoutput("find /dev -name '[hs]d[a-z]'")
for item in commandOut.split("\n"):
try:
self.configpage.ui.comboBox_hddDevice.addItem(item)
except:
pass
self.configpage.ui.listWidget_hddDevice.clear()
for item in str(settings.get('hdd', '/dev/sda')).split('@@'):
self.configpage.ui.listWidget_hddDevice.addItem(item)
self.configpage.ui.lineEdit_netdir.setText(str(settings.get('netdir', '/sys/class/net')))
self.configpage.ui.checkBox_netdev.setCheckState(settings.get('netdevBool', 0).toInt()[0])
for item in QDir.entryList(QDir(str(settings.get('netdir', '/sys/class/net'))), QDir.Dirs | QDir.NoDotAndDotDot):
self.configpage.ui.comboBox_netdev.addItem(item)
index = self.configpage.ui.comboBox_netdev.findText(str(settings.get('custom_netdev', 'lo')))
self.configpage.ui.comboBox_netdev.setCurrentIndex(index)
self.configpage.ui.lineEdit_batdev.setText(str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity')))
self.configpage.ui.lineEdit_acdev.setText(str(settings.get('ac_device', '/sys/class/power_supply/AC/online')))
self.configpage.ui.lineEdit_acOnline.setText(str(settings.get('ac_online', '(*)')))
self.configpage.ui.lineEdit_acOffline.setText(str(settings.get('ac_offline', '( )')))
index = self.configpage.ui.comboBox_playerSelect.findText(str(settings.get('player_name', "amarok")))
self.configpage.ui.comboBox_playerSelect.setCurrentIndex(index)
self.configpage.ui.spinBox_tooltipNum.setValue(settings.get('tooltip_num', 100).toInt()[0])
self.configpage.ui.kcolorcombo_cpu.setColor(QColor(str(settings.get('cpu_color', '#ff0000'))))
self.configpage.ui.kcolorcombo_cpuclock.setColor(QColor(str(settings.get('cpuclock_color', '#00ff00'))))
self.configpage.ui.kcolorcombo_mem.setColor(QColor(str(settings.get('mem_color', '#0000ff'))))
self.configpage.ui.kcolorcombo_swap.setColor(QColor(str(settings.get('swap_color', '#ffff00'))))
self.configpage.ui.kcolorcombo_down.setColor(QColor(str(settings.get('down_color', '#00ffff'))))
self.configpage.ui.kcolorcombo_up.setColor(QColor(str(settings.get('up_color', '#ff00ff'))))
deSettings = {'CUSTOM':'wget -qO- http://ifconfig.me/ip', 'GPUDEV':'auto', 'HDDDEV':'all',
'MPDADDRESS':'localhost', 'MPDPORT':'6600', 'PKGCMD':'pacman -Qu', 'PKGNULL':'0'}
dataengineConfig = unicode(KGlobal.dirs().localkdedir()) + "/share/config/extsysmon.conf"
try:
with open(dataengineConfig, 'r') as deConfigFile:
for line in deConfigFile:
if ((line[0] != '#') and (line.split('=')[0] != line)):
deSettings[line.split('=')[0]] = line.split('=')[1][:-1]
except:
pass
self.configpage.ui.lineEdit_customCommand.setText(deSettings['CUSTOM'])
index = self.configpage.ui.comboBox_gpudev.findText(deSettings['GPUDEV'])
self.configpage.ui.comboBox_gpudev.setCurrentIndex(index)
self.configpage.ui.comboBox_hdddev.addItem("all")
commandOut = commands.getoutput("find /dev -name '[hs]d[a-z]'")
for item in commandOut.split("\n"):
try:
self.configpage.ui.comboBox_hdddev.addItem(item)
except:
pass
index = self.configpage.ui.comboBox_hdddev.findText(deSettings['HDDDEV'])
self.configpage.ui.comboBox_hdddev.setCurrentIndex(index)
self.configpage.ui.lineEdit_mpdaddress.setText(deSettings['MPDADDRESS'])
self.configpage.ui.spinBox_mpdport.setValue(int(deSettings['MPDPORT']))
self.configpage.ui.spinBox_mpdport.setValue(int(deSettings['MPDPORT']))
self.configpage.ui.listWidget_pkgCommand.clear()
for i in range(len(deSettings['PKGCMD'].split(','))):
try:
num = deSettings['PKGNULL'].split(',')[i]
except:
num = "0"
self.configpage.ui.listWidget_pkgCommand.addItem(deSettings['PKGCMD'].split(',')[i] + ':' + num)
labelOrder = str(settings.get('label_order', '1345'))
for label in self.defaults['order'].keys():
bool = settings.get(self.defaults['confBool'][self.defaults['order'][label]],
self.defaults['bool'][self.defaults['order'][label]]).toInt()[0]
self.configpage.checkboxes[self.defaults['order'][label]].setCheckState(bool)
if (bool > 0):
self.configpage.sliders[self.defaults['order'][label]].setValue(labelOrder.find(label) + 1)
self.configpage.lineedits[self.defaults['order'][label]].setText(str(settings.get(self.defaults['confFormat'][self.defaults['order'][label]],
self.defaults['format'][self.defaults['order'][label]])))
# add config page
page = parent.addPage(self.configpage, i18n(self.parent.name()))
page.setIcon(KIcon(self.parent.icon()))
parent.okClicked.connect(self.configAccepted)

View File

@ -1,197 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyKDE4.plasma import *
from PyQt4 import uic
class ConfigWindow(QWidget):
def __init__(self, parent):
"""settings window definition"""
QWidget.__init__(self)
self.ui = uic.loadUi(parent.package().filePath('ui', 'configwindow.ui'), self)
self.parent = parent
self.kcolorcombos = {'cpu':self.ui.kcolorcombo_cpu,
'cpuclock':self.ui.kcolorcombo_cpuclock, 'down':self.ui.kcolorcombo_down,
'mem':self.ui.kcolorcombo_mem, 'swap':self.ui.kcolorcombo_swap,
'up':self.ui.kcolorcombo_up}
self.checkboxes = {'bat':self.ui.checkBox_bat, 'cpu':self.ui.checkBox_cpu,
'cpuclock':self.ui.checkBox_cpuclock, 'custom':self.ui.checkBox_custom,
'gpu':self.ui.checkBox_gpu, 'gputemp':self.ui.checkBox_gpuTemp,
'hdd':self.ui.checkBox_hdd, 'hddtemp':self.ui.checkBox_hddTemp,
'mem':self.ui.checkBox_mem, 'net':self.ui.checkBox_net,
'swap':self.ui.checkBox_swap, 'temp':self.ui.checkBox_temp,
'uptime':self.ui.checkBox_uptime, 'pkg':self.ui.checkBox_pkg,
'player':self.ui.checkBox_player, 'ps':self.ui.checkBox_ps,
'time':self.ui.checkBox_time}
self.lineedits = {'bat':self.ui.lineEdit_bat, 'cpu':self.ui.lineEdit_cpu,
'cpuclock':self.ui.lineEdit_cpuclock, 'custom':self.ui.lineEdit_custom,
'gpu':self.ui.lineEdit_gpu, 'gputemp':self.ui.lineEdit_gpuTemp,
'hdd':self.ui.lineEdit_hdd, 'hddtemp':self.ui.lineEdit_hddTemp,
'mem':self.ui.lineEdit_mem, 'net':self.ui.lineEdit_net,
'swap':self.ui.lineEdit_swap, 'temp':self.ui.lineEdit_temp,
'uptime':self.ui.lineEdit_uptime, 'pkg':self.ui.lineEdit_pkg,
'player':self.ui.lineEdit_player, 'ps':self.ui.lineEdit_ps,
'time':self.ui.lineEdit_time}
self.sliders = {'bat':self.ui.slider_bat, 'cpu':self.ui.slider_cpu,
'cpuclock':self.ui.slider_cpuclock, 'custom':self.ui.slider_custom,
'gpu':self.ui.slider_gpu, 'gputemp':self.ui.slider_gpuTemp,
'hdd':self.ui.slider_hdd, 'hddtemp':self.ui.slider_hddTemp,
'mem':self.ui.slider_mem, 'net':self.ui.slider_net,
'swap':self.ui.slider_swap, 'temp':self.ui.slider_temp,
'uptime':self.ui.slider_uptime, 'pkg':self.ui.slider_pkg,
'player':self.ui.slider_player, 'ps':self.ui.slider_ps,
'time':self.ui.slider_time}
QObject.connect(self.ui.checkBox_netdev, SIGNAL("stateChanged(int)"), self.setNetdevEnabled)
QObject.connect(self.ui.pushButton_hddDevice, SIGNAL("clicked()"), self.addHddDevice)
QObject.connect(self.ui.pushButton_mount, SIGNAL("clicked()"), self.addMount)
QObject.connect(self.ui.pushButton_tempDevice, SIGNAL("clicked()"), self.addTempDevice)
QObject.connect(self.ui.pushButton_pkgCommand, SIGNAL("clicked()"), self.addPkgCommand)
QObject.connect(self.ui.listWidget_hddDevice, SIGNAL("itemActivated(QListWidgetItem*)"), self.ui.listWidget_hddDevice.openPersistentEditor)
QObject.connect(self.ui.listWidget_mount, SIGNAL("itemActivated(QListWidgetItem*)"), self.ui.listWidget_mount.openPersistentEditor)
QObject.connect(self.ui.listWidget_tempDevice, SIGNAL("itemActivated(QListWidgetItem*)"), self.ui.listWidget_tempDevice.openPersistentEditor)
QObject.connect(self.ui.listWidget_pkgCommand, SIGNAL("itemActivated(QListWidgetItem*)"), self.ui.listWidget_pkgCommand.openPersistentEditor)
QObject.connect(self.ui.comboBox_pkgCommand, SIGNAL("currentIndexChanged(int)"), self.updatePkgNullValue)
QObject.connect(self.ui.comboBox_pkgCommand, SIGNAL("editTextChanged(QString)"), self.updatePkgNullValue)
for item in self.sliders.values():
QObject.connect(item, SIGNAL("valueChanged(int)"), self.setSlider)
for item in self.checkboxes.values():
QObject.connect(item, SIGNAL("stateChanged(int)"), self.setStatus)
def keyPressEvent(self, event):
"""delete events"""
if (event.key() == Qt.Key_Delete):
if (self.ui.listWidget_hddDevice.hasFocus() and
(self.ui.listWidget_hddDevice.currentRow() > -1)):
self.ui.listWidget_hddDevice.takeItem(self.ui.listWidget_hddDevice.currentRow())
elif (self.ui.listWidget_mount.hasFocus() and
(self.ui.listWidget_mount.currentRow() > -1)):
self.ui.listWidget_mount.takeItem(self.ui.listWidget_mount.currentRow())
elif (self.ui.listWidget_tempDevice.hasFocus() and
(self.ui.listWidget_tempDevice.currentRow() > -1)):
self.ui.listWidget_tempDevice.takeItem(self.ui.listWidget_tempDevice.currentRow())
elif (self.ui.listWidget_pkgCommand.hasFocus() and
(self.ui.listWidget_pkgCommand.currentRow() > -1)):
self.ui.listWidget_pkgCommand.takeItem(self.ui.listWidget_pkgCommand.currentRow())
def addHddDevice(self):
"""function to add mount points"""
self.ui.listWidget_hddDevice.clearSelection()
self.ui.listWidget_hddDevice.addItem(self.ui.comboBox_hddDevice.currentText())
def addMount(self):
"""function to add mount points"""
self.ui.listWidget_mount.clearSelection()
self.ui.listWidget_mount.addItem(self.ui.comboBox_mount.currentText())
def addTempDevice(self):
"""function to add temperature device"""
self.ui.listWidget_tempDevice.clearSelection()
self.ui.listWidget_tempDevice.addItem(self.ui.comboBox_tempDevice.currentText())
def addPkgCommand(self):
"""function to add package manager command"""
self.ui.listWidget_pkgCommand.clearSelection()
self.ui.listWidget_pkgCommand.addItem(self.ui.comboBox_pkgCommand.currentText() +\
QString(":") + QString.number(self.ui.spinBox_pkgCommandNum.value()))
def updatePkgNullValue(self):
"""function to set default values to PKGNULL spinbox"""
if (self.ui.comboBox_pkgCommand.currentText().contains(QString("pacman -Qu"))):
self.ui.spinBox_pkgCommandNum.setValue(0)
elif (self.ui.comboBox_pkgCommand.currentText().contains(QString("apt-show-versions -u -b"))):
self.ui.spinBox_pkgCommandNum.setValue(0)
elif (self.ui.comboBox_pkgCommand.currentText().contains(QString("aptitude search '~U'"))):
self.ui.spinBox_pkgCommandNum.setValue(0)
elif (self.ui.comboBox_pkgCommand.currentText().contains(QString("yum list updates"))):
self.ui.spinBox_pkgCommandNum.setValue(3)
elif (self.ui.comboBox_pkgCommand.currentText().contains(QString("pkg_version -I -l '<'"))):
self.ui.spinBox_pkgCommandNum.setValue(0)
elif (self.ui.comboBox_pkgCommand.currentText().contains(QString("urpmq --auto-select"))):
self.ui.spinBox_pkgCommandNum.setValue(0)
def setNetdevEnabled(self):
"""function to set enabled netdev"""
if (self.ui.checkBox_netdev.checkState() == 0):
self.ui.comboBox_netdev.setDisabled(True)
else:
self.ui.comboBox_netdev.setEnabled(True)
def setSlider(self):
"""function to set sliders"""
if (self.sender().isEnabled() == True):
second_slider = self.sender()
order = []
for slider in self.sliders.values():
if (slider.isEnabled() == True):
order.append(slider.value())
if ((slider.value() == self.sender().value()) and (slider != self.sender())):
second_slider = slider
if (second_slider == self.sender()):
return
for value in range(len(order)):
if (order.count(value+1) == 0):
new_value = value + 1
second_slider.setValue(new_value)
def setStatus(self):
"""function to enable label"""
for label in self.checkboxes.keys():
if ((self.checkboxes[label].checkState() > 0) and (self.sliders[label].isEnabled() == False)):
self.lineedits[label].setEnabled(True)
self.sliders[label].setEnabled(True)
slider_label = 0
for slider in self.sliders.values():
if (slider.isEnabled() == True):
slider_label += 1
for slider in self.sliders.values():
if (slider_label > 1):
slider.setMaximum(slider.maximum()+1)
elif (slider_label == 1):
slider.setMaximum(1)
self.sliders[label].setValue(self.sliders[label].maximum())
elif ((self.checkboxes[label].checkState() == 0) and (self.sliders[label].isEnabled() == True)):
self.lineedits[label].setDisabled(True)
self.sliders[label].setDisabled(True)
for slider in self.sliders.values():
if ((slider.value() == slider.maximum()) and (slider != self.sliders[label])):
slider.setValue(self.sliders[label].value())
slider_label = 0
for slider in self.sliders.values():
if (slider.isEnabled() == True):
slider_label += 1
for slider in self.sliders.values():
if (slider_label > 0):
slider.setMaximum(slider.maximum()-1)
else:
slider.setMaximum(1)
self.sliders[label].setValue(1)

View File

@ -1,317 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyKDE4.plasma import Plasma
import datetime
timeLetters = ['dddd', 'ddd', 'dd', 'd', \
'MMMM', 'MMM', 'MM', 'M', 'yyyy', 'yy', \
'hh', 'h', 'mm', 'm', 'ss', 's']
class DataEngine:
def __init__(self, parent):
"""class definition"""
self.parent = parent
def connectToEngine(self, bools=None, dataEngines=None, interval=1000, names=None):
"""function to initializate engine"""
if (bools['cpu'] > 0):
dataEngines['system'].connectSource("cpu/system/TotalLoad", self.parent, interval)
for core in range(8):
dataEngines['system'].connectSource("cpu/cpu" + str(core) + "/TotalLoad", self.parent, interval)
if (bools['cpuclock'] > 0):
dataEngines['system'].connectSource("cpu/system/AverageClock", self.parent, interval)
for core in range(8):
dataEngines['system'].connectSource("cpu/cpu" + str(core) + "/clock", self.parent, interval)
if (bools['custom'] > 0):
dataEngines['ext'].connectSource("custom", self.parent, interval)
if (bools['gpu'] > 0):
dataEngines['ext'].connectSource("gpu", self.parent, interval)
if (bools['gputemp'] > 0):
dataEngines['ext'].connectSource("gputemp", self.parent, interval)
if (bools['hdd'] > 0):
for item in names['hdd']:
dataEngines['system'].connectSource("partitions" + item + "/filllevel", self.parent, interval)
dataEngines['system'].connectSource("partitions" + item + "/usedspace", self.parent, interval)
if (bools['hddtemp'] > 0):
dataEngines['ext'].connectSource("hddtemp", self.parent, interval)
if (bools['mem'] > 0):
dataEngines['system'].connectSource("mem/physical/free", self.parent, interval)
dataEngines['system'].connectSource("mem/physical/used", self.parent, interval)
dataEngines['system'].connectSource("mem/physical/application", self.parent, interval)
if (bools['net'] > 0):
self.updateNetdev = 0
dataEngines['system'].connectSource("network/interfaces/" + names['net'] + "/transmitter/data", self.parent, interval)
dataEngines['system'].connectSource("network/interfaces/" + names['net'] + "/receiver/data", self.parent, interval)
if (bools['pkg'] > 0):
dataEngines['ext'].connectSource("pkg", self.parent, 60*60*1000, Plasma.AlignToHour)
if (bools['player'] > 0):
dataEngines['ext'].connectSource("player", self.parent, interval)
if (bools['ps'] > 0):
dataEngines['ext'].connectSource("ps", self.parent, interval)
if (bools['swap'] > 0):
dataEngines['system'].connectSource("mem/swap/free", self.parent, interval)
dataEngines['system'].connectSource("mem/swap/used", self.parent, interval)
if (bools['temp'] > 0):
for item in names['temp']:
dataEngines['system'].connectSource(item, self.parent, interval)
if (bools['time'] > 0):
dataEngines['time'].connectSource("Local", self.parent, 1000)
if (bools['uptime'] > 0):
dataEngines['system'].connectSource("system/uptime", self.parent, interval)
def dataUpdated(self, sourceName, data, ptm):
"""function to update data"""
adv = ptm['vars']['adv']
systemDataEngine = ptm['dataengine']['system']
formats = ptm['vars']['formats']
interval = ptm['vars']['app']['interval']
names = ptm['names']
updatedData = {'name':None, 'type':None, 'value':None}
try:
if (sourceName == "cpu/system/TotalLoad"):
updatedData['name'] = "cpu"
updatedData['type'] = -1
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif ((sourceName[:7] == "cpu/cpu") and (sourceName.split('/')[2] == "TotalLoad")):
updatedData['name'] = "cpu"
updatedData['type'] = int(sourceName[7])
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif (sourceName == "cpu/system/AverageClock"):
updatedData['name'] = "cpuclock"
updatedData['type'] = -1
value = round(data[QString(u'value')].toFloat()[0], 0)
updatedData['value'] = value
elif ((sourceName[:7] == "cpu/cpu") and (sourceName.split('/')[2] == "clock")):
updatedData['name'] = "cpuclock"
updatedData['type'] = int(sourceName[7])
value = round(data[QString(u'value')].toFloat()[0], 0)
updatedData['value'] = value
elif (sourceName == "custom"):
updatedData['name'] = "custom"
value = str(data[QString(u'custom')].toUtf8()).decode("utf-8")
updatedData['value'] = value
elif (sourceName == "gpu"):
updatedData['name'] = "gpu"
value = round(data[QString(u'GPU')], 1)
updatedData['value'] = "%4.1f" % (value)
elif (sourceName == "gputemp"):
updatedData['name'] = "gputemp"
value = round(data[QString(u'GPUTemp')], 1)
updatedData['value'] = "%4.1f" % (value)
elif (sourceName.split('/')[0] == "partitions") and (sourceName.split('/')[-1] == "filllevel"):
updatedData['name'] = "hdd"
updatedData['type'] = '/' + '/'.join(sourceName.split('/')[1:-1])
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif (sourceName.split('/')[0] == "partitions") and (sourceName.split('/')[-1] == "usedspace"):
updatedData['name'] = "hddmb"
updatedData['type'] = '/' + '/'.join(sourceName.split('/')[1:-1])
value = data[QString(u'value')].toFloat()[0]
updatedData['value'] = value
elif (sourceName == "hddtemp"):
updatedData['name'] = "hddtemp"
updatedData['value'] = {}
for item in names['hddtemp']:
value = round(data[QString(item)], 1)
updatedData['value'][item] = "%4.1f" % (value)
elif (sourceName == "mem/physical/application"):
updatedData['name'] = "mem"
updatedData['type'] = "app"
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif (sourceName == "mem/physical/free"):
updatedData['name'] = "mem"
updatedData['type'] = "free"
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif (sourceName == "mem/physical/used"):
updatedData['name'] = "mem"
updatedData['type'] = "used"
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif ((sourceName.split('/')[0] == "network") and (sourceName.split('/')[3] == "receiver")):
updatedData['name'] = "net"
updatedData['type'] = "down"
value = round(data[QString(u'value')].toFloat()[0], 0)
updatedData['value'] = value
# update network device
self.updateNetdev = self.updateNetdev + 1
if (self.updateNetdev == 30):
self.updateNetdev = 0
if (adv['netdevBool'] == 0):
systemDataEngine.disconnectSource("network/interfaces/" + names['net'] + "/transmitter/data", self.parent)
systemDataEngine.disconnectSource("network/interfaces/" + names['net'] + "/receiver/data", self.parent)
names['net'] = self.parent.setNetdev()
systemDataEngine.connectSource("network/interfaces/" + names['net'] + "/transmitter/data", self.parent, interval)
systemDataEngine.connectSource("network/interfaces/" + names['net'] + "/receiver/data", self.parent, interval)
elif ((sourceName.split('/')[0] == "network") and (sourceName.split('/')[3] == "transmitter")):
updatedData['name'] = "net"
updatedData['type'] = "up"
value = round(data[QString(u'value')].toFloat()[0], 0)
updatedData['value'] = value
elif (sourceName == "pkg"):
updatedData['name'] = "pkg"
updatedData['value'] = {}
for singleData in data.keys():
updatedData['value'][str(singleData.toLower())] = "%i" % (data[singleData])
elif (sourceName == "player"):
updatedData['name'] = "player"
updatedData['value'] = {}
if (adv['player'] == "amarok"):
updatedData['value']['album'] = str(data[QString(u'amarok_album')].toUtf8()).decode("utf-8")
updatedData['value']['artist'] = str(data[QString(u'amarok_artist')].toUtf8()).decode("utf-8")
updatedData['value']['progress'] = str(data[QString(u'amarok_progress')].toUtf8()).decode("utf-8")
updatedData['value']['time'] = str(data[QString(u'amarok_duration')].toUtf8()).decode("utf-8")
updatedData['value']['title'] = str(data[QString(u'amarok_title')].toUtf8()).decode("utf-8")
elif (adv['player'] == "mpd"):
updatedData['value']['album'] = str(data[QString(u'mpd_album')].toUtf8()).decode("utf-8")
updatedData['value']['artist'] = str(data[QString(u'mpd_artist')].toUtf8()).decode("utf-8")
updatedData['value']['progress'] = str(data[QString(u'mpd_progress')].toUtf8()).decode("utf-8")
updatedData['value']['time'] = str(data[QString(u'mpd_duration')].toUtf8()).decode("utf-8")
updatedData['value']['title'] = str(data[QString(u'mpd_title')].toUtf8()).decode("utf-8")
elif (adv['player'] == "qmmp"):
updatedData['value']['album'] = str(data[QString(u'qmmp_album')].toUtf8()).decode("utf-8")
updatedData['value']['artist'] = str(data[QString(u'qmmp_artist')].toUtf8()).decode("utf-8")
updatedData['value']['progress'] = str(data[QString(u'qmmp_progress')].toUtf8()).decode("utf-8")
updatedData['value']['time'] = str(data[QString(u'qmmp_duration')].toUtf8()).decode("utf-8")
updatedData['value']['title'] = str(data[QString(u'qmmp_title')].toUtf8()).decode("utf-8")
elif (sourceName == "ps"):
updatedData['name'] = "ps"
updatedData['value'] = {}
updatedData['value']['num'] = "%i" % (data[QString(u'psCount')])
updatedData['value']['total'] = "%i" % (data[QString(u'psTotal')])
updatedData['value']['list'] = data[QString(u'ps')]
elif (sourceName == "mem/swap/free"):
updatedData['name'] = "swap"
updatedData['type'] = "free"
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif (sourceName == "mem/swap/used"):
updatedData['name'] = "swap"
updatedData['type'] = "used"
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = value
elif (sourceName.split('/')[0] == "lmsensors"):
updatedData['name'] = "temp"
updatedData['type'] = sourceName
value = round(data[QString(u'value')].toFloat()[0], 1)
updatedData['value'] = "%4.1f" % (value)
elif (sourceName == "Local"):
updatedData['name'] = "time"
if (formats['time'].split('$time')[0] != formats['time']):
value = str(data[QString(u'DateTime')].toString(Qt.TextDate).toUtf8()).decode("utf-8")
elif (formats['time'].split('$isotime')[0] != formats['time']):
value = str(data[QString(u'DateTime')].toString(Qt.ISODate).toUtf8()).decode("utf-8")
elif (formats['time'].split('$shorttime')[0] != formats['time']):
value = str(data[QString(u'DateTime')].toString(Qt.SystemLocaleShortDate).toUtf8()).decode("utf-8")
elif (formats['time'].split('$longtime')[0] != formats['time']):
value = str(data[QString(u'DateTime')].toString(Qt.SystemLocaleLongDate).toUtf8()).decode("utf-8")
elif (formats['time'].split('$custom')[0] != formats['time']):
rawDate = data[QString(u'DateTime')]
value = adv['customTime']
for letters in timeLetters:
if (value.split('$' + letters)[0] != value):
value = value.split('$' + letters)[0] + str(rawDate.toString(letters).toUtf8()).decode("utf-8") + value.split('$' + letters)[1]
updatedData['value'] = value
elif (sourceName == "system/uptime"):
updatedData['name'] = "uptime"
value = datetime.timedelta(0, int(round(float(data[QString(u'value')]), 1)))
days = value.days
hours = int(value.seconds / 60 / 60)
minutes = int(value.seconds / 60 % 60)
if (formats['uptime'].split('$uptime')[0] != formats['uptime']):
updatedData['value'] = "%3id%2ih%2im" % (days, hours, minutes)
elif (formats['uptime'].split('$custom')[0] != formats['uptime']):
updatedData['value'] = adv['customUptime']
if (updatedData['value'].split('$dd')[0] != updatedData['value']):
updatedData['value'] = "%s%03i%s" % (updatedData['value'].split('$dd')[0], days, updatedData['value'].split('$dd')[1])
if (updatedData['value'].split('$d')[0] != updatedData['value']):
updatedData['value'] = "%s%i%s" % (updatedData['value'].split('$d')[0], days, updatedData['value'].split('$d')[1])
if (updatedData['value'].split('$hh')[0] != updatedData['value']):
updatedData['value'] = "%s%02i%s" % (updatedData['value'].split('$hh')[0], hours, updatedData['value'].split('$hh')[1])
if (updatedData['value'].split('$h')[0] != updatedData['value']):
updatedData['value'] = "%s%i%s" % (updatedData['value'].split('$h')[0], hours, updatedData['value'].split('$h')[1])
if (updatedData['value'].split('$mm')[0] != updatedData['value']):
updatedData['value'] = "%s%02i%s" % (updatedData['value'].split('$mm')[0], minutes, updatedData['value'].split('$mm')[1])
if (updatedData['value'].split('$m')[0] != updatedData['value']):
updatedData['value'] = "%s%i%s" % (updatedData['value'].split('$m')[0], minutes, updatedData['value'].split('$m')[1])
except:
pass
return updatedData
def disconnectFromSource(self, dataEngines=None, keys=None, name=None):
"""function to disconnect from sources"""
if (name == "bat"):
pass
elif (name == "cpu"):
dataEngines['system'].disconnectSource("cpu/system/TotalLoad", self.parent)
for item in keys['cpu']:
if (item != -1):
dataEngines['system'].disconnectSource("cpu/cpu" + str(item) + "/TotalLoad", self.parent)
elif (name == "cpuclock"):
dataEngines['system'].disconnectSource("cpu/system/AverageClock", self.parent)
for item in keys['cpuclock']:
if (item != -1):
dataEngines['system'].disconnectSource("cpu/cpu" + str(item) + "/clock", self.parent)
elif (name == "custom"):
dataEngines['ext'].disconnectSource("custom", self.parent)
elif (name == "gpu"):
dataEngines['ext'].disconnectSource("gpu", self.parent)
elif (name == "gputemp"):
dataEngines['ext'].disconnectSource("gputemp", self.parent)
elif (name == "hdd"):
for item in keys['hdd']:
dataEngines['system'].disconnectSource("partitions" + item + "/filllevel", self.parent)
dataEngines['system'].disconnectSource("partitions" + item + "/usedspace", self.parent)
elif (name == "hddtemp"):
dataEngines['ext'].disconnectSource("hddtemp", self.parent)
elif (name == "mem"):
dataEngines['system'].disconnectSource("mem/physical/application", self.parent)
dataEngines['system'].disconnectSource("mem/physical/free", self.parent)
dataEngines['system'].disconnectSource("mem/physical/used", self.parent)
elif (name == "net"):
dataEngines['system'].disconnectSource("network/interfaces/" + keys['net'] + "/transmitter/data", self.parent)
dataEngines['system'].disconnectSource("network/interfaces/" + keys['net'] + "/receiver/data", self.parent)
elif (name == "pkg"):
dataEngines['ext'].disconnectSource("pkg", self.parent)
elif (name == "player"):
dataEngines['ext'].disconnectSource("player", self.parent)
elif (name == "ps"):
dataEngines['ext'].disconnectSource("ps", self.parent)
elif (name == "swap"):
dataEngines['system'].disconnectSource("mem/swap/used", self.parent)
dataEngines['system'].disconnectSource("mem/swap/free", self.parent)
elif (name == "temp"):
for item in keys['temp']:
dataEngines['system'].disconnectSource(item, self.parent)
elif (name == "time"):
dataEngines['time'].disconnectSource("Local", self.parent)
elif (name == "uptime"):
dataEngines['system'].disconnectSource("system/uptime", self.parent)

View File

@ -1,588 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyKDE4.kdecore import *
from PyKDE4.kdeui import *
from PyKDE4.kio import *
from PyKDE4 import plasmascript
from PyKDE4.plasma import Plasma
import commands, os, shutil
import configdef
import configwindow
import dataengine
import ptmnotify
import reinit
import tooltip
from util import *
class CustomPlasmaLabel(Plasma.Label):
"""new Label with defined clicked() event"""
def __init__(self, applet, name):
"""class definition"""
Plasma.Label.__init__(self, applet)
self.name = name
self.notify = ptmnotify.PTMNotify(self)
def mousePressEvent(self, event):
"""mouse click event"""
if (event.button() == Qt.LeftButton):
self.notify.init(self.name)
class pyTextWidget(plasmascript.Applet):
def __init__(self, parent, args=None):
"""widget definition"""
plasmascript.Applet.__init__(self, parent)
# initialization
def init(self):
"""function to initializate widget"""
self._name = str(self.package().metadata().pluginName())
self.setupVar()
self.dataengine = dataengine.DataEngine(self)
self.reinit = reinit.Reinit(self, self.ptm['defaults'])
self.tooltipAgent = tooltip.Tooltip(self)
self.timer = QTimer()
QObject.connect(self.timer, SIGNAL("timeout()"), self.updateLabel)
self.initTooltip()
self.reInit()
self.applet.setLayout(self.ptm['layout'])
self.theme = Plasma.Svg(self)
self.theme.setImagePath("widgets/background")
self.setBackgroundHints(Plasma.Applet.DefaultBackground)
self.setHasConfigurationInterface(True)
# Create notifyrc file if required
kdehome = unicode(KGlobal.dirs().localkdedir())
if ((not os.path.exists(kdehome + "/share/apps/plasma_applet_pytextmonitor/plasma_applet_pytextmonitor.notifyrc")) and
(not os.path.exists("/usr" + "/share/apps/plasma_applet_pytextmonitor/plasma_applet_pytextmonitor.notifyrc"))):
self.createNotifyrc(kdehome)
# internal functions
def createConfigurationInterface(self, parent):
"""function to setup configuration window"""
self.configpage = configwindow.ConfigWindow(self)
self.configdef = configdef.ConfigDefinition(self, self.configpage, self.ptm['defaults'])
self.configdef.createConfigurationInterface(parent)
def createNotifyrc(self, kdehome):
"""function to create *.notifyrc"""
if (not os.path.isdir(kdehome + "/share/apps/plasma_applet_pytextmonitor")):
os.mkdir(kdehome + "/share/apps/plasma_applet_pytextmonitor")
shutil.copy(kdehome + "/share/apps/plasma/plasmoids/py-text-monitor/contents/code/plasma_applet_pytextmonitor.notifyrc",
kdehome + "/share/apps/plasma_applet_pytextmonitor/")
def initTooltip(self):
"""function to create tooltip"""
self.tooltip = Plasma.ToolTipContent()
self.tooltip.setMainText("PyTextMonitor")
self.tooltip.setSubText('')
Plasma.ToolTipManager.self().registerWidget(self.applet)
# graphical tooltip
self.tooltipScene = QGraphicsScene()
self.tooltipView = QGraphicsView(self.tooltipScene)
self.tooltipView.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.tooltipView.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
# show tooltip
Plasma.ToolTipManager.self().setContent(self.applet, self.tooltip)
def mouseDoubleClickEvent(self, event):
"""function to doubleclick event"""
os.system("ksysguard &")
def setupVar(self):
"""function to setup variables"""
self.ptm = {}
# dataengines
self.ptm['dataengine'] = {'ext':None, 'system':None, 'time':None}
# defaults
self.ptm['defaults'] = {}
self.ptm['defaults']['confBool'] = {'bat':'batBool', 'cpu':'cpuBool',
'cpuclock':'cpuclockBool', 'custom':'customBool', 'gpu':'gpuBool',
'gputemp':'gputempBool', 'hdd':'hddBool', 'hddtemp':'hddtempBool',
'mem':'memBool', 'net':'netBool', 'pkg':'pkgBool', 'player':'playerBool',
'ps':'psBool', 'swap':'swapBool', 'temp':'tempBool', 'uptime':'uptimeBool',
'time':'timeBool'}
self.ptm['defaults']['confColor'] = {'cpu':'cpu_color', 'cpuclock':'cpuclock_color',
'down':'down_color', 'mem':'mem_color', 'swap':'swap_color', 'up':'up_color'}
self.ptm['defaults']['confFormat'] = {'bat':'batFormat', 'cpu':'cpuFormat',
'cpuclock':'cpuclockFormat', 'custom':'customFormat', 'gpu':'gpuFormat',
'gputemp':'gputempFormat', 'hdd':'hddFormat', 'hddtemp':'hddtempFormat',
'mem':'memFormat', 'net':'netFormat', 'pkg':'pkgFormat',
'player':'playerFormat', 'ps':'psFormat', 'swap':'swapFormat',
'temp':'tempFormat', 'time':'timeFormat', 'uptime':'uptimeFormat'}
self.ptm['defaults']['bool'] = {'bat':0, 'cpu':2, 'cpuclock':0, 'custom':0,
'gpu':0, 'gputemp':0, 'hdd':0, 'hddtemp':0, 'mem':2, 'net':2, 'pkg':0,
'player':0, 'ps':0, 'swap':2, 'temp':0, 'time':0, 'uptime':0}
self.ptm['defaults']['format'] = {'bat':'[bat: $bat%$ac]', 'cpu':'[cpu: $cpu%]',
'cpuclock':'[mhz: $cpucl]', 'custom':'[$custom]', 'gpu':'[gpu: $gpu%]',
'gputemp':'[gpu temp: $gputemp&deg;C]', 'hdd':'[hdd: $hdd0%]',
'hddtemp':'[hdd temp: $hddtemp0&deg;C]', 'mem':'[mem: $mem%]',
'net':'[$netdev: $down/$upKB/s]', 'pkg':'[upgrade: $pkgcount0]',
'player':'[$artist - $title]', 'ps':'[proc: $pscount]', 'swap':'[swap: $swap%]',
'temp':'[temp: $temp0&deg;C]', 'time':'[$time]', 'uptime':'[uptime: $uptime]'}
self.ptm['defaults']['order'] = {'1':'cpu', '2':'temp', '3':'mem', '4':'swap', '5':'net',
'6':'bat', '7':'cpuclock', '8':'uptime', '9':'gpu', 'a':'gputemp', 'b':'hdd',
'c':'hddtemp', 'd':'player', 'e':'time', 'f':'custom', 'g':'ps', 'h':'pkg'}
# labels
self.ptm['labels'] = {}
self.ptm['layout'] = QGraphicsLinearLayout(Qt.Horizontal, self.applet)
self.ptm['layout'].setContentsMargins(1, 1, 1, 1)
# names
self.ptm['names'] = {}
self.ptm['names']['hdd'] = []
self.ptm['names']['hddtemp'] = []
self.ptm['names']['net'] = ""
self.ptm['names']['temp'] = []
# tooltips
self.ptm['tooltip'] = {}
self.ptm['tooltip']['bounds'] = {'cpu':100.0, 'cpuclock':4000.0, 'mem':16000.0,
'swap':16000, 'down':10000.0, 'up':10000.0}
self.ptm['tooltip']['values'] = {'cpu':[0.0, 0.0], 'cpuclock':[0, 0], 'mem':[0, 0],
'swap':[0, 0], 'down':[0, 0], 'up':[0, 0]}
# values
self.ptm['values'] = {}
self.ptm['values']['cpu'] = {-1:0.0}
self.ptm['values']['cpuclock'] = {-1:0.0}
numCores = int(commands.getoutput("grep -c '^processor' /proc/cpuinfo"))
for i in range(numCores):
self.ptm['values']['cpu'][i] = 0.0
self.ptm['values']['cpuclock'][i] = 0.0
self.ptm['values']['hdd'] = {}
self.ptm['values']['hddmb'] = {}
self.ptm['values']['hddtemp'] = {}
self.ptm['values']['mem'] = {'app':0.0, 'used':0.0, 'free':1.0}
self.ptm['values']['net'] = {"up":0.0, "down":0.0}
self.ptm['values']['swap'] = {'used':0.0, 'free':1.0}
self.ptm['values']['temp'] = {}
# variables
self.ptm['vars'] = {}
self.ptm['vars']['adv'] = {}
self.ptm['vars']['app'] = {}
self.ptm['vars']['bools'] = {}
self.ptm['vars']['formats'] = {}
self.ptm['vars']['tooltip'] = {}
def showConfigurationInterface(self):
"""function to show configuration window"""
plasmascript.Applet.showConfigurationInterface(self)
def startPolling(self):
try:
self.timer.start()
self.updateLabel()
self.tooltip.setSubText('')
except Exception as strerror:
self.tooltip.setSubText(str(strerror))
return
def updateLabel(self):
"""function to update label"""
if (self.ptm['vars']['bools']['bat'] > 0):
self.batText()
if (self.ptm['vars']['bools']['cpu'] > 0):
self.cpuText()
if (self.ptm['vars']['bools']['cpuclock'] > 0):
self.cpuclockText()
if (self.ptm['vars']['bools']['hdd'] > 0):
self.hddText()
if (self.ptm['vars']['bools']['hddtemp'] > 0):
self.hddtempText()
if (self.ptm['vars']['bools']['mem'] > 0):
self.memText()
if (self.ptm['vars']['bools']['net'] > 0):
self.netText()
if (self.ptm['vars']['bools']['swap'] > 0):
self.swapText()
if (self.ptm['vars']['bools']['temp'] > 0):
self.tempText()
self.updateTooltip()
def updateTooltip(self):
"""function to update tooltip"""
self.tooltipView.resize(100.0*(len(self.ptm['vars']['tooltip']['required']) - self.ptm['vars']['tooltip']['required'].count('up')), 100.0)
self.tooltipAgent.createGraphic(self.ptm['vars']['tooltip'], self.ptm['tooltip'], self.tooltipScene)
self.tooltip.setImage(QPixmap.grabWidget(self.tooltipView))
Plasma.ToolTipManager.self().setContent(self.applet, self.tooltip)
# update functions
# update dataengines
@pyqtSignature("dataUpdated(const QString &, const Plasma::DataEngine::Data &)")
def dataUpdated(self, sourceName, data):
"""function to update label"""
updatedData = self.dataengine.dataUpdated(str(sourceName), data, self.ptm)
if (updatedData['value'] == None):
return
# update values where is needed
if (updatedData['type'] != None):
self.ptm['values'][updatedData['name']][updatedData['type']] = updatedData['value']
elif (updatedData['name'] in ['custom', 'gpu', 'gputemp', 'pkg', 'player', 'ps', 'time', 'uptime']):
text = self.textPrepare(updatedData['name'], updatedData['value'])
self.setText(updatedData['name'], text)
else:
self.ptm['values'][updatedData['name']] = updatedData['value']
# update tooltips
if ((updatedData['name'] in ['cpu', 'cpuclock', 'mem', 'swap', 'net']) and (self.ptm['vars']['bools'][updatedData['name']] == 2)):
if (updatedData['name'] == "net"):
if (len(self.ptm['tooltip']['values'][updatedData['type']]) > self.ptm['vars']['tooltip']['num']):
self.ptm['tooltip']['values'][updatedData['type']] = self.ptm['tooltip']['values'][updatedData['type']][1:]
else:
if (len(self.ptm['tooltip']['values'][updatedData['name']]) > self.ptm['vars']['tooltip']['num']):
self.ptm['tooltip']['values'][updatedData['name']] = self.ptm['tooltip']['values'][updatedData['name']][1:]
if ((updatedData['name'] in ['cpu', 'cpuclock']) and (updatedData['type'] == -1)):
self.ptm['tooltip']['values'][updatedData['name']].append(updatedData['value'])
elif ((updatedData['name'] == "mem") and (updatedData['type'] == "app")):
self.ptm['tooltip']['values'][updatedData['name']].append(updatedData['value'])
elif ((updatedData['name'] == "mem") and (updatedData['type'] == "used")):
self.ptm['tooltip']['bounds']['mem'] = self.ptm['values']['mem']['free'] + self.ptm['values']['mem']['used']
elif ((updatedData['name'] == "swap") and (updatedData['type'] == "used")):
self.ptm['tooltip']['values'][updatedData['name']].append(updatedData['value'])
self.ptm['tooltip']['bounds']['swap'] = self.ptm['values']['swap']['free'] + self.ptm['values']['swap']['used']
elif (updatedData['name'] == "net"):
self.ptm['tooltip']['values'][updatedData['type']].append(updatedData['value'])
self.update()
# update labels
def batText(self):
"""function to set battery text"""
line = self.ptm['vars']['formats']['bat']
if (line.split('$bat')[0] != line):
try:
with open (self.ptm['vars']['adv']['batDev'], 'r') as batFile:
bat = batFile.readline()[:-1]
except:
bat = "off"
bat = "%3s" % (bat)
line = line.split('$bat')[0] + bat + line.split('$bat')[1]
if (line.split('$ac')[0] != line):
try:
with open (self.ptm['vars']['adv']['acDev'], 'r') as batFile:
bat = batFile.readline()[:-1]
if (bat == "1"):
bat = self.ptm['vars']['adv']['acOnline']
else:
bat = self.ptm['vars']['adv']['acOffline']
except:
bat = "N\\A"
line = line.split('$ac')[0] + bat + line.split('$ac')[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("bat", text)
def cpuText(self):
"""function to set cpu text"""
line = self.ptm['vars']['formats']['cpu']
keys = self.ptm['values']['cpu'].keys()
keys.sort()
keys.reverse()
for core in keys[:-1]:
if (line.split('$cpu' + str(core))[0] != line):
value = "%5.1f" % (self.ptm['values']['cpu'][core])
line = line.split('$cpu' + str(core))[0] + value + line.split('$cpu' + str(core))[1]
if (line.split('$cpu')[0] != line):
value = "%5.1f" % (self.ptm['values']['cpu'][-1])
line = line.split('$cpu')[0] + value + line.split('$cpu')[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("cpu", text)
def cpuclockText(self):
"""function to set cpu clock text"""
line = self.ptm['vars']['formats']['cpuclock']
keys = self.ptm['values']['cpuclock'].keys()
keys.sort()
keys.reverse()
for core in keys[:-1]:
if (line.split('$cpucl' + str(core))[0] != line):
value = "%4.0f" % (self.ptm['values']['cpuclock'][core])
line = line.split('$cpucl' + str(core))[0] + value + line.split('$cpucl' + str(core))[1]
if (line.split('$cpucl')[0] != line):
value = "%4.0f" % (self.ptm['values']['cpuclock'][-1])
line = line.split('$cpucl')[0] + value + line.split('$cpucl')[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("cpuclock", text)
def hddText(self):
"""function to set hdd text"""
line = self.ptm['vars']['formats']['hdd']
devices = range(len(self.ptm['names']['hdd']))
devices.reverse()
for i in devices:
if (line.split('$hdd' + str(i))[0] != line):
hdd = "%4.1f" % (self.ptm['values']['hdd'][self.ptm['names']['hdd'][i]])
line = line.split('$hdd' + str(i))[0] +\
hdd +\
line.split('$hdd' + str(i))[1]
if (line.split('$hddmb' + str(i))[0] != line):
hdd = "%i" % (self.ptm['values']['hddmb'][self.ptm['names']['hdd'][i]] / 1024.0)
line = line.split('$hddmb' + str(i))[0] +\
str(int(self.ptm['values']['hddmb'][self.ptm['names']['hdd'][i]] / 1024.0)) +\
line.split('$hddmb' + str(i))[1]
if (line.split('$hddgb' + str(i))[0] != line):
hdd = "%4.1f" % (self.ptm['values']['hddmb'][self.ptm['names']['hdd'][i]] / (1024.0 * 1024.0))
line = line.split('$hddgb' + str(i))[0] +\
hdd +\
line.split('$hddgb' + str(i))[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("hdd", text)
def hddtempText(self):
"""function to set hddtemp text"""
line = self.ptm['vars']['formats']['hddtemp']
devices = range(len(self.ptm['names']['hddtemp']))
devices.reverse()
for i in devices:
if (line.split('$hddtemp' + str(i))[0] != line):
line = line.split('$hddtemp' + str(i))[0] +\
str(self.ptm['values']['hddtemp'][self.ptm['names']['hddtemp'][i]]) +\
line.split('$hddtemp' + str(i))[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("hddtemp", text)
def memText(self):
"""function to set mem text"""
line = self.ptm['vars']['formats']['mem']
if (line.split('$memgb')[0] != line):
mem = "%4.1f" % (self.ptm['values']['mem']['app'] / (1024.0 * 1024.0))
line = line.split('$memgb')[0] + mem + line.split('$memgb')[1]
if (line.split('$memmb')[0] != line):
mem = "%i" % (self.ptm['values']['mem']['app'] / 1024.0)
line = line.split('$memmb')[0] + mem + line.split('$memmb')[1]
if (line.split('$mem')[0] != line):
try:
mem = 100 * self.ptm['values']['mem']['app'] / (self.ptm['values']['mem']['free'] + self.ptm['values']['mem']['used'])
mem = "%5.1f" % (round(mem, 1))
except:
mem = " N\\A"
line = line.split('$mem')[0] + mem + line.split('$mem')[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("mem", text)
def netText(self):
"""function to set network text"""
line = self.ptm['vars']['formats']['net']
if (line.split('$netdev')[0] != 0):
line = line.split('$netdev')[0] + self.ptm['names']['net'] + line.split('$netdev')[1]
if (line.split('$down')[0] != line):
value = "%4.0f" %(self.ptm['values']['net']['down'])
line = line.split('$down')[0] + value + line.split('$down')[1]
if (line.split('$up')[0] != line):
value = "%4.0f" %(self.ptm['values']['net']['up'])
line = line.split('$up')[0] + value + line.split('$up')[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("net", text)
def swapText(self):
"""function to set swap text"""
line = self.ptm['vars']['formats']['swap']
if (line.split('$swapgb')[0] != line):
mem = "%4.1f" % (self.ptm['values']['swap']['used'] / (1024.0 * 1024.0))
line = line.split('$swapgb')[0] + mem + line.split('$swapgb')[1]
if (line.split('$swapmb')[0] != line):
mem = "%i" % (self.ptm['values']['swap']['used'] / 1024.0)
line = line.split('$swapmb')[0] + mem + line.split('$swapmb')[1]
if (line.split('$swap')[0] != line):
try:
mem = 100 * self.ptm['values']['swap']['used'] / (self.ptm['values']['swap']['free'] + self.ptm['values']['swap']['used'])
mem = "%5.1f" % (round(mem, 1))
except:
mem = " N\\A"
line = line.split('$swap')[0] + mem + line.split('$swap')[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("swap", text)
def tempText(self):
"""function to set temperature text"""
line = self.ptm['vars']['formats']['temp']
devices = range(len(self.ptm['names']['temp']))
devices.reverse()
for i in devices:
if (line.split('$temp' + str(i))[0] != line):
line = line.split('$temp' + str(i))[0] +\
str(self.ptm['values']['temp'][self.ptm['names']['temp'][i]]) +\
line.split('$temp' + str(i))[1]
text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
self.setText("temp", text)
# external functions
def addLabel(self, name=None, text=None, add=True):
"""function to add new label"""
if (add):
self.ptm['labels'][name] = CustomPlasmaLabel(self.applet, name)
self.ptm['layout'].addItem(self.ptm['labels'][name])
self.setText(name, text)
else:
self.setText(name, '')
self.ptm['layout'].removeItem(self.ptm['labels'][name])
def applySettings(self, name=None, ptm=None):
"""function to read settings"""
self.ptm[name] = ptm
if (name == "names"):
for item in ['hdd', 'hddtemp', 'temp']:
for value in self.ptm['names'][item]:
self.ptm['values'][item][value] = 0.0
if (item == "hdd"):
self.ptm['values']['hddmb'][value] = 0.0
def connectToEngine(self):
"""function to connect to dataengines"""
self.ptm['dataengine']['ext'] = self.dataEngine("ext-sysmon")
self.ptm['dataengine']['system'] = self.dataEngine("systemmonitor")
self.ptm['dataengine']['time'] = self.dataEngine("time")
self.dataengine.connectToEngine(self.ptm['vars']['bools'], self.ptm['dataengine'],
self.ptm['vars']['app']['interval'], self.ptm['names'])
def disconnectFromSource(self):
"""function to disconnect from sources"""
for label in self.ptm['defaults']['format'].keys():
if (self.ptm['vars']['bools'][label] > 0):
self.addLabel(label, None, False)
keys = {'cpu':self.ptm['values']['cpu'].keys(), 'cpuclock':self.ptm['values']['cpuclock'].keys(),
'hdd':self.ptm['values']['hdd'].keys(), 'net':self.ptm['names']['net'],
'temp':self.ptm['values']['temp'].keys()}
self.dataengine.disconnectFromSource(self.ptm['dataengine'], keys, label)
def reInit(self):
"""function to run reinit"""
self.reinit.reinit()
if (self.ptm['vars']['adv']['netdevBool'] == 0):
self.ptm['names']['net'] = self.setNetdev()
self.resize(10, 10)
# create dataengines
self.thread().wait(60000)
self.connectToEngine()
self.timer.setInterval(self.ptm['vars']['app']['interval'])
self.startPolling()
def setNetdev(self):
"""function to set network device"""
netdev = "lo"
netdir = self.ptm['vars']['adv']['netDir']
interfaces = QDir.entryList(QDir(netdir), QDir.Dirs | QDir.NoDotAndDotDot)
for device in interfaces:
if (str(device) != "lo"):
#try:
if True:
with open(netdir + '/' + str(device) + '/operstate', 'r') as stateFile:
if (stateFile.readline() == "up\n"):
netdev = str(device)
#except:
#pass
return netdev
def setText(self, name=None, text=None):
"""function to set text to labels"""
self.ptm['labels'][name].setText(text)
def textPrepare(self, name=None, text=None):
"""function to prepare text"""
line = self.ptm['vars']['formats'][name]
if (name == "custom"):
if (line.split('$custom')[0] != line):
line = line.split('$custom')[0] + text + line.split('$custom')[1]
elif (name == "gpu"):
if (line.split('$gpu')[0] != line):
line = line.split('$gpu')[0] + text + line.split('$gpu')[1]
elif (name == "gputemp"):
if (line.split('$gputemp')[0] != line):
line = line.split('$gputemp')[0] + text + line.split('$gputemp')[1]
elif (name == "pkg"):
for item in text.keys():
if (line.split('$' + item)[0] != line):
line = line.split('$' + item)[0] + text[item] + line.split('$' + item)[1]
elif (name == "player"):
if (line.split('$album')[0] != line):
line = line.split('$album')[0] + text['album'] + line.split('$album')[1]
if (line.split('$artist')[0] != line):
line = line.split('$artist')[0] + text['artist'] + line.split('$artist')[1]
if (line.split('$progress')[0] != line):
line = line.split('$progress')[0] + text['progress'] + line.split('$progress')[1]
if (line.split('$time')[0] != line):
line = line.split('$time')[0] + text['time'] + line.split('$time')[1]
if (line.split('$title')[0] != line):
line = line.split('$title')[0] + text['title'] + line.split('$title')[1]
elif (name == "ps"):
if (line.split('$pscount')[0] != line):
line = line.split('$pscount')[0] + text['num'] + line.split('$pscount')[1]
if (line.split('$pstotal')[0] != line):
line = line.split('$pstotal')[0] + text['total'] + line.split('$pstotal')[1]
if (line.split('$ps')[0] != line):
line = line.split('$ps')[0] + text['list'] + line.split('$ps')[1]
elif (name == "time"):
if (line.split('$time')[0] != line):
line = line.split('$time')[0] + text + line.split('$time')[1]
elif (line.split('$isotime')[0] != line):
line = line.split('$isotime')[0] + text + line.split('$isotime')[1]
elif (line.split('$shorttime')[0] != line):
line = line.split('$shorttime')[0] + text + line.split('$shorttime')[1]
elif (line.split('$longtime')[0] != line):
line = line.split('$longtime')[0] + text + line.split('$longtime')[1]
elif (line.split('$custom')[0] != line):
line = line.split('$custom')[0] + text + line.split('$custom')[1]
elif (name == "uptime"):
if (line.split('$uptime')[0] != line):
line = line.split('$uptime')[0] + text + line.split('$uptime')[1]
elif (line.split('$custom')[0] != line):
line = line.split('$custom')[0] + text + line.split('$custom')[1]
output = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
return output
def CreateApplet(parent):
return pyTextWidget(parent)

View File

@ -1,224 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyKDE4.kdecore import KComponentData
from PyKDE4.kdeui import KNotification
import commands
class PTMNotify:
def __init__(self, parent):
"""class definition"""
def init(self, name=None):
"""function to init notification"""
content = self.initText(name)
self.createNotify(content)
def createNotify(self, content):
"""function to create notification for label"""
notification = KNotification(content[0])
notification.setComponentData(KComponentData("plasma_applet_pytextmonitor"))
notification.setTitle("PyTextMonitor info ::: " + content[0]);
notification.setText(content[1]);
notification.sendEvent();
def createText(self, type):
"""function to create text"""
text = ""
if (type == "battery"):
try:
text = "%s" %(commands.getoutput("acpi -abi"))
except:
text = "Something wrong"
elif (type == "disk"):
try:
for line in commands.getoutput("df -h --output='source,target,used,size,pcent' --exclude-type=fuseblk --exclude-type=tmpfs --exclude-type=devtmpfs").split("\n")[1:]:
text = text + "%s (to %s): %s of %s (%s)\n" % (line.split()[0], line.split()[1], line.split()[2], line.split()[3], line.split()[4])
except:
text = "Something wrong"
elif (type == "graphical"):
try:
output = commands.getoutput("lspci -m | grep 'VGA\|3D'")
if (output.lower().find('nvidia') > -1):
gpudev = "nvidia"
elif (output.lower().find('radeon') > -1):
gpudev = "ati"
for line in output.split("\n"):
text = text + "%s %s\n" % (line.split('"')[0], line.split('"')[5])
if (gpudev == 'nvidia'):
output = commands.getoutput("nvidia-smi -q -d UTILIZATION | grep Gpu | tail -n1")
try:
value = "%5.1f" % (round(float(output.split()[2]), 1))
except:
value = " N\A"
elif (gpudev == 'ati'):
output = commands.getoutput("aticonfig --od-getclocks | grep load | tail -n1")
try:
value = "%5.1f" % (round(float(output.split()[3]), 1))
except:
value = " N\A"
else:
value = " N\A"
text = text + "Load: %s%%\n" % (value)
if (gpudev == 'nvidia'):
output = commands.getoutput("nvidia-smi -q -d TEMPERATURE | grep Gpu | tail -n1")
try:
value = "%5.1f" % (round(float(output.split()[2]), 1))
except:
value = " N\A"
elif (gpudev == 'ati'):
output = commands.getoutput("aticonfig --od-gettemperature | grep Temperature | tail -n1")
try:
value = "%5.1f" % (round(float(output.split()[3]), 1))
except:
value = " N\A"
else:
value = " N\A"
text = text + "Temp: %s\xb0C\n" % (value)
except:
text = "Something wrong"
elif (type == "memory"):
try:
output = commands.getoutput("free -m -o").split("\n")
memUsage = int(output[1].split()[1]) - (int(output[1].split()[3]) + int(output[1].split()[5]) + int(output[1].split()[6]))
text = text + "Memory: %i of %s (%i%%)\n" % (memUsage, output[1].split()[1], int(100*memUsage/int(output[1].split()[1])))
text = text + "Swap: %s of %s (%i%%)\n" % (output[2].split()[2], output[2].split()[1], int(100*int(output[2].split()[2])/int(output[2].split()[1])))
output = commands.getoutput("swapon --show").split("\n")
text = text + "Swap Device: %s (%s)" % (output[1].split()[0], output[1].split()[1])
except:
text = "Something wrong"
elif (type == "network"):
try:
output = commands.getoutput("ifconfig -a -s").split("\n")[1:]
devices = [line.split()[0] for line in output]
text = text + "Devices: %s\n" % (' '.join(devices))
for dev in devices:
output = commands.getoutput("ifconfig -a -s " + dev + " && sleep 0.2 && ifconfig -a -s " + dev).split("\n")
download = int((int(output[3].split()[2]) - int(output[1].split()[2])) / (0.2 * 1024))
upload = int((int(output[3].split()[6]) - int(output[1].split()[6])) / (0.2 * 1024))
text = text + "%s: %i/%i KB/s" % (dev, download, upload)
output = commands.getoutput("ifconfig " + dev + " | grep 'inet ' || echo ' inet Null'").split()[1]
text = text + " (IP: %s)\n" % (output)
output = commands.getoutput("wget -qO- http://ifconfig.me/ip")
text = text + "External IP: %s" % (output)
except:
text = "Something wrong"
elif (type == "player"):
try:
artist = "N\\A"
album = "N\\A"
title = "N\\A"
if (len(commands.getoutput("pgrep amarok")) > 0):
player = "amarok"
elif (len(commands.getoutput("pgrep mpd")) > 0):
player = "mpd"
elif (len(commands.getoutput("pgrep qmmp")) > 0):
player = "qmmp"
else:
player = ""
if (player == "amarok"):
artist = commands.getoutput("qdbus org.kde.amarok /Player GetMetadata 2> /dev/null | grep albumartist: | cut -c14-")
album = commands.getoutput("qdbus org.kde.amarok /Player GetMetadata 2> /dev/null | grep album: | cut -c8-")
title = commands.getoutput("qdbus org.kde.amarok /Player GetMetadata 2> /dev/null | grep title: | cut -c8-")
elif (player == "mpd"):
output = commands.getoutput("echo 'currentsong\nclose' | curl --connect-timeout 1 -fsm 3 telnet://localhost:6600 2> /dev/null")
for line in output.split("\n"):
if (line.split(": ")[0] == "Artist"):
artist = line.split(": ")[1]
elif (line.split(": ")[0] == "Album"):
album = line.split(": ")[1]
elif (line.split(": ")[0] == "Title"):
title = line.split(": ")[1]
elif (player == "qmmp"):
artist = commands.getoutput("qmmp --nowplaying '%if(%p,%p,Unknown)' 2> /dev/null")
album = commands.getoutput("qmmp --nowplaying '%if(%a,%a,Unknown)' 2> /dev/null")
title = commands.getoutput("qmmp --nowplaying '%if(%t,%t,Unknown)' 2> /dev/null")
text = text + "Artist: %s\nAlbum: %s\nTitle: %s" % (artist, album, title)
except:
text = "Something wrong"
elif (type == "processor"):
try:
output = commands.getoutput("grep 'model name' /proc/cpuinfo | head -1")
text = text + "Model: %s\n" % (' '.join(output.split()[3:]))
output = commands.getoutput("sar -u | tail -1")
text = text + "CPU Usage: %5.1f%%\n" % (100-float(output.split()[-1]))
output = commands.getoutput("grep MHz /proc/cpuinfo | head -1")
text = text + "CPU Freq: %i MHz\n" % (int(float(output.split()[-1])))
output = commands.getoutput("sensors -u")
text = text + "Temps:"
for line in output.split("\n"):
if (line.find("_input") > -1):
text = text + " %3.0f\xb0C" % (round(float(line.split()[-1]), 0))
except:
text = "Something wrong"
elif (type == "system"):
try:
text = text + "Kernel: %s\n" % (commands.getoutput("uname -rsm"))
text = text + "Hostname: %s\n" % (commands.getoutput("uname -n"))
text = text + "Whoami: %s\n" % (commands.getoutput("whoami"))
text = text + "Uptime: %s\n" % (commands.getoutput("uptime"))
except:
text = "Something wrong"
content = [type, text]
return content
def initText(self, name):
"""function to send text"""
if (name == "bat"):
return self.createText("battery")
elif (name == "cpu"):
return self.createText("processor")
elif (name == "cpuclock"):
return self.createText("processor")
elif (name == "custom"):
return self.createText("system")
elif (name == "gpu"):
return self.createText("graphical")
elif (name == "gputemp"):
return self.createText("graphical")
elif (name == "hdd"):
return self.createText("disk")
elif (name == "hddtemp"):
return self.createText("disk")
elif (name == "mem"):
return self.createText("memory")
elif (name == "net"):
return self.createText("network")
elif (name == "pkg"):
return self.createText("system")
elif (name == "player"):
return self.createText("player")
elif (name == "ps"):
return self.createText("system")
elif (name == "swap"):
return self.createText("memory")
elif (name == "temp"):
return self.createText("processor")
elif (name == "time"):
return self.createText("system")
elif (name == "uptime"):
return self.createText("system")
else:
return None

View File

@ -1,96 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import config
class Reinit():
def __init__(self, parent, defaults=None):
"""class definition"""
self.parent = parent
self.defaults = defaults
self.labels = defaults['format'].keys()
def reinit(self):
"""function to reinitializate widget"""
settings = config.Config(self.parent)
ptmVars = {}
ptmVars['adv'] = {}
ptmVars['adv']['acDev'] = str(settings.get('ac_device', '/sys/class/power_supply/AC/online'))
ptmVars['adv']['acOnline'] = str(settings.get('ac_online', '(*)'))
ptmVars['adv']['acOffline'] = str(settings.get('ac_offline', '( )'))
ptmVars['adv']['batDev'] = str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity'))
ptmVars['adv']['customTime'] = str(settings.get('custom_time', '$hh:$mm'))
ptmVars['adv']['customUptime'] = str(settings.get('custom_uptime', '$dd,$hh,$mm'))
ptmVars['adv']['netdevBool'] = settings.get('netdevBool', 0).toInt()[0]
ptmVars['adv']['netDir'] = str(settings.get('netdir', '/sys/class/net'))
ptmVars['adv']['player'] = str(settings.get('player_name', "amarok"))
ptmVars['app'] = {}
ptmVars['app']['format'] = ["<pre><p align=\"center\"><span style=\" font-family:'" + str(settings.get('font_family', 'Terminus')) +\
"'; font-style:" + str(settings.get('font_style', 'normal')) + "; font-size:" + str(settings.get('font_size', 12)) +\
"pt; font-weight:" + str(settings.get('font_weight', 400)) + "; color:" + str(settings.get('font_color', '#000000')) +\
";\">", "</span></p></pre>"]
ptmVars['app']['interval'] = settings.get('interval', 2000).toInt()[0]
ptmVars['app']['order'] = str(settings.get('label_order', '1345'))
ptmVars['tooltip'] = {}
ptmVars['tooltip']['colors'] = {}
ptmVars['tooltip']['colors']['cpu'] = str(settings.get('cpu_color', '#ff0000'))
ptmVars['tooltip']['colors']['cpuclock'] = str(settings.get('cpuclock_color', '#00ff00'))
ptmVars['tooltip']['colors']['mem'] = str(settings.get('mem_color', '#0000ff'))
ptmVars['tooltip']['colors']['swap'] = str(settings.get('swap_color', '#ffff00'))
ptmVars['tooltip']['colors']['down'] = str(settings.get('down_color', '#00ffff'))
ptmVars['tooltip']['colors']['up'] = str(settings.get('up_color', '#ff00ff'))
ptmVars['tooltip']['num'] = settings.get('tooltip_num', 100).toInt()[0]
ptmVars['bools'] = {}
for label in self.labels:
ptmVars['bools'][label] = settings.get(self.defaults['confBool'][label], self.defaults['bool'][label]).toInt()[0]
ptmNames = {}
ptmNames['hdd'] = str(settings.get('mount', '/')).split('@@')
ptmNames['hddtemp'] = str(settings.get('hdd', '/dev/sda')).split('@@')
if (ptmVars['adv']['netdevBool'] > 0):
ptmNames['net'] = str(settings.get('custom_netdev', 'lo'))
else:
ptmNames['net'] = ""
ptmNames['temp'] = str(settings.get('temp_device', '')).split('@@')
self.parent.applySettings('names', ptmNames)
ptmVars['formats'] = {}
ptmVars['tooltip']['required'] = []
for order in ptmVars['app']['order']:
label = self.defaults['order'][order]
if (ptmVars['bools'][label] > 0):
ptmVars['formats'][label] = str(settings.get(self.defaults['confFormat'][label], self.defaults['format'][label]))
text = ptmVars['app']['format'][0] + ptmVars['formats'][label] + ptmVars['app']['format'][1]
self.parent.addLabel(label, text, True)
if ((label in ['cpu', 'cpuclock', 'mem', 'net', 'swap']) and (ptmVars['bools'][label] == 2)):
if (label == 'net'):
ptmVars['tooltip']['required'].append("down")
ptmVars['tooltip']['required'].append("up")
else:
ptmVars['tooltip']['required'].append(label)
self.parent.applySettings('vars', ptmVars)

View File

@ -1,64 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# This file is part of pytextmonitor #
# #
# pytextmonitor is free software: you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation, either version 3 of the #
# License, or (at your option) any later version. #
# #
# pytextmonitor is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with pytextmonitor. If not, see http://www.gnu.org/licenses/ #
############################################################################
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class Tooltip():
def __init__(self, parent):
"""class definition"""
self.parent = parent
def createGraphic(self, ptmVars, ptmTooltip, widget):
"""function to create graph"""
widget.clear()
pen = QPen()
bounds = ptmTooltip['bounds']
colors = ptmVars['colors']
types = ptmVars['required']
values = ptmTooltip['values']
maxOne = [100.0, 100.0]
bounds['down'] = 1.0
for value in values['down']:
if (bounds['down'] < value):
bounds['down'] = value
for value in values['up']:
if (bounds['down'] < value):
bounds['down'] = value
bounds['up'] = bounds['down']
down = False
for type in types:
norm = [maxOne[0] / len(values[type]), maxOne[1] / (1.5 * bounds[type])]
pen.setColor(QColor(colors[type]))
if (down):
shift = (types.index(type) - 1) * maxOne[0]
else:
shift = types.index(type) * maxOne[0]
for i in range(len(values[type])-1):
x1 = i * norm[0] + shift
y1 = -values[type][i] * norm[1]
x2 = (i + 1) * norm[0] + shift
y2 = -values[type][i+1] * norm[1]
widget.addLine(x1, y1, x2, y2, pen)
if (type == 'down'):
down = True

View File

@ -1,56 +0,0 @@
# -*- coding: utf-8 -*-
############################################################################
# Copyright 2012 Alex Oleshkevich <alex.oleshkevich@gmail.com> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., #
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #
############################################################################
from shutil import copyfile
from PyKDE4.kdecore import *
import os
class Util():
def __init__(self, applet):
self.applet = applet
def createDirectory(self, name):
if not os.path.isdir(name):
try:
os.mkdir(name)
except:
print ('Failed to create directory: ' + name)
def kdeHome(self):
return unicode(KGlobal.dirs().localkdedir())
def createNotifyrc(self):
print ('[%s] creating notifyrc' % (self.applet._name))
self.createDirectory(self.kdeHome() + 'share/apps/%s' % self.applet._name)
source = self.applet.package().path() + 'contents/misc/%s.notifyrc' % self.applet._name
destination = self.kdeHome() + 'share/apps/%s/%s.notifyrc' % (self.applet._name, self.applet._name)
copyfile(source, destination)
def createConfig(self):
self.createDirectory(self.kdeHome() + 'share/apps/%s' % self.applet._name)
source = self.applet.package().path() + 'contents/misc/%s.ini' % self.applet._name
destination = self.kdeHome() + 'share/apps/%s/%s.ini' % (self.applet._name, self.applet._name)
copyfile(source, destination)

Some files were not shown because too many files have changed in this diff Show More