mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-15 06:45:48 +00:00
move back desktop files
add widget configuration append plugin slots rewrite KF5 and DE to use ExtUpgrade class some fixes
This commit is contained in:
@ -26,6 +26,7 @@ file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
|
||||
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
|
||||
file (GLOB SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui)
|
||||
file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
|
||||
set (SUBPROJECT_DESKTOPS ${CMAKE_CURRENT_SOURCE_DIR}/desktops)
|
||||
|
||||
# prepare
|
||||
configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
|
||||
@ -40,3 +41,4 @@ target_link_libraries (${PLUGIN_NAME} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${K
|
||||
install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
|
||||
install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})
|
||||
install (DIRECTORY ${SUBPROJECT_DESKTOPS} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME})
|
||||
|
@ -825,7 +825,7 @@ void AwesomeWidget::contextMenuCustomCommand(const QPoint pos)
|
||||
else if (action == copy)
|
||||
copyCustomCommand(uiDEConfig.listWidget_custom->currentItem()->text());
|
||||
else if (action == remove) {
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_dataengine_extsysmon/scripts");
|
||||
ExtScript *script = new ExtScript(0, uiDEConfig.listWidget_custom->currentItem()->text(), dirs, debug);
|
||||
script->tryDelete();
|
||||
delete script;
|
||||
@ -954,7 +954,7 @@ void AwesomeWidget::editCustomCommand(QListWidgetItem *item)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_dataengine_extsysmon/scripts");
|
||||
ExtScript *script = new ExtScript(0, item->text(), dirs, debug);
|
||||
script->showConfiguration();
|
||||
}
|
||||
@ -1006,11 +1006,11 @@ QList<ExtScript *> AwesomeWidget::initScripts()
|
||||
|
||||
QList<ExtScript *> externalScripts;
|
||||
// create directory at $HOME
|
||||
QString localDir = KStandardDirs::locateLocal("data", "plasma_engine_extsysmon/scripts");
|
||||
QString localDir = KStandardDirs::locateLocal("data", "plasma_dataengine_extsysmon/scripts");
|
||||
if (KStandardDirs::makeDir(localDir))
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir;
|
||||
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_engine_extsysmon/scripts");
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "plasma_dataengine_extsysmon/scripts");
|
||||
QStringList names;
|
||||
for (int i=0; i<dirs.count(); i++) {
|
||||
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
|
||||
|
12
sources/awesome-widget-kde4/desktops/aw-bat-bar.desktop
Normal file
12
sources/awesome-widget-kde4/desktops/aw-bat-bar.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[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
|
||||
X-AW-ApiVersion=1
|
12
sources/awesome-widget-kde4/desktops/aw-cpu-bar.desktop
Normal file
12
sources/awesome-widget-kde4/desktops/aw-cpu-bar.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[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
|
||||
X-AW-ApiVersion=1
|
12
sources/awesome-widget-kde4/desktops/aw-mem-bar.desktop
Normal file
12
sources/awesome-widget-kde4/desktops/aw-mem-bar.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[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
|
||||
X-AW-ApiVersion=1
|
12
sources/awesome-widget-kde4/desktops/aw-swap-bar.desktop
Normal file
12
sources/awesome-widget-kde4/desktops/aw-swap-bar.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[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
|
||||
X-AW-ApiVersion=1
|
25
sources/awesome-widget-kde4/desktops/bar-template.desktop
Normal file
25
sources/awesome-widget-kde4/desktops/bar-template.desktop
Normal file
@ -0,0 +1,25 @@
|
||||
[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
|
||||
# API version
|
||||
X-AW-ApiVersion=1
|
Reference in New Issue
Block a user