From f7e5fc2a5fc9795fa7cc3203d133d2eb5b1d09a5 Mon Sep 17 00:00:00 2001 From: q5sys Date: Tue, 28 Jun 2016 10:28:45 -0400 Subject: Add files via upload --- .../defaults/desktop-background-trueos.jpg | Bin 0 -> 4005674 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src-qt5/core/lumina-desktop/defaults/desktop-background-trueos.jpg (limited to 'src-qt5/core/lumina-desktop') 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 Binary files /dev/null and b/src-qt5/core/lumina-desktop/defaults/desktop-background-trueos.jpg differ -- cgit From 89cf83b31069cd3358ef31083faaa717f551eec9 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 28 Jun 2016 11:22:58 -0400 Subject: Commit some WIP (but disabled) to get the panels using the compositing WM for transparency effects (issues with xcompmgr at the moment?). --- src-qt5/core/lumina-desktop/LPanel.cpp | 29 ++++++++++++++--------- src-qt5/core/lumina-desktop/LPanel.h | 2 +- src-qt5/core/lumina-desktop/panel-plugins/NewPP.h | 2 +- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'src-qt5/core/lumina-desktop') 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/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); -- cgit From 2979715098badeeedca5709817d7944ca16d2d69 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 28 Jun 2016 12:50:54 -0400 Subject: Cleanup the build system for how the special OS-specific config file/wallpaper are added into the build. This now means that we can commit any generic *-${OS}.[jpg/conf] here to the defaults directory and it will automatically get pulled in at build time. --- .../core/lumina-desktop/defaults/defaultapps.conf | 1 - .../defaults/desktop-background-TrueOS.jpg | Bin 0 -> 4005674 bytes .../defaults/desktop-background-trueos.jpg | Bin 4005674 -> 0 bytes .../defaults/desktop-background.pcbsd.jpg | Bin 3237484 -> 0 bytes .../lumina-desktop/defaults/desktopsettings.conf | 1 - .../defaults/luminaDesktop-TrueOS.conf | 98 +++++++++++++++++++ .../lumina-desktop/defaults/luminaDesktop.conf | 2 +- .../defaults/luminaDesktop.pcbsd.conf | 105 --------------------- src-qt5/core/lumina-desktop/lumina-desktop.pro | 18 +++- 9 files changed, 113 insertions(+), 112 deletions(-) delete mode 100644 src-qt5/core/lumina-desktop/defaults/defaultapps.conf create mode 100644 src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg delete mode 100644 src-qt5/core/lumina-desktop/defaults/desktop-background-trueos.jpg delete mode 100644 src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg delete mode 100644 src-qt5/core/lumina-desktop/defaults/desktopsettings.conf create mode 100644 src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf delete mode 100644 src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf (limited to 'src-qt5/core/lumina-desktop') 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 Binary files /dev/null and b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg differ diff --git a/src-qt5/core/lumina-desktop/defaults/desktop-background-trueos.jpg b/src-qt5/core/lumina-desktop/defaults/desktop-background-trueos.jpg deleted file mode 100644 index de11074e..00000000 Binary files a/src-qt5/core/lumina-desktop/defaults/desktop-background-trueos.jpg and /dev/null 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 Binary files a/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg and /dev/null 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-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf new file mode 100644 index 00000000..f3f4a7bc --- /dev/null +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -0,0 +1,98 @@ +#This is the configuration file that generates all the default settings files for the Lumina desktop +# For any setting that can take a list of values, each vale needs to be seperated by a comma and a space (", ") +# Example: some_setting=item1, item2, item3 + +#NOTE: To pre-setup default applications for particular mime-types, you need to create *.desktop entries on +# system corresponding to the XDG mime-type specifications for default applications +# See Here for specifications: http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/ + +# Possible Desktop Plugins (Lumina version 0.9.1): +# calendar, applauncher[::absolute path to *.desktop file], desktopview, notepad, audioplayer, rssreader +# Possible Panel Plugins (Lumina version 0.9.1): +# userbutton, desktopbar, spacer, desktopswitcher, battery, clock, systemdashboard, systemstart +# taskmanager[-nogroups], systemtray, homebutton, appmenu, applauncher[::absolute path to *.desktop file] +# Possible Menu Plugins (Lumina version 0.9.1): +# terminal, filemanager, applications, line, settings, windowlist, app:: + +#GENERAL SESSION SETTINGS +session_enablenumlock=false #[true/false] Enable numlock on login using "numlockx" +session_playloginaudio=true #[true/false] Play the audio chimes on log in +session_playlogoutaudio=true #[true/false] Play the audio chimes on log out + +# DEFAULT UTILITIES +# Provide the full path to *.desktop file, or a binary name which exists on PATH +# *.desktop files provide better support for input formats, and are recommended +#Note: the last "ifexists" entry has the highest priority for each session utility +session_default_terminal_ifexists=xterm.desktop +session_default_terminal_ifexists=lumina-terminal.desktop +session_default_filemanager=lumina-fm.desktop +session_default_webbrowser_ifexists=chromium-browser.desktop +session_default_webbrowser_ifexists=firefox.desktop +session_default_webbrowser_ifexists=qupzilla.desktop +session_default_email_ifexists=trojita.desktop + +#DEFAULT UTILITIES FOR INDIVIDUAL MIME TYPES +# Format: mime_default_[_ifexists]=<*.desktop file> +mime_default_text/*_ifexists=lumina-textedit.desktop +mime_default_audio/*_ifexists=vlc.desktop +mime_default_video/*_ifexists=vlc.desktop +mime_default_application/zip_ifexists=peazip.desktop +mime_default_application/x-compressed-tar_ifexists=peazip.desktop +mime_default_application/x-bzip-compressed-tar_ifexists=peazip.desktop +mime_default_application/x-lrzip-compressed-tar_ifexists=peazip.desktop +mime_default_application/x-lzma-compressed-tar_ifexists=peazip.desktop +mime_default_application/x-xz-compressed-tar_ifexists=peazip.desktop +mime_default_application/x-tar_ifexists=peazip.desktop +mime_default_unknown/*=lumina-textedit.desktop +mime_default_application/x-shellscript=lumina-textedit.desktop + +#THEME SETTINGS +theme_themefile=Glass #Name of the theme to use (disable for Lumina-Default) +theme_colorfile=Grey-Dark #Name of the color spec file to use for theming +theme_iconset=oxygen #Name of the icon theme to use +theme_font=Arial #Name of the font family to use +theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (%) ) + +#DESKTOP SETTINGS (used for the primary screen in multi-screen setups) +desktop_visiblepanels=2 #[0 - 12] The number of panels visible by default +#desktop.backgroundfiles= #list of absolute file paths for image files (disable for Lumina default) +desktop_backgroundrotateminutes=5 #[positive integer] number of minutes between background rotations (if multiple files) +desktop_plugins=rssreader #list of plugins to be shown on the desktop by default +desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop items + +#PANEL SETTINGS (preface with panel1. or panel2., depending on the number of panels you have visible by default) +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 %[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, 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 + +#MENU SETTINGS (right-click menu) +menu_plugins=terminal, filemanager, applications, line, settings #list of menu plugins to show + +#FAVORITES CUSTOMIZATION +#favorites_add= #Create a favorites entry for this file/dir +#favorites_remove= #Remove a favorites entry for this file/dir +#favorites_add_ifexists= #Create a favorites entry for this file/dir if the file/dir exists +favorites_add_ifexists=firefox.desktop +favorites_add_ifexists=chromium-browser.desktop +favorites_add_ifexists=qupzilla.desktop +favorites_add_ifexists=thunderbird.desktop +favorites_add_ifexists=trojita.desktop +favorites_add_ifexists=smplayer.desktop +favorites_add_ifexists=vlc.desktop +favorites_add_ifexists=pithos.desktop +favorites_add_ifexists=~/Documents +favorites_add_ifexists=~/Downloads +favorites_add_ifexists=~/Pictures +favorites_add_ifexists=~/Videos + +#QUICKLAUNCH CUSTOMIZATION (requires the use of the "systemstart" panel plugin) +#quicklaunch_add= #Create a quicklaunch shortcut for this file/dir +#quicklaunch_add_ifexists= #Create a quicklaunch shortcut for this file/dir if the file/dir exists + +#Generic scripts/utilities to run for any additional setup procedures +# These are always run after all other settings are saved +#Format: usersetup_run= +usersetup_run=xdg-user-dirs-update 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 %[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/defaults/luminaDesktop.pcbsd.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf deleted file mode 100644 index 3d434501..00000000 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf +++ /dev/null @@ -1,105 +0,0 @@ -#This is the configuration file that generates all the default settings files for the Lumina desktop -# For any setting that can take a list of values, each vale needs to be seperated by a comma and a space (", ") -# Example: some_setting=item1, item2, item3 - -#NOTE: To pre-setup default applications for particular mime-types, you need to create *.desktop entries on -# system corresponding to the XDG mime-type specifications for default applications -# See Here for specifications: http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/ - -# Possible Desktop Plugins (Lumina version 0.9.1): -# calendar, applauncher[::absolute path to *.desktop file], desktopview, notepad, audioplayer, rssreader -# Possible Panel Plugins (Lumina version 0.9.1): -# userbutton, desktopbar, spacer, desktopswitcher, battery, clock, systemdashboard, systemstart -# taskmanager[-nogroups], systemtray, homebutton, appmenu, applauncher[::absolute path to *.desktop file] -# Possible Menu Plugins (Lumina version 0.9.1): -# terminal, filemanager, applications, line, settings, windowlist, app:: - -#GENERAL SESSION SETTINGS -session_enablenumlock=false #[true/false] Enable numlock on login using "numlockx" -session_playloginaudio=true #[true/false] Play the audio chimes on log in -session_playlogoutaudio=true #[true/false] Play the audio chimes on log out - -# DEFAULT UTILITIES -# Provide the full path to *.desktop file, or a binary name which exists on PATH -# *.desktop files provide better support for input formats, and are recommended -#Note: the last "ifexists" entry has the highest priority for each session utility -session_default_terminal_ifexists=xterm.desktop -session_default_terminal_ifexists=lumina-terminal.desktop -session_default_filemanager=lumina-fm.desktop -session_default_webbrowser_ifexists=chromium-browser.desktop -session_default_webbrowser_ifexists=firefox.desktop -session_default_webbrowser_ifexists=qupzilla.desktop -session_default_email_ifexists=trojita.desktop - -#DEFAULT UTILITIES FOR INDIVIDUAL MIME TYPES -# Format: mime_default_[_ifexists]=<*.desktop file> -mime_default_text/*_ifexists=lumina-textedit.desktop -mime_default_audio/*_ifexists=vlc.desktop -mime_default_video/*_ifexists=vlc.desktop -mime_default_application/zip_ifexists=peazip.desktop -mime_default_application/x-compressed-tar_ifexists=peazip.desktop -mime_default_application/x-bzip-compressed-tar_ifexists=peazip.desktop -mime_default_application/x-lrzip-compressed-tar_ifexists=peazip.desktop -mime_default_application/x-lzma-compressed-tar_ifexists=peazip.desktop -mime_default_application/x-xz-compressed-tar_ifexists=peazip.desktop -mime_default_application/x-tar_ifexists=peazip.desktop -mime_default_unknown/*=lumina-textedit.desktop -mime_default_application/x-shellscript=lumina-textedit.desktop - -#THEME SETTINGS -theme_themefile=Glass #Name of the theme to use (disable for Lumina-Default) -theme_colorfile=Grey-Dark #Name of the color spec file to use for theming -theme_iconset=oxygen #Name of the icon theme to use -theme_font=Arial #Name of the font family to use -theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (%) ) - -#DESKTOP SETTINGS (used for the primary screen in multi-screen setups) -desktop_visiblepanels=2 #[0 - 12] The number of panels visible by default -#desktop.backgroundfiles= #list of absolute file paths for image files (disable for Lumina default) -desktop_backgroundrotateminutes=5 #[positive integer] number of minutes between background rotations (if multiple files) -desktop_plugins=rssreader #list of plugins to be shown on the desktop by default -desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop items - -#PANEL SETTINGS (preface with panel1. or panel2., depending on the number of panels you have visible by default) -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 %[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_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 - -#FAVORITES CUSTOMIZATION -#favorites_add= #Create a favorites entry for this file/dir -#favorites_remove= #Remove a favorites entry for this file/dir -#favorites_add_ifexists= #Create a favorites entry for this file/dir if the file/dir exists -favorites_add_ifexists=firefox.desktop -favorites_add_ifexists=chromium-browser.desktop -favorites_add_ifexists=qupzilla.desktop -favorites_add_ifexists=thunderbird.desktop -favorites_add_ifexists=trojita.desktop -favorites_add_ifexists=smplayer.desktop -favorites_add_ifexists=vlc.desktop -favorites_add_ifexists=pithos.desktop -favorites_add_ifexists=~/Documents -favorites_add_ifexists=~/Downloads -favorites_add_ifexists=~/Pictures -favorites_add_ifexists=~/Videos - -#QUICKLAUNCH CUSTOMIZATION (requires the use of the "systemstart" panel plugin) -#quicklaunch_add= #Create a quicklaunch shortcut for this file/dir -#quicklaunch_add_ifexists= #Create a quicklaunch shortcut for this file/dir if the file/dir exists - -#Generic scripts/utilities to run for any additional setup procedures -# These are always run after all other settings are saved -#Format: usersetup_run= -usersetup_run=xdg-user-dirs-update diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 33c20502..4bf38a08 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -87,12 +87,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 +TRUEOS{ + message("Installing defaults for OS: TrueOS") + OS=TrueOS +} +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 } -- cgit From c1ef1645eb0ca856f5f5cb6c4acb9fc1115ca88f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 28 Jun 2016 13:14:39 -0400 Subject: Update the coming-soon 0.9.1 port makefile for FreeBSD, and also setup the "DEFAULT_SETTINGS=" build flag for installing config files or desktop wallpapers for other OS's. --- src-qt5/core/lumina-desktop/lumina-desktop.pro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 4bf38a08..4cebf3de 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -89,9 +89,9 @@ conf.path = $${L_ETCDIR} #Now do any OS-specific defaults (if available) #First see if there is a known OS override first -TRUEOS{ - message("Installing defaults for OS: TrueOS") - OS=TrueOS +!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}"); -- cgit From f87756b90a21841200513dfc4db4bfac86b03f82 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 29 Jun 2016 12:25:51 -0400 Subject: Add Control+[shift]+Tab shortcuts for cycling between open windows in grouped-order rather than open order (alt+[shift]+tab will do open order). --- src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src-qt5/core/lumina-desktop') 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 -- cgit From ec1e0ce441081627b53733cdf0981af13c25bbc1 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 29 Jun 2016 14:29:00 -0400 Subject: Add options for grouped windows in the task manager: Show All Windows Minimize All Windows Close All Windows --- .../panel-plugins/taskmanager/LTaskButton.cpp | 29 ++++++++++++++++++++++ .../panel-plugins/taskmanager/LTaskButton.h | 3 +++ 2 files changed, 32 insertions(+) (limited to 'src-qt5/core/lumina-desktop') 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(); -- cgit From 1fc459836734c564aec5e92f9f4adaa29aa8178f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 29 Jun 2016 17:28:54 -0400 Subject: Add a new type of menu plugin: jsonmenu This is a recursive, auto-generating menu which runs an external utility (a script of some kind usually), which generates a JSON document/object which is used to populate the menu. Syntax: (Per object) { "type" : "item", "icon" : "icon name (optional)", "action" : "something lumina-open can run (optional)" } Or for a recursive menu generation { "type" : "jsonmenu", "exec" : "some command to run to populate menu", "icon" : "icon name (optional)" } Example for a full return: { "Item1" : { "type" : "item", "icon" : "folder", "action" : "~/item1.jpg" }, "Menu1" : { "type" : "jsonmenu", "exec" : "some script", "icon" : "system-run" } } Item1 will open ~/item1.jpg with lumina-open when clicked, while Menu1 will call "some script" to generate a new menu with additional options. } --- src-qt5/core/lumina-desktop/JsonMenu.h | 68 ++++++++++++++++++++++++++ src-qt5/core/lumina-desktop/LDesktop.cpp | 12 +++++ src-qt5/core/lumina-desktop/lumina-desktop.pro | 3 +- 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 src-qt5/core/lumina-desktop/JsonMenu.h (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/JsonMenu.h b/src-qt5/core/lumina-desktop/JsonMenu.h new file mode 100644 index 00000000..fbb80d28 --- /dev/null +++ b/src-qt5/core/lumina-desktop/JsonMenu.h @@ -0,0 +1,68 @@ +//=========================================== +// 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 +#include +#include +#include +#include + +#include +#include + +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()) ); + } + +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 #include #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/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 4cebf3de..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 -- cgit From 702d651bad7892126fdf82499f25e6e418499366 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 30 Jun 2016 09:39:01 -0400 Subject: Finish up the new JSON recursive menu system as well as the test script for listing the contents of a directory recursively. --- src-qt5/core/lumina-desktop/JsonMenu.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/JsonMenu.h b/src-qt5/core/lumina-desktop/JsonMenu.h index fbb80d28..87377a73 100644 --- a/src-qt5/core/lumina-desktop/JsonMenu.h +++ b/src-qt5/core/lumina-desktop/JsonMenu.h @@ -18,6 +18,7 @@ #include #include +#include "LSession.h" class JsonMenu : public QMenu{ Q_OBJECT @@ -28,6 +29,7 @@ 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: @@ -50,6 +52,7 @@ private slots: this->addMenu(menu); } } + void updateMenu(){ this->clear(); QJsonDocument doc = QJsonDocument::fromJson( LUtils::getCmdOutput(exec).join(" ").toLocal8Bit() ); @@ -64,5 +67,13 @@ private slots: } } } + + 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 -- cgit