├── .gitignore ├── .tx └── config ├── 3rdparty ├── CMakeLists.txt ├── qlogind │ ├── CMakeLists.txt │ ├── spec │ │ ├── README.txt │ │ ├── org.freedesktop.login1.Manager.original │ │ ├── org.freedesktop.login1.Manager.xml │ │ ├── org.freedesktop.login1.Seat.original │ │ ├── org.freedesktop.login1.Seat.xml │ │ ├── org.freedesktop.login1.Session.original │ │ ├── org.freedesktop.login1.Session.xml │ │ ├── org.freedesktop.login1.User.original │ │ └── org.freedesktop.login1.User.xml │ ├── src │ │ ├── CMakeLists.txt │ │ ├── enhancedqdbusabstractinterface.cpp │ │ ├── enhancedqdbusabstractinterface.h │ │ ├── manager.cpp │ │ ├── manager.h │ │ ├── pendinginterface.cpp │ │ ├── pendinginterface.h │ │ ├── seat.cpp │ │ ├── seat.h │ │ ├── seattracker.cpp │ │ ├── seattracker.h │ │ ├── session.cpp │ │ ├── session.h │ │ ├── sessiontracker.cpp │ │ ├── sessiontracker.h │ │ ├── types.cpp │ │ ├── types.h │ │ ├── user.cpp │ │ ├── user.h │ │ ├── usertracker.cpp │ │ └── usertracker.h │ └── tools │ │ ├── CMakeLists.txt │ │ ├── enhancedqdbusxml2cpp.cpp │ │ └── qdbusintrospection_p.h └── sigwatch │ ├── CMakeLists.txt │ ├── LICENSE │ ├── sigwatch.cpp │ └── sigwatch.h ├── AUTHORS.md ├── BUILD.md ├── CMakeLists.txt ├── CONTRIBUTORS.md ├── DEPENDENCIES.md ├── LICENSE.GPLv2 ├── LICENSE.LGPLv2.1 ├── NOTES.md ├── README.md ├── cmake ├── FindBcmHost.cmake ├── FindMobileBroadbandProviderInfo.cmake ├── FindModemManager.cmake ├── FindNetworkManager.cmake ├── FindPAM.cmake └── GetGitRevision.cmake ├── cmake_uninstall.cmake.in ├── compositor ├── CMakeLists.txt ├── application.cpp ├── application.h ├── main.cpp ├── processlauncher │ ├── org.hawaiios.ProcessLauncher.xml │ ├── processlauncher.cpp │ └── processlauncher.h └── sessionmanager │ ├── authenticator.cpp │ ├── authenticator.h │ ├── loginmanager │ ├── fakebackend.cpp │ ├── fakebackend.h │ ├── logindbackend.cpp │ ├── logindbackend.h │ ├── logindsessioninfo.h │ ├── loginmanager.cpp │ ├── loginmanager.h │ ├── loginmanagerbackend.cpp │ └── loginmanagerbackend.h │ ├── powermanager │ ├── powermanager.cpp │ ├── powermanager.h │ ├── powermanagerbackend.cpp │ ├── powermanagerbackend.h │ ├── systemdpowerbackend.cpp │ ├── systemdpowerbackend.h │ ├── upowerpowerbackend.cpp │ └── upowerpowerbackend.h │ ├── screensaver │ ├── org.freedesktop.ScreenSaver.xml │ ├── screensaver.cpp │ └── screensaver.h │ ├── sessionmanager.cpp │ └── sessionmanager.h ├── data ├── CMakeLists.txt ├── protocols │ └── greenisland.xml ├── systemd │ ├── CMakeLists.txt │ ├── hawaii.service.in │ └── hawaii.target └── wayland-sessions │ ├── CMakeLists.txt │ └── hawaii.desktop.in ├── declarative ├── CMakeLists.txt ├── hardware │ ├── CMakeLists.txt │ ├── battery.cpp │ ├── battery.h │ ├── hardwareengine.cpp │ ├── hardwareengine.h │ ├── plugin.cpp │ ├── plugins.qmltypes │ ├── qmldir │ ├── storagedevice.cpp │ └── storagedevice.h ├── launcher │ ├── CMakeLists.txt │ ├── appidmapping_p.h │ ├── applicationaction.cpp │ ├── applicationaction.h │ ├── applicationinfo.cpp │ ├── applicationinfo.h │ ├── applicationinfo_p.h │ ├── appsmodel.cpp │ ├── appsmodel.h │ ├── appsproxymodel.cpp │ ├── appsproxymodel.h │ ├── categoriesmodel.cpp │ ├── categoriesmodel.h │ ├── launcheritem.cpp │ ├── launcheritem.h │ ├── launchermodel.cpp │ ├── launchermodel.h │ ├── menuimageprovider.cpp │ ├── menuimageprovider.h │ ├── plugin.cpp │ ├── plugins.qmltypes │ ├── processrunner.cpp │ ├── processrunner.h │ └── qmldir ├── misc │ ├── CMakeLists.txt │ ├── formats.cpp │ ├── formats.h │ ├── keyeventfilter.cpp │ ├── keyeventfilter.h │ ├── kformat.cpp │ ├── kformat.h │ ├── kformatprivate.cpp │ ├── kformatprivate_p.h │ ├── miscplugin.cpp │ ├── miscplugin.h │ ├── qmldir │ ├── standardpaths.cpp │ └── standardpaths.h ├── mixer │ ├── CMakeLists.txt │ ├── alsamixerbackend.cpp │ ├── alsamixerbackend.h │ ├── mixer.cpp │ ├── mixer.h │ ├── mixerbackend.h │ ├── mixerplugin.cpp │ ├── mixerplugin.h │ ├── plugin.qmltypes │ ├── pulseaudiomixerbackend.cpp │ ├── pulseaudiomixerbackend.h │ └── qmldir ├── mpris2 │ ├── CMakeLists.txt │ ├── mpris2engine.cpp │ ├── mpris2engine.h │ ├── mpris2player.cpp │ ├── mpris2player.h │ ├── org.freedesktop.DBus.Properties.xml │ ├── org.mpris.MediaPlayer2.Player.xml │ ├── org.mpris.MediaPlayer2.xml │ ├── plugin.cpp │ ├── plugins.qmltypes │ └── qmldir ├── networkmanager │ ├── CMakeLists.txt │ ├── appletproxymodel.cpp │ ├── appletproxymodel.h │ ├── availabledevices.cpp │ ├── availabledevices.h │ ├── connectionicon.cpp │ ├── connectionicon.h │ ├── debug.cpp │ ├── debug.h │ ├── enabledconnections.cpp │ ├── enabledconnections.h │ ├── enums.cpp │ ├── enums.h │ ├── handler.cpp │ ├── handler.h │ ├── networkitemslist.cpp │ ├── networkitemslist.h │ ├── networkmodel.cpp │ ├── networkmodel.h │ ├── networkmodelitem.cpp │ ├── networkmodelitem.h │ ├── networkstatus.cpp │ ├── networkstatus.h │ ├── plugin.cpp │ ├── plugins.qmltypes │ ├── qmldir │ ├── uiutils.cpp │ └── uiutils.h ├── notifications │ ├── CMakeLists.txt │ ├── notifications.cpp │ ├── notifications.h │ ├── notificationsdaemon.cpp │ ├── notificationsdaemon.h │ ├── notificationsimage.cpp │ ├── notificationsimage.h │ ├── notificationsimageprovider.cpp │ ├── notificationsimageprovider.h │ ├── org.freedesktop.Notifications.xml │ ├── plugin.cpp │ ├── plugins.qmltypes │ └── qmldir └── styles │ ├── Base │ ├── CMakeLists.txt │ ├── DialogStyle.qml │ ├── NotificationStyle.qml │ ├── OverlayStyle.qml │ ├── PanelStyle.qml │ ├── PopupStyle.qml │ ├── SidePanelStyle.qml │ └── TooltipStyle.qml │ ├── CMakeLists.txt │ ├── Style.qml │ ├── plugin.cpp │ └── qmldir ├── decorations ├── CMakeLists.txt └── material │ ├── CMakeLists.txt │ ├── HawaiiMaterialDecoration.json │ ├── icons.qrc │ ├── materialdecoration.cpp │ ├── materialdecoration.h │ ├── window-close.svg │ ├── window-maximize.svg │ ├── window-minimize.svg │ └── window-restore.svg ├── framework ├── CMakeLists.txt ├── controls │ ├── CMakeLists.txt │ ├── Calendar.qml │ ├── Heading.qml │ ├── SidePanel.qml │ ├── TextField.qml │ ├── ToolButton.qml │ ├── plugin.cpp │ ├── plugins.qmltypes │ ├── popupbehavior.cpp │ ├── popupbehavior.h │ └── qmldir └── themes │ ├── CMakeLists.txt │ ├── Palette.qml │ ├── PaletteValues.qml │ ├── StyledItem.qml │ ├── plugin.cpp │ ├── qmldir │ ├── theme.cpp │ ├── theme.h │ ├── themesettings.cpp │ ├── themesettings.h │ ├── units.cpp │ └── units.h ├── headers ├── CMakeLists.txt ├── cmakedirs.h.in ├── config.h.in ├── gitsha1.h.in └── messages.h ├── scripts ├── CMakeLists.txt ├── hawaii-session.in └── starthawaii.in ├── shell ├── Compositor.qml ├── Indicator.qml ├── KeyBindings.qml ├── Panel.qml ├── RunCommand.qml ├── ShellSettings.qml ├── WindowSwitcher.qml ├── XWayland.qml ├── components │ ├── Clock.qml │ ├── CloseButton.qml │ ├── MenuSeparator.qml │ ├── Overlay.qml │ ├── ToolButton.qml │ ├── Tooltip.qml │ └── private │ │ └── PopupBase.qml ├── controlcenter │ ├── CalendarView.qml │ └── ControlCenter.qml ├── decoration │ ├── PopupWindowDecoration.qml │ ├── WindowControls.qml │ ├── WindowDecoration.qml │ ├── WindowTitleBar.qml │ └── graphics │ │ ├── dropshadow.png │ │ └── dropshadow.sci ├── desktop │ ├── Background.qml │ ├── Desktop.qml │ ├── HotCorner.qml │ ├── HotCorners.qml │ ├── Keyboard.qml │ ├── Output.qml │ ├── OutputConfiguration.qml │ ├── OutputInfo.qml │ ├── PresentWindowsChrome.qml │ ├── ScreenView.qml │ ├── ScreenZoom.qml │ ├── Shell.qml │ ├── Workspace.qml │ └── WorkspacesView.qml ├── error │ ├── ErrorCompositor.qml │ ├── ErrorOutput.qml │ └── ErrorScreen.qml ├── hawaii.qrc ├── images │ └── wallpaper.png ├── indicators │ ├── BatteryIndicator.qml │ ├── ChatIndicator.qml │ ├── EventsIndicator.qml │ ├── LauncherIndicator.qml │ ├── NetworkIndicator.qml │ ├── SettingsIndicator.qml │ ├── SoundIndicator.qml │ ├── StorageIndicator.qml │ ├── events │ │ ├── EventItem.qml │ │ ├── NotificationItem.qml │ │ └── NotificationWindow.qml │ ├── network │ │ ├── AirplaneMode.qml │ │ ├── ConnectionItem.qml │ │ └── Header.qml │ ├── power │ │ └── BatteryEntry.qml │ └── sound │ │ ├── MprisItem.qml │ │ └── VolumeControl.qml ├── launcher │ ├── Launcher.qml │ ├── LauncherCategories.qml │ ├── LauncherDelegate.qml │ ├── LauncherGridDelegate.qml │ ├── LauncherGridView.qml │ ├── LauncherMenu.qml │ ├── LauncherPopOver.qml │ └── LauncherShutdownActions.qml ├── overlays │ ├── HelpOverlay.qml │ └── UnresponsiveOverlay.qml ├── screens │ ├── LockScreen.qml │ ├── LogoutScreen.qml │ ├── SecondaryLockScreen.qml │ └── SplashScreen.qml └── windows │ └── WindowMenu.qml ├── styles ├── CMakeLists.txt └── wind │ ├── BusyIndicatorStyle.qml │ ├── ButtonStyle.qml │ ├── CMakeLists.txt │ ├── CalendarStyle.qml │ ├── FocusFrameStyle.qml │ ├── GroupBoxStyle.qml │ ├── MenuStyle.qml │ ├── ProgressBarStyle.qml │ ├── ScrollViewStyle.qml │ ├── SliderStyle.qml │ ├── TextFieldStyle.qml │ ├── ToolButtonStyle.qml │ ├── images │ ├── CREDITS │ ├── arrow-down.png │ ├── arrow-down@2x.png │ ├── arrow-left.png │ ├── arrow-left@2x.png │ ├── arrow-right.png │ ├── arrow-right@2x.png │ ├── arrow-up.png │ ├── arrow-up@2x.png │ ├── focusframe.png │ ├── noise-texture.png │ └── progress-indeterminate.png │ └── qmldir ├── tests ├── CMakeLists.txt └── auto │ └── CMakeLists.txt ├── themes ├── CMakeLists.txt ├── sddm │ ├── CMakeLists.txt │ └── hawaii │ │ ├── Main.qml │ │ ├── components │ │ ├── Button.qml │ │ ├── CircleIcon.qml │ │ ├── CircleImage.qml │ │ ├── Indicators.qml │ │ ├── MessageBox.qml │ │ └── PasswordField.qml │ │ ├── dummydata │ │ ├── keyboard.qml │ │ ├── screenModel.qml │ │ ├── sddm.qml │ │ ├── sessionModel.qml │ │ ├── tyrion.png │ │ └── userModel.qml │ │ ├── indicators │ │ ├── Keyboard.qml │ │ └── Session.qml │ │ ├── metadata.desktop │ │ ├── screens │ │ ├── BootSplash.qml │ │ ├── DesktopStill.qml │ │ └── Greeter.qml │ │ ├── screenshot.png │ │ └── theme.conf └── shell │ ├── CMakeLists.txt │ └── wind │ ├── CMakeLists.txt │ ├── Palette.qml │ ├── Popover.qml │ ├── PopupMenu.qml │ ├── Tooltip.qml │ ├── images │ ├── dropshadow.png │ └── dropshadow.sci │ └── theme.ini └── translations └── shell ├── shell.ts └── update.sh /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.user 3 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [hawaii.shell-wayland-sessions-hawaii] 5 | type = DESKTOP 6 | source_lang = en 7 | source_file = data/wayland-sessions/hawaii.desktop.in 8 | file_filter = translations/data/wayland-sessions/hawaii_.desktop 9 | 10 | [hawaii.shell-qml] 11 | type = TS 12 | source_lang = en 13 | source_file = translations/shell/shell.ts 14 | file_filter = translations/shell/shell_.ts 15 | -------------------------------------------------------------------------------- /3rdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(sigwatch) 2 | -------------------------------------------------------------------------------- /3rdparty/qlogind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(tools) 2 | add_subdirectory(src) 3 | -------------------------------------------------------------------------------- /3rdparty/qlogind/spec/README.txt: -------------------------------------------------------------------------------- 1 | # Original XML files are created with 2 | 3 | paths may need adjusting to make sure these interfaces exist 4 | 5 | $ qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.DBus.Introspectable.Introspect > org.freedesktop.login1.Manager.xml 6 | $ qdbus --system org.freedesktop.login1 /org/freedesktop/login1/seat/seat0 org.freedesktop.DBus.Introspectable.Introspect > org.freedesktop.login1.Seat.xml 7 | $ qdbus --system org.freedesktop.login1 /org/freedesktop/login1/session/c2 org.freedesktop.DBus.Introspectable.Introspect > org.freedesktop.login1.Session.xml 8 | $ qdbus --system org.freedesktop.login1 /org/freedesktop/login1/user/_1000 org.freedesktop.DBus.Introspectable.Introspect > org.freedesktop.login1.User.xml 9 | 10 | afterwards strip all the other interfaces from each object 11 | 12 | Some changes are needed to: 13 | 1) Add annotations for complex types 14 | 2) Remove methods we won't ever use (Manager CreateSession is only used by the PAM module) 15 | 3) avoid names that would be a C++ class (session has a property called "class", which is naturally a problem) 16 | 17 | 18 | Both original and patched versions are kept in the source tree so that it should be easier to make a diff before updating -------------------------------------------------------------------------------- /3rdparty/qlogind/spec/org.freedesktop.login1.Seat.original: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /3rdparty/qlogind/spec/org.freedesktop.login1.Seat.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #generate cpp from xml files 2 | 3 | macro(generateInterface interfaceName) 4 | string(REPLACE "." "" fileName ${interfaceName}) 5 | 6 | add_custom_command(OUTPUT ${fileName}.cpp OUTPUT ${fileName}.h 7 | COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../tools/enhancedqdbusxml2cpp -p ${fileName} ${CMAKE_SOURCE_DIR}/3rdparty/qlogind/spec/${interfaceName}.xml -i types.h 8 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 9 | COMMENT "Generating Interface for ${interfaceName}" 10 | SOURCES $fileName.h 11 | ) 12 | qt_wrap_cpp(qlogind mocfile ${CMAKE_CURRENT_BINARY_DIR}/${fileName}.h) 13 | list(APPEND generatedInterfaces ${fileName}.cpp) 14 | list(APPEND generatedInterfaces ${mocfile}) 15 | list(APPEND generatedHeaders ${CMAKE_CURRENT_BINARY_DIR}/${fileName}.h) 16 | 17 | endmacro(generateInterface) 18 | 19 | generateInterface("org.freedesktop.login1.Manager") 20 | generateInterface("org.freedesktop.login1.Session") 21 | generateInterface("org.freedesktop.login1.Seat") 22 | generateInterface("org.freedesktop.login1.User") 23 | 24 | 25 | add_library(HawaiiQLogind 26 | STATIC 27 | pendinginterface.cpp 28 | sessiontracker.cpp 29 | usertracker.cpp 30 | seattracker.cpp 31 | manager.cpp 32 | session.cpp 33 | seat.cpp 34 | user.cpp 35 | types.cpp 36 | enhancedqdbusabstractinterface.cpp 37 | ${generatedInterfaces} 38 | ) 39 | 40 | generate_export_header(HawaiiQLogind BASE_NAME QLogind EXPORT_FILE_NAME qlogind_export.h) 41 | 42 | target_link_libraries (HawaiiQLogind 43 | Qt5::DBus 44 | Qt5::Core 45 | ) 46 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/manager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #include "manager.h" 22 | 23 | #include "seat.h" 24 | #include "types.h" 25 | 26 | #include 27 | #include 28 | 29 | 30 | PendingManager* Manager::manager(const QDBusConnection& connection) 31 | { 32 | PendingManager *ps = new PendingManager(); 33 | ps->setInterface(createManager(connection)); 34 | return ps; 35 | } 36 | 37 | ManagerPtr Manager::createManager(const QDBusConnection& connection) 38 | { 39 | static QWeakPointer s_manager; 40 | if (s_manager) { 41 | return s_manager.toStrongRef(); 42 | } 43 | ManagerPtr s(new Manager(connection)); 44 | s_manager = (s); 45 | return s; 46 | } 47 | 48 | Manager::Manager(const QDBusConnection& connection): 49 | OrgFreedesktopLogin1ManagerInterface("org.freedesktop.login1", "/org/freedesktop/login1", connection) 50 | { 51 | 52 | } 53 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/manager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef MANAGER_H 22 | #define MANAGER_H 23 | 24 | #include 25 | 26 | #include "orgfreedesktoplogin1Manager.h" 27 | #include "pendinginterface.h" 28 | 29 | 30 | #include "qlogind_export.h" 31 | 32 | class Manager; 33 | 34 | typedef PendingInterface PendingManager; 35 | typedef QSharedPointer ManagerPtr; 36 | 37 | class QLOGIND_EXPORT Manager : public OrgFreedesktopLogin1ManagerInterface 38 | { 39 | Q_OBJECT 40 | public: 41 | static PendingManager* manager(const QDBusConnection &connection = QDBusConnection::systemBus()); 42 | 43 | protected: 44 | static ManagerPtr createManager(const QDBusConnection &connection); 45 | Manager(const QDBusConnection &connection); 46 | }; 47 | 48 | 49 | #endif // USER_H 50 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/pendinginterface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #include "pendinginterface.h" 22 | 23 | #include 24 | #include 25 | 26 | PendingInterfaceInternal::PendingInterfaceInternal(): 27 | QObject() 28 | { 29 | 30 | } 31 | 32 | void PendingInterfaceInternal::loadFinished() 33 | { 34 | emit finished(this); 35 | deleteLater(); 36 | } 37 | 38 | void PendingInterfaceInternal::loadInterface(QSharedPointer interface) 39 | { 40 | if (interface->hasInitialProperties()) { 41 | QTimer::singleShot(0, this, SLOT(loadFinished())); 42 | } else { 43 | interface->fetchInitialProperties(); 44 | connect(interface.data(), &EnhancedQDBusAbstractInterface::initialPropertiesFetched, this, &PendingInterfaceInternal::loadFinished); 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/seat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef SEAT_H 22 | #define SEAT_H 23 | 24 | #include 25 | 26 | #include "orgfreedesktoplogin1Seat.h" 27 | #include "pendinginterface.h" 28 | 29 | #include "qlogind_export.h" 30 | 31 | class Seat; 32 | 33 | typedef PendingInterface PendingSeat; 34 | typedef QSharedPointer SeatPtr; 35 | 36 | class QLOGIND_EXPORT Seat : public OrgFreedesktopLogin1SeatInterface 37 | { 38 | Q_OBJECT 39 | public: 40 | static PendingSeat* seatFromPath(const QDBusObjectPath &path, const QDBusConnection &connection = QDBusConnection::systemBus()); 41 | static PendingSeat* seatFromName(const QString &id, const QDBusConnection &connection = QDBusConnection::systemBus()); 42 | 43 | protected: 44 | static SeatPtr createSeat(const QDBusObjectPath &path, const QDBusConnection &connection); 45 | Seat(const QDBusObjectPath &path, const QDBusConnection &connection); 46 | }; 47 | 48 | 49 | #endif // SESSION_H 50 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/seattracker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef SEATTRACKER_H 22 | #define SEATTRACKER_H 23 | 24 | #include 25 | 26 | #include "seat.h" 27 | 28 | #include "qlogind_export.h" 29 | 30 | class OrgFreedesktopLogin1ManagerInterface; 31 | 32 | typedef PendingInterfaces PendingSeats; 33 | 34 | class QLOGIND_EXPORT SeatTracker : public QObject 35 | { 36 | Q_OBJECT 37 | public: 38 | SeatTracker(QObject *parent); 39 | PendingSeats* listSeats(); 40 | Q_SIGNALS: 41 | void seatAdded(const SeatPtr &seat); 42 | 43 | private: 44 | OrgFreedesktopLogin1ManagerInterface *m_managerIface;}; 45 | 46 | #endif // SEATTRACKER_H 47 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/session.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef SESSION_H 22 | #define SESSION_H 23 | 24 | #include 25 | 26 | #include "orgfreedesktoplogin1Session.h" 27 | #include "pendinginterface.h" 28 | 29 | #include "qlogind_export.h" 30 | 31 | class Session; 32 | 33 | typedef PendingInterface PendingSession; 34 | typedef QSharedPointer SessionPtr; 35 | 36 | class QLOGIND_EXPORT Session : public OrgFreedesktopLogin1SessionInterface 37 | { 38 | Q_OBJECT 39 | public: 40 | static PendingSession* sessionFromPath(const QDBusObjectPath &path, const QDBusConnection &connection = QDBusConnection::systemBus()); 41 | static PendingSession* sessionFromName(const QString &id, const QDBusConnection &connection = QDBusConnection::systemBus()); 42 | static PendingSession* sessionFromPid(uint pid, const QDBusConnection &connection = QDBusConnection::systemBus()); 43 | 44 | protected: 45 | static SessionPtr createSession(const QDBusObjectPath &path, const QDBusConnection &connection); 46 | Session(const QDBusObjectPath &path, const QDBusConnection &connection); 47 | }; 48 | 49 | 50 | #endif // SESSION_H 51 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/sessiontracker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef SESSIONTRACKER_H 22 | #define SESSIONTRACKER_H 23 | 24 | #include 25 | 26 | #include "session.h" 27 | 28 | #include "qlogind_export.h" 29 | 30 | class OrgFreedesktopLogin1ManagerInterface; 31 | 32 | typedef PendingInterfaces PendingSessions; 33 | 34 | class QLOGIND_EXPORT SessionTracker : public QObject 35 | { 36 | Q_OBJECT 37 | public: 38 | SessionTracker(QObject *parent); 39 | PendingSessions* listSessions(); 40 | 41 | Q_SIGNALS: 42 | void sessionAdded(const SessionPtr &session); 43 | 44 | private: 45 | OrgFreedesktopLogin1ManagerInterface *m_managerIface; 46 | }; 47 | 48 | #endif // SESSIONTRACKER_H 49 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/types.cpp: -------------------------------------------------------------------------------- 1 | #include "types.h" 2 | 3 | #include 4 | #include 5 | 6 | void registerTypes() { 7 | qRegisterMetaType("NamedSeatPath"); 8 | qDBusRegisterMetaType(); 9 | 10 | qRegisterMetaType("NamedSeatPathList"); 11 | qDBusRegisterMetaType(); 12 | 13 | qRegisterMetaType("NamedSessionPath"); 14 | qDBusRegisterMetaType(); 15 | 16 | qRegisterMetaType("NamedSessionPathList"); 17 | qDBusRegisterMetaType(); 18 | 19 | qRegisterMetaType("SessionInfo"); 20 | qDBusRegisterMetaType(); 21 | 22 | qRegisterMetaType("SessionInfoList"); 23 | qDBusRegisterMetaType(); 24 | 25 | qRegisterMetaType("UserInfo"); 26 | qDBusRegisterMetaType(); 27 | 28 | qRegisterMetaType("UserInfoList"); 29 | qDBusRegisterMetaType(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/user.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef USER_H 22 | #define USER_H 23 | 24 | #include 25 | 26 | #include "orgfreedesktoplogin1User.h" 27 | #include "pendinginterface.h" 28 | 29 | class User; 30 | 31 | typedef PendingInterface PendingUser; 32 | typedef QSharedPointer UserPtr; 33 | 34 | class User : public OrgFreedesktopLogin1UserInterface 35 | { 36 | Q_OBJECT 37 | public: 38 | static PendingUser* userFromPath(const QDBusObjectPath &path, const QDBusConnection &connection = QDBusConnection::systemBus()); 39 | static PendingUser* userFromUid(uint uid, const QDBusConnection &connection = QDBusConnection::systemBus()); 40 | static PendingUser* userFromPid(uint pid, const QDBusConnection &connection = QDBusConnection::systemBus()); 41 | 42 | protected: 43 | static UserPtr createUser(const QDBusObjectPath &path, const QDBusConnection &connection); 44 | User(const QDBusObjectPath &path, const QDBusConnection &connection); 45 | }; 46 | 47 | 48 | #endif // USER_H 49 | -------------------------------------------------------------------------------- /3rdparty/qlogind/src/usertracker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2014 David Edmundson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef USERTRACKER_H 22 | #define USERTRACKER_H 23 | 24 | #include "user.h" 25 | 26 | #include 27 | 28 | #include "qlogind_export.h" 29 | 30 | typedef PendingInterfaces PendingUsers; 31 | 32 | class OrgFreedesktopLogin1ManagerInterface; 33 | 34 | class QLOGIND_EXPORT UserTracker : public QObject 35 | { 36 | Q_OBJECT 37 | public: 38 | UserTracker(QObject* parent = 0); 39 | PendingUsers* listUsers(); 40 | Q_SIGNALS: 41 | void userAdded(const UserPtr &session); 42 | 43 | private: 44 | OrgFreedesktopLogin1ManagerInterface *m_managerIface; 45 | }; 46 | 47 | #endif // USERTRACKER_H 48 | -------------------------------------------------------------------------------- /3rdparty/qlogind/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable (enhancedqdbusxml2cpp 2 | enhancedqdbusxml2cpp.cpp) 3 | 4 | target_link_libraries (enhancedqdbusxml2cpp 5 | Qt5::DBus 6 | Qt5::Core 7 | ) 8 | -------------------------------------------------------------------------------- /3rdparty/sigwatch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(HawaiiSigWatch STATIC sigwatch.cpp) 2 | target_link_libraries(HawaiiSigWatch Qt5::Core) 3 | -------------------------------------------------------------------------------- /3rdparty/sigwatch/LICENSE: -------------------------------------------------------------------------------- 1 | Unix signal watcher for Qt. 2 | 3 | Copyright (C) 2014 Simon Knopp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /3rdparty/sigwatch/sigwatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Unix signal watcher for Qt. 3 | * 4 | * Copyright (C) 2014 Simon Knopp 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef SIGWATCH_H 26 | #define SIGWATCH_H 27 | 28 | #include 29 | #include 30 | 31 | class UnixSignalWatcherPrivate; 32 | 33 | 34 | /*! 35 | * \brief The UnixSignalWatcher class converts Unix signals to Qt signals. 36 | * 37 | * To watch for a given signal, e.g. \c SIGINT, call \c watchForSignal(SIGINT) 38 | * and \c connect() your handler to unixSignal(). 39 | */ 40 | 41 | class UnixSignalWatcher : public QObject 42 | { 43 | Q_OBJECT 44 | public: 45 | explicit UnixSignalWatcher(QObject *parent = 0); 46 | ~UnixSignalWatcher(); 47 | 48 | void watchForSignal(int signal); 49 | 50 | signals: 51 | void unixSignal(int signal); 52 | 53 | private: 54 | UnixSignalWatcherPrivate * const d_ptr; 55 | Q_DECLARE_PRIVATE(UnixSignalWatcher) 56 | Q_PRIVATE_SLOT(d_func(), void _q_onNotify(int)) 57 | }; 58 | 59 | #endif // SIGWATCH_H 60 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | Hawaii Shell 2 | ============ 3 | 4 | # Authors 5 | 6 | * Pier Luigi Fiorini 7 | -------------------------------------------------------------------------------- /BUILD.md: -------------------------------------------------------------------------------- 1 | Hawaii Shell 2 | ============ 3 | 4 | # How to Build 5 | 6 | Building Hawaii Shell is a piece of cake. 7 | 8 | Assuming you are in the source directory, just create a build directory 9 | and run cmake: 10 | 11 | ```sh 12 | mkdir build 13 | cd build 14 | cmake -DCMAKE_INSTALL_PREFIX=/opt/hawaii .. 15 | ``` 16 | 17 | To do a debug build the last command can be: 18 | 19 | ```sh 20 | cmake -DCMAKE_INSTALL_PREFIX=/opt/hawaii -DCMAKE_BUILD_TYPE=Debug .. 21 | ``` 22 | 23 | To do a release build instead it can be: 24 | 25 | ```sh 26 | cmake -DCMAKE_INSTALL_PREFIX=/opt/hawaii -DCMAKE_BUILD_TYPE=Release .. 27 | ``` 28 | 29 | If not passed, the `CMAKE_INSTALL_PREFIX` parameter defaults to /usr/local. 30 | You have to specify a path that fits your needs, /opt/hawaii is just an example. 31 | 32 | Package maintainers would pass `-DCMAKE_INSTALL_PREFIX=/usr`. 33 | 34 | The `CMAKE_BUILD_TYPE` parameter allows the following values: 35 | 36 | * **Debug:** debug build 37 | * **Release:** release build 38 | * **RelWithDebInfo:** release build with debugging information 39 | 40 | ## Installation 41 | 42 | It's really easy, it's just a matter of typing: 43 | 44 | ```sh 45 | make install 46 | ``` 47 | 48 | from the build directory. 49 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | Hawaii Shell 2 | ============ 3 | 4 | This is the list of contributors to this code base. 5 | 6 | Names are sorted by number of commits at the time of this writing. 7 | Commit data has been generated with: 8 | 9 | ```sh 10 | git shortlog -s -e -n 11 | ``` 12 | 13 | Commit counts have ben removed, since they change pretty frequently. 14 | 15 | Remember to update this file before any release is made, also make sure 16 | a .mailmap file is maintained if committer names and email addresses 17 | change over time. 18 | 19 | * Pier Luigi Fiorini 20 | * Andreas Müller 21 | * Lubomir Rintel 22 | -------------------------------------------------------------------------------- /DEPENDENCIES.md: -------------------------------------------------------------------------------- 1 | Hawaii Shell 2 | ============ 3 | 4 | # Dependencies 5 | 6 | Compiler requirements: 7 | 8 | * [gcc >= 4.8](https://gcc.gnu.org/gcc-4.8/) or 9 | * [Clang](http://clang.llvm.org/) 10 | 11 | Qt >= 5.6 with at least the following modules is required: 12 | 13 | * [qtbase](http://code.qt.io/cgit/qt/qtbase.git) 14 | * [qtdeclarative](http://code.qt.io/cgit/qt/qtdeclarative.git) 15 | * [qtgraphicaleffects](http://code.qt.io/cgit/qt/qtgraphicaleffects.git) 16 | * [qtquickcontrols](http://code.qt.io/cgit/qt/qtquickcontrols.git) 17 | * [qtquickcontrols2](http://code.qt.io/cgit/qt/qtquickcontrols2.git) 18 | * [qtsvg](http://code.qt.io/cgit/qt/qtsvg.git) 19 | 20 | The following modules and their dependencies are required: 21 | 22 | * [ECM >= 1.4.0](http://quickgit.kde.org/?p=extra-cmake-modules.git) 23 | * [greenisland](https://github.com/greenisland/greenisland) 24 | * [hawaii-workspace](https://github.com/hawaii-desktop/hawaii-workspace) 25 | * [pam](http://www.linux-pam.org/) 26 | * [libqtxdg](https://github.com/lxde/libqtxdg) 27 | * [solid](http://quickgit.kde.org/?p=solid.git) 28 | 29 | Optional dependencies: 30 | 31 | * Volume control 32 | * [alsa](http://www.alsa-project.org/main/index.php/Main_Page) and/or 33 | * [libpulse](https://wiki.freedesktop.org/www/Software/PulseAudio/) 34 | * Networking 35 | * Network Manager support 36 | * [networkmanager-qt](http://quickgit.kde.org/?p=networkmanager-qt.git) 37 | * [modemmanager-qt](http://quickgit.kde.org/?p=modemmanager-qt.git) (optional) 38 | 39 | Optional, but recommended dependencies: 40 | 41 | * [hawaii-icon-themes](https://github.com/hawaii-desktop/hawaii-icon-themes) for the default icon theme 42 | * [hawaii-wallpapers](https://github.com/hawaii-desktop/hawaii-wallpapers) for the default wallpaper 43 | 44 | If you do not install those dependencies, please configure Hawaii with an 45 | alternative icon theme and wallpaper. 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hawaii Shell 2 | ============ 3 | 4 | [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg "IRC Freenode")](https://webchat.freenode.net/?channels=hawaii-desktop) 5 | [![GitHub release](https://img.shields.io/github/release/hawaii-desktop/hawaii-shell.svg)](https://github.com/hawaii-desktop/hawaii-shell) 6 | [![GitHub issues](https://img.shields.io/github/issues/hawaii-desktop/hawaii-shell.svg)](https://github.com/hawaii-desktop/hawaii-shell/issues) 7 | 8 | This is the Hawaii desktop environment shell and workspace. 9 | 10 | It contains a Qt platform theme plugin, session manager, QML plugins 11 | and a convergent shell for multiple form factors such as desktops, 12 | netbooks, phones and tablets. 13 | 14 | Only the desktop shell is implemented and actively pursuit at the 15 | moment, more will come after version 1.0. 16 | 17 | Please read the [list of dependencies](DEPENDENCIES.md) and how to 18 | [build and install](BUILD.md) this software. 19 | 20 | You may also be interested in reading some [notes](NOTES.md). 21 | 22 | List of [authors](AUTHORS.md) and [contributors](CONTRIBUTORS.md). 23 | -------------------------------------------------------------------------------- /cmake/FindMobileBroadbandProviderInfo.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find mobile-broadband-provider-info 2 | # Once done this will define 3 | # 4 | # MOBILEBROADBANDPROVIDERINFO_FOUND - system has mobile-broadband-provider-info 5 | # MOBILEBROADBANDPROVIDERINFO_CFLAGS - the mobile-broadband-provider-info directory 6 | 7 | # Copyright (c) 2011, Lamarque Souza 8 | # 9 | # Redistribution and use is allowed according to the terms of the BSD license. 10 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 11 | 12 | 13 | IF (MOBILEBROADBANDPROVIDERINFO_CFLAGS) 14 | # in cache already 15 | SET(MobileBroadbandProviderInfo_FIND_QUIETLY TRUE) 16 | ENDIF (MOBILEBROADBANDPROVIDERINFO_CFLAGS) 17 | 18 | IF (NOT WIN32) 19 | # use pkg-config to get the directories and then use these values 20 | # in the FIND_PATH() and FIND_LIBRARY() calls 21 | find_package(PkgConfig) 22 | PKG_SEARCH_MODULE( MOBILEBROADBANDPROVIDERINFO mobile-broadband-provider-info ) 23 | ENDIF (NOT WIN32) 24 | 25 | IF (MOBILEBROADBANDPROVIDERINFO_FOUND) 26 | IF (NOT MobileBroadbandProviderInfo_FIND_QUIETLY) 27 | MESSAGE(STATUS "Found mobile-broadband-provider-info ${MOBILEBROADBANDPROVIDERINFO_VERSION}: ${MOBILEBROADBANDPROVIDERINFO_CFLAGS}") 28 | ENDIF (NOT MobileBroadbandProviderInfo_FIND_QUIETLY) 29 | ELSE (MOBILEBROADBANDPROVIDERINFO_FOUND) 30 | IF (MobileBroadbandProviderInfo_FIND_REQUIRED) 31 | MESSAGE(FATAL_ERROR "Could NOT find mobile-broadband-provider-info, check FindPkgConfig output above!") 32 | ENDIF (MobileBroadbandProviderInfo_FIND_REQUIRED) 33 | ENDIF (MOBILEBROADBANDPROVIDERINFO_FOUND) 34 | 35 | MARK_AS_ADVANCED(MOBILEBROADBANDPROVIDERINFO_CFLAGS) 36 | 37 | -------------------------------------------------------------------------------- /cmake/FindModemManager.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find ModemManager 2 | # Once done this will define 3 | # 4 | # MODEMMANAGER_FOUND - system has ModemManager 5 | # MODEMMANAGER_INCLUDE_DIRS - the ModemManager include directories 6 | # MODEMMANAGER_LIBRARIES - the libraries needed to use ModemManager 7 | # MODEMMANAGER_CFLAGS - Compiler switches required for using ModemManager 8 | # MODEMMANAGER_VERSION - version number of ModemManager 9 | 10 | # Copyright (c) 2006, Alexander Neundorf, 11 | # Copyright (c) 2007, Will Stephenson, 12 | # 13 | # Redistribution and use is allowed according to the terms of the BSD license. 14 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 15 | 16 | 17 | IF (MODEMMANAGER_INCLUDE_DIRS) 18 | # in cache already 19 | SET(ModemManager_FIND_QUIETLY TRUE) 20 | ENDIF (MODEMMANAGER_INCLUDE_DIRS) 21 | 22 | IF (NOT WIN32) 23 | # use pkg-config to get the directories and then use these values 24 | # in the FIND_PATH() and FIND_LIBRARY() calls 25 | find_package(PkgConfig) 26 | PKG_SEARCH_MODULE( MODEMMANAGER ModemManager ) 27 | ENDIF (NOT WIN32) 28 | 29 | IF (MODEMMANAGER_FOUND) 30 | IF (ModemManager_FIND_VERSION AND ("${MODEMMANAGER_VERSION}" VERSION_LESS "${ModemManager_FIND_VERSION}")) 31 | MESSAGE(FATAL_ERROR "ModemManager ${MODEMMANAGER_VERSION} is too old, need at least ${ModemManager_FIND_VERSION}") 32 | ELSEIF (NOT ModemManager_FIND_QUIETLY) 33 | MESSAGE(STATUS "Found ModemManager ${MODEMMANAGER_VERSION}: ${MODEMMANAGER_LIBRARY_DIRS}") 34 | ENDIF() 35 | ELSE (MODEMMANAGER_FOUND) 36 | IF (ModemManager_FIND_REQUIRED) 37 | MESSAGE(FATAL_ERROR "Could NOT find ModemManager, check FindPkgConfig output above!") 38 | ENDIF (ModemManager_FIND_REQUIRED) 39 | ENDIF (MODEMMANAGER_FOUND) 40 | 41 | MARK_AS_ADVANCED(MODEMMANAGER_INCLUDE_DIRS NM-UTIL_INCLUDE_DIRS) 42 | 43 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 9 | if(EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 11 | OUTPUT VARIABLE rm_out RETURN_VALUE rm_retval) 12 | if(NOT "${rm_retval}" STREQUAL 0) 13 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 14 | endif(NOT "${rm_retval}" STREQUAL 0) 15 | else(EXISTS "$ENV{DESTDIR}${file}") 16 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 17 | endif(EXISTS "$ENV{DESTDIR}${file}") 18 | endforeach(file ${files}) 19 | -------------------------------------------------------------------------------- /compositor/processlauncher/org.hawaiios.ProcessLauncher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /compositor/sessionmanager/authenticator.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef AUTHENTICATOR_H 28 | #define AUTHENTICATOR_H 29 | 30 | #include 31 | 32 | struct pam_message; 33 | struct pam_response; 34 | 35 | class Authenticator : public QObject 36 | { 37 | Q_OBJECT 38 | public: 39 | Authenticator(QObject *parent = 0); 40 | ~Authenticator(); 41 | 42 | public Q_SLOTS: 43 | void authenticate(const QString &password); 44 | 45 | Q_SIGNALS: 46 | void authenticationSucceded(); 47 | void authenticationFailed(); 48 | void authenticationError(); 49 | 50 | private: 51 | pam_response *m_response; 52 | 53 | static int conversationHandler(int num, const pam_message **message, 54 | pam_response **response, void *data); 55 | }; 56 | 57 | #endif // AUTHENTICATOR_H 58 | -------------------------------------------------------------------------------- /compositor/sessionmanager/loginmanager/fakebackend.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include "fakebackend.h" 28 | 29 | FakeBackend::FakeBackend() 30 | : LoginManagerBackend() 31 | { 32 | } 33 | 34 | QString FakeBackend::name() const 35 | { 36 | return QStringLiteral("fake"); 37 | } 38 | 39 | FakeBackend *FakeBackend::create() 40 | { 41 | return new FakeBackend(); 42 | } 43 | 44 | void FakeBackend::setIdle(bool value) 45 | { 46 | Q_UNUSED(value) 47 | } 48 | 49 | void FakeBackend::lockSession() 50 | { 51 | } 52 | 53 | void FakeBackend::unlockSession() 54 | { 55 | } 56 | 57 | void FakeBackend::locked() 58 | { 59 | } 60 | 61 | void FakeBackend::unlocked() 62 | { 63 | } 64 | 65 | void FakeBackend::switchToVt(int index) 66 | { 67 | Q_UNUSED(index) 68 | } 69 | -------------------------------------------------------------------------------- /compositor/sessionmanager/loginmanager/fakebackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef FAKEBACKEND_H 28 | #define FAKEBACKEND_H 29 | 30 | #include "loginmanagerbackend.h" 31 | 32 | class FakeBackend : public LoginManagerBackend 33 | { 34 | public: 35 | static FakeBackend *create(); 36 | 37 | QString name() const; 38 | 39 | void setIdle(bool value); 40 | 41 | void lockSession(); 42 | void unlockSession(); 43 | 44 | void locked(); 45 | void unlocked(); 46 | 47 | void switchToVt(int index); 48 | 49 | private: 50 | FakeBackend(); 51 | }; 52 | 53 | #endif // FAKEBACKEND_H 54 | -------------------------------------------------------------------------------- /compositor/sessionmanager/loginmanager/loginmanagerbackend.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include "loginmanagerbackend.h" 28 | 29 | LoginManagerBackend::LoginManagerBackend(QObject *parent) 30 | : QObject(parent) 31 | , m_sessionControl(false) 32 | { 33 | } 34 | 35 | LoginManagerBackend::~LoginManagerBackend() 36 | { 37 | } 38 | 39 | bool LoginManagerBackend::hasSessionControl() const 40 | { 41 | return m_sessionControl; 42 | } 43 | 44 | void LoginManagerBackend::takeControl() 45 | { 46 | } 47 | 48 | void LoginManagerBackend::releaseControl() 49 | { 50 | } 51 | 52 | int LoginManagerBackend::takeDevice(const QString &path) 53 | { 54 | Q_UNUSED(path) 55 | return false; 56 | } 57 | 58 | void LoginManagerBackend::releaseDevice(int fd) 59 | { 60 | Q_UNUSED(fd) 61 | } 62 | 63 | #include "moc_loginmanagerbackend.cpp" 64 | -------------------------------------------------------------------------------- /compositor/sessionmanager/powermanager/powermanagerbackend.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Shell. 3 | * 4 | * Copyright (C) 2013-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include "powermanagerbackend.h" 28 | 29 | PowerManagerBackend::PowerManagerBackend() 30 | { 31 | } 32 | 33 | PowerManagerBackend::~PowerManagerBackend() 34 | { 35 | } 36 | -------------------------------------------------------------------------------- /compositor/sessionmanager/powermanager/powermanagerbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Shell. 3 | * 4 | * Copyright (C) 2013-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef POWERMANAGERBACKEND_H 28 | #define POWERMANAGERBACKEND_H 29 | 30 | #include 31 | #include 32 | 33 | #include "powermanager.h" 34 | 35 | class PowerManagerBackend : public QObject 36 | { 37 | public: 38 | explicit PowerManagerBackend(); 39 | virtual ~PowerManagerBackend(); 40 | 41 | virtual QString name() const = 0; 42 | 43 | virtual PowerManager::Capabilities capabilities() const = 0; 44 | 45 | virtual void powerOff() = 0; 46 | virtual void restart() = 0; 47 | virtual void suspend() = 0; 48 | virtual void hibernate() = 0; 49 | virtual void hybridSleep() = 0; 50 | }; 51 | 52 | #endif // POWERMANAGERBACKEND_H 53 | -------------------------------------------------------------------------------- /compositor/sessionmanager/powermanager/systemdpowerbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Shell. 3 | * 4 | * Copyright (C) 2013-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef SYSTEMDPOWERBACKEND_H 28 | #define SYSTEMDPOWERBACKEND_H 29 | 30 | #include 31 | 32 | #include "powermanagerbackend.h" 33 | 34 | class SystemdPowerBackend : public PowerManagerBackend 35 | { 36 | public: 37 | SystemdPowerBackend(); 38 | virtual ~SystemdPowerBackend(); 39 | 40 | static QString service(); 41 | 42 | QString name() const; 43 | 44 | PowerManager::Capabilities capabilities() const; 45 | 46 | void powerOff(); 47 | void restart(); 48 | void suspend(); 49 | void hibernate(); 50 | void hybridSleep(); 51 | 52 | private: 53 | QDBusInterface *m_interface; 54 | }; 55 | 56 | #endif // SYSTEMDPOWERBACKEND_H 57 | -------------------------------------------------------------------------------- /compositor/sessionmanager/powermanager/upowerpowerbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Shell. 3 | * 4 | * Copyright (C) 2013-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef UPOWERPOWERBACKEND_H 28 | #define UPOWERPOWERBACKEND_H 29 | 30 | #include 31 | 32 | #include "powermanagerbackend.h" 33 | 34 | class UPowerPowerBackend : public PowerManagerBackend 35 | { 36 | public: 37 | UPowerPowerBackend(); 38 | virtual ~UPowerPowerBackend(); 39 | 40 | static QString service(); 41 | 42 | QString name() const; 43 | 44 | PowerManager::Capabilities capabilities() const; 45 | 46 | void powerOff(); 47 | void restart(); 48 | void suspend(); 49 | void hibernate(); 50 | void hybridSleep(); 51 | 52 | private: 53 | QDBusInterface *m_interface; 54 | }; 55 | 56 | #endif // UPOWERPOWERBACKEND_H 57 | -------------------------------------------------------------------------------- /compositor/sessionmanager/screensaver/org.freedesktop.ScreenSaver.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /compositor/sessionmanager/screensaver/screensaver.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef SCREENSAVER_H 28 | #define SCREENSAVER_H 29 | 30 | #include 31 | #include 32 | 33 | Q_DECLARE_LOGGING_CATEGORY(SCREENSAVER) 34 | 35 | class SessionManager; 36 | 37 | class ScreenSaver : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | ScreenSaver(QObject *parent = Q_NULLPTR); 42 | ~ScreenSaver(); 43 | 44 | bool GetActive(); 45 | bool SetActive(bool state); 46 | 47 | uint GetActiveTime(); 48 | uint GetSessionIdleTime(); 49 | 50 | void SimulateUserActivity(); 51 | 52 | uint Inhibit(const QString &appName, const QString &reason); 53 | void UnInhibit(uint cookie); 54 | 55 | void Lock(); 56 | 57 | uint Throttle(const QString &appName, const QString &reason); 58 | void UnThrottle(uint cookie); 59 | 60 | Q_SIGNALS: 61 | void ActiveChanged(bool in); 62 | 63 | private: 64 | bool m_active; 65 | SessionManager *m_sessionManager; 66 | }; 67 | 68 | #endif // SCREENSAVER_H 69 | -------------------------------------------------------------------------------- /data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(ENABLE_SYSTEMD) 2 | add_subdirectory(systemd) 3 | endif() 4 | add_subdirectory(wayland-sessions) 5 | -------------------------------------------------------------------------------- /data/systemd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # You can run Hawaii on: 3 | # 4 | # - KMS (this requires Qt >= 5.5) and root privileges 5 | # - Nested into Weston >= 1.5 6 | # 7 | # To start a Hawaii shell upon login: 8 | # 9 | # systemctl --user enable hawaii.service 10 | # systemctl --user enable hawaii.target 11 | # 12 | # Otherwise to run it on demand: 13 | # 14 | # systemctl --user isolate hawaii.target 15 | # 16 | 17 | configure_file( 18 | hawaii.service.in 19 | ${CMAKE_CURRENT_BINARY_DIR}/hawaii.service 20 | ) 21 | 22 | set(FILES 23 | ${CMAKE_CURRENT_BINARY_DIR}/hawaii.service 24 | hawaii.target 25 | ) 26 | 27 | install(FILES ${FILES} DESTINATION ${SYSTEMD_USER_UNIT_DIR}) 28 | -------------------------------------------------------------------------------- /data/systemd/hawaii.service.in: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of Hawaii. 3 | # 4 | # Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | # 6 | # This program is free software; you can redistribute it and/or modify it 7 | # under the terms of the GNU Lesser General Public License as published by 8 | # the Free Software Foundation; either version 2.1 of the License, or 9 | # (at your option) any later version. 10 | # 11 | 12 | [Unit] 13 | Description=Hawaii 14 | 15 | [Service] 16 | Type=forking 17 | ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/greenisland-launcher --execute "@CMAKE_INSTALL_FULL_BINDIR@/hawaii" 18 | 19 | [Install] 20 | WantedBy=hawaii.target 21 | -------------------------------------------------------------------------------- /data/systemd/hawaii.target: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of Hawaii. 3 | # 4 | # Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | # 6 | # This program is free software; you can redistribute it and/or modify it 7 | # under the terms of the GNU Lesser General Public License as published by 8 | # the Free Software Foundation; either version 2.1 of the License, or 9 | # (at your option) any later version. 10 | # 11 | 12 | [Unit] 13 | Description=Hawaii session 14 | Requires=dbus.socket 15 | AllowIsolate=true 16 | -------------------------------------------------------------------------------- /data/wayland-sessions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file( 2 | hawaii.desktop.in 3 | ${CMAKE_CURRENT_BINARY_DIR}/hawaii.desktop 4 | ) 5 | 6 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hawaii.desktop 7 | DESTINATION ${CMAKE_INSTALL_DATADIR}/wayland-sessions) 8 | -------------------------------------------------------------------------------- /data/wayland-sessions/hawaii.desktop.in: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of Hawaii. 3 | # 4 | # Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | # 6 | # This program is free software; you can redistribute it and/or modify it 7 | # under the terms of the GNU Lesser General Public License as published by 8 | # the Free Software Foundation; either version 2.1 of the License, or 9 | # (at your option) any later version. 10 | # 11 | 12 | [Desktop Entry] 13 | Name=Hawaii 14 | Comment=QtQuick and Wayland based desktop environment 15 | Exec=@CMAKE_INSTALL_FULL_BINDIR@/hawaii-session 16 | TryExec=@CMAKE_INSTALL_FULL_BINDIR@/hawaii-session 17 | Icon=start-here 18 | Type=Application 19 | -------------------------------------------------------------------------------- /declarative/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(hardware) 2 | add_subdirectory(misc) 3 | add_subdirectory(launcher) 4 | add_subdirectory(mixer) 5 | add_subdirectory(mpris2) 6 | add_subdirectory(notifications) 7 | if(KF5NetworkManagerQt_FOUND) 8 | add_subdirectory(networkmanager) 9 | endif() 10 | #add_subdirectory(styles) 11 | -------------------------------------------------------------------------------- /declarative/hardware/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | hardwareengine.cpp 3 | battery.cpp 4 | storagedevice.cpp 5 | plugin.cpp 6 | ) 7 | 8 | add_library(hardwareplugin SHARED ${SOURCES}) 9 | target_link_libraries(hardwareplugin 10 | Qt5::Core 11 | Qt5::Qml 12 | KF5::Solid) 13 | 14 | install(FILES qmldir plugins.qmltypes 15 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/hardware) 16 | install(TARGETS hardwareplugin 17 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/hardware) 18 | -------------------------------------------------------------------------------- /declarative/hardware/plugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "hardwareengine.h" 30 | 31 | class HardwarePlugin : public QQmlExtensionPlugin 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 35 | public: 36 | void registerTypes(const char *uri) 37 | { 38 | // @uri org.hawaiios.hardware 39 | Q_ASSERT(uri == QStringLiteral("org.hawaiios.hardware")); 40 | 41 | qmlRegisterType(uri, 0, 1, "HardwareEngine"); 42 | qmlRegisterUncreatableType(uri, 0, 1, "Battery", 43 | QStringLiteral("Cannot create Battery object")); 44 | qmlRegisterUncreatableType(uri, 0, 1, "StorageDevice", 45 | QStringLiteral("Cannot create StorageDevice object")); 46 | } 47 | }; 48 | 49 | #include "plugin.moc" 50 | -------------------------------------------------------------------------------- /declarative/hardware/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.hardware 2 | plugin hardwareplugin 3 | classname HardwarePlugin 4 | typeinfo plugins.qmltypes 5 | -------------------------------------------------------------------------------- /declarative/launcher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | ${CMAKE_CURRENT_BINARY_DIR} 3 | ) 4 | 5 | set(SOURCES 6 | applicationaction.cpp 7 | applicationinfo.cpp 8 | appsmodel.cpp 9 | appsproxymodel.cpp 10 | categoriesmodel.cpp 11 | launcheritem.cpp 12 | launchermodel.cpp 13 | menuimageprovider.cpp 14 | plugin.cpp 15 | processrunner.cpp 16 | ) 17 | 18 | add_library(launcherplugin SHARED ${SOURCES}) 19 | target_link_libraries(launcherplugin 20 | Qt5::DBus 21 | Qt5::Xml 22 | Qt5::Qml 23 | Qt5::Quick 24 | GreenIsland::Server 25 | Hawaii::GSettings) 26 | target_link_libraries(launcherplugin Qt5Xdg) 27 | 28 | install(FILES qmldir plugins.qmltypes 29 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/launcher) 30 | install(TARGETS launcherplugin 31 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/launcher) 32 | -------------------------------------------------------------------------------- /declarative/launcher/appsproxymodel.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Shell. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef APPSPROXYMODEL_H 28 | #define APPSPROXYMODEL_H 29 | 30 | #include 31 | 32 | class AppsModel; 33 | 34 | class AppsProxyModel : public QSortFilterProxyModel 35 | { 36 | Q_OBJECT 37 | Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged) 38 | Q_PROPERTY(AppsModel *model READ model WRITE setModel NOTIFY modelChanged) 39 | public: 40 | AppsProxyModel(QObject *parent = 0); 41 | 42 | QString query() const; 43 | void setQuery(const QString &query); 44 | 45 | AppsModel *model() const; 46 | void setModel(AppsModel *model); 47 | 48 | Q_INVOKABLE QModelIndex sourceIndex(const QModelIndex &proxyIndex) const; 49 | 50 | Q_SIGNALS: 51 | void queryChanged(); 52 | void modelChanged(); 53 | 54 | private: 55 | QString m_query; 56 | AppsModel *m_sourceModel; 57 | }; 58 | 59 | #endif // APPSPROXYMODEL_H 60 | -------------------------------------------------------------------------------- /declarative/launcher/menuimageprovider.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "menuimageprovider.h" 30 | 31 | MenuImageProvider::MenuImageProvider() 32 | : QQuickImageProvider(QQuickImageProvider::Pixmap) 33 | { 34 | } 35 | 36 | QPixmap MenuImageProvider::requestPixmap(const QString &id, QSize *realSize, const QSize &requestedSize) 37 | { 38 | // Sanitize requested size 39 | QSize size(requestedSize); 40 | if (size.width() < 1) 41 | size.setWidth(1); 42 | if (size.height() < 1) 43 | size.setHeight(1); 44 | 45 | // Return real size 46 | if (realSize) 47 | *realSize = size; 48 | 49 | // Is it a path? 50 | if (id.startsWith('/')) 51 | return QPixmap(id).scaled(size); 52 | 53 | // Return icon from theme or fallback to a generic icon 54 | QIcon icon = QIcon::fromTheme(id); 55 | if (icon.isNull()) 56 | icon = QIcon::fromTheme(QStringLiteral("application-x-executable")); 57 | return icon.pixmap(size); 58 | } 59 | -------------------------------------------------------------------------------- /declarative/launcher/menuimageprovider.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef MENUIMAGEPROVIDER_H 28 | #define MENUIMAGEPROVIDER_H 29 | 30 | #include 31 | 32 | class MenuImageProvider : public QQuickImageProvider 33 | { 34 | public: 35 | MenuImageProvider(); 36 | 37 | QPixmap requestPixmap(const QString &id, QSize *realSize, const QSize &requestedSize); 38 | }; 39 | 40 | #endif // MENUIMAGEPROVIDER_H 41 | -------------------------------------------------------------------------------- /declarative/launcher/processrunner.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef PROCESSRUNNER_H 28 | #define PROCESSRUNNER_H 29 | 30 | #include 31 | 32 | class ProcessRunner : public QObject 33 | { 34 | Q_OBJECT 35 | public: 36 | ProcessRunner(QObject *parent = 0); 37 | 38 | Q_INVOKABLE bool launchApplication(const QString &name); 39 | Q_INVOKABLE bool launchCommand(const QString &command); 40 | }; 41 | 42 | #endif // PROCESSRUNNER_H 43 | -------------------------------------------------------------------------------- /declarative/launcher/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.launcher 2 | plugin launcherplugin 3 | classname LauncherPlugin 4 | typeinfo plugins.qmltypes 5 | -------------------------------------------------------------------------------- /declarative/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | formats.cpp 3 | keyeventfilter.cpp 4 | kformat.cpp 5 | kformatprivate.cpp 6 | miscplugin.cpp 7 | standardpaths.cpp 8 | ) 9 | 10 | add_library(miscplugin SHARED ${SOURCES}) 11 | target_link_libraries(miscplugin 12 | Qt5::Core 13 | Qt5::Quick) 14 | 15 | install(FILES qmldir 16 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/misc) 17 | install(TARGETS miscplugin 18 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/misc) 19 | -------------------------------------------------------------------------------- /declarative/misc/keyeventfilter.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef KEYEVENTFILTER_H 28 | #define KEYEVENTFILTER_H 29 | 30 | #include 31 | #include 32 | 33 | class KeyEventFilter : public QQuickItem 34 | { 35 | Q_OBJECT 36 | public: 37 | KeyEventFilter(QQuickItem *parent = 0); 38 | 39 | protected: 40 | bool eventFilter(QObject *, QEvent *); 41 | 42 | private: 43 | QPointer m_window; 44 | }; 45 | 46 | #endif // KEYEVENTFILTER_H 47 | -------------------------------------------------------------------------------- /declarative/misc/miscplugin.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef MISCPLUGIN_H 28 | #define MISCPLUGIN_H 29 | 30 | #include 31 | #include 32 | 33 | class MiscPlugin : public QQmlExtensionPlugin 34 | { 35 | Q_OBJECT 36 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 37 | public: 38 | virtual void registerTypes(const char *uri); 39 | }; 40 | 41 | #endif // MISCPLUGIN_H 42 | -------------------------------------------------------------------------------- /declarative/misc/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.misc 2 | plugin miscplugin 3 | -------------------------------------------------------------------------------- /declarative/misc/standardpaths.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "standardpaths.h" 30 | 31 | StandardPaths::StandardPaths(QObject *parent) 32 | : QObject(parent) 33 | { 34 | } 35 | 36 | QString StandardPaths::locateFile(StandardLocation type, const QString &fileName) 37 | { 38 | QStandardPaths::StandardLocation qtype = static_cast(type); 39 | return QStandardPaths::locate(qtype, fileName); 40 | } 41 | 42 | QString StandardPaths::locateDirectory(StandardLocation type, const QString &dirName) 43 | { 44 | QStandardPaths::StandardLocation qtype = static_cast(type); 45 | return QStandardPaths::locate(qtype, dirName, QStandardPaths::LocateDirectory); 46 | } 47 | 48 | #include "moc_standardpaths.cpp" 49 | -------------------------------------------------------------------------------- /declarative/mixer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(ENABLE_ALSA) 2 | find_package(ALSA) 3 | 4 | if(NOT ALSA_FOUND) 5 | message(WARNING "Alsa was not found!") 6 | endif() 7 | endif() 8 | if(ENABLE_PULSEAUDIO) 9 | pkg_check_modules(PulseAudio libpulse) 10 | pkg_check_modules(PulseAudioGLib libpulse-mainloop-glib) 11 | 12 | if(NOT PulseAudio_FOUND) 13 | message(WARNING "PulseAudio was not found!") 14 | endif() 15 | endif() 16 | 17 | set(SOURCES 18 | mixer.cpp 19 | mixerplugin.cpp 20 | ) 21 | 22 | if(ALSA_FOUND) 23 | list(APPEND SOURCES alsamixerbackend.cpp) 24 | endif() 25 | 26 | if(PulseAudio_FOUND) 27 | list(APPEND SOURCES pulseaudiomixerbackend.cpp) 28 | endif() 29 | 30 | add_library(mixerplugin SHARED ${SOURCES}) 31 | target_link_libraries(mixerplugin 32 | Qt5::Qml 33 | Qt5::Quick) 34 | 35 | if(ALSA_FOUND) 36 | include_directories(${ALSA_INCLUDE_DIRS}) 37 | add_definitions(-DHAVE_ALSA) 38 | target_link_libraries(mixerplugin ${ALSA_LIBRARIES}) 39 | endif() 40 | 41 | if(PulseAudio_FOUND) 42 | include_directories(${PulseAudioGLib_INCLUDE_DIRS}) 43 | add_definitions(-DHAVE_PULSEAUDIO) 44 | target_link_libraries(mixerplugin ${PulseAudio_LIBRARIES} ${PulseAudioGLib_LIBRARIES}) 45 | endif() 46 | 47 | install(FILES qmldir 48 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/mixer) 49 | install(TARGETS mixerplugin 50 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/mixer) 51 | -------------------------------------------------------------------------------- /declarative/mixer/alsamixerbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef ALSAMIXERBACKEND_H 28 | #define ALSAMIXERBACKEND_H 29 | 30 | #include "mixer.h" 31 | #include "mixerbackend.h" 32 | 33 | #include 34 | 35 | Q_DECLARE_LOGGING_CATEGORY(ALSA) 36 | 37 | class AlsaMixerBackend : public MixerBackend 38 | { 39 | public: 40 | ~AlsaMixerBackend(); 41 | 42 | static AlsaMixerBackend *createBackend(Mixer *mixer); 43 | 44 | QString name() const; 45 | 46 | void boundaries(int *min, int *max) const; 47 | 48 | int volume() const; 49 | void setVolume(int value); 50 | 51 | bool isMuted() const; 52 | void setMuted(bool value); 53 | 54 | private: 55 | Mixer *m_mixer; 56 | snd_mixer_t *m_alsaMixer; 57 | snd_mixer_selem_id_t *m_selemId; 58 | snd_mixer_elem_t *m_selem; 59 | long m_min, m_max; 60 | 61 | AlsaMixerBackend(Mixer *mixer); 62 | }; 63 | 64 | #endif // ALSAMIXERBACKEND_H 65 | -------------------------------------------------------------------------------- /declarative/mixer/mixerbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef MIXERBACKEND_H 28 | #define MIXERBACKEND_H 29 | 30 | class MixerBackend 31 | { 32 | public: 33 | virtual ~MixerBackend() {} 34 | 35 | virtual QString name() const = 0; 36 | 37 | virtual void boundaries(int *min, int *max) const = 0; 38 | 39 | virtual int volume() const = 0; 40 | virtual void setVolume(int value) = 0; 41 | 42 | virtual bool isMuted() const = 0; 43 | virtual void setMuted(bool value) = 0; 44 | }; 45 | 46 | #endif // MIXERBACKEND_H 47 | -------------------------------------------------------------------------------- /declarative/mixer/mixerplugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "mixerplugin.h" 30 | #include "mixer.h" 31 | 32 | void MixerPlugin::registerTypes(const char *uri) 33 | { 34 | Q_ASSERT(uri == QStringLiteral("org.hawaiios.mixer")); 35 | 36 | // @uri org.hawaiios.mixer 37 | qmlRegisterSingletonType(uri, 0, 1, "Mixer", 38 | MixerPlugin::mixerProvider); 39 | } 40 | 41 | QObject *MixerPlugin::mixerProvider(QQmlEngine *engine, QJSEngine *jsEngine) 42 | { 43 | Q_UNUSED(engine); 44 | Q_UNUSED(jsEngine); 45 | 46 | Mixer *mixer = new Mixer(engine); 47 | mixer->initialize(); 48 | return mixer; 49 | } 50 | 51 | #include "moc_mixerplugin.cpp" 52 | -------------------------------------------------------------------------------- /declarative/mixer/mixerplugin.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Shell. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef MIXERPLUGIN_H 28 | #define MIXERPLUGIN_H 29 | 30 | #include 31 | #include 32 | 33 | class MixerPlugin : public QQmlExtensionPlugin 34 | { 35 | Q_OBJECT 36 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 37 | public: 38 | void registerTypes(const char *uri); 39 | 40 | static QObject *mixerProvider(QQmlEngine *engine, QJSEngine *jsEngine); 41 | }; 42 | 43 | #endif // MIXERPLUGIN_H 44 | -------------------------------------------------------------------------------- /declarative/mixer/plugin.qmltypes: -------------------------------------------------------------------------------- 1 | import QtQuick.tooling 1.1 2 | 3 | // This file describes the plugin-supplied types contained in the library. 4 | // It is used for QML tooling purposes only. 5 | // 6 | // This file was auto-generated by: 7 | // 'qmlplugindump -nonrelocatable org.hawaiios.mixer 0.1' 8 | 9 | Module { 10 | Component { 11 | name: "Mixer" 12 | prototype: "QObject" 13 | exports: ["org.hawaiios.mixer/Mixer 0.1"] 14 | isCreatable: false 15 | isSingleton: true 16 | exportMetaObjectRevisions: [0] 17 | Property { name: "available"; type: "bool"; isReadonly: true } 18 | Property { name: "backendName"; type: "string"; isReadonly: true } 19 | Property { name: "master"; type: "int" } 20 | Property { name: "muted"; type: "bool" } 21 | Method { name: "increaseMaster" } 22 | Method { name: "decreaseMaster" } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /declarative/mixer/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.mixer 2 | plugin mixerplugin 3 | classname MixerPlugin 4 | typeinfo plugins.qmltypes 5 | -------------------------------------------------------------------------------- /declarative/mpris2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | mpris2engine.cpp 3 | mpris2player.cpp 4 | plugin.cpp 5 | ) 6 | 7 | set_source_files_properties( 8 | org.freedesktop.DBus.Properties.xml 9 | org.mpris.MediaPlayer2.Player.xml 10 | org.mpris.MediaPlayer2.xml 11 | PROPERTIES 12 | NO_NAMESPACE ON 13 | ) 14 | qt5_add_dbus_interface(SOURCES org.freedesktop.DBus.Properties.xml dbuspropertiesadaptor) 15 | qt5_add_dbus_interface(SOURCES org.mpris.MediaPlayer2.Player.xml mprisplayeradaptor) 16 | qt5_add_dbus_interface(SOURCES org.mpris.MediaPlayer2.xml mprisadaptor) 17 | 18 | add_library(mpris2plugin SHARED ${SOURCES}) 19 | target_link_libraries(mpris2plugin 20 | Qt5::DBus 21 | Qt5::Qml) 22 | 23 | install(FILES qmldir plugins.qmltypes 24 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/mpris2) 25 | install(TARGETS mpris2plugin 26 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/mpris2) 27 | -------------------------------------------------------------------------------- /declarative/mpris2/mpris2engine.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef MPRIS2ENGINE_H 28 | #define MPRIS2ENGINE_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | class QDBusServiceWatcher; 35 | class Mpris2Player; 36 | 37 | Q_DECLARE_LOGGING_CATEGORY(MPRIS2) 38 | 39 | class Mpris2Engine : public QObject 40 | { 41 | Q_OBJECT 42 | Q_PROPERTY(QQmlListProperty players READ players NOTIFY playersChanged) 43 | public: 44 | Mpris2Engine(QObject *parent = 0); 45 | ~Mpris2Engine(); 46 | 47 | QQmlListProperty players(); 48 | static int playersCount(QQmlListProperty *prop); 49 | static Mpris2Player *playersAt(QQmlListProperty *prop, int index); 50 | 51 | Q_SIGNALS: 52 | void playersChanged(); 53 | 54 | private: 55 | QDBusServiceWatcher *m_watcher; 56 | QList m_players; 57 | }; 58 | 59 | #endif // MPRIS2ENGINE_H 60 | -------------------------------------------------------------------------------- /declarative/mpris2/org.freedesktop.DBus.Properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /declarative/mpris2/org.mpris.MediaPlayer2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /declarative/mpris2/plugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "mpris2engine.h" 30 | #include "mpris2player.h" 31 | 32 | class Mpris2Plugin : public QQmlExtensionPlugin 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 36 | public: 37 | void registerTypes(const char *uri) 38 | { 39 | // @uri org.hawaiios.mpris2 40 | Q_ASSERT(uri == QStringLiteral("org.hawaiios.mpris2")); 41 | 42 | qmlRegisterType(uri, 0, 1, "Mpris2"); 43 | qmlRegisterUncreatableType(uri, 0, 1, "Mpris2Player", 44 | QStringLiteral("Cannot create Mpris2Player object")); 45 | } 46 | }; 47 | 48 | #include "plugin.moc" 49 | -------------------------------------------------------------------------------- /declarative/mpris2/plugins.qmltypes: -------------------------------------------------------------------------------- 1 | import QtQuick.tooling 1.1 2 | 3 | // This file describes the plugin-supplied types contained in the library. 4 | // It is used for QML tooling purposes only. 5 | // 6 | // This file was auto-generated by: 7 | // 'qmlplugindump -nonrelocatable org.hawaiios.mpris2 0.1' 8 | 9 | Module { 10 | Component { 11 | name: "Mpris2Engine" 12 | prototype: "QObject" 13 | exports: ["org.hawaiios.mpris2/Mpris2 0.1"] 14 | exportMetaObjectRevisions: [0] 15 | Property { name: "players"; type: "Mpris2Player"; isList: true; isReadonly: true } 16 | } 17 | Component { 18 | name: "Mpris2Player" 19 | prototype: "QObject" 20 | exports: ["org.hawaiios.mpris2/Mpris2Player 0.1"] 21 | isCreatable: false 22 | exportMetaObjectRevisions: [0] 23 | Property { name: "identity"; type: "string"; isReadonly: true } 24 | Property { name: "canRaise"; type: "bool"; isReadonly: true } 25 | Property { name: "canQuit"; type: "bool"; isReadonly: true } 26 | Property { name: "canSetFullScreen"; type: "bool"; isReadonly: true } 27 | Signal { 28 | name: "seeked" 29 | Parameter { name: "x"; type: "int" } 30 | } 31 | Method { name: "raise" } 32 | Method { name: "quit" } 33 | Method { name: "previous" } 34 | Method { name: "next" } 35 | Method { name: "play" } 36 | Method { name: "pause" } 37 | Method { name: "playPause" } 38 | Method { name: "stop" } 39 | Method { 40 | name: "seek" 41 | Parameter { name: "offset"; type: "qlonglong" } 42 | } 43 | Method { 44 | name: "setPosition" 45 | Parameter { name: "trackId"; type: "string" } 46 | Parameter { name: "position"; type: "qlonglong" } 47 | } 48 | Method { 49 | name: "openUrl" 50 | Parameter { name: "url"; type: "QUrl" } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /declarative/mpris2/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.mpris2 2 | plugin mpris2plugin 3 | classname Mpris2Plugin 4 | typeinfo plugins.qmltypes 5 | -------------------------------------------------------------------------------- /declarative/networkmanager/debug.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 Jan Grulich 3 | Copyright 2015-2016 Pier Luigi Fiorini 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) version 3, or any 9 | later version accepted by the membership of KDE e.V. (or its 10 | successor approved by the membership of KDE e.V.), which shall 11 | act as a proxy defined in Section 6 of version 3 of the license. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General Public 19 | License along with this library. If not, see . 20 | */ 21 | 22 | #include "debug.h" 23 | 24 | Q_LOGGING_CATEGORY(PLASMA_NM, "hawaii.qml.networkmanager") 25 | -------------------------------------------------------------------------------- /declarative/networkmanager/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 Jan Grulich 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) version 3, or any 8 | later version accepted by the membership of KDE e.V. (or its 9 | successor approved by the membership of KDE e.V.), which shall 10 | act as a proxy defined in Section 6 of version 3 of the license. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library. If not, see . 19 | */ 20 | 21 | #ifndef PLASMA_NM_DEBUG_H 22 | #define PLASMA_NM_DEBUG_H 23 | 24 | #include 25 | 26 | Q_DECLARE_LOGGING_CATEGORY(PLASMA_NM) 27 | 28 | #endif // PLASMA_NM_DEBUG_H 29 | -------------------------------------------------------------------------------- /declarative/networkmanager/enums.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2013 Jan Grulich 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) version 3, or any 8 | later version accepted by the membership of KDE e.V. (or its 9 | successor approved by the membership of KDE e.V.), which shall 10 | act as a proxy defined in Section 6 of version 3 of the license. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library. If not, see . 19 | */ 20 | 21 | #include "enums.h" 22 | 23 | Enums::Enums(QObject* parent) 24 | : QObject(parent) 25 | { 26 | } 27 | 28 | Enums::~Enums() 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /declarative/networkmanager/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.networkmanager 2 | plugin nmplugin 3 | classname NetworkManagerPlugin 4 | typeinfo plugins.qmltypes 5 | -------------------------------------------------------------------------------- /declarative/notifications/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | ${CMAKE_BINARY_DIR}/headers 3 | ) 4 | 5 | set(SOURCES 6 | notifications.cpp 7 | notificationsdaemon.cpp 8 | notificationsimage.cpp 9 | notificationsimageprovider.cpp 10 | plugin.cpp 11 | ) 12 | 13 | qt5_add_dbus_adaptor(SOURCES 14 | org.freedesktop.Notifications.xml 15 | notificationsdaemon.h NotificationsDaemon) 16 | 17 | add_library(notificationsplugin SHARED ${SOURCES}) 18 | target_link_libraries(notificationsplugin 19 | Qt5::Core 20 | Qt5::DBus 21 | Qt5::Gui 22 | Qt5::Qml 23 | Qt5::Quick) 24 | 25 | install(FILES qmldir plugins.qmltypes 26 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/notifications) 27 | install(TARGETS notificationsplugin 28 | DESTINATION ${QML_INSTALL_DIR}/org/hawaiios/notifications) 29 | -------------------------------------------------------------------------------- /declarative/notifications/notificationsimage.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * Copyright (C) 2008 Dmitry Suzdalev 6 | * 7 | * Author(s): 8 | * Pier Luigi Fiorini 9 | * Dmitry Suzdalev 10 | * 11 | * $BEGIN_LICENSE:LGPL2.1+$ 12 | * 13 | * This program is free software: you can redistribute it and/or modify 14 | * it under the terms of the GNU Lesser General Public License as published by 15 | * the Free Software Foundation, either version 2.1 of the License, or 16 | * (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU Lesser General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU Lesser General Public License 24 | * along with this program. If not, see . 25 | * 26 | * $END_LICENSE$ 27 | ***************************************************************************/ 28 | 29 | #ifndef NOTIFICATIONSIMAGE_H 30 | #define NOTIFICATIONSIMAGE_H 31 | 32 | #include 33 | #include 34 | 35 | QImage decodeImageHint(const QDBusArgument &arg); 36 | 37 | #endif // NOTIFICATIONSIMAGE_H 38 | -------------------------------------------------------------------------------- /declarative/notifications/notificationsimageprovider.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef NOTIFICATIONSIMAGEPROVIDER_H 28 | #define NOTIFICATIONSIMAGEPROVIDER_H 29 | 30 | #include 31 | 32 | class NotificationsDaemon; 33 | 34 | class NotificationsImageProvider : public QQuickImageProvider 35 | { 36 | public: 37 | NotificationsImageProvider(NotificationsDaemon *daemon); 38 | 39 | QPixmap requestPixmap(const QString &id, QSize *realSize, const QSize &requestedSize); 40 | 41 | private: 42 | NotificationsDaemon *m_daemon; 43 | }; 44 | 45 | #endif // NOTIFICATIONSIMAGEPROVIDER_H 46 | -------------------------------------------------------------------------------- /declarative/notifications/org.freedesktop.Notifications.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /declarative/notifications/plugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "notifications.h" 30 | #include "notificationsimageprovider.h" 31 | 32 | class NotificationsPlugin : public QQmlExtensionPlugin 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 36 | public: 37 | void registerTypes(const char *uri) 38 | { 39 | // @uri org.hawaiios.notifications 40 | Q_ASSERT(uri == QStringLiteral("org.hawaiios.notifications")); 41 | 42 | qmlRegisterSingletonType(uri, 0, 1, "NotificationsService", [](QQmlEngine *engine, QJSEngine *) { 43 | Notifications *notifications = new Notifications(); 44 | engine->addImageProvider(QStringLiteral("notifications"), new NotificationsImageProvider(notifications->daemon())); 45 | return static_cast(notifications); 46 | }); 47 | } 48 | }; 49 | 50 | #include "plugin.moc" 51 | -------------------------------------------------------------------------------- /declarative/notifications/plugins.qmltypes: -------------------------------------------------------------------------------- 1 | import QtQuick.tooling 1.1 2 | 3 | // This file describes the plugin-supplied types contained in the library. 4 | // It is used for QML tooling purposes only. 5 | // 6 | // This file was auto-generated by: 7 | // 'qmlplugindump -nonrelocatable org.hawaiios.notifications 0.1' 8 | 9 | Module { 10 | Component { 11 | name: "Notifications" 12 | prototype: "QObject" 13 | exports: ["org.hawaiios.notifications/NotificationsService 0.1"] 14 | isCreatable: false 15 | isSingleton: true 16 | exportMetaObjectRevisions: [0] 17 | Enum { 18 | name: "CloseReason" 19 | values: { 20 | "CloseReasonExpired": 1, 21 | "CloseReasonByUser": 2, 22 | "CloseReasonByApplication": 3 23 | } 24 | } 25 | Property { name: "valid"; type: "bool"; isReadonly: true } 26 | Property { name: "active"; type: "bool" } 27 | Signal { 28 | name: "notificationReceived" 29 | Parameter { name: "data"; type: "QQmlPropertyMap"; isPointer: true } 30 | } 31 | Signal { 32 | name: "notificationClosed" 33 | Parameter { name: "notificationId"; type: "uint" } 34 | Parameter { name: "reason"; type: "uint" } 35 | } 36 | Signal { 37 | name: "actionInvoked" 38 | Parameter { name: "notificationId"; type: "uint" } 39 | Parameter { name: "actionKey"; type: "string" } 40 | } 41 | Method { 42 | name: "invokeAction" 43 | Parameter { name: "id"; type: "uint" } 44 | Parameter { name: "actionId"; type: "string" } 45 | } 46 | Method { 47 | name: "closeNotification" 48 | Parameter { name: "id"; type: "uint" } 49 | Parameter { name: "reason"; type: "Notifications::CloseReason" } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /declarative/notifications/qmldir: -------------------------------------------------------------------------------- 1 | module org.hawaiios.notifications 2 | plugin notificationsplugin 3 | classname NotificationsPlugin 4 | typeinfo plugins.qmltypes 5 | -------------------------------------------------------------------------------- /declarative/styles/Base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(MODULE_FILES 2 | DialogStyle.qml 3 | NotificationStyle.qml 4 | OverlayStyle.qml 5 | PanelStyle.qml 6 | PopupStyle.qml 7 | SidePanelStyle.qml 8 | TooltipStyle.qml 9 | ) 10 | install(FILES ${MODULE_FILES} 11 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Controls/Styles/Base) 12 | -------------------------------------------------------------------------------- /declarative/styles/Base/DialogStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2012-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Controls.Styles 1.0 as Styles 29 | 30 | Styles.Style { 31 | padding { 32 | left: 8 33 | top: 8 34 | right: 8 35 | bottom: 8 36 | } 37 | 38 | property Component panel: Rectangle { 39 | anchors.fill: parent 40 | border.color: "#999" 41 | color: Qt.rgba(0, 0, 0, 0.7) 42 | radius: 10 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /declarative/styles/Base/OverlayStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2013-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Controls.Styles 1.0 as Styles 29 | 30 | Styles.Style { 31 | property color panelColor1: Qt.rgba(0.13, 0.13, 0.13, 0.7) 32 | property color panelColor2: Qt.rgba(0, 0, 0, 0.7) 33 | property color textColor: "white" 34 | property color textShadowColor: Qt.rgba(0, 0, 0, 0.7) 35 | 36 | property Component panel: Rectangle { 37 | border.color: "#999" 38 | color: "black" 39 | radius: 10 40 | opacity: 0.7 41 | antialiasing: true 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /declarative/styles/Base/PanelStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2013-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Controls.Styles 1.0 as Styles 29 | 30 | Styles.Style { 31 | padding { 32 | left: units.smallSpacing 33 | top: units.smallSpacing 34 | right: units.smallSpacing 35 | bottom: units.smallSpacing 36 | } 37 | 38 | property Component panel: Rectangle { 39 | color: Qt.rgba(0, 0, 0, 0.7) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /declarative/styles/Base/PopupStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2013-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Controls.Styles 1.0 as Styles 29 | 30 | Styles.Style { 31 | property Component panel: Rectangle { 32 | border.color: "#999" 33 | color: "black" 34 | radius: 6 35 | opacity: 0.7 36 | antialiasing: true 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /declarative/styles/Base/TooltipStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2012-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Controls.Styles 1.0 as Styles 29 | 30 | Styles.Style { 31 | property color panelColor1: Qt.rgba(0.13, 0.13, 0.13, 0.8) 32 | property color panelColor2: Qt.rgba(0, 0, 0, 0.8) 33 | property color textColor: "white" 34 | property color textShadowColor: Qt.rgba(0, 0, 0, 0.7) 35 | 36 | property Component panel: Rectangle { 37 | border.color: Qt.rgba(0, 0, 0, 0.5) 38 | color: "black" 39 | opacity: 0.7 40 | radius: 6 41 | antialiasing: true 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /declarative/styles/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | ${CMAKE_BINARY_DIR}/headers 3 | ) 4 | 5 | add_definitions(-DQT_PLUGIN) 6 | 7 | set(SOURCES 8 | plugin.cpp 9 | ) 10 | 11 | add_library(declarative_hawaiistyles SHARED ${SOURCES}) 12 | target_link_libraries(declarative_hawaiistyles 13 | Qt5::Qml 14 | ) 15 | 16 | install(TARGETS declarative_hawaiistyles LIBRARY 17 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Controls/Styles) 18 | 19 | set(MODULE_FILES 20 | qmldir 21 | Style.qml 22 | StyledItem.qml 23 | ) 24 | install(FILES ${MODULE_FILES} 25 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Controls/Styles) 26 | 27 | add_subdirectory(Base) 28 | -------------------------------------------------------------------------------- /declarative/styles/Style.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2013-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls.Private 1.0 as QtControlsPrivate 29 | 30 | /*! 31 | \qmltype Style 32 | \qmlabstract 33 | \inqmlmodule Hawaii.Controls.Styles 1.0 34 | */ 35 | 36 | QtControlsPrivate.AbstractStyle { 37 | /*! The item attached to this style */ 38 | readonly property var control: __control 39 | } 40 | -------------------------------------------------------------------------------- /declarative/styles/plugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii Framework. 3 | * 4 | * Copyright (C) 2013-2014 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | #include 29 | 30 | #include "stylesettings.h" 31 | 32 | class HawaiiShellStylesPlugin : public QQmlExtensionPlugin 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") 36 | public: 37 | void registerTypes(const char *uri); 38 | 39 | static QObject *styleSettingsProvider(QQmlEngine *engine, QJSEngine *jsEngine); 40 | }; 41 | 42 | void HawaiiShellStylesPlugin::registerTypes(const char *uri) 43 | { 44 | // @uri Hawaii.Controls.Styles 45 | qmlRegisterSingletonType(uri, 1, 0, "StyleSettings", 46 | HawaiiShellStylesPlugin::styleSettingsProvider); 47 | } 48 | 49 | QObject *HawaiiShellStylesPlugin::styleSettingsProvider(QQmlEngine *engine, QJSEngine *jsEngine) 50 | { 51 | Q_UNUSED(engine); 52 | Q_UNUSED(jsEngine); 53 | 54 | return new StyleSettings(); 55 | } 56 | 57 | #include "plugin.moc" 58 | -------------------------------------------------------------------------------- /declarative/styles/qmldir: -------------------------------------------------------------------------------- 1 | module Hawaii.Controls.Styles 2 | plugin declarative_hawaiistyles 3 | Style 1.0 Style.qml 4 | StyledItem 1.0 StyledItem.qml 5 | DialogStyle 1.0 Base/DialogStyle.qml 6 | NotificationStyle 1.0 Base/NotificationStyle.qml 7 | OverlayStyle 1.0 Base/OverlayStyle.qml 8 | PanelStyle 1.0 Base/PanelStyle.qml 9 | PopupStyle 1.0 Base/PopupStyle.qml 10 | SidePanelStyle 1.0 Base/SidePanelStyle.qml 11 | TooltipStyle 1.0 Base/TooltipStyle.qml 12 | -------------------------------------------------------------------------------- /decorations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(material) 2 | -------------------------------------------------------------------------------- /decorations/material/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 3 | ${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS} 4 | ) 5 | 6 | set(SOURCES materialdecoration.cpp) 7 | 8 | qt5_add_resources(RESOURCES icons.qrc) 9 | 10 | add_library(HawaiiMaterialDecoration SHARED ${SOURCES} ${RESOURCES}) 11 | add_library(Hawaii::MaterialDecoration ALIAS HawaiiMaterialDecoration) 12 | target_link_libraries(HawaiiMaterialDecoration 13 | Qt5::Core 14 | Qt5::Gui 15 | Qt5::WaylandClient) 16 | 17 | install(TARGETS HawaiiMaterialDecoration 18 | LIBRARY DESTINATION ${QT_PLUGIN_INSTALL_DIR}/wayland-decoration-client) 19 | -------------------------------------------------------------------------------- /decorations/material/HawaiiMaterialDecoration.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "HawaiiMaterialDecoration" ] 3 | } 4 | -------------------------------------------------------------------------------- /decorations/material/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | window-close.svg 4 | window-minimize.svg 5 | window-maximize.svg 6 | window-restore.svg 7 | 8 | 9 | -------------------------------------------------------------------------------- /decorations/material/window-close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /decorations/material/window-maximize.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /decorations/material/window-minimize.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 30 | 50 | 54 | 55 | -------------------------------------------------------------------------------- /decorations/material/window-restore.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /framework/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(controls) 2 | add_subdirectory(themes) 3 | -------------------------------------------------------------------------------- /framework/controls/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | plugin.cpp 3 | popupbehavior.cpp 4 | ) 5 | 6 | add_library(controlsplugin SHARED ${SOURCES}) 7 | target_link_libraries(controlsplugin Qt5::Qml Qt5::Quick) 8 | 9 | install(TARGETS controlsplugin 10 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Controls) 11 | 12 | set(FILES 13 | qmldir 14 | plugins.qmltypes 15 | Calendar.qml 16 | Heading.qml 17 | TextField.qml 18 | ToolButton.qml 19 | SidePanel.qml 20 | ) 21 | 22 | install(FILES ${FILES} 23 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Controls) 24 | -------------------------------------------------------------------------------- /framework/controls/Calendar.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.2 28 | import QtQuick.Controls 1.2 as QtControls 29 | import Hawaii.Controls.Styles 1.0 as Styles 30 | 31 | /** 32 | * A calendar control with Hawaii style. 33 | * @inherit QtQuick.Controls.Calendar 34 | */ 35 | QtControls.Calendar { 36 | id: calendar 37 | //style: Qt.createComponent(Styles.StyleSettings.path + "/CalendarStyle.qml", calendar) 38 | style: Qt.createComponent("Styles/" + Styles.StyleSettings.name + "/CalendarStyle.qml", calendar) 39 | } 40 | -------------------------------------------------------------------------------- /framework/controls/ToolButton.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.1 28 | import QtQuick.Controls 1.2 as QtControls 29 | import Hawaii.Controls.Styles 1.0 as Styles 30 | 31 | /** 32 | * A tool button control with Hawaii style. 33 | * @inherit QtQuick.Controls.ToolButton 34 | */ 35 | QtControls.ToolButton { 36 | id: toolButton 37 | //style: Qt.createComponent(Styles.StyleSettings.path + "/ToolButtonStyle.qml", toolButton) 38 | style: Qt.createComponent("Styles/" + Styles.StyleSettings.name + "/ToolButtonStyle.qml", toolButton) 39 | 40 | /** 41 | * Whether the tool button is flat. 42 | * Tool buttons are not flat by default. 43 | */ 44 | property bool flat: false 45 | 46 | /** 47 | * Desired icon size. 48 | */ 49 | property int iconSize: -1 50 | } 51 | -------------------------------------------------------------------------------- /framework/controls/plugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | #include "popupbehavior.h" 30 | 31 | class ControlsPlugin : public QQmlExtensionPlugin 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 35 | public: 36 | void registerTypes(const char *uri) 37 | { 38 | // @uri Hawaii.Controls 39 | Q_ASSERT(uri == QStringLiteral("Hawaii.Controls")); 40 | 41 | qmlRegisterType(uri, 1, 0, "PopupBehavior"); 42 | } 43 | }; 44 | 45 | #include "plugin.moc" 46 | -------------------------------------------------------------------------------- /framework/controls/plugins.qmltypes: -------------------------------------------------------------------------------- 1 | import QtQuick.tooling 1.1 2 | 3 | // This file describes the plugin-supplied types contained in the library. 4 | // It is used for QML tooling purposes only. 5 | // 6 | // This file was auto-generated by: 7 | // 'qmlplugindump -nonrelocatable Hawaii.Controls 1.0' 8 | 9 | Module { 10 | Component { 11 | name: "PopupBehavior" 12 | defaultProperty: "data" 13 | prototype: "QQuickItem" 14 | exports: ["Hawaii.Controls/PopupBehavior 1.0"] 15 | exportMetaObjectRevisions: [0] 16 | Signal { name: "clickedInside" } 17 | Signal { name: "dismissed" } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /framework/controls/popupbehavior.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef POPUPBEHAVIOR_H 28 | #define POPUPBEHAVIOR_H 29 | 30 | #include 31 | #include 32 | 33 | class PopupBehavior : public QQuickItem 34 | { 35 | Q_OBJECT 36 | public: 37 | PopupBehavior(QQuickItem *parent = 0); 38 | 39 | Q_SIGNALS: 40 | void clickedInside(); 41 | void dismissed(); 42 | 43 | protected: 44 | bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; 45 | void itemChange(ItemChange change, const ItemChangeData &data) Q_DECL_OVERRIDE; 46 | void componentComplete() Q_DECL_OVERRIDE; 47 | 48 | private: 49 | bool m_ready; 50 | QPointer m_filterHost; 51 | 52 | void updateEventFilter(bool enable); 53 | bool processEvent(QEvent *event); 54 | 55 | private Q_SLOTS: 56 | void update(); 57 | }; 58 | 59 | #endif // POPUPBEHAVIOR_H 60 | -------------------------------------------------------------------------------- /framework/controls/qmldir: -------------------------------------------------------------------------------- 1 | module Hawaii.Controls 2 | plugin controlsplugin 3 | classname ControlsPlugin 4 | typeinfo plugins.qmltypes 5 | Calendar 1.0 Calendar.qml 6 | Heading 1.0 Heading.qml 7 | TextField 1.0 TextField.qml 8 | ToolButton 1.0 ToolButton.qml 9 | SidePanel 1.0 SidePanel.qml 10 | -------------------------------------------------------------------------------- /framework/themes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | ${CMAKE_BINARY_DIR}/headers 3 | ) 4 | 5 | add_definitions(-DQT_PLUGIN) 6 | 7 | set(SOURCES 8 | plugin.cpp 9 | theme.cpp 10 | themesettings.cpp 11 | units.cpp 12 | ) 13 | 14 | add_library(declarative_hawaiithemes SHARED ${SOURCES}) 15 | target_link_libraries(declarative_hawaiithemes 16 | Qt5::Gui 17 | Qt5::Qml 18 | ) 19 | 20 | install(TARGETS declarative_hawaiithemes LIBRARY 21 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Themes) 22 | 23 | set(MODULE_FILES 24 | qmldir 25 | Palette.qml 26 | PaletteValues.qml 27 | StyledItem.qml 28 | ) 29 | install(FILES ${MODULE_FILES} 30 | DESTINATION ${QML_INSTALL_DIR}/Hawaii/Themes) 31 | -------------------------------------------------------------------------------- /framework/themes/Palette.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | 29 | QtObject { 30 | property PaletteValues window 31 | property PaletteValues view 32 | property PaletteValues panel 33 | 34 | function blendColors(color1, color2, a) { 35 | return Qt.tint(color1, rgba(color2, a)); 36 | } 37 | 38 | function rgba(color, a) { 39 | return Qt.rgba(color.r, color.g, color.b, a); 40 | } 41 | 42 | function luminance(color) { 43 | return (color.r * 0.2126) + (color.g * 0.7152) + (color.b * 0.0722); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /framework/themes/PaletteValues.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | 29 | QtObject { 30 | property color textColor 31 | property color textEffectColor 32 | property color backgroundColor 33 | property color selectedTextColor 34 | property color selectedTextEffectColor 35 | property color selectedBackgroundColor 36 | property color primaryColor 37 | property color secondaryColor 38 | } 39 | -------------------------------------------------------------------------------- /framework/themes/StyledItem.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2013-2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | 29 | /*! 30 | \qmltype StyledItem 31 | \qmlabstract 32 | \inqmlmodule Hawaii.Themes 1.0 33 | */ 34 | 35 | Item { 36 | id: root 37 | 38 | /*! \qmlproperty Component StyledItem::style 39 | The style Component for this item. 40 | \sa {Hawaii Themes QML Types} 41 | */ 42 | property Component style 43 | 44 | /*! \internal */ 45 | readonly property Item __styleInstance: styleLoader.status == Loader.Ready ? styleLoader.item : null 46 | 47 | implicitWidth: __styleInstance ? __styleInstance.implicitWidth : 0 48 | implicitHeight: __styleInstance ? __styleInstance.implicitHeight : 0 49 | 50 | Loader { 51 | id: styleLoader 52 | anchors.fill: parent 53 | sourceComponent: style 54 | onStatusChanged: { 55 | if (status === Loader.Error) 56 | console.error("Failed to load style for", root); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /framework/themes/qmldir: -------------------------------------------------------------------------------- 1 | module Hawaii.Themes 2 | plugin declarative_hawaiithemes 3 | Palette 1.0 Palette.qml 4 | PaletteValues 1.0 PaletteValues.qml 5 | StyledItem 1.0 StyledItem.qml 6 | -------------------------------------------------------------------------------- /framework/themes/themesettings.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | #include 29 | 30 | #include "themesettings.h" 31 | #include "cmakedirs.h" 32 | 33 | ThemeSettings::ThemeSettings(QObject *parent) 34 | : QObject(parent) 35 | { 36 | } 37 | 38 | QString ThemeSettings::name() const 39 | { 40 | return QStringLiteral("Wind"); 41 | } 42 | 43 | QString ThemeSettings::path() const 44 | { 45 | // TODO: Read style from settings 46 | QString theme = name(); 47 | 48 | // Return style only if it exists 49 | QStringList paths = 50 | QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, 51 | QStringLiteral("hawaii/themes/") + theme, 52 | QStandardPaths::LocateDirectory); 53 | for (const QString &path: paths) { 54 | QDir dir(path); 55 | if (dir.exists()) 56 | return path; 57 | } 58 | 59 | return QString(); 60 | } 61 | 62 | #include "moc_themesettings.cpp" 63 | -------------------------------------------------------------------------------- /framework/themes/themesettings.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef THEMESETTINGS_H 28 | #define THEMESETTINGS_H 29 | 30 | #include 31 | 32 | class ThemeSettings : public QObject 33 | { 34 | Q_OBJECT 35 | Q_PROPERTY(QString name READ name NOTIFY nameChanged) 36 | Q_PROPERTY(QString path READ path NOTIFY pathChanged) 37 | public: 38 | ThemeSettings(QObject *parent = 0); 39 | 40 | QString name() const; 41 | QString path() const; 42 | 43 | Q_SIGNALS: 44 | void nameChanged(); 45 | void pathChanged(); 46 | }; 47 | 48 | #endif // THEMESETTINGS_H 49 | -------------------------------------------------------------------------------- /headers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Create the cmakedirs.h header file 2 | configure_file(cmakedirs.h.in ${CMAKE_CURRENT_BINARY_DIR}/cmakedirs.h) 3 | 4 | # Create the config.h header file 5 | configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) 6 | -------------------------------------------------------------------------------- /headers/cmakedirs.h.in: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef CMAKEDIRS_H 28 | #define CMAKEDIRS_H 29 | 30 | #define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" 31 | #define INSTALL_BINDIR "@CMAKE_INSTALL_FULL_BINDIR@" 32 | #define INSTALL_DATADIR "@CMAKE_INSTALL_FULL_DATADIR@" 33 | #define INSTALL_CONFIGDIR "@KDE_INSTALL_FULL_CONFDIR@" 34 | #define INSTALL_QMLDIR "@CMAKE_INSTALL_FULL_QMLDIR@" 35 | #define INSTALL_PLUGINDIR "@CMAKE_INSTALL_FULL_PLUGINDIR@" 36 | 37 | #endif // CMAKEDIRS_H 38 | -------------------------------------------------------------------------------- /headers/config.h.in: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef HAWAII_CONFIG_H 28 | #define HAWAII_CONFIG_H 29 | 30 | #define HAWAII_VERSION_STRING "@PROJECT_VERSION@" 31 | #cmakedefine01 DEVELOPMENT_BUILD 32 | #cmakedefine01 HAVE_SYS_PRCTL_H 33 | #cmakedefine01 HAVE_PR_SET_DUMPABLE 34 | 35 | #endif // HAWAII_CONFIG_H 36 | -------------------------------------------------------------------------------- /headers/gitsha1.h.in: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #undef GIT_REV 28 | #undef GIT_REV_ 29 | 30 | #define STR_EXPAND(x) #x 31 | #define STR(x) STR_EXPAND(x) 32 | #define GIT_REV STR(GIT_REV_) 33 | #define GIT_REV_ \ 34 | -------------------------------------------------------------------------------- /headers/messages.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef HAWAII_MESSAGES_H 28 | #define HAWAII_MESSAGES_H 29 | 30 | namespace Hawaii { 31 | 32 | /*! Messages from compositor to session manager */ 33 | enum class CompositorMessages { 34 | SetIdle = 0 35 | }; 36 | 37 | /*! Messages from session manager to compositor */ 38 | enum class SessionMessages { 39 | Connected = 0, 40 | IdleInhibit, 41 | IdleUninhibit, 42 | LogOut 43 | }; 44 | 45 | } // namespace Hawaii 46 | 47 | #endif // HAWAII_MESSAGES_H 48 | 49 | -------------------------------------------------------------------------------- /scripts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Generate the starthawaii script 2 | configure_file(starthawaii.in ${CMAKE_CURRENT_BINARY_DIR}/starthawaii @ONLY) 3 | configure_file(hawaii-session.in ${CMAKE_CURRENT_BINARY_DIR}/hawaii-session @ONLY) 4 | 5 | install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/starthawaii 6 | DESTINATION ${BIN_INSTALL_DIR}) 7 | install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hawaii-session 8 | DESTINATION ${BIN_INSTALL_DIR}) 9 | -------------------------------------------------------------------------------- /scripts/hawaii-session.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This file is part of Hawaii. 4 | # 5 | # Copyright (C) 2013-2016 Pier Luigi Fiorini 6 | # 7 | # Author(s): 8 | # Pier Luigi Fiorini 9 | # 10 | # $BEGIN_LICENSE:GPL2+$ 11 | # 12 | # This program is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program. If not, see . 24 | # 25 | # $END_LICENSE$ 26 | # 27 | 28 | # Start the actual session 29 | cmd="@CMAKE_INSTALL_FULL_BINDIR@/greenisland-launcher --execute @CMAKE_INSTALL_FULL_BINDIR@/hawaii $@" 30 | if test -z "$DBUS_SESSION_BUS_ADDRESS"; then 31 | exec dbus-launch --exit-with-session $cmd 32 | else 33 | exec $cmd 34 | fi 35 | -------------------------------------------------------------------------------- /scripts/starthawaii.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This file is part of Hawaii. 4 | # 5 | # Copyright (C) 2013-2016 Pier Luigi Fiorini 6 | # 7 | # Author(s): 8 | # Pier Luigi Fiorini 9 | # 10 | # $BEGIN_LICENSE:GPL2+$ 11 | # 12 | # This program is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program. If not, see . 24 | # 25 | # $END_LICENSE$ 26 | # 27 | 28 | # This is a compatibility script for older versions, 29 | # drop when we know nobody is using it anymore 30 | echo 31 | echo "This script executes hawaii-session and it is still" 32 | echo "available for compatibility, please use hawaii-session" 33 | echo "instead. This script will be removed in the future." 34 | echo 35 | 36 | # Start the actual session 37 | exec @CMAKE_INSTALL_FULL_BINDIR@/hawaii-session $@ 38 | -------------------------------------------------------------------------------- /shell/XWayland.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import GreenIsland.XWayland 1.0 29 | 30 | Item { 31 | XWayland { 32 | id: xwayland 33 | enabled: true 34 | compositor: hawaiiCompositor 35 | onShellSurfaceCreated: { 36 | var item = xwindowComponent.createObject(hawaiiCompositor.defaultOutput.surfacesArea, {"shellSurface": shellSurface}); 37 | } 38 | } 39 | 40 | Component { 41 | id: xwindowComponent 42 | 43 | XWaylandWindowChrome {} 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /shell/components/CloseButton.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Fluid.Ui 1.0 as FluidUi 29 | 30 | Rectangle { 31 | property alias hovered: mouseArea.containsMouse 32 | signal clicked() 33 | 34 | id: root 35 | width: FluidUi.Units.iconSizes.smallMedium 36 | height: width 37 | radius: width * 0.5 38 | border.color: Qt.rgba(1, 1, 1, 0.35) 39 | border.width: FluidUi.Units.gu(0.05) 40 | gradient: Gradient { 41 | GradientStop { position: 0; color: "#666" } 42 | GradientStop { position: 1; color: "#222" } 43 | } 44 | antialiasing: true 45 | 46 | FluidUi.Icon { 47 | anchors.centerIn: parent 48 | iconName: "window-close-symbolic" 49 | color: "white" 50 | width: parent.width - FluidUi.Units.smallSpacing 51 | height: width 52 | } 53 | 54 | MouseArea { 55 | id: mouseArea 56 | anchors.fill: parent 57 | hoverEnabled: true 58 | onClicked: root.clicked() 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /shell/components/MenuSeparator.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls.Material 2.0 29 | import Fluid.Ui 1.0 as FluidUi 30 | 31 | Rectangle { 32 | id: root 33 | width: parent.width 34 | height: FluidUi.Units.dp(1) 35 | color: Material.dividerColor 36 | antialiasing: true 37 | } 38 | -------------------------------------------------------------------------------- /shell/components/ToolButton.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls 2.0 29 | import Fluid.Ui 1.0 as FluidUi 30 | 31 | ToolButton { 32 | property alias iconName: indicator.iconName 33 | property alias iconSize: indicator.width 34 | 35 | id: toolButton 36 | indicator: FluidUi.Icon { 37 | id: indicator 38 | anchors.centerIn: parent 39 | width: FluidUi.Units.iconSizes.small 40 | height: width 41 | color: toolButton.contentItem.color 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /shell/components/private/PopupBase.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | 29 | Item { 30 | property Item visualLayer 31 | property Item visualParent 32 | readonly property alias showing: __priv.showing 33 | 34 | id: popup 35 | 36 | QtObject { 37 | id: __priv 38 | 39 | property bool showing: false 40 | } 41 | 42 | function open() { 43 | if (showing) 44 | return; 45 | 46 | var x = (visualParent.width * 0.5) - (popup.width * 0.5); 47 | var y = -popup.height; 48 | openAt(x, y); 49 | } 50 | 51 | function openAt(x, y) { 52 | if (showing) 53 | return; 54 | 55 | var pt = mainItem.mapFromItem(visualParent, x, y); 56 | popup.parent = visualLayer; 57 | popup.x = pt.x; 58 | popup.y = pt.y; 59 | __priv.showing = true; 60 | } 61 | 62 | function close() { 63 | if (!showing) 64 | return; 65 | 66 | __priv.showing = false; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /shell/decoration/graphics/dropshadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/shell/decoration/graphics/dropshadow.png -------------------------------------------------------------------------------- /shell/decoration/graphics/dropshadow.sci: -------------------------------------------------------------------------------- 1 | border.left: 60 2 | border.top: 60 3 | border.bottom: 60 4 | border.right: 60 5 | source: dropshadow.png 6 | -------------------------------------------------------------------------------- /shell/desktop/HotCorner.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls.Material 2.0 29 | import Fluid.Ui 1.0 as FluidUi 30 | 31 | Rectangle { 32 | width: FluidUi.Units.dp(32) 33 | height: width 34 | radius: width / 2 35 | antialiasing: true 36 | color: Material.accent 37 | opacity: 0.0 38 | 39 | Behavior on opacity { 40 | NumberAnimation { 41 | easing.type: Easing.InOutQuad 42 | duration: FluidUi.Units.shortDuration 43 | } 44 | } 45 | 46 | MouseArea { 47 | anchors.fill: parent 48 | acceptedButtons: Qt.NoButton 49 | hoverEnabled: true 50 | onEntered: parent.opacity = 1.0 51 | onExited: parent.opacity = 0.0 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /shell/desktop/Keyboard.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.5 28 | import QtQuick.VirtualKeyboard 2.1 29 | 30 | InputPanel { 31 | id: keyboard 32 | anchors.left: parent.left 33 | anchors.right: parent.right 34 | visible: active 35 | } 36 | -------------------------------------------------------------------------------- /shell/desktop/OutputConfiguration.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import GreenIsland 1.0 as GreenIsland 29 | 30 | GreenIsland.OutputConfiguration { 31 | id: config 32 | onChangeRequested: { 33 | var i, changeset; 34 | for (i = 0; i < config.changes.length; i++) { 35 | changeset = config.changes[i]; 36 | if (!changeset.output.nativeScreen.applyChangeset(changeset)) { 37 | changeset.output.nativeScreen.discardChangeset(changeset); 38 | config.setFailed(); 39 | break; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /shell/images/wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/shell/images/wallpaper.png -------------------------------------------------------------------------------- /shell/indicators/ChatIndicator.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Layouts 1.0 29 | import Hawaii.Controls 1.0 as Controls 30 | import Fluid.Ui 1.0 as FluidUi 31 | import ".." 32 | 33 | Indicator { 34 | name: "chat" 35 | iconName: "im-google" 36 | component: Component { 37 | ColumnLayout { 38 | spacing: FluidUi.Units.largeSpacing 39 | 40 | Controls.Heading { 41 | text: qsTr("Messages") 42 | } 43 | 44 | Item { 45 | Layout.fillHeight: true 46 | } 47 | } 48 | } 49 | visible: false 50 | } 51 | -------------------------------------------------------------------------------- /shell/indicators/LauncherIndicator.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Fluid.Ui 1.0 as FluidUi 29 | import ".." 30 | import "../launcher" as Launcher 31 | 32 | Indicator { 33 | id: indicator 34 | name: "launcher" 35 | text: qsTr("Menu") 36 | onTriggered: popover.open() 37 | 38 | Launcher.LauncherPopOver { 39 | id: popover 40 | x: FluidUi.Units.largeSpacing 41 | y: -height - FluidUi.Units.largeSpacing 42 | onAppLaunched: close() 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /shell/indicators/network/AirplaneMode.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Layouts 1.0 29 | import QtQuick.Controls 2.0 30 | import Fluid.Ui 1.0 as FluidUi 31 | 32 | RowLayout { 33 | readonly property alias airplaneMode: __priv.airplaneMode 34 | 35 | signal clicked() 36 | 37 | id: root 38 | spacing: FluidUi.Units.smallSpacing 39 | 40 | QtObject { 41 | id: __priv 42 | 43 | property bool airplaneMode: false 44 | } 45 | 46 | Switch { 47 | id: airplaneSwitch 48 | onClicked: { 49 | __priv.airplaneMode = !__priv.airplaneMode; 50 | root.clicked(); 51 | } 52 | } 53 | 54 | FluidUi.Icon { 55 | id: airplaneModeIcon 56 | iconName: "airplane-mode-symbolic" 57 | width: FluidUi.Units.iconSizes.smallMedium 58 | height: width 59 | color: label.color 60 | } 61 | 62 | Label { 63 | id: label 64 | text: airplaneMode ? qsTr("Airplane mode enabled") : qsTr("Airplane mode disabled") 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /shell/indicators/network/Header.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Layouts 1.1 29 | import QtQuick.Controls 2.0 30 | import Fluid.Ui 1.0 as FluidUi 31 | import "../../components" as CustomComponents 32 | 33 | RowLayout { 34 | property alias text: label.text 35 | 36 | spacing: FluidUi.Units.smallSpacing 37 | implicitWidth: ListView.view.width 38 | implicitHeight: Math.max(label.paintedHeight, refreshButton.height) + (FluidUi.Units.smallSpacing * 2) 39 | 40 | Label { 41 | id: label 42 | font.weight: Font.DemiBold 43 | 44 | Layout.fillWidth: true 45 | } 46 | 47 | CustomComponents.ToolButton { 48 | id: refreshButton 49 | iconName: "view-refresh-symbolic" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /shell/launcher/LauncherCategories.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls 2.0 29 | import Fluid.Ui 1.0 as FluidUi 30 | import org.hawaiios.launcher 0.1 as CppLauncher 31 | 32 | ListView { 33 | signal selected(string category) 34 | 35 | id: root 36 | currentIndex: 0 37 | model: CppLauncher.CategoriesModel { 38 | id: categoriesModel 39 | } 40 | delegate: ItemDelegate { 41 | property string category: model.category 42 | 43 | width: parent.width 44 | text: model.display 45 | highlighted: root.currentIndex == index 46 | onClicked: root.currentIndex = index 47 | } 48 | onCurrentIndexChanged: if (currentItem) root.selected(currentItem.category) 49 | 50 | //ScrollIndicator.vertical: ScrollIndicator {} 51 | } 52 | -------------------------------------------------------------------------------- /shell/overlays/HelpOverlay.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | Rectangle { 4 | width: 100 5 | height: 62 6 | } 7 | 8 | -------------------------------------------------------------------------------- /shell/screens/SplashScreen.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtGraphicalEffects 1.0 29 | import QtQuick.Controls 2.0 30 | 31 | Item { 32 | Image { 33 | id: picture 34 | anchors.fill: parent 35 | source: hawaiiCompositor.settings.background.pictureUrl 36 | sourceSize.width: width * 0.75 37 | sourceSize.height: height * 0.75 38 | fillMode: hawaiiCompositor.settings.convertFillMode(hawaiiCompositor.settings.background.fillMode) 39 | cache: false 40 | visible: false 41 | } 42 | 43 | FastBlur { 44 | anchors.fill: picture 45 | source: picture 46 | radius: 32 47 | } 48 | 49 | BusyIndicator { 50 | anchors.centerIn: parent 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /shell/windows/WindowMenu.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls 2.0 29 | import Fluid.Ui 1.0 as FluidUi 30 | import "../components" as CustomComponents 31 | 32 | Menu { 33 | MenuItem { 34 | text: qsTr("Minimize") 35 | } 36 | 37 | MenuItem { 38 | text: qsTr("Restore") 39 | } 40 | 41 | MenuItem { 42 | text: qsTr("Maximize") 43 | } 44 | 45 | CustomComponents.MenuSeparator {} 46 | 47 | MenuItem { 48 | text: qsTr("Move") 49 | } 50 | 51 | MenuItem { 52 | text: qsTr("Resize") 53 | } 54 | 55 | CustomComponents.MenuSeparator {} 56 | 57 | MenuItem { 58 | text: qsTr("Close") 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /styles/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(wind) 2 | -------------------------------------------------------------------------------- /styles/wind/BusyIndicatorStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls.Styles 1.1 as QtControlsStyle 29 | 30 | QtControlsStyle.BusyIndicatorStyle { 31 | } 32 | -------------------------------------------------------------------------------- /styles/wind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(MODULE_FILES 2 | qmldir 3 | BusyIndicatorStyle.qml 4 | ButtonStyle.qml 5 | CalendarStyle.qml 6 | FocusFrameStyle.qml 7 | GroupBoxStyle.qml 8 | MenuStyle.qml 9 | ProgressBarStyle.qml 10 | ScrollViewStyle.qml 11 | SliderStyle.qml 12 | TextFieldStyle.qml 13 | ToolButtonStyle.qml 14 | ) 15 | install(FILES ${MODULE_FILES} 16 | DESTINATION ${QML_INSTALL_DIR}/QtQuick/Controls/Styles/Wind) 17 | 18 | set(IMAGE_FILES 19 | images/arrow-down.png 20 | images/arrow-down@2x.png 21 | images/arrow-left.png 22 | images/arrow-left@2x.png 23 | images/arrow-right.png 24 | images/arrow-right@2x.png 25 | images/arrow-up.png 26 | images/arrow-up@2x.png 27 | images/focusframe.png 28 | images/noise-texture.png 29 | images/progress-indeterminate.png 30 | ) 31 | install(FILES ${IMAGE_FILES} 32 | DESTINATION ${QML_INSTALL_DIR}/QtQuick/Controls/Styles/Wind/images) 33 | -------------------------------------------------------------------------------- /styles/wind/FocusFrameStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | 29 | Item { 30 | property int margin: -3 31 | } 32 | -------------------------------------------------------------------------------- /styles/wind/MenuStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls.Styles 1.3 as QtControlsStyle 29 | 30 | QtControlsStyle.MenuStyle { 31 | } 32 | -------------------------------------------------------------------------------- /styles/wind/SliderStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls.Styles 1.3 as QtControlsStyle 29 | 30 | QtControlsStyle.SliderStyle { 31 | } 32 | -------------------------------------------------------------------------------- /styles/wind/images/CREDITS: -------------------------------------------------------------------------------- 1 | All images but noise-texture.png are coming from qtquickcontrols. 2 | -------------------------------------------------------------------------------- /styles/wind/images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-down.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-down@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-down@2x.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-left.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-left@2x.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-right.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-right@2x.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-up.png -------------------------------------------------------------------------------- /styles/wind/images/arrow-up@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/arrow-up@2x.png -------------------------------------------------------------------------------- /styles/wind/images/focusframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/focusframe.png -------------------------------------------------------------------------------- /styles/wind/images/noise-texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/noise-texture.png -------------------------------------------------------------------------------- /styles/wind/images/progress-indeterminate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/styles/wind/images/progress-indeterminate.png -------------------------------------------------------------------------------- /styles/wind/qmldir: -------------------------------------------------------------------------------- 1 | module QtQuick.Controls.Styles.Wind 2 | singleton Palette 1.0 Palette.qml 3 | BusyIndicatorStyle 1.0 BusyIndicatorStyle.qml 4 | ButtonStyle 1.0 ButtonStyle.qml 5 | CalendarStyle 1.0 CalendarStyle.qml 6 | FocusFrameStyle 1.0 FocusFrameStyle.qml 7 | GroupBoxStyle 1.0 GroupBoxStyle.qml 8 | MenuStyle 1.0 MenuStyle.qml 9 | ProgressBarStyle 1.0 ProgressBarStyle.qml 10 | ScrollViewStyle 1.0 ScrollViewStyle.qml 11 | SliderStyle 1.0 SliderStyle.qml 12 | TextFieldStyle 1.0 TextFieldStyle.qml 13 | ToolButtonStyle 1.0 ToolButtonStyle.qml 14 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(auto) 2 | -------------------------------------------------------------------------------- /tests/auto/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ECMMarkAsTest) 2 | 3 | find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Test QuickTest) 4 | -------------------------------------------------------------------------------- /themes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(sddm) 2 | add_subdirectory(shell) 3 | -------------------------------------------------------------------------------- /themes/sddm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY hawaii/ 2 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sddm/themes/hawaii 3 | PATTERN dummydata EXCLUDE) 4 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/components/CircleIcon.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Themes 1.0 as Themes 29 | import Fluid.Ui 1.0 as FluidUi 30 | 31 | Item { 32 | property alias iconSize: icon.width 33 | property alias iconName: icon.iconName 34 | 35 | width: iconSize * 1.5 36 | height: width 37 | 38 | Rectangle { 39 | id: container 40 | anchors.fill: parent 41 | color: Themes.Theme.palette.panel.backgroundColor 42 | border.color: Themes.Theme.palette.rgba(Qt.darker(color, 1.3), 0.5) 43 | border.width: Themes.Units.dp(1) 44 | radius: width / 2 45 | antialiasing: true 46 | } 47 | 48 | FluidUi.Icon { 49 | id: icon 50 | anchors.centerIn: parent 51 | iconName: "avatar-default-symbolic" 52 | height: width 53 | color: "white" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/dummydata/keyboard.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | Item { 4 | property bool numLock: true 5 | property bool capsLock: false 6 | property var currentLayout: 0 7 | property var layouts: [ 8 | {"shortName": "it", "longName": "Italiano"}, 9 | {"shortName": "en", "longName": "English (US)"} 10 | ] 11 | property bool enabled: true 12 | } 13 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/dummydata/screenModel.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | Item { 4 | function geometry(primary) { 5 | return Qt.rect(0, 0, 1366, 768); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/dummydata/sddm.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | QtObject { 4 | property bool canPowerOff: true 5 | property bool canReboot: true 6 | property bool canSuspend: true 7 | property bool canHibernate: true 8 | property bool canHybridSleep: true 9 | property string hostname: "MyHostname" 10 | 11 | signal loginFailed() 12 | signal loginSucceeded() 13 | 14 | function powerOff() { 15 | console.log("SDDM - POWERING OFF"); 16 | } 17 | function reboot() { 18 | console.log("SDDM - REBOOTING"); 19 | } 20 | function suspend() { 21 | console.log("SDDM - SUSPEND"); 22 | } 23 | function hibernate() { 24 | console.log("SDDM - HIBERNATE"); 25 | } 26 | function hybridSleep() { 27 | console.log("SDDM - HYBRID SLEEP"); 28 | } 29 | 30 | function login(user, password, sessionIndex) { 31 | console.log("SDDM - logging into session index " + sessionIndex + " as [" + user + "] [" + password + "]"); 32 | 33 | // Login 34 | if (user == "plfiorini" && password == "password") 35 | loginSucceeded(); 36 | else 37 | loginFailed(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/dummydata/sessionModel.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | ListModel { 4 | property int lastIndex: 0 5 | 6 | ListElement { name: "Hawaii" } 7 | ListElement { name: "GNOME" } 8 | ListElement { name: "Plasma" } 9 | } 10 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/dummydata/tyrion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/themes/sddm/hawaii/dummydata/tyrion.png -------------------------------------------------------------------------------- /themes/sddm/hawaii/dummydata/userModel.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | ListModel { 4 | property int lastIndex: 1 5 | 6 | ListElement { 7 | name: "plfiorini" 8 | realName: "Pier Luigi Fiorini" 9 | icon: "/usr/share/pixmaps/faces/grapes.jpg" 10 | homeDir: "/home/plfiorini" 11 | } 12 | ListElement { 13 | name: "ned" 14 | realName: "Eddard Stark" 15 | icon: "/home/ned/.face.icon" 16 | homeDir: "/home/ned" 17 | } 18 | ListElement { 19 | name: "kinginthenorth" 20 | realName: "Robb Stark" 21 | icon: "" 22 | homeDir: "" 23 | } 24 | ListElement { 25 | name: "jon" 26 | realName: "Jon Snow" 27 | icon: "" 28 | homeDir:"" 29 | } 30 | ListElement { 31 | name: "imp" 32 | realName: "Tyrion Lannister" 33 | icon: "../dummydata/tyrion.png" 34 | homeDir: "" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/indicators/Keyboard.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.1 28 | import QtQuick.Controls 1.0 29 | import SddmComponents 2.0 30 | import Hawaii.Themes 1.0 as Themes 31 | import Hawaii.Controls 1.0 as Controls 32 | import "../components" as Components 33 | 34 | Components.Button { 35 | iconName: "input-keyboard-symbolic" 36 | text: keyboard.layouts[keyboard.currentLayout].shortName 37 | //: Keyboard layout indicator tooltip 38 | //~ Indicator to change keyboard layout 39 | tooltip: qsTr("Change keyboard layout") 40 | visible: keyboard.layouts.length > 1 41 | onClicked: { 42 | var index = keyboard.currentLayout; 43 | if (index == (keyboard.layouts.length - 1)) 44 | index = -1; 45 | keyboard.currentLayout = index + 1; 46 | } 47 | 48 | //: Keyboard layout indicator accessibility name 49 | //~ Indicator to change keyboard layout 50 | Accessible.name: qsTr("Switch layout") 51 | } 52 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/metadata.desktop: -------------------------------------------------------------------------------- 1 | [SddmGreeterTheme] 2 | Type=sddm-theme 3 | Name=Hawaii 4 | Description=Official theme for Hawaii 5 | Author=Pier Luigi Fiorini 6 | Email=pierluigi.fiorini@gmail.com 7 | Copyright=(C) 2014-2016 Pier Luigi Fiorini 8 | License=CC-BY-SA 9 | Version=0.1 10 | Website=http://hawaiios.org 11 | Screenshot=screenshot.png 12 | ConfigFile=theme.conf 13 | MainScript=Main.qml 14 | TranslationsDirectory=translations 15 | Theme-Id=hawaii 16 | Theme-API=2.0 17 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/screens/BootSplash.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | 29 | Item { 30 | /* 31 | Image { 32 | anchors.centerIn: parent 33 | source: "../artwork/logo.png" 34 | sourceSize.width: 357 35 | sourceSize.height: 350 36 | fillMode: Image.PreserveAspectFit 37 | smooth: true 38 | } 39 | */ 40 | } 41 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/screens/DesktopStill.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import QtQuick.Controls 1.0 29 | import QtGraphicalEffects 1.0 30 | import Hawaii.Themes 1.0 as Themes 31 | import Hawaii.Controls 1.0 as Controls 32 | import Hawaii.GSettings 1.0 as Settings 33 | 34 | Item { 35 | property int stage: 0 36 | 37 | id: root 38 | onStageChanged: { 39 | if (stage == 6) 40 | desaturate.desaturation = 0.4; 41 | } 42 | 43 | Settings.Settings { 44 | id: bgSettings 45 | schema.id: "org.hawaiios.desktop.background" 46 | schema.path: "/org/hawaiios/desktop/background/" 47 | } 48 | 49 | 50 | // TODO: Load a copy of user selecter wallpaper with blur 51 | // and remove the FastBlur here 52 | Image { 53 | id: image 54 | anchors.fill: parent 55 | source: bgSettings.pictureUrl 56 | sourceSize.width: width 57 | sourceSize.height: height 58 | smooth: true 59 | visible: false 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /themes/sddm/hawaii/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/themes/sddm/hawaii/screenshot.png -------------------------------------------------------------------------------- /themes/sddm/hawaii/theme.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | iconTheme=Hawaii 3 | cursorTheme=Hawaii 4 | platformTheme=Hawaii 5 | -------------------------------------------------------------------------------- /themes/shell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(wind) 2 | -------------------------------------------------------------------------------- /themes/shell/wind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(FILES 2 | theme.ini 3 | Palette.qml 4 | Popover.qml 5 | PopupMenu.qml 6 | Tooltip.qml 7 | ) 8 | install(FILES ${FILES} 9 | DESTINATION ${DATA_INSTALL_DIR}/hawaii/themes/Wind) 10 | 11 | set(IMAGES 12 | images/dropshadow.png 13 | images/dropshadow.sci 14 | ) 15 | install(FILES ${IMAGES} 16 | DESTINATION ${DATA_INSTALL_DIR}/hawaii/themes/Wind/images) 17 | -------------------------------------------------------------------------------- /themes/shell/wind/Popover.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Themes 1.0 as Themes 29 | 30 | Item { 31 | BorderImage { 32 | id: shadow 33 | anchors.fill: parent 34 | anchors.margins: -Themes.Units.gu(2) 35 | source: "images/dropshadow.sci" 36 | opacity: 0.8 37 | } 38 | 39 | Rectangle { 40 | anchors.fill: parent 41 | color: Themes.Theme.palette.panel.backgroundColor 42 | radius: Themes.Units.dp(6) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /themes/shell/wind/PopupMenu.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Themes 1.0 as Themes 29 | 30 | Item { 31 | BorderImage { 32 | id: shadow 33 | anchors.fill: parent 34 | anchors.margins: -Themes.Units.gu(2) 35 | source: "images/dropshadow.sci" 36 | opacity: 0.8 37 | } 38 | 39 | Rectangle { 40 | anchors.fill: parent 41 | color: Themes.Theme.palette.panel.backgroundColor 42 | radius: Themes.Units.dp(6) 43 | border.color: Themes.Theme.palette.rgba(Qt.darker(Themes.Theme.palette.panel.backgroundColor, 1.5), 0.3) 44 | border.width: Themes.Units.dp(1) 45 | antialiasing: true 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /themes/shell/wind/Tooltip.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | import QtQuick 2.0 28 | import Hawaii.Themes 1.0 as Themes 29 | 30 | Rectangle { 31 | color: Themes.Theme.palette.panel.backgroundColor 32 | radius: Themes.Units.dp(6) 33 | border.color: Themes.Theme.palette.rgba(Qt.darker(Themes.Theme.palette.panel.backgroundColor, 1.5), 0.25) 34 | border.width: Themes.Units.dp(1) 35 | antialiasing: true 36 | } 37 | -------------------------------------------------------------------------------- /themes/shell/wind/images/dropshadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/hawaii-shell/d02a209082819e3bfa3edd167328b4ed52ebf6e1/themes/shell/wind/images/dropshadow.png -------------------------------------------------------------------------------- /themes/shell/wind/images/dropshadow.sci: -------------------------------------------------------------------------------- 1 | border.left: 60 2 | border.top: 60 3 | border.bottom: 60 4 | border.right: 60 5 | source: dropshadow.png 6 | -------------------------------------------------------------------------------- /themes/shell/wind/theme.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | ControlsStyle=Wind 3 | 4 | [DefaultFont] 5 | Family=Noto Sans 6 | PointSize=11 7 | 8 | [SmallestFont] 9 | Family=Noto Sans 10 | PointSize=8 11 | 12 | [MonospaceFont] 13 | Family=Droid Sans Mono 14 | PointSize=10 15 | -------------------------------------------------------------------------------- /translations/shell/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | lupdate-qt5 ../../shell -ts shell.ts 3 | --------------------------------------------------------------------------------