aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/libLumina/LuminaUtils.cpp32
-rw-r--r--src-qt5/core/libLumina/themes/Glass.qss.template4
-rw-r--r--src-qt5/core/lumina-desktop/JsonMenu.h79
-rw-r--r--src-qt5/core/lumina-desktop/LDesktop.cpp12
-rw-r--r--src-qt5/core/lumina-desktop/LPanel.cpp29
-rw-r--r--src-qt5/core/lumina-desktop/LPanel.h2
-rw-r--r--src-qt5/core/lumina-desktop/defaults/defaultapps.conf1
-rw-r--r--src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpgbin0 -> 4005674 bytes
-rw-r--r--src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpgbin3237484 -> 0 bytes
-rw-r--r--src-qt5/core/lumina-desktop/defaults/desktopsettings.conf1
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf (renamed from src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf)9
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf2
-rw-r--r--src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys6
-rw-r--r--src-qt5/core/lumina-desktop/lumina-desktop.pro21
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/NewPP.h2
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp29
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h3
17 files changed, 190 insertions, 42 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp
index 72b451ab..76d61f8d 100644
--- a/src-qt5/core/libLumina/LuminaUtils.cpp
+++ b/src-qt5/core/libLumina/LuminaUtils.cpp
@@ -34,22 +34,26 @@ inline QStringList ProcessRun(QString cmd, QStringList args){
proc.setProcessEnvironment(env);
proc.setProcessChannelMode(QProcess::MergedChannels);
if(args.isEmpty()){
- proc.start(cmd);
+ proc.start(cmd, QIODevice::ReadOnly);
}else{
- proc.start(cmd,args);
+ proc.start(cmd,args ,QIODevice::ReadOnly);
}
- while(!proc.waitForFinished(500)){
+ QString info;
+ while(!proc.waitForFinished(1000)){
if(proc.state() == QProcess::NotRunning){ break; } //somehow missed the finished signal
+ QString tmp = proc.readAllStandardOutput();
+ if(tmp.isEmpty()){ proc.terminate(); }
+ else{ info.append(tmp); }
}
out[0] = QString::number(proc.exitCode());
- out[1] = QString(proc.readAllStandardOutput());
+ out[1] = info+QString(proc.readAllStandardOutput());
return out;
}
//=============
// LUtils Functions
//=============
QString LUtils::LuminaDesktopVersion(){
- QString ver = "0.9.1-devel";
+ QString ver = "1.0.0-Devel";
#ifdef GIT_VERSION
ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) );
#endif
@@ -1008,30 +1012,35 @@ void ResizeMenu::mouseMoveEvent(QMouseEvent *ev){
// since the window will be moved again the next time it is shown
// The "-2" in the sizing below accounts for the menu margins
QPoint gpos = this->mapToGlobal(ev->pos());
+ bool handled = false;
switch(resizeSide){
case TOP:
if(gpos.y() >= geom.bottom()-1){ break; }
geom.setTop(gpos.y());
this->setGeometry(geom);
- if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); }
+ if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));}
+ handled = true;
break;
case BOTTOM:
if(gpos.y() <= geom.top()+1){ break; }
geom.setBottom( gpos.y());
this->setGeometry(geom);
- if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); }
+ if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));}
+ handled = true;
break;
case LEFT:
if(gpos.x() >= geom.right()-1){ break; }
geom.setLeft(gpos.x());
this->setGeometry(geom);
- if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); }
+ if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));}
+ handled = true;
break;
case RIGHT:
if(gpos.x() <= geom.left()+1){ break; }
geom.setRight(gpos.x());
this->setGeometry(geom);
- if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); }
+ if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));}
+ handled = true;
break;
default: //NONE
//qDebug() << " - Mouse At:" << ev->pos();
@@ -1042,7 +1051,7 @@ void ResizeMenu::mouseMoveEvent(QMouseEvent *ev){
else if(ev->pos().y() >= this->height()-1 && ev->pos().y() <= this->height()+1){ this->setCursor(Qt::SizeVerCursor); }
else{ this->setCursor(Qt::ArrowCursor); }
}
- QMenu::mouseMoveEvent(ev); //do normal processing as well
+ if(!handled){ QMenu::mouseMoveEvent(ev); } //do normal processing as well
}
void ResizeMenu::mousePressEvent(QMouseEvent *ev){
@@ -1054,11 +1063,12 @@ void ResizeMenu::mousePressEvent(QMouseEvent *ev){
else if(ev->pos().y()<=1 && ev->pos().y() >= -1){ resizeSide = TOP; used = true; }
else if(ev->pos().y() >= this->height()-1 && ev->pos().y() <= this->height()+1){ resizeSide = BOTTOM; used = true; }
}
- if(used){ ev->accept(); }
+ if(used){ ev->accept(); this->grabMouse(); }
else{ QMenu::mousePressEvent(ev); } //do normal processing
}
void ResizeMenu::mouseReleaseEvent(QMouseEvent *ev){
+ this->releaseMouse();
if(ev->button() == Qt::LeftButton && resizeSide!=NONE ){
//qDebug() << "Mouse Release Event:" << ev->pos() << resizeSide;
resizeSide = NONE;
diff --git a/src-qt5/core/libLumina/themes/Glass.qss.template b/src-qt5/core/libLumina/themes/Glass.qss.template
index f3c25ec4..827d8de4 100644
--- a/src-qt5/core/libLumina/themes/Glass.qss.template
+++ b/src-qt5/core/libLumina/themes/Glass.qss.template
@@ -473,6 +473,10 @@ QWidget#LuminaBootSplash{
border-radius: 5px;
}
+LDPlugin#applauncher{
+ background-color: transparent;
+ border: none;
+}
LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{
background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(234, 236, 243, 30), stop:1 rgba(229, 229, 229, 70));
border-width: 3px;
diff --git a/src-qt5/core/lumina-desktop/JsonMenu.h b/src-qt5/core/lumina-desktop/JsonMenu.h
new file mode 100644
index 00000000..87377a73
--- /dev/null
+++ b/src-qt5/core/lumina-desktop/JsonMenu.h
@@ -0,0 +1,79 @@
+//===========================================
+// Lumina Desktop source code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This menu is used to automatically generate menu contents
+// based on the JSON output of an external script/utility
+//===========================================
+#ifndef _LUMINA_DESKTOP_JSON_MENU_H
+#define _LUMINA_DESKTOP_JSON_MENU_H
+
+#include <QMenu>
+#include <QString>
+#include <QJsonDocument>
+#include <QJsonObject>
+#include <QJsonArray>
+
+#include <LuminaUtils.h>
+#include <LuminaXDG.h>
+#include "LSession.h"
+
+class JsonMenu : public QMenu{
+ Q_OBJECT
+private:
+ QString exec;
+
+public:
+ JsonMenu(QString execpath, QWidget *parent = 0) : QMenu(parent){
+ exec = execpath;
+ connect(this, SIGNAL(aboutToShow()), this, SLOT(updateMenu()) );
+ connect(this, SIGNAL(triggered(QAction*)), this, SLOT(itemTriggered(QAction*)) );
+ }
+
+private slots:
+ void parseObject(QString label, QJsonObject obj){
+ if( label.isEmpty() || !obj.contains("type") ){ return; }
+ QString type = obj.value("type").toString();
+ if(type.toLower()=="item"){
+ QAction *act = this->addAction(label);
+ if(obj.contains("icon")){ act->setIcon( LXDG::findIcon(obj.value("icon").toString(),"") ); }
+ if(obj.contains("action")){ act->setWhatsThis( obj.value("action").toString() ); }
+ else{ act->setEnabled(false); } //not interactive
+ }else if(type.toLower()=="menu"){
+
+ }else if(type.toLower()=="jsonmenu"){
+ //This is a recursive JSON menu object
+ if(!obj.contains("exec")){ return; }
+ JsonMenu *menu = new JsonMenu(obj.value("exec").toString(), this);
+ menu->setTitle(label);
+ if(obj.contains("icon")){ menu->setIcon(LXDG::findIcon(obj.value("icon").toString(),"") ); }
+ this->addMenu(menu);
+ }
+ }
+
+ void updateMenu(){
+ this->clear();
+ QJsonDocument doc = QJsonDocument::fromJson( LUtils::getCmdOutput(exec).join(" ").toLocal8Bit() );
+ if(doc.isNull() || !doc.isObject()){
+ this->addAction( QString(tr("Error parsing script output: %1")).arg("\n"+exec) )->setEnabled(false);
+ }else{
+ QStringList keys = doc.object().keys();
+ for(int i=0; i<keys.length(); i++){
+ if(doc.object().value(keys[i]).isObject()){
+ parseObject(keys[i], doc.object().value(keys[i]).toObject());
+ }
+ }
+ }
+ }
+
+ void itemTriggered(QAction *act){
+ if(act->parent()!=this || act->whatsThis().isEmpty() ){ return; } //only handle direct child actions - needed for recursive nature of menu
+ QString cmd = act->whatsThis();
+ QString bin = cmd.section(" ",0,0);
+ if( !LUtils::isValidBinary(bin) ){ cmd.prepend("lumina-open "); }
+ LSession::handle()->LaunchApplication(cmd);
+ }
+};
+#endif
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp
index 772ead8a..c759d641 100644
--- a/src-qt5/core/lumina-desktop/LDesktop.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktop.cpp
@@ -10,6 +10,7 @@
#include <LuminaOS.h>
#include <LuminaX11.h>
#include "LWinInfo.h"
+#include "JsonMenu.h"
#define DEBUG 0
@@ -291,6 +292,17 @@ void LDesktop::UpdateMenu(bool fast){
}else{
qDebug() << "Could not load application file:" << file;
}
+ }else if(items[i].startsWith("jsonmenu::::")){
+ //Custom JSON menu system (populated on demand via external scripts/tools
+ QStringList info = items[i].split("::::"); //FORMAT:[ "jsonmenu",exec,name, icon(optional)]
+ if(info.length()>=3){
+ qDebug() << "Custom JSON Menu Loaded:" << info;
+ JsonMenu *tmp = new JsonMenu(info[1], deskMenu);
+ tmp->setTitle(info[2]);
+ connect(tmp, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) );
+ if(info.length()>=4){ tmp->setIcon( LXDG::findIcon(info[3],"") ); }
+ deskMenu->addMenu(tmp);
+ }
}
}
//Now add the system quit options
diff --git a/src-qt5/core/lumina-desktop/LPanel.cpp b/src-qt5/core/lumina-desktop/LPanel.cpp
index 7c0630f5..55ec5469 100644
--- a/src-qt5/core/lumina-desktop/LPanel.cpp
+++ b/src-qt5/core/lumina-desktop/LPanel.cpp
@@ -13,6 +13,7 @@
LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
//Take care of inputs
this->setMouseTracking(true);
+ hascompositer = false; //LUtils::isValidBinary("xcompmgr"); //NOT WORKING YET - xcompmgr issue with special window flags?
if(DEBUG){ qDebug() << " - Creating Panel:" << scr << num; }
bgWindow = parent; //save for later
//Setup the widget overlay for the entire panel to provide transparency effects
@@ -42,7 +43,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
this->setWindowTitle("LuminaPanel");
this->setObjectName("LuminaPanelBackgroundWidget");
- this->setStyleSheet("QToolButton::menu-indicator{ image: none; }");
+ this->setStyleSheet("QToolButton::menu-indicator{ image: none; } QWidget#LuminaPanelBackgroundWidget{ background: transparent; }");
panelArea->setObjectName("LuminaPanelColor");
layout = new QBoxLayout(QBoxLayout::LeftToRight);
layout->setContentsMargins(0,0,0,0);
@@ -53,7 +54,11 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
this->show();
LSession::handle()->XCB->SetAsPanel(this->winId());
LSession::handle()->XCB->SetAsSticky(this->winId());
-
+ if(hascompositer){
+ //qDebug() << "Enable Panel compositing";
+ this->setWindowOpacity(0.0); //fully transparent background for the main widget
+ panelArea->setWindowOpacity(0.0);
+ }
QTimer::singleShot(1,this, SLOT(UpdatePanel()) ); //start this in a new thread
//connect(screen, SIGNAL(resized(int)), this, SLOT(UpdatePanel()) ); //in case the screen resolution changes
}
@@ -309,15 +314,17 @@ void LPanel::checkPanelFocus(){
// PROTECTED
//===========
void LPanel::paintEvent(QPaintEvent *event){
- QPainter *painter = new QPainter(this);
- //qDebug() << "Paint Tray:";
- //Make sure the base background of the event rectangle is the associated rectangle from the BGWindow
- QRect rec = this->geometry(); //start with the global geometry of the panel
- //Need to translate that rectangle to the background image coordinates
- //qDebug() << " - Rec:" << rec << hidden << this->geometry();
- rec.moveTo( rec.x()-LSession::handle()->screenGeom(screennum).x(), rec.y() );
- //qDebug() << " - Adjusted Global Rec:" << rec;
- painter->drawPixmap(QRect(0,0,this->width(), this->height()), bgWindow->grab(rec) );
+ if(!hascompositer){
+ QPainter *painter = new QPainter(this);
+ //qDebug() << "Paint Tray:";
+ //Make sure the base background of the event rectangle is the associated rectangle from the BGWindow
+ QRect rec = this->geometry(); //start with the global geometry of the panel
+ //Need to translate that rectangle to the background image coordinates
+ //qDebug() << " - Rec:" << rec << hidden << this->geometry();
+ rec.moveTo( rec.x()-LSession::handle()->screenGeom(screennum).x(), rec.y() );
+ //qDebug() << " - Adjusted Global Rec:" << rec;
+ painter->drawPixmap(QRect(0,0,this->width(), this->height()), bgWindow->grab(rec) );
+ }
QWidget::paintEvent(event); //now pass the event along to the normal painting event
}
diff --git a/src-qt5/core/lumina-desktop/LPanel.h b/src-qt5/core/lumina-desktop/LPanel.h
index 396ffecc..b3c9ba60 100644
--- a/src-qt5/core/lumina-desktop/LPanel.h
+++ b/src-qt5/core/lumina-desktop/LPanel.h
@@ -36,7 +36,7 @@ private:
QDesktopWidget *screen;
QWidget *bgWindow, *panelArea;
QPoint hidepoint, showpoint; //for hidden panels: locations when hidden/visible
- bool defaultpanel, horizontal, hidden;
+ bool defaultpanel, horizontal, hidden, hascompositer;
int screennum;
int panelnum;
int viswidth;
diff --git a/src-qt5/core/lumina-desktop/defaults/defaultapps.conf b/src-qt5/core/lumina-desktop/defaults/defaultapps.conf
deleted file mode 100644
index 8b137891..00000000
--- a/src-qt5/core/lumina-desktop/defaults/defaultapps.conf
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg
new file mode 100644
index 00000000..de11074e
--- /dev/null
+++ b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg
Binary files differ
diff --git a/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg b/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg
deleted file mode 100644
index 80c3cf02..00000000
--- a/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg
+++ /dev/null
Binary files differ
diff --git a/src-qt5/core/lumina-desktop/defaults/desktopsettings.conf b/src-qt5/core/lumina-desktop/defaults/desktopsettings.conf
deleted file mode 100644
index 8b137891..00000000
--- a/src-qt5/core/lumina-desktop/defaults/desktopsettings.conf
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
index 3d434501..f3f4a7bc 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
@@ -64,17 +64,10 @@ desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop
panel1_location=bottom #[top/bottom/left/right] Screen edge the panel should be on
panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or <number>%[W/H] for a percentage of the screen width/height)
panel1_autohide=false #[true/false] Have the panel become visible on mouse-over
-panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock #list of plugins for the panel
+panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel
panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels
panel1_edgepercent=99 #[1->100] percentage of the screen edge to use
-panel2_location=top
-panel2_pixelsize=3%H
-panel2_autohide=true
-panel2_plugins=spacer, desktopbar, spacer
-panel2_pinlocation=center
-panel2_edgepercent=10
-
#MENU SETTINGS (right-click menu)
menu_plugins=terminal, filemanager, applications, line, settings #list of menu plugins to show
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
index 68ea1f3c..7f8e363c 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
@@ -64,7 +64,7 @@ desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop
panel1_location=bottom #[top/bottom/left/right] Screen edge the panel should be on
panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or <number>%[W/H] for a percentage of the screen width/height)
panel1_autohide=false #[true/false] Have the panel become visible on mouse-over
-panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock #list of plugins for the panel
+panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel
panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels
panel1_edgepercent=99 #[1->100] percentage of the screen edge to use
diff --git a/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys b/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys
index 21027f4c..c3bafdaf 100644
--- a/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys
+++ b/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys
@@ -47,8 +47,10 @@ OnTitlebar Mouse2 :Lower
OnTitlebar Mouse3 :WindowMenu
# alt-tab
-Mod1 Tab :NextWindow {groups} (workspace=[current]) (workspace=[current]) !! FBCV13 !!
-Mod1 Shift Tab :PrevWindow {groups} (workspace=[current]) (workspace=[current]) !! FBCV13 !!
+Mod1 Tab :NextWindow (workspace=[current]) (workspace=[current]) !! FBCV13 !!
+Mod1 Shift Tab :PrevWindow (workspace=[current]) (workspace=[current]) !! FBCV13 !!
+Control Tab :NextGroup (workspace=[current]) (workspace=[current])
+Control Shift Tab :PrevGroup (workspace=[current]) (workspace=[current])
# cycle through tabs in the current window
Mod4 Tab :NextTab
diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro
index 33c20502..7b0e5250 100644
--- a/src-qt5/core/lumina-desktop/lumina-desktop.pro
+++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro
@@ -27,7 +27,7 @@ SOURCES += main.cpp \
SettingsMenu.cpp \
SystemWindow.cpp \
BootSplash.cpp \
- desktop-plugins/LDPlugin.cpp \
+ desktop-plugins/LDPlugin.cpp
HEADERS += Globals.h \
@@ -48,6 +48,7 @@ HEADERS += Globals.h \
panel-plugins/LTBWidget.h \
desktop-plugins/LDPlugin.h \
desktop-plugins/NewDP.h \
+ JsonMenu.h
FORMS += SystemWindow.ui \
BootSplash.ui
@@ -87,12 +88,22 @@ defaults.path = $${L_SHAREDIR}/lumina-desktop/
conf.path = $${L_ETCDIR}
-#Now do any TrueOS defaults (if set)
-PCBSD{
- conf.extra = cp defaults/luminaDesktop.pcbsd.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
- defaults.extra = cp defaults/desktop-background.pcbsd.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
+#Now do any OS-specific defaults (if available)
+#First see if there is a known OS override first
+!isEmpty(DEFAULT_SETTINGS){
+ message("Installing defaults settings for OS: $${DEFAULT_SETTINGS}")
+ OS=$${DEFAULT_SETTINGS}
+}
+exists("defaults/luminaDesktop-$${OS}.conf"){
+ message(" -- Found OS-specific system config file: $${OS}");
+ conf.extra = cp defaults/luminaDesktop-$${OS}.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
}else{
conf.extra = cp defaults/luminaDesktop.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
+}
+exists("defaults/desktop-background-$${OS}.jpg"){
+ message(" -- Found OS-specific background image: $${OS}");
+ defaults.extra = cp defaults/desktop-background-$${OS}.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
+}else{
defaults.extra = cp defaults/desktop-background.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
}
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h b/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h
index 50bf2232..2641ad79 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h
+++ b/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h
@@ -50,7 +50,7 @@ public:
plug = new LSysTray(parent, plugin, horizontal);
}else if(plugin.startsWith("desktopswitcher---")){
plug = new LDesktopSwitcher(parent, plugin, horizontal);
- }else if(plugin.startsWith("battery---")){
+ }else if(plugin.startsWith("battery---") && LOS::hasBattery()){
plug = new LBattery(parent, plugin, horizontal);
}else if(plugin.startsWith("clock---")){
plug = new LClock(parent, plugin, horizontal);
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
index 7e2e53de..0dd68bb0 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
@@ -157,6 +157,12 @@ void LTaskButton::UpdateMenus(){
}
}
actMenu->addAction( LXDG::findIcon("window-close",""), tr("Close Window"), this, SLOT(closeWindow()) );
+ if(WINLIST.length()>1 && !winMenu->isVisible()){
+ actMenu->addSeparator();
+ actMenu->addAction( LXDG::findIcon("layer-visible-on",""), tr("Show All Windows"), this, SLOT(showAllWindows()) );
+ actMenu->addAction( LXDG::findIcon("layer-visible-off",""), tr("Minimize All Windows"), this, SLOT(hideAllWindows()) );
+ actMenu->addAction( LXDG::findIcon("window-close",""), tr("Close All Windows"), this, SLOT(closeAllWindows()) );
+ }
}
//=============
@@ -196,6 +202,29 @@ void LTaskButton::minimizeWindow(){
QTimer::singleShot(100, this, SLOT(UpdateButton()) ); //make sure to update this button if losing active status
}
+void LTaskButton::showAllWindows(){
+ for(int i=WINLIST.length()-1; i>=0; i--){
+ if(WINLIST[i].status()==LXCB::INVISIBLE){
+ LSession::handle()->XCB->RestoreWindow(WINLIST[i].windowID());
+ }
+ }
+}
+
+void LTaskButton::hideAllWindows(){
+ for(int i=WINLIST.length()-1; i>=0; i--){
+ LXCB::WINDOWVISIBILITY state = WINLIST[i].status();
+ if(state==LXCB::VISIBLE || state==LXCB::ACTIVE){
+ LSession::handle()->XCB->MinimizeWindow(WINLIST[i].windowID());
+ }
+ }
+}
+
+void LTaskButton::closeAllWindows(){
+ for(int i=WINLIST.length()-1; i>=0; i--){
+ LSession::handle()->XCB->CloseWindow(WINLIST[i].windowID());
+ }
+}
+
void LTaskButton::triggerWindow(){
LWinInfo win = currentWindow();
//Check which state the window is currently in and flip it to the other
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h
index 43dbaa90..6b171c6a 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h
+++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h
@@ -60,6 +60,9 @@ private slots:
void closeWindow(); //send the signal to close a window
void maximizeWindow(); //send the signal to maximize/restore a window
void minimizeWindow(); //send the signal to minimize a window (iconify)
+ void showAllWindows();
+ void hideAllWindows();
+ void closeAllWindows();
void triggerWindow(); //change b/w visible and invisible
void winClicked(QAction*);
void openActionMenu();
bgstack15