Compare commits
335 Commits
Author | SHA1 | Date | |
---|---|---|---|
fe822518d5 | |||
1f9e8221f0 | |||
d7e93e83a3 | |||
17c3383616 | |||
830bab7cb6 | |||
0b3832cc32 | |||
e64ca5ec08 | |||
84b93098f2 | |||
17bef06c98 | |||
db7573de80 | |||
4907496a2e | |||
43daae5529 | |||
1d1fe469f8 | |||
99049164be | |||
f61948d9b3 | |||
ea54c54d42 | |||
c843c5260d | |||
a8912074dd | |||
2be0edcb40 | |||
fcf7ca233f | |||
aa127574c4 | |||
d72f827984 | |||
b7d607bfcc | |||
c727947557 | |||
6864e5bda0 | |||
4babb3ba04 | |||
e0aadc48c4 | |||
18b6fc6eef | |||
5406f6f66f | |||
ab966504cc | |||
ce761db924 | |||
f91c80b5b1 | |||
97fbb4acc1 | |||
554354ce36 | |||
c007fabe12 | |||
3b11e39e99 | |||
653cc4fd84 | |||
eae742c559 | |||
e339f5aa1a | |||
21a1d8cd1b | |||
0ea17555b1 | |||
eec87be7a2 | |||
0cd293c4c3 | |||
e5c70b9535 | |||
3ef68f7a43 | |||
1fbc9e315e | |||
28dafcb721 | |||
4164c7fe04 | |||
bc8aadc17b | |||
cd48ac8245 | |||
0751d080eb | |||
6c6cfe9a04 | |||
b61d514cb2 | |||
a5c352bc06 | |||
54174974b1 | |||
fd81fda9a1 | |||
c69957e905 | |||
a65f4cb02f | |||
3b89b30a98 | |||
5921bd4c1d | |||
5b26d835df | |||
38c4d3bfaf | |||
eac50a8799 | |||
6e5a068ad2 | |||
7f639805e6 | |||
8a6650f833 | |||
96cfeb520d | |||
7cd80e14a7 | |||
b55d453aeb | |||
7eb5197318 | |||
e603ad9977 | |||
068a976499 | |||
5b44fa5c75 | |||
87614084ab | |||
8ccad0b86c | |||
0240dee6ea | |||
81105fb12d | |||
93abb86340 | |||
5584ba0e9f | |||
2c35031549 | |||
d28d7156ce | |||
123cfcb475 | |||
7fa541bc06 | |||
03574461a9 | |||
f588c9af8d | |||
ee39ac9203 | |||
5ea8c97094 | |||
edf3a72564 | |||
b9c9aac686 | |||
7dd7251a45 | |||
1ccbc264ed | |||
334189b8a1 | |||
6c7d6a5443 | |||
e37f2a7190 | |||
baf21549d5 | |||
07c2abd5bc | |||
2ea73b2261 | |||
7c3b47693e | |||
0fe67ce323 | |||
bfb7d72faf | |||
662b952961 | |||
a81cbe3d9c | |||
0462bb186e | |||
9985fe6260 | |||
11a6f01ae3 | |||
43ee40a65d | |||
f9eb27964f | |||
bab9f58b35 | |||
608908fd02 | |||
178bbd0bc0 | |||
f8a02a48ac | |||
cf39fba9c2 | |||
6643852822 | |||
7145a1d33e | |||
a3c1f4ea66 | |||
a6ddd53308 | |||
744f3bc04b | |||
afdf86f03a | |||
8f2784d2a2 | |||
926da88c10 | |||
ea287c21b1 | |||
c0561a95e0 | |||
b7d1802ca8 | |||
c659f16d7e | |||
79cbfc4b32 | |||
61e2a380b9 | |||
64bc89ba75 | |||
926d112d22 | |||
e205664fec | |||
5d13c8289f | |||
7ac5d68b02 | |||
69b5bdec66 | |||
5ce7aac9dd | |||
80eb7983fc | |||
7e2b1384ae | |||
d573cc7491 | |||
b380000d2f | |||
50d96574f5 | |||
d6819e3771 | |||
a54b3064fe | |||
a0288bcf96 | |||
f1e22f122e | |||
52f85836a2 | |||
2ad638c158 | |||
cebf3b9aea | |||
e32a37043a | |||
246430dc28 | |||
dd4471a0d2 | |||
31c612cfd2 | |||
2201f4d4a2 | |||
886e24d4af | |||
fbf5f649ee | |||
7fc7b68358 | |||
9904e5d6c6 | |||
e10f3396b9 | |||
25ff5a9189 | |||
41b1282488 | |||
5d46988745 | |||
71823471cc | |||
fe580ef806 | |||
b1f8340774 | |||
e868b03454 | |||
632adfa54c | |||
4476ec8e45 | |||
b4f7b6e65a | |||
77349e797f | |||
e7b6e4a3bf | |||
3d8f88d935 | |||
1eed0f458c | |||
9b581a882f | |||
6ba1288c50 | |||
926c283338 | |||
8519eb51bd | |||
f05b256306 | |||
6fd7bad8f9 | |||
6f4ecbd107 | |||
9f392c3a19 | |||
e04430e36c | |||
68759513a9 | |||
62164f8229 | |||
7c5e02217b | |||
23cd74132a | |||
5dfb02bf9d | |||
2d0a92eec1 | |||
359e81ff93 | |||
1bd80ba786 | |||
2a04414600 | |||
fe51e67ba4 | |||
e208be7894 | |||
26bf118d50 | |||
86da48bbca | |||
d081a64889 | |||
3d2c09647a | |||
c7a99a6d0d | |||
c0a273f9f7 | |||
5d724ac688 | |||
8e318a99d0 | |||
5c861b3814 | |||
5cf068875c | |||
80366e59bb | |||
a6a94f0e49 | |||
6a74802261 | |||
c44e98d8a1 | |||
b872a66088 | |||
74d54d6268 | |||
2ad6d76d4e | |||
878dac158e | |||
2de09cec32 | |||
90ca8c89f5 | |||
757d7b703f | |||
5d3e377ffb | |||
9b5a6908d7 | |||
f54ba7a6cf | |||
7427183981 | |||
109328e33b | |||
ec62e93e4e | |||
1a6d97800c | |||
b09e90a0e5 | |||
c1f18a31bf | |||
962478a27a | |||
4857c6658f | |||
4416298e88 | |||
a3576275cc | |||
9c8be61855 | |||
3fece265f4 | |||
cc26873200 | |||
2ee6949a59 | |||
1a99c0cb3d | |||
a0e8f373c0 | |||
f53179330b | |||
d1a0597b5f | |||
1c58b23fa2 | |||
4c442a7e73 | |||
3bfeabe537 | |||
cd99f059ff | |||
45de9145fb | |||
21418cdd18 | |||
cc1d062fd9 | |||
c9fd746cd0 | |||
1555b22a3b | |||
1c772f288a | |||
16f4f4a8ff | |||
c09da99e06 | |||
14fab265cd | |||
9ba7a2b0d5 | |||
2c4515eb66 | |||
2e7fa3689b | |||
831b98f836 | |||
2295e80b67 | |||
f21fea1393 | |||
2675beb106 | |||
329457955d | |||
614e15d336 | |||
2e93325601 | |||
6f6af548ef | |||
5dc3d4e212 | |||
d8ae9a4c2a | |||
ce74cdb2d5 | |||
0fdb7317cc | |||
c1d55962a7 | |||
7353fdfe0f | |||
032953eac2 | |||
4766ef5675 | |||
1b6c8faf49 | |||
fc104b4549 | |||
975b575db5 | |||
4547815549 | |||
73e921a8f5 | |||
7ee4a5dc9d | |||
89efe6c846 | |||
4218a4da08 | |||
0db909d914 | |||
d7cc354432 | |||
aab456924f | |||
20c2a4eb6b | |||
d63b33903a | |||
fe77fcb2fd | |||
d226629b45 | |||
413dbb2134 | |||
b11b4d2462 | |||
62dd94a294 | |||
12d506a16d | |||
363c4327ee | |||
a716269e79 | |||
c66b255e8b | |||
decf714e74 | |||
405dda5144 | |||
0f8b9dc627 | |||
6cf7792f9a | |||
1df3cf0def | |||
59ffe456de | |||
9b981cb3f0 | |||
f640eb58d7 | |||
e5648babfc | |||
c34e569603 | |||
f42fc1e97d | |||
b8fd9cd51f | |||
05b65679d9 | |||
284243f810 | |||
c0e1f9c094 | |||
3545b9c1f1 | |||
d66bafa816 | |||
e6bbea9c07 | |||
2ddf9082f2 | |||
65a60de9a5 | |||
1b5e2c7fea | |||
a3a5ebf2af | |||
0d3aacdec7 | |||
5bcf76a136 | |||
29da9b43f3 | |||
e2e511f083 | |||
ccaca2a725 | |||
916c32589f | |||
24325e2d3a | |||
9569400757 | |||
4d4317150a | |||
946c0ea874 | |||
ebb828dd4c | |||
f5fa6af1bc | |||
ddf1de6f8e | |||
4689a9054d | |||
4a841766e8 | |||
7d5803fec8 | |||
60f1cd8c58 | |||
b7f4b80c7e | |||
6c9a167aa2 | |||
d55d478243 | |||
1dd3d4090c | |||
d5a91f566e | |||
3994652562 | |||
c729d6573d | |||
7aabdf9485 | |||
d8a9ca1fe6 | |||
ff874f0b5e | |||
c3d953b99e |
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
sources/build
|
||||
sources/usr
|
||||
*src.tar.[gx]z
|
||||
*pkg.tar.[gx]z
|
||||
build
|
||||
src
|
||||
pkg
|
12
.gitmodules
vendored
Normal 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
|
9
AUTHORS
Normal file
@ -0,0 +1,9 @@
|
||||
Current developers:
|
||||
Evgeniy Alekseev aka arcanis <esalexeev (at) gmail (dot) com>
|
||||
|
||||
Translators:
|
||||
@Mermouy (French translation)
|
||||
Ernesto Avilés Vzqz (Spanish translation)
|
||||
@underr (Brazillian Portuguese translation)
|
||||
Виктор Слободян (Ukrainian translation)
|
||||
Steve Lemuel (Chinese translation)
|
232
CHANGELOG
Normal file
@ -0,0 +1,232 @@
|
||||
V.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:
|
||||
+ 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:
|
||||
+ 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:
|
||||
+ 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
|
||||
* network device update interval now is 30*interval
|
||||
* $swap, $swapmb and $swapgb tags now work simultaneously ($mem* tags too)
|
||||
* player_name now has str type
|
||||
|
||||
Ver.1.7.2:
|
||||
+ 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:
|
||||
- remove error label
|
||||
* fix bug with zero values in tooltip
|
||||
|
||||
Ver.1.7.0:
|
||||
+ 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:
|
||||
+ add support of several devices in hddtemp label
|
||||
- fixed #6
|
||||
|
||||
Ver.1.6.0:
|
||||
+ add $custom tag to time and uptime labels (#8)
|
||||
+ russian translation
|
||||
- fix #6, #10
|
||||
* change license to GPLv3
|
||||
* change project build
|
||||
|
||||
Ver.1.5.3:
|
||||
+ add $album, $progress and $time tags to player label (#7)
|
||||
- fix zero swap
|
||||
|
||||
Ver.1.5.2:
|
||||
+ add $isotime, $shorttime and $longtime tags to time label
|
||||
|
||||
Ver.1.5.1:
|
||||
+ add time label
|
||||
|
||||
Ver.1.5.0:
|
||||
+ add player label
|
||||
|
||||
Ver.1.4.0:
|
||||
+ add notifications
|
||||
|
||||
Ver.1.3.6:
|
||||
- fix #1, #2
|
||||
|
||||
Ver.1.3.5:
|
||||
- fix bug with definition network device
|
||||
|
||||
Ver.1.3.4:
|
||||
+ add double click event
|
||||
+ add auto selection of network device
|
||||
- fix yet another plasma crash
|
||||
|
||||
Ver.1.3.3:
|
||||
* edit reading temperature device
|
||||
|
||||
Ver.1.3.2b:
|
||||
- fix plasma crash
|
||||
|
||||
Ver.1.3.2:
|
||||
+ add GPU, GPU temperature, HDD and HDD temperature labels
|
||||
+ add $ccpu and $ccpucl tags
|
||||
- bug fixes
|
||||
* optimization and refactoring
|
||||
|
||||
Ver.1.2.2:
|
||||
+ 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:
|
||||
+ 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:
|
||||
* change parsing acpi output (battery label)
|
||||
|
||||
Ver.1.1.3:
|
||||
+ add font weight
|
||||
* edit font setup line. Now setup for font family works normaly
|
||||
* small bug fix
|
||||
|
||||
Ver.1.1.2:
|
||||
+ add CPU clock lable
|
||||
+ add function to update network device (100*time_interval)
|
||||
+ change update sliders
|
||||
|
||||
Ver.1.1.1:
|
||||
+ add $swapmb, $memmb, $netdev, @@netdev=...@@ tags
|
||||
- some bug fixes
|
||||
* widget consists of several labels
|
||||
* edit configuration interface
|
||||
|
||||
Ver.1.0:
|
||||
First release
|
232
CHANGELOG-RU
Normal file
@ -0,0 +1,232 @@
|
||||
Вер.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 теперь обновляется раз в час
|
||||
|
||||
Вер.1.8.0:
|
||||
+ добавлены скроллбары в конфигурационный интерфейс
|
||||
+ добавлена настройка значений AC
|
||||
+ добавлены теги $hddmbN, $hddgbN
|
||||
+ добавлена поддержка ps (теги $ps, $pscount, $pstotal)
|
||||
+ добавлена поддержка пакетных менеджеров (теги $pkgcountN)
|
||||
* рефакторинг DataEngine
|
||||
|
||||
Вер.1.7.4:
|
||||
+ добавлена поддержка более чем 10 тэгов в полях cpu, cpuclock, hdd, hddtemp, temp
|
||||
- фиксы в форматах
|
||||
* изменения в кастомном формате аптайма
|
||||
|
||||
Вер.1.7.3:
|
||||
+ добавлены тэги $memgb, $swapgb
|
||||
+ добавлена директория readme
|
||||
+ добавлен французский перевод (@Mermouy)
|
||||
- фикс подсказки для кастомного формата аптайма
|
||||
- фикс #12
|
||||
* больше рефакторинга богу рефакторинга
|
||||
* интервал обновления сетевого интерфейса теперь 30*interval
|
||||
* тэги $swap, $swapmb и $swapgb теперь работают одновременно (тэги $mem* тоже)
|
||||
* player_name теперь имеет тип str
|
||||
|
||||
Вер.1.7.2:
|
||||
+ добавлены тэги $dd, $d, $hh, $h, $mm, $m в кастомный формат аптайма
|
||||
+ добавлено масштабирование в тултипы
|
||||
+ добавлена конфигурация DE из виджета
|
||||
+ добавлена кастомная команда в DE
|
||||
- удалена кастомная команда из виджета
|
||||
- удалены тэги $ds, $hs, $ms
|
||||
|
||||
Вер.1.7.1:
|
||||
- удалено поле с ошибкой
|
||||
* пофикшен баг с нулевым значением в тултипе
|
||||
|
||||
Вер.1.7.0:
|
||||
+ добавлена поддержка нескольких тэгов в поле температуры
|
||||
+ добавлены тэги $cpuN, $cpuclN, $hddN, $tempN, $hddtempN, $up, $down
|
||||
+ добавлено поле с кастомной командой
|
||||
+ добавлены тултипы для полей CPU, частоты CPU, памяти, swap и сеть
|
||||
- удалены тэги @@...@@, $temp, $ccpu, $ccpucl, $net
|
||||
* изменения в настройках
|
||||
* виджет не требует больше net-tools
|
||||
* рефакторинг
|
||||
|
||||
Вер.1.6.1:
|
||||
+ добавлена поддержка нескольких девайсов в поле hddtemp
|
||||
- фикс #6
|
||||
|
||||
Вер.1.6.0:
|
||||
+ добавлен тэг $custom в поля time и uptime (#8)
|
||||
+ русский перевод
|
||||
- фикс #6, #10
|
||||
* лицензия изменена на GPLv3
|
||||
* изменения в сборке проекта
|
||||
|
||||
Вер.1.5.3:
|
||||
+ добавлены тэги $album, $progress и $time tags в поле плеера (#7)
|
||||
- фикс бага с нулевым свопом
|
||||
|
||||
Вер.1.5.2:
|
||||
+ добавлены тэги $isotime, $shorttime и $longtime в поле time
|
||||
|
||||
Вер.1.5.1:
|
||||
+ добавлено поле time
|
||||
|
||||
Вер.1.5.0:
|
||||
+ добавлено поле player
|
||||
|
||||
Вер.1.4.0:
|
||||
+ добавлены уведомления
|
||||
|
||||
Вер.1.3.6:
|
||||
- фикс #1, #2
|
||||
|
||||
Вер.1.3.5:
|
||||
- фикс бага с определением сетевого устройства
|
||||
|
||||
Вер.1.3.4:
|
||||
+ добавлено событие по двойному щелчку
|
||||
+ добавлен автовыбор сетевого устройства
|
||||
- фикс еще одного падения Плазмы
|
||||
|
||||
Вер.1.3.3:
|
||||
* редактирование чтения температурного устройства
|
||||
|
||||
Вер.1.3.2b:
|
||||
- фикс падения Плазмы
|
||||
|
||||
Вер.1.3.2:
|
||||
+ добавлены поля GPU, GPU temp, HDD и HDD temp
|
||||
+ добавлены тэги $ccpu и $ccpucl
|
||||
- фикс некоторых багов
|
||||
* оптимизация и рефакторинг
|
||||
|
||||
Вер.1.2.2:
|
||||
+ добавлен тултип в строки
|
||||
|
||||
Вер.1.2.1:
|
||||
* если батарея не существует, возвращает off
|
||||
* если AC не существует, возвращает '(?)'
|
||||
|
||||
Вер.1.2.0:
|
||||
+ добавлен тэг $ac в поле battery
|
||||
+ добавлена настройка устройств батареи и AC
|
||||
+ добавлена проверка ошибок
|
||||
* тэг $bat теперь читается из /sys/*
|
||||
|
||||
Вер.1.1.4:
|
||||
* изменения в парсинге acpi (поле battery)
|
||||
|
||||
Вер.1.1.3:
|
||||
+ добавлена настройка ширины шрифта
|
||||
- небольшие фиксы
|
||||
* отредактирована настройка шрифта. Теперь настройки для шрифта работают нормально
|
||||
|
||||
Вер.1.1.2:
|
||||
+ добавлено поле CPU clock
|
||||
+ добавлена функция для обновления сетевого интерфейса (100*time_interval)
|
||||
* изменено обновление слайдеров
|
||||
|
||||
Вер.1.1.1:
|
||||
+ добавлены тэги $swapmb, $memmb, $netdev, @@netdev=...@@
|
||||
- небольшие фиксы
|
||||
* виджет теперь состоит из нескольких полей
|
||||
* отредактирован конфигурационный интерфейс
|
||||
|
||||
Вер.1.0:
|
||||
Первый релиз
|
674
COPYING
Normal file
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
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.
|
||||
|
||||
awesome-widgets
|
||||
Copyright (C) 2013-2014 Evgeniy Alekseev
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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:
|
||||
|
||||
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.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
73
PKGBUILD
@ -1,54 +1,41 @@
|
||||
# Author: Evgeniy "arcanis" Alexeev <esalexeev@gmail.com>
|
||||
# Maintainer: Evgeniy "arcanis" Alexeev <esalexeev@gmail.com>
|
||||
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com>
|
||||
|
||||
pkgname=kdeplasma-applets-pytextmonitor
|
||||
_pkgname=py-text-monitor
|
||||
pkgver=1.3.6
|
||||
pkgname=kdeplasma-applets-awesome-widgets
|
||||
_pkgname=awesome-widgets
|
||||
pkgver=2.0.4
|
||||
pkgrel=1
|
||||
_dtengine=ext-sysmon
|
||||
_dtver=1.2
|
||||
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="https://github.com/arcan1s/pytextmonitor"
|
||||
license=('GPL')
|
||||
depends=('kdebase-workspace' 'kdebindings-python2' 'lm_sensors' 'net-tools')
|
||||
optdepends=("hddtemp: for HDD temperature monitor"
|
||||
"catalyst: for GPU monitor"
|
||||
"nvidia-utils: for GPU monitor")
|
||||
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=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}.plasmoid
|
||||
https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_dtengine}-${_dtver}.zip)
|
||||
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
||||
install=${pkgname}.install
|
||||
md5sums=('5f619e6770bec8dbf7d18907d3a2143e'
|
||||
'775bc3a6057f2dc1696f09b8d315a3e9')
|
||||
md5sums=('21a3de6376bb7ebb779bfc927e98eb91')
|
||||
backup=('usr/share/config/extsysmon.conf')
|
||||
|
||||
build ()
|
||||
{
|
||||
# build dataengine
|
||||
if [ -d ${srcdir}/${_dtengine}/build ]; then
|
||||
rm -r ${srcdir}/${_dtengine}/build
|
||||
fi
|
||||
mkdir ${srcdir}/${_dtengine}/build && cd ${srcdir}/${_dtengine}/build
|
||||
prepare() {
|
||||
rm -rf "${srcdir}/build"
|
||||
mkdir "${srcdir}/build"
|
||||
}
|
||||
|
||||
build () {
|
||||
cd "${srcdir}/build"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` \
|
||||
../
|
||||
-DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) \
|
||||
"../${_pkgname}"
|
||||
make
|
||||
}
|
||||
|
||||
package()
|
||||
{
|
||||
# install dataengine
|
||||
cd ${srcdir}/${_dtengine}/build
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
# install plasmoid
|
||||
install -D -m644 ${srcdir}/metadata.desktop \
|
||||
${pkgdir}/`kde4-config --prefix`/share/kde4/services/${_pkgname}.desktop
|
||||
install -D -m644 ${srcdir}/metadata.desktop \
|
||||
${pkgdir}/`kde4-config --prefix`/share/apps/plasma/plasmoids/${_pkgname}/metadata.desktop
|
||||
mkdir -p ${pkgdir}/`kde4-config --prefix`/share/apps/plasma/plasmoids/${_pkgname}/contents/{code,ui}
|
||||
install -m644 ${srcdir}/contents/code/* \
|
||||
-t ${pkgdir}/`kde4-config --prefix`/share/apps/plasma/plasmoids/${_pkgname}/contents/code
|
||||
install -m644 ${srcdir}/contents/ui/* \
|
||||
-t ${pkgdir}/`kde4-config --prefix`/share/apps/plasma/plasmoids/${_pkgname}/contents/ui
|
||||
package() {
|
||||
cd "${srcdir}/build"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
36
README
@ -1,36 +0,0 @@
|
||||
pytextmonitor
|
||||
=============
|
||||
|
||||
PyTextMonitor is a minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm.
|
||||
|
||||
HOWTO
|
||||
For edited output you must open Settings window and setup output format in lines:
|
||||
label "$uptime" means uptime, ---d--h--m
|
||||
label "$cpu" means total load cpu, %
|
||||
label "$ccpu" means load CPU for each core, %
|
||||
label "$cpucl" - average cpu clock, MHz
|
||||
label "$ccpucl" - cpu clock for each core, MHz
|
||||
label "$temp" - average temperature in system
|
||||
label "$gpu" - GPU usage, %. `aticonfig` or `nvidia-smi` must be installed
|
||||
label "$gputemp" - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
|
||||
label "$mem" - usage memory, %
|
||||
label "$memmb" - usage memory, MB
|
||||
label "$swap" - swap, %
|
||||
label "$swapmb" - swap, MB
|
||||
label "@@/@@" (in hdd label) - mount point ('/' in example) usage, %. Separator for mount points list is ';', for example "@@/;/home;/mnt/global@@". `hddtemp` must be installed
|
||||
label "@@/dev/sda@@" (in hddtemp label) - HDD ('/dev/sda' in example) temperature
|
||||
label "$net" - download and upload speed, KB/s. You may specify network device: something like @@eth0@@
|
||||
label "$netdev" - current network device
|
||||
label "$bat" - battery charge, %. Battery device may be set below. File ("/sys/class/power_supply/BAT0/capacity" by default) must contain only battery charge in percent
|
||||
label "$ac" - status AC device. Return (*) if AC device is online or ( ) if offline. AC device may be set below. FIle ("/sys/class/power_supply/AC/online" by default) must contain '1' if AC is online
|
||||
|
||||
Label order will changed if you change slider position. HTML tags in label work normally.
|
||||
Attention: you don't may set to show $cpu in swap label for example. $cpu will work only in cpu label.
|
||||
|
||||
|
||||
Dependencies:
|
||||
kdebindings-python2
|
||||
|
||||
ext-sysmon (for GPU, GPU temp and HDD temp labels)
|
||||
lm_sensors (for definition temperature device)
|
||||
net-tools (for definition network device)
|
304
README.md
Normal file
@ -0,0 +1,304 @@
|
||||
awesome-widgets (ex-pytextmonitor)
|
||||
==================================
|
||||
|
||||
Information
|
||||
-----------
|
||||
|
||||
A collection of minimalistic widgets which looks like Awesome WM widgets.
|
||||
|
||||
**NOTE** [LOOKING FOR TRANSLATORS!](https://github.com/arcan1s/awesome-widgets/issues/14)
|
||||
|
||||
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 `$ctime` - custom time format
|
||||
* tag `$uptime` - uptime, *---d--h--m*
|
||||
* tag `$cuptime` - 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 `$fanN` - fan speed for device N. For example, `$fan0`
|
||||
* 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 `$memfreemb` - free RAM, *MB*
|
||||
* tag `$memfreegb` - free RAM, *GB*
|
||||
* tag `$memtotmb` - total RAM, *MB*
|
||||
* tag `$memtotgb` - total RAM, *GB*
|
||||
* tag `$memusedmb` - used and cached RAM, *MB*
|
||||
* tag `$memusedgb` - used and cached RAM, *GB*
|
||||
* tag `$swap` - swap, *%*
|
||||
* tag `$swapmb` - swap, *MB*
|
||||
* tag `$swapgb` - swap, *GB*
|
||||
* tag `$swapfreemb` - free swap, *MB*
|
||||
* tag `$swapfreegb` - free swap, *GB*
|
||||
* tag `$swaptotmb` - total swap, *MB*
|
||||
* tag `$swaptotgb` - total swap, *GB*
|
||||
* tag `$hddN` - usage for mount point N, *%*. For example, `$hdd0`
|
||||
* tag `$hddmbN` - usage for mount point N, *MB*. For example, `$hddmb0`
|
||||
* tag `$hddgbN` - usage for mount point N, *GB*. For example, `$hddgb0`
|
||||
* tag `$hddfreembN` - free space for mount point N, *MB*. For example, `$hddfreemb0`
|
||||
* tag `$hddfreegbN` - free space for mount point N, *GB*. For example, `$hddfreegb0`
|
||||
* tag `$hddtotmbN` - total size of mount point N, *MB*. For example, `$hddtotmb0`
|
||||
* tag `$hddtotgbN` - total size of mount point N, *GB*. For example, `$hddtotgb0`
|
||||
* tag `$hddrN` - read speed of disk N, *KB/s*. For example, `$hddr0`
|
||||
* tag `$hddwN` - write speed of disk N, *KB/s*. For example, `$hddw0`
|
||||
* 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` - average battery charge, *%*
|
||||
* tag `$batN` - battery N 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 `$duration` - current song duration. One of supported music players must be installed
|
||||
* tag `$progress` - current song progress. 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 `$customN` - returns output for custom command N. For example, `$custom0`
|
||||
* tag `$desktop` - name of the current desktop
|
||||
* tag `$ndesktop` - number of the current desktop
|
||||
* tag `$tdesktops` - total number of desktops
|
||||
|
||||
Tips & tricks
|
||||
-------------
|
||||
|
||||
You may use different colors for labels. Just put label text into html code. See [issue](https://github.com/arcan1s/awesome-widgets/issues/9) for more details.
|
||||
|
||||
Numbering of elements of temperature, HDD usage, HDD speed, HDD temperature refers to elements order from second tab (*Advanced settings*). You should add item to the required listWidget first. And the first element in the listWidget will be `$tag0`. See [issue](https://github.com/arcan1s/awesome-widgets/issues/17) for more details.
|
||||
|
||||
Advanced settings
|
||||
-----------------
|
||||
|
||||
**Enable background**
|
||||
|
||||
Uncheck to disable default background and set transparent one.
|
||||
|
||||
**Enable popup**
|
||||
|
||||
Uncheck box if you do not use popup messages.
|
||||
|
||||
**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 units**
|
||||
|
||||
Select units for temperature. Available units are Celsius, Farenheit, Kelvin, Reaumur, cm^-1, kJ/mol, kcal/mol.
|
||||
|
||||
**Temperature devices**
|
||||
|
||||
List of devices, which will be observed in temp label (items come from `sensors`). List widget is editable,
|
||||
|
||||
**Mount points**
|
||||
|
||||
List of mount points, which will be observed in hdd label (items come from `mount`). List widget is editable.
|
||||
|
||||
**HDD (speed)**
|
||||
|
||||
List of hard disk devices, which will be observed in hddspeed label (items come from DataEngine). List widget is editable.
|
||||
|
||||
**HDD (temperature)**
|
||||
|
||||
List of hard disk devices, which will be observed in hddtemp label (items come from `find`). List widget is editable.
|
||||
|
||||
**Network device**
|
||||
|
||||
Use specified device as active. Will disable auto select network device.
|
||||
|
||||
**AC online tag**
|
||||
|
||||
Line which will be shown when AC is online.
|
||||
|
||||
**AC offline tag**
|
||||
|
||||
Line which will be shown when AC is offline.
|
||||
|
||||
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
|
||||
-------------------
|
||||
|
||||
**ACPI path**
|
||||
|
||||
Path to APCI devices. Default is `/sys/class/power_supply/`.
|
||||
|
||||
**Custom command**
|
||||
|
||||
Commands, which will be run for custom label.
|
||||
|
||||
**Desktop cmd**
|
||||
|
||||
Type a command which will be run for desktop DataEngine. Default is `qdbus org.kde.kwin /KWin currentDesktop`.
|
||||
|
||||
**GPU device**
|
||||
|
||||
Select one of supported GPU devices. `auto` will enable auto selection, `disable` will disable definition of GPU states. Default is `auto`.
|
||||
|
||||
**HDD**
|
||||
|
||||
Select one of HDDs for HDD temperature monitor. `all` will enable monitor for all devices, `disable` will disable definition of HDD temperature. Default is `all`.
|
||||
|
||||
**hddtemp cmd**
|
||||
|
||||
Type a command which will be run for hddtemp DataEngine. Default is `sudo hddtemp`.
|
||||
|
||||
**MPD address**
|
||||
|
||||
Address of MPD server. Default is `localhost`.
|
||||
|
||||
**MPD port**
|
||||
|
||||
Port of MPD server. Default is `6600`.
|
||||
|
||||
**MPRIS player name**
|
||||
|
||||
MPRIS player name. The DBus interface of an music player should be enabled. Default is `auto`.
|
||||
|
||||
**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`
|
||||
|
||||
**Music player**
|
||||
|
||||
Select one of supported music playes for player label.
|
||||
|
||||
Desktop panel
|
||||
=================
|
||||
|
||||
Since version 1.11.0 it provides a minimalistic panel for monitoring on desktops written on `C++`. And yes, it looks like the same panel in Awesome.
|
||||
|
||||
Desktop panel configuration
|
||||
---------------------------
|
||||
|
||||
**Enable background**
|
||||
|
||||
Uncheck to disable default background and set transparent one.
|
||||
|
||||
**Vertical layout**
|
||||
|
||||
Use vertical layout instead of horizontal one.
|
||||
|
||||
**Add stretch**
|
||||
|
||||
Add stretch (spacer) to the selected side of the widget.
|
||||
|
||||
**Mark**
|
||||
|
||||
Type symbol (or string) which will be shown if this desktop is active now.
|
||||
|
||||
**Pattern tags**
|
||||
|
||||
* tag `$mark` - show mark if this desktop is active
|
||||
* tag `$name` - name of the current desktop
|
||||
* tag `$number` - number of the current desktop
|
||||
* tag `$total` - total number of desktops
|
||||
|
||||
**Command**
|
||||
|
||||
Type command which will be run on left click on the selected desktop. Available variables are same as for pattern. Default is `dbus org.kde.kwin /KWin setCurrentDesktop $number`.
|
||||
|
||||
Instruction
|
||||
===========
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
* kdebase-workspace
|
||||
* kdebindings-python2
|
||||
* lm_sensors (*for definition temperature device*)
|
||||
|
||||
Optional dependencies
|
||||
---------------------
|
||||
|
||||
* sysstat (*for notification*)
|
||||
* 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, clementine, mpd or qmmp)
|
||||
|
||||
Make dependencies
|
||||
-----------------
|
||||
|
||||
* automoc4
|
||||
* cmake
|
||||
|
||||
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)
|
||||
----------------
|
||||
|
||||
* 3rdpatry modules support (C++, Python and Shell modules in the plan)
|
||||
* graphical bars support
|
||||
|
||||
Links
|
||||
-----
|
||||
|
||||
* [Homepage](http://arcanis.name/projects/awesome-widgets/)
|
||||
* 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-awesome-widgets/) package
|
@ -1,30 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
SRCDIR="sources"
|
||||
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"
|
||||
VERSION=`grep Version ext-sysmon/plasma-engine-extsysmon.desktop | awk -F "=" '{print $2}'`
|
||||
# create archive
|
||||
if [ -e ${ARCHIVE}-${VERSION}.zip ]; then
|
||||
rm -f ${ARCHIVE}-${VERSION}.zip
|
||||
fi
|
||||
zip -9 -y -r -q ${ARCHIVE}-${VERSION}.zip ${ARCHIVE}
|
||||
# update md5sum
|
||||
MD5SUMS=`md5sum ${ARCHIVE}-${VERSION}.zip | awk '{print $1}'`
|
||||
sed -i "/ '[0-9A-Fa-f]*/s/[^'][^)]*/ '${MD5SUMS}'/" PKGBUILD
|
||||
sed -i "s/_dtver=[0-9.]*/_dtver=${VERSION}/" PKGBUILD
|
||||
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f ${ARCHIVE}-${VERSION}-src.tar.xz
|
||||
[[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}"
|
||||
cp -r "${SRCDIR}/${ARCHIVE}" "${ARCHIVE}"
|
||||
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
|
||||
rm -rf "${ARCHIVE}"
|
||||
|
||||
# build widget
|
||||
cd sources
|
||||
FILES="contents metadata.desktop"
|
||||
ARCHIVE="py-text-monitor"
|
||||
VERSION=`grep Version metadata.desktop | awk -F "=" '{print $2}'`
|
||||
ARCHIVE="awesome-widgets"
|
||||
FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING"
|
||||
IGNORELIST="build usr"
|
||||
# create archive
|
||||
if [ -e ${ARCHIVE}-${VERSION}.plasmoid ]; then
|
||||
rm -f ${ARCHIVE}-${VERSION}.plasmoid
|
||||
fi
|
||||
zip -9 -y -r -q ../${ARCHIVE}-${VERSION}.plasmoid ${FILES}
|
||||
cd ..
|
||||
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
||||
[[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}"
|
||||
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}"
|
||||
rm -rf "${ARCHIVE}"
|
||||
|
||||
# update md5sum
|
||||
MD5SUMS=`md5sum ${ARCHIVE}-${VERSION}.plasmoid | awk '{print $1}'`
|
||||
MD5SUMS=$(md5sum ${ARCHIVE}-${VERSION}-src.tar.xz | awk '{print $1}')
|
||||
sed -i "/md5sums=('[0-9A-Fa-f]*/s/[^'][^)]*/md5sums=('${MD5SUMS}'/" PKGBUILD
|
||||
sed -i "s/pkgver=[0-9.]*/pkgver=${VERSION}/" PKGBUILD
|
||||
|
@ -1,24 +0,0 @@
|
||||
# set project name
|
||||
project (plasma_engine_extsysmon)
|
||||
|
||||
# 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})
|
||||
|
||||
set (PLUGIN_NAME ${PROJECT_NAME})
|
||||
file (GLOB PROJECT_DESKTOP *.desktop)
|
||||
file (GLOB PROJECT_SRCS *.cpp)
|
||||
|
||||
# make
|
||||
kde4_add_plugin (${PLUGIN_NAME} ${PROJECT_SRCS})
|
||||
target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS})
|
||||
|
||||
# install
|
||||
install(TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
install(FILES ${PROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
|
@ -1,175 +0,0 @@
|
||||
#include "extsysmon.h"
|
||||
|
||||
#include <Plasma/DataContainer>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args)
|
||||
: Plasma::DataEngine(parent, args)
|
||||
{
|
||||
Q_UNUSED(args)
|
||||
|
||||
setMinimumPollingInterval(333);
|
||||
|
||||
FILE *f_out;
|
||||
f_out = popen("lspci 2>&1", "r");
|
||||
char device[256];
|
||||
QString dev;
|
||||
while (fgets(device, 256, f_out) != NULL)
|
||||
{
|
||||
dev = QString(device);
|
||||
if (dev.toLower().contains("nvidia"))
|
||||
gpudev = QString("nvidia");
|
||||
else if (dev.toLower().contains("radeon"))
|
||||
gpudev = QString("ati");
|
||||
}
|
||||
pclose(f_out);
|
||||
|
||||
f_out = popen("ls -1 /dev/sd[a-z] && ls -1 /dev/hd[a-z] 2>&1", "r");
|
||||
while (fgets(device, 256, f_out) != NULL)
|
||||
{
|
||||
dev = QString(device);
|
||||
if (dev[0] == '/')
|
||||
hdddev.append(dev);
|
||||
}
|
||||
pclose(f_out);
|
||||
}
|
||||
|
||||
QStringList ExtendedSysMon::sources() const
|
||||
{
|
||||
QStringList source;
|
||||
source.append(QString("gpu"));
|
||||
source.append(QString("gputemp"));
|
||||
source.append(QString("hddtemp"));
|
||||
return source;
|
||||
}
|
||||
|
||||
bool ExtendedSysMon::sourceRequestEvent(const QString &name)
|
||||
{
|
||||
return updateSourceEvent(name);
|
||||
}
|
||||
|
||||
bool ExtendedSysMon::updateSourceEvent(const QString &source)
|
||||
{
|
||||
FILE *f_out;
|
||||
QString key, out, tmp_out, value;
|
||||
bool ok = false;
|
||||
char output[256], val[5];
|
||||
if (source == QString("gpu"))
|
||||
{
|
||||
key = QString("GPU");
|
||||
if (gpudev == QString("nvidia"))
|
||||
{
|
||||
f_out = popen("nvidia-smi -q -d UTILIZATION | grep Gpu | tail -n1 2>&1", "r");
|
||||
fgets (output, 256, f_out);
|
||||
if ((output[0] == '\0') ||
|
||||
(QString(output).split(QString(" "), QString::SkipEmptyParts).count() < 2))
|
||||
value = QString(" N\\A");
|
||||
else
|
||||
{
|
||||
out = QString(output).split(QString(" "), QString::SkipEmptyParts)[2];
|
||||
sprintf (val, "%5.1f", out.left(out.count()-2).toFloat(&ok));
|
||||
value = QString(val);
|
||||
}
|
||||
pclose(f_out);
|
||||
}
|
||||
else if (gpudev == QString("ati"))
|
||||
{
|
||||
f_out = popen("aticonfig --od-getclocks | grep load | tail -n1 2>&1", "r");
|
||||
fgets (output, 256, f_out);
|
||||
if ((output[0] == '\0') ||
|
||||
(QString(output).split(QString(" "), QString::SkipEmptyParts).count() < 3))
|
||||
value = QString(" N\\A");
|
||||
else
|
||||
{
|
||||
out = QString(output).split(QString(" "), QString::SkipEmptyParts)[3];
|
||||
sprintf (val, "%5.1f", out.left(out.count()-2).toFloat(&ok));
|
||||
value = QString(val);
|
||||
}
|
||||
pclose(f_out);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = QString(" N\\A");
|
||||
}
|
||||
if (ok == false)
|
||||
value = QString(" N\\A");
|
||||
value = value.split(QString(","), QString::SkipEmptyParts).join(QString("."));
|
||||
setData(source, key, value);
|
||||
}
|
||||
else if (source == QString("gputemp"))
|
||||
{
|
||||
key = QString("GPUTemp");
|
||||
if (gpudev == QString("nvidia"))
|
||||
{
|
||||
f_out = popen("nvidia-smi -q -d TEMPERATURE | grep Gpu | tail -n1 2>&1", "r");
|
||||
fgets (output, 256, f_out);
|
||||
if ((output[0] == '\0') ||
|
||||
(QString(output).split(QString(" "), QString::SkipEmptyParts).count() < 2))
|
||||
value = QString(" N\\A");
|
||||
else
|
||||
{
|
||||
out = QString(output).split(QString(" "), QString::SkipEmptyParts)[2];
|
||||
sprintf (val, "%4.1f", out.toFloat(&ok));
|
||||
value = QString(val);
|
||||
}
|
||||
pclose(f_out);
|
||||
}
|
||||
else if (gpudev == QString("ati"))
|
||||
{
|
||||
f_out = popen("aticonfig --od-gettemperature | grep Temperature | tail -n1 2>&1", "r");
|
||||
fgets (output, 256, f_out);
|
||||
if ((output[0] == '\0') ||
|
||||
(QString(output).split(QString(" "), QString::SkipEmptyParts).count() < 4))
|
||||
value = QString(" N\\A");
|
||||
else
|
||||
{
|
||||
out = QString(output).split(QString(" "), QString::SkipEmptyParts)[4];
|
||||
sprintf (val, "%4.1f", out.toFloat(&ok));
|
||||
value = QString(val);
|
||||
}
|
||||
pclose(f_out);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = QString(" N\\A");
|
||||
}
|
||||
if (ok == false)
|
||||
value = QString(" N\\A");
|
||||
value = value.split(QString(","), QString::SkipEmptyParts).join(QString("."));
|
||||
setData(source, key, value);
|
||||
}
|
||||
else if (source == QString("hddtemp"))
|
||||
{
|
||||
char command[256], *dev;
|
||||
QByteArray qb;
|
||||
for (int i=0; i<hdddev.count(); i++)
|
||||
{
|
||||
qb = hdddev[i].toUtf8();
|
||||
dev = qb.data();
|
||||
sprintf(command, "hddtemp %s", dev);
|
||||
f_out = popen(command, "r");
|
||||
fgets(output, 256, f_out);
|
||||
if ((output[0] == '\0') ||
|
||||
(QString(output).split(QString(":"), QString::SkipEmptyParts).count() < 3))
|
||||
value = QString(" N\\A");
|
||||
else
|
||||
{
|
||||
out = QString(output).split(QString(":"), QString::SkipEmptyParts)[2];
|
||||
sprintf (val, "%4.1f", out.left(out.count()-4).toFloat(&ok));
|
||||
value = QString(val);
|
||||
}
|
||||
pclose(f_out);
|
||||
if (ok == false)
|
||||
value = QString(" N\\A");
|
||||
value = value.split(QString(","), QString::SkipEmptyParts).join(QString("."));
|
||||
setData(source, hdddev[i], value);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
K_EXPORT_PLASMA_DATAENGINE(extsysmon, ExtendedSysMon)
|
||||
|
||||
#include "extsysmon.moc"
|
@ -1,21 +0,0 @@
|
||||
#ifndef EXTSYSMON_H
|
||||
#define EXTSYSMON_H
|
||||
|
||||
#include <Plasma/DataEngine>
|
||||
|
||||
class ExtendedSysMon : public Plasma::DataEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ExtendedSysMon(QObject *parent, const QVariantList &args);
|
||||
|
||||
protected:
|
||||
bool sourceRequestEvent(const QString &name);
|
||||
bool updateSourceEvent(const QString &source);
|
||||
QStringList hdddev;
|
||||
QString gpudev;
|
||||
QStringList sources() const;
|
||||
};
|
||||
|
||||
#endif // EXTSYSMON_H
|
15
kdeplasma-applets-awesome-widgets.install
Normal file
@ -0,0 +1,15 @@
|
||||
post_install() {
|
||||
kbuildsycoca4 > /dev/null 2>&1
|
||||
cat << __EOF
|
||||
To migrate to version 2.* and newer see this article:
|
||||
http://arcanis.name/en/2014/09/04/migration-to-v2/
|
||||
__EOF
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install "$1"
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
post_install "$1"
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
post_install()
|
||||
{
|
||||
cat << EOF
|
||||
Update plasmoids...
|
||||
EOF
|
||||
kbuildsycoca4 > /dev/null 2>&1
|
||||
cat << EOF
|
||||
Make sure that \`hddtemp\` can be run as non-root
|
||||
EOF
|
||||
}
|
||||
|
||||
post_upgrade()
|
||||
{
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove()
|
||||
{
|
||||
post_install
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
plasmapkg -t dataengine -i ext-sysmon-1.0.zip
|
Before Width: | Height: | Size: 205 KiB |
BIN
screenshots/config_01.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
screenshots/config_02.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
screenshots/config_03.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
screenshots/config_04.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
screenshots/config_05.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
screenshots/dataengine.png
Normal file
After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
screenshots/panel_01.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
screenshots/panel_02.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
screenshots/panel_03.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
screenshots/tooltips.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
1
sources/3rdparty/fontdialog
vendored
Submodule
1
sources/3rdparty/pdebug
vendored
Submodule
1
sources/3rdparty/task
vendored
Submodule
1
sources/3rdparty/tasks
vendored
Submodule
28
sources/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
cmake_policy (SET CMP0003 OLD)
|
||||
cmake_policy (SET CMP0002 OLD)
|
||||
cmake_policy (SET CMP0011 NEW)
|
||||
cmake_policy (SET CMP0015 NEW)
|
||||
|
||||
project (awesome-widgets)
|
||||
set (PROJECT_VERSION_MAJOR 2)
|
||||
set (PROJECT_VERSION_MINOR 0)
|
||||
set (PROJECT_VERSION_PATCH 4)
|
||||
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||
set (PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
|
||||
|
||||
message (STATUS "Version: ${PROJECT_VERSION}")
|
||||
|
||||
# flags
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
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")
|
||||
endif ()
|
||||
|
||||
add_subdirectory (awesome-widget)
|
||||
add_subdirectory (ext-sysmon)
|
||||
add_subdirectory (desktop-panel)
|
41
sources/awesome-widget/CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
||||
# 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})
|
||||
|
||||
# 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)
|
||||
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
|
||||
file (GLOB SUBPROJECT_UI *.ui)
|
||||
file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
|
||||
|
||||
# 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})
|
447
sources/awesome-widget/advanced.ui
Normal file
@ -0,0 +1,447 @@
|
||||
<?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>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">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>0</y>
|
||||
<width>677</width>
|
||||
<height>677</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_background">
|
||||
<property name="text">
|
||||
<string>Enable background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_popup">
|
||||
<property name="text">
|
||||
<string>Enable popup on mouse click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_timeFormat">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_timeFormat">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Custom time format</string>
|
||||
</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>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_uptimeFormat">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_uptimeFormat">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Custom uptime format</string>
|
||||
</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>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_tempUnits">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_tempUnits">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Temperature units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_tempUnits">
|
||||
<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="QComboBox" name="comboBox_tempUnits">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Disable auto select device and set specified device</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set network device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_netdev">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AC online tag</string>
|
||||
</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>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_acOffline">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_acOffline">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AC offline tag</string>
|
||||
</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>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</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>
|
373
sources/awesome-widget/appearance.ui
Normal file
@ -0,0 +1,373 @@
|
||||
<?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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Time interval</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_interval">
|
||||
<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="QSpinBox" name="spinBox_interval">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_font">
|
||||
<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="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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_size">
|
||||
<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="QSpinBox" name="spinBox_size">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_color">
|
||||
<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="KColorCombo" name="kcolorcombo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_style">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_style">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_style">
|
||||
<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="QComboBox" name="comboBox_style">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font weight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_weight">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_weight">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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>
|
376
sources/awesome-widget/awesome-widget.cpp
Normal file
@ -0,0 +1,376 @@
|
||||
/***************************************************************************
|
||||
* 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 <QNetworkInterface>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QTextCodec>
|
||||
#include <QTimer>
|
||||
|
||||
#include "customlabel.h"
|
||||
#include <pdebug/pdebug.h>
|
||||
#include <task/taskadds.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;
|
||||
}
|
||||
|
||||
|
||||
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)), extsysmonEngine, SLOT(updateAllSources()));
|
||||
connect(contextMenu[2], SIGNAL(triggered(bool)), sysmonEngine, SLOT(updateAllSources()));
|
||||
connect(contextMenu[2], SIGNAL(triggered(bool)), this, SLOT(updateNetworkDevice()));
|
||||
}
|
||||
|
||||
|
||||
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->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);
|
||||
QGraphicsProxyWidget *pw = new QGraphicsProxyWidget(this);
|
||||
pw->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
pw->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
textLabel->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
textLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
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")]
|
||||
.indexOf(QString("$") + keys[i]) > -1) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
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/"));
|
||||
}
|
||||
|
||||
|
||||
K_EXPORT_PLASMA_APPLET(awesome-widget, AwesomeWidget)
|
128
sources/awesome-widget/awesome-widget.h
Normal file
@ -0,0 +1,128 @@
|
||||
/***************************************************************************
|
||||
* 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_advanced.h>
|
||||
#include <ui_appearance.h>
|
||||
#include <ui_deconfig.h>
|
||||
#include <ui_tooltipconfig.h>
|
||||
#include <ui_widget.h>
|
||||
|
||||
|
||||
class CustomLabel;
|
||||
class QGraphicsGridLayout;
|
||||
class QGraphicsScene;
|
||||
|
||||
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();
|
||||
// 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();
|
||||
void updateText(const bool clear = false);
|
||||
void updateTooltip();
|
||||
|
||||
private slots:
|
||||
void reinit();
|
||||
// configuration interface
|
||||
void addNewCustomCommand(QTableWidgetItem *item);
|
||||
void addNewPkgCommand(QTableWidgetItem *item);
|
||||
void contextMenuCustomCommand(const QPoint pos);
|
||||
void contextMenuPkgCommand(const QPoint pos);
|
||||
void editFanItem(QListWidgetItem *item);
|
||||
void editHddItem(QListWidgetItem *item);
|
||||
void editHddSpeedItem(QListWidgetItem *item);
|
||||
void editMountItem(QListWidgetItem *item);
|
||||
void editTempItem(QListWidgetItem *item);
|
||||
void setFontFormating();
|
||||
void setFormating();
|
||||
|
||||
protected:
|
||||
QList<QAction *> contextualActions();
|
||||
void createConfigurationInterface(KConfigDialog *parent);
|
||||
|
||||
private:
|
||||
// functions
|
||||
void createActions();
|
||||
QStringList findKeys();
|
||||
QStringList getKeys();
|
||||
// ui
|
||||
QGraphicsGridLayout *mainLayout = nullptr;
|
||||
CustomLabel *textLabel = nullptr;
|
||||
QTimer *timer;
|
||||
QList<QAction *> contextMenu;
|
||||
// tooltip
|
||||
Plasma::ToolTipContent toolTip;
|
||||
QGraphicsScene *toolTipScene;
|
||||
QGraphicsView *toolTipView;
|
||||
// values
|
||||
int networkDeviceUpdate;
|
||||
QMap<QString, int> counts;
|
||||
QMap<QString, QList<float>> tooltipValues;
|
||||
QMap<QString, QString> values;
|
||||
// debug
|
||||
bool debug;
|
||||
// data engine
|
||||
Plasma::DataEngine *extsysmonEngine;
|
||||
Plasma::DataEngine *sysmonEngine;
|
||||
Plasma::DataEngine *timeEngine;
|
||||
// configuration interface
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
#endif /* AWESOME_WIDGET_H */
|
808
sources/awesome-widget/configuration.cpp
Normal file
@ -0,0 +1,808 @@
|
||||
/***************************************************************************
|
||||
* 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 <KConfigDialog>
|
||||
#include <KGlobal>
|
||||
#include <KStandardDirs>
|
||||
#include <QDir>
|
||||
#include <QMenu>
|
||||
#include <QNetworkInterface>
|
||||
#include <QTextCodec>
|
||||
|
||||
#include <fontdialog/fontdialog.h>
|
||||
#include <pdebug/pdebug.h>
|
||||
#include <task/taskadds.h>
|
||||
|
||||
|
||||
QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QMap<QString, QString> rawConfig;
|
||||
rawConfig[QString("ACPIPATH")] = QString("/sys/class/power_supply/");
|
||||
rawConfig[QString("CUSTOM")] = QString("wget -qO- http://ifconfig.me/ip");
|
||||
rawConfig[QString("DESKTOPCMD")] = QString("qdbus org.kde.kwin /KWin currentDesktop");
|
||||
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");
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
||||
QFile configFile(fileName);
|
||||
if (!configFile.open(QIODevice::ReadOnly))
|
||||
return updateDataEngineConfiguration(rawConfig);
|
||||
QString fileStr;
|
||||
QStringList value;
|
||||
while (true) {
|
||||
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 (configFile.atEnd()) break;
|
||||
}
|
||||
configFile.close();
|
||||
|
||||
return updateDataEngineConfiguration(rawConfig);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::writeDataEngineConfiguration(const QMap<QString, QString> settings)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QMap<QString, QString> config = updateDataEngineConfiguration(settings);
|
||||
QString fileName = KGlobal::dirs()->locateLocal("config", "extsysmon.conf");
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
||||
QFile configFile(fileName);
|
||||
if (!configFile.open(QIODevice::WriteOnly)) return;
|
||||
for (int i=0; i<config.keys().count(); i++) {
|
||||
QByteArray string = (config.keys()[i] + QString("=") + config[config.keys()[i]] + QString("\n")).toUtf8();
|
||||
configFile.write(string);
|
||||
}
|
||||
configFile.close();
|
||||
}
|
||||
|
||||
|
||||
QMap<QString, QString> AwesomeWidget::updateDataEngineConfiguration(const QMap<QString, QString> rawConfig)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QMap<QString, QString> config;
|
||||
QString key, value;
|
||||
// remove spaces and copy source map
|
||||
for (int i=0; i<rawConfig.keys().count(); i++) {
|
||||
key = rawConfig.keys()[i];
|
||||
value = rawConfig[key];
|
||||
key.remove(QChar(' '));
|
||||
if ((key != QString("CUSTOM")) &&
|
||||
(key != QString("DESKTOPCMD")) &&
|
||||
(key != QString("HDDTEMPCMD")) &&
|
||||
(key != QString("PKGCMD")))
|
||||
value.remove(QChar(' '));
|
||||
config[key] = value;
|
||||
}
|
||||
// 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");
|
||||
|
||||
for (int i=0; i<config.keys().count(); i++)
|
||||
if (debug) qDebug() << PDEBUG << ":" << config.keys()[i] + QString("=") + config[config.keys()[i]];
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
QString cmd, qoutput;
|
||||
QStringList headerList;
|
||||
TaskResult process;
|
||||
|
||||
QWidget *advWidget = new QWidget;
|
||||
uiAdvancedConfig.setupUi(advWidget);
|
||||
QWidget *appWidget = new QWidget;
|
||||
uiAppConfig.setupUi(appWidget);
|
||||
QWidget *configWidget = new QWidget;
|
||||
uiWidConfig.setupUi(configWidget);
|
||||
QWidget *deConfigWidget = new QWidget;
|
||||
uiDEConfig.setupUi(deConfigWidget);
|
||||
QWidget *tooltipWidget = new QWidget;
|
||||
uiTooltipConfig.setupUi(tooltipWidget);
|
||||
|
||||
//widget
|
||||
uiWidConfig.textEdit_elements->setPlainText(configuration[QString("text")]);
|
||||
uiWidConfig.comboBox_tags->clear();
|
||||
uiWidConfig.comboBox_tags->addItems(getKeys());
|
||||
|
||||
// advanced
|
||||
if (configuration[QString("background")].toInt() == 0)
|
||||
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiAdvancedConfig.checkBox_background->setCheckState(Qt::Checked);
|
||||
if (configuration[QString("popup")].toInt() == 0)
|
||||
uiAdvancedConfig.checkBox_popup->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiAdvancedConfig.checkBox_popup->setCheckState(Qt::Checked);
|
||||
uiAdvancedConfig.lineEdit_timeFormat->setText(configuration[QString("customTime")]);
|
||||
uiAdvancedConfig.lineEdit_uptimeFormat->setText(configuration[QString("customUptime")]);
|
||||
uiAdvancedConfig.comboBox_tempUnits->setCurrentIndex(
|
||||
uiAdvancedConfig.comboBox_tempUnits->findText(configuration[QString("tempUnits")],
|
||||
Qt::MatchFixedString));
|
||||
cmd = QString("sensors");
|
||||
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;
|
||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||
uiAdvancedConfig.listWidget_tempDevice->clear();
|
||||
for (int i=0; i<qoutput.split(QString("\n\n")).count(); i++) {
|
||||
QString sensor = qoutput.split(QString("\n\n"))[i];
|
||||
for (int j=0; j<sensor.split(QChar('\n')).count(); j++) {
|
||||
QString device = sensor.split(QChar('\n'))[j];
|
||||
if (device.contains(QChar(0260))) {
|
||||
QListWidgetItem *item = new QListWidgetItem(QString("lmsensors/") + sensor.split(QChar('\n'))[0] + QString("/") +
|
||||
device.split(QChar(':'))[0].replace(QChar(' '), QChar('_')));
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
uiAdvancedConfig.listWidget_tempDevice->addItem(item);
|
||||
} else if (device.contains(QString("RPM"))) {
|
||||
QListWidgetItem *item = new QListWidgetItem(QString("lmsensors/") + sensor.split(QChar('\n'))[0] + QString("/") +
|
||||
device.split(QChar(':'))[0].replace(QChar(' '), QChar('_')));
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
uiAdvancedConfig.listWidget_fanDevice->addItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i=0; i<configuration[QString("tempDevice")].split(QString("@@")).count(); i++) {
|
||||
QList<QListWidgetItem *> items = uiAdvancedConfig.listWidget_tempDevice
|
||||
->findItems(configuration[QString("tempDevice")].split(QString("@@"))[i], Qt::MatchFixedString);
|
||||
if ((items.isEmpty()) &&
|
||||
(!configuration[QString("tempDevice")].split(QString("@@"))[i].isEmpty())) {
|
||||
QListWidgetItem *item = new QListWidgetItem(configuration[QString("tempDevice")].split(QString("@@"))[i]);
|
||||
item->setCheckState(Qt::Checked);
|
||||
uiAdvancedConfig.listWidget_tempDevice->addItem(item);
|
||||
} else
|
||||
for (int j=0; j<items.count(); j++)
|
||||
items[j]->setCheckState(Qt::Checked);
|
||||
}
|
||||
for (int i=0; i<configuration[QString("fanDevice")].split(QString("@@")).count(); i++) {
|
||||
QList<QListWidgetItem *> items = uiAdvancedConfig.listWidget_fanDevice
|
||||
->findItems(configuration[QString("fanDevice")].split(QString("@@"))[i], Qt::MatchFixedString);
|
||||
if ((items.isEmpty()) &&
|
||||
(!configuration[QString("fanDevice")].split(QString("@@"))[i].isEmpty())) {
|
||||
QListWidgetItem *item = new QListWidgetItem(configuration[QString("fanDevice")].split(QString("@@"))[i]);
|
||||
item->setCheckState(Qt::Checked);
|
||||
uiAdvancedConfig.listWidget_fanDevice->addItem(item);
|
||||
} else
|
||||
for (int j=0; j<items.count(); j++)
|
||||
items[j]->setCheckState(Qt::Checked);
|
||||
}
|
||||
cmd = QString("mount");
|
||||
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;
|
||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||
uiAdvancedConfig.listWidget_mount->clear();
|
||||
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++) {
|
||||
QString mountPoint = qoutput.split(QChar('\n'))[i].split(QString(" on "))[1].split(QString(" type "))[0];
|
||||
QListWidgetItem *item = new QListWidgetItem(mountPoint);
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
uiAdvancedConfig.listWidget_mount->addItem(item);
|
||||
}
|
||||
for (int i=0; i<configuration[QString("mount")].split(QString("@@")).count(); i++) {
|
||||
QList<QListWidgetItem *> items = uiAdvancedConfig.listWidget_mount
|
||||
->findItems(configuration[QString("mount")].split(QString("@@"))[i], Qt::MatchFixedString);
|
||||
if ((items.isEmpty()) &&
|
||||
(!configuration[QString("mount")].split(QString("@@"))[i].isEmpty())) {
|
||||
QListWidgetItem *item = new QListWidgetItem(configuration[QString("mount")].split(QString("@@"))[i]);
|
||||
item->setCheckState(Qt::Checked);
|
||||
uiAdvancedConfig.listWidget_mount->addItem(item);
|
||||
} else
|
||||
for (int j=0; j<items.count(); j++)
|
||||
items[j]->setCheckState(Qt::Checked);
|
||||
}
|
||||
uiAdvancedConfig.listWidget_hddSpeedDevice->clear();
|
||||
for (int i=0; i<diskDevices.count(); i++) {
|
||||
QListWidgetItem *item = new QListWidgetItem(diskDevices[i]);
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
uiAdvancedConfig.listWidget_hddSpeedDevice->addItem(item);
|
||||
}
|
||||
for (int i=0; i<configuration[QString("disk")].split(QString("@@")).count(); i++) {
|
||||
QList<QListWidgetItem *> items = uiAdvancedConfig.listWidget_hddSpeedDevice
|
||||
->findItems(configuration[QString("disk")].split(QString("@@"))[i], Qt::MatchFixedString);
|
||||
if ((items.isEmpty()) &&
|
||||
(!configuration[QString("disk")].split(QString("@@"))[i].isEmpty())) {
|
||||
QListWidgetItem *item = new QListWidgetItem(configuration[QString("disk")].split(QString("@@"))[i]);
|
||||
item->setCheckState(Qt::Checked);
|
||||
uiAdvancedConfig.listWidget_hddSpeedDevice->addItem(item);
|
||||
} else
|
||||
for (int j=0; j<items.count(); j++)
|
||||
items[j]->setCheckState(Qt::Checked);
|
||||
}
|
||||
cmd = QString("find /dev -name [hms]d[a-z]");
|
||||
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;
|
||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||
uiAdvancedConfig.listWidget_hddDevice->clear();
|
||||
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++) {
|
||||
QListWidgetItem *item = new QListWidgetItem(qoutput.split(QChar('\n'))[i]);
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
uiAdvancedConfig.listWidget_hddDevice->addItem(item);
|
||||
}
|
||||
for (int i=0; i<configuration[QString("hdd")].split(QString("@@")).count(); i++) {
|
||||
QList<QListWidgetItem *> items = uiAdvancedConfig.listWidget_hddDevice
|
||||
->findItems(configuration[QString("hdd")].split(QString("@@"))[i], Qt::MatchFixedString);
|
||||
if ((items.isEmpty()) &&
|
||||
(!configuration[QString("hdd")].split(QString("@@"))[i].isEmpty())) {
|
||||
QListWidgetItem *item = new QListWidgetItem(configuration[QString("hdd")].split(QString("@@"))[i]);
|
||||
item->setCheckState(Qt::Checked);
|
||||
uiAdvancedConfig.listWidget_hddDevice->addItem(item);
|
||||
} else
|
||||
for (int j=0; j<items.count(); j++)
|
||||
items[j]->setCheckState(Qt::Checked);
|
||||
}
|
||||
if (configuration[QString("useCustomNetdev")].toInt() == 0)
|
||||
uiAdvancedConfig.checkBox_netdev->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiAdvancedConfig.checkBox_netdev->setCheckState(Qt::Checked);
|
||||
QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces();
|
||||
QStringList interfaceList;
|
||||
for (int i=0; i<rawInterfaceList.count(); i++)
|
||||
interfaceList.append(rawInterfaceList[i].name());
|
||||
if ((!interfaceList.contains(configuration[QString("customNetdev")])) &&
|
||||
(!configuration[QString("customNetdev")].isEmpty()))
|
||||
interfaceList.append(configuration[QString("customNetdev")]);
|
||||
uiAdvancedConfig.comboBox_netdev->clear();
|
||||
uiAdvancedConfig.comboBox_netdev->addItems(interfaceList);
|
||||
uiAdvancedConfig.comboBox_netdev->setCurrentIndex(
|
||||
uiAdvancedConfig.comboBox_netdev->findText(configuration[QString("customNetdev")],
|
||||
Qt::MatchFixedString));
|
||||
uiAdvancedConfig.lineEdit_acOnline->setText(configuration[QString("acOnline")]);
|
||||
uiAdvancedConfig.lineEdit_acOffline->setText(configuration[QString("acOffline")]);
|
||||
|
||||
// tooltip
|
||||
uiTooltipConfig.spinBox_tooltipNum->setValue(configuration[QString("tooltipNumber")].toInt());
|
||||
if (configuration[QString("useTooltipBackground")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_background->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_background->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_background->setColor(QColor(configuration[QString("tooltipBackground")]));
|
||||
if (configuration[QString("cpuTooltip")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_cpu->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_cpu->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_cpu->setColor(QColor(configuration[QString("cpuColor")]));
|
||||
if (configuration[QString("cpuclTooltip")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_cpuclock->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_cpuclock->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_cpuclock->setColor(QColor(configuration[QString("cpuclColor")]));
|
||||
if (configuration[QString("memTooltip")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_mem->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_mem->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_mem->setColor(QColor(configuration[QString("memColor")]));
|
||||
if (configuration[QString("swapTooltip")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_swap->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_swap->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_swap->setColor(QColor(configuration[QString("swapColor")]));
|
||||
if (configuration[QString("downTooltip")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_down->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_down->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_down->setColor(QColor(configuration[QString("downColor")]));
|
||||
uiTooltipConfig.kcolorcombo_up->setColor(QColor(configuration[QString("upColor")]));
|
||||
if (configuration[QString("batteryTooltip")].toInt() == 0)
|
||||
uiTooltipConfig.checkBox_battery->setCheckState(Qt::Unchecked);
|
||||
else
|
||||
uiTooltipConfig.checkBox_battery->setCheckState(Qt::Checked);
|
||||
uiTooltipConfig.kcolorcombo_battery->setColor(QColor(configuration[QString("batteryColor")]));
|
||||
uiTooltipConfig.kcolorcombo_batteryIn->setColor(QColor(configuration[QString("batteryInColor")]));
|
||||
|
||||
// appearance
|
||||
KConfigGroup cg = config();
|
||||
CFont 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.spinBox_interval->setValue(configuration[QString("interval")].toInt());
|
||||
uiAppConfig.fontComboBox->setCurrentFont(font.toQFont());
|
||||
uiAppConfig.spinBox_size->setValue(font.pointSize());
|
||||
uiAppConfig.kcolorcombo->setColor(font.color());
|
||||
if (font.italic())
|
||||
uiAppConfig.comboBox_style->setCurrentIndex(1);
|
||||
else
|
||||
uiAppConfig.comboBox_style->setCurrentIndex(0);
|
||||
uiAppConfig.spinBox_weight->setValue(font.htmlWeight());
|
||||
|
||||
// dataengine
|
||||
QMap<QString, QString> deSettings = readDataEngineConfiguration();
|
||||
uiDEConfig.lineEdit_acpi->setText(deSettings[QString("ACPIPATH")]);
|
||||
uiDEConfig.tableWidget_customCommand->clear();
|
||||
uiDEConfig.tableWidget_customCommand->setRowCount(deSettings[QString("CUSTOM")].split(QString("@@")).count() + 1);
|
||||
headerList.clear();
|
||||
headerList.append(i18n("Custom command"));
|
||||
uiDEConfig.tableWidget_customCommand->setHorizontalHeaderLabels(headerList);
|
||||
uiDEConfig.tableWidget_customCommand->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
||||
for (int i=0; i<deSettings[QString("CUSTOM")].split(QString("@@")).count(); i++)
|
||||
uiDEConfig.tableWidget_customCommand->setItem(i, 0, new QTableWidgetItem(deSettings[QString("CUSTOM")].split(QString("@@"))[i]));
|
||||
uiDEConfig.lineEdit_desktopCmd->setText(deSettings[QString("DESKTOPCMD")]);
|
||||
uiDEConfig.comboBox_gpudev->setCurrentIndex(
|
||||
uiDEConfig.comboBox_gpudev->findText(deSettings[QString("GPUDEV")], Qt::MatchFixedString));
|
||||
cmd = QString("find /dev -name [hms]d[a-z]");
|
||||
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;
|
||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||
uiDEConfig.comboBox_hdddev->clear();
|
||||
uiDEConfig.comboBox_hdddev->addItem(QString("all"));
|
||||
uiDEConfig.comboBox_hdddev->addItem(QString("disable"));
|
||||
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++)
|
||||
uiDEConfig.comboBox_hdddev->addItem(qoutput.split(QChar('\n'))[i]);
|
||||
uiDEConfig.comboBox_hdddev->setCurrentIndex(
|
||||
uiDEConfig.comboBox_hdddev->findText(deSettings[QString("HDDDEV")], Qt::MatchFixedString));
|
||||
uiDEConfig.lineEdit_hddtempCmd->setText(deSettings[QString("HDDTEMPCMD")]);
|
||||
uiDEConfig.lineEdit_mpdaddress->setText(deSettings[QString("MPDADDRESS")]);
|
||||
uiDEConfig.spinBox_mpdport->setValue(deSettings[QString("MPDPORT")].toInt());
|
||||
uiDEConfig.comboBox_mpris->addItem(deSettings[QString("MPRIS")]);
|
||||
uiDEConfig.comboBox_mpris->setCurrentIndex(uiDEConfig.comboBox_mpris->count() - 1);
|
||||
uiDEConfig.tableWidget_pkgCommand->clear();
|
||||
uiDEConfig.tableWidget_pkgCommand->setRowCount(deSettings[QString("PKGCMD")].split(QChar(',')).count() + 1);
|
||||
headerList.clear();
|
||||
headerList.append(i18n("Package manager"));
|
||||
headerList.append(i18n("Null lines"));
|
||||
uiDEConfig.tableWidget_pkgCommand->setHorizontalHeaderLabels(headerList);
|
||||
uiDEConfig.tableWidget_pkgCommand->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
||||
for (int i=0; i<deSettings[QString("PKGCMD")].split(QChar(',')).count(); i++) {
|
||||
uiDEConfig.tableWidget_pkgCommand->setItem(i, 0, new QTableWidgetItem(deSettings[QString("PKGCMD")].split(QChar(','))[i]));
|
||||
uiDEConfig.tableWidget_pkgCommand->setItem(i, 1, new QTableWidgetItem(deSettings[QString("PKGNULL")].split(QChar(','))[i]));
|
||||
}
|
||||
uiDEConfig.tableWidget_pkgCommand->setItem(uiDEConfig.tableWidget_pkgCommand->rowCount() - 1, 1,
|
||||
new QTableWidgetItem(QString("0")));
|
||||
uiDEConfig.comboBox_playerSelect->setCurrentIndex(
|
||||
uiDEConfig.comboBox_playerSelect->findText(deSettings[QString("PLAYER")], Qt::MatchFixedString));
|
||||
|
||||
parent->addPage(configWidget, i18n("Widget"), Applet::icon());
|
||||
parent->addPage(advWidget, i18n("Advanced"), QString("system-run"));
|
||||
parent->addPage(tooltipWidget, i18n("Tooltip"), QString("preferences-desktop-color"));
|
||||
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
|
||||
parent->addPage(deConfigWidget, i18n("DataEngine"), QString("utilities-system-monitor"));
|
||||
|
||||
connect(uiAdvancedConfig.listWidget_fanDevice, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||
this, SLOT(editFanItem(QListWidgetItem *)));
|
||||
connect(uiAdvancedConfig.listWidget_hddDevice, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||
this, SLOT(editHddItem(QListWidgetItem *)));
|
||||
connect(uiAdvancedConfig.listWidget_hddSpeedDevice, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||
this, SLOT(editHddSpeedItem(QListWidgetItem *)));
|
||||
connect(uiAdvancedConfig.listWidget_mount, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||
this, SLOT(editMountItem(QListWidgetItem *)));
|
||||
connect(uiAdvancedConfig.listWidget_tempDevice, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||
this, SLOT(editTempItem(QListWidgetItem *)));
|
||||
connect(uiDEConfig.tableWidget_customCommand, SIGNAL(itemChanged(QTableWidgetItem *)),
|
||||
this, SLOT(addNewCustomCommand(QTableWidgetItem *)));
|
||||
connect(uiDEConfig.tableWidget_customCommand, SIGNAL(customContextMenuRequested(QPoint)),
|
||||
this, SLOT(contextMenuCustomCommand(QPoint)));
|
||||
connect(uiDEConfig.tableWidget_pkgCommand, SIGNAL(itemChanged(QTableWidgetItem *)),
|
||||
this, SLOT(addNewPkgCommand(QTableWidgetItem *)));
|
||||
connect(uiDEConfig.tableWidget_pkgCommand, SIGNAL(customContextMenuRequested(QPoint)),
|
||||
this, SLOT(contextMenuPkgCommand(QPoint)));
|
||||
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 AwesomeWidget::configAccepted()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
QStringList items;
|
||||
|
||||
disconnectFromEngine();
|
||||
KConfigGroup cg = config();
|
||||
|
||||
// widget
|
||||
cg.writeEntry("text", uiWidConfig.textEdit_elements->toPlainText());
|
||||
|
||||
// advanced
|
||||
cg.writeEntry("background", QString::number(uiAdvancedConfig.checkBox_background->checkState()));
|
||||
cg.writeEntry("popup", QString::number(uiAdvancedConfig.checkBox_popup->checkState()));
|
||||
cg.writeEntry("customTime", uiAdvancedConfig.lineEdit_timeFormat->text());
|
||||
cg.writeEntry("customUptime", uiAdvancedConfig.lineEdit_uptimeFormat->text());
|
||||
cg.writeEntry("tempUnits", uiAdvancedConfig.comboBox_tempUnits->currentText());
|
||||
items.clear();
|
||||
for (int i=0; i<uiAdvancedConfig.listWidget_tempDevice->count(); i++)
|
||||
if (uiAdvancedConfig.listWidget_tempDevice->item(i)->checkState() == Qt::Checked)
|
||||
items.append(uiAdvancedConfig.listWidget_tempDevice->item(i)->text());
|
||||
cg.writeEntry("tempDevice", items.join(QString("@@")));
|
||||
items.clear();
|
||||
for (int i=0; i<uiAdvancedConfig.listWidget_fanDevice->count(); i++)
|
||||
if (uiAdvancedConfig.listWidget_fanDevice->item(i)->checkState() == Qt::Checked)
|
||||
items.append(uiAdvancedConfig.listWidget_fanDevice->item(i)->text());
|
||||
cg.writeEntry("fanDevice", items.join(QString("@@")));
|
||||
items.clear();
|
||||
for (int i=0; i<uiAdvancedConfig.listWidget_mount->count(); i++)
|
||||
if (uiAdvancedConfig.listWidget_mount->item(i)->checkState() == Qt::Checked)
|
||||
items.append(uiAdvancedConfig.listWidget_mount->item(i)->text());
|
||||
cg.writeEntry("mount", items.join(QString("@@")));
|
||||
items.clear();
|
||||
for (int i=0; i<uiAdvancedConfig.listWidget_hddDevice->count(); i++)
|
||||
if (uiAdvancedConfig.listWidget_hddDevice->item(i)->checkState() == Qt::Checked)
|
||||
items.append(uiAdvancedConfig.listWidget_hddDevice->item(i)->text());
|
||||
cg.writeEntry("hdd", items.join(QString("@@")));
|
||||
items.clear();
|
||||
for (int i=0; i<uiAdvancedConfig.listWidget_hddSpeedDevice->count(); i++)
|
||||
if (uiAdvancedConfig.listWidget_hddSpeedDevice->item(i)->checkState() == Qt::Checked)
|
||||
items.append(uiAdvancedConfig.listWidget_hddSpeedDevice->item(i)->text());
|
||||
cg.writeEntry("disk", items.join(QString("@@")));
|
||||
cg.writeEntry("useCustomNetdev", QString::number(uiAdvancedConfig.checkBox_netdev->checkState()));
|
||||
cg.writeEntry("customNetdev", uiAdvancedConfig.comboBox_netdev->currentText());
|
||||
cg.writeEntry("acOnline", uiAdvancedConfig.lineEdit_acOnline->text());
|
||||
cg.writeEntry("acOffline", uiAdvancedConfig.lineEdit_acOffline->text());
|
||||
|
||||
// tooltip
|
||||
cg.writeEntry("tooltipNumber", QString::number(uiTooltipConfig.spinBox_tooltipNum->value()));
|
||||
cg.writeEntry("useTooltipBackground", QString::number(uiTooltipConfig.checkBox_background->checkState()));
|
||||
cg.writeEntry("tooltipBackground", uiTooltipConfig.kcolorcombo_background->color().name());
|
||||
cg.writeEntry("cpuTooltip", QString::number(uiTooltipConfig.checkBox_cpu->checkState()));
|
||||
cg.writeEntry("cpuColor", uiTooltipConfig.kcolorcombo_cpu->color().name());
|
||||
cg.writeEntry("cpuclTooltip", QString::number(uiTooltipConfig.checkBox_cpuclock->checkState()));
|
||||
cg.writeEntry("cpuclColor", uiTooltipConfig.kcolorcombo_cpuclock->color().name());
|
||||
cg.writeEntry("memTooltip", QString::number(uiTooltipConfig.checkBox_mem->checkState()));
|
||||
cg.writeEntry("memColor", uiTooltipConfig.kcolorcombo_mem->color().name());
|
||||
cg.writeEntry("swapTooltip", QString::number(uiTooltipConfig.checkBox_swap->checkState()));
|
||||
cg.writeEntry("swapColor", uiTooltipConfig.kcolorcombo_swap->color().name());
|
||||
cg.writeEntry("downTooltip", QString::number(uiTooltipConfig.checkBox_down->checkState()));
|
||||
cg.writeEntry("downColor", uiTooltipConfig.kcolorcombo_down->color().name());
|
||||
cg.writeEntry("upColor", uiTooltipConfig.kcolorcombo_up->color().name());
|
||||
cg.writeEntry("batteryTooltip", QString::number(uiTooltipConfig.checkBox_battery->checkState()));
|
||||
cg.writeEntry("batteryColor", uiTooltipConfig.kcolorcombo_battery->color().name());
|
||||
cg.writeEntry("batteryInColor", uiTooltipConfig.kcolorcombo_batteryIn->color().name());
|
||||
|
||||
// appearance
|
||||
cg.writeEntry("interval", QString::number(uiAppConfig.spinBox_interval->value()));
|
||||
cg.writeEntry("fontFamily", uiAppConfig.fontComboBox->currentFont().family());
|
||||
cg.writeEntry("fontSize", QString::number(uiAppConfig.spinBox_size->value()));
|
||||
cg.writeEntry("fontColor", uiAppConfig.kcolorcombo->color().name());
|
||||
cg.writeEntry("fontStyle", uiAppConfig.comboBox_style->currentText());
|
||||
cg.writeEntry("fontWeight", QString::number(uiAppConfig.spinBox_weight->value()));
|
||||
|
||||
// dataengine
|
||||
QMap<QString, QString> deSettings;
|
||||
deSettings[QString("ACPIPATH")] = uiDEConfig.lineEdit_acpi->text();
|
||||
items.clear();
|
||||
for (int i=0; i<uiDEConfig.tableWidget_customCommand->rowCount(); i++)
|
||||
if (uiDEConfig.tableWidget_customCommand->item(i, 0) != 0)
|
||||
items.append(uiDEConfig.tableWidget_customCommand->item(i, 0)->text());
|
||||
deSettings[QString("CUSTOM")] = items.join(QString("@@"));
|
||||
deSettings[QString("DESKTOPCMD")] = uiDEConfig.lineEdit_desktopCmd->text();
|
||||
deSettings[QString("GPUDEV")] = uiDEConfig.comboBox_gpudev->currentText();
|
||||
deSettings[QString("HDDDEV")] = uiDEConfig.comboBox_hdddev->currentText();
|
||||
deSettings[QString("HDDTEMPCMD")] = uiDEConfig.lineEdit_hddtempCmd->text();
|
||||
deSettings[QString("MPDADDRESS")] = uiDEConfig.lineEdit_mpdaddress->text();
|
||||
deSettings[QString("MPDPORT")] = QString::number(uiDEConfig.spinBox_mpdport->value());
|
||||
deSettings[QString("MPRIS")] = uiDEConfig.comboBox_mpris->currentText();
|
||||
items.clear();
|
||||
for (int i=0; i<uiDEConfig.tableWidget_pkgCommand->rowCount(); i++)
|
||||
if (uiDEConfig.tableWidget_pkgCommand->item(i, 0) != 0)
|
||||
items.append(uiDEConfig.tableWidget_pkgCommand->item(i, 0)->text());
|
||||
deSettings[QString("PKGCMD")] = items.join(QChar(','));
|
||||
items.clear();
|
||||
for (int i=0; i<uiDEConfig.tableWidget_pkgCommand->rowCount(); i++)
|
||||
if (uiDEConfig.tableWidget_pkgCommand->item(i, 0) != 0)
|
||||
items.append(uiDEConfig.tableWidget_pkgCommand->item(i, 1)->text());
|
||||
deSettings[QString("PKGNULL")] = items.join(QChar(','));
|
||||
deSettings[QString("PLAYER")] = uiDEConfig.comboBox_playerSelect->currentText();
|
||||
writeDataEngineConfiguration(deSettings);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::configChanged()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
KConfigGroup cg = config();
|
||||
|
||||
// widget
|
||||
configuration[QString("text")] = cg.readEntry("text", "[cpu: $cpu%] [mem: $mem%] [swap: $swap%] [$netdev: $down/$upKB/s]");
|
||||
|
||||
// advanced
|
||||
configuration[QString("background")] = cg.readEntry("background", "2");
|
||||
configuration[QString("popup")] = cg.readEntry("popup", "2");
|
||||
configuration[QString("customTime")] = cg.readEntry("customTime", "$hh:$mm");
|
||||
configuration[QString("customUptime")] = cg.readEntry("customUptime", "$dd,$hh,$mm");
|
||||
configuration[QString("tempUnits")] = cg.readEntry("tempUnits", "Celsius");
|
||||
configuration[QString("tempDevice")] = cg.readEntry("tempDevice", "");
|
||||
configuration[QString("fanDevice")] = cg.readEntry("fanDevice", "");
|
||||
configuration[QString("mount")] = cg.readEntry("mount", "/");
|
||||
configuration[QString("hdd")] = cg.readEntry("hdd", "/dev/sda");
|
||||
configuration[QString("disk")] = cg.readEntry("disk", "disk/sda_(8:0)");
|
||||
configuration[QString("useCustomNetdev")] = cg.readEntry("useCustomNetdev", "0");
|
||||
configuration[QString("customNetdev")] = cg.readEntry("customNetdev", "lo");
|
||||
configuration[QString("acOnline")] = cg.readEntry("acOnline", "(*)");
|
||||
configuration[QString("acOffline")] = cg.readEntry("acOffline", "( )");
|
||||
|
||||
// tooltip
|
||||
tooltipValues.clear();
|
||||
configuration[QString("tooltipNumber")] = cg.readEntry("tooltipNumber", "100");
|
||||
configuration[QString("useTooltipBackground")] = cg.readEntry("useTooltipBackground", "2");
|
||||
configuration[QString("tooltipBackground")] = cg.readEntry("tooltipBackground", "#ffffff");
|
||||
configuration[QString("cpuTooltip")] = cg.readEntry("cpuTooltip", "2");
|
||||
if (configuration[QString("cpuTooltip")].toInt() == 2) {
|
||||
tooltipValues[QString("cpu")].append(0.0);
|
||||
tooltipValues[QString("cpu")].append(0.01);
|
||||
}
|
||||
configuration[QString("cpuColor")] = cg.readEntry("cpuColor", "#ff0000");
|
||||
configuration[QString("cpuclTooltip")] = cg.readEntry("cpuclTooltip", "2");
|
||||
if (configuration[QString("cpuclTooltip")].toInt() == 2) {
|
||||
tooltipValues[QString("cpucl")].append(0.0);
|
||||
tooltipValues[QString("cpucl")].append(0.01);
|
||||
}
|
||||
configuration[QString("cpuclColor")] = cg.readEntry("cpuclColor", "#00ff00");
|
||||
configuration[QString("memTooltip")] = cg.readEntry("memTooltip", "2");
|
||||
if (configuration[QString("memTooltip")].toInt() == 2) {
|
||||
tooltipValues[QString("mem")].append(0.0);
|
||||
tooltipValues[QString("mem")].append(0.01);
|
||||
}
|
||||
configuration[QString("memColor")] = cg.readEntry("memColor", "#0000ff");
|
||||
configuration[QString("swapTooltip")] = cg.readEntry("swapTooltip", "2");
|
||||
if (configuration[QString("swapTooltip")].toInt() == 2) {
|
||||
tooltipValues[QString("swap")].append(0.0);
|
||||
tooltipValues[QString("swap")].append(0.01);
|
||||
}
|
||||
configuration[QString("swapColor")] = cg.readEntry("swapColor", "#ffff00");
|
||||
configuration[QString("downTooltip")] = cg.readEntry("downTooltip", "2");
|
||||
if (configuration[QString("downTooltip")].toInt() == 2) {
|
||||
tooltipValues[QString("down")].append(0.0);
|
||||
tooltipValues[QString("down")].append(0.01);
|
||||
tooltipValues[QString("up")].append(0.0);
|
||||
tooltipValues[QString("up")].append(0.01);
|
||||
}
|
||||
configuration[QString("downColor")] = cg.readEntry("downColor", "#00ffff");
|
||||
configuration[QString("upColor")] = cg.readEntry("upColor", "#ff00ff");
|
||||
configuration[QString("batteryTooltip")] = cg.readEntry("batteryTooltip", "2");
|
||||
if (configuration[QString("batteryTooltip")].toInt() == 2) {
|
||||
tooltipValues[QString("bat")].append(0.0);
|
||||
tooltipValues[QString("bat")].append(0.01);
|
||||
}
|
||||
configuration[QString("batteryColor")] = cg.readEntry("batteryColor", "#008800");
|
||||
configuration[QString("batteryInColor")] = cg.readEntry("batteryInColor", "#880000");
|
||||
|
||||
// appearance
|
||||
configuration[QString("interval")] = cg.readEntry("interval", "1000");
|
||||
CFont 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"));
|
||||
QString fontStyle;
|
||||
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>");
|
||||
|
||||
// counts
|
||||
QMap<QString, QString> deSettings = readDataEngineConfiguration();
|
||||
counts[QString("bat")] = 0;
|
||||
QStringList acpiDevices = QDir(deSettings[QString("ACPIPATH")]).entryList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
QRegExp batRegexp = QRegExp(QString("BAT.*"));
|
||||
for (int i=0; i<acpiDevices.count(); i++)
|
||||
if (acpiDevices[i].indexOf(batRegexp) > -1)
|
||||
counts[QString("bat")]++;
|
||||
counts[QString("cpu")] = getNumberCpus();
|
||||
counts[QString("custom")] = deSettings[QString("CUSTOM")].split(QString("@@")).count();
|
||||
counts[QString("disk")] = configuration[QString("disk")].split(QString("@@")).count();
|
||||
counts[QString("fan")] = configuration[QString("fanDevice")].split(QString("@@")).count();
|
||||
counts[QString("hddtemp")] = configuration[QString("hdd")].split(QString("@@")).count();
|
||||
counts[QString("mount")] = configuration[QString("mount")].split(QString("@@")).count();
|
||||
counts[QString("pkg")] = deSettings[QString("PKGCMD")].split(QChar(',')).count();
|
||||
counts[QString("temp")] = configuration[QString("tempDevice")].split(QString("@@")).count();
|
||||
counts[QString("tooltip")] = 0;
|
||||
counts[QString("tooltip")] += configuration[QString("cpuTooltip")].toInt();
|
||||
counts[QString("tooltip")] += configuration[QString("cpuclTooltip")].toInt();
|
||||
counts[QString("tooltip")] += configuration[QString("memTooltip")].toInt();
|
||||
counts[QString("tooltip")] += configuration[QString("swapTooltip")].toInt();
|
||||
counts[QString("tooltip")] += configuration[QString("downTooltip")].toInt();
|
||||
counts[QString("tooltip")] += configuration[QString("batteryTooltip")].toInt();
|
||||
counts[QString("tooltip")] = counts[QString("tooltip")] / 2;
|
||||
|
||||
reinit();
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::addNewCustomCommand(QTableWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
if (item->row() == (uiDEConfig.tableWidget_customCommand->rowCount() - 1))
|
||||
uiDEConfig.tableWidget_customCommand->insertRow(
|
||||
uiDEConfig.tableWidget_customCommand->rowCount());
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::addNewPkgCommand(QTableWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
if ((item->row() == (uiDEConfig.tableWidget_pkgCommand->rowCount() - 1)) &&
|
||||
(item->column() == 0)) {
|
||||
uiDEConfig.tableWidget_pkgCommand->insertRow(
|
||||
uiDEConfig.tableWidget_pkgCommand->rowCount());
|
||||
uiDEConfig.tableWidget_pkgCommand->setItem(
|
||||
uiDEConfig.tableWidget_pkgCommand->rowCount() - 1, 1,
|
||||
new QTableWidgetItem(QString("0")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::contextMenuCustomCommand(const QPoint pos)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (uiDEConfig.tableWidget_customCommand->currentItem() == 0) return;
|
||||
|
||||
QMenu menu(uiDEConfig.tableWidget_customCommand);
|
||||
QAction *remove = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Remove"));
|
||||
QAction *action = menu.exec(uiDEConfig.tableWidget_customCommand->viewport()->mapToGlobal(pos));
|
||||
if (action == remove)
|
||||
uiDEConfig.tableWidget_customCommand->removeRow(
|
||||
uiDEConfig.tableWidget_customCommand->currentRow());
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::contextMenuPkgCommand(const QPoint pos)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (uiDEConfig.tableWidget_pkgCommand->currentItem() == 0) return;
|
||||
|
||||
QMenu menu(uiDEConfig.tableWidget_pkgCommand);
|
||||
QAction *remove = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Remove"));
|
||||
QAction *action = menu.exec(uiDEConfig.tableWidget_pkgCommand->viewport()->mapToGlobal(pos));
|
||||
if (action == remove)
|
||||
uiDEConfig.tableWidget_pkgCommand->removeRow(
|
||||
uiDEConfig.tableWidget_pkgCommand->currentRow());
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::editFanItem(QListWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
uiAdvancedConfig.listWidget_fanDevice->openPersistentEditor(item);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::editHddItem(QListWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
uiAdvancedConfig.listWidget_hddDevice->openPersistentEditor(item);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::editHddSpeedItem(QListWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
uiAdvancedConfig.listWidget_hddSpeedDevice->openPersistentEditor(item);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::editMountItem(QListWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
uiAdvancedConfig.listWidget_mount->openPersistentEditor(item);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::editTempItem(QListWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
uiAdvancedConfig.listWidget_tempDevice->openPersistentEditor(item);
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::setFontFormating()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
CFont defaultFont = CFont(uiAppConfig.fontComboBox->currentFont().family(),
|
||||
uiAppConfig.spinBox_size->value(),
|
||||
400, false, uiAppConfig.kcolorcombo->color());
|
||||
CFont font = CFontDialog::getFont(i18n("Select font"), defaultFont,
|
||||
false, false);
|
||||
if (font != defaultFont) {
|
||||
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 AwesomeWidget::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>"));
|
||||
}
|
97
sources/awesome-widget/customlabel.cpp
Normal 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\n").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\n").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\n").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\n").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
|
||||
|
||||
widget->sendNotification(QString("system"), text);
|
||||
}
|
||||
emit(QLabel::mousePressEvent(event));
|
||||
}
|
45
sources/awesome-widget/customlabel.h
Normal 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 */
|
497
sources/awesome-widget/deconfig.ui
Normal file
@ -0,0 +1,497 @@
|
||||
<?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>592</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>576</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="4" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_hdddev">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_hdddev">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HDD</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_hdddev">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_mpdport">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_mpdport">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MPD port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_mpdport">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_mpdport">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="3" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_gpudev">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gpudev">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPU device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_gpudev">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<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="11" 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="5" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_hddtempCmd">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_hddtempCmd">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>hddtemp cmd</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_hddtempCmd">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_playerSelect">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_playerSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Music player</string>
|
||||
</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>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</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_mpdaddress">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_mpdaddress">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MPD address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_mpdaddress">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_desktopCmd">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_desktopCmd">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Desktop check cmd</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_desktopCmd">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<layout class="QVBoxLayout" name="layout_mpris">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_mprisInfo">
|
||||
<property name="text">
|
||||
<string><b>NOTE:</b> 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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MPRIS player name</string>
|
||||
</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="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</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="10" 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">
|
||||
<widget class="QTableWidget" name="tableWidget_customCommand">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Editable
|
||||
del - remove item</string>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Custom command</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_acpi">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_acpi">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ACPI path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_acpi">
|
||||
<property name="toolTip">
|
||||
<string>"/sys/class/power_supply/" by default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
551
sources/awesome-widget/deinteraction.cpp
Normal file
@ -0,0 +1,551 @@
|
||||
/***************************************************************************
|
||||
* 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 <pdebug/pdebug.h>
|
||||
|
||||
|
||||
void AwesomeWidget::connectToEngine()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
QRegExp regExp;
|
||||
|
||||
// battery
|
||||
regExp = QRegExp(QString("(ac|bat.*)"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("batteryTooltip")].toInt() == 2))
|
||||
extsysmonEngine->connectSource(QString("battery"),
|
||||
this, configuration[QString("interval")].toInt());
|
||||
// cpu
|
||||
regExp = QRegExp(QString("cpu(?!cl).*"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("cpuTooltip")].toInt() == 2)) {
|
||||
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("gpu"));
|
||||
if (foundKeys.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("hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*"));
|
||||
if (foundKeys.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("mem.*"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("memTooltip")].toInt() == 2)) {
|
||||
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("swap.*"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("swapTooltip")].toInt() == 2)) {
|
||||
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 ((configuration[QString("batteryTooltip")].toInt() == 2) &&
|
||||
(!isnan(data[QString("bat0")].toFloat()))) {
|
||||
if (tooltipValues[QString("bat")].count() > configuration[QString("tooltipNumber")].toInt())
|
||||
tooltipValues[QString("bat")].takeFirst();
|
||||
if (data[QString("ac")].toBool())
|
||||
tooltipValues[QString("bat0")].append(data[QString("bat0")].toFloat());
|
||||
else
|
||||
tooltipValues[QString("bat0")].append(-data[QString("bat0")].toFloat());
|
||||
}
|
||||
} else if (sourceName == QString("cpu/system/TotalLoad")) {
|
||||
values[QString("cpu")] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
|
||||
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.indexOf(cpuRegExp) > -1) {
|
||||
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);
|
||||
} 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.indexOf(cpuclRegExp) > -1) {
|
||||
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.indexOf(hddrRegExp) > -1) {
|
||||
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.indexOf(hddwRegExp) > -1) {
|
||||
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);
|
||||
} else if (sourceName == QString("gputemp")) {
|
||||
values[QString("gputemp")] = QString("%1").arg(getTemp(data[QString("GPUTemp")].toFloat()), 4, 'f', 1);
|
||||
} else if (sourceName.indexOf(mountFillRegExp) > -1) {
|
||||
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);
|
||||
break;
|
||||
}
|
||||
} else if (sourceName.indexOf(mountFreeRegExp) > -1) {
|
||||
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.indexOf(mountUsedRegExp) > -1) {
|
||||
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());
|
||||
}
|
||||
} else if (sourceName.indexOf(netRecRegExp) > -1) {
|
||||
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() == 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);
|
||||
updateNetworkDevice();
|
||||
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.indexOf(netTransRegExp) > -1) {
|
||||
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());
|
||||
}
|
||||
} else if (sourceName.indexOf(tempRegExp) > -1) {
|
||||
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("(ac|bat)"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("batteryTooltip")].toInt() == 2))
|
||||
extsysmonEngine->disconnectSource(QString("battery"), this);
|
||||
// cpu
|
||||
regExp = QRegExp(QString("cpu(?!cl).*"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("cpuTooltip")].toInt() == 2)) {
|
||||
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("gpu"));
|
||||
if (foundKeys.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("hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*"));
|
||||
if (foundKeys.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("mem.*"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("memTooltip")].toInt() == 2)) {
|
||||
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("swap.*"));
|
||||
if ((foundKeys.indexOf(regExp) > -1) ||
|
||||
(configuration[QString("swapTooltip")].toInt() == 2)) {
|
||||
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);
|
||||
}
|
25
sources/awesome-widget/plasma-applet-awesomewidget.desktop
Normal 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
|
@ -0,0 +1,9 @@
|
||||
[Global]
|
||||
IconName=system
|
||||
Name=Awesome Widget
|
||||
Comment=Awesome widget information
|
||||
|
||||
[Event/system]
|
||||
Name=System information
|
||||
Comment=System information
|
||||
Action=Popup
|
25
sources/awesome-widget/po/CMakeLists.txt
Normal 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})
|
684
sources/awesome-widget/po/en.po
Normal file
@ -0,0 +1,684 @@
|
||||
# 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-09-21 20:18+0400\n"
|
||||
"PO-Revision-Date: 2014-09-21 20:19+0400\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "Run ksysguard"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "Show README"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "Update text"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "Custom command"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "Package manager"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "Null lines"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "Advanced"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "Tooltip"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "Appearance"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "DataEngine"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "Remove"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr "Select font"
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr "Enable background"
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
msgstr "Enable popup on mouse click"
|
||||
|
||||
#: 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 "Time interval"
|
||||
msgstr "Time interval"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "Font"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "Font size"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "Font color"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "Font style"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "Font weight"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "HDD"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "MPD port"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "GPU device"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "hddtemp cmd"
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "Music player"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "MPD address"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr "Desktop check cmd"
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
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:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr "MPRIS player name"
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr "ACPI path"
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "\"/sys/class/power_supply/\" by default"
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "Number of values for tooltips"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr "Background"
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "CPU color"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "CPU clock color"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "Memory color"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "Swap color"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "Download speed color"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "Upload speed color"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr "Battery active color"
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
msgid "Battery inactive color"
|
||||
msgstr "Battery inactive color"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
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:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "Add"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Evgeniy Alekseev"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "esalexeev@gmail.com"
|
||||
|
||||
#~ 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 "DE Configuration"
|
||||
#~ msgstr "DE 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 "Custom"
|
||||
#~ msgstr "Custom"
|
||||
|
||||
#~ 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 "Current desktop"
|
||||
#~ msgstr "Current desktop"
|
||||
|
||||
#~ 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"
|
619
sources/awesome-widget/po/es.po
Normal file
@ -0,0 +1,619 @@
|
||||
# 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-09-21 20:18+0400\n"
|
||||
"PO-Revision-Date: 2014-09-05 11:18+0400\n"
|
||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||
"Language-Team: Spanish <kde-russian@lists.kde.ru>\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "Ejecutar ksysguard"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "Mostrar el README"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "Actualizar texto"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "Comando personalizado"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "Gestor de paquetes"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "Número de líneas nulas"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "Avanzado"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "Ventana emergente"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "Apariencia"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "DataEngine"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "Eliminar"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
msgstr "Habilitar ventana emergente al hacer clic"
|
||||
|
||||
#: 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 largo\n"
|
||||
"$ddd - día de la semana corto\n"
|
||||
"$dd - día\n"
|
||||
"$d - día (sin ceros)\n"
|
||||
"$MMMM - mes largo\n"
|
||||
"$MMM - mes corto\n"
|
||||
"$MM - mes\n"
|
||||
"$M - mes (sin ceros)\n"
|
||||
"$yyyy - año\n"
|
||||
"$yy - año 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
|
||||
#, fuzzy
|
||||
msgid "Fan devices"
|
||||
msgstr "Dispositivo de alimentació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 "Disco duro (velocidad)"
|
||||
|
||||
#: po/rc.cpp:68 rc.cpp:68
|
||||
msgid "HDD devices (temp)"
|
||||
msgstr "Disco duro (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 que devuelve 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 que devuelve si la alimentación está desconectada"
|
||||
|
||||
#: po/rc.cpp:92 rc.cpp:92
|
||||
msgid "Time interval"
|
||||
msgstr "Intervalo de tiempo"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "Fuente"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "Tamaño de fuente"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "Color de fuente"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "Estilo de fuente"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "Grosor de la fuente"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "Disco duro"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "Puerto de MPD"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "Dispositivo de GPU"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "Comando hddtemp"
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "Reproductor de música"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "Dirección de MPD"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"Editable\n"
|
||||
"del - eliminar elemento"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
#, fuzzy
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "\"/sys/class/power_supply/AC/online\" por defecto"
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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 habilite la caja de seleccione la "
|
||||
"casilla de verificación pertinente."
|
||||
|
||||
#: po/rc.cpp:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "Número de valores para las ventanas emergentes"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "Color de la CPU"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "Color de la frecuencia de la CPU"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "Color de la memoria"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "Color de la swap"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "Color de la velocidad de recepción"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "Color de la velocidad de envío"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
#, fuzzy
|
||||
msgid "Battery inactive color"
|
||||
msgstr "Dispositivo de batería"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
msgid ""
|
||||
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
|
||||
"awesome-widgets/\">project homepage</a>"
|
||||
msgstr ""
|
||||
"Puede encontrar información detallada en el <a href=\"http://arcanis.name/"
|
||||
"projects/awesome-widgets/\">sitio del proyecto</a>"
|
||||
|
||||
#: po/rc.cpp:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "Añadir"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Tu nombre"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "Tus correos"
|
||||
|
||||
#~ 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 "Custom"
|
||||
#~ msgstr "Personalizado"
|
||||
|
||||
#~ 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"
|
41
sources/awesome-widget/po/extract_messages.sh
Executable 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"
|
||||
|
670
sources/awesome-widget/po/fr.po
Normal file
@ -0,0 +1,670 @@
|
||||
# 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-09-21 20:18+0400\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "Lancer ksysguard"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "Voir le README"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "Mettre à jour le texte"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "Commande personnalisée"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "Gestionnaire de paquets"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "Nombre d'éléments pour les conseils"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "Avancé"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "Conseil"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "Apparence"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "Moteur de données"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
msgstr "Popup lors d'un click souris"
|
||||
|
||||
#: 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 "Time interval"
|
||||
msgstr "Intervalle"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "Police"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "Taille de la police"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "Couleur de la police"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "Style de la police"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "Épaisseur de la police"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "Disque dur"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "Port MPD"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "Périphérique graphique"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "Commande de température HDD"
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "Lecteur audio"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "Adresse MPD"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"Modifiable\n"
|
||||
"del - supprimer un élément"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
#, fuzzy
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "\"/sys/class/power_supply/AC/online\" par défaut"
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "Nombre d'éléments pour les conseils"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "Couleur processeur"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "Couleur de l'horloge processeur"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "Couleur de la mémoire"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "Couleur de la mémoire d'échange"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "Couleur de la vitesse de téléchargement"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "Couleur du téléversement"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
#, fuzzy
|
||||
msgid "Battery inactive color"
|
||||
msgstr "Batterie"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
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:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "Ajouter"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Evgeniy Alekseev"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "esalexeev@gmail.com"
|
||||
|
||||
#~ 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 "Custom"
|
||||
#~ msgstr "Personnalisé"
|
||||
|
||||
#~ 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"
|
321
sources/awesome-widget/po/plasma_applet_awesome-widget.pot
Normal file
@ -0,0 +1,321 @@
|
||||
# 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-09-21 20:18+0400\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr ""
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr ""
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
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 "Time interval"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
msgid "Battery inactive color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
msgid ""
|
||||
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
|
||||
"awesome-widgets/\">project homepage</a>"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr ""
|
594
sources/awesome-widget/po/pt_BR.po
Normal file
@ -0,0 +1,594 @@
|
||||
# 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-09-21 20:18+0400\n"
|
||||
"PO-Revision-Date: 2014-09-05 11:21+0400\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"
|
||||
|
||||
#: awesome-widget.cpp:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "Abrir ksysguard"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "Mostrar README"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "Atualizar texto"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "Comando personalizado"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "Gerenciador de pacotes"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "Número de valores para dicas de contexto"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "Avançado"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "Dica de contexto"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "Aparência"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "Engine de dados"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "Remover"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
msgstr "Ativar popup no clique do mouse"
|
||||
|
||||
#: 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
|
||||
#, fuzzy
|
||||
msgid "Fan devices"
|
||||
msgstr "Dispositivo do carregador"
|
||||
|
||||
#: 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 "Time interval"
|
||||
msgstr "Intervalo de tempo"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "Tamanho da fonte"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "Tamanho da fonte"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "Cor da fonte"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "Estilo da fonte"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "Peso da fonte"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "HDD"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "Porta do MPD"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "Dispositivo GPU"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "comando hddtemp "
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "Reprodutor de áudio"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "Endereço do MPD"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"Editável\n"
|
||||
"del - remover item"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
#, fuzzy
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "\"/sys/class/power_supply/AC/online\" por padrão"
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "Número de valores para dicas de contexto"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "Cor da frequência da GPU"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "Cor da frequência da GPU"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "Cor da memória"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "Cor do swap"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "Cor da velocidade de download"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "Cor da velocidade de upload"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
#, fuzzy
|
||||
msgid "Battery inactive color"
|
||||
msgstr "Dispositivo do carregador"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
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:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "Adicionar"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "under"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "dreanazous@gmail.com"
|
||||
|
||||
#~ 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 "Custom"
|
||||
#~ msgstr "Personalizado"
|
||||
|
||||
#~ 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`"
|
684
sources/awesome-widget/po/ru.po
Normal file
@ -0,0 +1,684 @@
|
||||
# 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-09-21 20:18+0400\n"
|
||||
"PO-Revision-Date: 2014-09-21 20:19+0400\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "Запустить ksysguard"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "Показать README"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "Обновить текст"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "Своя команда"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "Пакетный менеджер"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "Число пустых линий"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "Виджет"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "Расширенные"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "Тултип"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "Внешний вид"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "DataEngine"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "Удалить"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr "Выберете шрифт"
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr "Включить фон"
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
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 "Time interval"
|
||||
msgstr "Интервал обновления"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "Шрифт"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "Размер шрифта"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "Цвет шрифта"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "Стиль шрифта"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "Ширина шрифта"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "HDD"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "Порт сервера MPD"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "Устройство GPU"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "Команда hddtemp"
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "Музыкальный плеер"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "Адрес сервера MPD"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr "Команда для проверки рабочего стола"
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr "<b>ВНИМАНИЕ:</b> DBus интерфейс плеера должен быть активен"
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr "Имя плеера в MPRIS"
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"Редактируемо\n"
|
||||
"del - удалить строку"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr "Пусть к ACPI"
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "\"/sys/class/power_supply/\" по умолчанию"
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "Число хранящихся значений"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr "Фон"
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "Цвет CPU"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "Цвет частоты CPU"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "Цвет памяти"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "Цвет swap"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "Цвет скорости загрузки"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "Цвет скорости отдачи"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr "Цвет заряжаемой батареи"
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
msgid "Battery inactive color"
|
||||
msgstr "Цвет разряжаемой батареи"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
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:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "Добавить"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Evgeniy Alekseev"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "esalexeev@gmail.com"
|
||||
|
||||
#~ 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 "DE Configuration"
|
||||
#~ msgstr "Настройка DE"
|
||||
|
||||
#~ 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 "Custom"
|
||||
#~ msgstr "Своя команда"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
|
||||
#~ msgstr ""
|
||||
#~ "$customN - получить информацию из своей команды N. Например $custom0"
|
||||
|
||||
#~ msgid "Current desktop"
|
||||
#~ msgstr "Текущий рабочий стол"
|
||||
|
||||
#~ 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@@ - отключить автовыбор устройства и установить указанное"
|
587
sources/awesome-widget/po/uk.po
Normal file
@ -0,0 +1,587 @@
|
||||
# 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-09-21 20:18+0400\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "Запустити ksysguard"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "Показати README"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "Оновити текст"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "Своя команда"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "Пакетний менеджер"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "Кількість пустих рядків"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "Віджет"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "Розширені"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "Тултіп"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "Зовнішній вигляд"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "DataEngine"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "Видалити"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
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 "AC пристрій"
|
||||
|
||||
#: 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 "Time interval"
|
||||
msgstr "Інтервал оновлення"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "Шрифт"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "Розмір шрифту"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "Колір шрифту"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "Стиль шрифту"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "Ширина шрифту"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "HDD"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "Порт сервера MPD"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "Пристій GPU"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "Команда hddtemp"
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "Музичний плеєр"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "Адреса сервера MPD"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"Можна редагувати\n"
|
||||
"del - видалити рядок"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
#, fuzzy
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "\"/sys/class/power_supply/AC/online\" за замовчуванням"
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "Кількість значень для тултіпа"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "Колір CPU"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "Колір частоти CPU"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "Колір пам’яті"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "Колір swap"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "Колір швидкості скачування"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "Колір швидкості віддачі"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
#, fuzzy
|
||||
msgid "Battery inactive color"
|
||||
msgstr "Пристрій батареї"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
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:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "Добавити"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Slobodyan Victor"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "sarumyan@i.ua"
|
||||
|
||||
#~ 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 "Custom"
|
||||
#~ msgstr "Своя команда"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "$customN - get output from custom command N (from N). Example `$custom0`"
|
||||
#~ msgstr ""
|
||||
#~ "$customN - отримати інформацію зі своєї команди N. Наприклад `$custom0`"
|
||||
|
||||
#~ msgid "Widget settings"
|
||||
#~ msgstr "Налаштування віджету"
|
357
sources/awesome-widget/po/zh.po
Normal file
@ -0,0 +1,357 @@
|
||||
# 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-09-21 20:18+0400\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:78
|
||||
msgid "Run ksysguard"
|
||||
msgstr "运行任务管理器"
|
||||
|
||||
#: awesome-widget.cpp:81
|
||||
msgid "Show README"
|
||||
msgstr "显示帮助文档"
|
||||
|
||||
#: awesome-widget.cpp:84
|
||||
msgid "Update text"
|
||||
msgstr "刷新文本"
|
||||
|
||||
#: configuration.cpp:362 po/rc.cpp:151 rc.cpp:151
|
||||
msgid "Custom command"
|
||||
msgstr "自定义命令"
|
||||
|
||||
#: configuration.cpp:392 po/rc.cpp:141 rc.cpp:141
|
||||
msgid "Package manager"
|
||||
msgstr "包管理器"
|
||||
|
||||
#: configuration.cpp:393 po/rc.cpp:144 rc.cpp:144
|
||||
msgid "Null lines"
|
||||
msgstr "空行"
|
||||
|
||||
#: configuration.cpp:405
|
||||
msgid "Widget"
|
||||
msgstr "窗口小部件"
|
||||
|
||||
#: configuration.cpp:406
|
||||
msgid "Advanced"
|
||||
msgstr "高级设置"
|
||||
|
||||
#: configuration.cpp:407
|
||||
msgid "Tooltip"
|
||||
msgstr "提示"
|
||||
|
||||
#: configuration.cpp:408
|
||||
msgid "Appearance"
|
||||
msgstr "外观"
|
||||
|
||||
#: configuration.cpp:409
|
||||
msgid "DataEngine"
|
||||
msgstr "数据引擎"
|
||||
|
||||
#: configuration.cpp:697 configuration.cpp:711
|
||||
msgid "Remove"
|
||||
msgstr "移除"
|
||||
|
||||
#: configuration.cpp:766
|
||||
msgid "Select font"
|
||||
msgstr "选择字体"
|
||||
|
||||
#: po/rc.cpp:3 rc.cpp:3
|
||||
msgid "Enable background"
|
||||
msgstr "启用背景"
|
||||
|
||||
#: po/rc.cpp:6 rc.cpp:6
|
||||
msgid "Enable popup on mouse click"
|
||||
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 "Time interval"
|
||||
msgstr "时间周期"
|
||||
|
||||
#: po/rc.cpp:95 po/rc.cpp:196 rc.cpp:95 rc.cpp:196
|
||||
msgid "Font"
|
||||
msgstr "字体"
|
||||
|
||||
#: po/rc.cpp:98 rc.cpp:98
|
||||
msgid "Font size"
|
||||
msgstr "字体大小"
|
||||
|
||||
#: po/rc.cpp:101 rc.cpp:101
|
||||
msgid "Font color"
|
||||
msgstr "字体颜色"
|
||||
|
||||
#: po/rc.cpp:104 rc.cpp:104
|
||||
msgid "Font style"
|
||||
msgstr "字体样式"
|
||||
|
||||
#: po/rc.cpp:107 rc.cpp:107
|
||||
msgid "Font weight"
|
||||
msgstr "字体宽度"
|
||||
|
||||
#: po/rc.cpp:110 rc.cpp:110
|
||||
msgid "HDD"
|
||||
msgstr "硬盘"
|
||||
|
||||
#: po/rc.cpp:113 rc.cpp:113
|
||||
msgid "MPD port"
|
||||
msgstr "MPD 端口"
|
||||
|
||||
#: po/rc.cpp:116 rc.cpp:116
|
||||
msgid "GPU device"
|
||||
msgstr "GPU 设备"
|
||||
|
||||
#: po/rc.cpp:119 rc.cpp:119
|
||||
msgid "hddtemp cmd"
|
||||
msgstr "硬盘温度显示命令"
|
||||
|
||||
#: po/rc.cpp:122 rc.cpp:122
|
||||
msgid "Music player"
|
||||
msgstr "音乐播放器"
|
||||
|
||||
#: po/rc.cpp:125 rc.cpp:125
|
||||
msgid "MPD address"
|
||||
msgstr "MPD 地址"
|
||||
|
||||
#: po/rc.cpp:128 rc.cpp:128
|
||||
msgid "Desktop check cmd"
|
||||
msgstr "检测桌面命令"
|
||||
|
||||
#: po/rc.cpp:131 rc.cpp:131
|
||||
msgid "<b>NOTE:</b> Player DBus interface should be an active"
|
||||
msgstr "<b>提示:</b> 播放器 DBus 应当处于激活状态"
|
||||
|
||||
#: po/rc.cpp:134 rc.cpp:134
|
||||
msgid "MPRIS player name"
|
||||
msgstr "MPRIS 播放器名"
|
||||
|
||||
#: po/rc.cpp:137 po/rc.cpp:147 rc.cpp:137 rc.cpp:147
|
||||
msgid ""
|
||||
"Editable\n"
|
||||
"del - remove item"
|
||||
msgstr ""
|
||||
"可编辑的\n"
|
||||
"del - 移除项目"
|
||||
|
||||
#: po/rc.cpp:154 rc.cpp:154
|
||||
msgid "ACPI path"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:157 rc.cpp:157
|
||||
#, fuzzy
|
||||
msgid "\"/sys/class/power_supply/\" by default"
|
||||
msgstr "默认为 \"/sys/class/power_supply/AC/online\""
|
||||
|
||||
#: po/rc.cpp:160 rc.cpp:160
|
||||
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:163 rc.cpp:163
|
||||
msgid "Number of values for tooltips"
|
||||
msgstr "提示的数值"
|
||||
|
||||
#: po/rc.cpp:166 rc.cpp:166
|
||||
msgid "Background"
|
||||
msgstr "背景"
|
||||
|
||||
#: po/rc.cpp:169 rc.cpp:169
|
||||
msgid "CPU color"
|
||||
msgstr "CPU 颜色"
|
||||
|
||||
#: po/rc.cpp:172 rc.cpp:172
|
||||
msgid "CPU clock color"
|
||||
msgstr "CPU 时钟颜色"
|
||||
|
||||
#: po/rc.cpp:175 rc.cpp:175
|
||||
msgid "Memory color"
|
||||
msgstr "内存显示颜色"
|
||||
|
||||
#: po/rc.cpp:178 rc.cpp:178
|
||||
msgid "Swap color"
|
||||
msgstr "虚拟内存颜色"
|
||||
|
||||
#: po/rc.cpp:181 rc.cpp:181
|
||||
msgid "Download speed color"
|
||||
msgstr "下载速度颜色"
|
||||
|
||||
#: po/rc.cpp:184 rc.cpp:184
|
||||
msgid "Upload speed color"
|
||||
msgstr "上传速度颜色"
|
||||
|
||||
#: po/rc.cpp:187 rc.cpp:187
|
||||
msgid "Battery active color"
|
||||
msgstr "电池使用状态提示颜色"
|
||||
|
||||
#: po/rc.cpp:190 rc.cpp:190
|
||||
msgid "Battery inactive color"
|
||||
msgstr "电池未使用状态提示颜色"
|
||||
|
||||
#: po/rc.cpp:193 rc.cpp:193
|
||||
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:199 rc.cpp:199
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:202 rc.cpp:202
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:205 rc.cpp:205
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:208 rc.cpp:208
|
||||
msgid "Add"
|
||||
msgstr "添加"
|
||||
|
||||
#: po/rc.cpp:209 rc.cpp:209
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "用户名"
|
||||
|
||||
#: po/rc.cpp:210 rc.cpp:210
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "用户邮箱"
|
||||
|
||||
#~ msgid "Battery device"
|
||||
#~ msgstr "电池设备"
|
||||
|
||||
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
|
||||
#~ msgstr "默认为 \"/sys/class/power_supply/BAT0/capacity\""
|
156
sources/awesome-widget/reinit.cpp
Normal file
@ -0,0 +1,156 @@
|
||||
/***************************************************************************
|
||||
* 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 <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);
|
||||
textLabel->adjustSize();
|
||||
mainLayout->itemAt(0, 0)->setGeometry(textLabel->geometry());
|
||||
|
||||
keys = getKeys();
|
||||
foundKeys = findKeys();
|
||||
updateNetworkDevice();
|
||||
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()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
values[QString("netdev")] = getNetworkDevice();
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::updateText(const bool clear)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QString text = configuration[QString("text")];
|
||||
if (!clear)
|
||||
for (int i=0; i<foundKeys.count(); i++)
|
||||
text.replace(QString("$") + foundKeys[i], values[foundKeys[i]]);
|
||||
textLabel->setText(formatLine[0] + text + formatLine[1]);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::updateTooltip()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
toolTipView->resize(100.0 * counts[QString("tooltip")], 100.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 / (tooltipValues[trueKeys[i]].count() + 0.0);
|
||||
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;
|
||||
float x2 = (j + 1) * normX + shift;
|
||||
float y2 = - fabs(tooltipValues[trueKeys[i]][j+1]) * normY;
|
||||
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);
|
||||
}
|
559
sources/awesome-widget/tooltipconfig.ui
Normal file
@ -0,0 +1,559 @@
|
||||
<?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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of values for tooltips</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_tooltipNum">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_tooltipNum">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Background</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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="KColorCombo" name="kcolorcombo_background">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_cpuColor">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_cpu">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CPU color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_cpuColor">
|
||||
<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="KColorCombo" name="kcolorcombo_cpu">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_cpuclockColor">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_cpuclock">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CPU clock color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_cpuclockColor">
|
||||
<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="KColorCombo" name="kcolorcombo_cpuclock">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_memColor">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_mem">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Memory color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_memColor">
|
||||
<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="KColorCombo" name="kcolorcombo_mem">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_swapColor">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_swap">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Swap color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_swapColor">
|
||||
<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="KColorCombo" name="kcolorcombo_swap">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_downColor">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_down">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download speed color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_downColor">
|
||||
<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="KColorCombo" name="kcolorcombo_down">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_upColor">
|
||||
<item>
|
||||
<spacer name="spacer_upColorLeft">
|
||||
<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="QLabel" name="label_up">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upload speed color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_upColor">
|
||||
<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="KColorCombo" name="kcolorcombo_up">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_batteryColor">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_battery">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Battery active color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_batteryColor">
|
||||
<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="KColorCombo" name="kcolorcombo_battery">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_batteryInColor">
|
||||
<item>
|
||||
<spacer name="space_batteryIn">
|
||||
<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="QLabel" name="label_batteryIn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Battery inactive color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_batteryInColor">
|
||||
<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="KColorCombo" name="kcolorcombo_batteryIn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
228
sources/awesome-widget/widget.ui
Normal 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 <a href="http://arcanis.name/projects/awesome-widgets/">project homepage</a></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>
|
@ -1,16 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
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)
|
@ -1,198 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4.QtGui import *
|
||||
from PyKDE4.kdecore import *
|
||||
from PyKDE4.kdeui import *
|
||||
import commands
|
||||
import config
|
||||
|
||||
|
||||
|
||||
class ConfigDefinition:
|
||||
def __init__(self, parent, configpage):
|
||||
"""class definition"""
|
||||
self.parent = parent
|
||||
self.configpage = configpage
|
||||
|
||||
|
||||
def configAccepted(self):
|
||||
"""function to accept settings"""
|
||||
settings = config.Config(self.parent)
|
||||
|
||||
# update local variables
|
||||
self.parent.interval = self.configpage.ui.spinBox_interval.value()
|
||||
settings.set('interval', self.parent.interval)
|
||||
self.parent.font_family = str(self.configpage.ui.fontComboBox.currentFont().family())
|
||||
settings.set('font_family', self.parent.font_family)
|
||||
self.parent.font_size = self.configpage.ui.spinBox_fontSize.value()
|
||||
settings.set('font_size', self.parent.font_size)
|
||||
self.parent.font_color = str(self.configpage.ui.kcolorcombo.color().name())
|
||||
settings.set('font_color', self.parent.font_color)
|
||||
if (self.configpage.ui.comboBox_style.currentIndex() == 0):
|
||||
self.parent.font_style = 'normal'
|
||||
else:
|
||||
self.parent.font_style = 'italic'
|
||||
settings.set('font_style', self.parent.font_style)
|
||||
self.parent.font_weight = self.configpage.ui.spinBox_weight.value()
|
||||
settings.set('font_weight', self.parent.font_weight)
|
||||
|
||||
# disconnecting from source and clear layout
|
||||
if (self.parent.uptimeBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource("system/uptime", self.parent)
|
||||
self.parent.label_uptime.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_uptime)
|
||||
if (self.parent.cpuBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource("cpu/system/TotalLoad", self.parent)
|
||||
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
||||
self.parent.label_cpu0.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_cpu0)
|
||||
self.parent.label_cpu1.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_cpu1)
|
||||
for core in range(self.parent.numCores):
|
||||
self.parent.systemmonitor.disconnectSource("cpu/cpu"+str(core)+"/TotalLoad", self.parent)
|
||||
exec ("self.parent.label_coreCpu" + str(core) + ".setText('')")
|
||||
exec ("self.parent.layout.removeItem(self.parent.label_coreCpu" + str(core) + ")")
|
||||
else:
|
||||
self.parent.label_cpu.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_cpu)
|
||||
if (self.parent.cpuclockBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource("cpu/system/AverageClock", self.parent)
|
||||
if (self.parent.cpuclockFormat.split('$ccpu')[0] != self.parent.cpuclockFormat):
|
||||
self.parent.label_cpuclock0.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_cpuclock0)
|
||||
self.parent.label_cpuclock1.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_cpuclock1)
|
||||
for core in range(self.parent.numCores):
|
||||
self.parent.systemmonitor.disconnectSource("cpu/cpu"+str(core)+"/clock", self.parent)
|
||||
exec ("self.parent.label_coreCpuclock" + str(core) + ".setText('')")
|
||||
exec ("self.parent.layout.removeItem(self.parent.label_coreCpuclock" + str(core) + ")")
|
||||
else:
|
||||
self.parent.label_cpuclock.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_cpuclock)
|
||||
if (self.parent.tempBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource(self.parent.tempdev, self.parent)
|
||||
self.parent.label_temp.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_temp)
|
||||
if (self.parent.gpuBool == 1):
|
||||
self.parent.extsysmon.disconnectSource("gpu", self.parent)
|
||||
self.parent.label_gpu.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_gpu)
|
||||
if (self.parent.gputempBool == 1):
|
||||
self.parent.extsysmon.disconnectSource("gputemp", self.parent)
|
||||
self.parent.label_gputemp.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_gputemp)
|
||||
if (self.parent.memBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource("mem/physical/application", self.parent)
|
||||
if (self.parent.memInMb == False):
|
||||
self.parent.systemmonitor.disconnectSource("mem/physical/free", self.parent)
|
||||
self.parent.systemmonitor.disconnectSource("mem/physical/used", self.parent)
|
||||
self.parent.label_mem.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_mem)
|
||||
if (self.parent.swapBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource("mem/swap/used", self.parent)
|
||||
if (self.parent.swapInMb == False):
|
||||
self.parent.systemmonitor.disconnectSource("mem/swap/free", self.parent)
|
||||
self.parent.label_swap.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_swap)
|
||||
if (self.parent.hddBool == 1):
|
||||
for mount in self.parent.mountPoints:
|
||||
self.parent.systemmonitor.disconnectSource("partitions" + mount + "/filllevel", self.parent)
|
||||
exec ('self.parent.label_hdd_' + ''.join(mount.split('/')) + '.setText("")')
|
||||
exec ("self.parent.layout.removeItem(self.parent.label_hdd_" + ''.join(mount.split('/')) + ")")
|
||||
self.parent.label_hdd0.setText('')
|
||||
self.parent.label_hdd1.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_hdd0)
|
||||
self.parent.layout.removeItem(self.parent.label_hdd1)
|
||||
if (self.parent.hddtempBool == 1):
|
||||
self.parent.extsysmon.disconnectSource("hddtemp", self.parent)
|
||||
self.parent.label_hddtemp.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_hddtemp)
|
||||
if (self.parent.netBool == 1):
|
||||
self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent)
|
||||
self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent)
|
||||
self.parent.label_netDown.setText('')
|
||||
self.parent.label_netUp.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_netUp)
|
||||
self.parent.layout.removeItem(self.parent.label_netDown)
|
||||
if (self.parent.batBool == 1):
|
||||
self.parent.label_bat.setText('')
|
||||
self.parent.layout.removeItem(self.parent.label_bat)
|
||||
|
||||
self.parent.label_order = "------------"
|
||||
|
||||
for label in self.parent.dict_orders.keys():
|
||||
if (self.configpage.checkboxes[self.parent.dict_orders[label]].checkState() == 2):
|
||||
exec ('self.parent.' + self.parent.dict_orders[label] + 'Bool = 1')
|
||||
pos = self.configpage.sliders[self.parent.dict_orders[label]].value() - 1
|
||||
self.parent.label_order = self.parent.label_order[:pos] + label + self.parent.label_order[pos+1:]
|
||||
else:
|
||||
exec ('self.parent.' + self.parent.dict_orders[label] + 'Bool = 0')
|
||||
if (self.parent.dict_orders[label] == 'net'):
|
||||
exec ('self.parent.' + self.parent.dict_orders[label] + 'NonFormat = str(self.configpage.lineedits[self.parent.dict_orders[label]].text())')
|
||||
exec ('settings.set("' + self.parent.dict_orders[label] + 'NonFormat", self.parent.' + self.parent.dict_orders[label] + 'NonFormat)')
|
||||
else:
|
||||
exec ('self.parent.' + self.parent.dict_orders[label] + 'Format = str(self.configpage.lineedits[self.parent.dict_orders[label]].text())')
|
||||
exec ('settings.set("' + self.parent.dict_orders[label] + 'Format", self.parent.' + self.parent.dict_orders[label] + 'Format)')
|
||||
exec ('settings.set("' + self.parent.dict_orders[label] + 'Bool", self.parent.' + self.parent.dict_orders[label] + 'Bool)')
|
||||
if (self.parent.dict_orders[label] == 'bat'):
|
||||
self.parent.battery_device = str(self.configpage.ui.lineEdit_batdev.text())
|
||||
self.parent.ac_device = str(self.configpage.ui.lineEdit_acdev.text())
|
||||
settings.set('battery_device', self.parent.battery_device)
|
||||
settings.set('ac_device', self.parent.ac_device)
|
||||
elif (self.parent.dict_orders[label] == 'temp'):
|
||||
self.parent.tempdev = str(self.configpage.ui.comboBox_temp.currentText())
|
||||
settings.set('temp_device', self.parent.tempdev)
|
||||
|
||||
self.parent.label_order = ''.join(self.parent.label_order.split('-'))
|
||||
settings.set('label_order', self.parent.label_order)
|
||||
|
||||
# reinitializate
|
||||
self.parent.reinit.reinit(confAccept=True)
|
||||
|
||||
|
||||
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])
|
||||
for label in self.parent.dict_orders.keys():
|
||||
exec ('bool = self.parent.' + self.parent.dict_orders[label] + 'Bool')
|
||||
if (bool == 1):
|
||||
self.configpage.checkboxes[self.parent.dict_orders[label]].setCheckState(2)
|
||||
self.configpage.sliders[self.parent.dict_orders[label]].setValue(self.parent.label_order.find(label)+1)
|
||||
else:
|
||||
self.configpage.checkboxes[self.parent.dict_orders[label]].setCheckState(0)
|
||||
if (self.parent.dict_orders[label] == 'net'):
|
||||
self.configpage.lineedits[self.parent.dict_orders[label]].setText(str(settings.get(self.parent.dict_orders[label] + 'NonFormat', self.parent.dict_defFormat[self.parent.dict_orders[label]])))
|
||||
else:
|
||||
self.configpage.lineedits[self.parent.dict_orders[label]].setText(str(settings.get(self.parent.dict_orders[label] + 'Format', self.parent.dict_defFormat[self.parent.dict_orders[label]])))
|
||||
if (self.parent.dict_orders[label] == 'bat'):
|
||||
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')))
|
||||
elif (self.parent.dict_orders[label] == 'temp'):
|
||||
self.configpage.ui.comboBox_temp.addItem(str(settings.get('temp_device', '<select device>')))
|
||||
commandOut = commands.getoutput("sensors")
|
||||
for adapter in commandOut.split("\n\n"):
|
||||
for device in adapter.split("\n"):
|
||||
if (device.find('\xc2\xb0C') > -1):
|
||||
try:
|
||||
tempdev = 'lmsensors/' + adapter.split('\n')[0] + '/' + '_'.join(device.split(":")[0].split())
|
||||
self.configpage.ui.comboBox_temp.addItem(tempdev)
|
||||
except:
|
||||
pass
|
||||
|
||||
# add config page
|
||||
page = parent.addPage(self.configpage, i18n(self.parent.name()))
|
||||
page.setIcon(KIcon(self.parent.icon()))
|
||||
|
||||
parent.okClicked.connect(self.configAccepted)
|
@ -1,104 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyKDE4.plasma import *
|
||||
from PyQt4 import uic
|
||||
from PyKDE4 import plasmascript
|
||||
|
||||
|
||||
|
||||
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.checkboxes = {'bat':self.ui.checkBox_bat, 'cpu':self.ui.checkBox_cpu,
|
||||
'cpuclock':self.ui.checkBox_cpuclock, '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}
|
||||
self.sliders = {'bat':self.ui.slider_bat, 'cpu':self.ui.slider_cpu,
|
||||
'cpuclock':self.ui.slider_cpuclock, '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}
|
||||
self.lineedits = {'bat':self.ui.lineEdit_bat, 'cpu':self.ui.lineEdit_cpu,
|
||||
'cpuclock':self.ui.lineEdit_cpuclock, '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}
|
||||
|
||||
for item in self.checkboxes.values():
|
||||
QObject.connect(item, SIGNAL("stateChanged(int)"), self.setStatus)
|
||||
for item in self.sliders.values():
|
||||
QObject.connect(item, SIGNAL("valueChanged(int)"), self.setSlider)
|
||||
|
||||
|
||||
def setStatus(self):
|
||||
"""function to enable label"""
|
||||
count = self.sliders['bat'].maximum()
|
||||
for label in self.checkboxes.keys():
|
||||
if ((self.checkboxes[label].checkState() == 2) and (self.sliders[label].isEnabled() == False)):
|
||||
self.lineedits[label].setEnabled(True)
|
||||
self.sliders[label].setEnabled(True)
|
||||
if (label == 'bat'):
|
||||
self.ui.lineEdit_acdev.setEnabled(True)
|
||||
self.ui.lineEdit_batdev.setEnabled(True)
|
||||
elif (label == 'temp'):
|
||||
self.ui.comboBox_temp.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)
|
||||
if (label == 'bat'):
|
||||
self.ui.lineEdit_acdev.setDisabled(True)
|
||||
self.ui.lineEdit_batdev.setDisabled(True)
|
||||
elif (label == 'temp'):
|
||||
self.ui.comboBox_temp.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)
|
||||
|
||||
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)
|
@ -1,237 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyKDE4.plasma import Plasma
|
||||
from PyKDE4 import plasmascript
|
||||
|
||||
|
||||
|
||||
class DataEngine:
|
||||
def __init__(self, parent):
|
||||
"""class definition"""
|
||||
self.parent = parent
|
||||
|
||||
|
||||
def connectToEngine(self):
|
||||
"""function to initializate engine"""
|
||||
self.parent.systemmonitor = self.parent.dataEngine("systemmonitor")
|
||||
if ((self.parent.gputempBool == 1) or (self.parent.gpuBool == 1) or (self.parent.hddtempBool == 1)):
|
||||
self.parent.extsysmon = self.parent.dataEngine("ext-sysmon")
|
||||
|
||||
if (self.parent.uptimeBool == 1):
|
||||
self.parent.systemmonitor.connectSource("system/uptime", self.parent, self.parent.interval)
|
||||
if (self.parent.cpuBool == 1):
|
||||
self.parent.systemmonitor.connectSource("cpu/system/TotalLoad", self.parent, self.parent.interval)
|
||||
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
||||
for core in range(self.parent.numCores):
|
||||
self.parent.systemmonitor.connectSource("cpu/cpu"+str(core)+"/TotalLoad", self.parent, self.parent.interval)
|
||||
if (self.parent.cpuclockBool == 1):
|
||||
self.parent.systemmonitor.connectSource("cpu/system/AverageClock", self.parent, self.parent.interval)
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0] != self.parent.cpuclockFormat):
|
||||
for core in range(self.parent.numCores):
|
||||
self.parent.systemmonitor.connectSource("cpu/cpu"+str(core)+"/clock", self.parent, self.parent.interval)
|
||||
if (self.parent.tempBool == 1):
|
||||
self.parent.systemmonitor.connectSource(self.parent.tempdev, self.parent, self.parent.interval)
|
||||
if (self.parent.gpuBool == 1):
|
||||
self.parent.extsysmon.connectSource("gpu", self.parent, self.parent.interval)
|
||||
if (self.parent.gputempBool == 1):
|
||||
self.parent.extsysmon.connectSource("gputemp", self.parent, self.parent.interval)
|
||||
if (self.parent.memBool == 1):
|
||||
if (self.parent.memInMb):
|
||||
self.parent.systemmonitor.connectSource("mem/physical/application", self.parent, self.parent.interval)
|
||||
else:
|
||||
self.parent.systemmonitor.connectSource("mem/physical/free", self.parent, int(self.parent.interval*0.5))
|
||||
self.parent.systemmonitor.connectSource("mem/physical/used", self.parent, int(self.parent.interval*0.5))
|
||||
self.parent.systemmonitor.connectSource("mem/physical/application", self.parent, int(self.parent.interval*0.5))
|
||||
if (self.parent.swapBool == 1):
|
||||
if (self.parent.swapInMb):
|
||||
self.parent.systemmonitor.connectSource("mem/swap/used", self.parent, self.parent.interval)
|
||||
else:
|
||||
self.parent.systemmonitor.connectSource("mem/swap/free", self.parent, int(self.parent.interval*0.5))
|
||||
self.parent.systemmonitor.connectSource("mem/swap/used", self.parent, int(self.parent.interval*0.5))
|
||||
if (self.parent.hddBool == 1):
|
||||
for mount in self.parent.mountPoints:
|
||||
self.parent.systemmonitor.connectSource("partitions" + mount + "/filllevel", self.parent, self.parent.interval)
|
||||
if (self.parent.hddtempBool == 1):
|
||||
self.parent.extsysmon.connectSource("hddtemp", self.parent, self.parent.interval)
|
||||
if (self.parent.netBool == 1):
|
||||
self.parent.updateNetdev = 0
|
||||
self.parent.systemmonitor.connectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent, self.parent.interval)
|
||||
self.parent.systemmonitor.connectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent, self.parent.interval)
|
||||
|
||||
def dataUpdated(self, sourceName, data):
|
||||
"""function to update data"""
|
||||
try:
|
||||
if (sourceName == "system/uptime"):
|
||||
value = int(round(float(data[QString(u'value')]), 1))
|
||||
uptimeText = '%3sd%2sh%2sm' % (str(int(value/(24*60*60))), int(value/60/60)-int(value/24/60/60)*24, (value-value%60)/60%60)
|
||||
if (self.parent.uptimeFormat.split('$uptime')[0] != self.parent.uptimeFormat):
|
||||
line = self.parent.uptimeFormat.split('$uptime')[0] + uptimeText + self.parent.uptimeFormat.split('$uptime')[1]
|
||||
else:
|
||||
line = self.parent.uptimeFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_uptime.setText(text)
|
||||
elif (sourceName == "cpu/system/TotalLoad"):
|
||||
value = str(round(float(data[QString(u'value')]), 1))
|
||||
cpuText = "%5s" % (value)
|
||||
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
||||
if (self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[0]):
|
||||
line = self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] + cpuText + self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[1]
|
||||
else:
|
||||
line = self.parent.cpuFormat.split('$ccpu')[0]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpu0.setText(text)
|
||||
if (self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[1]):
|
||||
line = self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] + cpuText + self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[1]
|
||||
else:
|
||||
line = self.parent.cpuFormat.split('$ccpu')[1]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpu1.setText(text)
|
||||
else:
|
||||
if (self.parent.cpuFormat.split('$cpu')[0] != self.parent.cpuFormat):
|
||||
line = self.parent.cpuFormat.split('$cpu')[0] + cpuText + self.parent.cpuFormat.split('$cpu')[1]
|
||||
else:
|
||||
line = self.parent.cpuFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpu.setText(text)
|
||||
elif ((str(sourceName)[:7] == "cpu/cpu") and (str(sourceName).split('/')[2] == "TotalLoad")):
|
||||
value = str(round(float(data[QString(u'value')]), 1))
|
||||
cpuText = "%5s" % (value)
|
||||
text = self.parent.formatLine.split('$LINE')[0] + cpuText + self.parent.formatLine.split('$LINE')[1]
|
||||
exec ('self.parent.label_coreCpu' + str(sourceName)[7] + '.setText(text)')
|
||||
elif (sourceName == "cpu/system/AverageClock"):
|
||||
value = str(data[QString(u'value')]).split('.')[0]
|
||||
cpuclockText = "%4s" % (value)
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0] != self.parent.cpuclockFormat):
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[0]):
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] + cpuclockText + self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[1]
|
||||
else:
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpuclock0.setText(text)
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[1]):
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] + cpuclockText + self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[1]
|
||||
else:
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[1]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpuclock1.setText(text)
|
||||
else:
|
||||
if (self.parent.cpuclockFormat.split('$cpucl')[0] != self.parent.cpuclockFormat):
|
||||
line = self.parent.cpuclockFormat.split('$cpucl')[0] + cpuclockText + self.parent.cpuclockFormat.split('$cpucl')[1]
|
||||
else:
|
||||
line = self.parent.cpuclockFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpuclock.setText(text)
|
||||
elif ((str(sourceName)[:7] == "cpu/cpu") and (str(sourceName).split('/')[2] == "clock")):
|
||||
value = str(data[QString(u'value')]).split('.')[0]
|
||||
cpuclockText = "%4s" % (value)
|
||||
text = self.parent.formatLine.split('$LINE')[0] + cpuclockText + self.parent.formatLine.split('$LINE')[1]
|
||||
exec ('self.parent.label_coreCpuclock' + str(sourceName)[7] + '.setText(text)')
|
||||
elif (sourceName == "network/interfaces/"+self.parent.netdev+"/transmitter/data"):
|
||||
value = str(data[QString(u'value')]).split('.')[0]
|
||||
up_speed = "%4s" % (value)
|
||||
if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat):
|
||||
line = '/' + up_speed + self.parent.netFormat.split('$net')[1]
|
||||
else:
|
||||
line = ''
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_netUp.setText(text)
|
||||
elif (sourceName == "network/interfaces/"+self.parent.netdev+"/receiver/data"):
|
||||
value = str(data[QString(u'value')]).split('.')[0]
|
||||
down_speed = "%4s" % (value)
|
||||
if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat):
|
||||
line = self.parent.netFormat.split('$net')[0] + down_speed
|
||||
else:
|
||||
line = self.parent.netFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_netDown.setText(text)
|
||||
# update network device
|
||||
self.parent.updateNetdev = self.parent.updateNetdev + 1
|
||||
if (self.parent.updateNetdev == 100):
|
||||
self.parent.updateNetdev = 0
|
||||
if (self.parent.netNonFormat.split('@@')[0] == self.parent.netNonFormat):
|
||||
self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent)
|
||||
self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent)
|
||||
self.parent.netdev = self.parent.setupNetdev()
|
||||
self.parent.systemmonitor.connectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent, self.parent.interval)
|
||||
self.parent.systemmonitor.connectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent, self.parent.interval)
|
||||
if (self.parent.netNonFormat.split('$netdev')[0] != self.parent.netNonFormat):
|
||||
self.parent.netFormat = self.parent.netNonFormat.split('$netdev')[0] + self.parent.netdev + self.parent.netNonFormat.split('$netdev')[1]
|
||||
else:
|
||||
self.parent.netFormat = self.parent.netNonFormat
|
||||
elif (sourceName == self.parent.tempdev):
|
||||
value = str(round(float(data[QString(u'value')]), 1))
|
||||
tempText = "%4s" % (value)
|
||||
if (self.parent.tempFormat.split('$temp')[0] != self.parent.tempFormat):
|
||||
line = self.parent.tempFormat.split('$temp')[0] + tempText + self.parent.tempFormat.split('$temp')[1]
|
||||
else:
|
||||
line = self.parent.tempFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_temp.setText(text)
|
||||
elif (str(sourceName).split('/')[0] == "partitions"):
|
||||
value = str(round(float(data[QString(u'value')]), 1))
|
||||
hddText = "%5s" % (value)
|
||||
text = self.parent.formatLine.split('$LINE')[0] + hddText + self.parent.formatLine.split('$LINE')[1]
|
||||
exec ('self.parent.label_hdd_' + ''.join(str(sourceName).split('/')[1:-1]) + '.setText(text)')
|
||||
elif (sourceName == "mem/physical/free"):
|
||||
self.parent.mem_free = float(data[QString(u'value')])
|
||||
elif (sourceName == "mem/physical/used"):
|
||||
self.parent.mem_uf = float(data[QString(u'value')])
|
||||
elif (sourceName == "mem/physical/application"):
|
||||
if (self.parent.memInMb):
|
||||
mem = str(round(float(data[QString(u'value')]) / 1024, 0)).split('.')[0]
|
||||
mem = "%5s" % (mem)
|
||||
if (self.parent.memFormat.split('$memmb')[0] != self.parent.memFormat):
|
||||
line = self.parent.memFormat.split('$memmb')[0] + mem + self.parent.memFormat.split('$memmb')[1]
|
||||
else:
|
||||
line = self.parent.memFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_mem.setText(text)
|
||||
else:
|
||||
self.parent.mem_used = float(data[QString(u'value')])
|
||||
elif (sourceName == "mem/swap/free"):
|
||||
self.parent.swap_free = float(data[QString(u'value')])
|
||||
elif (sourceName == "mem/swap/used"):
|
||||
if (self.parent.swapInMb):
|
||||
mem = str(round(float(data[QString(u'value')]) / 1024, 0)).split('.')[0]
|
||||
mem = "%5s" % (mem)
|
||||
if (self.parent.swapFormat.split('$swapmb')[0] != self.parent.swapFormat):
|
||||
line = self.parent.swapFormat.split('$swapmb')[0] + mem + self.parent.swapFormat.split('$swapmb')[1]
|
||||
else:
|
||||
line = self.parent.swapFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_swap.setText(text)
|
||||
else:
|
||||
self.parent.swap_used = float(data[QString(u'value')])
|
||||
elif (sourceName == "gpu"):
|
||||
value = str(data[QString(u'GPU')])
|
||||
gpuText = "%4s" % (value)
|
||||
if (self.parent.gpuFormat.split('$gpu')[0] != self.parent.gpuFormat):
|
||||
line = self.parent.gpuFormat.split('$gpu')[0] + gpuText + self.parent.gpuFormat.split('$gpu')[1]
|
||||
else:
|
||||
line = self.parent.gpuFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_gpu.setText(text)
|
||||
elif (sourceName == "gputemp"):
|
||||
value = str(data[QString(u'GPUTemp')])
|
||||
gputempText = "%4s" % (value)
|
||||
if (self.parent.gputempFormat.split('$gputemp')[0] != self.parent.gputempFormat):
|
||||
line = self.parent.gputempFormat.split('$gputemp')[0] + gputempText + self.parent.gputempFormat.split('$gputemp')[1]
|
||||
else:
|
||||
line = self.parent.gputempFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_gputemp.setText(text)
|
||||
elif (sourceName == "hddtemp"):
|
||||
value = str(data[QString(self.parent.hddtempFormat.split('@@')[1])])
|
||||
hddtempText = "%4s" % (value)
|
||||
if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat):
|
||||
line = self.parent.hddtempFormat.split('@@')[0] + hddtempText + self.parent.hddtempFormat.split('@@')[2]
|
||||
else:
|
||||
line = self.parent.hddtempFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_hddtemp.setText(text)
|
||||
|
||||
self.parent.update()
|
||||
except:
|
||||
pass
|
@ -1,189 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
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, time
|
||||
|
||||
import configdef
|
||||
import configwindow
|
||||
import dataengine
|
||||
import reinit
|
||||
from util import *
|
||||
|
||||
|
||||
|
||||
class pyTextWidget(plasmascript.Applet):
|
||||
def __init__(self, parent, args=None):
|
||||
"""widget definition"""
|
||||
plasmascript.Applet.__init__(self, parent)
|
||||
|
||||
|
||||
def init(self):
|
||||
"""function to initializate widget"""
|
||||
self._name = str(self.package().metadata().pluginName())
|
||||
self.initTooltip()
|
||||
self.layout = QGraphicsLinearLayout(Qt.Horizontal, self.applet)
|
||||
|
||||
self.dataengine = dataengine.DataEngine(self)
|
||||
self.reinit = reinit.Reinit(self)
|
||||
|
||||
self.timer = QTimer()
|
||||
QObject.connect(self.timer, SIGNAL("timeout()"), self.updateLabel)
|
||||
|
||||
self.setupVar()
|
||||
self.reinit.reinit(confAccept=False)
|
||||
|
||||
self.setHasConfigurationInterface(True)
|
||||
|
||||
|
||||
def createConfigurationInterface(self, parent):
|
||||
"""function to setup configuration window"""
|
||||
self.configpage = configwindow.ConfigWindow(self)
|
||||
self.configdef = configdef.ConfigDefinition(self, self.configpage)
|
||||
self.configdef.createConfigurationInterface(parent)
|
||||
|
||||
|
||||
def initTooltip(self):
|
||||
"""function to create tooltip"""
|
||||
self.tooltip = Plasma.ToolTipContent()
|
||||
self.tooltip.setMainText("PyTextMonitor")
|
||||
self.tooltip.setSubText('')
|
||||
Plasma.ToolTipManager.self().registerWidget(self.applet)
|
||||
# show tooltip
|
||||
#Plasma.ToolTipManager.self().setContent(self.applet, self.tooltip)
|
||||
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
"""function to doubleclick event"""
|
||||
os.system("ksysguard &")
|
||||
|
||||
|
||||
def setupNetdev(self):
|
||||
"""function to setup network device"""
|
||||
netdev = "lo"
|
||||
try:
|
||||
interfaces = []
|
||||
for line in commands.getoutput("ifconfig -a -s").split("\n"):
|
||||
if ((line.split()[0] != 'Iface') and (line.split()[0] != 'lo')):
|
||||
interfaces.append(line.split()[0])
|
||||
|
||||
for device in interfaces:
|
||||
if (commands.getoutput("ifconfig " + device + " | grep 'inet '") != ''):
|
||||
netdev = device
|
||||
break
|
||||
except:
|
||||
pass
|
||||
return netdev
|
||||
|
||||
|
||||
def setupVar(self):
|
||||
"""function to setup variables"""
|
||||
self.netdev = ''
|
||||
# setup number of cores
|
||||
commandOut = commands.getoutput("grep -c '^processor' /proc/cpuinfo")
|
||||
self.numCores = int(commandOut)
|
||||
|
||||
# create dictionaries
|
||||
self.dict_orders = {'6':'bat', '1':'cpu', '7':'cpuclock', '9':'gpu', 'a':'gputemp',
|
||||
'b':'hdd', 'c':'hddtemp', '3':'mem', '5':'net', '4':'swap', '2':'temp', '8':'uptime'}
|
||||
self.dict_defFormat = {'bat':'[bat: $bat%$ac]', 'cpu':'[cpu: $cpu%]',
|
||||
'cpuclock':'[mhz: $cpucl]', 'gpu':'[gpu: $gpu%]',
|
||||
'gputemp':'[gpu temp: $gputemp°C]', 'hdd':'[hdd: @@/@@%]',
|
||||
'hddtemp':'[hdd temp: @@/dev/sda@@°C]', 'mem':'[mem: $mem%]',
|
||||
'net':'[$netdev: $netKB/s]', 'swap':'[swap: $swap%]',
|
||||
'temp':'[temp: $temp°C]', 'uptime':'[uptime: $uptime]'}
|
||||
|
||||
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))
|
||||
self.label_error = Plasma.Label(self.applet)
|
||||
self.label_error.setText('<font color="red">ERROR</font>')
|
||||
self.layout.addItem(self.label_error)
|
||||
return
|
||||
|
||||
def updateLabel(self):
|
||||
"""function to update label"""
|
||||
if ((self.memBool == 1) and (self.memInMb == False)):
|
||||
self.memText()
|
||||
if ((self.swapBool == 1) and (self.swapInMb == False)):
|
||||
self.swapText()
|
||||
if (self.batBool == 1):
|
||||
self.batText()
|
||||
|
||||
|
||||
def batText(self):
|
||||
"""function to set battery text"""
|
||||
line = self.batFormat
|
||||
if (line.split('$bat')[0] != line):
|
||||
try:
|
||||
with open (self.battery_device, 'r') as bat_file:
|
||||
bat = bat_file.readline().split('\n')[0]
|
||||
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.ac_device, 'r') as bat_file:
|
||||
bat = bat_file.readline().split('\n')[0]
|
||||
if (bat == '1'):
|
||||
bat = '(*)'
|
||||
else:
|
||||
bat = '( )'
|
||||
except:
|
||||
bat = '(?)'
|
||||
line = line.split('$ac')[0] + bat + line.split('$ac')[1]
|
||||
text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1]
|
||||
self.label_bat.setText(text)
|
||||
|
||||
|
||||
def memText(self):
|
||||
"""function to set mem text"""
|
||||
full = self.mem_uf + self.mem_free
|
||||
mem = 100 * self.mem_used / full
|
||||
mem = "%5s" % (str(round(mem, 1)))
|
||||
if (self.memFormat.split('$mem')[0] != self.memFormat):
|
||||
line = self.memFormat.split('$mem')[0] + mem + self.memFormat.split('$mem')[1]
|
||||
else:
|
||||
line = self.memFormat
|
||||
text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1]
|
||||
self.label_mem.setText(text)
|
||||
|
||||
|
||||
def swapText(self):
|
||||
"""function to set swap text"""
|
||||
full = self.swap_used + self.swap_free
|
||||
mem = 100 * self.swap_used / full
|
||||
mem = "%5s" % (str(round(mem, 1)))
|
||||
if (self.swapFormat.split('$swap')[0] != self.swapFormat):
|
||||
line = self.swapFormat.split('$swap')[0] + mem + self.swapFormat.split('$swap')[1]
|
||||
else:
|
||||
line = self.swapFormat
|
||||
text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1]
|
||||
self.label_swap.setText(text)
|
||||
|
||||
|
||||
@pyqtSignature("dataUpdated(const QString &, const Plasma::DataEngine::Data &)")
|
||||
def dataUpdated(self, sourceName, data):
|
||||
"""function to update label"""
|
||||
self.dataengine.dataUpdated(sourceName, data)
|
||||
|
||||
|
||||
|
||||
def CreateApplet(parent):
|
||||
return pyTextWidget(parent)
|
@ -1,285 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyKDE4.plasma import Plasma
|
||||
import config
|
||||
|
||||
|
||||
|
||||
class Reinit():
|
||||
def __init__(self, parent):
|
||||
"""class definition"""
|
||||
self.parent = parent
|
||||
|
||||
def reinit(self, confAccept=False):
|
||||
"""function to reinitializate widget"""
|
||||
settings = config.Config(self.parent)
|
||||
self.parent.interval = settings.get('interval', 2000).toInt()[0]
|
||||
self.parent.font_family = str(settings.get('font_family', 'Terminus'))
|
||||
self.parent.font_size = settings.get('font_size', 12).toInt()[0]
|
||||
self.parent.font_color = str(settings.get('font_color', '#000000'))
|
||||
self.parent.font_style = str(settings.get('font_style', 'normal'))
|
||||
self.parent.font_weight = settings.get('font_weight', 400).toInt()[0]
|
||||
self.parent.formatLine = "<pre><p align=\"center\"><span style=\" font-family:'" + self.parent.font_family + "'; font-style:" + self.parent.font_style
|
||||
self.parent.formatLine = self.parent.formatLine + "; font-size:" + str(self.parent.font_size) + "pt; font-weight:" + str(self.parent.font_weight)
|
||||
self.parent.formatLine = self.parent.formatLine + "; color:" + self.parent.font_color + ";\">$LINE</span></p></pre>"
|
||||
self.parent.label_order = str(settings.get('label_order', '1345'))
|
||||
for label in self.parent.dict_orders.values():
|
||||
if ((label == 'cpu') or (label == 'mem') or (label == 'swap') or (label == 'net')):
|
||||
exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 1))')
|
||||
else:
|
||||
exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 0))')
|
||||
# small function for update if errors exist
|
||||
summ = 0
|
||||
for label in self.parent.dict_orders.values():
|
||||
exec ('summ += self.parent.' + label + 'Bool')
|
||||
if (len(self.parent.label_order) != summ):
|
||||
for label in self.parent.dict_orders.values():
|
||||
if ((label == 'cpu') or (label == 'mem') or (label == 'swap') or (label == 'net')):
|
||||
exec ('self.parent.' + label + 'Bool = 1')
|
||||
else:
|
||||
exec ('self.parent.' + label + 'Bool = 0')
|
||||
exec ('settings.set("' + label + 'Bool", self.parent.' + label + 'Bool)')
|
||||
self.parent.label_order = '1345'
|
||||
settings.set('label_order', self.parent.label_order)
|
||||
|
||||
for order in self.parent.label_order:
|
||||
if (order == "1"):
|
||||
if (self.parent.cpuBool == 1):
|
||||
self.parent.cpuFormat = str(settings.get('cpuFormat', '[cpu: $cpu%]'))
|
||||
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
||||
self.parent.label_cpu0 = Plasma.Label(self.parent.applet)
|
||||
self.parent.label_cpu1 = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[0]):
|
||||
line = self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[1]
|
||||
else:
|
||||
line = self.parent.cpuFormat.split('$ccpu')[0]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpu0.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_cpu0)
|
||||
text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1]
|
||||
for core in range(self.parent.numCores):
|
||||
exec ('self.parent.label_coreCpu' + str(core) + ' = Plasma.Label(self.parent.applet)')
|
||||
exec ('self.parent.label_coreCpu' + str(core) + '.setText(text)')
|
||||
exec ('self.parent.layout.addItem(self.parent.label_coreCpu' + str(core) + ')')
|
||||
if (self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[1]):
|
||||
line = self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[1]
|
||||
else:
|
||||
line = self.parent.cpuFormat.split('$ccpu')[1]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpu1.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_cpu1)
|
||||
else:
|
||||
self.parent.label_cpu = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.cpuFormat.split('$cpu')[0] != self.parent.cpuFormat):
|
||||
line = self.parent.cpuFormat.split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$cpu')[1]
|
||||
else:
|
||||
line = self.parent.cpuFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpu.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_cpu)
|
||||
elif (order == "2"):
|
||||
if (self.parent.tempBool == 1):
|
||||
self.parent.tempdev = str(settings.get('temp_device', '<select device>'))
|
||||
self.parent.tempFormat = str(settings.get('tempFormat', '[temp: $temp°C]'))
|
||||
self.parent.label_temp = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.tempFormat.split('$temp')[0] != self.parent.tempFormat):
|
||||
line = self.parent.tempFormat.split('$temp')[0] + '----' + self.parent.tempFormat.split('$temp')[1]
|
||||
else:
|
||||
line = self.parent.tempFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_temp.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_temp)
|
||||
elif (order == "3"):
|
||||
if (self.parent.memBool == 1):
|
||||
self.parent.memFormat = str(settings.get('memFormat', '[mem: $mem%]'))
|
||||
if (self.parent.memFormat.split('$memmb')[0] != self.parent.memFormat):
|
||||
self.parent.memInMb = True
|
||||
text = self.parent.formatLine.split('$LINE')[0] + self.parent.memFormat.split('$memmb')[0] + '-----' + self.parent.memFormat.split('$memmb')[1] + self.parent.formatLine.split('$LINE')[1]
|
||||
elif (self.parent.memFormat.split('$mem')[0] != self.parent.memFormat):
|
||||
self.parent.memInMb = False
|
||||
self.parent.mem_used = 0.0
|
||||
self.parent.mem_free = 1.0
|
||||
self.parent.mem_uf = 0.0
|
||||
line = self.parent.memFormat.split('$mem')[0] + '-----' + self.parent.memFormat.split('$mem')[1]
|
||||
else:
|
||||
line = self.parent.memFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_mem = Plasma.Label(self.parent.applet)
|
||||
self.parent.label_mem.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_mem)
|
||||
elif (order == "4"):
|
||||
if (self.parent.swapBool == 1):
|
||||
self.parent.swapFormat = str(settings.get('swapFormat', '[swap: $swap%]'))
|
||||
if (self.parent.swapFormat.split('$swapmb')[0] != self.parent.swapFormat):
|
||||
self.parent.swapInMb = True
|
||||
text = self.parent.formatLine.split('$LINE')[0] + self.parent.swapFormat.split('$swapmb')[0] + '-----' + self.parent.swapFormat.split('$swapmb')[1] + self.parent.formatLine.split('$LINE')[1]
|
||||
elif (self.parent.swapFormat.split('$swap')[0] != self.parent.swapFormat):
|
||||
self.parent.swapInMb = False
|
||||
self.parent.swap_free = 1.0
|
||||
self.parent.swap_used = 0.0
|
||||
line = self.parent.swapFormat.split('$swap')[0] + '-----' + self.parent.swapFormat.split('$swap')[1]
|
||||
else:
|
||||
line = self.parent.swapFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_swap = Plasma.Label(self.parent.applet)
|
||||
self.parent.label_swap.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_swap)
|
||||
elif (order == "5"):
|
||||
if (self.parent.netBool == 1):
|
||||
self.parent.netNonFormat = str(settings.get('netNonFormat', '[net: $netKB/s]'))
|
||||
if (self.parent.netNonFormat.split('@@')[0] != self.parent.netNonFormat):
|
||||
self.parent.netdev = self.parent.netNonFormat.split('@@')[1]
|
||||
self.parent.netNonFormat = self.parent.netNonFormat.split('@@')[0] + self.parent.netNonFormat.split('@@')[2]
|
||||
else:
|
||||
self.parent.netdev = self.parent.setupNetdev()
|
||||
if (self.parent.netNonFormat.split('$netdev')[0] != self.parent.netNonFormat):
|
||||
self.parent.netFormat = self.parent.netNonFormat.split('$netdev')[0] + self.parent.netdev + self.parent.netNonFormat.split('$netdev')[1]
|
||||
else:
|
||||
self.parent.netFormat = self.parent.netNonFormat
|
||||
self.parent.label_netDown = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat):
|
||||
line = self.parent.netFormat.split('$net')[0] + '----'
|
||||
else:
|
||||
line = self.parent.netFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_netDown.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_netDown)
|
||||
self.parent.label_netUp = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat):
|
||||
line = '/----' + self.parent.netFormat.split('$net')[1]
|
||||
else:
|
||||
line = ''
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_netUp.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_netUp)
|
||||
elif (order == "6"):
|
||||
if (self.parent.batBool == 1):
|
||||
self.parent.batFormat = str(settings.get('batFormat', '[bat: $bat%$ac]'))
|
||||
self.parent.battery_device= str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity'))
|
||||
self.parent.ac_device = str(settings.get('ac_device', '/sys/class/power_supply/AC/online'))
|
||||
self.parent.label_bat = Plasma.Label(self.parent.applet)
|
||||
line = self.parent.batFormat
|
||||
if (line.split('$ac')[0] != line):
|
||||
line = line.split('$ac')[0] + '(-)' + line.split('$ac')[1]
|
||||
if (line.split('$bat')[0] != line):
|
||||
line = line.split('$bat')[0] + '---' + line.split('$bat')[1]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_bat.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_bat)
|
||||
elif (order == "7"):
|
||||
if (self.parent.cpuclockBool == 1):
|
||||
self.parent.cpuclockFormat = str(settings.get('cpuclockFormat', '[mhz: $cpucl]'))
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0] != self.parent.cpuclockFormat):
|
||||
self.parent.label_cpuclock0 = Plasma.Label(self.parent.applet)
|
||||
self.parent.label_cpuclock1 = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[0]):
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[1]
|
||||
else:
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpuclock0.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_cpuclock0)
|
||||
text = self.parent.formatLine.split('$LINE')[0] + "----" + self.parent.formatLine.split('$LINE')[1]
|
||||
for core in range(self.parent.numCores):
|
||||
exec ('self.parent.label_coreCpuclock' + str(core) + ' = Plasma.Label(self.parent.applet)')
|
||||
exec ('self.parent.label_coreCpuclock' + str(core) + '.setText(text)')
|
||||
exec ('self.parent.layout.addItem(self.parent.label_coreCpuclock' + str(core) + ')')
|
||||
if (self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[1]):
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[1]
|
||||
else:
|
||||
line = self.parent.cpuclockFormat.split('$ccpucl')[1]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpuclock1.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_cpuclock1)
|
||||
else:
|
||||
self.parent.label_cpuclock = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.cpuclockFormat.split('$cpucl')[0] != self.parent.cpuclockFormat):
|
||||
line = self.parent.cpuclockFormat.split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$cpucl')[1]
|
||||
else:
|
||||
line = self.parent.cpuclockFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_cpuclock.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_cpuclock)
|
||||
elif (order == "8"):
|
||||
if (self.parent.uptimeBool == 1):
|
||||
self.parent.uptimeFormat = str(settings.get('uptimeFormat', '[uptime: $uptime]'))
|
||||
self.parent.label_uptime = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.uptimeFormat.split('$uptime')[0] != self.parent.uptimeFormat):
|
||||
line = self.parent.uptimeFormat.split('$uptime')[0] + '---d--h--m' + self.parent.uptimeFormat.split('$uptime')[1]
|
||||
else:
|
||||
line = self.parent.uptimeFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_uptime.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_uptime)
|
||||
elif (order == "9"):
|
||||
if (self.parent.gpuBool == 1):
|
||||
self.parent.gpuFormat = str(settings.get('gpuFormat', '[gpu: $gpu%]'))
|
||||
self.parent.label_gpu = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.gpuFormat.split('$gpu')[0] != self.parent.gpuFormat):
|
||||
line = self.parent.gpuFormat.split('$gpu')[0] + '-----' + self.parent.gpuFormat.split('$gpu')[1]
|
||||
else:
|
||||
line = self.parent.gpuFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_gpu.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_gpu)
|
||||
elif (order == "a"):
|
||||
if (self.parent.gputempBool == 1):
|
||||
self.parent.gputempFormat = str(settings.get('gputempFormat', '[gpu temp: $gputemp°C]'))
|
||||
self.parent.label_gputemp = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.gputempFormat.split('$gputemp')[0] != self.parent.gputempFormat):
|
||||
line = self.parent.gputempFormat.split('$gputemp')[0] + '----' + self.parent.gputempFormat.split('$gputemp')[1]
|
||||
else:
|
||||
line = self.parent.gputempFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_gputemp.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_gputemp)
|
||||
elif (order == "b"):
|
||||
if (self.parent.hddBool == 1):
|
||||
self.parent.hddFormat = str(settings.get('hddFormat', '[hdd: @@/@@%]'))
|
||||
if (self.parent.hddFormat.split('@@')[0] != self.parent.hddFormat):
|
||||
self.parent.mountPoints = self.parent.hddFormat.split('@@')[1].split(';')
|
||||
line = self.parent.hddFormat.split('@@')[0]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_hdd0 = Plasma.Label(self.parent.applet)
|
||||
self.parent.label_hdd0.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_hdd0)
|
||||
text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1]
|
||||
for mount in self.parent.mountPoints:
|
||||
exec ('self.parent.label_hdd_' + ''.join(mount.split('/')) + ' = Plasma.Label(self.parent.applet)')
|
||||
exec ('self.parent.label_hdd_' + ''.join(mount.split('/')) + '.setText(text)')
|
||||
exec ('self.parent.layout.addItem(self.parent.label_hdd_' + ''.join(mount.split('/')) + ')')
|
||||
line = self.parent.hddFormat.split('@@')[2]
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_hdd1 = Plasma.Label(self.parent.applet)
|
||||
self.parent.label_hdd1.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_hdd1)
|
||||
else:
|
||||
line = self.parent.hddFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_hdd0.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_hdd0)
|
||||
elif (order == "c"):
|
||||
if (self.parent.hddtempBool == 1):
|
||||
self.parent.hddtempFormat = str(settings.get('hddtempFormat', '[hdd temp: @@/dev/sda@@°C]'))
|
||||
self.parent.label_hddtemp = Plasma.Label(self.parent.applet)
|
||||
if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat):
|
||||
line = self.parent.hddtempFormat.split('@@')[0] + '----' + self.parent.hddtempFormat.split('@@')[2]
|
||||
else:
|
||||
line = self.parent.hddtempFormat
|
||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||
self.parent.label_hddtemp.setText(text)
|
||||
self.parent.layout.addItem(self.parent.label_hddtemp)
|
||||
if not confAccept:
|
||||
self.parent.applet.setLayout(self.parent.layout)
|
||||
self.parent.theme = Plasma.Svg(self.parent)
|
||||
self.parent.theme.setImagePath("widgets/background")
|
||||
self.parent.setBackgroundHints(Plasma.Applet.DefaultBackground)
|
||||
self.parent.resize(10,10)
|
||||
|
||||
# create dataengines
|
||||
self.parent.thread().wait(60000)
|
||||
self.parent.dataengine.connectToEngine()
|
||||
|
||||
self.parent.timer.setInterval(self.parent.interval)
|
||||
self.parent.startPolling()
|
@ -1,40 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
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)
|
36
sources/desktop-panel/CMakeLists.txt
Normal 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})
|
653
sources/desktop-panel/appearance.ui
Normal file
@ -0,0 +1,653 @@
|
||||
<?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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontActive">
|
||||
<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="QFontComboBox" name="fontComboBox_fontActive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_fontSizeActive">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_fontSizeActive">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontSizeActive">
|
||||
<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="QSpinBox" name="spinBox_fontSizeActive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontColorActive">
|
||||
<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="KColorCombo" name="kcolorcombo_fontColorActive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_fontWeightActive">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_fontWeightActive">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font weight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontWeightActive">
|
||||
<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="QSpinBox" name="spinBox_fontWeightActive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontStyleActive">
|
||||
<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="QComboBox" name="comboBox_fontStyleActive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<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>406</width>
|
||||
<height>167</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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontInactive">
|
||||
<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="QFontComboBox" name="fontComboBox_fontInactive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_fontSizeInactive">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_fontSizeInactive">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontSizeInactive">
|
||||
<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="QSpinBox" name="spinBox_fontSizeInactive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontColorInactive">
|
||||
<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="KColorCombo" name="kcolorcombo_fontColorInactive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_fontWeightInactive">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_fontWeightInactive">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font weight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontWeightInactive">
|
||||
<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="QSpinBox" name="spinBox_fontWeightInactive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_fontStyleInactive">
|
||||
<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="QComboBox" name="comboBox_fontStyleInactive">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<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>
|
524
sources/desktop-panel/desktop-panel.cpp
Normal file
@ -0,0 +1,524 @@
|
||||
/***************************************************************************
|
||||
* 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 <QDebug>
|
||||
#include <QFile>
|
||||
#include <QGraphicsGridLayout>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QTextCodec>
|
||||
|
||||
#include <fontdialog/fontdialog.h>
|
||||
#include <pdebug/pdebug.h>
|
||||
|
||||
|
||||
CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const bool debugCmd)
|
||||
: Plasma::Label(wid),
|
||||
debug(debugCmd),
|
||||
number(num),
|
||||
widget(wid)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Init label" << number;
|
||||
}
|
||||
|
||||
|
||||
CustomPlasmaLabel::~CustomPlasmaLabel()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int CustomPlasmaLabel::getNumber()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
return number;
|
||||
}
|
||||
|
||||
|
||||
void CustomPlasmaLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
|
||||
|
||||
if (event->button() == Qt::LeftButton)
|
||||
widget->setCurrentDesktop(number);
|
||||
}
|
||||
|
||||
|
||||
|
||||
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()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void DesktopPanel::init()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
extsysmonEngine = dataEngine(QString("ext-sysmon"));
|
||||
|
||||
layout = new QGraphicsGridLayout();
|
||||
layout->setContentsMargins(1, 1, 1, 1);
|
||||
setLayout(layout);
|
||||
|
||||
currentDesktop = 1;
|
||||
|
||||
// read variables
|
||||
configChanged();
|
||||
connect(this, SIGNAL(activate()), this, SLOT(changePanelsState()));
|
||||
}
|
||||
|
||||
|
||||
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 (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;
|
||||
if (desktopNames.isEmpty()) return;
|
||||
|
||||
// clear
|
||||
// labels
|
||||
for (int i=0; i<labels.count(); i++) {
|
||||
layout->removeItem(labels[i]);
|
||||
delete labels[i];
|
||||
}
|
||||
labels.clear();
|
||||
// layout
|
||||
layout = new QGraphicsGridLayout();
|
||||
layout->setContentsMargins(1, 1, 1, 1);
|
||||
setLayout(layout);
|
||||
|
||||
// add
|
||||
// layout
|
||||
if (configuration[QString("background")].toInt() == 0)
|
||||
setBackgroundHints(NoBackground);
|
||||
// labels
|
||||
for (int i=0; i<desktopNames.count(); i++) {
|
||||
labels.append(new CustomPlasmaLabel(this, i));
|
||||
labels[i]->setWordWrap(false);
|
||||
labels[i]->setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
if (configuration[QString("layout")].toInt() == 0)
|
||||
layout->addItem(labels[i], 0, i);
|
||||
else
|
||||
layout->addItem(labels[i], i, 0);
|
||||
}
|
||||
|
||||
updateText(true);
|
||||
}
|
||||
|
||||
|
||||
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::setCurrentDesktop(const int number)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Set desktop" << number + 1;
|
||||
|
||||
QString cmd = parsePattern(configuration[QString("desktopcmd")], number);
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Run cmd " << cmd;
|
||||
|
||||
QProcess command;
|
||||
command.startDetached(cmd);
|
||||
}
|
||||
|
||||
|
||||
void DesktopPanel::updateText(const bool first)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QString line, text;
|
||||
for (int i=0; i<labels.count(); i++) {
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Label" << i;
|
||||
if (first)
|
||||
line = configuration[QString("pattern")];
|
||||
else
|
||||
line = parsePattern(configuration[QString("pattern")], i);
|
||||
if (currentDesktop == i + 1)
|
||||
text = currentFormatLine[0] + line + currentFormatLine[1];
|
||||
else
|
||||
text = formatLine[0] + line + formatLine[1];
|
||||
labels[i]->setText(text);
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
// data engine interaction
|
||||
void DesktopPanel::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Source name" << sourceName;
|
||||
|
||||
if (data.keys().count() == 0)
|
||||
return;
|
||||
if (sourceName == QString("desktop")) {
|
||||
currentDesktop = data[QString("currentNumber")].toInt();
|
||||
if (desktopNames.isEmpty()) {
|
||||
desktopNames = data[QString("list")].toString().split(QString(";;"));
|
||||
reinit();
|
||||
}
|
||||
updateText();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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("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.spinBox_interval->setValue(configuration[QString("interval")].toInt());
|
||||
uiWidConfig.comboBox_mark->setItemText(uiWidConfig.comboBox_mark->count()-1, configuration[QString("mark")]);
|
||||
uiWidConfig.comboBox_mark->setCurrentIndex(uiWidConfig.comboBox_mark->count()-1);
|
||||
uiWidConfig.lineEdit_desktopcmd->setText(configuration[QString("desktopcmd")]);
|
||||
|
||||
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;
|
||||
|
||||
extsysmonEngine->disconnectSource(QString("desktop"), this);
|
||||
KConfigGroup cg = config();
|
||||
|
||||
cg.writeEntry("pattern", uiWidConfig.textEdit_elements->toPlainText());
|
||||
cg.writeEntry("background", QString::number(uiWidConfig.checkBox_background->checkState()));
|
||||
cg.writeEntry("layout", QString::number(uiWidConfig.checkBox_layout->checkState()));
|
||||
cg.writeEntry("interval", QString::number(uiWidConfig.spinBox_interval->value()));
|
||||
cg.writeEntry("mark", uiWidConfig.comboBox_mark->currentText());
|
||||
cg.writeEntry("desktopcmd", uiWidConfig.lineEdit_desktopcmd->text());
|
||||
|
||||
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("background")] = cg.readEntry("background", "2");
|
||||
configuration[QString("desktopcmd")] = cg.readEntry("desktopcmd", "qdbus org.kde.kwin /KWin setCurrentDesktop $number");
|
||||
configuration[QString("interval")] = cg.readEntry("interval", "1000");
|
||||
configuration[QString("layout")] = cg.readEntry("layout", "0");
|
||||
configuration[QString("mark")] = cg.readEntry("mark", "¤");
|
||||
configuration[QString("panels")] = cg.readEntry("panels", "-1");
|
||||
|
||||
extsysmonEngine->connectSource(QString("desktop"), this, configuration[QString("interval")].toInt());
|
||||
|
||||
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"
|
111
sources/desktop-panel/desktop-panel.h
Normal file
@ -0,0 +1,111 @@
|
||||
/***************************************************************************
|
||||
* 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/DataEngine>
|
||||
#include <Plasma/Label>
|
||||
|
||||
#include <ui_appearance.h>
|
||||
#include <ui_toggle.h>
|
||||
#include <ui_widget.h>
|
||||
|
||||
|
||||
class QGraphicsGridLayout;
|
||||
class DesktopPanel;
|
||||
|
||||
|
||||
class CustomPlasmaLabel : public Plasma::Label
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CustomPlasmaLabel(DesktopPanel *wid, const int num,
|
||||
const bool debugCmd = false);
|
||||
~CustomPlasmaLabel();
|
||||
int getNumber();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
|
||||
private:
|
||||
// debug
|
||||
bool debug;
|
||||
// variables
|
||||
int number;
|
||||
DesktopPanel *widget;
|
||||
};
|
||||
|
||||
|
||||
class DesktopPanel : public Plasma::Applet
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DesktopPanel(QObject *parent, const QVariantList &args);
|
||||
~DesktopPanel();
|
||||
void init();
|
||||
QString parsePattern(const QString rawLine, const int num);
|
||||
|
||||
public slots:
|
||||
// dataengine
|
||||
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
|
||||
// configuration interface
|
||||
void configAccepted();
|
||||
void configChanged();
|
||||
// events
|
||||
void changePanelsState();
|
||||
void setCurrentDesktop(const int number);
|
||||
|
||||
private slots:
|
||||
void reinit();
|
||||
void setFontFormating();
|
||||
void setFormating();
|
||||
|
||||
protected:
|
||||
void createConfigurationInterface(KConfigDialog *parent);
|
||||
|
||||
private:
|
||||
// functions
|
||||
QList<Plasma::Containment *> getPanels();
|
||||
QString panelLocationToStr(Plasma::Location loc);
|
||||
void updateText(const bool first = false);
|
||||
// ui
|
||||
QGraphicsGridLayout *layout;
|
||||
QList<CustomPlasmaLabel *> labels;
|
||||
// debug
|
||||
bool debug;
|
||||
// data engine
|
||||
int currentDesktop;
|
||||
int oldState;
|
||||
Plasma::DataEngine *extsysmonEngine;
|
||||
// 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 */
|
25
sources/desktop-panel/plasma-applet-desktoppanel.desktop
Normal 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
|
24
sources/desktop-panel/po/CMakeLists.txt
Normal 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})
|
173
sources/desktop-panel/po/en.po
Normal file
@ -0,0 +1,173 @@
|
||||
# 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-09-15 10:02+0400\n"
|
||||
"PO-Revision-Date: 2014-09-15 10:02+0400\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr "Top Edge"
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr "Bottom Edge"
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr "Left Edge"
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr "Right Edge"
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr "Unknown Position (%1)"
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "Appearance"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr "Toggle panels"
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
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 "Time interval"
|
||||
msgstr "Time interval"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr "Enable background"
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr "Mark"
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
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:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "Vertical layout"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr "Command to change desktop"
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr "Command which will change the current desktop"
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr "Add"
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Evgeniy Alekseev"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "esalexeev@gmail.com"
|
||||
|
||||
#~ 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"
|
147
sources/desktop-panel/po/es.po
Normal file
@ -0,0 +1,147 @@
|
||||
# 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-09-15 10:02+0400\n"
|
||||
"PO-Revision-Date: 2014-06-05 10:21+0400\n"
|
||||
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
|
||||
"Language-Team: Spanish <kde-spanish@lists.kde.ru>\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "Apariencia"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
msgid "Font"
|
||||
msgstr "Fuente"
|
||||
|
||||
#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27
|
||||
msgid "Font size"
|
||||
msgstr "Tamaño de fuente"
|
||||
|
||||
#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30
|
||||
msgid "Font color"
|
||||
msgstr "Color de fuente"
|
||||
|
||||
#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33
|
||||
msgid "Font weight"
|
||||
msgstr "Grosor de la fuente"
|
||||
|
||||
#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36
|
||||
msgid "Font style"
|
||||
msgstr "Estilo de fuente"
|
||||
|
||||
#: 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 "Time interval"
|
||||
msgstr "Intervalo de tiempo"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "Orientación vertical"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Tu nombre"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "Tus correos"
|
||||
|
||||
#~ 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"
|
40
sources/desktop-panel/po/extract_messages.sh
Executable 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"
|
148
sources/desktop-panel/po/fr.po
Normal file
@ -0,0 +1,148 @@
|
||||
# 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-09-15 10:02+0400\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "Apparence"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
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 "Time interval"
|
||||
msgstr "Intervalle"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "Positionnement vertical"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Evgeniy Alekseev"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "esalexeev@gmail.com"
|
||||
|
||||
#~ 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"
|
140
sources/desktop-panel/po/plasma_applet_desktop-panel.pot
Normal file
@ -0,0 +1,140 @@
|
||||
# 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-09-15 10:02+0400\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
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 "Time interval"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr ""
|
146
sources/desktop-panel/po/pt_BR.po
Normal file
@ -0,0 +1,146 @@
|
||||
# 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-09-15 10:02+0400\n"
|
||||
"PO-Revision-Date: 2014-06-09 01:47+0400\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"
|
||||
|
||||
#: desktop-panel.cpp:141
|
||||
msgid "Top Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "Widget"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "Aparência"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
msgid "Font"
|
||||
msgstr "Tamanho da 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 "Peso 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 ""
|
||||
|
||||
#: po/rc.cpp:39 rc.cpp:39
|
||||
msgid "To control panels please set widget shortcut."
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:42 rc.cpp:42
|
||||
msgid "Time interval"
|
||||
msgstr "Intervalo de tempo"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "Layout vertical"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "under"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "dreanazous@gmail.com"
|
||||
|
||||
#~ 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"
|
161
sources/desktop-panel/po/ru.po
Normal file
@ -0,0 +1,161 @@
|
||||
# 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-09-15 10:02+0400\n"
|
||||
"PO-Revision-Date: 2014-09-15 10:03+0400\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr "Верхний край"
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr "Нижний край"
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr "Левый край"
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr "Правый край"
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr "Неизвестное положение (%1)"
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "Виджет"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "Внешний вид"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr "Скрыть панели"
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
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 "Time interval"
|
||||
msgstr "Интервал обновления"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr "Включить фон"
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr "Метка"
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr "Метка, которая будет показана, если данный рабочий стол активен"
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "Вертикальная разметка"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr "Команда"
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr "Команда которая изменит текущий рабочий стол"
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr "Добавить"
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Evgeniy Alekseev"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "esalexeev@gmail.com"
|
||||
|
||||
#~ 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 - общее число рабочий столов"
|
147
sources/desktop-panel/po/uk.po
Normal file
@ -0,0 +1,147 @@
|
||||
# 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-09-15 10:02+0400\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "Віджет"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "Зовнішній вигляд"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr ""
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
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 "Time interval"
|
||||
msgstr "Інтервал оновлення"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "Вертикальна розмітка"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Slobodyan Victor"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "sarumyan@i.ua"
|
||||
|
||||
#~ msgid "Add stretch to left/top of the layout"
|
||||
#~ msgstr "Додати порожнє місце ліворуч/вгорі віджету"
|
||||
|
||||
#~ msgid "Add stretch to right/bottom of the layout"
|
||||
#~ msgstr "Додати порожнє місце праворуч/внизу віджету"
|
161
sources/desktop-panel/po/zh.po
Normal file
@ -0,0 +1,161 @@
|
||||
# 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-09-15 10:02+0400\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:141
|
||||
msgid "Top Edge"
|
||||
msgstr "顶部边缘"
|
||||
|
||||
#: desktop-panel.cpp:143
|
||||
msgid "Bottom Edge"
|
||||
msgstr "底部边缘"
|
||||
|
||||
#: desktop-panel.cpp:145
|
||||
msgid "Left Edge"
|
||||
msgstr "左端边缘"
|
||||
|
||||
#: desktop-panel.cpp:147
|
||||
msgid "Right Edge"
|
||||
msgstr "右端边缘"
|
||||
|
||||
#: desktop-panel.cpp:149
|
||||
msgid "Unknown Position (%1)"
|
||||
msgstr "未知位置(%1)"
|
||||
|
||||
#: desktop-panel.cpp:367
|
||||
msgid "Widget"
|
||||
msgstr "窗口小部件"
|
||||
|
||||
#: desktop-panel.cpp:368
|
||||
msgid "Appearance"
|
||||
msgstr "外观"
|
||||
|
||||
#: desktop-panel.cpp:369
|
||||
msgid "Toggle panels"
|
||||
msgstr "控制面板状态切换(显示/隐藏)"
|
||||
|
||||
#: desktop-panel.cpp:489
|
||||
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:63 rc.cpp:6 rc.cpp:24 rc.cpp:63
|
||||
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 "Time interval"
|
||||
msgstr "时间间隔"
|
||||
|
||||
#: po/rc.cpp:45 rc.cpp:45
|
||||
msgid "Enable background"
|
||||
msgstr "启用背景"
|
||||
|
||||
#: po/rc.cpp:48 rc.cpp:48
|
||||
msgid "Mark"
|
||||
msgstr "标记"
|
||||
|
||||
#: po/rc.cpp:51 rc.cpp:51
|
||||
msgid "A mark which will be shown if this desktop is active"
|
||||
msgstr "当前桌面处于激活状态下,该当标记显示。 "
|
||||
|
||||
#: po/rc.cpp:54 rc.cpp:54
|
||||
msgid "Vertical layout"
|
||||
msgstr "垂直布局"
|
||||
|
||||
#: po/rc.cpp:57 rc.cpp:57
|
||||
msgid "Command to change desktop"
|
||||
msgstr "桌面切换命令"
|
||||
|
||||
#: po/rc.cpp:60 rc.cpp:60
|
||||
msgid "Command which will change the current desktop"
|
||||
msgstr "当前桌面更改命令"
|
||||
|
||||
#: po/rc.cpp:66 rc.cpp:66
|
||||
msgid "Ctrl+B"
|
||||
msgstr "Ctrl+B"
|
||||
|
||||
#: po/rc.cpp:69 rc.cpp:69
|
||||
msgid "Ctrl+I"
|
||||
msgstr "Ctrl+I"
|
||||
|
||||
#: po/rc.cpp:72 rc.cpp:72
|
||||
msgid "Ctrl+U"
|
||||
msgstr "Ctrl+U"
|
||||
|
||||
#: po/rc.cpp:75 rc.cpp:75
|
||||
msgid "Add"
|
||||
msgstr "添加"
|
||||
|
||||
#: po/rc.cpp:76 rc.cpp:76
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "用户名"
|
||||
|
||||
#: po/rc.cpp:77 rc.cpp:77
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
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 - 桌面总数量"
|
56
sources/desktop-panel/toggle.ui
Normal 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>
|
409
sources/desktop-panel/widget.ui
Normal file
@ -0,0 +1,409 @@
|
||||
<?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>729</width>
|
||||
<height>428</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="4" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_interval">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_interval">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Time interval</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_interval">
|
||||
<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="QSpinBox" name="spinBox_interval">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<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>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_background">
|
||||
<property name="text">
|
||||
<string>Enable background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_mark">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_mark">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mark</string>
|
||||
</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">&</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="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_layout">
|
||||
<property name="text">
|
||||
<string>Vertical layout</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<layout class="QHBoxLayout" name="layout_desktopcmd">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_desktopcmd">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Command to change desktop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_desktopcmd">
|
||||
<property name="toolTip">
|
||||
<string>Command which will change the current desktop</string>
|
||||
</property>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
34
sources/ext-sysmon/CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
||||
# set project name
|
||||
set (SUBPROJECT plasma_engine_extsysmon)
|
||||
|
||||
# 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}/../
|
||||
${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_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp)
|
||||
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
|
||||
file (GLOB SUBPROJECT_CONF *.conf)
|
||||
|
||||
# prepare
|
||||
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
|
||||
|
||||
# make
|
||||
qt4_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER})
|
||||
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})
|
42
sources/ext-sysmon/extsysmon.conf
Normal file
@ -0,0 +1,42 @@
|
||||
# Configuration file for Extended Systemmonitor DataEngine
|
||||
# $kdehome/share/config/extsysmon.conf
|
||||
|
||||
# ACPI devices
|
||||
#ACPIPATH=/sys/class/power_supply/
|
||||
|
||||
# Custom command, separator is '@@'
|
||||
#CUSTOM=curl ip4.telize.com
|
||||
|
||||
# Command which returns number of the current desktop
|
||||
#DESKTOPCMD=qdbus org.kde.kwin /KWin currentDesktop
|
||||
|
||||
# Set GPU device
|
||||
# May be 'nvidia' (for nvidia), 'ati' (for ATI RADEON), 'disable' or 'auto'
|
||||
#GPUDEV=auto
|
||||
|
||||
# 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
|
||||
## 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
|
||||
# Commands to run, comma separated
|
||||
#PKGCMD=pacman -Qu
|
||||
# Number of null lines for commands, comma separated
|
||||
#PKGNULL=0
|
||||
|
||||
# Player name. Supported players are 'mpd', 'mpris'
|
||||
#PLAYER=mpris
|
638
sources/ext-sysmon/extsysmon.cpp
Normal file
@ -0,0 +1,638 @@
|
||||
/***************************************************************************
|
||||
* 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 "extsysmon.h"
|
||||
|
||||
#include <Plasma/DataContainer>
|
||||
#include <KDE/KGlobal>
|
||||
#include <KDE/KStandardDirs>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QRegExp>
|
||||
#include <QTextCodec>
|
||||
#include <QThread>
|
||||
|
||||
#include <pdebug/pdebug.h>
|
||||
#include <task/taskadds.h>
|
||||
|
||||
|
||||
ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args)
|
||||
: Plasma::DataEngine(parent, 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();
|
||||
}
|
||||
|
||||
|
||||
QString ExtendedSysMon::getAllHdd()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QStringList devices;
|
||||
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()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
QStringList ExtendedSysMon::getDesktopNames()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QStringList list;
|
||||
QString fileName = KGlobal::dirs()->findResource("config", "kwinrc");
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
||||
QFile configFile(fileName);
|
||||
if (!configFile.open(QIODevice::ReadOnly)) return list;
|
||||
|
||||
QString fileStr;
|
||||
QStringList value;
|
||||
bool desktopSection = false;
|
||||
while (true) {
|
||||
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[0] == QChar('[')) desktopSection = false;
|
||||
if (fileStr == QString("[Desktops]")) desktopSection = true;
|
||||
if (desktopSection) {
|
||||
if (fileStr.contains(QChar('='))) {
|
||||
value.clear();
|
||||
for (int i=1; i<fileStr.split(QChar('=')).count(); i++)
|
||||
value.append(fileStr.split(QChar('='))[i]);
|
||||
if (fileStr.split(QChar('='))[0].contains(QString("Name_")))
|
||||
list.append(value.join(QChar('=')));
|
||||
}
|
||||
}
|
||||
if (configFile.atEnd()) break;
|
||||
}
|
||||
configFile.close();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
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("ACPIPATH")] = QString("/sys/class/power_supply/");
|
||||
rawConfig[QString("CUSTOM")] = QString("curl ip4.telize.com");
|
||||
rawConfig[QString("DESKTOP")] = QString("");
|
||||
rawConfig[QString("DESKTOPCMD")] = QString("qdbus org.kde.kwin /KWin currentDesktop");
|
||||
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");
|
||||
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(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 (configFile.atEnd()) break;
|
||||
}
|
||||
configFile.close();
|
||||
|
||||
configuration = updateConfiguration(rawConfig);
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
for (int i=0; i<rawConfig.keys().count(); i++) {
|
||||
key = rawConfig.keys()[i];
|
||||
value = rawConfig[key];
|
||||
key.remove(QChar(' '));
|
||||
if ((key != QString("CUSTOM")) &&
|
||||
(key != QString("DESKTOPCMD")) &&
|
||||
(key != QString("HDDTEMPCMD")) &&
|
||||
(key != QString("PKGCMD")))
|
||||
value.remove(QChar(' '));
|
||||
config[key] = value;
|
||||
}
|
||||
// update values
|
||||
// desktop names
|
||||
config[QString("DESKTOP")] = getDesktopNames().join(QString(";;"));
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
QMap<QString, QVariant> ExtendedSysMon::getBattery(const QString acpiPath)
|
||||
{
|
||||
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].indexOf(batRegexp) > -1)
|
||||
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(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 number = qoutput.toInt();
|
||||
QMap<QString, QVariant> currentDesktop;
|
||||
currentDesktop[QString("currentName")] = configuration[QString("DESKTOP")].split(QString(";;"))[number-1];
|
||||
currentDesktop[QString("currentNumber")] = number;
|
||||
currentDesktop[QString("list")] = configuration[QString("DESKTOP")];
|
||||
currentDesktop[QString("number")] = configuration[QString("DESKTOP")].split(QString(";;")).count();
|
||||
|
||||
return currentDesktop;
|
||||
}
|
||||
|
||||
|
||||
QString ExtendedSysMon::getCustomCmd(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;
|
||||
|
||||
return QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||
}
|
||||
|
||||
|
||||
float ExtendedSysMon::getGpu(const QString device)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Device" << device;
|
||||
|
||||
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 -d UTILIZATION");
|
||||
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"))) {
|
||||
QString load = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
|
||||
.split(QChar(' '), QString::SkipEmptyParts)[2]
|
||||
.remove(QChar('%'));
|
||||
value = load.toFloat();
|
||||
}
|
||||
}
|
||||
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('%'));
|
||||
value = load.toFloat();
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
float ExtendedSysMon::getGpuTemp(const QString device)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Device" << device;
|
||||
|
||||
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 -d TEMPERATURE");
|
||||
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 Current Temp"))) {
|
||||
QString temp = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
|
||||
.split(QChar(' '), QString::SkipEmptyParts)[4];
|
||||
value = temp.toFloat();
|
||||
}
|
||||
}
|
||||
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];
|
||||
value = temp.toFloat();
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
float ExtendedSysMon::getHddTemp(const QString cmd, const QString device)
|
||||
{
|
||||
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'));
|
||||
value = temp.toFloat();
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
QMap<QString, QVariant> ExtendedSysMon::getPlayerInfo(const QString playerName,
|
||||
const QString mpdAddress,
|
||||
const QString mpdPort,
|
||||
QString mpris)
|
||||
{
|
||||
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
|
||||
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[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().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("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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
QMap<QString, QVariant> ExtendedSysMon::getPsStats()
|
||||
{
|
||||
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;
|
||||
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++)
|
||||
if (!qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("ps ")))
|
||||
psList.append(qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]);
|
||||
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 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;
|
||||
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++)
|
||||
if (!qoutput.isEmpty())
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
bool ExtendedSysMon::sourceRequestEvent(const QString &source)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Source" << source;
|
||||
|
||||
return updateSourceEvent(source);
|
||||
}
|
||||
|
||||
|
||||
bool ExtendedSysMon::updateSourceEvent(const QString &source)
|
||||
{
|
||||
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("custom")) {
|
||||
for (int i=0; i<configuration[QString("CUSTOM")].split(QString("@@"), QString::SkipEmptyParts).count(); i++) {
|
||||
setData(source, QString("custom") + QString::number(i),
|
||||
getCustomCmd(configuration[QString("CUSTOM")].split(QString("@@"), QString::SkipEmptyParts)[i]));
|
||||
}
|
||||
} else if (source == QString("desktop")) {
|
||||
QMap<QString, QVariant> desktop = getCurrentDesktop(configuration[QString("DESKTOPCMD")]);
|
||||
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++)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
K_EXPORT_PLASMA_DATAENGINE(extsysmon, ExtendedSysMon)
|
||||
|
||||
#include "extsysmon.moc"
|
62
sources/ext-sysmon/extsysmon.h
Normal file
@ -0,0 +1,62 @@
|
||||
/***************************************************************************
|
||||
* 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 EXTSYSMON_H
|
||||
#define EXTSYSMON_H
|
||||
|
||||
#include <Plasma/DataEngine>
|
||||
#include <QProcess>
|
||||
|
||||
class ExtendedSysMon : public Plasma::DataEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ExtendedSysMon(QObject *parent, const QVariantList &args);
|
||||
// update functions
|
||||
QMap<QString, QVariant> getBattery(const QString acpiPath);
|
||||
QMap<QString, QVariant> getCurrentDesktop(const QString cmd);
|
||||
QString getCustomCmd(const QString cmd);
|
||||
float getGpu(const QString device);
|
||||
float getGpuTemp(const QString device);
|
||||
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 &source);
|
||||
bool updateSourceEvent(const QString &source);
|
||||
QStringList sources() const;
|
||||
|
||||
private:
|
||||
// configuration
|
||||
QMap<QString, QString> configuration;
|
||||
bool debug;
|
||||
// reread configuration
|
||||
QString getAllHdd();
|
||||
QString getAutoGpu();
|
||||
QString getAutoMpris();
|
||||
QStringList getDesktopNames();
|
||||
void readConfiguration();
|
||||
QMap<QString, QString> updateConfiguration(const QMap<QString, QString> rawConfig);
|
||||
};
|
||||
|
||||
#endif /* EXTSYSMON_H */
|
@ -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
|
||||
@ -13,8 +13,8 @@ X-Plasma-EngineName=ext-sysmon
|
||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||
X-KDE-PluginInfo-Name=ext-sysmon
|
||||
X-KDE-PluginInfo-Version=1.2
|
||||
X-KDE-PluginInfo-Version=@PROJECT_VERSION@
|
||||
X-KDE-PluginInfo-Category=System Information
|
||||
X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-License=GPL3
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
@ -1,20 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Py Text Monitor
|
||||
ServiceTypes=Plasma/Applet
|
||||
Type=Service
|
||||
Icon=utilities-system-monitor
|
||||
|
||||
X-Plasma-API=python
|
||||
X-Plasma-MainScript=code/main.py
|
||||
X-Plasma-RequiredExtensions=LaunchApp,LocalIO,FileDialog
|
||||
|
||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||
X-KDE-PluginInfo-Name=py-text-monitor
|
||||
X-KDE-PluginInfo-Version=1.3.6
|
||||
X-KDE-PluginInfo-Website=http://kde-look.org/
|
||||
X-KDE-PluginInfo-Category=System Information
|
||||
X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|