Compare commits

..

111 Commits

Author SHA1 Message Date
7415a6830f release 2.1.0 2014-12-31 01:04:50 +03:00
c23846f7b4 update readme 2014-12-28 16:49:43 +03:00
e957a2723b Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-12-26 02:31:29 +03:00
5369bbda65 remove script 2014-12-26 02:31:13 +03:00
6a8842163e update text in version.h 2014-12-25 00:14:03 +03:00
56e7ee3d11 approve translation 2014-12-24 00:05:40 +03:00
ce72c46cd9 Merge pull request #40 from underr/master
pt_BR translation
2014-12-24 00:00:59 +03:00
78ab09c1da pt_BR translation 2014-12-23 14:21:32 -02:00
498a965488 add skel to create rpm and debs 2014-12-23 10:32:18 +03:00
d1d4a97fa4 apply fix to extscripts 2014-12-22 06:19:25 +03:00
8f1e8606d4 update Ukrainian transaltion 2014-12-18 01:37:06 +03:00
b682c6dbd6 update Spanish translation 2014-12-16 09:36:02 +03:00
c8bf047e76 implement #36
fix (?) initialization
update translations
2014-12-15 02:41:39 +03:00
a336d9aa04 fix #37 2014-12-12 01:04:31 +03:00
2272b0c2c0 auto commit 2014-12-12 00:02:48 +03:00
0533ee8cd5 add #38 2014-12-07 03:04:35 +03:00
be792a4c5a add graphical settings 2014-12-03 04:33:13 +00:00
997e13706b add comments to template 2014-11-29 22:48:52 +03:00
6bcb6798a2 fix #37 2014-11-28 21:02:45 +03:00
4e3593a2a9 fix build 2014-11-25 04:00:01 +03:00
4b471593c7 update changelogs 2014-11-24 09:36:17 +03:00
695a85be29 update translations, implement copy method 2014-11-21 05:13:01 +03:00
bae34ba898 update translations, version and readme 2014-11-21 03:28:11 +03:00
93db63b16c * fix naming
* fix notification
2014-11-20 06:13:09 +03:00
0cd2ff6813 rewrite all ui interfaces t oKDE standards 2014-11-20 06:01:56 +03:00
222db43dc1 update extscripts and dp ui files to kde standards 2014-11-20 04:21:24 +03:00
e4be3b2e02 simplify custom script class
remove QGraphicsView border
2014-11-20 04:07:14 +03:00
543e39a7ac Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-11-20 03:18:53 +03:00
ca60a85241 update graphicalitem 2014-11-19 16:19:23 +03:00
2c3c575493 * add .desktop suffix to files if they have not
* remove frameshape
2014-11-19 15:04:10 +03:00
5f37a9d8c7 fix direction 2014-11-19 12:28:43 +03:00
c3420a8393 some simplification of graphicalitem 2014-11-19 12:08:54 +03:00
5ce3a5c213 fix configuration 2014-11-19 11:14:55 +03:00
179a97b01b implement tooltip to configuration interface 2014-11-18 12:58:56 +03:00
f0c79a4dab implement contextual menu to listWidgets 2014-11-18 11:54:23 +03:00
f56f319075 some update on graphical items 2014-11-18 06:56:22 +03:00
f7b7d5b6b4 fix run 2014-11-17 17:38:02 +03:00
3193de1a85 implement ExtScripts configuration 2014-11-17 17:04:31 +03:00
8cdfdd4e81 start work on porting extscripts to *.desktop configuration 2014-11-17 10:29:09 +03:00
16d7ca2005 update extscript to inherit from QDialog 2014-11-17 10:01:57 +03:00
e54ab7e1a5 small update 2014-11-16 22:37:55 +03:00
a335979830 implement grapicalitem settings 2014-11-16 13:33:09 +03:00
8460d07875 implement tryDelete() method 2014-11-16 11:40:16 +03:00
5ec26c7747 implement graphical item to aw (except for configuration) 2014-11-14 07:16:55 +03:00
8aafdb6fc4 update gi to use desktop conf files 2014-11-14 04:19:53 +03:00
9eedaf246f rename ring to circle 2014-11-13 12:03:48 +03:00
e7714042bb yet another fix margin 2014-11-13 11:21:51 +03:00
0f4bbbfba1 some intermediate commit 2014-11-12 05:16:05 +03:00
7069758b73 add colorsettings to DP tooltip
remove deprecated settings from AW
2014-11-10 01:53:27 +03:00
bbc9d72606 fix margin 2014-11-10 00:51:43 +03:00
b53b1111f9 fix tooltip to DP 2014-11-09 08:22:05 +03:00
64fdc4bebe move tooltip to proxydiwget 2014-11-09 04:50:22 +03:00
583046e195 update translations 2014-11-08 18:41:33 +03:00
71b3a4e6ab implement #35 2014-11-07 05:36:36 +03:00
4b90fac0c4 implement #28 2014-11-07 04:56:32 +03:00
2fa0acf13d some intermediate commit 2014-11-06 20:42:53 +03:00
0f9d2e52ab fix #24 2014-11-04 00:06:22 +03:00
373bab14db some edit of external scripts 2014-11-04 00:04:13 +03:00
7e095c4349 implement script function 2014-11-03 06:33:39 +03:00
a4af7ffc07 some improvemance of external scripts 2014-11-03 05:03:14 +03:00
0ab4878b22 update translations 2014-11-01 23:26:47 +03:00
1748829901 implement script feature to the widget 2014-10-31 07:20:14 +03:00
6a41fa2b8a implement script feature to dataengine 2014-10-31 06:13:49 +03:00
2cd04e1f7f end work on extscript class 2014-10-31 04:43:17 +03:00
0a61d926f8 create properties 2014-10-31 01:54:35 +03:00
45c248b101 some intermediate commit 2014-10-30 01:05:09 +03:00
6a784d2e28 remove install script from git pkgbuild 2014-10-27 04:33:16 +03:00
13023a4985 add workaround for #34 to AW 2014-10-27 04:20:13 +03:00
6463ed3bf7 add pkgbuild-git 2014-10-26 17:06:39 +03:00
5bf3847bc9 add checkupdates function 2014-10-15 16:41:31 +04:00
4fc2e238bd fix regexp matching 2014-10-14 05:15:13 +04:00
c18bb61521 implement about window 2014-10-12 15:01:07 +04:00
9e82210463 implement autoupdate function to aw (see #32) 2014-10-11 03:38:19 +04:00
171d545562 add skel for #32 2014-10-10 23:36:11 +04:00
c6fa1f2a79 update tasks 2014-10-08 22:39:39 +04:00
14cee9dbc7 release 2.0.5 2014-10-05 00:20:09 +04:00
5759273e4c add workaroud for resizing 2014-10-04 01:17:34 +04:00
4387bb1e76 some fixes which was introduced with the latest patches 2014-10-02 06:13:10 +04:00
03af5f0e49 upd task, add ability to use $ symbol over $$ 2014-10-02 05:10:02 +04:00
7f6afbcb4d add resizing 2014-10-01 03:15:28 +04:00
4a320bc5d6 more correct destuction 2014-10-01 02:59:47 +04:00
29d34525a3 fix plasma crash caused by label destruction 2014-10-01 02:57:06 +04:00
0ab74b493c fix #31, update submodules 2014-10-01 02:33:10 +04:00
952fa97fcc Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-10-01 02:02:13 +04:00
677ed1ab5e fix update netdev 2014-10-01 02:01:18 +04:00
deb0b3bdbb chenge forceupdate logic 2014-09-29 00:59:19 +04:00
20c85f0d42 fix number of issue 2014-09-28 23:12:33 +04:00
f9a37f0cb2 edit echange log, fix #20 2014-09-26 01:43:22 +04:00
0c8013c26b add tooltip bottom 2014-09-26 01:41:27 +04:00
6b9e19ed58 Merge branch 'master' of github.com:arcan1s/awesome-widgets 2014-09-25 23:25:08 +04:00
432ab694fd update changelog 2014-09-25 23:24:33 +04:00
c506183247 fix battery tooltip 2014-09-24 09:51:46 +04:00
fe822518d5 release 2014-09-21 21:50:03 +04:00
1f9e8221f0 release 2.0.4
battery fixes
2014-09-21 21:49:02 +04:00
d7e93e83a3 release 2.0.3 2014-09-21 21:23:26 +04:00
17c3383616 fix aw geometry 2014-09-21 20:43:27 +04:00
830bab7cb6 add support of several $bat tags. Update translations 2014-09-21 20:19:57 +04:00
0b3832cc32 some work 2014-09-18 21:57:59 +04:00
e64ca5ec08 update TODO 2014-09-16 08:54:08 +04:00
84b93098f2 release 2.0.2 2014-09-16 00:04:31 +04:00
17bef06c98 some fixes, prepare to release 2.0.2 2014-09-15 20:28:09 +04:00
db7573de80 update DP translations 2014-09-15 10:04:57 +04:00
4907496a2e fix text edit dp configuration interface 2014-09-14 00:01:23 +04:00
43daae5529 edit temp conversion 2014-09-13 03:06:00 +04:00
1d1fe469f8 rewrite DP configuration interface 2014-09-12 19:29:31 +04:00
99049164be fix cpu* tags
fix notifiations
2014-09-12 00:03:18 +04:00
f61948d9b3 fix (?) notifications 2014-09-11 00:00:08 +04:00
ea54c54d42 add fan tags 2014-09-10 23:51:14 +04:00
c843c5260d Merge pull request #23 from Lemueler/master
Add Chinese translation for awesome-widgets
2014-09-10 21:52:44 +04:00
a8912074dd Modify Chinese translations 2014-09-10 22:56:21 +08:00
2be0edcb40 Add Chinese translations 2014-09-10 22:40:32 +08:00
61 changed files with 7288 additions and 3228 deletions

View File

@ -6,3 +6,4 @@ Translators:
Ernesto Avilés Vzqz (Spanish translation) Ernesto Avilés Vzqz (Spanish translation)
@underr (Brazillian Portuguese translation) @underr (Brazillian Portuguese translation)
Виктор Слободян (Ukrainian translation) Виктор Слободян (Ukrainian translation)
Steve Lemuel (Chinese translation)

View File

@ -1,3 +1,39 @@
Ver.2.1.0:
+ add support of custom scripts
+ add support of desktop preview to DP
+ add bar support
+ add autoupdate function
- remove custom command
- fix #34
* fix notifications
* rewrite UI to KDE standards
* fix margins on graphical objects
* rewrite DP abd DE to use library calls
* edit GPU properties definition
* edit regexp matching
Ver.2.0.5:
+ add tooltip bottom (#30)
* fix network interface update
* fix battery tooltip bug
* edit DP layout (#31)
Ver.2.0.4:
* more correct work with batteries
Ver.2.0.3:
+ add support of several $bat tags
* edit layout
Ver.2.0.2:
+ add $fan* tags
+ add Chinese translation (thanks to @Lemueler)
+ add net devices checking is it p2p device
- remove ps stats from notification
* yet another fix cpu* and cpucl*
* rewrite DP configuration interface
* fix non-standard temp units
Ver.2.0.1: Ver.2.0.1:
+ add support of custom interfaces + add support of custom interfaces
* fix label edge's shading * fix label edge's shading

View File

@ -1,3 +1,39 @@
Вер.2.1.0:
+ добавлена функция автообновления
+ добавлена поддерка кастомных скриптов
+ добавлена поддержка превью рабочего стола для DP
+ добавлена поддержка баров
- удалена поддержка кастомных команд
- фикс #34
* исправлены уведомления
* переписан UI в соответствии со стандартами KDE
* исправлены границы для графических объектов
* переписан DP и DE на использование библиотечных функций
* изменено определение свойств GPU
* изменен поиск регулярных выражений
Вер.2.0.5:
+ добавлен нижний край к тултипу (#30)
* исправлен баг с обновлением сетевого интерфейса
* исправлен баг с тултипом батареи
* отредактирована разметка DP (#31)
Вер.2.0.4:
* более корректная работа с батареями
Вер.2.0.3:
+ добавлена поддержка нескольких тегов $bat
* отредактирована разметка
Вер.2.0.2:
+ добавлены теги $fan*
+ добавлен китайский перевод (спасибо @Lemueler)
+ добавлена проверка сетевых устройств на p2p
- удалено ps stats из уведомлений
* еще один фикс тегов cpu* и cpucl
* переписан конфигурационный интерфейс DP
* исправлены нестандартные единицы температуры
Вер.2.0.1: Вер.2.0.1:
+ добавлена поддержка кастомных интерфейсов + добавлена поддержка кастомных интерфейсов
* фикс затенения краев поля * фикс затенения краев поля

View File

@ -1,8 +1,8 @@
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com> # Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
pkgname=kdeplasma-applets-awesome-widgets pkgname=kdeplasma-applets-awesome-widgets
_pkgname=awesome-widgets _pkgname=awesome-widgets
pkgver=2.0.1 pkgver=2.1.0
pkgrel=1 pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)" pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -19,7 +19,7 @@ optdepends=("amarok: for music player monitor"
makedepends=('automoc4' 'cmake') makedepends=('automoc4' 'cmake')
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install=${pkgname}.install install=${pkgname}.install
md5sums=('3ffa5c0456ee124900373f106c2649cd') md5sums=('37d9ad08b2b4623d2ab9089facf4b5ff')
backup=('usr/share/config/extsysmon.conf') backup=('usr/share/config/extsysmon.conf')
prepare() { prepare() {

40
PKGBUILD-git Normal file
View File

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

257
README.md
View File

@ -4,249 +4,22 @@ awesome-widgets (ex-pytextmonitor)
Information Information
----------- -----------
A collection of minimalistic widgets which looks like Awesome WM widgets. A collection of minimalistic widgets which looks like Awesome Window Manager widgets.
**NOTE** [LOOKING FOR TRANSLATORS!](https://github.com/arcan1s/awesome-widgets/issues/14) **NOTE** [LOOKING FOR TRANSLATORS!](https://github.com/arcan1s/awesome-widgets/issues/14)
Configuration Features
------------- ========
For edited output you must open Settings window and setup output format in lines: * easy and fully configurable native Plasma widget which may be used as Conky widget or as Awesome-like information panel
* panel which shows active desktop status
* clear Conky-like configuration with html tags support
* custom command support (it may be simple action as well as special custom tag)
* graphical item support - tooltips, bars
* tag `$time` - time in default format. For example, *fri Nov 6 04:48:01 2013* See [links](#Links) for more details.
* 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 `$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` - battery charge, *%*
* tag `$ac` - status AC device. Return (\*) if AC device is online or *( )* if offline
* tag `$album` - current song album. One of supported music players must be installed
* tag `$artist` - current song artist. One of supported music players must be installed
* tag `$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 **Didn't find required feature?** [Just ask for it!](https://github.com/arcan1s/awesome-widgets/issues)
-------------
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
-------------------
**AC device**
File with AC information. File (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online.
**Battery device**
File with battery information. File (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.
**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 Instruction
=========== ===========
@ -255,16 +28,14 @@ Dependencies
------------ ------------
* kdebase-workspace * kdebase-workspace
* kdebindings-python2
* lm_sensors (*for definition temperature device*) * lm_sensors (*for definition temperature device*)
Optional dependencies Optional dependencies
--------------------- ---------------------
* sysstat (*for notification*)
* proprietary video driver * 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`) * hddtemp
* music player (amarok, clementine, mpd or qmmp) * music player (mpd or supported MPRIS)
Make dependencies Make dependencies
----------------- -----------------
@ -294,10 +65,14 @@ Additional information
TODO (wish list) TODO (wish list)
---------------- ----------------
See [milestones](https://github.com/arcan1s/awesome-widgets/milestones) for more details.
Links Links
----- -----
* [Homepage](http://arcanis.name/projects/awesome-widgets/) * [Homepage](http://arcanis.name/projects/awesome-widgets/)
* [Migration to 2.*](http://arcanis.name/en/2014/09/04/migration-to-v2/)
* [Scripts and bars](http://arcanis.name/en/2014/12/19/aw-v21-bells-and-whistles/)
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Awesome+Widgets?content=157124) * 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) * 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 * Archlinux [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-awesome-widgets/) package

View File

@ -1,9 +1,5 @@
post_install() { post_install() {
kbuildsycoca4 > /dev/null 2>&1 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_upgrade() {

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

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

View File

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

View File

@ -15,17 +15,20 @@ include_directories (${CMAKE_SOURCE_DIR}
${KDE4_INCLUDES} ${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR}) ${PROJECT_TRDPARTY_DIR}
../ext-sysmon
${CMAKE_CURRENT_BINARY_DIR}/../ext-sysmon)
# set sources # set sources
set (SUBPROJECT_MISC_DIR "contents/misc")
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop) file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN}) file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp) ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp
../ext-sysmon/extscript.cpp)
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h) set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
file (GLOB SUBPROJECT_UI *.ui) file (GLOB SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui)
file (GLOB SUBPROJECT_NOTIFY ${SUBPROJECT_MISC_DIR}/*.notifyrc) file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
set (SUBPROJECT_DESKTOPS ${CMAKE_CURRENT_SOURCE_DIR}/desktops)
# prepare # prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
@ -40,3 +43,4 @@ target_link_libraries (${PLUGIN_NAME} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${K
install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}) install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME}) install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})
install (DIRECTORY ${SUBPROJECT_DESKTOPS} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>700</width> <width>700</width>
<height>594</height> <height>588</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -41,39 +41,88 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>-250</y>
<width>677</width> <width>675</width>
<height>590</height> <height>822</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<item> <item>
<widget class="QCheckBox" name="checkBox_background"> <layout class="QHBoxLayout" name="layout_popup">
<property name="text"> <item>
<string>Enable background</string> <spacer name="spacer_popup">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_popup">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable popup on mouse click</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_popup"> <layout class="QHBoxLayout" name="layout_background">
<property name="text"> <item>
<string>Enable popup on mouse click</string> <spacer name="spacer_background">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_background">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable background</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layout_timeFormat"> <layout class="QHBoxLayout" name="layout_timeFormat">
<item> <item>
<widget class="QLabel" name="label_timeFormat"> <widget class="QLabel" name="label_timeFormat">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Custom time format</string> <string>Custom time format</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -96,9 +145,6 @@ $m - minutes w\o zero
$ss - seconds $ss - seconds
$s - seconds w\o zero</string> $s - seconds w\o zero</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -107,15 +153,18 @@ $s - seconds w\o zero</string>
<layout class="QHBoxLayout" name="layout_uptimeFormat"> <layout class="QHBoxLayout" name="layout_uptimeFormat">
<item> <item>
<widget class="QLabel" name="label_uptimeFormat"> <widget class="QLabel" name="label_uptimeFormat">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Custom uptime format</string> <string>Custom uptime format</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -128,9 +177,6 @@ $h - uptime hours without zero
$mm - uptime minutes $mm - uptime minutes
$m - uptime minutes without zero</string> $m - uptime minutes without zero</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -139,38 +185,16 @@ $m - uptime minutes without zero</string>
<layout class="QHBoxLayout" name="layout_tempUnits"> <layout class="QHBoxLayout" name="layout_tempUnits">
<item> <item>
<widget class="QLabel" name="label_tempUnits"> <widget class="QLabel" name="label_tempUnits">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Temperature units</string> <string>Temperature units</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </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> <item>
<widget class="QComboBox" name="comboBox_tempUnits"> <widget class="QComboBox" name="comboBox_tempUnits">
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
</size>
</property>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">Celsius</string> <string notr="true">Celsius</string>
@ -234,6 +258,30 @@ $m - uptime minutes without zero</string>
</item> </item>
</layout> </layout>
</item> </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> <item>
<layout class="QVBoxLayout" name="layout_mount"> <layout class="QVBoxLayout" name="layout_mount">
<item> <item>
@ -310,15 +358,12 @@ $m - uptime minutes without zero</string>
<layout class="QHBoxLayout" name="layout_netdev"> <layout class="QHBoxLayout" name="layout_netdev">
<item> <item>
<widget class="QCheckBox" name="checkBox_netdev"> <widget class="QCheckBox" name="checkBox_netdev">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Disable auto select device and set specified device</string> <string>Disable auto select device and set specified device</string>
</property> </property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text"> <property name="text">
<string>Set network device</string> <string>Set network device</string>
</property> </property>
@ -326,12 +371,6 @@ $m - uptime minutes without zero</string>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBox_netdev"> <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"> <property name="editable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -343,15 +382,18 @@ $m - uptime minutes without zero</string>
<layout class="QHBoxLayout" name="layout_acOnline"> <layout class="QHBoxLayout" name="layout_acOnline">
<item> <item>
<widget class="QLabel" name="label_acOnline"> <widget class="QLabel" name="label_acOnline">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>AC online tag</string> <string>AC online tag</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -362,9 +404,6 @@ $m - uptime minutes without zero</string>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -373,15 +412,18 @@ $m - uptime minutes without zero</string>
<layout class="QHBoxLayout" name="layout_acOffline"> <layout class="QHBoxLayout" name="layout_acOffline">
<item> <item>
<widget class="QLabel" name="label_acOffline"> <widget class="QLabel" name="label_acOffline">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>AC offline tag</string> <string>AC offline tag</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -392,8 +434,77 @@ $m - uptime minutes without zero</string>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="alignment"> </widget>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_bars">
<item>
<layout class="QHBoxLayout" name="layout_barsAdd">
<item>
<widget class="QLabel" name="label_bars">
<property name="text">
<string>Bars</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer_bars">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_bars">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_bars">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_updates">
<item>
<spacer name="spacer_updates">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_updates">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Check for updates</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -51,41 +51,16 @@
<layout class="QHBoxLayout" name="layout_interval"> <layout class="QHBoxLayout" name="layout_interval">
<item> <item>
<widget class="QLabel" name="label_interval"> <widget class="QLabel" name="label_interval">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Time interval</string> <string>Time interval</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_interval">
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>
</property> </property>
@ -106,30 +81,14 @@
<layout class="QHBoxLayout" name="layout_font"> <layout class="QHBoxLayout" name="layout_font">
<item> <item>
<widget class="QLabel" name="label_font"> <widget class="QLabel" name="label_font">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font</string> <string>Font</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </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> <item>
<widget class="QFontComboBox" name="fontComboBox"> <widget class="QFontComboBox" name="fontComboBox">
<property name="minimumSize"> <property name="minimumSize">
@ -146,41 +105,16 @@
<layout class="QHBoxLayout" name="layout_size"> <layout class="QHBoxLayout" name="layout_size">
<item> <item>
<widget class="QLabel" name="label_size"> <widget class="QLabel" name="label_size">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font size</string> <string>Font size</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_size">
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>
</property> </property>
@ -201,39 +135,16 @@
<layout class="QHBoxLayout" name="layout_color"> <layout class="QHBoxLayout" name="layout_color">
<item> <item>
<widget class="QLabel" name="label_color"> <widget class="QLabel" name="label_color">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font color</string> <string>Font color</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_color"> <widget class="KColorCombo" name="kcolorcombo"/>
<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> </item>
</layout> </layout>
</item> </item>
@ -241,38 +152,16 @@
<layout class="QHBoxLayout" name="layout_style"> <layout class="QHBoxLayout" name="layout_style">
<item> <item>
<widget class="QLabel" name="label_style"> <widget class="QLabel" name="label_style">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font style</string> <string>Font style</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </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> <item>
<widget class="QComboBox" name="comboBox_style"> <widget class="QComboBox" name="comboBox_style">
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
</size>
</property>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">normal</string> <string notr="true">normal</string>
@ -291,41 +180,16 @@
<layout class="QHBoxLayout" name="layout_weight"> <layout class="QHBoxLayout" name="layout_weight">
<item> <item>
<widget class="QLabel" name="label_weight"> <widget class="QLabel" name="label_weight">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font weight</string> <string>Font weight</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_weight">
<property name="minimum"> <property name="minimum">
<number>100</number> <number>100</number>
</property> </property>

View File

@ -22,16 +22,23 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QDir> #include <QDir>
#include <QGraphicsGridLayout> #include <QGraphicsGridLayout>
#include <QGraphicsProxyWidget>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkInterface> #include <QNetworkInterface>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QTextCodec> #include <QTextCodec>
#include <QTimer> #include <QTimer>
#include "customlabel.h" #include "customlabel.h"
#include "graphicalitem.h"
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "version.h"
AwesomeWidget::AwesomeWidget(QObject *parent, const QVariantList &args) AwesomeWidget::AwesomeWidget(QObject *parent, const QVariantList &args)
@ -48,6 +55,7 @@ AwesomeWidget::AwesomeWidget(QObject *parent, const QVariantList &args)
setBackgroundHints(DefaultBackground); setBackgroundHints(DefaultBackground);
setAspectRatioMode(Plasma::IgnoreAspectRatio); setAspectRatioMode(Plasma::IgnoreAspectRatio);
setHasConfigurationInterface(true); setHasConfigurationInterface(true);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
// text format init // text format init
formatLine.append(QString("")); formatLine.append(QString(""));
formatLine.append(QString("")); formatLine.append(QString(""));
@ -60,6 +68,16 @@ AwesomeWidget::~AwesomeWidget()
} }
void AwesomeWidget::checkUpdates()
{
if (debug) qDebug() << PDEBUG;
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(replyRecieved(QNetworkReply *)));
manager->get(QNetworkRequest(QUrl(VERSION_API)));
}
QList<QAction *> AwesomeWidget::contextualActions() QList<QAction *> AwesomeWidget::contextualActions()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -81,9 +99,12 @@ void AwesomeWidget::createActions()
connect(contextMenu[1], SIGNAL(triggered(bool)), this, SLOT(showReadme())); connect(contextMenu[1], SIGNAL(triggered(bool)), this, SLOT(showReadme()));
contextMenu.append(new QAction(QIcon::fromTheme(QString("stock-refresh")), contextMenu.append(new QAction(QIcon::fromTheme(QString("stock-refresh")),
i18n("Update text"), this)); i18n("Update text"), this));
connect(contextMenu[2], SIGNAL(triggered(bool)), this, SLOT(updateNetworkDevice()));
connect(contextMenu[2], SIGNAL(triggered(bool)), extsysmonEngine, SLOT(updateAllSources())); connect(contextMenu[2], SIGNAL(triggered(bool)), extsysmonEngine, SLOT(updateAllSources()));
connect(contextMenu[2], SIGNAL(triggered(bool)), sysmonEngine, SLOT(updateAllSources())); connect(contextMenu[2], SIGNAL(triggered(bool)), sysmonEngine, SLOT(updateAllSources()));
connect(contextMenu[2], SIGNAL(triggered(bool)), this, SLOT(updateNetworkDevice())); contextMenu.append(new QAction(QIcon::fromTheme(QString("system-software-update")),
i18n("Check for updates"), this));
connect(contextMenu[3], SIGNAL(triggered(bool)), this, SLOT(checkUpdates()));
} }
@ -98,7 +119,8 @@ QString AwesomeWidget::getNetworkDevice()
QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces(); QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces();
for (int i=0; i<rawInterfaceList.count(); i++) for (int i=0; i<rawInterfaceList.count(); i++)
if ((rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsUp)) && if ((rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsUp)) &&
(!rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsLoopBack))) (!rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsLoopBack)) &&
(!rawInterfaceList[i].flags().testFlag(QNetworkInterface::IsPointToPoint)))
device = rawInterfaceList[i].name(); device = rawInterfaceList[i].name();
} }
@ -134,11 +156,11 @@ float AwesomeWidget::getTemp(const float temp)
else if (configuration[QString("tempUnits")] == QString("Reaumur")) else if (configuration[QString("tempUnits")] == QString("Reaumur"))
convertedTemp = temp * 0.8; convertedTemp = temp * 0.8;
else if (configuration[QString("tempUnits")] == QString("cm^-1")) else if (configuration[QString("tempUnits")] == QString("cm^-1"))
convertedTemp = temp * 0.695; convertedTemp = (temp + 273.15) * 0.695;
else if (configuration[QString("tempUnits")] == QString("kJ/mol")) else if (configuration[QString("tempUnits")] == QString("kJ/mol"))
convertedTemp = temp * 8.31; convertedTemp = (temp + 273.15) * 8.31;
else if (configuration[QString("tempUnits")] == QString("kcal/mol")) else if (configuration[QString("tempUnits")] == QString("kcal/mol"))
convertedTemp = temp * 1.98; convertedTemp = (temp + 273.15) * 1.98;
return convertedTemp; return convertedTemp;
} }
@ -188,6 +210,7 @@ void AwesomeWidget::init()
toolTipView = new QGraphicsView(toolTipScene); toolTipView = new QGraphicsView(toolTipScene);
toolTipView->setStyleSheet(QString("background: transparent")); toolTipView->setStyleSheet(QString("background: transparent"));
toolTipView->setContentsMargins(0, 0, 0, 0); toolTipView->setContentsMargins(0, 0, 0, 0);
toolTipView->setFrameShape(QFrame::NoFrame);
toolTipView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); toolTipView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
toolTipView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); toolTipView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Plasma::ToolTipManager::self()->setContent(this, toolTip); Plasma::ToolTipManager::self()->setContent(this, toolTip);
@ -198,7 +221,12 @@ void AwesomeWidget::init()
mainLayout->setContentsMargins(1, 1, 1, 1); mainLayout->setContentsMargins(1, 1, 1, 1);
setLayout(mainLayout); setLayout(mainLayout);
textLabel = new CustomLabel(this, debug); textLabel = new CustomLabel(this, debug);
mainLayout->addItem(textLabel, 0, 0); textLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
QGraphicsProxyWidget *pw = new QGraphicsProxyWidget(this);
pw->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
textLabel->setAttribute(Qt::WA_TranslucentBackground, true);
pw->setWidget(textLabel);
mainLayout->addItem(pw, 0, 0);
// read variables // read variables
configChanged(); configChanged();
@ -208,6 +236,39 @@ void AwesomeWidget::init()
connect(timer, SIGNAL(timeout()), this, SLOT(updateText())); connect(timer, SIGNAL(timeout()), this, SLOT(updateText()));
connect(timer, SIGNAL(timeout()), this, SLOT(updateTooltip())); connect(timer, SIGNAL(timeout()), this, SLOT(updateTooltip()));
timer->start(); timer->start();
// check for updates
connect(this, SIGNAL(thereIsUpdates(QString)), this, SLOT(showUpdates(QString)));
if (configuration[QString("checkUpdates")].toInt() == 2)
checkUpdates();
}
void AwesomeWidget::replyRecieved(QNetworkReply *reply)
{
if (debug) qDebug() << PDEBUG;
QString answer = reply->readAll();
if (!answer.contains(QString("tag_name"))) return;
QString version = QString(VERSION);
if (debug) qDebug() << PDEBUG << answer;
for (int i=0; i<answer.split(QString("tag_name")).count(); i++) {
version = answer.split(QString("tag_name"))[1].split(QChar(','))[0];
version.remove(QChar('"'));
version.remove(QChar(':'));
version.remove(QString("V."));
break;
}
int old_major = QString(VERSION).split(QChar('.'))[0].toInt();
int old_minor = QString(VERSION).split(QChar('.'))[1].toInt();
int old_patch = QString(VERSION).split(QChar('.'))[2].toInt();
int new_major = QString(version).split(QChar('.'))[0].toInt();
int new_minor = QString(version).split(QChar('.'))[1].toInt();
int new_patch = QString(version).split(QChar('.'))[2].toInt();
if ((old_major < new_major) ||
((old_major == new_major) && (old_minor < new_minor)) ||
((old_major == new_major) && (old_minor == new_minor) && (old_patch < new_patch)))
emit(thereIsUpdates(version));
} }
@ -230,8 +291,7 @@ QStringList AwesomeWidget::findKeys()
QStringList selectedKeys; QStringList selectedKeys;
for (int i=0; i<keys.count(); i++) for (int i=0; i<keys.count(); i++)
if (configuration[QString("text")] if (configuration[QString("text")].contains(QString("$") + keys[i])) {
.indexOf(QString("$") + keys[i]) > -1) {
if (debug) qDebug() << PDEBUG << ":" << "Found key" << keys[i]; if (debug) qDebug() << PDEBUG << ":" << "Found key" << keys[i];
selectedKeys.append(keys[i]); selectedKeys.append(keys[i]);
} }
@ -265,6 +325,8 @@ QStringList AwesomeWidget::getKeys()
// temperature // temperature
for (int i=counts[QString("temp")]-1; i>=0; i--) for (int i=counts[QString("temp")]-1; i>=0; i--)
allKeys.append(QString("temp") + QString::number(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 // gputemp
allKeys.append(QString("gputemp")); allKeys.append(QString("gputemp"));
// gpu // gpu
@ -312,8 +374,10 @@ QStringList AwesomeWidget::getKeys()
allKeys.append(QString("up")); allKeys.append(QString("up"));
allKeys.append(QString("netdev")); allKeys.append(QString("netdev"));
// battery // battery
allKeys.append(QString("bat"));
allKeys.append(QString("ac")); 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 // player
allKeys.append(QString("album")); allKeys.append(QString("album"));
allKeys.append(QString("artist")); allKeys.append(QString("artist"));
@ -339,6 +403,65 @@ QStringList AwesomeWidget::getKeys()
} }
QStringList AwesomeWidget::findGraphicalItems()
{
if (debug) qDebug() << PDEBUG;
QStringList orderedKeys;
for (int i=0; i<graphicalItems.count(); i++)
orderedKeys.append(graphicalItems[i]->getName() + graphicalItems[i]->getBar());
orderedKeys.sort();
QStringList selectedKeys;
for (int i=orderedKeys.count()-1; i>=0; i--)
if (configuration[QString("text")].contains(QString("$") + orderedKeys[i])) {
if (debug) qDebug() << PDEBUG << ":" << "Found key" << orderedKeys[i];
selectedKeys.append(orderedKeys[i]);
}
return selectedKeys;
}
void AwesomeWidget::getGraphicalItems()
{
if (debug) qDebug() << PDEBUG;
graphicalItems.clear();
// create directory at $HOME
QString localDir = KStandardDirs::locateLocal("data", "plasma_applet_awesome-widget/desktops");
if (KStandardDirs::makeDir(localDir))
if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_applet_awesome-widget/desktops");
QStringList names;
for (int i=0; i<dirs.count(); i++) {
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
for (int j=0; j<files.count(); j++) {
if (!files[j].endsWith(QString(".desktop"))) continue;
if (names.contains(files[j])) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
names.append(files[j]);
graphicalItems.append(new GraphicalItem(0, files[j], dirs, debug));
}
}
}
GraphicalItem *AwesomeWidget::getItemByTag(const QString tag)
{
if (debug) qDebug() << PDEBUG;
GraphicalItem *item = nullptr;
for (int i=0; i< graphicalItems.count(); i++) {
if ((graphicalItems[i]->getName() + graphicalItems[i]->getBar()) != tag) continue;
item = graphicalItems[i];
break;
}
return item;
}
void AwesomeWidget::showKsysguard() void AwesomeWidget::showKsysguard()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -360,4 +483,21 @@ void AwesomeWidget::showReadme()
} }
void AwesomeWidget::showUpdates(QString version)
{
if (debug) qDebug() << PDEBUG;
QString text;
text += i18n("Current version : %1", QString(VERSION)) + QString("\n");
text += i18n("New version : %1", version) + QString("\n\n");
text += i18n("Click \"Ok\" to download");
int select = QMessageBox::information(0, i18n("There are updates"), text, QMessageBox::Ok | QMessageBox::Cancel);
switch(select) {
case QMessageBox::Ok:
QDesktopServices::openUrl(QString(RELEASES) + version);
break;
}
}
K_EXPORT_PLASMA_APPLET(awesome-widget, AwesomeWidget) K_EXPORT_PLASMA_APPLET(awesome-widget, AwesomeWidget)

View File

@ -23,6 +23,7 @@
#include <Plasma/DataEngine> #include <Plasma/DataEngine>
#include <Plasma/ToolTipContent> #include <Plasma/ToolTipContent>
#include <ui_about.h>
#include <ui_advanced.h> #include <ui_advanced.h>
#include <ui_appearance.h> #include <ui_appearance.h>
#include <ui_deconfig.h> #include <ui_deconfig.h>
@ -31,8 +32,11 @@
class CustomLabel; class CustomLabel;
class ExtScript;
class GraphicalItem;
class QGraphicsGridLayout; class QGraphicsGridLayout;
class QGraphicsScene; class QGraphicsScene;
class QNetworkReply;
class AwesomeWidget : public Plasma::Applet class AwesomeWidget : public Plasma::Applet
{ {
@ -55,6 +59,7 @@ public slots:
// contextual actions // contextual actions
void showKsysguard(); void showKsysguard();
void showReadme(); void showReadme();
void showUpdates(QString version);
// dataengine // dataengine
void addDiskDevice(const QString source); void addDiskDevice(const QString source);
void connectToEngine(); void connectToEngine();
@ -65,17 +70,26 @@ public slots:
void configChanged(); void configChanged();
// update events // update events
void sendNotification(const QString eventId, const QString message); void sendNotification(const QString eventId, const QString message);
void updateNetworkDevice(); void updateNetworkDevice(const bool delay = true);
void updateText(const bool clear = false); void updateText(const bool clear = false);
void updateTooltip(); void updateTooltip();
private slots: private slots:
void checkUpdates();
void reinit(); void reinit();
void replyRecieved(QNetworkReply *reply);
// configuration interface // configuration interface
void addNewCustomCommand(QTableWidgetItem *item); void addBar();
void addCustomScript();
void addNewPkgCommand(QTableWidgetItem *item); void addNewPkgCommand(QTableWidgetItem *item);
void contextMenuBars(const QPoint pos);
void contextMenuCustomCommand(const QPoint pos); void contextMenuCustomCommand(const QPoint pos);
void contextMenuPkgCommand(const QPoint pos); void contextMenuPkgCommand(const QPoint pos);
void copyBar(const QString original);
void copyCustomCommand(const QString original);
void editBar(QListWidgetItem *item);
void editCustomCommand(QListWidgetItem *item);
void editFanItem(QListWidgetItem *item);
void editHddItem(QListWidgetItem *item); void editHddItem(QListWidgetItem *item);
void editHddSpeedItem(QListWidgetItem *item); void editHddSpeedItem(QListWidgetItem *item);
void editMountItem(QListWidgetItem *item); void editMountItem(QListWidgetItem *item);
@ -83,6 +97,9 @@ private slots:
void setFontFormating(); void setFontFormating();
void setFormating(); void setFormating();
signals:
void thereIsUpdates(QString version);
protected: protected:
QList<QAction *> contextualActions(); QList<QAction *> contextualActions();
void createConfigurationInterface(KConfigDialog *parent); void createConfigurationInterface(KConfigDialog *parent);
@ -92,15 +109,19 @@ private:
void createActions(); void createActions();
QStringList findKeys(); QStringList findKeys();
QStringList getKeys(); QStringList getKeys();
QStringList findGraphicalItems();
void getGraphicalItems();
GraphicalItem *getItemByTag(const QString tag);
QList<ExtScript *> initScripts();
// ui // ui
QGraphicsGridLayout *mainLayout = nullptr; QGraphicsGridLayout *mainLayout = nullptr;
CustomLabel *textLabel = nullptr; CustomLabel *textLabel = nullptr;
QTimer *timer; QTimer *timer = nullptr;
QList<QAction *> contextMenu; QList<QAction *> contextMenu;
// tooltip // tooltip
Plasma::ToolTipContent toolTip; Plasma::ToolTipContent toolTip;
QGraphicsScene *toolTipScene; QGraphicsScene *toolTipScene = nullptr;
QGraphicsView *toolTipView; QGraphicsView *toolTipView = nullptr;
// values // values
int networkDeviceUpdate; int networkDeviceUpdate;
QMap<QString, int> counts; QMap<QString, int> counts;
@ -109,10 +130,11 @@ private:
// debug // debug
bool debug; bool debug;
// data engine // data engine
Plasma::DataEngine *extsysmonEngine; Plasma::DataEngine *extsysmonEngine = nullptr;
Plasma::DataEngine *sysmonEngine; Plasma::DataEngine *sysmonEngine = nullptr;
Plasma::DataEngine *timeEngine; Plasma::DataEngine *timeEngine = nullptr;
// configuration interface // configuration interface
Ui::About uiAboutConfig;
Ui::AdvancedWindow uiAdvancedConfig; Ui::AdvancedWindow uiAdvancedConfig;
Ui::AppearanceWindow uiAppConfig; Ui::AppearanceWindow uiAppConfig;
Ui::ConfigWindow uiWidConfig; Ui::ConfigWindow uiWidConfig;
@ -121,6 +143,8 @@ private:
// configuration // configuration
QMap<QString, QString> configuration; QMap<QString, QString> configuration;
QStringList diskDevices, keys, formatLine, foundKeys; QStringList diskDevices, keys, formatLine, foundKeys;
QList<GraphicalItem *> graphicalItems;
QStringList foundBars;
}; };

View File

@ -20,13 +20,19 @@
#include <KConfigDialog> #include <KConfigDialog>
#include <KGlobal> #include <KGlobal>
#include <KStandardDirs> #include <KStandardDirs>
#include <QDesktopServices>
#include <QDir>
#include <QInputDialog>
#include <QMenu> #include <QMenu>
#include <QNetworkInterface> #include <QNetworkInterface>
#include <QTextCodec> #include <QTextCodec>
#include <extscript.h>
#include <graphicalitem.h>
#include <fontdialog/fontdialog.h> #include <fontdialog/fontdialog.h>
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "version.h"
QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration() QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration()
@ -34,10 +40,7 @@ QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration()
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QMap<QString, QString> rawConfig; QMap<QString, QString> rawConfig;
rawConfig[QString("AC")] = QString("/sys/class/power_supply/AC/online"); rawConfig[QString("ACPIPATH")] = QString("/sys/class/power_supply/");
rawConfig[QString("BATTERY")] = QString("/sys/class/power_supply/BAT0/capacity");
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("GPUDEV")] = QString("auto");
rawConfig[QString("HDDDEV")] = QString("all"); rawConfig[QString("HDDDEV")] = QString("all");
rawConfig[QString("HDDTEMPCMD")] = QString("sudo hddtemp"); rawConfig[QString("HDDTEMPCMD")] = QString("sudo hddtemp");
@ -102,10 +105,8 @@ QMap<QString, QString> AwesomeWidget::updateDataEngineConfiguration(const QMap<Q
key = rawConfig.keys()[i]; key = rawConfig.keys()[i];
value = rawConfig[key]; value = rawConfig[key];
key.remove(QChar(' ')); key.remove(QChar(' '));
if ((key != QString("CUSTOM")) && if ((key != QString("HDDTEMPCMD")) &&
(key != QString("DESKTOPCMD")) && (key != QString("PKGCMD")))
(key != QString("HDDTEMPCMD")) &&
(key != QString("PKGCMD")))
value.remove(QChar(' ')); value.remove(QChar(' '));
config[key] = value; config[key] = value;
} }
@ -139,11 +140,15 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
uiDEConfig.setupUi(deConfigWidget); uiDEConfig.setupUi(deConfigWidget);
QWidget *tooltipWidget = new QWidget; QWidget *tooltipWidget = new QWidget;
uiTooltipConfig.setupUi(tooltipWidget); uiTooltipConfig.setupUi(tooltipWidget);
QWidget *aboutWidget = new QWidget;
uiAboutConfig.setupUi(aboutWidget);
//widget //widget
uiWidConfig.textEdit_elements->setPlainText(configuration[QString("text")]); uiWidConfig.textEdit_elements->setPlainText(configuration[QString("text")]);
uiWidConfig.comboBox_tags->clear(); uiWidConfig.comboBox_tags->clear();
uiWidConfig.comboBox_tags->addItems(getKeys()); uiWidConfig.comboBox_tags->addItems(getKeys());
for (int i=0; i<graphicalItems.count(); i++)
uiWidConfig.comboBox_tags->addItem(graphicalItems[i]->getName() + graphicalItems[i]->getBar());
// advanced // advanced
if (configuration[QString("background")].toInt() == 0) if (configuration[QString("background")].toInt() == 0)
@ -171,11 +176,16 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
QString sensor = qoutput.split(QString("\n\n"))[i]; QString sensor = qoutput.split(QString("\n\n"))[i];
for (int j=0; j<sensor.split(QChar('\n')).count(); j++) { for (int j=0; j<sensor.split(QChar('\n')).count(); j++) {
QString device = sensor.split(QChar('\n'))[j]; QString device = sensor.split(QChar('\n'))[j];
if (device.indexOf(QChar(0260)) > -1) { if (device.contains(QChar(0260))) {
QListWidgetItem *item = new QListWidgetItem(QString("lmsensors/") + sensor.split(QChar('\n'))[0] + QString("/") + QListWidgetItem *item = new QListWidgetItem(QString("lmsensors/") + sensor.split(QChar('\n'))[0] + QString("/") +
device.split(QChar(':'))[0].replace(QChar(' '), QChar('_'))); device.split(QChar(':'))[0].replace(QChar(' '), QChar('_')));
item->setCheckState(Qt::Unchecked); item->setCheckState(Qt::Unchecked);
uiAdvancedConfig.listWidget_tempDevice->addItem(item); 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);
} }
} }
} }
@ -191,6 +201,18 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
for (int j=0; j<items.count(); j++) for (int j=0; j<items.count(); j++)
items[j]->setCheckState(Qt::Checked); 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"); cmd = QString("mount");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
process = runTask(cmd); process = runTask(cmd);
@ -278,6 +300,19 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
Qt::MatchFixedString)); Qt::MatchFixedString));
uiAdvancedConfig.lineEdit_acOnline->setText(configuration[QString("acOnline")]); uiAdvancedConfig.lineEdit_acOnline->setText(configuration[QString("acOnline")]);
uiAdvancedConfig.lineEdit_acOffline->setText(configuration[QString("acOffline")]); uiAdvancedConfig.lineEdit_acOffline->setText(configuration[QString("acOffline")]);
uiAdvancedConfig.listWidget_bars->clear();
for (int i=0; i<graphicalItems.count(); i++) {
QListWidgetItem *item = new QListWidgetItem(graphicalItems[i]->getFileName());
QStringList tooltip;
tooltip.append(i18n("Tag: %1", graphicalItems[i]->getName() + graphicalItems[i]->getBar()));
tooltip.append(i18n("Comment: %1", graphicalItems[i]->getComment()));
item->setToolTip(tooltip.join(QChar('\n')));
uiAdvancedConfig.listWidget_bars->addItem(item);
}
if (configuration[QString("checkUpdates")].toInt() == 0)
uiAdvancedConfig.checkBox_updates->setCheckState(Qt::Unchecked);
else
uiAdvancedConfig.checkBox_updates->setCheckState(Qt::Checked);
// tooltip // tooltip
uiTooltipConfig.spinBox_tooltipNum->setValue(configuration[QString("tooltipNumber")].toInt()); uiTooltipConfig.spinBox_tooltipNum->setValue(configuration[QString("tooltipNumber")].toInt());
@ -338,17 +373,19 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
// dataengine // dataengine
QMap<QString, QString> deSettings = readDataEngineConfiguration(); QMap<QString, QString> deSettings = readDataEngineConfiguration();
uiDEConfig.lineEdit_acdev->setText(deSettings[QString("AC")]); uiDEConfig.lineEdit_acpi->setText(deSettings[QString("ACPIPATH")]);
uiDEConfig.lineEdit_batdev->setText(deSettings[QString("BATTERY")]); QList<ExtScript *> externalScripts = initScripts();
uiDEConfig.tableWidget_customCommand->clear(); uiDEConfig.listWidget_custom->clear();
uiDEConfig.tableWidget_customCommand->setRowCount(deSettings[QString("CUSTOM")].split(QString("@@")).count() + 1); for (int i=0; i<externalScripts.count(); i++) {
headerList.clear(); QListWidgetItem *item = new QListWidgetItem(externalScripts[i]->getFileName());
headerList.append(i18n("Custom command")); QStringList tooltip;
uiDEConfig.tableWidget_customCommand->setHorizontalHeaderLabels(headerList); tooltip.append(i18n("Name: %1", externalScripts[i]->getName()));
uiDEConfig.tableWidget_customCommand->horizontalHeader()->setResizeMode(QHeaderView::Stretch); tooltip.append(i18n("Comment: %1", externalScripts[i]->getComment()));
for (int i=0; i<deSettings[QString("CUSTOM")].split(QString("@@")).count(); i++) tooltip.append(i18n("Exec: %1", externalScripts[i]->getExec()));
uiDEConfig.tableWidget_customCommand->setItem(i, 0, new QTableWidgetItem(deSettings[QString("CUSTOM")].split(QString("@@"))[i])); item->setToolTip(tooltip.join(QChar('\n')));
uiDEConfig.lineEdit_desktopCmd->setText(deSettings[QString("DESKTOPCMD")]); uiDEConfig.listWidget_custom->addItem(item);
}
externalScripts.clear();
uiDEConfig.comboBox_gpudev->setCurrentIndex( uiDEConfig.comboBox_gpudev->setCurrentIndex(
uiDEConfig.comboBox_gpudev->findText(deSettings[QString("GPUDEV")], Qt::MatchFixedString)); uiDEConfig.comboBox_gpudev->findText(deSettings[QString("GPUDEV")], Qt::MatchFixedString));
cmd = QString("find /dev -name [hms]d[a-z]"); cmd = QString("find /dev -name [hms]d[a-z]");
@ -386,12 +423,37 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
uiDEConfig.comboBox_playerSelect->setCurrentIndex( uiDEConfig.comboBox_playerSelect->setCurrentIndex(
uiDEConfig.comboBox_playerSelect->findText(deSettings[QString("PLAYER")], Qt::MatchFixedString)); uiDEConfig.comboBox_playerSelect->findText(deSettings[QString("PLAYER")], Qt::MatchFixedString));
// about
uiAboutConfig.label_name->setText(QString(NAME));
uiAboutConfig.label_version->setText(i18n("Version %1\n(build date %2)", QString(VERSION), QString(BUILD_DATE)));
uiAboutConfig.label_description->setText(i18n("A set of minimalistic plasmoid widgets"));
uiAboutConfig.label_links->setText(i18n("Links:") + QString("<br>") +
QString("<a href=\"%1\">%2</a><br>").arg(QString(HOMEPAGE)).arg(i18n("Homepage")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(REPOSITORY)).arg(i18n("Repository")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(BUGTRACKER)).arg(i18n("Bugtracker")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(TRANSLATION)).arg(i18n("Translation issue")) +
QString("<a href=\"%1\">%2</a>").arg(QString(AUR_PACKAGES)).arg(i18n("AUR packages")));
uiAboutConfig.label_license->setText(QString("<small>&copy; %1 <a href=\"mailto:%2\">%3</a><br>").arg(QString(DATE)).arg(QString(EMAIL)).arg(QString(AUTHOR)) +
i18n("This software is licensed under %1", QString(LICENSE)) + QString("</small>"));
// 2nd tab
QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(QChar(';'), QString::SkipEmptyParts);
for (int i=0; i<trdPartyList.count(); i++)
trdPartyList[i] = QString("<a href=\"%3\">%1</a> (%2 license)")
.arg(trdPartyList[i].split(QChar(','))[0])
.arg(trdPartyList[i].split(QChar(','))[1])
.arg(trdPartyList[i].split(QChar(','))[2]);
uiAboutConfig.label_translators->setText(i18n("Translators: %1", QString(TRANSLATORS)));
uiAboutConfig.label_trdparty->setText(i18n("This software uses: %1", trdPartyList.join(QString(", "))));
parent->addPage(configWidget, i18n("Widget"), Applet::icon()); parent->addPage(configWidget, i18n("Widget"), Applet::icon());
parent->addPage(advWidget, i18n("Advanced"), QString("system-run")); parent->addPage(advWidget, i18n("Advanced"), QString("system-run"));
parent->addPage(tooltipWidget, i18n("Tooltip"), QString("preferences-desktop-color")); parent->addPage(tooltipWidget, i18n("Tooltip"), QString("preferences-desktop-color"));
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme")); parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
parent->addPage(deConfigWidget, i18n("DataEngine"), QString("utilities-system-monitor")); parent->addPage(deConfigWidget, i18n("DataEngine"), QString("utilities-system-monitor"));
parent->addPage(aboutWidget, i18n("About"), QString("help-about"));
connect(uiAdvancedConfig.listWidget_fanDevice, SIGNAL(itemActivated(QListWidgetItem *)),
this, SLOT(editFanItem(QListWidgetItem *)));
connect(uiAdvancedConfig.listWidget_hddDevice, SIGNAL(itemActivated(QListWidgetItem *)), connect(uiAdvancedConfig.listWidget_hddDevice, SIGNAL(itemActivated(QListWidgetItem *)),
this, SLOT(editHddItem(QListWidgetItem *))); this, SLOT(editHddItem(QListWidgetItem *)));
connect(uiAdvancedConfig.listWidget_hddSpeedDevice, SIGNAL(itemActivated(QListWidgetItem *)), connect(uiAdvancedConfig.listWidget_hddSpeedDevice, SIGNAL(itemActivated(QListWidgetItem *)),
@ -400,14 +462,20 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
this, SLOT(editMountItem(QListWidgetItem *))); this, SLOT(editMountItem(QListWidgetItem *)));
connect(uiAdvancedConfig.listWidget_tempDevice, SIGNAL(itemActivated(QListWidgetItem *)), connect(uiAdvancedConfig.listWidget_tempDevice, SIGNAL(itemActivated(QListWidgetItem *)),
this, SLOT(editTempItem(QListWidgetItem *))); this, SLOT(editTempItem(QListWidgetItem *)));
connect(uiDEConfig.tableWidget_customCommand, SIGNAL(itemChanged(QTableWidgetItem *)), connect(uiAdvancedConfig.listWidget_bars, SIGNAL(itemActivated(QListWidgetItem *)),
this, SLOT(addNewCustomCommand(QTableWidgetItem *))); this, SLOT(editBar(QListWidgetItem *)));
connect(uiDEConfig.tableWidget_customCommand, SIGNAL(customContextMenuRequested(QPoint)), connect(uiAdvancedConfig.listWidget_bars, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(contextMenuBars(QPoint)));
connect(uiDEConfig.listWidget_custom, SIGNAL(itemActivated(QListWidgetItem *)),
this, SLOT(editCustomCommand(QListWidgetItem *)));
connect(uiDEConfig.listWidget_custom, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(contextMenuCustomCommand(QPoint))); this, SLOT(contextMenuCustomCommand(QPoint)));
connect(uiDEConfig.tableWidget_pkgCommand, SIGNAL(itemChanged(QTableWidgetItem *)), connect(uiDEConfig.tableWidget_pkgCommand, SIGNAL(itemChanged(QTableWidgetItem *)),
this, SLOT(addNewPkgCommand(QTableWidgetItem *))); this, SLOT(addNewPkgCommand(QTableWidgetItem *)));
connect(uiDEConfig.tableWidget_pkgCommand, SIGNAL(customContextMenuRequested(QPoint)), connect(uiDEConfig.tableWidget_pkgCommand, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(contextMenuPkgCommand(QPoint))); this, SLOT(contextMenuPkgCommand(QPoint)));
connect(uiAdvancedConfig.pushButton_bars, SIGNAL(clicked(bool)), this, SLOT(addBar()));
connect(uiDEConfig.pushButton_custom, SIGNAL(clicked(bool)), this, SLOT(addCustomScript()));
connect(uiWidConfig.pushButton_tags, SIGNAL(clicked(bool)), this, SLOT(setFormating())); connect(uiWidConfig.pushButton_tags, SIGNAL(clicked(bool)), this, SLOT(setFormating()));
connect(uiWidConfig.pushButton_br, 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_font, SIGNAL(clicked(bool)), this, SLOT(setFontFormating()));
@ -448,6 +516,11 @@ void AwesomeWidget::configAccepted()
items.append(uiAdvancedConfig.listWidget_tempDevice->item(i)->text()); items.append(uiAdvancedConfig.listWidget_tempDevice->item(i)->text());
cg.writeEntry("tempDevice", items.join(QString("@@"))); cg.writeEntry("tempDevice", items.join(QString("@@")));
items.clear(); 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++) for (int i=0; i<uiAdvancedConfig.listWidget_mount->count(); i++)
if (uiAdvancedConfig.listWidget_mount->item(i)->checkState() == Qt::Checked) if (uiAdvancedConfig.listWidget_mount->item(i)->checkState() == Qt::Checked)
items.append(uiAdvancedConfig.listWidget_mount->item(i)->text()); items.append(uiAdvancedConfig.listWidget_mount->item(i)->text());
@ -466,6 +539,7 @@ void AwesomeWidget::configAccepted()
cg.writeEntry("customNetdev", uiAdvancedConfig.comboBox_netdev->currentText()); cg.writeEntry("customNetdev", uiAdvancedConfig.comboBox_netdev->currentText());
cg.writeEntry("acOnline", uiAdvancedConfig.lineEdit_acOnline->text()); cg.writeEntry("acOnline", uiAdvancedConfig.lineEdit_acOnline->text());
cg.writeEntry("acOffline", uiAdvancedConfig.lineEdit_acOffline->text()); cg.writeEntry("acOffline", uiAdvancedConfig.lineEdit_acOffline->text());
cg.writeEntry("checkUpdates", QString::number(uiAdvancedConfig.checkBox_updates->checkState()));
// tooltip // tooltip
cg.writeEntry("tooltipNumber", QString::number(uiTooltipConfig.spinBox_tooltipNum->value())); cg.writeEntry("tooltipNumber", QString::number(uiTooltipConfig.spinBox_tooltipNum->value()));
@ -496,14 +570,7 @@ void AwesomeWidget::configAccepted()
// dataengine // dataengine
QMap<QString, QString> deSettings; QMap<QString, QString> deSettings;
deSettings[QString("AC")] = uiDEConfig.lineEdit_acdev->text(); deSettings[QString("ACPIPATH")] = uiDEConfig.lineEdit_acpi->text();
deSettings[QString("BATTERY")] = uiDEConfig.lineEdit_batdev->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("GPUDEV")] = uiDEConfig.comboBox_gpudev->currentText();
deSettings[QString("HDDDEV")] = uiDEConfig.comboBox_hdddev->currentText(); deSettings[QString("HDDDEV")] = uiDEConfig.comboBox_hdddev->currentText();
deSettings[QString("HDDTEMPCMD")] = uiDEConfig.lineEdit_hddtempCmd->text(); deSettings[QString("HDDTEMPCMD")] = uiDEConfig.lineEdit_hddtempCmd->text();
@ -541,6 +608,7 @@ void AwesomeWidget::configChanged()
configuration[QString("customUptime")] = cg.readEntry("customUptime", "$dd,$hh,$mm"); configuration[QString("customUptime")] = cg.readEntry("customUptime", "$dd,$hh,$mm");
configuration[QString("tempUnits")] = cg.readEntry("tempUnits", "Celsius"); configuration[QString("tempUnits")] = cg.readEntry("tempUnits", "Celsius");
configuration[QString("tempDevice")] = cg.readEntry("tempDevice", ""); configuration[QString("tempDevice")] = cg.readEntry("tempDevice", "");
configuration[QString("fanDevice")] = cg.readEntry("fanDevice", "");
configuration[QString("mount")] = cg.readEntry("mount", "/"); configuration[QString("mount")] = cg.readEntry("mount", "/");
configuration[QString("hdd")] = cg.readEntry("hdd", "/dev/sda"); configuration[QString("hdd")] = cg.readEntry("hdd", "/dev/sda");
configuration[QString("disk")] = cg.readEntry("disk", "disk/sda_(8:0)"); configuration[QString("disk")] = cg.readEntry("disk", "disk/sda_(8:0)");
@ -548,6 +616,7 @@ void AwesomeWidget::configChanged()
configuration[QString("customNetdev")] = cg.readEntry("customNetdev", "lo"); configuration[QString("customNetdev")] = cg.readEntry("customNetdev", "lo");
configuration[QString("acOnline")] = cg.readEntry("acOnline", "(*)"); configuration[QString("acOnline")] = cg.readEntry("acOnline", "(*)");
configuration[QString("acOffline")] = cg.readEntry("acOffline", "( )"); configuration[QString("acOffline")] = cg.readEntry("acOffline", "( )");
configuration[QString("checkUpdates")] = cg.readEntry("checkUpdates", "2");
// tooltip // tooltip
tooltipValues.clear(); tooltipValues.clear();
@ -607,7 +676,7 @@ void AwesomeWidget::configChanged()
fontStyle = QString("italic"); fontStyle = QString("italic");
else else
fontStyle = QString("normal"); fontStyle = QString("normal");
formatLine[0] = QString("<html><head><style type=\"text/css\">p, li { white-space: pre-wrap; }</style>\ formatLine[0] = QString("<html><head><style type=\"text/css\">body { white-space: pre-wrap; }</style>\
</head><body style=\"font-family:'%1'; font-size:%2pt; font-weight:%3; font-style:%4; color:%5;\">") </head><body style=\"font-family:'%1'; font-size:%2pt; font-weight:%3; font-style:%4; color:%5;\">")
.arg(font.family()) .arg(font.family())
.arg(font.pointSize()) .arg(font.pointSize())
@ -618,9 +687,16 @@ void AwesomeWidget::configChanged()
// counts // counts
QMap<QString, QString> deSettings = readDataEngineConfiguration(); 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].contains(batRegexp))
counts[QString("bat")]++;
counts[QString("cpu")] = getNumberCpus(); counts[QString("cpu")] = getNumberCpus();
counts[QString("custom")] = deSettings[QString("CUSTOM")].split(QString("@@")).count(); counts[QString("custom")] = initScripts().count();
counts[QString("disk")] = configuration[QString("disk")].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("hddtemp")] = configuration[QString("hdd")].split(QString("@@")).count();
counts[QString("mount")] = configuration[QString("mount")].split(QString("@@")).count(); counts[QString("mount")] = configuration[QString("mount")].split(QString("@@")).count();
counts[QString("pkg")] = deSettings[QString("PKGCMD")].split(QChar(',')).count(); counts[QString("pkg")] = deSettings[QString("PKGCMD")].split(QChar(',')).count();
@ -638,13 +714,58 @@ void AwesomeWidget::configChanged()
} }
void AwesomeWidget::addNewCustomCommand(QTableWidgetItem *item) void AwesomeWidget::addBar()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (item->row() == (uiDEConfig.tableWidget_customCommand->rowCount() - 1)) int number = 0;
uiDEConfig.tableWidget_customCommand->insertRow( while (true) {
uiDEConfig.tableWidget_customCommand->rowCount()); bool exit = true;
for (int i=0; i<graphicalItems.count(); i++)
if (graphicalItems[i]->getName() == QString("bar%1").arg(number)) {
number++;
exit = false;
break;
}
if (exit) break;
}
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_applet_awesome-widget/desktops");
bool ok;
QString name = QInputDialog::getText(0, i18n("Enter file name"),
i18n("File name"), QLineEdit::Normal,
QString(""), &ok);
if ((!ok) || (name.isEmpty())) return;
if (!name.endsWith(QString(".desktop"))) name += QString(".desktop");
QStringList bars;
bars.append(keys.filter((QRegExp(QString("cpu(?!cl).*")))));
bars.append(keys.filter((QRegExp(QString("^gpu$")))));
bars.append(keys.filter((QRegExp(QString("^mem$")))));
bars.append(keys.filter((QRegExp(QString("^swap$")))));
bars.append(keys.filter((QRegExp(QString("^hdd[0-9].*")))));
bars.append(keys.filter((QRegExp(QString("^bat.*")))));
GraphicalItem *item = new GraphicalItem(0, name, dirs, debug);
item->setName(QString("bar%1").arg(number));
item->showConfiguration(bars);
}
void AwesomeWidget::addCustomScript()
{
if (debug) qDebug() << PDEBUG;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_applet_awesome-widget/desktops");
bool ok;
QString name = QInputDialog::getText(0, i18n("Enter file name"),
i18n("File name"), QLineEdit::Normal,
QString(""), &ok);
if ((!ok) || (name.isEmpty())) return;
if (!name.endsWith(QString(".desktop"))) name += QString(".desktop");
ExtScript *script = new ExtScript(0, name, dirs, debug);
script->showConfiguration();
} }
@ -663,17 +784,53 @@ void AwesomeWidget::addNewPkgCommand(QTableWidgetItem *item)
} }
void AwesomeWidget::contextMenuBars(const QPoint pos)
{
if (debug) qDebug() << PDEBUG;
if (uiAdvancedConfig.listWidget_bars->currentItem() == 0) return;
QMenu menu(uiAdvancedConfig.listWidget_bars);
QAction *edit = menu.addAction(QIcon::fromTheme("document-edit"), i18n("Edit"));
QAction *copy = menu.addAction(QIcon::fromTheme("edit-copy"), i18n("Copy"));
QAction *remove = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Remove"));
QAction *action = menu.exec(uiAdvancedConfig.listWidget_bars->viewport()->mapToGlobal(pos));
if (action == edit)
editBar(uiAdvancedConfig.listWidget_bars->currentItem());
else if (action == copy)
copyBar(uiAdvancedConfig.listWidget_bars->currentItem()->text());
else if (action == remove)
for (int i=0; i<graphicalItems.count(); i++) {
if (graphicalItems[i]->getFileName() != uiAdvancedConfig.listWidget_bars->currentItem()->text())
continue;
graphicalItems[i]->tryDelete();
graphicalItems.takeAt(i);
uiAdvancedConfig.listWidget_bars->takeItem(uiAdvancedConfig.listWidget_bars->currentRow());
break;
}
}
void AwesomeWidget::contextMenuCustomCommand(const QPoint pos) void AwesomeWidget::contextMenuCustomCommand(const QPoint pos)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (uiDEConfig.tableWidget_customCommand->currentItem() == 0) return; if (uiDEConfig.listWidget_custom->currentItem() == 0) return;
QMenu menu(uiDEConfig.tableWidget_customCommand); QMenu menu(uiDEConfig.listWidget_custom);
QAction *edit = menu.addAction(QIcon::fromTheme("document-edit"), i18n("Edit"));
QAction *copy = menu.addAction(QIcon::fromTheme("edit-copy"), i18n("Copy"));
QAction *remove = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Remove")); QAction *remove = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Remove"));
QAction *action = menu.exec(uiDEConfig.tableWidget_customCommand->viewport()->mapToGlobal(pos)); QAction *action = menu.exec(uiDEConfig.listWidget_custom->viewport()->mapToGlobal(pos));
if (action == remove) if (action == edit)
uiDEConfig.tableWidget_customCommand->removeRow( editCustomCommand(uiDEConfig.listWidget_custom->currentItem());
uiDEConfig.tableWidget_customCommand->currentRow()); else if (action == copy)
copyCustomCommand(uiDEConfig.listWidget_custom->currentItem()->text());
else if (action == remove) {
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
ExtScript *script = new ExtScript(0, uiDEConfig.listWidget_custom->currentItem()->text(), dirs, debug);
script->tryDelete();
delete script;
uiDEConfig.listWidget_custom->takeItem(uiDEConfig.listWidget_custom->currentRow());
}
} }
@ -691,6 +848,126 @@ void AwesomeWidget::contextMenuPkgCommand(const QPoint pos)
} }
void AwesomeWidget::copyBar(const QString original)
{
if (debug) qDebug() << PDEBUG;
int number = 0;
while (true) {
bool exit = true;
for (int i=0; i<graphicalItems.count(); i++)
if (graphicalItems[i]->getName() == QString("bar%1").arg(number)) {
number++;
exit = false;
break;
}
if (exit) break;
}
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_applet_awesome-widget/desktops");
bool ok;
QString name = QInputDialog::getText(0, i18n("Enter file name"),
i18n("File name"), QLineEdit::Normal,
QString(""), &ok);
if ((!ok) || (name.isEmpty())) return;
if (!name.endsWith(QString(".desktop"))) name += QString(".desktop");
QStringList bars;
bars.append(keys.filter((QRegExp(QString("cpu(?!cl).*")))));
bars.append(keys.filter((QRegExp(QString("^gpu$")))));
bars.append(keys.filter((QRegExp(QString("^mem$")))));
bars.append(keys.filter((QRegExp(QString("^swap$")))));
bars.append(keys.filter((QRegExp(QString("^hdd[0-9].*")))));
bars.append(keys.filter((QRegExp(QString("^bat.*")))));
GraphicalItem *originalItem = nullptr;
for (int i=0; i<graphicalItems.count(); i++) {
if (graphicalItems[i]->getFileName() != original) continue;
originalItem = graphicalItems[i];
break;
}
GraphicalItem *item = new GraphicalItem(0, name, dirs, debug);
item->setName(QString("bar%1").arg(number));
item->setComment(originalItem->getComment());
item->setBar(originalItem->getBar());
item->setActiveColor(originalItem->getActiveColor());
item->setInactiveColor(originalItem->getInactiveColor());
item->setType(originalItem->getStrType());
item->setDirection(originalItem->getStrDirection());
item->setHeight(originalItem->getHeight());
item->setWidth(originalItem->getWidth());
delete originalItem;
item->showConfiguration(bars);
delete item;
}
void AwesomeWidget::copyCustomCommand(const QString original)
{
if (debug) qDebug() << PDEBUG;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_applet_awesome-widget/desktops");
bool ok;
QString name = QInputDialog::getText(0, i18n("Enter file name"),
i18n("File name"), QLineEdit::Normal,
QString(""), &ok);
if ((!ok) || (name.isEmpty())) return;
if (!name.endsWith(QString(".desktop"))) name += QString(".desktop");
ExtScript *originalScript = new ExtScript(0, original, dirs, debug);
ExtScript *script = new ExtScript(0, name, dirs, debug);
script->setActive(originalScript->isActive());
script->setComment(originalScript->getComment());
script->setExec(originalScript->getExec());
script->setHasOutput(originalScript->hasOutput());
script->setInterval(originalScript->getInterval());
script->setName(originalScript->getName());
script->setPrefix(originalScript->getPrefix());
script->setRedirect(originalScript->getStrRedirect());
delete originalScript;
script->showConfiguration();
delete script;
}
void AwesomeWidget::editBar(QListWidgetItem *item)
{
if (debug) qDebug() << PDEBUG;
QStringList bars;
bars.append(keys.filter((QRegExp(QString("^cpu(?!cl).*")))));
bars.append(keys.filter((QRegExp(QString("^gpu$")))));
bars.append(keys.filter((QRegExp(QString("^mem$")))));
bars.append(keys.filter((QRegExp(QString("^swap$")))));
bars.append(keys.filter((QRegExp(QString("^hdd[0-9].*")))));
bars.append(keys.filter((QRegExp(QString("^bat.*")))));
for (int i=0; i<graphicalItems.count(); i++) {
if (graphicalItems[i]->getFileName() != item->text()) continue;
graphicalItems[i]->showConfiguration(bars);
break;
}
}
void AwesomeWidget::editCustomCommand(QListWidgetItem *item)
{
if (debug) qDebug() << PDEBUG;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
ExtScript *script = new ExtScript(0, item->text(), dirs, debug);
script->showConfiguration();
}
void AwesomeWidget::editFanItem(QListWidgetItem *item)
{
if (debug) qDebug() << PDEBUG;
uiAdvancedConfig.listWidget_fanDevice->openPersistentEditor(item);
}
void AwesomeWidget::editHddItem(QListWidgetItem *item) void AwesomeWidget::editHddItem(QListWidgetItem *item)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -723,6 +1000,33 @@ void AwesomeWidget::editTempItem(QListWidgetItem *item)
} }
QList<ExtScript *> AwesomeWidget::initScripts()
{
if (debug) qDebug() << PDEBUG;
QList<ExtScript *> externalScripts;
// create directory at $HOME
QString localDir = KStandardDirs::locateLocal("data", "plasma_engine_extsysmon/scripts");
if (KStandardDirs::makeDir(localDir))
if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir;
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
QStringList names;
for (int i=0; i<dirs.count(); i++) {
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
for (int j=0; j<files.count(); j++) {
if (!files[j].endsWith(QString(".desktop"))) continue;
if (names.contains(files[j])) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
names.append(files[j]);
externalScripts.append(new ExtScript(0, files[j], dirs, debug));
}
}
return externalScripts;
}
void AwesomeWidget::setFontFormating() void AwesomeWidget::setFontFormating()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -734,9 +1038,9 @@ void AwesomeWidget::setFontFormating()
false, false); false, false);
if (font != defaultFont) { if (font != defaultFont) {
QString selectedText = uiWidConfig.textEdit_elements->textCursor().selectedText(); QString selectedText = uiWidConfig.textEdit_elements->textCursor().selectedText();
uiWidConfig.textEdit_elements->insertPlainText(QString("<font color=\"%1\" face=\"%2\" size=\"%3\">") 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()) + .arg(font.color().name()).arg(font.family()).arg(font.pointSize()) +
selectedText + QString("</font>")); selectedText + QString("</span>"));
} }
} }

View File

@ -26,7 +26,7 @@
CustomLabel::CustomLabel(AwesomeWidget *wid, const bool debugCmd) CustomLabel::CustomLabel(AwesomeWidget *wid, const bool debugCmd)
: Plasma::Label(wid), : QLabel(0),
widget(wid), widget(wid),
debug(debugCmd) debug(debugCmd)
{ {
@ -49,7 +49,7 @@ void CustomLabel::setPopupEnabled(const bool state)
} }
void CustomLabel::mousePressEvent(QGraphicsSceneMouseEvent *event) void CustomLabel::mousePressEvent(QMouseEvent *event)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button(); if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
@ -65,7 +65,7 @@ void CustomLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Kernel: %1\n").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed()); text += QString("Kernel: %1<br>").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// hostname // hostname
cmd = QString("uname -n"); cmd = QString("uname -n");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
@ -73,7 +73,7 @@ void CustomLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Hostname: %1\n").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed()); text += QString("Hostname: %1<br>").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// whoami // whoami
cmd = QString("whoami"); cmd = QString("whoami");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
@ -81,7 +81,7 @@ void CustomLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Whoami: %1\n").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed()); text += QString("Whoami: %1<br>").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// uptime // uptime
cmd = QString("uptime"); cmd = QString("uptime");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
@ -89,24 +89,9 @@ void CustomLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
text += QString("Uptime: %1\n").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed()); text += QString("Uptime: %1").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed());
// ps stats
cmd = QString("ps --no-headers -o command");
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;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
QStringList processes;
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++)
if (qoutput.split(QChar('\n'))[i] != QString("ps --no-headers -o command"))
processes.append(qoutput.split(QChar('\n'))[i]);
text += QString("ps stats: %1 | %2")
.arg(processes.count())
.arg(processes.join(QChar(',')));
widget->sendNotification(QString("system"), text); widget->sendNotification(QString("system"), text);
} }
emit(Plasma::Label::mousePressEvent(event)); emit(QWidget::mousePressEvent(event));
} }

View File

@ -18,22 +18,22 @@
#ifndef CUSTOMLABEL_H #ifndef CUSTOMLABEL_H
#define CUSTOMLABEL_H #define CUSTOMLABEL_H
#include <Plasma/Label> #include <QLabel>
class AwesomeWidget; class AwesomeWidget;
class CustomLabel : public Plasma::Label class CustomLabel : public QLabel
{ {
Q_OBJECT Q_OBJECT
public: public:
CustomLabel(AwesomeWidget *wid, const bool debugCmd); CustomLabel(AwesomeWidget *wid, const bool debugCmd = false);
~CustomLabel(); ~CustomLabel();
void setPopupEnabled(const bool state); void setPopupEnabled(const bool state);
protected: protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event); void mousePressEvent(QMouseEvent *event);
private: private:
AwesomeWidget *widget; AwesomeWidget *widget;

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>700</width> <width>700</width>
<height>594</height> <height>582</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -43,127 +43,47 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>684</width> <width>684</width>
<height>578</height> <height>566</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="5" column="0"> <item row="4" column="0">
<layout class="QHBoxLayout" name="layout_hdddev"> <layout class="QHBoxLayout" name="layout_hddtempCmd">
<item> <item>
<widget class="QLabel" name="label_hdddev"> <widget class="QLabel" name="label_hddtempCmd">
<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"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" 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"> <property name="text">
<string>MPD port</string> <string>hddtemp cmd</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>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </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> </widget>
</item> </item>
<item>
<widget class="QLineEdit" name="lineEdit_hddtempCmd"/>
</item>
</layout> </layout>
</item> </item>
<item row="4" column="0"> <item row="2" column="0">
<layout class="QHBoxLayout" name="layout_gpudev"> <layout class="QHBoxLayout" name="layout_gpudev">
<item> <item>
<widget class="QLabel" name="label_gpudev"> <widget class="QLabel" name="label_gpudev">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>GPU device</string> <string>GPU device</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBox_gpudev"> <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> <item>
<property name="text"> <property name="text">
<string notr="true">auto</string> <string notr="true">auto</string>
@ -188,56 +108,39 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="12" column="0"> <item row="3" column="0">
<spacer name="spacer_dataengine"> <layout class="QHBoxLayout" name="layout_hdddev">
<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="6" column="0">
<layout class="QHBoxLayout" name="layout_hddtempCmd">
<item> <item>
<widget class="QLabel" name="label_hddtempCmd"> <widget class="QLabel" name="label_hdddev">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>hddtemp cmd</string> <string>HDD</string>
</property> </property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_hddtempCmd">
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QComboBox" name="comboBox_hdddev"/>
</item>
</layout> </layout>
</item> </item>
<item row="10" column="0"> <item row="8" column="0">
<layout class="QHBoxLayout" name="layout_playerSelect"> <layout class="QHBoxLayout" name="layout_playerSelect">
<item> <item>
<widget class="QLabel" name="label_playerSelect"> <widget class="QLabel" name="label_playerSelect">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Music player</string> <string>Music player</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -248,12 +151,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">mpris</string> <string notr="true">mpris</string>
@ -268,55 +165,100 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="0"> <item row="6" column="0">
<layout class="QHBoxLayout" name="layout_mpdport">
<item>
<widget class="QLabel" name="label_mpdport">
<property name="text">
<string>MPD port</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_mpdport">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>50000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>6600</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="layout_mpdaddress"> <layout class="QHBoxLayout" name="layout_mpdaddress">
<item> <item>
<widget class="QLabel" name="label_mpdaddress"> <widget class="QLabel" name="label_mpdaddress">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>MPD address</string> <string>MPD address</string>
</property> </property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_mpdaddress">
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLineEdit" name="lineEdit_mpdaddress"/>
</item>
</layout> </layout>
</item> </item>
<item row="3" column="0"> <item row="10" column="0">
<layout class="QHBoxLayout" name="layout_desktopCmd"> <spacer name="spacer_dataengine">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="layout_acpi">
<item> <item>
<widget class="QLabel" name="label_desktopCmd"> <widget class="QLabel" name="label_acpi">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Desktop check cmd</string> <string>ACPI path</string>
</property> </property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_desktopCmd">
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLineEdit" name="lineEdit_acpi">
<property name="toolTip">
<string>&quot;/sys/class/power_supply/&quot; by default</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="9" column="0"> <item row="7" column="0">
<layout class="QVBoxLayout" name="layout_mpris"> <layout class="QVBoxLayout" name="layout_mpris">
<item> <item>
<widget class="QLabel" name="label_mprisInfo"> <widget class="QLabel" name="label_mprisInfo">
@ -332,15 +274,18 @@
<layout class="QHBoxLayout" name="layout_mprisSelect"> <layout class="QHBoxLayout" name="layout_mprisSelect">
<item> <item>
<widget class="QLabel" name="label_mpris"> <widget class="QLabel" name="label_mpris">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>200</width> <horstretch>0</horstretch>
<height>0</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>MPRIS player name</string> <string>MPRIS player name</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -351,12 +296,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="editable"> <property name="editable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -406,7 +345,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="11" column="0"> <item row="9" column="0">
<layout class="QVBoxLayout" name="layout_pkgCommand"> <layout class="QVBoxLayout" name="layout_pkgCommand">
<item> <item>
<widget class="QTableWidget" name="tableWidget_pkgCommand"> <widget class="QTableWidget" name="tableWidget_pkgCommand">
@ -440,71 +379,43 @@ del - remove item</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" 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="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="layout_batdev"> <layout class="QVBoxLayout" name="layout_custom">
<item> <item>
<widget class="QLabel" name="label_batdev"> <layout class="QHBoxLayout" name="layout_customAdd">
<property name="minimumSize"> <item>
<size> <widget class="QLabel" name="label_custom">
<width>200</width> <property name="text">
<height>0</height> <string>Custom scripts</string>
</size> </property>
</property> </widget>
<property name="text"> </item>
<string>Battery device</string> <item>
</property> <spacer name="spacer_custom">
</widget> <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_custom">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="lineEdit_batdev"> <widget class="QListWidget" name="listWidget_custom">
<property name="toolTip"> <property name="contextMenuPolicy">
<string>&quot;/sys/class/power_supply/BAT0/capacity&quot; by default</string> <enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="layout_acdev">
<item>
<widget class="QLabel" name="label_acdev">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>AC device</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_acdev">
<property name="toolTip">
<string>&quot;/sys/class/power_supply/AC/online&quot; by default</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -20,6 +20,7 @@
#include <QRegExp> #include <QRegExp>
#include <math.h> #include <math.h>
#include "graphicalitem.h"
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
@ -29,15 +30,17 @@ void AwesomeWidget::connectToEngine()
QRegExp regExp; QRegExp regExp;
// battery // battery
regExp = QRegExp(QString("(ac|bat)")); regExp = QRegExp(QString("(^|bar[0-9].*)(ac|bat.*)"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("batteryTooltip")].toInt() == 2)) (configuration[QString("batteryTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->connectSource(QString("battery"), extsysmonEngine->connectSource(QString("battery"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
// cpu // cpu
regExp = QRegExp(QString("cpu[0-9].*")); regExp = QRegExp(QString("(^|bar[0-9].*)cpu(?!cl).*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuTooltip")].toInt() == 2)) { (configuration[QString("cpuTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->connectSource(QString("cpu/system/TotalLoad"), sysmonEngine->connectSource(QString("cpu/system/TotalLoad"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
for (int i=0; i<counts[QString("cpu")]; i++) for (int i=0; i<counts[QString("cpu")]; i++)
@ -45,7 +48,7 @@ void AwesomeWidget::connectToEngine()
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
} }
// cpuclock // cpuclock
regExp = QRegExp(QString("cpucl[0-9].*")); regExp = QRegExp(QString("cpucl.*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuclTooltip")].toInt() == 2)) { (configuration[QString("cpuclTooltip")].toInt() == 2)) {
sysmonEngine->connectSource(QString("cpu/system/AverageClock"), sysmonEngine->connectSource(QString("cpu/system/AverageClock"),
@ -73,9 +76,16 @@ void AwesomeWidget::connectToEngine()
sysmonEngine->connectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/wblk"), sysmonEngine->connectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/wblk"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
} }
// gpu // fan
regExp = QRegExp(QString("gpu")); regExp = QRegExp(QString("fan.*"));
if (foundKeys.indexOf(regExp) > -1) if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("fanDevice")].split(QString("@@")).count(); i++)
sysmonEngine->connectSource(configuration[QString("fanDevice")].split(QString("@@"))[i],
this, configuration[QString("interval")].toInt());
// gpu
regExp = QRegExp(QString("(^|bar[0-9].*)gpu"));
if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->connectSource(QString("gpu"), extsysmonEngine->connectSource(QString("gpu"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
// gputemp // gputemp
@ -84,8 +94,9 @@ void AwesomeWidget::connectToEngine()
extsysmonEngine->connectSource(QString("gputemp"), extsysmonEngine->connectSource(QString("gputemp"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
// mount // mount
regExp = QRegExp(QString("hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*")); regExp = QRegExp(QString("(^|bar[0-9].*)hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*"));
if (foundKeys.indexOf(regExp) > -1) if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
for (int i=0; i<configuration[QString("mount")].split(QString("@@")).count(); i++) { for (int i=0; i<configuration[QString("mount")].split(QString("@@")).count(); i++) {
sysmonEngine->connectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/filllevel"), sysmonEngine->connectSource(QString("partitions") + configuration[QString("mount")].split(QString("@@"))[i] + QString("/filllevel"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
@ -100,9 +111,10 @@ void AwesomeWidget::connectToEngine()
extsysmonEngine->connectSource(QString("hddtemp"), extsysmonEngine->connectSource(QString("hddtemp"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
// memory // memory
regExp = QRegExp(QString("mem.*")); regExp = QRegExp(QString("(^|bar[0-9].*)mem.*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("memTooltip")].toInt() == 2)) { (configuration[QString("memTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->connectSource(QString("mem/physical/free"), sysmonEngine->connectSource(QString("mem/physical/free"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("mem/physical/used"), sysmonEngine->connectSource(QString("mem/physical/used"),
@ -136,9 +148,10 @@ void AwesomeWidget::connectToEngine()
extsysmonEngine->connectSource(QString("ps"), extsysmonEngine->connectSource(QString("ps"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
// swap // swap
regExp = QRegExp(QString("swap.*")); regExp = QRegExp(QString("(^|bar[0-9].*)swap.*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("swapTooltip")].toInt() == 2)) { (configuration[QString("swapTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->connectSource(QString("mem/swap/free"), sysmonEngine->connectSource(QString("mem/swap/free"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("mem/swap/used"), sysmonEngine->connectSource(QString("mem/swap/used"),
@ -182,11 +195,22 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
if (data.keys().isEmpty()) return; if (data.keys().isEmpty()) return;
if (sourceName == QString("battery")) { if (sourceName == QString("battery")) {
if (data[QString("ac")].toBool()) for (int i=0; i<data.keys().count(); i++) {
values[QString("ac")] = configuration[QString("acOnline")]; if (data.keys()[i] == QString("ac")) {
else if (data[QString("ac")].toBool())
values[QString("ac")] = configuration[QString("acOffline")]; values[QString("ac")] = configuration[QString("acOnline")];
values[QString("bat")] = QString("%1").arg(data[QString("bat")].toFloat(), 3, 'f', 0); else
values[QString("ac")] = configuration[QString("acOffline")];
} else {
values[data.keys()[i]] = QString("%1").arg(data[data.keys()[i]].toFloat(), 3, 'f', 0);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*bat"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != data.keys()[i]) continue;
values[foundBars[j]] = values[data.keys()[i]];
}
}
}
}
if ((configuration[QString("batteryTooltip")].toInt() == 2) && if ((configuration[QString("batteryTooltip")].toInt() == 2) &&
(!isnan(data[QString("bat")].toFloat()))) { (!isnan(data[QString("bat")].toFloat()))) {
if (tooltipValues[QString("bat")].count() > configuration[QString("tooltipNumber")].toInt()) if (tooltipValues[QString("bat")].count() > configuration[QString("tooltipNumber")].toInt())
@ -198,17 +222,29 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
} }
} else if (sourceName == QString("cpu/system/TotalLoad")) { } else if (sourceName == QString("cpu/system/TotalLoad")) {
values[QString("cpu")] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1); values[QString("cpu")] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*cpu(?!cl).*"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("cpu")) continue;
values[foundBars[j]] = QString("%1").arg(data[QString("value")].toFloat());
}
}
if ((configuration[QString("cpuTooltip")].toInt() == 2) && if ((configuration[QString("cpuTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) { (!isnan(data[QString("value")].toFloat()))) {
if (tooltipValues[QString("cpu")].count() > configuration[QString("tooltipNumber")].toInt()) if (tooltipValues[QString("cpu")].count() > configuration[QString("tooltipNumber")].toInt())
tooltipValues[QString("cpu")].takeFirst(); tooltipValues[QString("cpu")].takeFirst();
tooltipValues[QString("cpu")].append(data[QString("value")].toFloat()); tooltipValues[QString("cpu")].append(data[QString("value")].toFloat());
} }
} else if (sourceName.indexOf(cpuRegExp) > -1) { } else if (sourceName.contains(cpuRegExp)) {
QString number = sourceName; QString number = sourceName;
number.remove(QString("cpu/cpu")); number.remove(QString("cpu/cpu"));
number.remove(QString("/TotalLoad")); number.remove(QString("/TotalLoad"));
values[QString("cpu") + number] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1); values[QString("cpu") + number] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*cpu(?!cl).*"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != (QString("cpu") + number)) continue;
values[foundBars[j]] = values[QString("cpu") + number];
}
}
} else if (sourceName == QString("cpu/system/AverageClock")) { } else if (sourceName == QString("cpu/system/AverageClock")) {
values[QString("cpucl")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0); values[QString("cpucl")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
if ((configuration[QString("cpuclTooltip")].toInt() == 2) && if ((configuration[QString("cpuclTooltip")].toInt() == 2) &&
@ -217,7 +253,7 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
tooltipValues[QString("cpucl")].takeFirst(); tooltipValues[QString("cpucl")].takeFirst();
tooltipValues[QString("cpucl")].append(data[QString("value")].toFloat()); tooltipValues[QString("cpucl")].append(data[QString("value")].toFloat());
} }
} else if (sourceName.indexOf(cpuclRegExp) > -1) { } else if (sourceName.contains(cpuclRegExp)) {
QString number = sourceName; QString number = sourceName;
number.remove(QString("cpu/cpu")); number.remove(QString("cpu/cpu"));
number.remove(QString("/clock")); number.remove(QString("/clock"));
@ -229,7 +265,7 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
values[QString("desktop")] = data[QString("currentName")].toString(); values[QString("desktop")] = data[QString("currentName")].toString();
values[QString("ndesktop")] = QString("%1").arg(data[QString("currentNumber")].toInt()); values[QString("ndesktop")] = QString("%1").arg(data[QString("currentNumber")].toInt());
values[QString("tdesktops")] = QString("%1").arg(data[QString("number")].toInt()); values[QString("tdesktops")] = QString("%1").arg(data[QString("number")].toInt());
} else if (sourceName.indexOf(hddrRegExp) > -1) { } else if (sourceName.contains(hddrRegExp)) {
QString device = sourceName; QString device = sourceName;
device.remove(QString("/Rate/rblk")); device.remove(QString("/Rate/rblk"));
for (int i=0; i<counts[QString("disk")]; i++) for (int i=0; i<counts[QString("disk")]; i++)
@ -237,7 +273,7 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
values[QString("hddr") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 0); values[QString("hddr") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 0);
break; break;
} }
} else if (sourceName.indexOf(hddwRegExp) > -1) { } else if (sourceName.contains(hddwRegExp)) {
QString device = sourceName; QString device = sourceName;
device.remove(QString("/Rate/wblk")); device.remove(QString("/Rate/wblk"));
for (int i=0; i<counts[QString("disk")]; i++) for (int i=0; i<counts[QString("disk")]; i++)
@ -247,18 +283,29 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
} }
} else if (sourceName == QString("gpu")) { } else if (sourceName == QString("gpu")) {
values[QString("gpu")] = QString("%1").arg(data[QString("GPU")].toFloat(), 5, 'f', 1); values[QString("gpu")] = QString("%1").arg(data[QString("GPU")].toFloat(), 5, 'f', 1);
if (foundBars.indexOf(QRegExp(QString("bar[0-9].*gpu"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("gpu")) continue;
values[foundBars[j]] = values[QString("gpu")];
}
}
} else if (sourceName == QString("gputemp")) { } else if (sourceName == QString("gputemp")) {
values[QString("gputemp")] = QString("%1").arg(getTemp(data[QString("GPUTemp")].toFloat()), 4, 'f', 1); values[QString("gputemp")] = QString("%1").arg(getTemp(data[QString("GPUTemp")].toFloat()), 4, 'f', 1);
} else if (sourceName.indexOf(mountFillRegExp) > -1) { } else if (sourceName.contains(mountFillRegExp)) {
QString mount = sourceName; QString mount = sourceName;
mount.remove(QString("partitions")); mount.remove(QString("partitions"));
mount.remove(QString("/filllevel")); mount.remove(QString("/filllevel"));
for (int i=0; i<counts[QString("mount")]; i++) for (int i=0; i<counts[QString("mount")]; i++)
if (configuration[QString("mount")].split(QString("@@"))[i] == mount) { if (configuration[QString("mount")].split(QString("@@"))[i] == mount) {
values[QString("hdd") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1); values[QString("hdd") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
break; if (foundBars.indexOf(QRegExp(QString("bar[0-9].*hdd([0-9].*"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != (QString("hdd") + QString::number(i))) continue;
values[foundBars[j]] = values[QString("hdd") + QString::number(i)];
}
}
} }
} else if (sourceName.indexOf(mountFreeRegExp) > -1) { } else if (sourceName.contains(mountFreeRegExp)) {
QString mount = sourceName; QString mount = sourceName;
mount.remove(QString("partitions")); mount.remove(QString("partitions"));
mount.remove(QString("/freespace")); mount.remove(QString("/freespace"));
@ -270,7 +317,7 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
data[QString("value")].toFloat() / (1024.0 * 1024.0), 5, 'f', 1); data[QString("value")].toFloat() / (1024.0 * 1024.0), 5, 'f', 1);
break; break;
} }
} else if (sourceName.indexOf(mountUsedRegExp) > -1) { } else if (sourceName.contains(mountUsedRegExp)) {
QString mount = sourceName; QString mount = sourceName;
mount.remove(QString("partitions")); mount.remove(QString("partitions"));
mount.remove(QString("/usedspace")); mount.remove(QString("/usedspace"));
@ -321,7 +368,13 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
tooltipValues[QString("mem")].takeFirst(); tooltipValues[QString("mem")].takeFirst();
tooltipValues[QString("mem")].append(values[QString("mem")].toFloat()); tooltipValues[QString("mem")].append(values[QString("mem")].toFloat());
} }
} else if (sourceName.indexOf(netRecRegExp) > -1) { if (foundBars.indexOf(QRegExp(QString("bar[0-9].*mem"))) > -1) {
for (int j=0; j<foundBars.count(); j++) {
if (getItemByTag(foundBars[j])->getBar() != QString("mem")) continue;
values[foundBars[j]] = values[QString("mem")];
}
}
} else if (sourceName.contains(netRecRegExp)) {
values[QString("down")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0); values[QString("down")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
if ((configuration[QString("downTooltip")].toInt() == 2) && if ((configuration[QString("downTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) { (!isnan(data[QString("value")].toFloat()))) {
@ -330,19 +383,19 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
tooltipValues[QString("down")].append(data[QString("value")].toFloat()); tooltipValues[QString("down")].append(data[QString("value")].toFloat());
} }
networkDeviceUpdate++; networkDeviceUpdate++;
if (networkDeviceUpdate == 30) { if (networkDeviceUpdate >= 30) {
networkDeviceUpdate = 0; networkDeviceUpdate = 0;
if (configuration[QString("useCustomNetdev")].toInt() == 2) { if (configuration[QString("useCustomNetdev")].toInt() == 0) {
sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"), this); sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"), this);
sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"), this); sysmonEngine->disconnectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"), this);
updateNetworkDevice(); updateNetworkDevice(false);
sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"), sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/transmitter/data"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"), sysmonEngine->connectSource(QString("network/interfaces/") + values[QString("netdev")] + QString("/receiver/data"),
this, configuration[QString("interval")].toInt()); this, configuration[QString("interval")].toInt());
} }
} }
} else if (sourceName.indexOf(netTransRegExp) > -1) { } else if (sourceName.contains(netTransRegExp)) {
values[QString("up")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0); values[QString("up")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
if ((configuration[QString("downTooltip")].toInt() == 2) && if ((configuration[QString("downTooltip")].toInt() == 2) &&
(!isnan(data[QString("value")].toFloat()))) { (!isnan(data[QString("value")].toFloat()))) {
@ -383,12 +436,26 @@ void AwesomeWidget::dataUpdated(const QString &sourceName, const Plasma::DataEng
tooltipValues[QString("swap")].takeFirst(); tooltipValues[QString("swap")].takeFirst();
tooltipValues[QString("swap")].append(values[QString("swap")].toFloat()); tooltipValues[QString("swap")].append(values[QString("swap")].toFloat());
} }
} else if (sourceName.indexOf(tempRegExp) > -1) { if (foundBars.indexOf(QRegExp(QString("bar[0-9].*swap"))) > -1) {
for (int i=0; i<counts[QString("temp")]; i++) for (int j=0; j<foundBars.count(); j++) {
if (sourceName == configuration[QString("tempDevice")].split(QString("@@"))[i]) { if (getItemByTag(foundBars[j])->getBar() != QString("swap")) continue;
values[QString("temp") + QString::number(i)] = QString("%1").arg(getTemp(data[QString("value")].toFloat()), 4, 'f', 1); values[foundBars[j]] = values[QString("swap")];
break;
} }
}
} else if (sourceName.contains(tempRegExp)) {
if (data[QString("units")].toString() == QString("rpm")) {
for (int i=0; i<counts[QString("fan")]; i++)
if (sourceName == configuration[QString("fanDevice")].split(QString("@@"))[i]) {
values[QString("fan") + QString::number(i)] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 1);
break;
}
} else {
for (int i=0; i<counts[QString("temp")]; i++)
if (sourceName == configuration[QString("tempDevice")].split(QString("@@"))[i]) {
values[QString("temp") + QString::number(i)] = QString("%1").arg(getTemp(data[QString("value")].toFloat()), 4, 'f', 1);
break;
}
}
} else if (sourceName == QString("Local")) { } else if (sourceName == QString("Local")) {
values[QString("time")] = data[QString("DateTime")].toDateTime().toString(Qt::TextDate); values[QString("time")] = data[QString("DateTime")].toDateTime().toString(Qt::TextDate);
values[QString("isotime")] = data[QString("DateTime")].toDateTime().toString(Qt::ISODate); values[QString("isotime")] = data[QString("DateTime")].toDateTime().toString(Qt::ISODate);
@ -423,14 +490,16 @@ void AwesomeWidget::disconnectFromEngine()
QRegExp regExp; QRegExp regExp;
// battery // battery
regExp = QRegExp(QString("(ac|bat)")); regExp = QRegExp(QString("(^|bar[0-9].*)(ac|bat.*)"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("batteryTooltip")].toInt() == 2)) (configuration[QString("batteryTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->disconnectSource(QString("battery"), this); extsysmonEngine->disconnectSource(QString("battery"), this);
// cpu // cpu
regExp = QRegExp(QString("cpu.*")); regExp = QRegExp(QString("(^|bar[0-9].*)cpu(?!cl).*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("cpuTooltip")].toInt() == 2)) { (configuration[QString("cpuTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->disconnectSource(QString("cpu/system/TotalLoad"), this); sysmonEngine->disconnectSource(QString("cpu/system/TotalLoad"), this);
for (int i=0; i<counts[QString("cpu")]; i++) for (int i=0; i<counts[QString("cpu")]; i++)
sysmonEngine->disconnectSource(QString("cpu/cpu") + QString::number(i) + QString("/TotalLoad"), this); sysmonEngine->disconnectSource(QString("cpu/cpu") + QString::number(i) + QString("/TotalLoad"), this);
@ -458,17 +527,24 @@ void AwesomeWidget::disconnectFromEngine()
sysmonEngine->disconnectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/rblk"), this); sysmonEngine->disconnectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/rblk"), this);
sysmonEngine->disconnectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/wblk"), this); sysmonEngine->disconnectSource(configuration[QString("disk")].split(QString("@@"))[i] + QString("/Rate/wblk"), this);
} }
// gpu // fan
regExp = QRegExp(QString("gpu")); regExp = QRegExp(QString("fan.*"));
if (foundKeys.indexOf(regExp) > -1) if (foundKeys.indexOf(regExp) > -1)
for (int i=0; i<configuration[QString("fanDevice")].split(QString("@@")).count(); i++)
sysmonEngine->disconnectSource(configuration[QString("fanDevice")].split(QString("@@"))[i], this);
// gpu
regExp = QRegExp(QString("(^|bar[0-9].*)gpu"));
if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
extsysmonEngine->disconnectSource(QString("gpu"), this); extsysmonEngine->disconnectSource(QString("gpu"), this);
// gputemp // gputemp
regExp = QRegExp(QString("gputemp")); regExp = QRegExp(QString("gputemp"));
if (foundKeys.indexOf(regExp) > -1) if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("gputemp"), this); extsysmonEngine->disconnectSource(QString("gputemp"), this);
// mount // mount
regExp = QRegExp(QString("hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*")); regExp = QRegExp(QString("(^|bar[0-9].*)hdd([0-9]|mb|gb|freemb|freegb|totmb|totgb).*"));
if (foundKeys.indexOf(regExp) > -1) if ((foundKeys.indexOf(regExp) > -1) ||
(foundBars.indexOf(regExp) > -1))
for (int i=0; i<configuration[QString("mount")].split(QString("@@")).count(); i++) { 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("/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("/freespace"), this);
@ -479,9 +555,10 @@ void AwesomeWidget::disconnectFromEngine()
if (foundKeys.indexOf(regExp) > -1) if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("hddtemp"), this); extsysmonEngine->disconnectSource(QString("hddtemp"), this);
// memory // memory
regExp = QRegExp(QString("mem.*")); regExp = QRegExp(QString("(^|bar[0-9].*)mem.*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("memTooltip")].toInt() == 2)) { (configuration[QString("memTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->disconnectSource(QString("mem/physical/free"), this); sysmonEngine->disconnectSource(QString("mem/physical/free"), this);
sysmonEngine->disconnectSource(QString("mem/physical/used"), this); sysmonEngine->disconnectSource(QString("mem/physical/used"), this);
sysmonEngine->disconnectSource(QString("mem/physical/application"), this); sysmonEngine->disconnectSource(QString("mem/physical/application"), this);
@ -506,9 +583,10 @@ void AwesomeWidget::disconnectFromEngine()
if (foundKeys.indexOf(regExp) > -1) if (foundKeys.indexOf(regExp) > -1)
extsysmonEngine->disconnectSource(QString("ps"), this); extsysmonEngine->disconnectSource(QString("ps"), this);
// swap // swap
regExp = QRegExp(QString("swap.*")); regExp = QRegExp(QString("(^|bar[0-9].*)swap.*"));
if ((foundKeys.indexOf(regExp) > -1) || if ((foundKeys.indexOf(regExp) > -1) ||
(configuration[QString("swapTooltip")].toInt() == 2)) { (configuration[QString("swapTooltip")].toInt() == 2) ||
(foundBars.indexOf(regExp) > -1)) {
sysmonEngine->disconnectSource(QString("mem/swap/free"), this); sysmonEngine->disconnectSource(QString("mem/swap/free"), this);
sysmonEngine->disconnectSource(QString("mem/swap/used"), this); sysmonEngine->disconnectSource(QString("mem/swap/used"), this);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,3 +7,8 @@ Comment=Awesome widget information
Name=System information Name=System information
Comment=System information Comment=System information
Action=Popup Action=Popup
[Event/tag]
Name=Tag information
Comment=Tag information
Action=Popup

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:14+0400\n" "PO-Revision-Date: 2014-11-21 05:12+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: English <kde-russian@lists.kde.ru>\n" "Language-Team: English <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,66 +18,172 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "Run ksysguard" msgstr "Run ksysguard"
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "Show README" msgstr "Show README"
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "Update text" msgstr "Update text"
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "Custom command" msgstr "Check for updates"
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Current version : %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "New version : %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Click \"Ok\" to download"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "There are updates"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Tag: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Comment: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Name: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Exec: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "Package manager" msgstr "Package manager"
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "Null lines" msgstr "Null lines"
#: configuration.cpp:362 #: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Version %1\n"
"(build date %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "A set of minimalistic plasmoid widgets"
#: configuration.cpp:430
msgid "Links:"
msgstr "Links:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Homepage"
#: configuration.cpp:432
msgid "Repository"
msgstr "Repository"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Bugtracker"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Translation issue"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "AUR packages"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "This software is licensed under %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Translators: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "This software uses: %1"
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "Advanced" msgstr "Advanced"
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "Tooltip" msgstr "Tooltip"
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "Appearance" msgstr "Appearance"
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr "About"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Enter file name"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "File name"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Edit"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Copy"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "Remove" msgstr "Remove"
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "Select font" msgstr "Select font"
#: po/rc.cpp:3 rc.cpp:3 #: graphicalitem.cpp:442
msgid "Enable background" msgid "Select color"
msgstr "Enable background" msgstr "Select color"
#: po/rc.cpp:6 rc.cpp:6 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click" msgid "Enable popup on mouse click"
msgstr "Enable popup on mouse click" msgstr "Enable popup on mouse click"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Enable background"
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format" msgid "Custom time format"
msgstr "Custom time format" msgstr "Custom time format"
@ -146,213 +252,269 @@ msgstr "Temperature units"
msgid "Temperature devices" msgid "Temperature devices"
msgstr "Temperature devices" msgstr "Temperature devices"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "Editable" msgstr "Editable"
#: po/rc.cpp:50 rc.cpp:50 #: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Fan devices"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points" msgid "Mount points"
msgstr "Mount points" msgstr "Mount points"
#: po/rc.cpp:56 rc.cpp:56 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)" msgid "HDD devices (speed)"
msgstr "HDD (speed)" msgstr "HDD (speed)"
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)" msgid "HDD devices (temp)"
msgstr "HDD (temp)" msgstr "HDD (temp)"
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device" msgid "Disable auto select device and set specified device"
msgstr "Disable auto select device and set specified device" msgstr "Disable auto select device and set specified device"
#: po/rc.cpp:71 rc.cpp:71 #: po/rc.cpp:77 rc.cpp:77
msgid "Set network device" msgid "Set network device"
msgstr "Set network device" msgstr "Set network device"
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag" msgid "AC online tag"
msgstr "AC online tag" msgstr "AC online tag"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online" msgid "Line, which returns when AC is online"
msgstr "Line, which returns when AC is online" msgstr "Line, which returns when AC is online"
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag" msgid "AC offline tag"
msgstr "AC offline tag" msgstr "AC offline tag"
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is offline"
msgstr "Line, which returns when AC is offline" msgstr "Line, which returns when AC is offline"
#: po/rc.cpp:86 rc.cpp:86
msgid "Time interval"
msgstr "Time interval"
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196
msgid "Font"
msgstr "Font"
#: po/rc.cpp:92 rc.cpp:92 #: po/rc.cpp:92 rc.cpp:92
msgid "Font size" msgid "Bars"
msgstr "Font size" msgstr "Bars"
#: po/rc.cpp:95 rc.cpp:95 #: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Font color"
msgstr "Font color"
#: po/rc.cpp:98 rc.cpp:98
msgid "Font style"
msgstr "Font style"
#: po/rc.cpp:101 rc.cpp:101
msgid "Font weight"
msgstr "Font weight"
#: po/rc.cpp:104 rc.cpp:104
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:107 rc.cpp:107
msgid "MPD port"
msgstr "MPD port"
#: po/rc.cpp:110 rc.cpp:110
msgid "GPU device"
msgstr "GPU device"
#: po/rc.cpp:113 rc.cpp:113
msgid "hddtemp cmd"
msgstr "hddtemp cmd"
#: po/rc.cpp:116 rc.cpp:116
msgid "Music player"
msgstr "Music player"
#: po/rc.cpp:119 rc.cpp:119
msgid "MPD address"
msgstr "MPD address"
#: po/rc.cpp:122 rc.cpp:122
msgid "Desktop check cmd"
msgstr "Desktop check cmd"
#: po/rc.cpp:125 rc.cpp:125
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:128 rc.cpp:128
msgid "MPRIS player name"
msgstr "MPRIS player name"
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Editable\n"
"del - remove item"
#: po/rc.cpp:148 rc.cpp:148
msgid "Battery device"
msgstr "Battery device"
#: po/rc.cpp:151 rc.cpp:151
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
msgstr "\"/sys/class/power_supply/BAT0/capacity\" by default"
#: po/rc.cpp:154 rc.cpp:154
msgid "AC device"
msgstr "AC device"
#: po/rc.cpp:157 rc.cpp:157
msgid "\"/sys/class/power_supply/AC/online\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" 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" msgid "Add"
msgstr "Add" msgstr "Add"
#: po/rc.cpp:209 rc.cpp:209 #: po/rc.cpp:101 rc.cpp:101
msgid "Time interval"
msgstr "Time interval"
#: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font"
msgstr "Font"
#: po/rc.cpp:107 rc.cpp:107
msgid "Font size"
msgstr "Font size"
#: po/rc.cpp:110 rc.cpp:110
msgid "Font color"
msgstr "Font color"
#: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Font style"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Font weight"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd"
msgstr "hddtemp cmd"
#: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "GPU device"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr "Music player"
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "MPD port"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr "MPD address"
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr "ACPI path"
#: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/\" by default"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>NOTE:</b> Player DBus interface should be an active"
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name"
msgstr "MPRIS player name"
#: po/rc.cpp:149 rc.cpp:149
msgid ""
"Editable\n"
"del - remove item"
msgstr ""
"Editable\n"
"del - remove item"
#: po/rc.cpp:159 rc.cpp:159
msgid "Custom scripts"
msgstr "Custom scripts"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr "Configuration"
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr "Name"
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr "Comment"
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Value"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Active color"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Inactive color"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Type"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Direction"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Height"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Width"
#: po/rc.cpp:195 rc.cpp:195
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
#: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips"
msgstr "Number of values for tooltips"
#: po/rc.cpp:201 rc.cpp:201
msgid "Background"
msgstr "Background"
#: po/rc.cpp:204 rc.cpp:204
msgid "CPU color"
msgstr "CPU color"
#: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color"
msgstr "CPU clock color"
#: po/rc.cpp:210 rc.cpp:210
msgid "Memory color"
msgstr "Memory color"
#: po/rc.cpp:213 rc.cpp:213
msgid "Swap color"
msgstr "Swap color"
#: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color"
msgstr "Download speed color"
#: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color"
msgstr "Upload speed color"
#: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color"
msgstr "Battery active color"
#: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color"
msgstr "Battery inactive color"
#: po/rc.cpp:228 rc.cpp:228
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
#: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:244 rc.cpp:244
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Time interval"
#~ msgid "Desktop check cmd"
#~ msgstr "Desktop check cmd"
#~ msgid "Custom command"
#~ msgstr "Custom command"
#~ msgid "Battery device"
#~ msgstr "Battery device"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgid "Vertical layout" #~ msgid "Vertical layout"
#~ msgstr "Vertical layout" #~ msgstr "Vertical layout"
@ -368,9 +530,6 @@ msgstr "esalexeev@gmail.com"
#~ msgid "Appearance configuration" #~ msgid "Appearance configuration"
#~ msgstr "Appearance configuration" #~ msgstr "Appearance configuration"
#~ msgid "DE Configuration"
#~ msgstr "DE Configuration"
#~ msgid "Tooltip configuration" #~ msgid "Tooltip configuration"
#~ msgstr "Tooltip configuration" #~ msgstr "Tooltip configuration"
@ -588,17 +747,11 @@ msgstr "esalexeev@gmail.com"
#~ "$pkgcountN - number of packages which are available for updates, command " #~ "$pkgcountN - number of packages which are available for updates, command "
#~ "N. For example $pkgcount0" #~ "N. For example $pkgcount0"
#~ msgid "Custom"
#~ msgstr "Custom"
#~ msgid "" #~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr "" #~ msgstr ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgid "Current desktop"
#~ msgstr "Current desktop"
#~ msgid "" #~ msgid ""
#~ "$name - desktop name\n" #~ "$name - desktop name\n"
#~ "$number - desktop number\n" #~ "$number - desktop number\n"

View File

@ -7,10 +7,10 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:18+0400\n" "PO-Revision-Date: 2014-12-15 19:51-0500\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Ernesto Avilés Vázquez\n"
"Language-Team: Spanish <kde-russian@lists.kde.ru>\n" "Language-Team: Spanish <kde-i18n-doc@kde.org>\n"
"Language: es\n" "Language: es\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -18,66 +18,172 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "Ejecutar ksysguard" msgstr "Ejecutar ksysguard"
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "Mostrar el README" msgstr "Mostrar el README"
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "Actualizar texto" msgstr "Actualizar texto"
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "Comando personalizado" msgstr "Comprobar actualizaciones"
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Versión actual: %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "Nueva versión: %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Haz clic en «Ok» para descargar"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Hay actualizaciones disponibles"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Etiqueta: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Comentario: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Nombre: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Ejecutar: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "Gestor de paquetes" msgstr "Gestor de paquetes"
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "Número de líneas nulas" msgstr "Número de líneas nulas"
#: configuration.cpp:362 #: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Versión %1\n"
"(fecha de construcción %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Un conjunto de plasmoides minimalistas"
#: configuration.cpp:430
msgid "Links:"
msgstr "Enlaces:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Página principal"
#: configuration.cpp:432
msgid "Repository"
msgstr "Repositorio"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Reporte de errores"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Problemas de traducción"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Paquetes AUR"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "Este software está licenciado bajo %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Traductores: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "Este software usa: %1"
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "Avanzado" msgstr "Avanzado"
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "Ventana emergente" msgstr "Ventana emergente"
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "Apariencia" msgstr "Apariencia"
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr "Acerca de"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Inserta el nombre de archivo"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Nombre de archivo"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Editar"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Copiar"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "Eliminar" msgstr "Eliminar"
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "" msgstr "Elegir tipo de letra"
#: graphicalitem.cpp:442
msgid "Select color"
msgstr "Elegir color"
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable background"
msgstr ""
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable popup on mouse click" msgid "Enable popup on mouse click"
msgstr "Habilitar ventana emergente al hacer clic" msgstr "Habilitar ventana emergente al hacer clic"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Habilitar fondo"
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format" msgid "Custom time format"
msgstr "Formato personalizado para la hora" msgstr "Formato personalizado para la hora"
@ -101,16 +207,16 @@ msgid ""
"$ss - seconds\n" "$ss - seconds\n"
"$s - seconds w\\o zero" "$s - seconds w\\o zero"
msgstr "" msgstr ""
"$dddd - día de la semana largo\n" "$dddd - día de la semana en formato largo\n"
"$ddd - día de la semana corto\n" "$ddd - día de la semana en formato corto\n"
"$dd - día\n" "$dd - día\n"
"$d - día (sin ceros)\n" "$d - día (sin ceros)\n"
"$MMMM - mes largo\n" "$MMMM - mes en formato largo\n"
"$MMM - mes corto\n" "$MMM - mes en formato corto\n"
"$MM - mes\n" "$MM - mes\n"
"$M - mes (sin ceros)\n" "$M - mes (sin ceros)\n"
"$yyyy - año\n" "$yyyy - año\n"
"$yy - año largo\n" "$yy - año en formato largo\n"
"$hh - horas (solo formato de 24 horas)\n" "$hh - horas (solo formato de 24 horas)\n"
"$h - horas (sin ceros, solo formato de 24 horas)\n" "$h - horas (sin ceros, solo formato de 24 horas)\n"
"$mm - minutos\n" "$mm - minutos\n"
@ -146,108 +252,125 @@ msgstr "Unidades de temperatura"
msgid "Temperature devices" msgid "Temperature devices"
msgstr "Dispositivos de temperatura" msgstr "Dispositivos de temperatura"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "Editable" msgstr "Editable"
#: po/rc.cpp:50 rc.cpp:50 #: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Dispositivos de ventilación"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points" msgid "Mount points"
msgstr "Puntos de montaje" msgstr "Puntos de montaje"
#: po/rc.cpp:56 rc.cpp:56
msgid "HDD devices (speed)"
msgstr "Disco duro (velocidad)"
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (temp)" msgid "HDD devices (speed)"
msgstr "Disco duro (temperatura)" msgstr "Discos duros (velocidad)"
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)"
msgstr "Discos duros (temperatura)"
#: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device" msgid "Disable auto select device and set specified device"
msgstr "Inhabilitar selección automática del dispositivo y especificar uno" msgstr "Inhabilitar selección automática del dispositivo y especificar uno"
#: po/rc.cpp:71 rc.cpp:71 #: po/rc.cpp:77 rc.cpp:77
msgid "Set network device" msgid "Set network device"
msgstr "Establecer dispositivo de red" msgstr "Establecer dispositivo de red"
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag" msgid "AC online tag"
msgstr "Etiqueta para alimentación conectada" msgstr "Etiqueta para alimentación conectada"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online" msgid "Line, which returns when AC is online"
msgstr "Línea que devuelve si la alimentación está conectada" msgstr "Línea devuelta si la alimentación está conectada"
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag" msgid "AC offline tag"
msgstr "Etiqueta para la alimentación desconectada" msgstr "Etiqueta para la alimentación desconectada"
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is offline"
msgstr "Línea que devuelve si la alimentación está desconectada" msgstr "Línea devuelta si la alimentación está desconectada"
#: po/rc.cpp:86 rc.cpp:86 #: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Barras"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Añadir"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval" msgid "Time interval"
msgstr "Intervalo de tiempo" msgstr "Intervalo de tiempo"
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196 #: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font" msgid "Font"
msgstr "Fuente" msgstr "Tipo de letra"
#: po/rc.cpp:92 rc.cpp:92
msgid "Font size"
msgstr "Tamaño de fuente"
#: po/rc.cpp:95 rc.cpp:95
msgid "Font color"
msgstr "Color de fuente"
#: po/rc.cpp:98 rc.cpp:98
msgid "Font style"
msgstr "Estilo de fuente"
#: po/rc.cpp:101 rc.cpp:101
msgid "Font weight"
msgstr "Grosor de la fuente"
#: po/rc.cpp:104 rc.cpp:104
msgid "HDD"
msgstr "Disco duro"
#: po/rc.cpp:107 rc.cpp:107 #: po/rc.cpp:107 rc.cpp:107
msgid "MPD port" msgid "Font size"
msgstr "Puerto de MPD" msgstr "Tamaño de letra"
#: po/rc.cpp:110 rc.cpp:110 #: po/rc.cpp:110 rc.cpp:110
msgid "GPU device" msgid "Font color"
msgstr "Dispositivo de GPU" msgstr "Color de letra"
#: po/rc.cpp:113 rc.cpp:113 #: po/rc.cpp:113 rc.cpp:113
msgid "Font style"
msgstr "Estilo de letra"
#: po/rc.cpp:116 rc.cpp:116
msgid "Font weight"
msgstr "Grosor de la letra"
#: po/rc.cpp:119 rc.cpp:119
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Comando hddtemp" msgstr "Comando hddtemp"
#: po/rc.cpp:116 rc.cpp:116 #: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Dispositivo de GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "Disco duro"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player" msgid "Music player"
msgstr "Reproductor de música" msgstr "Reproductor de música"
#: po/rc.cpp:119 rc.cpp:119 #: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Puerto de MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address" msgid "MPD address"
msgstr "Dirección de MPD" msgstr "Dirección de MPD"
#: po/rc.cpp:122 rc.cpp:122 #: po/rc.cpp:137 rc.cpp:137
msgid "Desktop check cmd" msgid "ACPI path"
msgstr "" msgstr "Ruta ACPI"
#: po/rc.cpp:125 rc.cpp:125 #: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" por defecto"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active" msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "" msgstr "<b>NOTA:</b> La interfaz DBus del reproductor debería estar activada"
#: po/rc.cpp:128 rc.cpp:128 #: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "" msgstr "Nombre del reproductor MPRIS"
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141 #: po/rc.cpp:149 rc.cpp:149
msgid "" msgid ""
"Editable\n" "Editable\n"
"del - remove item" "del - remove item"
@ -255,105 +378,141 @@ msgstr ""
"Editable\n" "Editable\n"
"del - eliminar elemento" "del - eliminar elemento"
#: po/rc.cpp:148 rc.cpp:148 #: po/rc.cpp:159 rc.cpp:159
msgid "Battery device" msgid "Custom scripts"
msgstr "Dispositivo de batería" msgstr "Scripts personalizados"
#: po/rc.cpp:151 rc.cpp:151 #: po/rc.cpp:165 rc.cpp:165
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" msgid "Configuration"
msgstr "\"/sys/class/power_supply/BAT0/capacity\" por defecto" msgstr "Configuración"
#: po/rc.cpp:154 rc.cpp:154 #: po/rc.cpp:168 rc.cpp:168
msgid "AC device" msgid "Name"
msgstr "Dispositivo de alimentación" msgstr "Nombre"
#: po/rc.cpp:157 rc.cpp:157 #: po/rc.cpp:171 rc.cpp:171
msgid "\"/sys/class/power_supply/AC/online\" by default" msgid "Comment"
msgstr "\"/sys/class/power_supply/AC/online\" por defecto" msgstr "Comentario"
#: po/rc.cpp:160 rc.cpp:160 #: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Valor"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Color de activo"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Color de inactivo"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Tipo"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Dirección"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Alto"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Ancho"
#: po/rc.cpp:195 rc.cpp:195
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
msgstr "" msgstr ""
"Las etiquetas para CPU, frecuencia de la CPU, memoria, swap y red soportan " "Las etiquetas para CPU, frecuencia de la CPU, memoria, swap y red soportan "
"ventanas emergentes. Para habilitarlas habilite la caja de seleccione la " "ventanas emergentes. Para habilitarlas marca las cajas de selección "
"casilla de verificación pertinente." "necesarias."
#: po/rc.cpp:163 rc.cpp:163 #: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Número de valores para las ventanas emergentes" msgstr "Número de valores para las ventanas emergentes"
#: po/rc.cpp:166 rc.cpp:166 #: po/rc.cpp:201 rc.cpp:201
msgid "Background" msgid "Background"
msgstr "" msgstr "Fondo"
#: po/rc.cpp:169 rc.cpp:169 #: po/rc.cpp:204 rc.cpp:204
msgid "CPU color" msgid "CPU color"
msgstr "Color de la CPU" msgstr "Color de la CPU"
#: po/rc.cpp:172 rc.cpp:172 #: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Color de la frecuencia de la CPU" msgstr "Color de la frecuencia de la CPU"
#: po/rc.cpp:175 rc.cpp:175 #: po/rc.cpp:210 rc.cpp:210
msgid "Memory color" msgid "Memory color"
msgstr "Color de la memoria" msgstr "Color de la memoria"
#: po/rc.cpp:178 rc.cpp:178 #: po/rc.cpp:213 rc.cpp:213
msgid "Swap color" msgid "Swap color"
msgstr "Color de la swap" msgstr "Color de la swap"
#: po/rc.cpp:181 rc.cpp:181 #: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color" msgid "Download speed color"
msgstr "Color de la velocidad de recepción" msgstr "Color de la velocidad de recepción"
#: po/rc.cpp:184 rc.cpp:184 #: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Color de la velocidad de envío" msgstr "Color de la velocidad de envío"
#: po/rc.cpp:187 rc.cpp:187 #: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color" msgid "Battery active color"
msgstr "" msgstr "Color de la batería activa"
#: po/rc.cpp:190 rc.cpp:190 #: po/rc.cpp:225 rc.cpp:225
#, fuzzy
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Dispositivo de batería" msgstr "Color de la batería inactiva"
#: po/rc.cpp:193 rc.cpp:193 #: po/rc.cpp:228 rc.cpp:228
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
msgstr "" msgstr ""
"Puede encontrar información detallada en el <a href=\"http://arcanis.name/" "Puedes encontrar información detallada en el <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">sitio del proyecto</a>" "projects/awesome-widgets/\">sitio del proyecto</a>"
#: po/rc.cpp:199 rc.cpp:199 #: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "Ctrl+B" msgstr "Ctrl+B"
#: po/rc.cpp:202 rc.cpp:202 #: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I" msgid "Ctrl+I"
msgstr "Ctrl+I" msgstr "Ctrl+I"
#: po/rc.cpp:205 rc.cpp:205 #: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U" msgid "Ctrl+U"
msgstr "Ctrl+U" msgstr "Ctrl+U"
#: po/rc.cpp:208 rc.cpp:208 #: po/rc.cpp:244 rc.cpp:244
msgid "Add"
msgstr "Añadir"
#: po/rc.cpp:209 rc.cpp:209
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Tu nombre" msgstr "Tu nombre"
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "Tus correos" msgstr "Tu email"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Intervalo de tiempo"
#~ msgid "Custom command"
#~ msgstr "Comando personalizado"
#~ msgid "Battery device"
#~ msgstr "Dispositivo de batería"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" por defecto"
#~ msgid "Vertical layout" #~ msgid "Vertical layout"
#~ msgstr "Orientación vertical" #~ msgstr "Orientación vertical"
@ -584,9 +743,6 @@ msgstr "Tus correos"
#~ "$pkgcountN - número de paquetes con actualizaciones disponibles, comando " #~ "$pkgcountN - número de paquetes con actualizaciones disponibles, comando "
#~ "N. Por ejemplo $pkgcount0" #~ "N. Por ejemplo $pkgcount0"
#~ msgid "Custom"
#~ msgstr "Personalizado"
#~ msgid "" #~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr "" #~ msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:20+0400\n" "PO-Revision-Date: 2014-09-05 11:20+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: French <kde-russian@lists.kde.ru>\n" "Language-Team: French <kde-russian@lists.kde.ru>\n"
@ -19,66 +19,172 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "Lancer ksysguard" msgstr "Lancer ksysguard"
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "Voir le README" msgstr "Voir le README"
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "Mettre à jour le texte" msgstr "Mettre à jour le texte"
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "Commande personnalisée" msgstr ""
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr ""
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr ""
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr ""
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr ""
#: configuration.cpp:307
msgid "Tag: %1"
msgstr ""
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr ""
#: configuration.cpp:382
msgid "Name: %1"
msgstr ""
#: configuration.cpp:384
msgid "Exec: %1"
msgstr ""
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "Gestionnaire de paquets" msgstr "Gestionnaire de paquets"
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "Nombre d'éléments pour les conseils" msgstr "Nombre d'éléments pour les conseils"
#: configuration.cpp:362 #: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr ""
#: configuration.cpp:430
msgid "Links:"
msgstr ""
#: configuration.cpp:431
msgid "Homepage"
msgstr ""
#: configuration.cpp:432
msgid "Repository"
msgstr ""
#: configuration.cpp:433
msgid "Bugtracker"
msgstr ""
#: configuration.cpp:434
msgid "Translation issue"
msgstr ""
#: configuration.cpp:435
msgid "AUR packages"
msgstr ""
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr ""
#: configuration.cpp:445
msgid "Translators: %1"
msgstr ""
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr ""
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "Avancé" msgstr "Avancé"
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "Conseil" msgstr "Conseil"
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "Apparence" msgstr "Apparence"
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "Moteur de données" msgstr "Moteur de données"
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr ""
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr ""
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr ""
#: configuration.cpp:793 configuration.cpp:819
#, fuzzy
msgid "Edit"
msgstr "Modifiable"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr ""
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "Supprimer" msgstr "Supprimer"
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "" msgstr ""
#: po/rc.cpp:3 rc.cpp:3 #: graphicalitem.cpp:442
msgid "Enable background" #, fuzzy
msgstr "" msgid "Select color"
msgstr "Couleur de la police"
#: po/rc.cpp:6 rc.cpp:6 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click" msgid "Enable popup on mouse click"
msgstr "Popup lors d'un click souris" msgstr "Popup lors d'un click souris"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr ""
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format" msgid "Custom time format"
msgstr "Format de l'heure personnalisé" msgstr "Format de l'heure personnalisé"
@ -147,110 +253,128 @@ msgstr "Unités de température"
msgid "Temperature devices" msgid "Temperature devices"
msgstr "Temperature des périphériques" msgstr "Temperature des périphériques"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "Modifiable" msgstr "Modifiable"
#: po/rc.cpp:50 rc.cpp:50 #: 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" msgid "Mount points"
msgstr "Points de montage" msgstr "Points de montage"
#: po/rc.cpp:56 rc.cpp:56 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)" msgid "HDD devices (speed)"
msgstr "Périphériques HDD (la vitesse)" msgstr "Périphériques HDD (la vitesse)"
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)" msgid "HDD devices (temp)"
msgstr "Périphériques HDD (température)" msgstr "Périphériques HDD (température)"
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device" msgid "Disable auto select device and set specified device"
msgstr "" msgstr ""
"Désactiver la sélection automatique de périphériques et le sélectionner " "Désactiver la sélection automatique de périphériques et le sélectionner "
"manuellement" "manuellement"
#: po/rc.cpp:71 rc.cpp:71 #: po/rc.cpp:77 rc.cpp:77
msgid "Set network device" msgid "Set network device"
msgstr "Sélectionner le périphérique réseau" msgstr "Sélectionner le périphérique réseau"
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag" msgid "AC online tag"
msgstr "Tag alimentation branchée" msgstr "Tag alimentation branchée"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online" msgid "Line, which returns when AC is online"
msgstr "Ligne qui est renvoyée lorsque l'alimentation est branchée" msgstr "Ligne qui est renvoyée lorsque l'alimentation est branchée"
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag" msgid "AC offline tag"
msgstr "Tag alimentation débranchée" msgstr "Tag alimentation débranchée"
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is offline"
msgstr "Ligne, qui est renvoyée lorsque l'alimentation est débranchée" msgstr "Ligne, qui est renvoyée lorsque l'alimentation est débranchée"
#: po/rc.cpp:86 rc.cpp:86 #: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr ""
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Ajouter"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval" msgid "Time interval"
msgstr "Intervalle" msgstr "Intervalle"
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196 #: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font" msgid "Font"
msgstr "Police" msgstr "Police"
#: po/rc.cpp:92 rc.cpp:92 #: po/rc.cpp:107 rc.cpp:107
msgid "Font size" msgid "Font size"
msgstr "Taille de la police" msgstr "Taille de la police"
#: po/rc.cpp:95 rc.cpp:95 #: po/rc.cpp:110 rc.cpp:110
msgid "Font color" msgid "Font color"
msgstr "Couleur de la police" msgstr "Couleur de la police"
#: po/rc.cpp:98 rc.cpp:98 #: po/rc.cpp:113 rc.cpp:113
msgid "Font style" msgid "Font style"
msgstr "Style de la police" msgstr "Style de la police"
#: po/rc.cpp:101 rc.cpp:101 #: po/rc.cpp:116 rc.cpp:116
msgid "Font weight" msgid "Font weight"
msgstr "Épaisseur de la police" msgstr "Épaisseur de la police"
#: po/rc.cpp:104 rc.cpp:104 #: po/rc.cpp:119 rc.cpp:119
msgid "HDD"
msgstr "Disque dur"
#: po/rc.cpp:107 rc.cpp:107
msgid "MPD port"
msgstr "Port MPD"
#: po/rc.cpp:110 rc.cpp:110
msgid "GPU device"
msgstr "Périphérique graphique"
#: po/rc.cpp:113 rc.cpp:113
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Commande de température HDD" msgstr "Commande de température HDD"
#: po/rc.cpp:116 rc.cpp:116 #: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Périphérique graphique"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "Disque dur"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player" msgid "Music player"
msgstr "Lecteur audio" msgstr "Lecteur audio"
#: po/rc.cpp:119 rc.cpp:119 #: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Port MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address" msgid "MPD address"
msgstr "Adresse MPD" msgstr "Adresse MPD"
#: po/rc.cpp:122 rc.cpp:122 #: po/rc.cpp:137 rc.cpp:137
msgid "Desktop check cmd" msgid "ACPI path"
msgstr "" msgstr ""
#: po/rc.cpp:125 rc.cpp:125 #: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" par défaut"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active" msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "" msgstr ""
#: po/rc.cpp:128 rc.cpp:128 #: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "" msgstr ""
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141 #: po/rc.cpp:149 rc.cpp:149
msgid "" msgid ""
"Editable\n" "Editable\n"
"del - remove item" "del - remove item"
@ -258,23 +382,54 @@ msgstr ""
"Modifiable\n" "Modifiable\n"
"del - supprimer un élément" "del - supprimer un élément"
#: po/rc.cpp:148 rc.cpp:148 #: po/rc.cpp:159 rc.cpp:159
msgid "Battery device" #, fuzzy
msgid "Custom scripts"
msgstr "Personnalisé"
#: po/rc.cpp:165 rc.cpp:165
msgid "Configuration"
msgstr ""
#: po/rc.cpp:168 rc.cpp:168
msgid "Name"
msgstr ""
#: po/rc.cpp:171 rc.cpp:171
msgid "Comment"
msgstr ""
#: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr ""
#: po/rc.cpp:177 rc.cpp:177
#, fuzzy
msgid "Active color"
msgstr "Batterie" msgstr "Batterie"
#: po/rc.cpp:151 rc.cpp:151 #: po/rc.cpp:180 rc.cpp:180
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" #, fuzzy
msgstr "\"/sys/class/power_supply/BAT0/capacity\" par défaut" msgid "Inactive color"
msgstr "Batterie"
#: po/rc.cpp:154 rc.cpp:154 #: po/rc.cpp:183 rc.cpp:183
msgid "AC device" msgid "Type"
msgstr "Périphérique d'alimentation" msgstr ""
#: po/rc.cpp:157 rc.cpp:157 #: po/rc.cpp:186 rc.cpp:186
msgid "\"/sys/class/power_supply/AC/online\" by default" msgid "Direction"
msgstr "\"/sys/class/power_supply/AC/online\" par défaut" msgstr ""
#: po/rc.cpp:160 rc.cpp:160 #: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr ""
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr ""
#: po/rc.cpp:195 rc.cpp:195
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -283,48 +438,48 @@ msgstr ""
"les conseils visuels. Pour les activer cochez simplement les cases " "les conseils visuels. Pour les activer cochez simplement les cases "
"correspondantes." "correspondantes."
#: po/rc.cpp:163 rc.cpp:163 #: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Nombre d'éléments pour les conseils" msgstr "Nombre d'éléments pour les conseils"
#: po/rc.cpp:166 rc.cpp:166 #: po/rc.cpp:201 rc.cpp:201
msgid "Background" msgid "Background"
msgstr "" msgstr ""
#: po/rc.cpp:169 rc.cpp:169 #: po/rc.cpp:204 rc.cpp:204
msgid "CPU color" msgid "CPU color"
msgstr "Couleur processeur" msgstr "Couleur processeur"
#: po/rc.cpp:172 rc.cpp:172 #: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Couleur de l'horloge processeur" msgstr "Couleur de l'horloge processeur"
#: po/rc.cpp:175 rc.cpp:175 #: po/rc.cpp:210 rc.cpp:210
msgid "Memory color" msgid "Memory color"
msgstr "Couleur de la mémoire" msgstr "Couleur de la mémoire"
#: po/rc.cpp:178 rc.cpp:178 #: po/rc.cpp:213 rc.cpp:213
msgid "Swap color" msgid "Swap color"
msgstr "Couleur de la mémoire d'échange" msgstr "Couleur de la mémoire d'échange"
#: po/rc.cpp:181 rc.cpp:181 #: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color" msgid "Download speed color"
msgstr "Couleur de la vitesse de téléchargement" msgstr "Couleur de la vitesse de téléchargement"
#: po/rc.cpp:184 rc.cpp:184 #: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Couleur du téléversement" msgstr "Couleur du téléversement"
#: po/rc.cpp:187 rc.cpp:187 #: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color" msgid "Battery active color"
msgstr "" msgstr ""
#: po/rc.cpp:190 rc.cpp:190 #: po/rc.cpp:225 rc.cpp:225
#, fuzzy #, fuzzy
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Batterie" msgstr "Batterie"
#: po/rc.cpp:193 rc.cpp:193 #: po/rc.cpp:228 rc.cpp:228
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -332,32 +487,41 @@ msgstr ""
"D'avantage d'informations se trouvent sur <a href=\"http://arcanis.name/" "D'avantage d'informations se trouvent sur <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">la page du projet</a>" "projects/awesome-widgets/\">la page du projet</a>"
#: po/rc.cpp:199 rc.cpp:199 #: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "Ctrl+B" msgstr "Ctrl+B"
#: po/rc.cpp:202 rc.cpp:202 #: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I" msgid "Ctrl+I"
msgstr "Ctrl+I" msgstr "Ctrl+I"
#: po/rc.cpp:205 rc.cpp:205 #: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U" msgid "Ctrl+U"
msgstr "Ctrl+U" msgstr "Ctrl+U"
#: po/rc.cpp:208 rc.cpp:208 #: po/rc.cpp:244 rc.cpp:244
msgid "Add"
msgstr "Ajouter"
#: po/rc.cpp:209 rc.cpp:209
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Intervalle"
#~ msgid "Custom command"
#~ msgstr "Commande personnalisée"
#~ msgid "Battery device"
#~ msgstr "Batterie"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" par défaut"
#~ msgid "Vertical layout" #~ msgid "Vertical layout"
#~ msgstr "Positionnement vertical" #~ msgstr "Positionnement vertical"
@ -581,9 +745,6 @@ msgstr "esalexeev@gmail.com"
#~ "$pkgcountN - nombre de paquets à mettre à jour, commande N. Par exemple " #~ "$pkgcountN - nombre de paquets à mettre à jour, commande N. Par exemple "
#~ "$pkgcount0" #~ "$pkgcount0"
#~ msgid "Custom"
#~ msgstr "Personnalisé"
#~ msgid "" #~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr "" #~ msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,64 +17,168 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "" msgstr ""
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "" msgstr ""
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "" msgstr ""
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "" msgstr ""
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr ""
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr ""
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr ""
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr ""
#: configuration.cpp:307
msgid "Tag: %1"
msgstr ""
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr ""
#: configuration.cpp:382
msgid "Name: %1"
msgstr ""
#: configuration.cpp:384
msgid "Exec: %1"
msgstr ""
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "" msgstr ""
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "" msgstr ""
#: configuration.cpp:362 #: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr ""
#: configuration.cpp:430
msgid "Links:"
msgstr ""
#: configuration.cpp:431
msgid "Homepage"
msgstr ""
#: configuration.cpp:432
msgid "Repository"
msgstr ""
#: configuration.cpp:433
msgid "Bugtracker"
msgstr ""
#: configuration.cpp:434
msgid "Translation issue"
msgstr ""
#: configuration.cpp:435
msgid "AUR packages"
msgstr ""
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr ""
#: configuration.cpp:445
msgid "Translators: %1"
msgstr ""
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr ""
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "" msgstr ""
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "" msgstr ""
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "" msgstr ""
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "" msgstr ""
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr ""
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr ""
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr ""
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr ""
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr ""
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "" msgstr ""
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "" msgstr ""
#: graphicalitem.cpp:442
msgid "Select color"
msgstr ""
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable background" msgid "Enable popup on mouse click"
msgstr "" msgstr ""
#: po/rc.cpp:6 rc.cpp:6 #: po/rc.cpp:6 rc.cpp:6
msgid "Enable popup on mouse click" msgid "Enable background"
msgstr "" msgstr ""
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
@ -123,203 +227,243 @@ msgstr ""
msgid "Temperature devices" msgid "Temperature devices"
msgstr "" msgstr ""
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "" msgstr ""
#: po/rc.cpp:50 rc.cpp:50 #: po/rc.cpp:50 rc.cpp:50
msgid "Mount points" msgid "Fan devices"
msgstr "" msgstr ""
#: po/rc.cpp:56 rc.cpp:56 #: po/rc.cpp:56 rc.cpp:56
msgid "HDD devices (speed)" msgid "Mount points"
msgstr "" msgstr ""
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (temp)" msgid "HDD devices (speed)"
msgstr "" msgstr ""
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:68 rc.cpp:68
msgid "Disable auto select device and set specified device" msgid "HDD devices (temp)"
msgstr ""
#: po/rc.cpp:71 rc.cpp:71
msgid "Set network device"
msgstr "" msgstr ""
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:74 rc.cpp:74
msgid "AC online tag" msgid "Disable auto select device and set specified device"
msgstr "" msgstr ""
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:77 rc.cpp:77
msgid "Line, which returns when AC is online" msgid "Set network device"
msgstr "" msgstr ""
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:80 rc.cpp:80
msgid "AC offline tag" msgid "AC online tag"
msgstr "" msgstr ""
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is online"
msgstr "" msgstr ""
#: po/rc.cpp:86 rc.cpp:86 #: po/rc.cpp:86 rc.cpp:86
msgid "Time interval" msgid "AC offline tag"
msgstr "" msgstr ""
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196 #: po/rc.cpp:89 rc.cpp:89
msgid "Font" msgid "Line, which returns when AC is offline"
msgstr "" msgstr ""
#: po/rc.cpp:92 rc.cpp:92 #: po/rc.cpp:92 rc.cpp:92
msgid "Font size" msgid "Bars"
msgstr "" msgstr ""
#: po/rc.cpp:95 rc.cpp:95 #: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Font color" msgid "Add"
msgstr ""
#: po/rc.cpp:98 rc.cpp:98
msgid "Font style"
msgstr "" msgstr ""
#: po/rc.cpp:101 rc.cpp:101 #: po/rc.cpp:101 rc.cpp:101
msgid "Font weight" msgid "Time interval"
msgstr "" msgstr ""
#: po/rc.cpp:104 rc.cpp:104 #: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "HDD" msgid "Font"
msgstr "" msgstr ""
#: po/rc.cpp:107 rc.cpp:107 #: po/rc.cpp:107 rc.cpp:107
msgid "MPD port" msgid "Font size"
msgstr "" msgstr ""
#: po/rc.cpp:110 rc.cpp:110 #: po/rc.cpp:110 rc.cpp:110
msgid "GPU device" msgid "Font color"
msgstr "" msgstr ""
#: po/rc.cpp:113 rc.cpp:113 #: po/rc.cpp:113 rc.cpp:113
msgid "hddtemp cmd" msgid "Font style"
msgstr "" msgstr ""
#: po/rc.cpp:116 rc.cpp:116 #: po/rc.cpp:116 rc.cpp:116
msgid "Music player" msgid "Font weight"
msgstr "" msgstr ""
#: po/rc.cpp:119 rc.cpp:119 #: po/rc.cpp:119 rc.cpp:119
msgid "MPD address" msgid "hddtemp cmd"
msgstr "" msgstr ""
#: po/rc.cpp:122 rc.cpp:122 #: po/rc.cpp:122 rc.cpp:122
msgid "Desktop check cmd" msgid "GPU device"
msgstr "" msgstr ""
#: po/rc.cpp:125 rc.cpp:125 #: po/rc.cpp:125 rc.cpp:125
msgid "<b>NOTE:</b> Player DBus interface should be an active" msgid "HDD"
msgstr "" msgstr ""
#: po/rc.cpp:128 rc.cpp:128 #: po/rc.cpp:128 rc.cpp:128
msgid "Music player"
msgstr ""
#: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr ""
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address"
msgstr ""
#: po/rc.cpp:137 rc.cpp:137
msgid "ACPI path"
msgstr ""
#: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr ""
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr ""
#: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "" msgstr ""
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141 #: po/rc.cpp:149 rc.cpp:149
msgid "" msgid ""
"Editable\n" "Editable\n"
"del - remove item" "del - remove item"
msgstr "" msgstr ""
#: po/rc.cpp:148 rc.cpp:148 #: po/rc.cpp:159 rc.cpp:159
msgid "Battery device" msgid "Custom scripts"
msgstr "" msgstr ""
#: po/rc.cpp:151 rc.cpp:151 #: po/rc.cpp:165 rc.cpp:165
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" msgid "Configuration"
msgstr "" msgstr ""
#: po/rc.cpp:154 rc.cpp:154 #: po/rc.cpp:168 rc.cpp:168
msgid "AC device" msgid "Name"
msgstr "" msgstr ""
#: po/rc.cpp:157 rc.cpp:157 #: po/rc.cpp:171 rc.cpp:171
msgid "\"/sys/class/power_supply/AC/online\" by default" msgid "Comment"
msgstr "" msgstr ""
#: po/rc.cpp:160 rc.cpp:160 #: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr ""
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr ""
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr ""
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr ""
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr ""
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr ""
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr ""
#: po/rc.cpp:195 rc.cpp:195
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
msgstr "" msgstr ""
#: po/rc.cpp:163 rc.cpp:163 #: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "" msgstr ""
#: po/rc.cpp:166 rc.cpp:166 #: po/rc.cpp:201 rc.cpp:201
msgid "Background" msgid "Background"
msgstr "" msgstr ""
#: po/rc.cpp:169 rc.cpp:169 #: po/rc.cpp:204 rc.cpp:204
msgid "CPU color" msgid "CPU color"
msgstr "" msgstr ""
#: po/rc.cpp:172 rc.cpp:172 #: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color" msgid "CPU clock color"
msgstr "" msgstr ""
#: po/rc.cpp:175 rc.cpp:175 #: po/rc.cpp:210 rc.cpp:210
msgid "Memory color" msgid "Memory color"
msgstr "" msgstr ""
#: po/rc.cpp:178 rc.cpp:178 #: po/rc.cpp:213 rc.cpp:213
msgid "Swap color" msgid "Swap color"
msgstr "" msgstr ""
#: po/rc.cpp:181 rc.cpp:181 #: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color" msgid "Download speed color"
msgstr "" msgstr ""
#: po/rc.cpp:184 rc.cpp:184 #: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color" msgid "Upload speed color"
msgstr "" msgstr ""
#: po/rc.cpp:187 rc.cpp:187 #: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color" msgid "Battery active color"
msgstr "" msgstr ""
#: po/rc.cpp:190 rc.cpp:190 #: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "" msgstr ""
#: po/rc.cpp:193 rc.cpp:193 #: po/rc.cpp:228 rc.cpp:228
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
msgstr "" msgstr ""
#: po/rc.cpp:199 rc.cpp:199 #: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "" msgstr ""
#: po/rc.cpp:202 rc.cpp:202 #: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I" msgid "Ctrl+I"
msgstr "" msgstr ""
#: po/rc.cpp:205 rc.cpp:205 #: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U" msgid "Ctrl+U"
msgstr "" msgstr ""
#: po/rc.cpp:208 rc.cpp:208 #: po/rc.cpp:244 rc.cpp:244
msgid "Add"
msgstr ""
#: po/rc.cpp:209 rc.cpp:209
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "" msgstr ""
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "" msgstr ""

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:21+0400\n" "PO-Revision-Date: 2014-12-24 00:04+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Brazilian Portuguese <kde-russian@lists.kde.ru>\n" "Language-Team: Brazilian Portuguese <kde-russian@lists.kde.ru>\n"
"Language: pt_BR\n" "Language: pt_BR\n"
@ -16,67 +16,185 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
"X-Language: pt_BR\n"
"X-Source-Language: en\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "Abrir ksysguard" msgstr "Abrir ksysguard"
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "Mostrar README" msgstr "Mostrar README"
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "Atualizar texto" msgstr "Atualizar texto"
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "Comando personalizado" msgstr "Checar por atualizações"
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
#, qt-format
msgid "Current version : %1"
msgstr "Versão atual: %1"
#: awesome-widget.cpp:492
#, qt-format
msgid "New version : %1"
msgstr "Nova versão: %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Clique \"Ok\" para baixar"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Há atualizações disponíveis"
#: configuration.cpp:307
#, qt-format
msgid "Tag: %1"
msgstr "Tag: %1"
#: configuration.cpp:308 configuration.cpp:383
#, qt-format
msgid "Comment: %1"
msgstr "Comentário: %1"
#: configuration.cpp:382
#, qt-format
msgid "Name: %1"
msgstr "Nome: %1"
#: configuration.cpp:384
#, qt-format
msgid "Exec: %1"
msgstr "Exec: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "Gerenciador de pacotes" msgstr "Gerenciador de pacotes"
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "Número de valores para dicas de contexto" msgstr "Linhas nulas"
#: configuration.cpp:362 #: configuration.cpp:428
#, qt-format
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Versão: %1\n"
"(data de compilação %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Um conjunto de widgets plasmoid minimalistas."
#: configuration.cpp:430
msgid "Links:"
msgstr "Links:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Homepage"
#: configuration.cpp:432
msgid "Repository"
msgstr "Repositório"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Bugtracker"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Problema na tradução"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Pacotes AUR"
#: configuration.cpp:437
#, qt-format
msgid "This software is licensed under %1"
msgstr "Este software é licenciado sob %1"
#: configuration.cpp:445
#, qt-format
msgid "Translators: %1"
msgstr "Tradutores: %1"
#: configuration.cpp:446
#, qt-format
msgid "This software uses: %1"
msgstr "Este software usa: %1"
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "Avançado" msgstr "Avançado"
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "Dica de contexto" msgstr "Dica de contexto"
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "Aparência" msgstr "Aparência"
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "Engine de dados" msgstr "Engine de dados"
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr "Sobre"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Digite o nome de arquivo"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Nome de arquivo"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Editar"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Copiar"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "Remover" msgstr "Remover"
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "" msgstr "Selecionar fonte"
#: graphicalitem.cpp:442
msgid "Select color"
msgstr "Selecionar cor"
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable background"
msgstr ""
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable popup on mouse click" msgid "Enable popup on mouse click"
msgstr "Ativar popup no clique do mouse" msgstr "Ativar popup no clique do mouse"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Ativar plano de fundo"
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format" msgid "Custom time format"
msgstr "Formato de hora personalizado" msgstr "Formato de hora personalizado"
@ -143,109 +261,125 @@ msgstr "Unidades de temperatura"
msgid "Temperature devices" msgid "Temperature devices"
msgstr "Dispositivos de temperatura" msgstr "Dispositivos de temperatura"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "Editável" msgstr "Editável"
#: po/rc.cpp:50 rc.cpp:50 #: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Dispositivos de ventilação"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points" msgid "Mount points"
msgstr "Pontos de montagem" msgstr "Pontos de montagem"
#: po/rc.cpp:56 rc.cpp:56 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)" msgid "HDD devices (speed)"
msgstr "Dispositivos HDD (velocidade) " msgstr "Dispositivos HDD (velocidade) "
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)" msgid "HDD devices (temp)"
msgstr "Dispositivos HDD (temperatura)" msgstr "Dispositivos HDD (temperatura)"
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device" msgid "Disable auto select device and set specified device"
msgstr "" msgstr ""
"Desativar auto seleção de dispositivos e escolher um dispositivo específico" "Desativar auto seleção de dispositivos e escolher um dispositivo específico"
#: po/rc.cpp:71 rc.cpp:71 #: po/rc.cpp:77 rc.cpp:77
msgid "Set network device" msgid "Set network device"
msgstr "Escolher dispositivo de rede" msgstr "Escolher dispositivo de rede"
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag" msgid "AC online tag"
msgstr "Rótulo com carregador conectado" msgstr "Rótulo com carregador conectado"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online" msgid "Line, which returns when AC is online"
msgstr "Linha, que aparece quando o carregador está conectado" msgstr "Linha, que aparece quando o carregador está conectado"
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag" msgid "AC offline tag"
msgstr "Rótulo com carregador desconectado" msgstr "Rótulo com carregador desconectado"
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is offline"
msgstr "Linha, que aparece quando o carregador está offline" msgstr "Linha, que aparece quando o carregador está offline"
#: po/rc.cpp:86 rc.cpp:86 #: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Barras"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Adicionar"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval" msgid "Time interval"
msgstr "Intervalo de tempo" msgstr "Intervalo de tempo"
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196 #: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font" msgid "Font"
msgstr "Tamanho da fonte" msgstr "Tamanho da fonte"
#: po/rc.cpp:92 rc.cpp:92 #: po/rc.cpp:107 rc.cpp:107
msgid "Font size" msgid "Font size"
msgstr "Tamanho da fonte" msgstr "Tamanho da fonte"
#: po/rc.cpp:95 rc.cpp:95 #: po/rc.cpp:110 rc.cpp:110
msgid "Font color" msgid "Font color"
msgstr "Cor da fonte" msgstr "Cor da fonte"
#: po/rc.cpp:98 rc.cpp:98 #: po/rc.cpp:113 rc.cpp:113
msgid "Font style" msgid "Font style"
msgstr "Estilo da fonte" msgstr "Estilo da fonte"
#: po/rc.cpp:101 rc.cpp:101 #: po/rc.cpp:116 rc.cpp:116
msgid "Font weight" msgid "Font weight"
msgstr "Peso da fonte" msgstr "Grossura da fonte"
#: po/rc.cpp:104 rc.cpp:104 #: po/rc.cpp:119 rc.cpp:119
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:107 rc.cpp:107
msgid "MPD port"
msgstr "Porta do MPD"
#: po/rc.cpp:110 rc.cpp:110
msgid "GPU device"
msgstr "Dispositivo GPU"
#: po/rc.cpp:113 rc.cpp:113
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "comando hddtemp " msgstr "comando hddtemp "
#: po/rc.cpp:116 rc.cpp:116 #: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Dispositivo GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player" msgid "Music player"
msgstr "Reprodutor de áudio" msgstr "Reprodutor de áudio"
#: po/rc.cpp:119 rc.cpp:119 #: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Porta do MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address" msgid "MPD address"
msgstr "Endereço do MPD" msgstr "Endereço do MPD"
#: po/rc.cpp:122 rc.cpp:122 #: po/rc.cpp:137 rc.cpp:137
msgid "Desktop check cmd" msgid "ACPI path"
msgstr "" msgstr "Caminho ACPI"
#: po/rc.cpp:125 rc.cpp:125 #: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/AC/online\" por padrão"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active" msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "" msgstr "<b>NOTA:</> Interface do player DBus deverá ser uma ativa"
#: po/rc.cpp:128 rc.cpp:128 #: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "" msgstr "Nome do player MPRIS"
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141 #: po/rc.cpp:149 rc.cpp:149
msgid "" msgid ""
"Editable\n" "Editable\n"
"del - remove item" "del - remove item"
@ -253,23 +387,51 @@ msgstr ""
"Editável\n" "Editável\n"
"del - remover item" "del - remover item"
#: po/rc.cpp:148 rc.cpp:148 #: po/rc.cpp:159 rc.cpp:159
msgid "Battery device" msgid "Custom scripts"
msgstr "Dispositivo do carregador" msgstr "Scripts customizados"
#: po/rc.cpp:151 rc.cpp:151 #: po/rc.cpp:165 rc.cpp:165
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" msgid "Configuration"
msgstr "\"/sys/class/power_supply/BAT0/capacity\" por padrão" msgstr "Configuração"
#: po/rc.cpp:154 rc.cpp:154 #: po/rc.cpp:168 rc.cpp:168
msgid "AC device" msgid "Name"
msgstr "Dispositivo do carregador" msgstr "NOme"
#: po/rc.cpp:157 rc.cpp:157 #: po/rc.cpp:171 rc.cpp:171
msgid "\"/sys/class/power_supply/AC/online\" by default" msgid "Comment"
msgstr "\"/sys/class/power_supply/AC/online\" por padrão" msgstr "Comentário"
#: po/rc.cpp:160 rc.cpp:160 #: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Valor"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Cor ativa"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Cor inativa"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Tipo"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Direção"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Altura"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Largura"
#: po/rc.cpp:195 rc.cpp:195
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -277,80 +439,88 @@ msgstr ""
"Os rótulos de CPU, frequência de GPU, memória, swap e rede suportam dica de " "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." "contexto gráfica. Para ativá-los, basta selecionar a caixa necessária."
#: po/rc.cpp:163 rc.cpp:163 #: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Número de valores para dicas de contexto" msgstr "Número de valores para dicas de contexto"
#: po/rc.cpp:166 rc.cpp:166 #: po/rc.cpp:201 rc.cpp:201
msgid "Background" msgid "Background"
msgstr "" msgstr "Plano de fundo"
#: po/rc.cpp:169 rc.cpp:169 #: po/rc.cpp:204 rc.cpp:204
msgid "CPU color" msgid "CPU color"
msgstr "Cor da frequência da GPU" msgstr "Cor da CPU"
#: po/rc.cpp:172 rc.cpp:172 #: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Cor da frequência da GPU" msgstr "Cor do relógio da CPU"
#: po/rc.cpp:175 rc.cpp:175 #: po/rc.cpp:210 rc.cpp:210
msgid "Memory color" msgid "Memory color"
msgstr "Cor da memória" msgstr "Cor da memória"
#: po/rc.cpp:178 rc.cpp:178 #: po/rc.cpp:213 rc.cpp:213
msgid "Swap color" msgid "Swap color"
msgstr "Cor do swap" msgstr "Cor da swap"
#: po/rc.cpp:181 rc.cpp:181 #: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color" msgid "Download speed color"
msgstr "Cor da velocidade de download" msgstr "Cor da velocidade de download"
#: po/rc.cpp:184 rc.cpp:184 #: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Cor da velocidade de upload" msgstr "Cor da velocidade de upload"
#: po/rc.cpp:187 rc.cpp:187 #: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color" msgid "Battery active color"
msgstr "" msgstr "Cor da bateria ativa"
#: po/rc.cpp:190 rc.cpp:190 #: po/rc.cpp:225 rc.cpp:225
#, fuzzy
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Dispositivo do carregador" msgstr "Cor da bateria inativa"
#: po/rc.cpp:193 rc.cpp:193 #: po/rc.cpp:228 rc.cpp:228
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a "
"awesome-widgets/\">project homepage</a>" "href=\"http://arcanis.name/projects/awesome-widgets/\">project homepage</a>"
msgstr "" msgstr ""
"Informações detalhadas podem ser encontradas na <a href=\"http://arcanis." "Informações detalhadas podem ser encontradas na <a "
"name/projects/awesome-widgets/\">página do projeto</a>" "href=\"http://arcanis.name/projects/awesome-widgets/\">página do projeto</a>"
#: po/rc.cpp:199 rc.cpp:199 #: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "Ctrl+B" msgstr "Ctrl+B"
#: po/rc.cpp:202 rc.cpp:202 #: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I" msgid "Ctrl+I"
msgstr "Ctrl+I" msgstr "Ctrl+I"
#: po/rc.cpp:205 rc.cpp:205 #: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U" msgid "Ctrl+U"
msgstr "Ctrl+U" msgstr "Ctrl+U"
#: po/rc.cpp:208 rc.cpp:208 #: po/rc.cpp:244 rc.cpp:244
msgid "Add"
msgstr "Adicionar"
#: po/rc.cpp:209 rc.cpp:209
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "under" msgstr "under"
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "dreanazous@gmail.com" msgstr "under@insicuri.net"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Intervalo de tempo"
#~ msgid "Custom command"
#~ msgstr "Comando personalizado"
#~ msgid "Battery device"
#~ msgstr "Dispositivo do carregador"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" por padrão"
#~ msgid "Vertical layout" #~ msgid "Vertical layout"
#~ msgstr "Layout vertical" #~ msgstr "Layout vertical"
@ -580,9 +750,6 @@ msgstr "dreanazous@gmail.com"
#~ "$pkgcountN - número de pacotes disponíveis para atualizar, comando N. Por " #~ "$pkgcountN - número de pacotes disponíveis para atualizar, comando N. Por "
#~ "exemplo $pkgcount0" #~ "exemplo $pkgcount0"
#~ msgid "Custom"
#~ msgstr "Personalizado"
#~ msgid "" #~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr "" #~ msgstr ""

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:16+0400\n" "PO-Revision-Date: 2014-11-21 05:12+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,66 +18,172 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "Запустить ksysguard" msgstr "Запустить ksysguard"
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "Показать README" msgstr "Показать README"
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "Обновить текст" msgstr "Обновить текст"
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "Своя команда" msgstr "Проверить обновления"
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Текущая версия : %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "Новая версия : %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Нажмите \"Ok\" для загрузки"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Найдены обновления"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Тег: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Комментарий: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Имя: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Команда: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "Пакетный менеджер" msgstr "Пакетный менеджер"
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "Число пустых линий" msgstr "Число пустых линий"
#: configuration.cpp:362 #: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Версия %1\n"
"(дата сборки %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Коллекция минималистичных плазмоидов"
#: configuration.cpp:430
msgid "Links:"
msgstr "Ссылки:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Домашняя страница"
#: configuration.cpp:432
msgid "Repository"
msgstr "Репозиторий"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Баг-трекер"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Тикет перевода"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Пакеты в AUR"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "Данное приложение лицензировано под %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Переводчики: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "Данное приложение использует: %1"
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "Виджет" msgstr "Виджет"
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "Расширенные" msgstr "Расширенные"
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "Тултип" msgstr "Тултип"
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "Внешний вид" msgstr "Внешний вид"
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr "О программе"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Введите имя файла"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Имя файла"
#: configuration.cpp:793 configuration.cpp:819
msgid "Edit"
msgstr "Править"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Копировать"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "Удалить" msgstr "Удалить"
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "Выберете шрифт" msgstr "Выберете шрифт"
#: po/rc.cpp:3 rc.cpp:3 #: graphicalitem.cpp:442
msgid "Enable background" msgid "Select color"
msgstr "Включить фон" msgstr "Выберете цвет"
#: po/rc.cpp:6 rc.cpp:6 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable popup on mouse click" msgid "Enable popup on mouse click"
msgstr "Включить сообщения по клику мыши" msgstr "Включить сообщения по клику мыши"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Включить фон"
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format" msgid "Custom time format"
msgstr "Свой формат времени" msgstr "Свой формат времени"
@ -146,108 +252,124 @@ msgstr "Температурные единицы"
msgid "Temperature devices" msgid "Temperature devices"
msgstr "Температурные устройства" msgstr "Температурные устройства"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "Редактируемо" msgstr "Редактируемо"
#: po/rc.cpp:50 rc.cpp:50 #: po/rc.cpp:50 rc.cpp:50
msgid "Fan devices"
msgstr "Кулеры"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points" msgid "Mount points"
msgstr "Точки монтирования" msgstr "Точки монтирования"
#: po/rc.cpp:56 rc.cpp:56 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)" msgid "HDD devices (speed)"
msgstr "HDD (скорость)" msgstr "HDD (скорость)"
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)" msgid "HDD devices (temp)"
msgstr "HDD (температура)" msgstr "HDD (температура)"
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device" msgid "Disable auto select device and set specified device"
msgstr "Отключить автовыбор устройства и использовать указанное" msgstr "Отключить автовыбор устройства и использовать указанное"
#: po/rc.cpp:71 rc.cpp:71 #: po/rc.cpp:77 rc.cpp:77
msgid "Set network device" msgid "Set network device"
msgstr "Выберете сетевое устройство" msgstr "Выберете сетевое устройство"
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag" msgid "AC online tag"
msgstr "AC подключен" msgstr "AC подключен"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online" msgid "Line, which returns when AC is online"
msgstr "Строка, возвращаемая при подключенном адаптере питания" msgstr "Строка, возвращаемая при подключенном адаптере питания"
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag" msgid "AC offline tag"
msgstr "AC отключен" msgstr "AC отключен"
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is offline"
msgstr "Строка, возвращаемая при отключенном адаптере питания" msgstr "Строка, возвращаемая при отключенном адаптере питания"
#: po/rc.cpp:86 rc.cpp:86 #: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Бары"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Добавить"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval" msgid "Time interval"
msgstr "Интервал обновления" msgstr "Интервал обновления"
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196 #: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font" msgid "Font"
msgstr "Шрифт" msgstr "Шрифт"
#: po/rc.cpp:92 rc.cpp:92 #: po/rc.cpp:107 rc.cpp:107
msgid "Font size" msgid "Font size"
msgstr "Размер шрифта" msgstr "Размер шрифта"
#: po/rc.cpp:95 rc.cpp:95 #: po/rc.cpp:110 rc.cpp:110
msgid "Font color" msgid "Font color"
msgstr "Цвет шрифта" msgstr "Цвет шрифта"
#: po/rc.cpp:98 rc.cpp:98 #: po/rc.cpp:113 rc.cpp:113
msgid "Font style" msgid "Font style"
msgstr "Стиль шрифта" msgstr "Стиль шрифта"
#: po/rc.cpp:101 rc.cpp:101 #: po/rc.cpp:116 rc.cpp:116
msgid "Font weight" msgid "Font weight"
msgstr "Ширина шрифта" msgstr "Ширина шрифта"
#: po/rc.cpp:104 rc.cpp:104 #: po/rc.cpp:119 rc.cpp:119
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:107 rc.cpp:107
msgid "MPD port"
msgstr "Порт сервера MPD"
#: po/rc.cpp:110 rc.cpp:110
msgid "GPU device"
msgstr "Устройство GPU"
#: po/rc.cpp:113 rc.cpp:113
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Команда hddtemp" msgstr "Команда hddtemp"
#: po/rc.cpp:116 rc.cpp:116 #: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Устройство GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player" msgid "Music player"
msgstr "Музыкальный плеер" msgstr "Музыкальный плеер"
#: po/rc.cpp:119 rc.cpp:119 #: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Порт сервера MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address" msgid "MPD address"
msgstr "Адрес сервера MPD" msgstr "Адрес сервера MPD"
#: po/rc.cpp:122 rc.cpp:122 #: po/rc.cpp:137 rc.cpp:137
msgid "Desktop check cmd" msgid "ACPI path"
msgstr "Команда для проверки рабочего стола" msgstr "Пусть к ACPI"
#: po/rc.cpp:125 rc.cpp:125 #: po/rc.cpp:140 rc.cpp:140
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/\" по умолчанию"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active" msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "<b>ВНИМАНИЕ:</b> DBus интерфейс плеера должен быть активен" msgstr "<b>ВНИМАНИЕ:</b> DBus интерфейс плеера должен быть активен"
#: po/rc.cpp:128 rc.cpp:128 #: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "Имя плеера в MPRIS" msgstr "Имя плеера в MPRIS"
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141 #: po/rc.cpp:149 rc.cpp:149
msgid "" msgid ""
"Editable\n" "Editable\n"
"del - remove item" "del - remove item"
@ -255,23 +377,51 @@ msgstr ""
"Редактируемо\n" "Редактируемо\n"
"del - удалить строку" "del - удалить строку"
#: po/rc.cpp:148 rc.cpp:148 #: po/rc.cpp:159 rc.cpp:159
msgid "Battery device" msgid "Custom scripts"
msgstr "Устройство батареи" msgstr "Свои скрипты"
#: po/rc.cpp:151 rc.cpp:151 #: po/rc.cpp:165 rc.cpp:165
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" msgid "Configuration"
msgstr "\"/sys/class/power_supply/BAT0/capacity\" по умолчанию" msgstr "Настройка"
#: po/rc.cpp:154 rc.cpp:154 #: po/rc.cpp:168 rc.cpp:168
msgid "AC device" msgid "Name"
msgstr "Устройство AC" msgstr "Имя"
#: po/rc.cpp:157 rc.cpp:157 #: po/rc.cpp:171 rc.cpp:171
msgid "\"/sys/class/power_supply/AC/online\" by default" msgid "Comment"
msgstr "\"/sys/class/power_supply/AC/online\" по умолчанию" msgstr "Комментарий"
#: po/rc.cpp:160 rc.cpp:160 #: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Значение"
#: po/rc.cpp:177 rc.cpp:177
msgid "Active color"
msgstr "Активный цвет"
#: po/rc.cpp:180 rc.cpp:180
msgid "Inactive color"
msgstr "Неактивный цвет"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Тип"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Направление"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Высота"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Ширина"
#: po/rc.cpp:195 rc.cpp:195
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -280,47 +430,47 @@ msgstr ""
"графический тултип. Чтобы включить его, просто сделайте требуемые чекбоксы " "графический тултип. Чтобы включить его, просто сделайте требуемые чекбоксы "
"полностью чекнутыми." "полностью чекнутыми."
#: po/rc.cpp:163 rc.cpp:163 #: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Число хранящихся значений" msgstr "Число хранящихся значений"
#: po/rc.cpp:166 rc.cpp:166 #: po/rc.cpp:201 rc.cpp:201
msgid "Background" msgid "Background"
msgstr "Фон" msgstr "Фон"
#: po/rc.cpp:169 rc.cpp:169 #: po/rc.cpp:204 rc.cpp:204
msgid "CPU color" msgid "CPU color"
msgstr "Цвет CPU" msgstr "Цвет CPU"
#: po/rc.cpp:172 rc.cpp:172 #: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Цвет частоты CPU" msgstr "Цвет частоты CPU"
#: po/rc.cpp:175 rc.cpp:175 #: po/rc.cpp:210 rc.cpp:210
msgid "Memory color" msgid "Memory color"
msgstr "Цвет памяти" msgstr "Цвет памяти"
#: po/rc.cpp:178 rc.cpp:178 #: po/rc.cpp:213 rc.cpp:213
msgid "Swap color" msgid "Swap color"
msgstr "Цвет swap" msgstr "Цвет swap"
#: po/rc.cpp:181 rc.cpp:181 #: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color" msgid "Download speed color"
msgstr "Цвет скорости загрузки" msgstr "Цвет скорости загрузки"
#: po/rc.cpp:184 rc.cpp:184 #: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Цвет скорости отдачи" msgstr "Цвет скорости отдачи"
#: po/rc.cpp:187 rc.cpp:187 #: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color" msgid "Battery active color"
msgstr "Цвет заряжаемой батареи" msgstr "Цвет заряжаемой батареи"
#: po/rc.cpp:190 rc.cpp:190 #: po/rc.cpp:225 rc.cpp:225
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Цвет разряжаемой батареи" msgstr "Цвет разряжаемой батареи"
#: po/rc.cpp:193 rc.cpp:193 #: po/rc.cpp:228 rc.cpp:228
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -328,32 +478,44 @@ msgstr ""
"Подробная информация может быть найдена на <a href=\"http://arcanis.name/ru/" "Подробная информация может быть найдена на <a href=\"http://arcanis.name/ru/"
"projects/awesome-widgets/\">домашней странице проекта</a>" "projects/awesome-widgets/\">домашней странице проекта</a>"
#: po/rc.cpp:199 rc.cpp:199 #: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "Ctrl+B" msgstr "Ctrl+B"
#: po/rc.cpp:202 rc.cpp:202 #: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I" msgid "Ctrl+I"
msgstr "Ctrl+I" msgstr "Ctrl+I"
#: po/rc.cpp:205 rc.cpp:205 #: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U" msgid "Ctrl+U"
msgstr "Ctrl+U" msgstr "Ctrl+U"
#: po/rc.cpp:208 rc.cpp:208 #: po/rc.cpp:244 rc.cpp:244
msgid "Add"
msgstr "Добавить"
#: po/rc.cpp:209 rc.cpp:209
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Интервал обновления"
#~ msgid "Desktop check cmd"
#~ msgstr "Команда для проверки рабочего стола"
#~ msgid "Custom command"
#~ msgstr "Своя команда"
#~ msgid "Battery device"
#~ msgstr "Устройство батареи"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" по умолчанию"
#~ msgid "Vertical layout" #~ msgid "Vertical layout"
#~ msgstr "Вертикальная разметка" #~ msgstr "Вертикальная разметка"
@ -369,9 +531,6 @@ msgstr "esalexeev@gmail.com"
#~ msgid "Appearance configuration" #~ msgid "Appearance configuration"
#~ msgstr "Настройка внешнего вида" #~ msgstr "Настройка внешнего вида"
#~ msgid "DE Configuration"
#~ msgstr "Настройка DE"
#~ msgid "Tooltip configuration" #~ msgid "Tooltip configuration"
#~ msgstr "Настройка тултипа" #~ msgstr "Настройка тултипа"
@ -588,17 +747,11 @@ msgstr "esalexeev@gmail.com"
#~ "$pkgcountN - число пакетов, которые доступны для обновления, для команды " #~ "$pkgcountN - число пакетов, которые доступны для обновления, для команды "
#~ "N. Например, $pkgcount0" #~ "N. Например, $pkgcount0"
#~ msgid "Custom"
#~ msgstr "Своя команда"
#~ msgid "" #~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr "" #~ msgstr ""
#~ "$customN - получить информацию из своей команды N. Например $custom0" #~ "$customN - получить информацию из своей команды N. Например $custom0"
#~ msgid "Current desktop"
#~ msgstr "Текущий рабочий стол"
#~ msgid "" #~ msgid ""
#~ "$name - desktop name\n" #~ "$name - desktop name\n"
#~ "$number - desktop number\n" #~ "$number - desktop number\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 01:52+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-05 11:22+0400\n" "PO-Revision-Date: 2014-09-05 11:22+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n" "Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n"
@ -18,66 +18,174 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: awesome-widget.cpp:77 #: awesome-widget.cpp:95
msgid "Run ksysguard" msgid "Run ksysguard"
msgstr "Запустити ksysguard" msgstr "Запустити ksysguard"
#: awesome-widget.cpp:80 #: awesome-widget.cpp:98
msgid "Show README" msgid "Show README"
msgstr "Показати README" msgstr "Показати README"
#: awesome-widget.cpp:83 #: awesome-widget.cpp:101
msgid "Update text" msgid "Update text"
msgstr "Оновити текст" msgstr "Оновити текст"
#: configuration.cpp:319 po/rc.cpp:145 rc.cpp:145 #: awesome-widget.cpp:106 po/rc.cpp:98 rc.cpp:98
msgid "Custom command" msgid "Check for updates"
msgstr "Своя команда" msgstr "Шукати оновлення"
#: configuration.cpp:349 po/rc.cpp:135 rc.cpp:135 #: awesome-widget.cpp:491
msgid "Current version : %1"
msgstr "Поточна версія : %1"
#: awesome-widget.cpp:492
msgid "New version : %1"
msgstr "Нова версія : %1"
#: awesome-widget.cpp:493
msgid "Click \"Ok\" to download"
msgstr "Натисніть \"Ok\" для завантаження"
#: awesome-widget.cpp:494
msgid "There are updates"
msgstr "Знайдені оновлення"
#: configuration.cpp:307
msgid "Tag: %1"
msgstr "Тег: %1"
#: configuration.cpp:308 configuration.cpp:383
msgid "Comment: %1"
msgstr "Коментар: %1"
#: configuration.cpp:382
msgid "Name: %1"
msgstr "Ім’я: %1"
#: configuration.cpp:384
msgid "Exec: %1"
msgstr "Команда: %1"
#: configuration.cpp:413 po/rc.cpp:153 rc.cpp:153
msgid "Package manager" msgid "Package manager"
msgstr "Пакетний менеджер" msgstr "Пакетний менеджер"
#: configuration.cpp:350 po/rc.cpp:138 rc.cpp:138 #: configuration.cpp:414 po/rc.cpp:156 rc.cpp:156
msgid "Null lines" msgid "Null lines"
msgstr "Кількість пустих рядків" msgstr "Кількість пустих рядків"
#: configuration.cpp:362 #: configuration.cpp:428
msgid ""
"Version %1\n"
"(build date %2)"
msgstr ""
"Версія %1\n"
"(дата створення %2)"
#: configuration.cpp:429
msgid "A set of minimalistic plasmoid widgets"
msgstr "Набір мінімалістичних плазмоїдів"
#: configuration.cpp:430
msgid "Links:"
msgstr "Посилання:"
#: configuration.cpp:431
msgid "Homepage"
msgstr "Домашня сторінка"
#: configuration.cpp:432
msgid "Repository"
msgstr "Репозиторій"
#: configuration.cpp:433
msgid "Bugtracker"
msgstr "Баг-трекер"
#: configuration.cpp:434
msgid "Translation issue"
msgstr "Тікет перекладу"
#: configuration.cpp:435
msgid "AUR packages"
msgstr "Пакети в AUR"
#: configuration.cpp:437
msgid "This software is licensed under %1"
msgstr "Цю програму ліцензовано під %1"
#: configuration.cpp:445
msgid "Translators: %1"
msgstr "Перекладачі: %1"
#: configuration.cpp:446
msgid "This software uses: %1"
msgstr "Ця програма використовує: %1"
#: configuration.cpp:448
msgid "Widget" msgid "Widget"
msgstr "Віджет" msgstr "Віджет"
#: configuration.cpp:363 #: configuration.cpp:449
msgid "Advanced" msgid "Advanced"
msgstr "Розширені" msgstr "Розширені"
#: configuration.cpp:364 #: configuration.cpp:450
msgid "Tooltip" msgid "Tooltip"
msgstr "Тултіп" msgstr "Підказки"
#: configuration.cpp:365 #: configuration.cpp:451
msgid "Appearance" msgid "Appearance"
msgstr "Зовнішній вигляд" msgstr "Зовнішній вигляд"
#: configuration.cpp:366 #: configuration.cpp:452
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#: configuration.cpp:645 configuration.cpp:659 #: configuration.cpp:453
msgid "About"
msgstr "Про програму"
#: configuration.cpp:734 configuration.cpp:760 configuration.cpp:868
#: configuration.cpp:910
msgid "Enter file name"
msgstr "Введіть ім’я файлу"
#: configuration.cpp:735 configuration.cpp:761 configuration.cpp:869
#: configuration.cpp:911
msgid "File name"
msgstr "Ім’я файлу"
#: configuration.cpp:793 configuration.cpp:819
#, fuzzy
msgid "Edit"
msgstr "Редагувати"
#: configuration.cpp:794 configuration.cpp:820
msgid "Copy"
msgstr "Копіювати"
#: configuration.cpp:795 configuration.cpp:821 configuration.cpp:843
msgid "Remove" msgid "Remove"
msgstr "Видалити" msgstr "Видалити"
#: configuration.cpp:706 #: configuration.cpp:1037
msgid "Select font" msgid "Select font"
msgstr "" msgstr "Оберіть шрифт"
#: graphicalitem.cpp:442
#, fuzzy
msgid "Select color"
msgstr "Оберіть колір"
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Enable background"
msgstr ""
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable popup on mouse click" msgid "Enable popup on mouse click"
msgstr "Включити спливаючі підказки при натисканні клавіші миші" msgstr "Включити спливаючі підказки при натисканні клавіші миші"
#: po/rc.cpp:6 rc.cpp:6
msgid "Enable background"
msgstr "Включити фон"
#: po/rc.cpp:9 rc.cpp:9 #: po/rc.cpp:9 rc.cpp:9
msgid "Custom time format" msgid "Custom time format"
msgstr "Свій формат часу" msgstr "Свій формат часу"
@ -146,108 +254,126 @@ msgstr "Одиниці виміру температури"
msgid "Temperature devices" msgid "Temperature devices"
msgstr "Температурні пристрої" msgstr "Температурні пристрої"
#: po/rc.cpp:47 po/rc.cpp:53 po/rc.cpp:59 po/rc.cpp:65 rc.cpp:47 rc.cpp:53 #: 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:59 rc.cpp:65 #: rc.cpp:53 rc.cpp:59 rc.cpp:65 rc.cpp:71
msgid "Editable" msgid "Editable"
msgstr "Можна редагувати" msgstr "Можна редагувати"
#: po/rc.cpp:50 rc.cpp:50 #: po/rc.cpp:50 rc.cpp:50
#, fuzzy
msgid "Fan devices"
msgstr "Кулери"
#: po/rc.cpp:56 rc.cpp:56
msgid "Mount points" msgid "Mount points"
msgstr "Точки монтування" msgstr "Точки монтування"
#: po/rc.cpp:56 rc.cpp:56 #: po/rc.cpp:62 rc.cpp:62
msgid "HDD devices (speed)" msgid "HDD devices (speed)"
msgstr "HDD (швидкість)" msgstr "HDD (швидкість)"
#: po/rc.cpp:62 rc.cpp:62 #: po/rc.cpp:68 rc.cpp:68
msgid "HDD devices (temp)" msgid "HDD devices (temp)"
msgstr "HDD (температура)" msgstr "HDD (температура)"
#: po/rc.cpp:68 rc.cpp:68 #: po/rc.cpp:74 rc.cpp:74
msgid "Disable auto select device and set specified device" msgid "Disable auto select device and set specified device"
msgstr "Відключити автоматичний вибір пристрою та використовувати вказаний" msgstr "Відключити автоматичний вибір пристрою та використовувати вказаний"
#: po/rc.cpp:71 rc.cpp:71 #: po/rc.cpp:77 rc.cpp:77
msgid "Set network device" msgid "Set network device"
msgstr "Оберіть мережевий пристрій" msgstr "Оберіть мережевий пристрій"
#: po/rc.cpp:74 rc.cpp:74 #: po/rc.cpp:80 rc.cpp:80
msgid "AC online tag" msgid "AC online tag"
msgstr "AC підключений" msgstr "AC підключений"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:83 rc.cpp:83
msgid "Line, which returns when AC is online" msgid "Line, which returns when AC is online"
msgstr "Рядок, що повертається при підключеному адаптері живлення" msgstr "Рядок, що повертається при підключеному адаптері живлення"
#: po/rc.cpp:80 rc.cpp:80 #: po/rc.cpp:86 rc.cpp:86
msgid "AC offline tag" msgid "AC offline tag"
msgstr "AC відключений" msgstr "AC відключений"
#: po/rc.cpp:83 rc.cpp:83 #: po/rc.cpp:89 rc.cpp:89
msgid "Line, which returns when AC is offline" msgid "Line, which returns when AC is offline"
msgstr "Рядок, що повертається при відключеному адаптері живлення" msgstr "Рядок, що повертається при відключеному адаптері живлення"
#: po/rc.cpp:86 rc.cpp:86 #: po/rc.cpp:92 rc.cpp:92
msgid "Bars"
msgstr "Бари"
#: po/rc.cpp:95 po/rc.cpp:162 po/rc.cpp:243 rc.cpp:95 rc.cpp:162 rc.cpp:243
msgid "Add"
msgstr "Додати"
#: po/rc.cpp:101 rc.cpp:101
msgid "Time interval" msgid "Time interval"
msgstr "Інтервал оновлення" msgstr "Інтервал оновлення"
#: po/rc.cpp:89 po/rc.cpp:196 rc.cpp:89 rc.cpp:196 #: po/rc.cpp:104 po/rc.cpp:231 rc.cpp:104 rc.cpp:231
msgid "Font" msgid "Font"
msgstr "Шрифт" msgstr "Шрифт"
#: po/rc.cpp:92 rc.cpp:92 #: po/rc.cpp:107 rc.cpp:107
msgid "Font size" msgid "Font size"
msgstr "Розмір шрифту" msgstr "Розмір шрифту"
#: po/rc.cpp:95 rc.cpp:95 #: po/rc.cpp:110 rc.cpp:110
msgid "Font color" msgid "Font color"
msgstr "Колір шрифту" msgstr "Колір шрифту"
#: po/rc.cpp:98 rc.cpp:98 #: po/rc.cpp:113 rc.cpp:113
msgid "Font style" msgid "Font style"
msgstr "Стиль шрифту" msgstr "Стиль шрифту"
#: po/rc.cpp:101 rc.cpp:101 #: po/rc.cpp:116 rc.cpp:116
msgid "Font weight" msgid "Font weight"
msgstr "Ширина шрифту" msgstr "Ширина шрифту"
#: po/rc.cpp:104 rc.cpp:104 #: po/rc.cpp:119 rc.cpp:119
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:107 rc.cpp:107
msgid "MPD port"
msgstr "Порт сервера MPD"
#: po/rc.cpp:110 rc.cpp:110
msgid "GPU device"
msgstr "Пристій GPU"
#: po/rc.cpp:113 rc.cpp:113
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Команда hddtemp" msgstr "Команда hddtemp"
#: po/rc.cpp:116 rc.cpp:116 #: po/rc.cpp:122 rc.cpp:122
msgid "GPU device"
msgstr "Пристій GPU"
#: po/rc.cpp:125 rc.cpp:125
msgid "HDD"
msgstr "HDD"
#: po/rc.cpp:128 rc.cpp:128
msgid "Music player" msgid "Music player"
msgstr "Музичний плеєр" msgstr "Музичний плеєр"
#: po/rc.cpp:119 rc.cpp:119 #: po/rc.cpp:131 rc.cpp:131
msgid "MPD port"
msgstr "Порт сервера MPD"
#: po/rc.cpp:134 rc.cpp:134
msgid "MPD address" msgid "MPD address"
msgstr "Адреса сервера MPD" msgstr "Адреса сервера MPD"
#: po/rc.cpp:122 rc.cpp:122 #: po/rc.cpp:137 rc.cpp:137
msgid "Desktop check cmd" msgid "ACPI path"
msgstr "" msgstr "Шлях до ICPI"
#: po/rc.cpp:125 rc.cpp:125 #: po/rc.cpp:140 rc.cpp:140
#, fuzzy
msgid "\"/sys/class/power_supply/\" by default"
msgstr "\"/sys/class/power_supply/\" за замовчуванням"
#: po/rc.cpp:143 rc.cpp:143
msgid "<b>NOTE:</b> Player DBus interface should be an active" msgid "<b>NOTE:</b> Player DBus interface should be an active"
msgstr "" msgstr "<b>УВАГА:</b> DBus інтерфейс плеєра має бути активним"
#: po/rc.cpp:128 rc.cpp:128 #: po/rc.cpp:146 rc.cpp:146
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "" msgstr "Ім’я плеєру в MPRIS"
#: po/rc.cpp:131 po/rc.cpp:141 rc.cpp:131 rc.cpp:141 #: po/rc.cpp:149 rc.cpp:149
msgid "" msgid ""
"Editable\n" "Editable\n"
"del - remove item" "del - remove item"
@ -255,73 +381,104 @@ msgstr ""
"Можна редагувати\n" "Можна редагувати\n"
"del - видалити рядок" "del - видалити рядок"
#: po/rc.cpp:148 rc.cpp:148 #: po/rc.cpp:159 rc.cpp:159
msgid "Battery device" #, fuzzy
msgstr "Пристрій батареї" msgid "Custom scripts"
msgstr "Свої скрипти"
#: po/rc.cpp:151 rc.cpp:151 #: po/rc.cpp:165 rc.cpp:165
msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" msgid "Configuration"
msgstr "\"/sys/class/power_supply/BAT0/capacity\" за замовчуванням" msgstr "Налаштування"
#: po/rc.cpp:154 rc.cpp:154 #: po/rc.cpp:168 rc.cpp:168
msgid "AC device" msgid "Name"
msgstr "AC пристрій" msgstr "Ім’я"
#: po/rc.cpp:157 rc.cpp:157 #: po/rc.cpp:171 rc.cpp:171
msgid "\"/sys/class/power_supply/AC/online\" by default" msgid "Comment"
msgstr "\"/sys/class/power_supply/AC/online\" за замовчуванням" msgstr "Коментар"
#: po/rc.cpp:160 rc.cpp:160 #: po/rc.cpp:174 rc.cpp:174
msgid "Value"
msgstr "Значення"
#: po/rc.cpp:177 rc.cpp:177
#, fuzzy
msgid "Active color"
msgstr "Активний колір"
#: po/rc.cpp:180 rc.cpp:180
#, fuzzy
msgid "Inactive color"
msgstr "Неактивний колір"
#: po/rc.cpp:183 rc.cpp:183
msgid "Type"
msgstr "Тип"
#: po/rc.cpp:186 rc.cpp:186
msgid "Direction"
msgstr "Напрямок"
#: po/rc.cpp:189 rc.cpp:189
msgid "Height"
msgstr "Висота"
#: po/rc.cpp:192 rc.cpp:192
msgid "Width"
msgstr "Ширина"
#: po/rc.cpp:195 rc.cpp:195
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip."
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
msgstr "" msgstr ""
"Поля \"CPU\", \"Частота CPU\", \"Пам’ятьґЄ, \"Swap\" та \"Мережа\" " "Поля \"CPU\", \"Частота CPU\", \"Пам’ять\", \"Swap\" та \"Мережа\" "
"підтримують графічний тултіп. Щоб їх задіяти, просто зробіть необхідні " "підтримують графічні підказки. Щоб їх задіяти, просто зробіть необхідні "
"чекбокси повністю чекнутими." "чекбокси повністю чекнутими."
#: po/rc.cpp:163 rc.cpp:163 #: po/rc.cpp:198 rc.cpp:198
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Кількість значень для тултіпа" msgstr "Кількість значень для підказки"
#: po/rc.cpp:166 rc.cpp:166 #: po/rc.cpp:201 rc.cpp:201
msgid "Background" msgid "Background"
msgstr "" msgstr "Фон"
#: po/rc.cpp:169 rc.cpp:169 #: po/rc.cpp:204 rc.cpp:204
msgid "CPU color" msgid "CPU color"
msgstr "Колір CPU" msgstr "Колір CPU"
#: po/rc.cpp:172 rc.cpp:172 #: po/rc.cpp:207 rc.cpp:207
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Колір частоти CPU" msgstr "Колір частоти CPU"
#: po/rc.cpp:175 rc.cpp:175 #: po/rc.cpp:210 rc.cpp:210
msgid "Memory color" msgid "Memory color"
msgstr "Колір пам’яті" msgstr "Колір пам’яті"
#: po/rc.cpp:178 rc.cpp:178 #: po/rc.cpp:213 rc.cpp:213
msgid "Swap color" msgid "Swap color"
msgstr "Колір swap" msgstr "Колір swap"
#: po/rc.cpp:181 rc.cpp:181 #: po/rc.cpp:216 rc.cpp:216
msgid "Download speed color" msgid "Download speed color"
msgstr "Колір швидкості скачування" msgstr "Колір швидкості скачування"
#: po/rc.cpp:184 rc.cpp:184 #: po/rc.cpp:219 rc.cpp:219
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Колір швидкості віддачі" msgstr "Колір швидкості віддачі"
#: po/rc.cpp:187 rc.cpp:187 #: po/rc.cpp:222 rc.cpp:222
msgid "Battery active color" msgid "Battery active color"
msgstr "" msgstr "Колір батареї, що заряджається"
#: po/rc.cpp:190 rc.cpp:190 #: po/rc.cpp:225 rc.cpp:225
#, fuzzy #, fuzzy
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Пристрій батареї" msgstr "Колір батарєї, що розряджається"
#: po/rc.cpp:193 rc.cpp:193 #: po/rc.cpp:228 rc.cpp:228
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -329,32 +486,41 @@ msgstr ""
"Детальна інформація може бути знайдена на <a href=\"http://arcanis.name/" "Детальна інформація може бути знайдена на <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">домашній сторінці проекту</a>" "projects/awesome-widgets/\">домашній сторінці проекту</a>"
#: po/rc.cpp:199 rc.cpp:199 #: po/rc.cpp:234 rc.cpp:234
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "Ctrl+B" msgstr "Ctrl+B"
#: po/rc.cpp:202 rc.cpp:202 #: po/rc.cpp:237 rc.cpp:237
msgid "Ctrl+I" msgid "Ctrl+I"
msgstr "Ctrl+I" msgstr "Ctrl+I"
#: po/rc.cpp:205 rc.cpp:205 #: po/rc.cpp:240 rc.cpp:240
msgid "Ctrl+U" msgid "Ctrl+U"
msgstr "Ctrl+U" msgstr "Ctrl+U"
#: po/rc.cpp:208 rc.cpp:208 #: po/rc.cpp:244 rc.cpp:244
msgid "Add"
msgstr "Добавити"
#: po/rc.cpp:209 rc.cpp:209
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Slobodyan Victor" msgstr "Slobodyan Victor"
#: po/rc.cpp:210 rc.cpp:210 #: po/rc.cpp:245 rc.cpp:245
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "sarumyan@i.ua" msgstr "sarumyan@i.ua"
#, fuzzy
#~ msgid "Interval"
#~ msgstr "Інтервал оновлення"
#~ msgid "Custom command"
#~ msgstr "Своя команда"
#~ msgid "Battery device"
#~ msgstr "Пристрій батареї"
#~ msgid "\"/sys/class/power_supply/BAT0/capacity\" by default"
#~ msgstr "\"/sys/class/power_supply/BAT0/capacity\" за замовчуванням"
#~ msgid "Vertical layout" #~ msgid "Vertical layout"
#~ msgstr "Вертикальна розмітка" #~ msgstr "Вертикальна розмітка"
@ -571,9 +737,6 @@ msgstr "sarumyan@i.ua"
#~ "$pkgcountN - кількість пакетів, що доступні для оновлення, для команди N. " #~ "$pkgcountN - кількість пакетів, що доступні для оновлення, для команди N. "
#~ "Наприклад: $pkgcount0" #~ "Наприклад: $pkgcount0"
#~ msgid "Custom"
#~ msgstr "Своя команда"
#~ msgid "" #~ msgid ""
#~ "$customN - get output from custom command N (from N). Example `$custom0`" #~ "$customN - get output from custom command N (from N). Example `$custom0`"
#~ msgstr "" #~ msgstr ""

View File

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

View File

@ -24,6 +24,7 @@
#include <math.h> #include <math.h>
#include "customlabel.h" #include "customlabel.h"
#include "graphicalitem.h"
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
@ -41,7 +42,9 @@ void AwesomeWidget::reinit()
keys = getKeys(); keys = getKeys();
foundKeys = findKeys(); foundKeys = findKeys();
updateNetworkDevice(); getGraphicalItems();
foundBars = findGraphicalItems();
updateNetworkDevice(false);
connectToEngine(); connectToEngine();
} }
@ -61,11 +64,14 @@ void AwesomeWidget::sendNotification(const QString eventId, const QString messag
} }
void AwesomeWidget::updateNetworkDevice() void AwesomeWidget::updateNetworkDevice(const bool delay)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
values[QString("netdev")] = getNetworkDevice(); if (delay)
networkDeviceUpdate = 30;
else
values[QString("netdev")] = getNetworkDevice();
} }
@ -74,11 +80,17 @@ void AwesomeWidget::updateText(const bool clear)
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QString text = configuration[QString("text")]; QString text = configuration[QString("text")];
if (!clear) if (!clear) {
text.replace(QString("$$"), QString("$\\$\\"));
for (int i=0; i<foundKeys.count(); i++) for (int i=0; i<foundKeys.count(); i++)
text.replace(QString("$") + foundKeys[i], values[foundKeys[i]]); text.replace(QString("$") + foundKeys[i], values[foundKeys[i]]);
for (int i=0; i<foundBars.count(); i++)
text.replace(QString("$") + foundBars[i], getItemByTag(foundBars[i])->getImage(values[foundBars[i]].toFloat()));
text.replace(QString("$\\$\\"), QString("$$"));
}
textLabel->setText(formatLine[0] + text + formatLine[1]); textLabel->setText(formatLine[0] + text + formatLine[1]);
update(); mainLayout->itemAt(0, 0)->updateGeometry();
updateGeometry();
} }
@ -86,7 +98,7 @@ void AwesomeWidget::updateTooltip()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
toolTipView->resize(100.0 * counts[QString("tooltip")], 100.0); toolTipView->resize(100.0 * counts[QString("tooltip")], 105.0);
// boundaries // boundaries
QMap<QString, float> boundaries; QMap<QString, float> boundaries;
boundaries[QString("cpu")] = 100.0; boundaries[QString("cpu")] = 100.0;
@ -124,7 +136,7 @@ void AwesomeWidget::updateTooltip()
if (tooltipValues.contains(QString("up"))) trueKeys.append(QString("up")); if (tooltipValues.contains(QString("up"))) trueKeys.append(QString("up"));
if (tooltipValues.contains(QString("bat"))) trueKeys.append(QString("bat")); if (tooltipValues.contains(QString("bat"))) trueKeys.append(QString("bat"));
for (int i=0; i<trueKeys.count(); i++) { for (int i=0; i<trueKeys.count(); i++) {
float normX = 100.0 / (tooltipValues[trueKeys[i]].count() + 0.0); float normX = 100.0 / (float)tooltipValues[trueKeys[i]].count();
float normY = 100.0 / (1.5 * boundaries[trueKeys[i]]); float normY = 100.0 / (1.5 * boundaries[trueKeys[i]]);
if (trueKeys[i] == QString("bat")) if (trueKeys[i] == QString("bat"))
isBattery = true; isBattery = true;
@ -135,9 +147,9 @@ void AwesomeWidget::updateTooltip()
if (down) shift -= 100.0; if (down) shift -= 100.0;
for (int j=0; j<tooltipValues[trueKeys[i]].count()-1; j++) { for (int j=0; j<tooltipValues[trueKeys[i]].count()-1; j++) {
float x1 = j * normX + shift; float x1 = j * normX + shift;
float y1 = - fabs(tooltipValues[trueKeys[i]][j]) * normY; float y1 = - fabs(tooltipValues[trueKeys[i]][j]) * normY + 5.0;
float x2 = (j + 1) * normX + shift; float x2 = (j + 1) * normX + shift;
float y2 = - fabs(tooltipValues[trueKeys[i]][j+1]) * normY; float y2 = - fabs(tooltipValues[trueKeys[i]][j+1]) * normY + 5.0;
if (isBattery) { if (isBattery) {
if (tooltipValues[trueKeys[i]][j+1] > 0) if (tooltipValues[trueKeys[i]][j+1] > 0)
pen.setColor(QColor(configuration[QString("batteryColor")])); pen.setColor(QColor(configuration[QString("batteryColor")]));

View File

@ -64,41 +64,16 @@
<layout class="QHBoxLayout" name="layout_tooltipNum"> <layout class="QHBoxLayout" name="layout_tooltipNum">
<item> <item>
<widget class="QLabel" name="label_tooltipNum"> <widget class="QLabel" name="label_tooltipNum">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Number of values for tooltips</string> <string>Number of values for tooltips</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_tooltipNum">
<property name="minimum"> <property name="minimum">
<number>50</number> <number>50</number>
</property> </property>
@ -119,11 +94,8 @@
<layout class="QHBoxLayout" name="layout_background"> <layout class="QHBoxLayout" name="layout_background">
<item> <item>
<widget class="QCheckBox" name="checkBox_background"> <widget class="QCheckBox" name="checkBox_background">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Background</string> <string>Background</string>
@ -134,27 +106,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_background"> <widget class="KColorCombo" name="kcolorcombo_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> </item>
</layout> </layout>
</item> </item>
@ -162,11 +114,8 @@
<layout class="QHBoxLayout" name="layout_cpuColor"> <layout class="QHBoxLayout" name="layout_cpuColor">
<item> <item>
<widget class="QCheckBox" name="checkBox_cpu"> <widget class="QCheckBox" name="checkBox_cpu">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>CPU color</string> <string>CPU color</string>
@ -177,27 +126,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_cpuColor"> <widget class="KColorCombo" name="kcolorcombo_cpu"/>
<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> </item>
</layout> </layout>
</item> </item>
@ -205,11 +134,8 @@
<layout class="QHBoxLayout" name="layout_cpuclockColor"> <layout class="QHBoxLayout" name="layout_cpuclockColor">
<item> <item>
<widget class="QCheckBox" name="checkBox_cpuclock"> <widget class="QCheckBox" name="checkBox_cpuclock">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>CPU clock color</string> <string>CPU clock color</string>
@ -220,27 +146,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_cpuclockColor"> <widget class="KColorCombo" name="kcolorcombo_cpuclock"/>
<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> </item>
</layout> </layout>
</item> </item>
@ -248,11 +154,8 @@
<layout class="QHBoxLayout" name="layout_memColor"> <layout class="QHBoxLayout" name="layout_memColor">
<item> <item>
<widget class="QCheckBox" name="checkBox_mem"> <widget class="QCheckBox" name="checkBox_mem">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Memory color</string> <string>Memory color</string>
@ -263,27 +166,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_memColor"> <widget class="KColorCombo" name="kcolorcombo_mem"/>
<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> </item>
</layout> </layout>
</item> </item>
@ -291,11 +174,8 @@
<layout class="QHBoxLayout" name="layout_swapColor"> <layout class="QHBoxLayout" name="layout_swapColor">
<item> <item>
<widget class="QCheckBox" name="checkBox_swap"> <widget class="QCheckBox" name="checkBox_swap">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Swap color</string> <string>Swap color</string>
@ -306,27 +186,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_swapColor"> <widget class="KColorCombo" name="kcolorcombo_swap"/>
<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> </item>
</layout> </layout>
</item> </item>
@ -334,11 +194,8 @@
<layout class="QHBoxLayout" name="layout_downColor"> <layout class="QHBoxLayout" name="layout_downColor">
<item> <item>
<widget class="QCheckBox" name="checkBox_down"> <widget class="QCheckBox" name="checkBox_down">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Download speed color</string> <string>Download speed color</string>
@ -349,83 +206,24 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_downColor"> <widget class="KColorCombo" name="kcolorcombo_down"/>
<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> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layout_upColor"> <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> <item>
<widget class="QLabel" name="label_up"> <widget class="QLabel" name="label_up">
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Upload speed color</string> <string>Upload speed color</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_upColor"> <widget class="KColorCombo" name="kcolorcombo_up"/>
<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> </item>
</layout> </layout>
</item> </item>
@ -433,11 +231,8 @@
<layout class="QHBoxLayout" name="layout_batteryColor"> <layout class="QHBoxLayout" name="layout_batteryColor">
<item> <item>
<widget class="QCheckBox" name="checkBox_battery"> <widget class="QCheckBox" name="checkBox_battery">
<property name="minimumSize"> <property name="layoutDirection">
<size> <enum>Qt::RightToLeft</enum>
<width>200</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Battery active color</string> <string>Battery active color</string>
@ -448,83 +243,24 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_batteryColor"> <widget class="KColorCombo" name="kcolorcombo_battery"/>
<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> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layout_batteryInColor"> <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> <item>
<widget class="QLabel" name="label_batteryIn"> <widget class="QLabel" name="label_batteryIn">
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Battery inactive color</string> <string>Battery inactive color</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="spacer_batteryInColor"> <widget class="KColorCombo" name="kcolorcombo_batteryIn"/>
<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> </item>
</layout> </layout>
</item> </item>

View File

@ -49,45 +49,16 @@
<layout class="QHBoxLayout" name="layout_fontActive"> <layout class="QHBoxLayout" name="layout_fontActive">
<item> <item>
<widget class="QLabel" name="label_fontActive"> <widget class="QLabel" name="label_fontActive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font</string> <string>Font</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_fontActive"> <widget class="QFontComboBox" name="fontComboBox_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> </item>
</layout> </layout>
</item> </item>
@ -95,47 +66,16 @@
<layout class="QHBoxLayout" name="layout_fontSizeActive"> <layout class="QHBoxLayout" name="layout_fontSizeActive">
<item> <item>
<widget class="QLabel" name="label_fontSizeActive"> <widget class="QLabel" name="label_fontSizeActive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font size</string> <string>Font size</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontSizeActive">
<property name="minimum"> <property name="minimum">
<number>7</number> <number>7</number>
</property> </property>
@ -153,45 +93,16 @@
<layout class="QHBoxLayout" name="layout_fontColorActive"> <layout class="QHBoxLayout" name="layout_fontColorActive">
<item> <item>
<widget class="QLabel" name="label_fontColorActive"> <widget class="QLabel" name="label_fontColorActive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font color</string> <string>Font color</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_fontColorActive"> <widget class="KColorCombo" name="kcolorcombo_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> </item>
</layout> </layout>
</item> </item>
@ -199,47 +110,16 @@
<layout class="QHBoxLayout" name="layout_fontWeightActive"> <layout class="QHBoxLayout" name="layout_fontWeightActive">
<item> <item>
<widget class="QLabel" name="label_fontWeightActive"> <widget class="QLabel" name="label_fontWeightActive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font weight</string> <string>Font weight</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontWeightActive">
<property name="minimum"> <property name="minimum">
<number>100</number> <number>100</number>
</property> </property>
@ -260,44 +140,16 @@
<layout class="QHBoxLayout" name="layout_fontStyleActive"> <layout class="QHBoxLayout" name="layout_fontStyleActive">
<item> <item>
<widget class="QLabel" name="label_fontStyleActive"> <widget class="QLabel" name="label_fontStyleActive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font style</string> <string>Font style</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </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> <item>
<widget class="QComboBox" name="comboBox_fontStyleActive"> <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> <item>
<property name="text"> <property name="text">
<string notr="true">normal</string> <string notr="true">normal</string>
@ -346,8 +198,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>406</width> <width>448</width>
<height>167</height> <height>289</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@ -355,45 +207,16 @@
<layout class="QHBoxLayout" name="layout_fontInactive"> <layout class="QHBoxLayout" name="layout_fontInactive">
<item> <item>
<widget class="QLabel" name="label_fontInactive"> <widget class="QLabel" name="label_fontInactive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font</string> <string>Font</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_fontInactive"> <widget class="QFontComboBox" name="fontComboBox_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> </item>
</layout> </layout>
</item> </item>
@ -401,47 +224,16 @@
<layout class="QHBoxLayout" name="layout_fontSizeInactive"> <layout class="QHBoxLayout" name="layout_fontSizeInactive">
<item> <item>
<widget class="QLabel" name="label_fontSizeInactive"> <widget class="QLabel" name="label_fontSizeInactive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font size</string> <string>Font size</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontSizeInactive">
<property name="minimum"> <property name="minimum">
<number>7</number> <number>7</number>
</property> </property>
@ -459,45 +251,16 @@
<layout class="QHBoxLayout" name="layout_fontColorInactive"> <layout class="QHBoxLayout" name="layout_fontColorInactive">
<item> <item>
<widget class="QLabel" name="label_fontColorInactive"> <widget class="QLabel" name="label_fontColorInactive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font color</string> <string>Font color</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_fontColorInactive"> <widget class="KColorCombo" name="kcolorcombo_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> </item>
</layout> </layout>
</item> </item>
@ -505,47 +268,16 @@
<layout class="QHBoxLayout" name="layout_fontWeightInactive"> <layout class="QHBoxLayout" name="layout_fontWeightInactive">
<item> <item>
<widget class="QLabel" name="label_fontWeightInactive"> <widget class="QLabel" name="label_fontWeightInactive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font weight</string> <string>Font weight</string>
</property> </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"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_fontWeightInactive">
<property name="minimum"> <property name="minimum">
<number>100</number> <number>100</number>
</property> </property>
@ -566,44 +298,16 @@
<layout class="QHBoxLayout" name="layout_fontStyleInactive"> <layout class="QHBoxLayout" name="layout_fontStyleInactive">
<item> <item>
<widget class="QLabel" name="label_fontStyleInactive"> <widget class="QLabel" name="label_fontStyleInactive">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Font style</string> <string>Font style</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </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> <item>
<widget class="QComboBox" name="comboBox_fontStyleInactive"> <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> <item>
<property name="text"> <property name="text">
<string notr="true">normal</string> <string notr="true">normal</string>

View File

@ -24,20 +24,24 @@
#include <Plasma/Containment> #include <Plasma/Containment>
#include <Plasma/Corona> #include <Plasma/Corona>
#include <Plasma/Theme> #include <Plasma/Theme>
#include <Plasma/ToolTipManager>
#include <QDebug> #include <QDebug>
#include <QDesktopWidget>
#include <QFile> #include <QFile>
#include <QGraphicsLinearLayout> #include <QGraphicsGridLayout>
#include <QGraphicsSceneMouseEvent> #include <QGraphicsProxyWidget>
#include <QGraphicsView> #include <QGraphicsView>
#include <QMouseEvent>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QTextCodec> #include <QTextCodec>
#include <QTimer>
#include <fontdialog/fontdialog.h> #include <fontdialog/fontdialog.h>
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const bool debugCmd) CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const bool debugCmd)
: Plasma::Label(wid), : QLabel(0),
debug(debugCmd), debug(debugCmd),
number(num), number(num),
widget(wid) widget(wid)
@ -48,6 +52,7 @@ CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const boo
CustomPlasmaLabel::~CustomPlasmaLabel() CustomPlasmaLabel::~CustomPlasmaLabel()
{ {
if (debug) qDebug() << PDEBUG;
} }
@ -59,13 +64,26 @@ int CustomPlasmaLabel::getNumber()
} }
void CustomPlasmaLabel::mousePressEvent(QGraphicsSceneMouseEvent *event) void CustomPlasmaLabel::enterEvent(QEvent *event)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Event" << event->type();
if (event->type() == QEvent::Enter)
widget->paintTooltip(number);
emit(QLabel::enterEvent(event));
}
void CustomPlasmaLabel::mousePressEvent(QMouseEvent *event)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button(); if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
if (event->button() == Qt::LeftButton) if (event->button() == Qt::LeftButton)
widget->setCurrentDesktop(number); widget->setCurrentDesktop(number);
emit(QLabel::mousePressEvent(event));
} }
@ -94,9 +112,7 @@ DesktopPanel::DesktopPanel(QObject *parent, const QVariantList &args)
DesktopPanel::~DesktopPanel() DesktopPanel::~DesktopPanel()
{ {
// for (int i=0; i<labels.count(); i++) if (debug) qDebug() << PDEBUG;
// delete labels[i];
// delete layout;
} }
@ -104,17 +120,53 @@ void DesktopPanel::init()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
extsysmonEngine = dataEngine(QString("ext-sysmon")); layout = new QGraphicsGridLayout();
layout = new QGraphicsLinearLayout();
layout->setContentsMargins(1, 1, 1, 1); layout->setContentsMargins(1, 1, 1, 1);
setLayout(layout); setLayout(layout);
currentDesktop = 1; // tooltip
toolTip = Plasma::ToolTipContent();
toolTipScene = new QGraphicsScene();
toolTipView = new QGraphicsView(toolTipScene);
toolTipView->setStyleSheet(QString("background: transparent"));
toolTipView->setContentsMargins(0, 0, 0, 0);
toolTipView->setFrameShape(QFrame::NoFrame);
toolTipView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
toolTipView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Plasma::ToolTipManager::self()->setContent(this, toolTip);
// read variables // read variables
configChanged(); configChanged();
connect(this, SIGNAL(activate()), this, SLOT(changePanelsState())); connect(this, SIGNAL(activate()), this, SLOT(changePanelsState()));
connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SLOT(updateText(int)));
}
DesktopPanel::DesktopWindowsInfo DesktopPanel::getInfoByDesktop(const int num)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Number" << num;
DesktopWindowsInfo info;
info.desktop = KWindowSystem::workArea(num);
QList<WId> windows = KWindowSystem::windows();
for (int i=0; i<windows.count(); i++) {
KWindowInfo winInfo = KWindowSystem::windowInfo(windows[i],
NET::Property::WMDesktop | NET::Property::WMGeometry |
NET::Property::WMState | NET::Property::WMWindowType);
if (!winInfo.isOnDesktop(num)) continue;
if (winInfo.windowType(NET::WindowTypeMask::NormalMask) == NET::WindowType::Normal) {
if (winInfo.isMinimized()) continue;
info.windows.append(winInfo.geometry());
info.winId.append(windows[i]);
} else if (winInfo.windowType(NET::WindowTypeMask::DesktopMask) == NET::WindowType::Desktop) {
info.desktopId.append(windows[i]);
}
}
return info;
} }
@ -154,15 +206,18 @@ QString DesktopPanel::panelLocationToStr(Plasma::Location loc)
QString DesktopPanel::parsePattern(const QString rawLine, const int num) QString DesktopPanel::parsePattern(const QString rawLine, const int num)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Run function with raw line" << rawLine; if (debug) qDebug() << PDEBUG << ":" << "Raw line" << rawLine;
if (debug) qDebug() << PDEBUG << ":" << "Run function with number" << num; if (debug) qDebug() << PDEBUG << ":" << "Number" << num;
QString line, mark; QString line, fullMark, mark;
line = rawLine; line = rawLine;
if (currentDesktop == num + 1) if (KWindowSystem::currentDesktop() == num + 1)
mark = configuration[QString("mark")]; mark = configuration[QString("mark")];
else else
mark = QString(""); 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"))) if (line.contains(QString("$mark")))
line.replace(QString("$mark"), mark); line.replace(QString("$mark"), mark);
if (line.contains(QString("$name"))) if (line.contains(QString("$name")))
@ -179,42 +234,45 @@ QString DesktopPanel::parsePattern(const QString rawLine, const int num)
void DesktopPanel::reinit() void DesktopPanel::reinit()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (desktopNames.isEmpty()) return;
// clear // clear
// labels // labels
for (int i=0; i<labels.count(); i++) { for (int i=0; i<proxyWidgets.count(); i++) {
layout->removeItem(labels[i]); layout->removeItem(proxyWidgets[i]);
proxyWidgets[i]->setWidget(0);
delete labels[i]; delete labels[i];
delete proxyWidgets[i];
} }
labels.clear(); labels.clear();
// layout proxyWidgets.clear();
layout = new QGraphicsLinearLayout(); desktopNames.clear();
layout->setContentsMargins(1, 1, 1, 1);
setLayout(layout);
// add // add
int total = KWindowSystem::numberOfDesktops();
for (int i=1; i<total+1; i++)
desktopNames.append(KWindowSystem::desktopName(i));
// layout // layout
if (configuration[QString("background")].toInt() == 0) if (configuration[QString("background")].toInt() == 0)
setBackgroundHints(NoBackground); setBackgroundHints(NoBackground);
if (configuration[QString("layout")].toInt() == 0)
layout->setOrientation(Qt::Horizontal);
else
layout->setOrientation(Qt::Vertical);
// left stretch
if (configuration[QString("leftStretch")].toInt() == 2)
layout->addStretch(1);
// labels // labels
for (int i=0; i<desktopNames.count(); i++) { for (int i=0; i<desktopNames.count(); i++) {
labels.append(new CustomPlasmaLabel(this, i)); proxyWidgets.append(new QGraphicsProxyWidget(this));
layout->addItem(labels[i]); labels.append(new CustomPlasmaLabel(this, i, debug));
labels[i]->setWordWrap(false);
labels[i]->setAttribute(Qt::WA_TranslucentBackground, true);
proxyWidgets[i]->setWidget(labels[i]);
if (configuration[QString("layout")].toInt() == 0)
layout->addItem(proxyWidgets[i], 0, i);
else
layout->addItem(proxyWidgets[i], i, 0);
} }
// right stretch
if (configuration[QString("rightStretch")].toInt() == 2)
layout->addStretch(1);
updateText(); updateText(KWindowSystem::currentDesktop());
resize(10, 10); for (int i=0; i<proxyWidgets.count(); i++) {
labels[i]->adjustSize();
proxyWidgets[i]->setGeometry(labels[i]->geometry());
}
emit(KWindowSystem::setCurrentDesktop(KWindowSystem::currentDesktop()));
} }
@ -246,53 +304,96 @@ void DesktopPanel::changePanelsState()
} }
void DesktopPanel::paintTooltip(const int active)
{
if (debug) qDebug() << PDEBUG;
if (active == activeTooltip) return;
// prepare
// clear
toolTip.setImage(0);
toolTip.setWindowsToPreview(QList<WId>());
activeTooltip = active;
DesktopWindowsInfo info = getInfoByDesktop(active + 1);
float margin = 5.0 * info.desktop.width() / 400.0;
toolTipView->resize(info.desktop.width() + 2.0 * margin, info.desktop.height() + 2.0 * margin);
toolTipScene->clear();
toolTipScene->setBackgroundBrush(QBrush(Qt::NoBrush));
// borders
toolTipScene->addLine(0, 0, 0, info.desktop.height() + 2.0 * margin);
toolTipScene->addLine(0, info.desktop.height() + 2.0 * margin,
info.desktop.width() + 2.0 * margin, info.desktop.height() + 2.0 * margin);
toolTipScene->addLine(info.desktop.width() + 2.0 * margin, info.desktop.height() + 2.0 * margin,
info.desktop.width() + 2.0 * margin, 0);
toolTipScene->addLine(info.desktop.width() + 2.0 * margin, 0, 0, 0);
if (configuration[QString("tooltipType")].toInt() == 1) {
// only contours
QPen pen = QPen();
pen.setWidthF(2.0 * info.desktop.width() / 400.0);
pen.setColor(QColor(configuration[QString("tooltipColor")]));
for (int i=0; i<info.windows.count(); i++) {
toolTipScene->addLine(info.windows[i].left() + margin, info.windows[i].bottom() + margin,
info.windows[i].left() + margin, info.windows[i].top() + margin, pen);
toolTipScene->addLine(info.windows[i].left() + margin, info.windows[i].top() + margin,
info.windows[i].right() + margin, info.windows[i].top() + margin, pen);
toolTipScene->addLine(info.windows[i].right() + margin, info.windows[i].top() + margin,
info.windows[i].right() + margin, info.windows[i].bottom() + margin, pen);
toolTipScene->addLine(info.windows[i].right() + margin, info.windows[i].bottom() + margin,
info.windows[i].left() + margin, info.windows[i].bottom() + margin, pen);
}
toolTip.setImage(QPixmap::grabWidget(toolTipView).scaledToWidth(configuration[QString("tooltipWidth")].toInt()));
} else if (configuration[QString("tooltipType")].toInt() == 2) {
// clean desktop
toolTip.setWindowsToPreview(info.desktopId);
} else {
// desktop preview
toolTip.setWindowsToPreview(info.winId);
}
Plasma::ToolTipManager::self()->setContent(this, toolTip);
}
void DesktopPanel::setCurrentDesktop(const int number) void DesktopPanel::setCurrentDesktop(const int number)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Set desktop" << number + 1; if (debug) qDebug() << PDEBUG << ":" << "Set desktop" << number + 1;
QString cmd = parsePattern(configuration[QString("desktopcmd")], number); KWindowSystem::setCurrentDesktop(number + 1);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd " << cmd;
QProcess command;
command.startDetached(cmd);
} }
void DesktopPanel::updateText() void DesktopPanel::updateText(const int active)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (labels.isEmpty()) return;
QString line, text; QString line, text;
for (int i=0; i<labels.count(); i++) { for (int i=0; i<labels.count(); i++) {
if (debug) qDebug() << PDEBUG << ":" << "Label" << i; if (debug) qDebug() << PDEBUG << ":" << "Label" << i;
line = parsePattern(configuration[QString("pattern")], i); line = parsePattern(configuration[QString("pattern")], i);
if (currentDesktop == i + 1) if (active == i + 1)
text = currentFormatLine[0] + line + currentFormatLine[1]; text = currentFormatLine[0] + line + currentFormatLine[1];
else else
text = formatLine[0] + line + formatLine[1]; text = formatLine[0] + line + formatLine[1];
labels[i]->setText(text); labels[i]->setText(text);
} }
} int height = 0;
int width = 0;
for (int i=0; i<proxyWidgets.count(); i++) {
// data engine interaction labels[i]->adjustSize();
void DesktopPanel::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data) proxyWidgets[i]->setGeometry(labels[i]->geometry());
{ if (configuration[QString("layout")].toInt() == 0) {
if (debug) qDebug() << PDEBUG; width += proxyWidgets[i]->geometry().width();
if (debug) qDebug() << PDEBUG << ":" << "Run function with source name" << sourceName; if (height < proxyWidgets[i]->geometry().height())
height = proxyWidgets[i]->geometry().height();
if (data.keys().count() == 0) } else {
return; height += proxyWidgets[i]->geometry().height();
if (sourceName == QString("desktop")) { if (width < proxyWidgets[i]->geometry().width())
currentDesktop = data[QString("currentNumber")].toInt(); width = proxyWidgets[i]->geometry().width();
if (desktopNames.isEmpty()) {
desktopNames = data[QString("list")].toString().split(QString(";;"));
reinit();
} }
updateText();
} }
layout->setMinimumSize(width, height);
} }
@ -308,6 +409,14 @@ void DesktopPanel::createConfigurationInterface(KConfigDialog *parent)
QWidget *toggleWidget = new QWidget; QWidget *toggleWidget = new QWidget;
uiToggleConfig.setupUi(toggleWidget); uiToggleConfig.setupUi(toggleWidget);
uiWidConfig.textEdit_elements->setPlainText(configuration[QString("pattern")]);
if (configuration[QString("tooltip")].toInt() == 0)
uiWidConfig.checkBox_tooltip->setCheckState(Qt::Unchecked);
else
uiWidConfig.checkBox_tooltip->setCheckState(Qt::Checked);
uiWidConfig.comboBox_tooltipType->setCurrentIndex(configuration[QString("tooltipType")].toInt());
uiWidConfig.spinBox_tooltip->setValue(configuration[QString("tooltipWidth")].toInt());
uiWidConfig.kcolorcombo_tooltipColor->setColor(QColor(configuration[QString("tooltipColor")]));
if (configuration[QString("background")].toInt() == 0) if (configuration[QString("background")].toInt() == 0)
uiWidConfig.checkBox_background->setCheckState(Qt::Unchecked); uiWidConfig.checkBox_background->setCheckState(Qt::Unchecked);
else else
@ -316,19 +425,8 @@ void DesktopPanel::createConfigurationInterface(KConfigDialog *parent)
uiWidConfig.checkBox_layout->setCheckState(Qt::Unchecked); uiWidConfig.checkBox_layout->setCheckState(Qt::Unchecked);
else else
uiWidConfig.checkBox_layout->setCheckState(Qt::Checked); uiWidConfig.checkBox_layout->setCheckState(Qt::Checked);
if (configuration[QString("leftStretch")].toInt() == 0)
uiWidConfig.checkBox_leftStretch->setCheckState(Qt::Unchecked);
else
uiWidConfig.checkBox_leftStretch->setCheckState(Qt::Checked);
if (configuration[QString("rightStretch")].toInt() == 0)
uiWidConfig.checkBox_rightStretch->setCheckState(Qt::Unchecked);
else
uiWidConfig.checkBox_rightStretch->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->setItemText(uiWidConfig.comboBox_mark->count()-1, configuration[QString("mark")]);
uiWidConfig.comboBox_mark->setCurrentIndex(uiWidConfig.comboBox_mark->count()-1); uiWidConfig.comboBox_mark->setCurrentIndex(uiWidConfig.comboBox_mark->count()-1);
uiWidConfig.lineEdit_pattern->setText(configuration[QString("pattern")]);
uiWidConfig.lineEdit_desktopcmd->setText(configuration[QString("desktopcmd")]);
KConfigGroup cg = config(); KConfigGroup cg = config();
CFont font(cg.readEntry("currentFontFamily", "Terminus")); CFont font(cg.readEntry("currentFontFamily", "Terminus"));
@ -376,6 +474,18 @@ void DesktopPanel::createConfigurationInterface(KConfigDialog *parent)
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme")); parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
parent->addPage(toggleWidget, i18n("Toggle panels"), QString("plasma")); 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(okClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted())); connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
} }
@ -385,17 +495,16 @@ void DesktopPanel::configAccepted()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
extsysmonEngine->disconnectSource(QString("desktop"), this);
KConfigGroup cg = config(); KConfigGroup cg = config();
cg.writeEntry("pattern", uiWidConfig.textEdit_elements->toPlainText());
cg.writeEntry("tooltip", QString::number(uiWidConfig.checkBox_tooltip->checkState()));
cg.writeEntry("tooltipType", QString::number(uiWidConfig.comboBox_tooltipType->currentIndex()));
cg.writeEntry("tooltipWidth", QString::number(uiWidConfig.spinBox_tooltip->value()));
cg.writeEntry("tooltipColor", uiWidConfig.kcolorcombo_tooltipColor->color().name());
cg.writeEntry("background", QString::number(uiWidConfig.checkBox_background->checkState())); cg.writeEntry("background", QString::number(uiWidConfig.checkBox_background->checkState()));
cg.writeEntry("layout", QString::number(uiWidConfig.checkBox_layout->checkState())); cg.writeEntry("layout", QString::number(uiWidConfig.checkBox_layout->checkState()));
cg.writeEntry("leftStretch", QString::number(uiWidConfig.checkBox_leftStretch->checkState()));
cg.writeEntry("rightStretch", QString::number(uiWidConfig.checkBox_rightStretch->checkState()));
cg.writeEntry("interval", QString::number(uiWidConfig.spinBox_interval->value()));
cg.writeEntry("mark", uiWidConfig.comboBox_mark->currentText()); cg.writeEntry("mark", uiWidConfig.comboBox_mark->currentText());
cg.writeEntry("pattern", uiWidConfig.lineEdit_pattern->text());
cg.writeEntry("desktopcmd", uiWidConfig.lineEdit_desktopcmd->text());
cg.writeEntry("currentFontFamily", uiAppConfig.fontComboBox_fontActive->currentFont().family()); cg.writeEntry("currentFontFamily", uiAppConfig.fontComboBox_fontActive->currentFont().family());
cg.writeEntry("currentFontSize", uiAppConfig.spinBox_fontSizeActive->value()); cg.writeEntry("currentFontSize", uiAppConfig.spinBox_fontSizeActive->value());
@ -426,17 +535,15 @@ void DesktopPanel::configChanged()
KConfigGroup cg = config(); KConfigGroup cg = config();
configuration[QString("pattern")] = cg.readEntry("pattern", "[$fullmark$number/$total: $name]");
configuration[QString("tooltip")] = cg.readEntry("tooltip", "2");
configuration[QString("tooltipType")] = cg.readEntry("tooltipType", "0");
configuration[QString("tooltipWidth")] = cg.readEntry("tooltipWidth", "200");
configuration[QString("tooltipColor")] = cg.readEntry("tooltipColor", "#ffffff");
configuration[QString("background")] = cg.readEntry("background", "2"); configuration[QString("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("layout")] = cg.readEntry("layout", "0");
configuration[QString("leftStretch")] = cg.readEntry("leftStretch", "2");
configuration[QString("mark")] = cg.readEntry("mark", "¤"); configuration[QString("mark")] = cg.readEntry("mark", "¤");
configuration[QString("panels")] = cg.readEntry("panels", "-1"); configuration[QString("panels")] = cg.readEntry("panels", "-1");
configuration[QString("pattern")] = cg.readEntry("pattern", "[$mark$number/$total: $name]");
configuration[QString("rightStretch")] = cg.readEntry("rightStretch", "2");
extsysmonEngine->connectSource(QString("desktop"), this, configuration[QString("interval")].toInt());
CFont font = CFont(cg.readEntry("currentFontFamily", "Terminus")); CFont font = CFont(cg.readEntry("currentFontFamily", "Terminus"));
font.setPointSize(cg.readEntry("currentFontSize", 10)); font.setPointSize(cg.readEntry("currentFontSize", 10));
@ -479,4 +586,49 @@ void DesktopPanel::configChanged()
} }
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" #include "desktop-panel.moc"

View File

@ -20,30 +20,34 @@
#define DESKTOP_PANEL_H #define DESKTOP_PANEL_H
#include <Plasma/Applet> #include <Plasma/Applet>
#include <Plasma/DataEngine> #include <Plasma/ToolTipContent>
#include <Plasma/Label> #include <QLabel>
#include <ui_appearance.h> #include <ui_appearance.h>
#include <ui_toggle.h> #include <ui_toggle.h>
#include <ui_widget.h> #include <ui_widget.h>
class QGraphicsLinearLayout; class QGraphicsGridLayout;
class QGraphicsProxyWidget;
class QGraphicsScene;
class DesktopPanel; class DesktopPanel;
class CustomPlasmaLabel : public Plasma::Label class CustomPlasmaLabel : public QLabel
{ {
Q_OBJECT Q_OBJECT
public: public:
CustomPlasmaLabel(DesktopPanel *wid, const int num, CustomPlasmaLabel(DesktopPanel *wid,
const int num,
const bool debugCmd = false); const bool debugCmd = false);
~CustomPlasmaLabel(); ~CustomPlasmaLabel();
int getNumber(); int getNumber();
protected: protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event); void enterEvent(QEvent *event);
void mousePressEvent(QMouseEvent *event);
private: private:
// debug // debug
@ -58,24 +62,34 @@ class DesktopPanel : public Plasma::Applet
{ {
Q_OBJECT Q_OBJECT
typedef struct {
QRect desktop;
QList<WId> desktopId;
QList<QRect> windows;
QList<WId> winId;
} DesktopWindowsInfo;
public: public:
DesktopPanel(QObject *parent, const QVariantList &args); DesktopPanel(QObject *parent, const QVariantList &args);
~DesktopPanel(); ~DesktopPanel();
void init(); void init();
DesktopWindowsInfo getInfoByDesktop(const int num);
QString parsePattern(const QString rawLine, const int num); QString parsePattern(const QString rawLine, const int num);
public slots: public slots:
// dataengine
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
// configuration interface // configuration interface
void configAccepted(); void configAccepted();
void configChanged(); void configChanged();
// events // events
void changePanelsState(); void changePanelsState();
void paintTooltip(const int active);
void setCurrentDesktop(const int number); void setCurrentDesktop(const int number);
private slots: private slots:
void reinit(); void reinit();
void setFontFormating();
void setFormating();
void updateText(const int active);
protected: protected:
void createConfigurationInterface(KConfigDialog *parent); void createConfigurationInterface(KConfigDialog *parent);
@ -84,25 +98,25 @@ private:
// functions // functions
QList<Plasma::Containment *> getPanels(); QList<Plasma::Containment *> getPanels();
QString panelLocationToStr(Plasma::Location loc); QString panelLocationToStr(Plasma::Location loc);
void updateText();
// ui // ui
QGraphicsLinearLayout *layout; QGraphicsGridLayout *layout;
QList<QGraphicsProxyWidget *> proxyWidgets;
QList<CustomPlasmaLabel *> labels; QList<CustomPlasmaLabel *> labels;
// tooltip
Plasma::ToolTipContent toolTip;
QGraphicsScene *toolTipScene;
QGraphicsView *toolTipView;
// debug // debug
bool debug; bool debug;
// data engine int activeTooltip = -1;
int currentDesktop;
int oldState; int oldState;
Plasma::DataEngine *extsysmonEngine;
// configuration interface // configuration interface
Ui::AppearanceWidget uiAppConfig; Ui::AppearanceWidget uiAppConfig;
Ui::ConfigWindow uiWidConfig; Ui::ConfigWindow uiWidConfig;
Ui::ToggleWindow uiToggleConfig; Ui::ToggleWindow uiToggleConfig;
// configuration // configuration
QMap<QString, QString> configuration; QMap<QString, QString> configuration;
QStringList desktopNames; QStringList desktopNames, currentFormatLine, formatLine;
QStringList currentFormatLine;
QStringList formatLine;
}; };
K_EXPORT_PLASMA_APPLET(desktop-panel, DesktopPanel) K_EXPORT_PLASMA_APPLET(desktop-panel, DesktopPanel)

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 02:02+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-08 02:02+0400\n" "PO-Revision-Date: 2014-12-15 02:41+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: English <kde-russian@lists.kde.ru>\n" "Language-Team: English <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,43 +18,47 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:141 #: desktop-panel.cpp:193
msgid "Top Edge" msgid "Top Edge"
msgstr "" msgstr "Top Edge"
#: desktop-panel.cpp:143 #: desktop-panel.cpp:195
msgid "Bottom Edge" msgid "Bottom Edge"
msgstr "Bottom Edge" msgstr "Bottom Edge"
#: desktop-panel.cpp:145 #: desktop-panel.cpp:197
msgid "Left Edge" msgid "Left Edge"
msgstr "Left Edge" msgstr "Left Edge"
#: desktop-panel.cpp:147 #: desktop-panel.cpp:199
msgid "Right Edge" msgid "Right Edge"
msgstr "Right Edge" msgstr "Right Edge"
#: desktop-panel.cpp:149 #: desktop-panel.cpp:201
msgid "Unknown Position (%1)" msgid "Unknown Position (%1)"
msgstr "Unknown Position (%1)" msgstr "Unknown Position (%1)"
#: desktop-panel.cpp:375 #: desktop-panel.cpp:473
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#: desktop-panel.cpp:376 #: desktop-panel.cpp:474
msgid "Appearance" msgid "Appearance"
msgstr "Appearance" msgstr "Appearance"
#: desktop-panel.cpp:377 #: desktop-panel.cpp:475
msgid "Toggle panels" msgid "Toggle panels"
msgstr "Toggle panels" msgstr "Toggle panels"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Select font"
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop" msgid "Active desktop"
msgstr "Active desktop" msgstr "Active desktop"
#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 #: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font" msgid "Font"
msgstr "Font" msgstr "Font"
@ -83,73 +87,110 @@ msgid "To control panels please set widget shortcut."
msgstr "To control panels please set widget shortcut." msgstr "To control panels please set widget shortcut."
#: po/rc.cpp:42 rc.cpp:42 #: po/rc.cpp:42 rc.cpp:42
msgid "Enable background"
msgstr "Enable background"
#: po/rc.cpp:45 rc.cpp:45
msgid "Vertical layout"
msgstr "Vertical layout"
#: po/rc.cpp:48 rc.cpp:48
msgid "Add stretch to left/top of the layout"
msgstr "Add stretch to left/top of the layout"
#: po/rc.cpp:51 rc.cpp:51
msgid "Add stretch to right/bottom of the layout"
msgstr "Add stretch to right/bottom of the layout"
#: po/rc.cpp:54 rc.cpp:54
msgid "Time interval"
msgstr "Time interval"
#: po/rc.cpp:57 rc.cpp:57
msgid "Mark" msgid "Mark"
msgstr "Mark" msgstr "Mark"
#: po/rc.cpp:60 rc.cpp:60 #: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active" msgid "A mark which will be shown if this desktop is active"
msgstr "A mark which will be shown if this desktop is active" msgstr "A mark which will be shown if this desktop is active"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Add"
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Pattern" msgid "Tooltip width"
msgstr "Pattern" msgstr "Tooltip width"
#: po/rc.cpp:66 rc.cpp:66 #: po/rc.cpp:66 rc.cpp:66
msgid "" msgid "px"
"$mark - show mark if the current desktop is active\n" msgstr "px"
"$name - desktop name\n"
"$number - desktop number\n" #: po/rc.cpp:69 rc.cpp:69
"$total - total number of desktops" msgid "Window border color on tooltip"
msgstr "" msgstr "Window border color on tooltip"
"$mark - show mark if the current desktop is active\n"
"$name - desktop name\n"
"$number - desktop number\n"
"$total - total number of desktops"
#: po/rc.cpp:72 rc.cpp:72 #: po/rc.cpp:72 rc.cpp:72
msgid "Command to change desktop" msgid "Enable background"
msgstr "Command to change desktop" msgstr "Enable background"
#: po/rc.cpp:75 rc.cpp:75 #: po/rc.cpp:75 rc.cpp:75
msgid "Command which will change the current desktop" msgid "Vertical layout"
msgstr "Command which will change the current desktop" msgstr "Vertical layout"
#: po/rc.cpp:76 rc.cpp:76 #: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Enable tooltip"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Windows"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Contours"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Clean desktop"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#~ msgid "Show windows instead of contours"
#~ msgstr "Show windows instead of contours"
#~ msgid "Time interval"
#~ msgstr "Time interval"
#~ msgid "Command to change desktop"
#~ msgstr "Command to change desktop"
#~ msgid "Command which will change the current desktop"
#~ msgstr "Command which will change the current desktop"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Add stretch to left/top of the layout"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Add stretch to right/bottom of the layout"
#~ msgid "Pattern"
#~ msgstr "Pattern"
#~ msgid ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgid "Set font family" #~ msgid "Set font family"
#~ msgstr "Set font family" #~ msgstr "Set font family"
#~ msgid "Set font size"
#~ msgstr "Set font size"
#~ msgid "Set font color" #~ msgid "Set font color"
#~ msgstr "Set font color" #~ msgstr "Set font color"

View File

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

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 02:02+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-06-05 19:24+0400\n" "PO-Revision-Date: 2014-06-05 19:24+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: French <kde-french@lists.kde.ru>\n" "Language-Team: French <kde-french@lists.kde.ru>\n"
@ -19,43 +19,47 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:141 #: desktop-panel.cpp:193
msgid "Top Edge" msgid "Top Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:143 #: desktop-panel.cpp:195
msgid "Bottom Edge" msgid "Bottom Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:145 #: desktop-panel.cpp:197
msgid "Left Edge" msgid "Left Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:147 #: desktop-panel.cpp:199
msgid "Right Edge" msgid "Right Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:149 #: desktop-panel.cpp:201
msgid "Unknown Position (%1)" msgid "Unknown Position (%1)"
msgstr "" msgstr ""
#: desktop-panel.cpp:375 #: desktop-panel.cpp:473
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#: desktop-panel.cpp:376 #: desktop-panel.cpp:474
msgid "Appearance" msgid "Appearance"
msgstr "Apparence" msgstr "Apparence"
#: desktop-panel.cpp:377 #: desktop-panel.cpp:475
msgid "Toggle panels" msgid "Toggle panels"
msgstr "" msgstr ""
#: desktop-panel.cpp:596
msgid "Select font"
msgstr ""
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop" msgid "Active desktop"
msgstr "" msgstr ""
#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 #: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font" msgid "Font"
msgstr "Police" msgstr "Police"
@ -84,59 +88,80 @@ msgid "To control panels please set widget shortcut."
msgstr "" msgstr ""
#: po/rc.cpp:42 rc.cpp:42 #: po/rc.cpp:42 rc.cpp:42
msgid "Enable background"
msgstr ""
#: po/rc.cpp:45 rc.cpp:45
msgid "Vertical layout"
msgstr "Positionnement vertical"
#: po/rc.cpp:48 rc.cpp:48
msgid "Add stretch to left/top of the layout"
msgstr "Étirer le positionnement vers haut/gauche"
#: po/rc.cpp:51 rc.cpp:51
msgid "Add stretch to right/bottom of the layout"
msgstr "Étirer le positionnement vers bas/droite"
#: po/rc.cpp:54 rc.cpp:54
msgid "Time interval"
msgstr "Intervalle"
#: po/rc.cpp:57 rc.cpp:57
msgid "Mark" msgid "Mark"
msgstr "" msgstr ""
#: po/rc.cpp:60 rc.cpp:60 #: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active" msgid "A mark which will be shown if this desktop is active"
msgstr "" msgstr ""
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr ""
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr ""
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr ""
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr ""
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Pattern" msgid "Tooltip width"
msgstr "" msgstr ""
#: po/rc.cpp:66 rc.cpp:66 #: po/rc.cpp:66 rc.cpp:66
msgid "" msgid "px"
"$mark - show mark if the current desktop is active\n" msgstr ""
"$name - desktop name\n"
"$number - desktop number\n" #: po/rc.cpp:69 rc.cpp:69
"$total - total number of desktops" msgid "Window border color on tooltip"
msgstr "" msgstr ""
#: po/rc.cpp:72 rc.cpp:72 #: po/rc.cpp:72 rc.cpp:72
msgid "Command to change desktop" msgid "Enable background"
msgstr "" msgstr ""
#: po/rc.cpp:75 rc.cpp:75 #: po/rc.cpp:75 rc.cpp:75
msgid "Command which will change the current desktop" msgid "Vertical layout"
msgstr "Positionnement vertical"
#: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "" msgstr ""
#: po/rc.cpp:76 rc.cpp:76 #: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr ""
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr ""
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr ""
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#~ msgid "Time interval"
#~ msgstr "Intervalle"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Étirer le positionnement vers haut/gauche"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Étirer le positionnement vers bas/droite"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 02:02+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,43 +17,47 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: desktop-panel.cpp:141 #: desktop-panel.cpp:193
msgid "Top Edge" msgid "Top Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:143 #: desktop-panel.cpp:195
msgid "Bottom Edge" msgid "Bottom Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:145 #: desktop-panel.cpp:197
msgid "Left Edge" msgid "Left Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:147 #: desktop-panel.cpp:199
msgid "Right Edge" msgid "Right Edge"
msgstr "" msgstr ""
#: desktop-panel.cpp:149 #: desktop-panel.cpp:201
msgid "Unknown Position (%1)" msgid "Unknown Position (%1)"
msgstr "" msgstr ""
#: desktop-panel.cpp:375 #: desktop-panel.cpp:473
msgid "Widget" msgid "Widget"
msgstr "" msgstr ""
#: desktop-panel.cpp:376 #: desktop-panel.cpp:474
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#: desktop-panel.cpp:377 #: desktop-panel.cpp:475
msgid "Toggle panels" msgid "Toggle panels"
msgstr "" msgstr ""
#: desktop-panel.cpp:596
msgid "Select font"
msgstr ""
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop" msgid "Active desktop"
msgstr "" msgstr ""
#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 #: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font" msgid "Font"
msgstr "" msgstr ""
@ -82,59 +86,71 @@ msgid "To control panels please set widget shortcut."
msgstr "" msgstr ""
#: po/rc.cpp:42 rc.cpp:42 #: po/rc.cpp:42 rc.cpp:42
msgid "Enable background"
msgstr ""
#: po/rc.cpp:45 rc.cpp:45
msgid "Vertical layout"
msgstr ""
#: po/rc.cpp:48 rc.cpp:48
msgid "Add stretch to left/top of the layout"
msgstr ""
#: po/rc.cpp:51 rc.cpp:51
msgid "Add stretch to right/bottom of the layout"
msgstr ""
#: po/rc.cpp:54 rc.cpp:54
msgid "Time interval"
msgstr ""
#: po/rc.cpp:57 rc.cpp:57
msgid "Mark" msgid "Mark"
msgstr "" msgstr ""
#: po/rc.cpp:60 rc.cpp:60 #: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active" msgid "A mark which will be shown if this desktop is active"
msgstr "" msgstr ""
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr ""
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr ""
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr ""
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr ""
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Pattern" msgid "Tooltip width"
msgstr "" msgstr ""
#: po/rc.cpp:66 rc.cpp:66 #: po/rc.cpp:66 rc.cpp:66
msgid "" msgid "px"
"$mark - show mark if the current desktop is active\n" msgstr ""
"$name - desktop name\n"
"$number - desktop number\n" #: po/rc.cpp:69 rc.cpp:69
"$total - total number of desktops" msgid "Window border color on tooltip"
msgstr "" msgstr ""
#: po/rc.cpp:72 rc.cpp:72 #: po/rc.cpp:72 rc.cpp:72
msgid "Command to change desktop" msgid "Enable background"
msgstr "" msgstr ""
#: po/rc.cpp:75 rc.cpp:75 #: po/rc.cpp:75 rc.cpp:75
msgid "Command which will change the current desktop" msgid "Vertical layout"
msgstr "" msgstr ""
#: po/rc.cpp:76 rc.cpp:76 #: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr ""
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr ""
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr ""
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr ""
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "" msgstr ""
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "" msgstr ""

View File

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

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2014-09-08 02:02+0400\n" "POT-Creation-Date: 2014-12-15 02:40+0300\n"
"PO-Revision-Date: 2014-09-08 02:03+0400\n" "PO-Revision-Date: 2014-12-15 02:41+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,43 +18,47 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: desktop-panel.cpp:141 #: desktop-panel.cpp:193
msgid "Top Edge" msgid "Top Edge"
msgstr "Верхний край" msgstr "Верхний край"
#: desktop-panel.cpp:143 #: desktop-panel.cpp:195
msgid "Bottom Edge" msgid "Bottom Edge"
msgstr "Нижний край" msgstr "Нижний край"
#: desktop-panel.cpp:145 #: desktop-panel.cpp:197
msgid "Left Edge" msgid "Left Edge"
msgstr "Левый край" msgstr "Левый край"
#: desktop-panel.cpp:147 #: desktop-panel.cpp:199
msgid "Right Edge" msgid "Right Edge"
msgstr "Правый край" msgstr "Правый край"
#: desktop-panel.cpp:149 #: desktop-panel.cpp:201
msgid "Unknown Position (%1)" msgid "Unknown Position (%1)"
msgstr "Неизвестное положение (%1)" msgstr "Неизвестное положение (%1)"
#: desktop-panel.cpp:375 #: desktop-panel.cpp:473
msgid "Widget" msgid "Widget"
msgstr "Виджет" msgstr "Виджет"
#: desktop-panel.cpp:376 #: desktop-panel.cpp:474
msgid "Appearance" msgid "Appearance"
msgstr "Внешний вид" msgstr "Внешний вид"
#: desktop-panel.cpp:377 #: desktop-panel.cpp:475
msgid "Toggle panels" msgid "Toggle panels"
msgstr "Скрыть панели" msgstr "Скрыть панели"
#: desktop-panel.cpp:596
msgid "Select font"
msgstr "Выберете шрифт"
#: po/rc.cpp:3 rc.cpp:3 #: po/rc.cpp:3 rc.cpp:3
msgid "Active desktop" msgid "Active desktop"
msgstr "Активный рабочий стол" msgstr "Активный рабочий стол"
#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 #: po/rc.cpp:6 po/rc.cpp:24 po/rc.cpp:48 rc.cpp:6 rc.cpp:24 rc.cpp:48
msgid "Font" msgid "Font"
msgstr "Шрифт" msgstr "Шрифт"
@ -83,64 +87,103 @@ msgid "To control panels please set widget shortcut."
msgstr "Чтобы управлять панелями, настройте комбинацию клавиш." msgstr "Чтобы управлять панелями, настройте комбинацию клавиш."
#: po/rc.cpp:42 rc.cpp:42 #: po/rc.cpp:42 rc.cpp:42
msgid "Enable background"
msgstr "Включить фон"
#: po/rc.cpp:45 rc.cpp:45
msgid "Vertical layout"
msgstr "Вертикальная разметка"
#: po/rc.cpp:48 rc.cpp:48
msgid "Add stretch to left/top of the layout"
msgstr "Добавить пустое место слева/сверху виджета"
#: po/rc.cpp:51 rc.cpp:51
msgid "Add stretch to right/bottom of the layout"
msgstr "Добавить пустое место справа/снизу виджета"
#: po/rc.cpp:54 rc.cpp:54
msgid "Time interval"
msgstr "Интервал обновления"
#: po/rc.cpp:57 rc.cpp:57
msgid "Mark" msgid "Mark"
msgstr "Метка" msgstr "Метка"
#: po/rc.cpp:60 rc.cpp:60 #: po/rc.cpp:45 rc.cpp:45
msgid "A mark which will be shown if this desktop is active" msgid "A mark which will be shown if this desktop is active"
msgstr "Метка, которая будет показана, если данный рабочий стол активен" msgstr "Метка, которая будет показана, если данный рабочий стол активен"
#: po/rc.cpp:51 rc.cpp:51
msgid "Ctrl+B"
msgstr "Ctrl+B"
#: po/rc.cpp:54 rc.cpp:54
msgid "Ctrl+I"
msgstr "Ctrl+I"
#: po/rc.cpp:57 rc.cpp:57
msgid "Ctrl+U"
msgstr "Ctrl+U"
#: po/rc.cpp:60 rc.cpp:60
msgid "Add"
msgstr "Добавить"
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Pattern" msgid "Tooltip width"
msgstr "Шаблон" msgstr "Ширина тултипа"
#: po/rc.cpp:66 rc.cpp:66 #: po/rc.cpp:66 rc.cpp:66
msgid "" msgid "px"
"$mark - show mark if the current desktop is active\n" msgstr "px"
"$name - desktop name\n"
"$number - desktop number\n" #: po/rc.cpp:69 rc.cpp:69
"$total - total number of desktops" msgid "Window border color on tooltip"
msgstr "" msgstr "Цвет границ окна в тултипе"
"$mark - показать метку, если данный рабочий стол активен\n"
"$name - имя рабочего стола\n"
"$number - номер рабочего стола\n"
"$total - общее число рабочий столов"
#: po/rc.cpp:72 rc.cpp:72 #: po/rc.cpp:72 rc.cpp:72
msgid "Command to change desktop" msgid "Enable background"
msgstr "Команда" msgstr "Включить фон"
#: po/rc.cpp:75 rc.cpp:75 #: po/rc.cpp:75 rc.cpp:75
msgid "Command which will change the current desktop" msgid "Vertical layout"
msgstr "Команда которая изменит текущий рабочий стол" msgstr "Вертикальная разметка"
#: po/rc.cpp:76 rc.cpp:76 #: po/rc.cpp:78 rc.cpp:78
msgid "Enable tooltip"
msgstr "Включить тултип"
#: po/rc.cpp:81 rc.cpp:81
msgid "Windows"
msgstr "Окна"
#: po/rc.cpp:84 rc.cpp:84
msgid "Contours"
msgstr "Контуры"
#: po/rc.cpp:87 rc.cpp:87
msgid "Clean desktop"
msgstr "Пустой рабочий стол"
#: po/rc.cpp:88 rc.cpp:88
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#: po/rc.cpp:77 rc.cpp:77 #: po/rc.cpp:89 rc.cpp:89
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#~ msgid "Show windows instead of contours"
#~ msgstr "Показывать окна вместо контуров"
#~ msgid "Time interval"
#~ msgstr "Интервал обновления"
#~ msgid "Command to change desktop"
#~ msgstr "Команда"
#~ msgid "Command which will change the current desktop"
#~ msgstr "Команда которая изменит текущий рабочий стол"
#~ msgid "Add stretch to left/top of the layout"
#~ msgstr "Добавить пустое место слева/сверху виджета"
#~ msgid "Add stretch to right/bottom of the layout"
#~ msgstr "Добавить пустое место справа/снизу виджета"
#~ msgid "Pattern"
#~ msgstr "Шаблон"
#~ msgid ""
#~ "$mark - show mark if the current desktop is active\n"
#~ "$name - desktop name\n"
#~ "$number - desktop number\n"
#~ "$total - total number of desktops"
#~ msgstr ""
#~ "$mark - показать метку, если данный рабочий стол активен\n"
#~ "$name - имя рабочего стола\n"
#~ "$number - номер рабочего стола\n"
#~ "$total - общее число рабочий столов"

View File

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

View File

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

View File

@ -6,13 +6,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>721</width>
<height>343</height> <height>420</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>480</width> <width>700</width>
<height>320</height> <height>320</height>
</size> </size>
</property> </property>
@ -20,271 +20,453 @@
<string notr="true">Widget</string> <string notr="true">Widget</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="9" column="0">
<layout class="QHBoxLayout" name="layout_mark">
<item>
<widget class="QLabel" name="label_mark">
<property name="text">
<string>Mark</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_mark">
<property name="toolTip">
<string>A mark which will be shown if this desktop is active</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">#</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">$</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">%</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">&amp;</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">*</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">@</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">¤</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">¶</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">·</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">º</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">×</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">†</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">•</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">(current)</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QScrollArea" name="scrollArea"> <layout class="QHBoxLayout" name="layput_mainFormating">
<property name="widgetResizable"> <item>
<bool>true</bool> <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> </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="QCheckBox" name="checkBox_background">
<property name="text">
<string>Enable background</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_layout">
<property name="text">
<string>Vertical layout</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_leftStretch">
<property name="text">
<string>Add stretch to left/top of the layout</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_rightStretch">
<property name="text">
<string>Add stretch to right/bottom of the layout</string>
</property>
</widget>
</item>
<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>1000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<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">&amp;</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">*</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">@</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">¤</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">¶</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">·</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">º</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">×</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">†</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">•</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">(current)</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_pattern">
<item>
<widget class="QLabel" name="label_pattern">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Pattern</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_pattern">
<property name="toolTip">
<string>$mark - show mark if the current desktop is active
$name - desktop name
$number - desktop number
$total - total number of desktops</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<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>
<spacer name="spacer_widget">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>152</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="layout_tooltip">
<item>
<widget class="QLabel" name="label_tooltip">
<property name="text">
<string>Tooltip width</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_tooltip">
<property name="suffix">
<string>px</string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>25</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout" name="layout_tooltipColor">
<item>
<widget class="QLabel" name="label_tooltipColor">
<property name="text">
<string>Window border color on tooltip</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KColorCombo" name="kcolorcombo_tooltipColor"/>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="layout_background">
<item>
<spacer name="spacer_background">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_background">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable background</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="layout_layout">
<item>
<spacer name="spacer_layout">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_layout">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Vertical layout</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="layout_tooltip_2">
<item>
<widget class="QCheckBox" name="checkBox_tooltip">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Enable tooltip</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_tooltipType">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Windows</string>
</property>
</item>
<item>
<property name="text">
<string>Contours</string>
</property>
</item>
<item>
<property name="text">
<string>Clean desktop</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -1,5 +1,7 @@
# set project name # set project name
set (SUBPROJECT plasma_engine_extsysmon) set (SUBPROJECT plasma_engine_extsysmon)
set (PLUGIN_NAME ${SUBPROJECT})
message (STATUS "Subproject ${SUBPROJECT}")
# find required libaries # find required libaries
find_package (KDE4 REQUIRED) find_package (KDE4 REQUIRED)
@ -13,18 +15,20 @@ include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../
${PROJECT_TRDPARTY_DIR}) ${PROJECT_TRDPARTY_DIR})
set (PLUGIN_NAME ${SUBPROJECT})
file (GLOB SUBPROJECT_DESKTOP_IN *.desktop) file (GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN}) file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp) file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp)
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h) set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
file (GLOB SUBPROJECT_UI *.ui)
file (GLOB SUBPROJECT_CONF *.conf) file (GLOB SUBPROJECT_CONF *.conf)
set (SUBPROJECT_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/scripts)
# prepare # prepare
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
# make # make
qt4_wrap_cpp (TASK_MOC_SOURCE ${TASK_HEADER}) 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}) kde4_add_plugin (${PLUGIN_NAME} ${SUBPROJECT_SOURCE} ${TASK_MOC_SOURCE})
target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS}) target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS})
@ -32,3 +36,4 @@ target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS})
install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}) install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
install (FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR}) install (FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR})
install (DIRECTORY ${SUBPROJECT_SCRIPTS} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME} USE_SOURCE_PERMISSIONS)

View File

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

View File

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

View File

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

View File

@ -2,14 +2,7 @@
# $kdehome/share/config/extsysmon.conf # $kdehome/share/config/extsysmon.conf
# ACPI devices # ACPI devices
#AC=/sys/class/power_supply/AC/online #ACPIPATH=/sys/class/power_supply/
#BATTERY=/sys/class/power_supply/BAT0/capacity
# 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 # Set GPU device
# May be 'nvidia' (for nvidia), 'ati' (for ATI RADEON), 'disable' or 'auto' # May be 'nvidia' (for nvidia), 'ati' (for ATI RADEON), 'disable' or 'auto'

View File

@ -21,13 +21,16 @@
#include <Plasma/DataContainer> #include <Plasma/DataContainer>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KDE/KStandardDirs> #include <KDE/KStandardDirs>
#include <KDE/KWindowSystem>
#include <QDebug> #include <QDebug>
#include <QDir>
#include <QFile> #include <QFile>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QRegExp> #include <QRegExp>
#include <QTextCodec> #include <QTextCodec>
#include <QThread> #include <QThread>
#include <extscript.h>
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
@ -35,7 +38,7 @@
ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args) ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args)
: Plasma::DataEngine(parent, args) : Plasma::DataEngine(parent, args)
{ {
Q_UNUSED(args) Q_UNUSED(args);
// debug // debug
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
@ -47,6 +50,7 @@ ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args)
setMinimumPollingInterval(333); setMinimumPollingInterval(333);
readConfiguration(); readConfiguration();
initScripts();
} }
@ -108,40 +112,28 @@ QString ExtendedSysMon::getAutoMpris()
} }
QStringList ExtendedSysMon::getDesktopNames() void ExtendedSysMon::initScripts()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QStringList list; // create directory at $HOME
QString fileName = KGlobal::dirs()->findResource("config", "kwinrc"); QString localDir = KStandardDirs::locateLocal("data", "plasma_engine_extsysmon/scripts");
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName; if (KStandardDirs::makeDir(localDir))
QFile configFile(fileName); if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir;
if (!configFile.open(QIODevice::ReadOnly)) return list;
QString fileStr; QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
QStringList value; QStringList names;
bool desktopSection = false; for (int i=0; i<dirs.count(); i++) {
while (true) { QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
fileStr = QString(configFile.readLine()).trimmed(); for (int j=0; j<files.count(); j++) {
if ((fileStr.isEmpty()) && (!configFile.atEnd())) continue; if (!files[j].endsWith(QString(".desktop"))) continue;
if ((fileStr[0] == QChar('#')) && (!configFile.atEnd())) continue; if (names.contains(files[j])) continue;
if ((fileStr[0] == QChar(';')) && (!configFile.atEnd())) continue; if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
if (fileStr[0] == QChar('[')) desktopSection = false; names.append(files[j]);
if (fileStr == QString("[Desktops]")) desktopSection = true; externalScripts.append(new ExtScript(0, files[j], dirs, debug));
if (desktopSection) { times.append(1);
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;
} }
@ -171,11 +163,7 @@ void ExtendedSysMon::readConfiguration()
// pre-setup // pre-setup
QMap<QString, QString> rawConfig; QMap<QString, QString> rawConfig;
rawConfig[QString("AC")] = QString("/sys/class/power_supply/AC/online"); rawConfig[QString("ACPIPATH")] = QString("/sys/class/power_supply/");
rawConfig[QString("BATTERY")] = QString("/sys/class/power_supply/BAT0/capacity");
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("GPUDEV")] = QString("auto");
rawConfig[QString("HDDDEV")] = QString("all"); rawConfig[QString("HDDDEV")] = QString("all");
rawConfig[QString("HDDTEMPCMD")] = QString("sudo hddtemp"); rawConfig[QString("HDDTEMPCMD")] = QString("sudo hddtemp");
@ -225,16 +213,12 @@ QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, Q
key = rawConfig.keys()[i]; key = rawConfig.keys()[i];
value = rawConfig[key]; value = rawConfig[key];
key.remove(QChar(' ')); key.remove(QChar(' '));
if ((key != QString("CUSTOM")) && if ((key != QString("HDDTEMPCMD")) &&
(key != QString("DESKTOPCMD")) &&
(key != QString("HDDTEMPCMD")) &&
(key != QString("PKGCMD"))) (key != QString("PKGCMD")))
value.remove(QChar(' ')); value.remove(QChar(' '));
config[key] = value; config[key] = value;
} }
// update values // update values
// desktop names
config[QString("DESKTOP")] = getDesktopNames().join(QString(";;"));
// gpudev // gpudev
if (config[QString("GPUDEV")] == QString("disable")) if (config[QString("GPUDEV")] == QString("disable"))
config[QString("GPUDEV")] = QString("disable"); config[QString("GPUDEV")] = QString("disable");
@ -278,62 +262,66 @@ QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, Q
} }
QMap<QString, QVariant> ExtendedSysMon::getBattery(const QString acPath, const QString batPath) QMap<QString, QVariant> ExtendedSysMon::getBattery(const QString acpiPath)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "AC path" << acPath; if (debug) qDebug() << PDEBUG << ":" << "ACPI path" << acpiPath;
if (debug) qDebug() << PDEBUG << ":" << "Battery path" << batPath;
QMap<QString, QVariant> battery; QMap<QString, QVariant> battery;
battery[QString("ac")] = false; battery[QString("ac")] = false;
battery[QString("battery")] = 0; battery[QString("bat")] = 0;
QFile acFile(acPath); QFile acFile(acpiPath + QString("/AC/online"));
if (acFile.open(QIODevice::ReadOnly)) { if (acFile.open(QIODevice::ReadOnly)) {
if (QString(acFile.readLine()).trimmed().toInt() == 1) if (QString(acFile.readLine()).trimmed().toInt() == 1)
battery[QString("ac")] = true; battery[QString("ac")] = true;
} }
acFile.close(); acFile.close();
QFile batFile(batPath); // batterites
if (batFile.open(QIODevice::ReadOnly)) QStringList allDevices = QDir(acpiPath).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
battery[QString("battery")] = QString(batFile.readLine()).trimmed().toInt(); QStringList batDevices;
batFile.close(); QRegExp batRegexp = QRegExp(QString("BAT.*"));
for (int i=0; i<allDevices.count(); i++)
if (allDevices[i].contains(batRegexp))
batDevices.append(allDevices[i]);
for (int i=0; i<batDevices.count(); i++) {
QFile batFile(acpiPath + QString("/") + batDevices[i] + QString("/capacity"));
if (batFile.open(QIODevice::ReadOnly))
battery[QString("bat") + QString::number(i)] = QString(batFile.readLine()).trimmed().toInt();
batFile.close();
}
float number = 0.0;
float average = 0.0;
for (int i=0; i<battery.keys().count(); i++) {
if (battery.keys()[i] == QString("ac")) continue;
if (battery.keys()[i] == QString("bat")) continue;
average += battery[battery.keys()[i]].toInt();
number++;
}
battery[QString("bat")] = int(average / number);
return battery; return battery;
} }
QMap<QString, QVariant> ExtendedSysMon::getCurrentDesktop(const QString cmd) QMap<QString, QVariant> ExtendedSysMon::getCurrentDesktop()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
TaskResult process = runTask(QString("bash -c \"") + cmd + QString("\"")); int number = KWindowSystem::currentDesktop();
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; int total = KWindowSystem::numberOfDesktops();
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
int number = qoutput.toInt();
QMap<QString, QVariant> currentDesktop; QMap<QString, QVariant> currentDesktop;
currentDesktop[QString("currentName")] = configuration[QString("DESKTOP")].split(QString(";;"))[number-1]; currentDesktop[QString("currentName")] = KWindowSystem::desktopName(number);
currentDesktop[QString("currentNumber")] = number; currentDesktop[QString("currentNumber")] = number;
currentDesktop[QString("list")] = configuration[QString("DESKTOP")]; QStringList list;
currentDesktop[QString("number")] = configuration[QString("DESKTOP")].split(QString(";;")).count(); for (int i=1; i<total+1; i++)
list.append(KWindowSystem::desktopName(i));
currentDesktop[QString("list")] = list.join(QString(";;"));
currentDesktop[QString("number")] = total;
return currentDesktop; 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) float ExtendedSysMon::getGpu(const QString device)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -344,7 +332,7 @@ float ExtendedSysMon::getGpu(const QString device)
return value; return value;
QString cmd = QString(""); QString cmd = QString("");
if (device == QString("nvidia")) if (device == QString("nvidia"))
cmd = QString("nvidia-smi -q -d UTILIZATION"); cmd = QString("nvidia-smi -q -x");
else if (device == QString("ati")) else if (device == QString("ati"))
cmd = QString("aticonfig --od-getclocks"); cmd = QString("aticonfig --od-getclocks");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
@ -354,9 +342,10 @@ float ExtendedSysMon::getGpu(const QString device)
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed(); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
if (configuration[QString("GPUDEV")] == QString("nvidia")) if (configuration[QString("GPUDEV")] == QString("nvidia"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) { for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("Gpu"))) { if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("<gpu_util>"))) {
QString load = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i] QString load = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
.split(QChar(' '), QString::SkipEmptyParts)[2] .remove(QString("<gpu_util>"))
.remove(QString("</gpu_util>"))
.remove(QChar('%')); .remove(QChar('%'));
value = load.toFloat(); value = load.toFloat();
} }
@ -385,7 +374,7 @@ float ExtendedSysMon::getGpuTemp(const QString device)
return value; return value;
QString cmd = QString(""); QString cmd = QString("");
if (device == QString("nvidia")) if (device == QString("nvidia"))
cmd = QString("nvidia-smi -q -d TEMPERATURE"); cmd = QString("nvidia-smi -q -x");
else if (device == QString("ati")) else if (device == QString("ati"))
cmd = QString("aticonfig --od-gettemperature"); cmd = QString("aticonfig --od-gettemperature");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
@ -395,9 +384,10 @@ float ExtendedSysMon::getGpuTemp(const QString device)
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
if (configuration[QString("GPUDEV")] == QString("nvidia")) if (configuration[QString("GPUDEV")] == QString("nvidia"))
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) { 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"))) { if (qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i].contains(QString("<gpu_temp>"))) {
QString temp = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i] QString temp = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i]
.split(QChar(' '), QString::SkipEmptyParts)[4]; .remove(QString("<gpu_temp>"))
.remove(QString("C</gpu_temp>"));
value = temp.toFloat(); value = temp.toFloat();
} }
} }
@ -571,17 +561,24 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
if (debug) qDebug() << PDEBUG << ":" << "Source" << source; if (debug) qDebug() << PDEBUG << ":" << "Source" << source;
if (source == QString("battery")) { if (source == QString("battery")) {
QMap<QString, QVariant> battery = getBattery(configuration[QString("AC")], QMap<QString, QVariant> battery = getBattery(configuration[QString("ACPIPATH")]);
configuration[QString("BATTERY")]);
setData(source, QString("ac"), battery[QString("ac")].toBool()); setData(source, QString("ac"), battery[QString("ac")].toBool());
setData(source, QString("bat"), battery[QString("battery")].toInt()); 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")) { } else if (source == QString("custom")) {
for (int i=0; i<configuration[QString("CUSTOM")].split(QString("@@"), QString::SkipEmptyParts).count(); i++) { for (int i=0; i<externalScripts.count(); i++) {
setData(source, QString("custom") + QString::number(i), ExtScript::ScriptData data = externalScripts[i]->run(times[i]);
getCustomCmd(configuration[QString("CUSTOM")].split(QString("@@"), QString::SkipEmptyParts)[i])); if (!data.active) return true;
if (data.refresh) {
times[i] = 1;
setData(source, QString("custom") + QString::number(i), data.output);
} else
times[i]++;
} }
} else if (source == QString("desktop")) { } else if (source == QString("desktop")) {
QMap<QString, QVariant> desktop = getCurrentDesktop(configuration[QString("DESKTOPCMD")]); QMap<QString, QVariant> desktop = getCurrentDesktop();
for (int i=0; i<desktop.keys().count(); i++) for (int i=0; i<desktop.keys().count(); i++)
setData(source, desktop.keys()[i], desktop[desktop.keys()[i]]); setData(source, desktop.keys()[i], desktop[desktop.keys()[i]]);
} else if (source == QString("gpu")) { } else if (source == QString("gpu")) {

View File

@ -21,6 +21,9 @@
#include <Plasma/DataEngine> #include <Plasma/DataEngine>
#include <QProcess> #include <QProcess>
class ExtScript;
class ExtendedSysMon : public Plasma::DataEngine class ExtendedSysMon : public Plasma::DataEngine
{ {
Q_OBJECT Q_OBJECT
@ -28,9 +31,8 @@ class ExtendedSysMon : public Plasma::DataEngine
public: public:
ExtendedSysMon(QObject *parent, const QVariantList &args); ExtendedSysMon(QObject *parent, const QVariantList &args);
// update functions // update functions
QMap<QString, QVariant> getBattery(const QString acPath, const QString batPath); QMap<QString, QVariant> getBattery(const QString acpiPath);
QMap<QString, QVariant> getCurrentDesktop(const QString cmd); QMap<QString, QVariant> getCurrentDesktop();
QString getCustomCmd(const QString cmd);
float getGpu(const QString device); float getGpu(const QString device);
float getGpuTemp(const QString device); float getGpuTemp(const QString device);
float getHddTemp(const QString cmd, const QString device); float getHddTemp(const QString cmd, const QString device);
@ -49,14 +51,17 @@ protected:
private: private:
// configuration // configuration
QMap<QString, QString> configuration; QMap<QString, QString> configuration;
QList<ExtScript *> externalScripts;
QList<int> times;
bool debug; bool debug;
// reread configuration // reread configuration
QString getAllHdd(); QString getAllHdd();
QString getAutoGpu(); QString getAutoGpu();
QString getAutoMpris(); QString getAutoMpris();
QStringList getDesktopNames(); void initScripts();
void readConfiguration(); void readConfiguration();
QMap<QString, QString> updateConfiguration(const QMap<QString, QString> rawConfig); QMap<QString, QString> updateConfiguration(const QMap<QString, QString> rawConfig);
}; };
#endif /* EXTSYSMON_H */ #endif /* EXTSYSMON_H */

View File

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

View File

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

30
sources/version.h.in Normal file
View File

@ -0,0 +1,30 @@
#ifndef VERSION_H
#define VERSION_H
// information
#define NAME "Awesome Widgets"
#define VERSION "@PROJECT_VERSION@"
#define AUTHOR "@PROJECT_AUTHOR@"
#define TRANSLATORS "Ernesto Aviles Vzqz (Spanish), Mermouy (French), underr (Brazillian Portuguese), Viktor Slobodyan (Ukrainian), Lemueler (Chinese)"
#define EMAIL "@PROJECT_CONTACT@"
#define LICENSE "@PROJECT_LICENSE@"
#define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks"
// links
#define HOMEPAGE "http://arcanis.name/projects/awesome-widgets/"
#define REPOSITORY "https://github.com/arcan1s/awesome-widgets"
#define RELEASES "https://github.com/arcan1s/awesome-widgets/releases/tag/V."
#define VERSION_API "https://api.github.com/repos/arcan1s/awesome-widgets/releases"
#define BUGTRACKER "https://github.com/arcan1s/awesome-widgets/issues"
#define TRANSLATION "https://github.com/arcan1s/awesome-widgets/issues/14"
#define AUR_PACKAGES "https://aur.archlinux.org/packages/kdeplasma-applets-awesome-widgets/"
// build information
#define BUILD_DATE "@CURRENT_DATE@"
#define DATE "2013-@CURRENT_YEAR@"
// cmake properties
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#endif /* VERSION_H */