aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorna <noah.andreas@nukura.com>2017-01-26 15:02:18 +0100
committerna <noah.andreas@nukura.com>2017-01-26 15:02:18 +0100
commita2c475d61ad610b0c23d8a6d13afafa9051eb884 (patch)
tree10b8f66d2c7dae68939fe8dceb1b965a49f69435
parentc4c572cbbe90f09b66cecabcc13840261f711580 (diff)
downloadlead-a2c475d61ad610b0c23d8a6d13afafa9051eb884.tar
lead-a2c475d61ad610b0c23d8a6d13afafa9051eb884.tar.gz
lead-a2c475d61ad610b0c23d8a6d13afafa9051eb884.zip
namechange
-rw-r--r--CHANGELOG.md4
-rw-r--r--README.md14
-rwxr-xr-xdata/usr/bin/lead (renamed from data/usr/bin/mlde-lead)bin45056 -> 44840 bytes
-rw-r--r--makefile6
-rw-r--r--src/lead.cpp18
-rw-r--r--src/lead.h6
-rw-r--r--src/main.cpp3
-rw-r--r--src/sensor.cpp7
-rw-r--r--src/sensor.h3
9 files changed, 25 insertions, 36 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8fdebc1..6138aa7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 01/26/2017
+- removed prefix "mlde" from name to make the component independent from a project name.
+- default settings-path changed from `~/.config/mlde/lead.conf` to `~/.config/lead/lead.conf`. Please change your config-path.
+
# 01/24/2017
- changed built-tool back to makefile
diff --git a/README.md b/README.md
index 5bcd1f9..1c0f1f7 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ To build *lead* open a terminal in the root folder of the repository and:
### Build
-A build `mlde-lead` is provided in `data/usr/bin/mlde-lead`. It was build on my arch64 system.
+A build `lead` is provided in `data/usr/bin/`. It was build on my arch64 system.
# Install it
@@ -49,10 +49,10 @@ To install *lead* open a terminal in the root folder of the repository and:
On the first run lead will look into these dirs for a conf-file. The first one found will be used.
- ~/.config/mlde/lead.conf
- /etc/xdg/mlde/lead.conf
+ ~/.config/lead/lead.conf
+ /etc/xdg/lead/lead.conf
-If none of these exists, it will create `~/.config/mlde/lead.conf` with default values for each screen, ie:
+If none of these exists, it will create `~/.config/lead/lead.conf` with default values for each screen, ie:
[eDP1]
bottom=
@@ -73,7 +73,7 @@ To enable a action for a sensor, simply add a command to the corner or side:
left=
right=
top=
- topLeft=mlde-californium toggle
+ topLeft=californium toggle
topRight=skippy-xd
Used config-files and theme-files are monitored and changes are applied automatically.
@@ -81,11 +81,11 @@ Used config-files and theme-files are monitored and changes are applied automati
# Use it
-*lead* provides the binary `mlde-lead` which creates sensors for each configured corner or side.
+*lead* provides the binary `lead` which creates sensors for each configured corner or side.
Start *lead* as background process:
- $ mlde-lead &
+ $ lead &
# Uninstall it
diff --git a/data/usr/bin/mlde-lead b/data/usr/bin/lead
index b6b28ff..2ae95ac 100755
--- a/data/usr/bin/mlde-lead
+++ b/data/usr/bin/lead
Binary files differ
diff --git a/makefile b/makefile
index a7ef44c..e444933 100644
--- a/makefile
+++ b/makefile
@@ -12,7 +12,7 @@ MKDIR = mkdir -p $(dir $@)
.SECONDARY:
-data/usr/bin/mlde-lead: build/lead.o build/sensor.o build/main.o build/moc_lead.o build/moc_sensor.o
+data/usr/bin/lead: build/lead.o build/sensor.o build/main.o build/moc_lead.o build/moc_sensor.o
$(MKDIR)
$(LINKER)
@@ -35,7 +35,7 @@ build/moc_%.cpp: src/%.h
clean:
rm -f build/*
- rm -f data/usr/bin/mlde-lead
+ rm -f data/usr/bin/lead
###### INSTALL ######
@@ -47,7 +47,7 @@ install:
###### UNINSTALL ######
uninstall:
- rm -f /usr/bin/mlde-lead
+ rm -f /usr/bin/lead
.PHONY: clean install uninstall \ No newline at end of file
diff --git a/src/lead.cpp b/src/lead.cpp
index f6a4c60..fb6c3cb 100644
--- a/src/lead.cpp
+++ b/src/lead.cpp
@@ -30,12 +30,9 @@ SOFTWARE.
#include <QFileSystemWatcher>
-namespace mlde {
-
-
Lead::Lead(int &argc, char** argv) :
QApplication(argc, argv),
- settings("mlde", "lead"),
+ settings("lead", "lead"),
watcher()
{
loadScreens();
@@ -61,7 +58,7 @@ Lead::watchSettings()
void
Lead::fileChanged(QString fileName)
{
- qDebug() << "mlde::Lead::fileChanged() fileName: " << fileName;
+ qDebug() << "Lead::fileChanged() fileName: " << fileName;
// this reloads the settings from the file
settings.sync();
@@ -113,7 +110,7 @@ Lead::loadScreens()
void
Lead::loadScreen(QScreen* screen)
{
- qDebug() << "mlde::Lead::loadScreen() " << screen->name();
+ qDebug() << "Lead::loadScreen() " << screen->name();
QRect rec = screen->geometry();
@@ -137,7 +134,7 @@ Lead::loadSensor(QScreen* screen, QString name, int x, int y, int w, int h)
if (!settings.contains(key) )
{
- qDebug() << "mlde::Lead::loadSensor() key " << name << " not found";
+ qDebug() << "Lead::loadSensor() key " << name << " not found";
// restore missing key
settings.setValue(key, QString());
@@ -146,7 +143,7 @@ Lead::loadSensor(QScreen* screen, QString name, int x, int y, int w, int h)
if (settings.value(key).toString().isEmpty())
{
- qDebug() << "mlde::Lead::loadSensor() key " << name << " is empty";
+ qDebug() << "Lead::loadSensor() key " << name << " is empty";
return;
}
@@ -154,7 +151,4 @@ Lead::loadSensor(QScreen* screen, QString name, int x, int y, int w, int h)
// create sensor and save in list so we can delete all sensors on delete
sensors.append( new lead::Sensor(x, y, w, h, settings.value(key).toString()) );
-}
-
-
-} // namespace
+} \ No newline at end of file
diff --git a/src/lead.h b/src/lead.h
index e9b7f08..3e7c9bd 100644
--- a/src/lead.h
+++ b/src/lead.h
@@ -34,9 +34,6 @@ SOFTWARE.
#include <QFileSystemWatcher>
-namespace mlde {
-
-
class Lead : public QApplication
{
Q_OBJECT
@@ -62,6 +59,3 @@ public slots:
void fileChanged(QString fileName);
};
-
-
-} // namespace
diff --git a/src/main.cpp b/src/main.cpp
index bd627c6..96ee49e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -24,13 +24,12 @@ SOFTWARE.
#include "lead.h"
-#include <QApplication>
int
main(int argc, char *argv[])
{
- mlde::Lead lead(argc, argv);
+ Lead lead(argc, argv);
return lead.exec();
}
diff --git a/src/sensor.cpp b/src/sensor.cpp
index 822dc98..841a4df 100644
--- a/src/sensor.cpp
+++ b/src/sensor.cpp
@@ -29,14 +29,13 @@ SOFTWARE.
#include <QProcess>
-namespace mlde {
namespace lead {
Sensor::Sensor(int x, int y, int w, int h, QString action):
QWidget()
{
- qDebug() << "mlde::lead::Sensor() " << x << "," << y << "," << w << "," << h << " : " << action;
+ qDebug() << "lead::Sensor() " << x << "," << y << "," << w << "," << h << " : " << action;
this->action = action;
@@ -56,10 +55,10 @@ Sensor::~Sensor()
void
Sensor::enterEvent(QEvent * event)
{
- qDebug() << "mlde::lead::Sensor::enterEvent() " << this->x() << ":" << this->y() << " action: " << this->action;
+ qDebug() << "lead::Sensor::enterEvent() " << this->x() << ":" << this->y() << " action: " << this->action;
QProcess::startDetached(action);
}
-}} // namespace
+} // namespace
diff --git a/src/sensor.h b/src/sensor.h
index bc448c6..8efb7a3 100644
--- a/src/sensor.h
+++ b/src/sensor.h
@@ -30,7 +30,6 @@ SOFTWARE.
#include <QScreen>
-namespace mlde {
namespace lead {
@@ -51,4 +50,4 @@ private:
};
-}} // namespace
+} // namespace