mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 16:07:19 +00:00
start work on porting extscripts to *.desktop configuration
This commit is contained in:
parent
16d7ca2005
commit
8cdfdd4e81
@ -280,6 +280,7 @@ void GraphicalItem::setHeight(const int height)
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Height" << height;
|
if (debug) qDebug() << PDEBUG << ":" << "Height" << height;
|
||||||
|
if (height <= 0) return;
|
||||||
|
|
||||||
_height = height;
|
_height = height;
|
||||||
}
|
}
|
||||||
@ -289,6 +290,7 @@ void GraphicalItem::setWidth(const int width)
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Width" << width;
|
if (debug) qDebug() << PDEBUG << ":" << "Width" << width;
|
||||||
|
if (width <= 0) return;
|
||||||
|
|
||||||
_width = width;
|
_width = width;
|
||||||
}
|
}
|
||||||
|
@ -55,15 +55,15 @@ public:
|
|||||||
int getHeight();
|
int getHeight();
|
||||||
int getWidth();
|
int getWidth();
|
||||||
// set methods
|
// set methods
|
||||||
void setName(const QString name);
|
void setName(const QString name = QString("none"));
|
||||||
void setComment(const QString comment);
|
void setComment(const QString comment = QString("empty"));
|
||||||
void setBar(const QString bar);
|
void setBar(const QString bar = QString("cpu"));
|
||||||
void setActiveColor(const QColor color);
|
void setActiveColor(const QColor color = QColor(255, 255, 255, 0));
|
||||||
void setInactiveColor(const QColor color);
|
void setInactiveColor(const QColor color = QColor(255, 255, 255, 255));
|
||||||
void setType(const QString type);
|
void setType(const QString type = QString("Horizontal"));
|
||||||
void setDirection(const QString direction);
|
void setDirection(const QString direction = QString("LeftToRight"));
|
||||||
void setHeight(const int height);
|
void setHeight(const int height = 100);
|
||||||
void setWidth(const int width);
|
void setWidth(const int width = 100);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void readConfiguration();
|
void readConfiguration();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>408</width>
|
<width>420</width>
|
||||||
<height>329</height>
|
<height>329</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -39,6 +39,12 @@
|
|||||||
<layout class="QHBoxLayout" name="layout_comment">
|
<layout class="QHBoxLayout" name="layout_comment">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_comment">
|
<widget class="QLabel" name="label_comment">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Comment</string>
|
<string>Comment</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -46,28 +46,6 @@ ExtScript::~ExtScript()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtScript::addDirectory(const QString dir)
|
|
||||||
{
|
|
||||||
if (debug) qDebug() << PDEBUG;
|
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Directory" << dir;
|
|
||||||
|
|
||||||
QString absPath = QDir(dir).absolutePath();
|
|
||||||
if (!QDir(absPath).exists()) return;
|
|
||||||
for (int i=0; i<dirs.count(); i++)
|
|
||||||
if (dirs[i] == absPath) return;
|
|
||||||
|
|
||||||
dirs.append(absPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QStringList ExtScript::directories()
|
|
||||||
{
|
|
||||||
if (debug) qDebug() << PDEBUG;
|
|
||||||
|
|
||||||
return dirs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ExtScript::getInterval()
|
int ExtScript::getInterval()
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
@ -88,7 +66,7 @@ QString ExtScript::getPrefix()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
return prefix;
|
return _prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +74,7 @@ ExtScript::Redirect ExtScript::getRedirect()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
return redirect;
|
return _redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +82,7 @@ bool ExtScript::hasOutput()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
return output;
|
return _output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +90,7 @@ bool ExtScript::isActive()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
return active;
|
return _active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -121,17 +99,7 @@ void ExtScript::setActive(const bool state)
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
|
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
|
||||||
|
|
||||||
active = state;
|
_active = state;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ExtScript::setDirectories(const QStringList directories)
|
|
||||||
{
|
|
||||||
if (debug) qDebug() << PDEBUG;
|
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Directories" << directories;
|
|
||||||
|
|
||||||
for (int i=0; i<directories.count(); i++)
|
|
||||||
addDirectory(directories[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -140,36 +108,40 @@ void ExtScript::setHasOutput(const bool state)
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
|
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
|
||||||
|
|
||||||
output = state;
|
_output = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtScript::setInterval(const int inter)
|
void ExtScript::setInterval(const int interval)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Interval" << inter;
|
if (debug) qDebug() << PDEBUG << ":" << "Interval" << interval;
|
||||||
|
if (interval <= 0) return;
|
||||||
|
|
||||||
if (inter <= 0) return;
|
_interval = interval;
|
||||||
|
|
||||||
interval = inter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtScript::setPrefix(const QString pref)
|
void ExtScript::setPrefix(const QString prefix)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Prefix" << pref;
|
if (debug) qDebug() << PDEBUG << ":" << "Prefix" << prefix;
|
||||||
|
|
||||||
prefix = pref;
|
_prefix = prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtScript::setRedirect(const Redirect redir)
|
void ExtScript::setRedirect(const QString redirect)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Redirect" << redir;
|
if (debug) qDebug() << PDEBUG << ":" << "Redirect" << redirect;
|
||||||
|
|
||||||
redirect = redir;
|
if (redirect == QString("stdout2sdterr"))
|
||||||
|
_redirect = stdout2stderr;
|
||||||
|
else if (redirect == QString("stderr2sdtout"))
|
||||||
|
_redirect = stderr2stdout;
|
||||||
|
else
|
||||||
|
_redirect = nothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -195,16 +167,16 @@ ExtScript::ScriptData ExtScript::run(const int time)
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
ScriptData response;
|
ScriptData response;
|
||||||
response.active = active;
|
response.active = _active;
|
||||||
response.name = name;
|
response.name = name;
|
||||||
response.refresh = false;
|
response.refresh = false;
|
||||||
if (!active) return response;
|
if (!_active) return response;
|
||||||
if (time != interval) return response;
|
if (time != _interval) return response;
|
||||||
response.refresh = true;
|
response.refresh = true;
|
||||||
|
|
||||||
QStringList cmdList;
|
QStringList cmdList;
|
||||||
if (!prefix.isEmpty())
|
if (!_prefix.isEmpty())
|
||||||
cmdList.append(prefix);
|
cmdList.append(_prefix);
|
||||||
QString fullPath = name;
|
QString fullPath = name;
|
||||||
for (int i=0; i<dirs.count(); i++) {
|
for (int i=0; i<dirs.count(); i++) {
|
||||||
if (!QDir(dirs[i]).entryList(QDir::Files).contains(name)) continue;
|
if (!QDir(dirs[i]).entryList(QDir::Files).contains(name)) continue;
|
||||||
@ -218,7 +190,7 @@ ExtScript::ScriptData ExtScript::run(const int time)
|
|||||||
|
|
||||||
QString info = QTextCodec::codecForMib(106)->toUnicode(process.error).trimmed();
|
QString info = QTextCodec::codecForMib(106)->toUnicode(process.error).trimmed();
|
||||||
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||||
switch(redirect) {
|
switch(_redirect) {
|
||||||
case stdout2stderr:
|
case stdout2stderr:
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Debug" << info;
|
if (debug) qDebug() << PDEBUG << ":" << "Debug" << info;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Output" << qoutput;
|
if (debug) qDebug() << PDEBUG << ":" << "Output" << qoutput;
|
||||||
@ -231,13 +203,19 @@ ExtScript::ScriptData ExtScript::run(const int time)
|
|||||||
response.output = qoutput;
|
response.output = qoutput;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!output)
|
if (!_output)
|
||||||
response.output = QString::number(process.exitCode);
|
response.output = QString::number(process.exitCode);
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ExtScript::showConfiguration()
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtScript::tryDelete()
|
void ExtScript::tryDelete()
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
@ -273,17 +251,17 @@ void ExtScript::fromExternalConfiguration(const QMap<QString, QString> settings)
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
if (settings.contains(QString("ACTIVE")))
|
if (settings.contains(QString("ACTIVE")))
|
||||||
active = (settings[QString("ACTIVE")] == QString("true"));
|
_active = (settings[QString("ACTIVE")] == QString("true"));
|
||||||
if (settings.contains(QString("INTERVAL")))
|
if (settings.contains(QString("INTERVAL")))
|
||||||
interval = settings[QString("INTERVAL")].toInt();
|
_interval = settings[QString("INTERVAL")].toInt();
|
||||||
if (settings.contains(QString("PREFIX")))
|
if (settings.contains(QString("PREFIX")))
|
||||||
prefix = settings[QString("PREFIX")];
|
_prefix = settings[QString("PREFIX")];
|
||||||
if (settings.contains(QString("OUTPUT")))
|
if (settings.contains(QString("OUTPUT")))
|
||||||
output = (settings[QString("OUTPUT")] == QString("true"));
|
_output = (settings[QString("OUTPUT")] == QString("true"));
|
||||||
if (settings.contains(QString("REDIRECT")))
|
if (settings.contains(QString("REDIRECT")))
|
||||||
redirect = (Redirect)settings[QString("REDIRECT")].toInt();
|
_redirect = (Redirect)settings[QString("REDIRECT")].toInt();
|
||||||
if (!output)
|
if (!_output)
|
||||||
redirect = stdout2stderr;
|
_redirect = stdout2stderr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -318,17 +296,17 @@ QMap<QString, QString> ExtScript::toExternalConfiguration()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
QMap<QString, QString> settings;
|
QMap<QString, QString> settings;
|
||||||
if (active)
|
if (_active)
|
||||||
settings[QString("ACTIVE")] = QString("true");
|
settings[QString("ACTIVE")] = QString("true");
|
||||||
else
|
else
|
||||||
settings[QString("ACTIVE")] = QString("false");
|
settings[QString("ACTIVE")] = QString("false");
|
||||||
settings[QString("INTERVAL")] = QString::number(interval);
|
settings[QString("INTERVAL")] = QString::number(_interval);
|
||||||
settings[QString("PREFIX")] = prefix;
|
settings[QString("PREFIX")] = _prefix;
|
||||||
if (output)
|
if (_output)
|
||||||
settings[QString("OUTPUT")] = QString("true");
|
settings[QString("OUTPUT")] = QString("true");
|
||||||
else
|
else
|
||||||
settings[QString("OUTPUT")] = QString("false");
|
settings[QString("OUTPUT")] = QString("false");
|
||||||
settings[QString("REDIRECT")] = QString::number(redirect);
|
settings[QString("REDIRECT")] = QString::number(_redirect);
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class ExtScript : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
enum Redirect {
|
enum Redirect {
|
||||||
stdout2stderr = -1,
|
stdout2stderr = 0,
|
||||||
nothing,
|
nothing,
|
||||||
stderr2stdout
|
stderr2stdout
|
||||||
};
|
};
|
||||||
@ -41,28 +41,28 @@ public:
|
|||||||
QString output;
|
QString output;
|
||||||
bool refresh;
|
bool refresh;
|
||||||
} ScriptData;
|
} ScriptData;
|
||||||
|
|
||||||
explicit ExtScript(QWidget *parent = 0, const QString scriptName = QString(),
|
explicit ExtScript(QWidget *parent = 0, const QString scriptName = QString(),
|
||||||
const QStringList directories = QStringList(), const bool debugCmd = false);
|
const QStringList directories = QStringList(), const bool debugCmd = false);
|
||||||
~ExtScript();
|
~ExtScript();
|
||||||
// configuration
|
// get methods
|
||||||
void addDirectory(const QString dir);
|
|
||||||
QStringList directories();
|
|
||||||
int getInterval();
|
int getInterval();
|
||||||
QString getName();
|
QString getName();
|
||||||
QString getPrefix();
|
QString getPrefix();
|
||||||
Redirect getRedirect();
|
Redirect getRedirect();
|
||||||
bool hasOutput();
|
bool hasOutput();
|
||||||
bool isActive();
|
bool isActive();
|
||||||
|
// set methods
|
||||||
void setActive(const bool state = true);
|
void setActive(const bool state = true);
|
||||||
void setDirectories(const QStringList directories);
|
|
||||||
void setHasOutput(const bool state = true);
|
void setHasOutput(const bool state = true);
|
||||||
void setInterval(const int inter = 1);
|
void setInterval(const int interval = 1);
|
||||||
void setPrefix(const QString pref = QString(""));
|
void setPrefix(const QString prefix = QString(""));
|
||||||
void setRedirect(const Redirect redir);
|
void setRedirect(const QString redirect = QString("nothing"));
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void readConfiguration();
|
void readConfiguration();
|
||||||
ScriptData run(const int time);
|
ScriptData run(const int time);
|
||||||
|
void showConfiguration();
|
||||||
void tryDelete();
|
void tryDelete();
|
||||||
void writeConfiguration();
|
void writeConfiguration();
|
||||||
|
|
||||||
@ -77,11 +77,12 @@ private:
|
|||||||
QMap<QString, QString> getConfigurationFromFile(const QString fileName);
|
QMap<QString, QString> getConfigurationFromFile(const QString fileName);
|
||||||
QMap<QString, QString> toExternalConfiguration();
|
QMap<QString, QString> toExternalConfiguration();
|
||||||
// properties
|
// properties
|
||||||
bool active = true;
|
bool _active = true;
|
||||||
int interval = 1;
|
QString _comment = QString("");
|
||||||
bool output = true;
|
int _interval = 1;
|
||||||
QString prefix = QString("");
|
bool _output = true;
|
||||||
Redirect redirect = nothing;
|
QString _prefix = QString("");
|
||||||
|
Redirect _redirect = nothing;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>ExtScript</class>
|
<class>ExtScript</class>
|
||||||
<widget class="QDialog" name="ExtScript">
|
<widget class="QDialog" name="ExtScript">
|
||||||
@ -5,29 +6,198 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>240</width>
|
<width>420</width>
|
||||||
<height>320</height>
|
<height>301</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<layout class="QHBoxLayout" name="layout_name">
|
||||||
<x>10</x>
|
<item>
|
||||||
<y>270</y>
|
<widget class="QLabel" name="label_name">
|
||||||
<width>221</width>
|
<property name="minimumSize">
|
||||||
<height>41</height>
|
<size>
|
||||||
</rect>
|
<width>200</width>
|
||||||
</property>
|
<height>0</height>
|
||||||
<property name="orientation">
|
</size>
|
||||||
<enum>Qt::Horizontal</enum>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="standardButtons">
|
<string>Name</string>
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
</property>
|
||||||
</property>
|
<property name="alignment">
|
||||||
</widget>
|
<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="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</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="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</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="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</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>
|
||||||
|
<widget class="QCheckBox" name="checkBox_active">
|
||||||
|
<property name="text">
|
||||||
|
<string>Active</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_output">
|
||||||
|
<property name="text">
|
||||||
|
<string>Has output</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</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>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
curl ip4.telize.com
|
|
@ -1,5 +0,0 @@
|
|||||||
ACTIVE=true
|
|
||||||
INTERVAL=1
|
|
||||||
PREFIX=
|
|
||||||
OUTPUT=true
|
|
||||||
REDIRECT=0
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
|
|
||||||
print ("Hello the f$%king world!")
|
|
@ -1,15 +0,0 @@
|
|||||||
# is this script active?
|
|
||||||
ACTIVE=false
|
|
||||||
# update interval in default plasmoid interval
|
|
||||||
INTERVAL=1
|
|
||||||
# does this script have output?
|
|
||||||
# set to 'false' if it is an action and will not show text in the plasmoid
|
|
||||||
OUTPUT=true
|
|
||||||
# prefix to run this script. Usually this field should be blank,
|
|
||||||
# but you may want to set command (e.g. script language) directly
|
|
||||||
PREFIX=
|
|
||||||
# redirect output streams
|
|
||||||
# -1: stdout to stderr
|
|
||||||
# 0: do nothing
|
|
||||||
# 1: stderr to stdout
|
|
||||||
REDIRECT=0
|
|
10
sources/ext-sysmon/scripts/get-external-ip.desktop
Normal file
10
sources/ext-sysmon/scripts/get-external-ip.desktop
Normal 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
|
10
sources/ext-sysmon/scripts/script-template.desktop
Normal file
10
sources/ext-sysmon/scripts/script-template.desktop
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Name=aw-script-template
|
||||||
|
Comment=Template for external script
|
||||||
|
Exec=/path/to/some/command
|
||||||
|
X-AW-Prefix=/prefix/to/command/if/required
|
||||||
|
X-AW-Active=false
|
||||||
|
X-AW-Output=false
|
||||||
|
X-AW-Redirect=nothing
|
||||||
|
X-AW-Interval=1
|
Loading…
Reference in New Issue
Block a user