├── debian ├── compat ├── source │ └── format ├── copyright ├── changelog ├── rules └── control ├── resources.qrc ├── src ├── iconthemeimageprovider.h ├── systemappitem.cpp ├── iconthemeimageprovider.cpp ├── processprovider.h ├── systemappitem.h ├── applicationitem.h ├── processprovider.cpp ├── com.cutefish.Dock.xml ├── fakewindow.h ├── trashmanager.h ├── systemappmonitor.h ├── activity.h ├── utils.h ├── main.cpp ├── xwindowinterface.h ├── trashmanager.cpp ├── docksettings.h ├── activity.cpp ├── applicationmodel.h ├── mainwindow.h ├── fakewindow.cpp ├── docksettings.cpp ├── systemappmonitor.cpp ├── utils.cpp └── xwindowinterface.cpp ├── README.md ├── .gitignore ├── cutefish-dock-list.conf ├── .github └── workflows │ └── build.yml ├── translations ├── zh_CN.ts ├── zh_TW.ts ├── ja_JP.ts ├── so.ts ├── vi_VN.ts ├── en_US.ts ├── tzm.ts ├── az_AZ.ts ├── da_DK.ts ├── pt_PT.ts ├── sw.ts ├── bn_BD.ts ├── id_ID.ts ├── nb_NO.ts ├── sk_SK.ts ├── sr_RS.ts ├── bs_BA.ts ├── cs_CZ.ts ├── es_ES.ts ├── he_IL.ts ├── hr_HR.ts ├── hu_HU.ts ├── it_IT.ts ├── nl_NL.ts ├── pl_PL.ts ├── ru_RU.ts ├── ta_IN.ts ├── tr_TR.ts ├── ar_AA.ts ├── be_BY.ts ├── es_MX.ts ├── hi_IN.ts ├── lv_LV.ts ├── pt_BR.ts ├── sv_SE.ts ├── be_Latn.ts ├── de_DE.ts ├── fa_IR.ts ├── fi_FI.ts ├── fr_FR.ts ├── ie.ts ├── lt_LT.ts ├── ne_NP.ts ├── uk_UA.ts ├── ml_IN.ts ├── uz_UZ.ts ├── bg_BG.ts ├── ro_RO.ts ├── si_LK.ts ├── mg.ts └── eo_XX.ts ├── CMakeLists.txt ├── qml ├── AppItem.qml ├── main.qml └── DockItem.qml └── images ├── rocket.svg └── launcher.svg /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: cutefish-dock 3 | Source: cutefishos.com 4 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | cutefish-dock (0.8) UNRELEASED; urgency=low 2 | 3 | * Update 0.7 4 | 5 | -- CutefishOS Sat, 29 Jan 2022 03:17:39 +0800 -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | export QT_SELECT=5 4 | 5 | %: 6 | dh $@ 7 | 8 | override_dh_auto_configure: 9 | dh_auto_configure -- -DEMBED_TRANSLATIONS=ON -DBUILD_TESTING=ON 10 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | qml/main.qml 4 | qml/DockItem.qml 5 | qml/AppItem.qml 6 | images/launchpad.svg 7 | images/rocket.svg 8 | images/launcher.svg 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/iconthemeimageprovider.h: -------------------------------------------------------------------------------- 1 | #ifndef ICONTHEMEIMAGEPROVIDER_H 2 | #define ICONTHEMEIMAGEPROVIDER_H 3 | 4 | #include 5 | 6 | class IconThemeImageProvider : public QQuickImageProvider 7 | { 8 | public: 9 | IconThemeImageProvider(); 10 | 11 | QPixmap requestPixmap(const QString &id, QSize *realSize, const QSize &requestedSize); 12 | }; 13 | 14 | #endif // ICONTHEMEIMAGEPROVIDER_H 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dock 2 | 3 | CutefishOS application dock. 4 | 5 | ## Dependencies 6 | 7 | ```shell 8 | sudo pacman -S gcc cmake qt5-base qt5-quickcontrols2 kwindowsystem 9 | ``` 10 | 11 | You also need [`fishui`](https://github.com/cutefishos/fishui) and [`libcutefish`](https://github.com/cutefishos/libcutefish). 12 | 13 | ## Build and Install 14 | 15 | ``` 16 | mkdir build 17 | cd build 18 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. 19 | make 20 | sudo make install 21 | ``` 22 | 23 | ## License 24 | 25 | This project has been licensed by GPLv3. 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | *.slo 3 | *.lo 4 | *.o 5 | *.a 6 | *.la 7 | *.lai 8 | *.so 9 | *.so.* 10 | *.dll 11 | *.dylib 12 | 13 | # Qt-es 14 | object_script.*.Release 15 | object_script.*.Debug 16 | *_plugin_import.cpp 17 | /.qmake.cache 18 | /.qmake.stash 19 | *.pro.user 20 | *.pro.user.* 21 | *.qbs.user 22 | *.qbs.user.* 23 | *.moc 24 | moc_*.cpp 25 | moc_*.h 26 | qrc_*.cpp 27 | ui_*.h 28 | *.qmlc 29 | *.jsc 30 | Makefile* 31 | *build-* 32 | *.qm 33 | *.prl 34 | 35 | # Qt unit tests 36 | target_wrapper.* 37 | 38 | # QtCreator 39 | *.autosave 40 | 41 | # QtCreator Qml 42 | *.qmlproject.user 43 | *.qmlproject.user.* 44 | 45 | # QtCreator CMake 46 | CMakeLists.txt.user* 47 | 48 | # QtCreator 4.8< compilation database 49 | compile_commands.json 50 | 51 | # QtCreator local machine specific files for imported projects 52 | *creator.user* 53 | 54 | build/* 55 | .vscode/ 56 | -------------------------------------------------------------------------------- /cutefish-dock-list.conf: -------------------------------------------------------------------------------- 1 | [cutefish-filemanager] 2 | DesktopPath=/usr/share/applications/cutefish-filemanager.desktop 3 | Index=0 4 | 5 | [cutefish-terminal] 6 | DesktopPath=/usr/share/applications/cutefish-terminal.desktop 7 | Index=1 8 | 9 | [chromium] 10 | DesktopPath=/usr/share/applications/chromium.desktop 11 | Index=2 12 | 13 | [cutefish-settings] 14 | DesktopPath=/usr/share/applications/cutefish-settings.desktop 15 | Index=3 16 | 17 | [cutefish-calculator] 18 | DesktopPath=/usr/share/applications/cutefish-calculator.desktop 19 | Index=4 20 | 21 | [cutefish-debinstaller] 22 | DesktopPath=/usr/share/applications/cutefish-debinstaller.desktop 23 | Index=5 24 | 25 | [cutefish-screenshot] 26 | DesktopPath=/usr/share/applications/cutefish-screenshot.desktop 27 | Index=6 28 | 29 | [cutefish-videoplayer] 30 | DesktopPath=/usr/share/applications/cutefish-videoplayer.desktop 31 | Index=7 32 | -------------------------------------------------------------------------------- /src/systemappitem.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "systemappitem.h" 21 | 22 | SystemAppItem::SystemAppItem(QObject *parent) 23 | : QObject(parent) 24 | { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/iconthemeimageprovider.cpp: -------------------------------------------------------------------------------- 1 | #include "iconthemeimageprovider.h" 2 | #include 3 | 4 | IconThemeImageProvider::IconThemeImageProvider() 5 | : QQuickImageProvider(QQuickImageProvider::Pixmap) 6 | { 7 | } 8 | 9 | QPixmap IconThemeImageProvider::requestPixmap(const QString &id, QSize *realSize, 10 | const QSize &requestedSize) 11 | { 12 | // Sanitize requested size 13 | QSize size(requestedSize); 14 | if (size.width() < 1) 15 | size.setWidth(1); 16 | if (size.height() < 1) 17 | size.setHeight(1); 18 | 19 | // Return real size 20 | if (realSize) 21 | *realSize = size; 22 | 23 | // Is it a path? 24 | if (id.startsWith(QLatin1Char('/'))) 25 | return QPixmap(id).scaled(size); 26 | 27 | // Return icon from theme or fallback to a generic icon 28 | QIcon icon = QIcon::fromTheme(id); 29 | if (icon.isNull()) 30 | icon = QIcon::fromTheme(QLatin1String("application-x-desktop")); 31 | 32 | return icon.pixmap(size); 33 | } 34 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: cutefish-dock 2 | Section: devel 3 | Priority: optional 4 | Maintainer: CutefishOS 5 | Build-Depends: cmake, 6 | debhelper (>= 9), 7 | extra-cmake-modules, 8 | libkf5windowsystem-dev, 9 | libqt5x11extras5-dev, 10 | qtbase5-dev, 11 | qtdeclarative5-dev, 12 | qtquickcontrols2-5-dev, 13 | qttools5-dev, 14 | qttools5-dev-tools 15 | Standards-Version: 4.5.0 16 | Homepage: https://cutefishos.com 17 | 18 | Package: cutefish-dock 19 | Architecture: any 20 | Depends: qml-module-qtquick-controls2, 21 | qml-module-qtquick2, 22 | qml-module-qtquick-layouts, 23 | qml-module-qt-labs-platform, 24 | qml-module-qt-labs-settings, 25 | qml-module-qtqml, 26 | qml-module-qtquick-window2, 27 | qml-module-qtquick-shapes, 28 | qml-module-qtgraphicaleffects, 29 | ${misc:Depends}, 30 | ${shlibs:Depends} 31 | Description: CutefishOS Dock 32 | -------------------------------------------------------------------------------- /src/processprovider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef PROCESSPROVIDER_H 21 | #define PROCESSPROVIDER_H 22 | 23 | #include 24 | 25 | class ProcessProvider : public QObject 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | explicit ProcessProvider(QObject *parent = nullptr); 31 | 32 | Q_INVOKABLE static bool startDetached(const QString &exec, QStringList args = QStringList()); 33 | }; 34 | 35 | #endif // PROCESSPROVIDER_H 36 | -------------------------------------------------------------------------------- /src/systemappitem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef SYSTEMAPPITEM_H 21 | #define SYSTEMAPPITEM_H 22 | 23 | #include 24 | 25 | class SystemAppItem : public QObject 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | explicit SystemAppItem(QObject *parent = nullptr); 31 | 32 | QString path; 33 | QString name; 34 | QString genericName; 35 | QString comment; 36 | QString iconName; 37 | QString startupWMClass; 38 | QString exec; 39 | QStringList args; 40 | }; 41 | 42 | #endif // SYSTEMAPPITEM_H 43 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | debian: 11 | name: Debian 12 | runs-on: ubuntu-latest 13 | container: docker.io/library/debian:sid 14 | steps: 15 | - name: Checkout Source 16 | uses: actions/checkout@v2 17 | - name: Update repository 18 | run: apt-get update -y 19 | - name: Install the basic dev packages 20 | run: apt-get install -y equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++ 21 | - name: Install build dependencies 22 | run: mk-build-deps -i -t "apt-get --yes" -r 23 | - name: Build Package 24 | run: dpkg-buildpackage -b -uc -us -j$(nproc) 25 | 26 | ubuntu: 27 | name: Ubuntu 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Checkout Source 31 | uses: actions/checkout@v2 32 | - name: Update repository 33 | run: sudo apt-get update -y 34 | - name: Install the basic dev packages 35 | run: sudo apt-get install -y equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++ 36 | - name: Install build dependencies 37 | run: sudo mk-build-deps -i -t "apt-get --yes" -r 38 | - name: Build Package 39 | run: dpkg-buildpackage -b -uc -us -j$(nproc) 40 | -------------------------------------------------------------------------------- /src/applicationitem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef APPLICATIONITEM_H 21 | #define APPLICATIONITEM_H 22 | 23 | #include 24 | 25 | class ApplicationItem 26 | { 27 | public: 28 | // window class 29 | QString id; 30 | // icon name 31 | QString iconName; 32 | // visible name 33 | QString visibleName; 34 | QString desktopPath; 35 | QString exec; 36 | 37 | QList wids; 38 | 39 | int currentActive = 0; 40 | bool isActive = false; 41 | bool isPinned = false; 42 | bool fixed = false; 43 | 44 | bool operator==(ApplicationItem item) { 45 | return item.id == this->id; 46 | } 47 | }; 48 | 49 | #endif // APPLICATIONITEM_H 50 | -------------------------------------------------------------------------------- /src/processprovider.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "processprovider.h" 21 | #include 22 | #include 23 | 24 | ProcessProvider::ProcessProvider(QObject *parent) 25 | : QObject(parent) 26 | { 27 | 28 | } 29 | 30 | bool ProcessProvider::startDetached(const QString &exec, QStringList args) 31 | { 32 | QDBusInterface iface("com.cutefish.Session", 33 | "/Session", 34 | "com.cutefish.Session", QDBusConnection::sessionBus()); 35 | 36 | if (iface.isValid()) { 37 | iface.asyncCall("launch", exec, args).waitForFinished(); 38 | return true; 39 | } 40 | 41 | return false; 42 | } 43 | -------------------------------------------------------------------------------- /src/com.cutefish.Dock.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 | -------------------------------------------------------------------------------- /src/fakewindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef FAKEWINDOW_H 21 | #define FAKEWINDOW_H 22 | 23 | #include 24 | #include 25 | 26 | class FakeWindow : public QQuickView 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | explicit FakeWindow(QQuickView *parent = nullptr); 32 | 33 | bool containsMouse() const; 34 | void updateGeometry(); 35 | 36 | signals: 37 | void containsMouseChanged(bool contains); 38 | void dragEntered(); 39 | 40 | protected: 41 | bool event(QEvent *e) override; 42 | 43 | private: 44 | void setContainsMouse(bool contains); 45 | 46 | private: 47 | QTimer m_delayedMouseTimer; 48 | 49 | bool m_delayedContainsMouse; 50 | bool m_containsMouse; 51 | }; 52 | 53 | #endif // FAKEWINDOW_H 54 | -------------------------------------------------------------------------------- /src/trashmanager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef TRASHMANAGER_H 21 | #define TRASHMANAGER_H 22 | 23 | #include 24 | #include 25 | 26 | class TrashManager : public QObject 27 | { 28 | Q_OBJECT 29 | Q_PROPERTY(int count READ count NOTIFY countChanged) 30 | 31 | public: 32 | explicit TrashManager(QObject *parent = nullptr); 33 | 34 | Q_INVOKABLE void moveToTrash(QList urls); 35 | Q_INVOKABLE void openTrash(); 36 | Q_INVOKABLE void emptyTrash(); 37 | 38 | int count() { return m_count; } 39 | 40 | Q_SIGNALS: 41 | void countChanged(); 42 | 43 | private slots: 44 | void onDirectoryChanged(); 45 | 46 | private: 47 | QFileSystemWatcher *m_filesWatcher; 48 | int m_count; 49 | }; 50 | 51 | #endif // TRASHMANAGER_H 52 | -------------------------------------------------------------------------------- /src/systemappmonitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef SYSTEMAPPMONITOR_H 21 | #define SYSTEMAPPMONITOR_H 22 | 23 | #include 24 | #include "systemappitem.h" 25 | 26 | class SystemAppMonitor : public QObject 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | static SystemAppMonitor *self(); 32 | 33 | explicit SystemAppMonitor(QObject *parent = nullptr); 34 | ~SystemAppMonitor(); 35 | 36 | SystemAppItem *find(const QString &filePath); 37 | QList applications() { return m_items; } 38 | 39 | signals: 40 | void refreshed(); 41 | 42 | private: 43 | void refresh(); 44 | void addApplication(const QString &filePath); 45 | void removeApplication(SystemAppItem *item); 46 | 47 | private: 48 | QList m_items; 49 | }; 50 | 51 | #endif // SYSTEMAPPMONITOR_H 52 | -------------------------------------------------------------------------------- /src/activity.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: Reion Wong 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef ACTIVITY_H 21 | #define ACTIVITY_H 22 | 23 | #include 24 | 25 | class Activity : public QObject 26 | { 27 | Q_OBJECT 28 | Q_PROPERTY(bool launchPad READ launchPad NOTIFY launchPadChanged) 29 | Q_PROPERTY(bool existsWindowMaximized READ existsWindowMaximized NOTIFY existsWindowMaximizedChanged) 30 | 31 | public: 32 | static Activity *self(); 33 | explicit Activity(QObject *parent = nullptr); 34 | 35 | bool existsWindowMaximized() const; 36 | bool launchPad() const; 37 | 38 | private slots: 39 | void onActiveWindowChanged(); 40 | 41 | signals: 42 | void launchPadChanged(); 43 | void existsWindowMaximizedChanged(); 44 | 45 | private: 46 | QString m_windowClass; 47 | quint32 m_pid; 48 | 49 | bool m_existsWindowMaximized; 50 | bool m_launchPad; 51 | }; 52 | 53 | #endif // ACTIVITY_H 54 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef UTILS_H 21 | #define UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | class SystemAppMonitor; 28 | class Utils : public QObject 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | struct AppData 34 | { 35 | QString id; // Application id (*.desktop sans extension). 36 | QString name; // Application name. 37 | QString genericName; // Generic application name. 38 | QIcon icon; 39 | QUrl url; 40 | bool skipTaskbar = false; 41 | }; 42 | 43 | enum UrlComparisonMode { 44 | Strict = 0, 45 | IgnoreQueryItems 46 | }; 47 | 48 | static Utils *instance(); 49 | 50 | explicit Utils(QObject *parent = nullptr); 51 | 52 | QStringList commandFromPid(quint32 pid); 53 | QString desktopPathFromMetadata(const QString &appId, quint32 pid = 0, 54 | const QString &xWindowWMClassName = QString()); 55 | QMap readInfoFromDesktop(const QString &desktopFile); 56 | 57 | private: 58 | SystemAppMonitor *m_sysAppMonitor; 59 | }; 60 | 61 | #endif // UTILS_H 62 | -------------------------------------------------------------------------------- /translations/zh_CN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | 打开 10 | 11 | 12 | 13 | Unpin 14 | 取消固定 15 | 16 | 17 | 18 | Pin 19 | 固定 20 | 21 | 22 | 23 | Close window 24 | 关闭窗口 25 | 26 | 27 | 28 | Close %1 windows 29 | 关闭%1个窗口 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | 应用启动器 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | 回收站 46 | 47 | 48 | 49 | Open 50 | 打开 51 | 52 | 53 | 54 | Empty Trash 55 | 清空回收站 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/zh_TW.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | 開啓 10 | 11 | 12 | 13 | Unpin 14 | 取消固定 15 | 16 | 17 | 18 | Pin 19 | 固定 20 | 21 | 22 | 23 | Close window 24 | 關閉窗口 25 | 26 | 27 | 28 | Close %1 windows 29 | 關閉 %1 窗口 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | 啓動器 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | 回收筒 46 | 47 | 48 | 49 | Open 50 | 開啓 51 | 52 | 53 | 54 | Empty Trash 55 | 清空回收筒 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ja_JP.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | 開く 10 | 11 | 12 | 13 | Unpin 14 | 解除 15 | 16 | 17 | 18 | Pin 19 | 固定 20 | 21 | 22 | 23 | Close window 24 | ウィンドウを閉じる 25 | 26 | 27 | 28 | Close %1 windows 29 | %1つのウィンドウを閉じる 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | ランチャー 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | ゴミ箱 46 | 47 | 48 | 49 | Open 50 | 開く 51 | 52 | 53 | 54 | Empty Trash 55 | ごみ箱を空にする 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | set(PROJECT_NAME cutefish-dock) 4 | project(${PROJECT_NAME}) 5 | 6 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 7 | set(CMAKE_AUTOUIC ON) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTORCC ON) 10 | set(CMAKE_CXX_STANDARD 11) 11 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 12 | 13 | find_package(Qt5 CONFIG REQUIRED Widgets DBus X11Extras Concurrent LinguistTools QuickControls2) 14 | 15 | find_package(KF5WindowSystem REQUIRED) 16 | 17 | set(SRCS 18 | src/applicationitem.h 19 | src/applicationmodel.cpp 20 | src/docksettings.cpp 21 | src/iconthemeimageprovider.cpp 22 | src/main.cpp 23 | src/mainwindow.cpp 24 | src/systemappmonitor.cpp 25 | src/systemappitem.cpp 26 | src/processprovider.cpp 27 | src/trashmanager.cpp 28 | src/utils.cpp 29 | src/xwindowinterface.cpp 30 | src/activity.cpp 31 | 32 | src/fakewindow.cpp 33 | ) 34 | 35 | set(RESOURCES 36 | resources.qrc 37 | ) 38 | 39 | qt5_add_dbus_adaptor(DBUS_SOURCES 40 | src/com.cutefish.Dock.xml 41 | src/mainwindow.h MainWindow) 42 | set_source_files_properties(${DBUS_SOURCES} PROPERTIES SKIP_AUTOGEN ON) 43 | 44 | add_executable(${PROJECT_NAME} ${SRCS} ${DBUS_SOURCES} ${RESOURCES}) 45 | target_link_libraries(${PROJECT_NAME} PRIVATE 46 | Qt5::Core 47 | Qt5::Widgets 48 | Qt5::Quick 49 | Qt5::QuickControls2 50 | Qt5::X11Extras 51 | Qt5::Concurrent 52 | Qt5::DBus 53 | KF5::WindowSystem 54 | ) 55 | 56 | file(GLOB TS_FILES translations/*.ts) 57 | qt5_create_translation(QM_FILES ${TS_FILES}) 58 | add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES}) 59 | add_dependencies(${PROJECT_NAME} translations) 60 | 61 | install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 62 | install(FILES ${QM_FILES} DESTINATION /usr/share/${PROJECT_NAME}/translations) 63 | install(FILES cutefish-dock-list.conf DESTINATION /etc) 64 | -------------------------------------------------------------------------------- /translations/so.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Fur 10 | 11 | 12 | 13 | Unpin 14 | ka fuq 15 | 16 | 17 | 18 | Pin 19 | Ku dhag 20 | 21 | 22 | 23 | Close window 24 | Xir daaqadda 25 | 26 | 27 | 28 | Close %1 windows 29 | Xir %1 daaqadood 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Fure 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Qashin 46 | 47 | 48 | 49 | Open 50 | Fur 51 | 52 | 53 | 54 | Empty Trash 55 | Qashinka Madhi 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/vi_VN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Mở 10 | 11 | 12 | 13 | Unpin 14 | Gỡ ghim 15 | 16 | 17 | 18 | Pin 19 | Ghim 20 | 21 | 22 | 23 | Close window 24 | Đóng 25 | 26 | 27 | 28 | Close %1 windows 29 | Đóng %1 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Trình khởi chạy 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Thùng rác 46 | 47 | 48 | 49 | Open 50 | Mở 51 | 52 | 53 | 54 | Empty Trash 55 | Dọn sạch thùng rác 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/en_US.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Open 10 | 11 | 12 | 13 | Unpin 14 | Unpin 15 | 16 | 17 | 18 | Pin 19 | Pin 20 | 21 | 22 | 23 | Close window 24 | Close window 25 | 26 | 27 | 28 | Close %1 windows 29 | Close %1 windows 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Launcher 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Trash 46 | 47 | 48 | 49 | Open 50 | Open 51 | 52 | 53 | 54 | Empty Trash 55 | Empty Trash 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/tzm.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Rẓem 10 | 11 | 12 | 13 | Unpin 14 | Kkes aɣens 15 | 16 | 17 | 18 | Pin 19 | Ɣens 20 | 21 | 22 | 23 | Close window 24 | Mdel asfaylu 25 | 26 | 27 | 28 | Close %1 windows 29 | Mdel %1 Isfuyla 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | tanekra 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Iḍuman 46 | 47 | 48 | 49 | Open 50 | Rẓem 51 | 52 | 53 | 54 | Empty Trash 55 | Ḍegger iḍuman 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/az_AZ.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | 10 | 11 | 12 | 13 | Unpin 14 | Qopar 15 | 16 | 17 | 18 | Pin 19 | Sancaqla 20 | 21 | 22 | 23 | Close window 24 | Pəncərəni bağla 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 pəncərəni bağla 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Başladıcı 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Səbət 46 | 47 | 48 | 49 | Open 50 | 51 | 52 | 53 | 54 | Empty Trash 55 | Səbəti boşalt 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/da_DK.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Åben 10 | 11 | 12 | 13 | Unpin 14 | Løsn 15 | 16 | 17 | 18 | Pin 19 | Fastgør 20 | 21 | 22 | 23 | Close window 24 | Luk vindue 25 | 26 | 27 | 28 | Close %1 windows 29 | Luk %1 vinduer 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lanceringsenhed 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Papirkurv 46 | 47 | 48 | 49 | Open 50 | Åbn 51 | 52 | 53 | 54 | Empty Trash 55 | Tøm Papirkurv 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/pt_PT.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Abrir 10 | 11 | 12 | 13 | Unpin 14 | Soltar 15 | 16 | 17 | 18 | Pin 19 | Afixar 20 | 21 | 22 | 23 | Close window 24 | Fechar janela 25 | 26 | 27 | 28 | Close %1 windows 29 | Fechar %1 janelas 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lançador 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Lixo 46 | 47 | 48 | 49 | Open 50 | Abrir 51 | 52 | 53 | 54 | Empty Trash 55 | Esvaziar Lixo 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/sw.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Fungua 10 | 11 | 12 | 13 | Unpin 14 | Ondoa 15 | 16 | 17 | 18 | Pin 19 | Weka 20 | 21 | 22 | 23 | Close window 24 | Funga programu 25 | 26 | 27 | 28 | Close %1 windows 29 | Funga %1 programu 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Kizindua 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Takataka 46 | 47 | 48 | 49 | Open 50 | Fungua 51 | 52 | 53 | 54 | Empty Trash 55 | Tupa takataka 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/bn_BD.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | খুলুন 10 | 11 | 12 | 13 | Unpin 14 | আনপিন 15 | 16 | 17 | 18 | Pin 19 | পিন 20 | 21 | 22 | 23 | Close window 24 | জানালা বন্ধ করুন 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 উইন্ডো বন্ধ করুন 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | লঞ্চার 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | আবর্জনা 46 | 47 | 48 | 49 | Open 50 | খুলুন 51 | 52 | 53 | 54 | Empty Trash 55 | আবর্জনা খালি করুন 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/id_ID.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Buka 10 | 11 | 12 | 13 | Unpin 14 | Lepas Pin 15 | 16 | 17 | 18 | Pin 19 | Pasang Pin 20 | 21 | 22 | 23 | Close window 24 | Tutup jendela 25 | 26 | 27 | 28 | Close %1 windows 29 | Tutup jendela %1 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Peluncur 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Sampah 46 | 47 | 48 | 49 | Open 50 | Buka 51 | 52 | 53 | 54 | Empty Trash 55 | Sampah Kosong 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/nb_NO.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Åpne 10 | 11 | 12 | 13 | Unpin 14 | Løsne 15 | 16 | 17 | 18 | Pin 19 | Fest 20 | 21 | 22 | 23 | Close window 24 | Lukk vindu 25 | 26 | 27 | 28 | Close %1 windows 29 | Lukk %1 vinduer 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Programoppstarter 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Papirkurv 46 | 47 | 48 | 49 | Open 50 | Åpne 51 | 52 | 53 | 54 | Empty Trash 55 | Tøm papirkurv 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/sk_SK.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Otvoriť 10 | 11 | 12 | 13 | Unpin 14 | Odopnúť 15 | 16 | 17 | 18 | Pin 19 | Pripnúť 20 | 21 | 22 | 23 | Close window 24 | Zavrieť okno 25 | 26 | 27 | 28 | Close %1 windows 29 | Zavrieť %1 okná 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Aplikácie 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Kôš 46 | 47 | 48 | 49 | Open 50 | Otvoriť 51 | 52 | 53 | 54 | Empty Trash 55 | Vyprázdniť Kôš 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/sr_RS.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Otvori 10 | 11 | 12 | 13 | Unpin 14 | Otkači 15 | 16 | 17 | 18 | Pin 19 | Zakači 20 | 21 | 22 | 23 | Close window 24 | Zatvori prozor 25 | 26 | 27 | 28 | Close %1 windows 29 | Zatvori 1% prozora 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Pokretač 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Smeće 46 | 47 | 48 | 49 | Open 50 | Otvori 51 | 52 | 53 | 54 | Empty Trash 55 | Isprazni smeće 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/bs_BA.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Otvori 10 | 11 | 12 | 13 | Unpin 14 | Otkači 15 | 16 | 17 | 18 | Pin 19 | Zakači 20 | 21 | 22 | 23 | Close window 24 | Zatvori prozor 25 | 26 | 27 | 28 | Close %1 windows 29 | Zatvori %1 prozor(a) 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Pokretač 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Smeće 46 | 47 | 48 | 49 | Open 50 | Otvori 51 | 52 | 53 | 54 | Empty Trash 55 | Isprazni smeće 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/cs_CZ.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Otevřít 10 | 11 | 12 | 13 | Unpin 14 | Odepnout 15 | 16 | 17 | 18 | Pin 19 | Připnout 20 | 21 | 22 | 23 | Close window 24 | Zavřít okno 25 | 26 | 27 | 28 | Close %1 windows 29 | Zavřít %1 okna 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Přehled aplikací 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Koš 46 | 47 | 48 | 49 | Open 50 | Otevřít 51 | 52 | 53 | 54 | Empty Trash 55 | Vysypat koš 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/es_ES.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Abrir 10 | 11 | 12 | 13 | Unpin 14 | Desanclar 15 | 16 | 17 | 18 | Pin 19 | Anclar 20 | 21 | 22 | 23 | Close window 24 | Cerrar ventana 25 | 26 | 27 | 28 | Close %1 windows 29 | Cerrar %1 ventanas 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lanzador 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Papelera 46 | 47 | 48 | 49 | Open 50 | Abrir 51 | 52 | 53 | 54 | Empty Trash 55 | Vaciar Papelera 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/he_IL.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | פתח 10 | 11 | 12 | 13 | Unpin 14 | בטל הצמדה 15 | 16 | 17 | 18 | Pin 19 | הצמד 20 | 21 | 22 | 23 | Close window 24 | סגור חלון 25 | 26 | 27 | 28 | Close %1 windows 29 | סגור %1 חלונות 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | מפעיל יישומים 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | סל המיחזור 46 | 47 | 48 | 49 | Open 50 | פתח 51 | 52 | 53 | 54 | Empty Trash 55 | רוקן את סל המיחזור 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/hr_HR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Otvori 10 | 11 | 12 | 13 | Unpin 14 | Otkvači 15 | 16 | 17 | 18 | Pin 19 | Prikvači 20 | 21 | 22 | 23 | Close window 24 | Zatvori prozor 25 | 26 | 27 | 28 | Close %1 windows 29 | Zatvori %1 prozora 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Izbornik 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Smeće 46 | 47 | 48 | 49 | Open 50 | Otvori 51 | 52 | 53 | 54 | Empty Trash 55 | Isprazni smeće 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/hu_HU.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Megnyitás 10 | 11 | 12 | 13 | Unpin 14 | Levétel 15 | 16 | 17 | 18 | Pin 19 | Kitűzés 20 | 21 | 22 | 23 | Close window 24 | Ablak bezárása 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 ablak bezárása 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Indítópult 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Kuka 46 | 47 | 48 | 49 | Open 50 | Megnyitás 51 | 52 | 53 | 54 | Empty Trash 55 | Kuka ürítése 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/it_IT.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Apri 10 | 11 | 12 | 13 | Unpin 14 | Rimuovi 15 | 16 | 17 | 18 | Pin 19 | Fissa 20 | 21 | 22 | 23 | Close window 24 | Chiudi la finestra 25 | 26 | 27 | 28 | Close %1 windows 29 | Chiudi %1 finestre 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Launcher 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Cestino 46 | 47 | 48 | 49 | Open 50 | Apri 51 | 52 | 53 | 54 | Empty Trash 55 | Svuota il cestino 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/nl_NL.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Open 10 | 11 | 12 | 13 | Unpin 14 | Maak los 15 | 16 | 17 | 18 | Pin 19 | Maak vast 20 | 21 | 22 | 23 | Close window 24 | Sluit venster 25 | 26 | 27 | 28 | Close %1 windows 29 | Sluit %1 vensters 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Starter 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Prullenbak 46 | 47 | 48 | 49 | Open 50 | Open 51 | 52 | 53 | 54 | Empty Trash 55 | Leeg prullenbak 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/pl_PL.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Otwórz 10 | 11 | 12 | 13 | Unpin 14 | Odepnij 15 | 16 | 17 | 18 | Pin 19 | Przypnij 20 | 21 | 22 | 23 | Close window 24 | Zamknij okno 25 | 26 | 27 | 28 | Close %1 windows 29 | Zamknij %1 okien 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Wyświetl programy 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Kosz 46 | 47 | 48 | 49 | Open 50 | Otwórz 51 | 52 | 53 | 54 | Empty Trash 55 | Opróżnij kosz 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ru_RU.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Открыть 10 | 11 | 12 | 13 | Unpin 14 | Открепить 15 | 16 | 17 | 18 | Pin 19 | Закрепить 20 | 21 | 22 | 23 | Close window 24 | Закрыть окно 25 | 26 | 27 | 28 | Close %1 windows 29 | Закрыть %1 окна 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Лаунчер 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Корзина 46 | 47 | 48 | 49 | Open 50 | Открыть 51 | 52 | 53 | 54 | Empty Trash 55 | Очистить корзину 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ta_IN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | திற 10 | 11 | 12 | 13 | Unpin 14 | சேமித்ததை நீக்கு 15 | 16 | 17 | 18 | Pin 19 | சேமி 20 | 21 | 22 | 23 | Close window 24 | பயன்பாட்டை மூடு 25 | 26 | 27 | 28 | Close %1 windows 29 | பயன்பாடுகளை %1 மூடு 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | துவக்கி 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | குப்பை 46 | 47 | 48 | 49 | Open 50 | திற 51 | 52 | 53 | 54 | Empty Trash 55 | குப்பையை அழி 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/tr_TR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | 10 | 11 | 12 | 13 | Unpin 14 | Sabitlemeyi kaldır 15 | 16 | 17 | 18 | Pin 19 | Sabitle 20 | 21 | 22 | 23 | Close window 24 | Pencereyi kapat 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 pencereyi kapat 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Başlatıcı 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Çöp 46 | 47 | 48 | 49 | Open 50 | 51 | 52 | 53 | 54 | Empty Trash 55 | Çöpü boşalt 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ar_AA.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | فتح 10 | 11 | 12 | 13 | Unpin 14 | إلغاء التثبيت 15 | 16 | 17 | 18 | Pin 19 | تثبيت 20 | 21 | 22 | 23 | Close window 24 | إغلاق النافذة 25 | 26 | 27 | 28 | Close %1 windows 29 | إغلاق %1 نافذة 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | المُشَغِّل 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | سلة المهملات 46 | 47 | 48 | 49 | Open 50 | فتح 51 | 52 | 53 | 54 | Empty Trash 55 | إفراغ سلة المهملات 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/be_BY.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Адкрыць 10 | 11 | 12 | 13 | Unpin 14 | Адмацаваць 15 | 16 | 17 | 18 | Pin 19 | Замацаваць 20 | 21 | 22 | 23 | Close window 24 | Закрыць акно 25 | 26 | 27 | 28 | Close %1 windows 29 | Закрыць %1 акны 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Лаўнчар 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Сметніца 46 | 47 | 48 | 49 | Open 50 | Адкрыць 51 | 52 | 53 | 54 | Empty Trash 55 | Ачысціць сметніцу 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/es_MX.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Abrir 10 | 11 | 12 | 13 | Unpin 14 | Desanclar 15 | 16 | 17 | 18 | Pin 19 | Anclar 20 | 21 | 22 | 23 | Close window 24 | Cerrar ventana 25 | 26 | 27 | 28 | Close %1 windows 29 | Cerrar %1 ventanas 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lanzador 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Papelera 46 | 47 | 48 | 49 | Open 50 | Abrir 51 | 52 | 53 | 54 | Empty Trash 55 | Papelera vacía 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/hi_IN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | खोले 10 | 11 | 12 | 13 | Unpin 14 | पिन निकाल देना 15 | 16 | 17 | 18 | Pin 19 | चिपका 20 | 21 | 22 | 23 | Close window 24 | विंडो बंद करे 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 विंडो बंद करे 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | लांचर 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | जंक फाइलें 46 | 47 | 48 | 49 | Open 50 | खोले 51 | 52 | 53 | 54 | Empty Trash 55 | जंक फाइलें खाली करें 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/lv_LV.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Atvērt 10 | 11 | 12 | 13 | Unpin 14 | Atspraust 15 | 16 | 17 | 18 | Pin 19 | Piespraust 20 | 21 | 22 | 23 | Close window 24 | Aizvērt logu 25 | 26 | 27 | 28 | Close %1 windows 29 | Aizvērt %1 logus 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Launčers 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Atkritne 46 | 47 | 48 | 49 | Open 50 | Atvērt 51 | 52 | 53 | 54 | Empty Trash 55 | Iztukšot Atkritni 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/pt_BR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Abrir 10 | 11 | 12 | 13 | Unpin 14 | Desafixar 15 | 16 | 17 | 18 | Pin 19 | Fixar 20 | 21 | 22 | 23 | Close window 24 | Fechar janela 25 | 26 | 27 | 28 | Close %1 windows 29 | Fechar %1 janelas 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Inicializador 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Lixeira 46 | 47 | 48 | 49 | Open 50 | Abrir 51 | 52 | 53 | 54 | Empty Trash 55 | Esvaziar Lixeira 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/sv_SE.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Öppna 10 | 11 | 12 | 13 | Unpin 14 | Avfäst 15 | 16 | 17 | 18 | Pin 19 | Fäst 20 | 21 | 22 | 23 | Close window 24 | Stäng fönster 25 | 26 | 27 | 28 | Close %1 windows 29 | Stäng %1 fönster 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Programstartare 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Papperskorg 46 | 47 | 48 | 49 | Open 50 | Öppna 51 | 52 | 53 | 54 | Empty Trash 55 | Töm papperskorgen 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/be_Latn.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Adkryć 10 | 11 | 12 | 13 | Unpin 14 | Admacavać 15 | 16 | 17 | 18 | Pin 19 | Zamacavać 20 | 21 | 22 | 23 | Close window 24 | Zakryć akno 25 | 26 | 27 | 28 | Close %1 windows 29 | Zakryć %1 akny 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Laŭnčar 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Smietnica 46 | 47 | 48 | 49 | Open 50 | Adkryć 51 | 52 | 53 | 54 | Empty Trash 55 | Ačyscić smietnicu 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/de_DE.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Öffnen 10 | 11 | 12 | 13 | Unpin 14 | Loslösen 15 | 16 | 17 | 18 | Pin 19 | Anheften 20 | 21 | 22 | 23 | Close window 24 | Fenster schließen 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 Fenster schließen 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Starter 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Papierkorb 46 | 47 | 48 | 49 | Open 50 | Öffnen 51 | 52 | 53 | 54 | Empty Trash 55 | Papierkorb leeren 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/fa_IR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | باز کردن 10 | 11 | 12 | 13 | Unpin 14 | برداشتن سنجاق 15 | 16 | 17 | 18 | Pin 19 | سنجاق کردن 20 | 21 | 22 | 23 | Close window 24 | بستن پنجره 25 | 26 | 27 | 28 | Close %1 windows 29 | بستن %1 پنجره 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | لانچر 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | زباله‌دانی 46 | 47 | 48 | 49 | Open 50 | باز کردن 51 | 52 | 53 | 54 | Empty Trash 55 | خالی کردن زباله‌دانی 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/fi_FI.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Avaa 10 | 11 | 12 | 13 | Unpin 14 | Poista kiinnitys 15 | 16 | 17 | 18 | Pin 19 | Kiinnitä 20 | 21 | 22 | 23 | Close window 24 | Sulje ikkuna 25 | 26 | 27 | 28 | Close %1 windows 29 | Sulje %1 ikkunaa 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Käynnistäjä 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Roskakori 46 | 47 | 48 | 49 | Open 50 | Avaa 51 | 52 | 53 | 54 | Empty Trash 55 | Tyhjennä roskakori 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/fr_FR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Ouvrir 10 | 11 | 12 | 13 | Unpin 14 | Détacher 15 | 16 | 17 | 18 | Pin 19 | Épingler 20 | 21 | 22 | 23 | Close window 24 | Fermer la fenêtre 25 | 26 | 27 | 28 | Close %1 windows 29 | Fermer %1 fenêtres 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lanceur 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Corbeille 46 | 47 | 48 | 49 | Open 50 | Ouvrir 51 | 52 | 53 | 54 | Empty Trash 55 | Vider la corbeille 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ie.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Aperter 10 | 11 | 12 | 13 | Unpin 14 | Liberar 15 | 16 | 17 | 18 | Pin 19 | Fixar 20 | 21 | 22 | 23 | Close window 24 | Cluder li fenestre 25 | 26 | 27 | 28 | Close %1 windows 29 | Cluder %1 fenestres 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lansator 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Paper-corb 46 | 47 | 48 | 49 | Open 50 | Aperter 51 | 52 | 53 | 54 | Empty Trash 55 | Vacuar li Paper-corb 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/lt_LT.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Atverti 10 | 11 | 12 | 13 | Unpin 14 | Atsegti 15 | 16 | 17 | 18 | Pin 19 | Prisegti 20 | 21 | 22 | 23 | Close window 24 | Užverti langą 25 | 26 | 27 | 28 | Close %1 windows 29 | Užverti %1 langus 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Paleidyklė 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Šiukšlinė 46 | 47 | 48 | 49 | Open 50 | Atverti 51 | 52 | 53 | 54 | Empty Trash 55 | Išvalyti šiukšlinę 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ne_NP.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | खोल्ने 10 | 11 | 12 | 13 | Unpin 14 | पिन नगर्ने 15 | 16 | 17 | 18 | Pin 19 | पिन गर्ने 20 | 21 | 22 | 23 | Close window 24 | दृश्य बन्द गर्ने 25 | 26 | 27 | 28 | Close %1 windows 29 | %1 दृश्य बन्द गर्ने 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | लन्चर 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | रद्दी टोकरी 46 | 47 | 48 | 49 | Open 50 | खोल्ने 51 | 52 | 53 | 54 | Empty Trash 55 | रद्दी खाली गर्ने 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/uk_UA.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Відкрити 10 | 11 | 12 | 13 | Unpin 14 | Відкріпити 15 | 16 | 17 | 18 | Pin 19 | Закріпити 20 | 21 | 22 | 23 | Close window 24 | Закрити вікно 25 | 26 | 27 | 28 | Close %1 windows 29 | Закрити %1 вікна(-он) 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Панель запуску 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Кошик 46 | 47 | 48 | 49 | Open 50 | Відкрити 51 | 52 | 53 | 54 | Empty Trash 55 | Очистити кошик 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ml_IN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | തുറക്കുക 10 | 11 | 12 | 13 | Unpin 14 | അൺപിന് 15 | 16 | 17 | 18 | Pin 19 | പിന് ചെയ്യുക 20 | 21 | 22 | 23 | Close window 24 | ജാലകം അടക്കുക 25 | 26 | 27 | 28 | Close %1 windows 29 | 1% ജാലകം അടക്കുക 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | ലോഞ്ച്ർ 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | ചവറ്റുകുട്ട 46 | 47 | 48 | 49 | Open 50 | തുറക്കുക 51 | 52 | 53 | 54 | Empty Trash 55 | ചവറ്റുകുട്ട ശൂന്യമാക്കുക 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/uz_UZ.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Ochish 10 | 11 | 12 | 13 | Unpin 14 | Qadalganni olish 15 | 16 | 17 | 18 | Pin 19 | Qadash 20 | 21 | 22 | 23 | Close window 24 | Oynani yopish 25 | 26 | 27 | 28 | Close %1 windows 29 | Oynani %1 yopish 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Launcher-Menyu 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Quticha 46 | 47 | 48 | 49 | Open 50 | Ochish 51 | 52 | 53 | 54 | Empty Trash 55 | Qutichani bo'shatish 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/bg_BG.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Отваряне 10 | 11 | 12 | 13 | Unpin 14 | Отделяне 15 | 16 | 17 | 18 | Pin 19 | Закачане 20 | 21 | 22 | 23 | Close window 24 | Затваряне на прозореца 25 | 26 | 27 | 28 | Close %1 windows 29 | Затваряне на %1 прозореца 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Лаунчер 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Кошче 46 | 47 | 48 | 49 | Open 50 | Отваряне 51 | 52 | 53 | 54 | Empty Trash 55 | Изпразване на кошчето 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/ro_RO.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Deschideți 10 | 11 | 12 | 13 | Unpin 14 | Anulați fixarea 15 | 16 | 17 | 18 | Pin 19 | Fixează 20 | 21 | 22 | 23 | Close window 24 | Închideți fereastra 25 | 26 | 27 | 28 | Close %1 windows 29 | Închideți ferestra %1 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Lansator 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Coş de gunoi 46 | 47 | 48 | 49 | Open 50 | Deschideți 51 | 52 | 53 | 54 | Empty Trash 55 | Goliți coșul de gunoi 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/si_LK.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | විවෘත කරන්න 10 | 11 | 12 | 13 | Unpin 14 | 15 | 16 | 17 | 18 | Pin 19 | 20 | 21 | 22 | 23 | Close window 24 | කවුළුව වසන්න 25 | 26 | 27 | 28 | Close %1 windows 29 | කවුළු %1 ක් වසන්න 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | 46 | 47 | 48 | 49 | Open 50 | විවෘත කරන්න 51 | 52 | 53 | 54 | Empty Trash 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/mg.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | Voahay 10 | 11 | 12 | 13 | Unpin 14 | Tsoahina eto 15 | 16 | 17 | 18 | Pin 19 | Apetaka eto 20 | 21 | 22 | 23 | Close window 24 | Hidio ity fisokafana ity 25 | 26 | 27 | 28 | Close %1 windows 29 | Hidio ny %1 amin'ireto fisokafana ireto 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | Mpampandeha 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | Tsy ilaina 46 | 47 | 48 | 49 | Open 50 | Sokafana 51 | 52 | 53 | 54 | Empty Trash 55 | Tsy misy n'inona n'inona 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /translations/eo_XX.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AppItem 6 | 7 | 8 | Open 9 | 10 | 11 | 12 | 13 | Unpin 14 | 15 | 16 | 17 | 18 | Pin 19 | 20 | 21 | 22 | 23 | Close window 24 | 25 | 26 | 27 | 28 | Close %1 windows 29 | 30 | 31 | 32 | 33 | ApplicationModel 34 | 35 | 36 | Launcher 37 | 38 | 39 | 40 | 41 | main 42 | 43 | 44 | Trash 45 | 46 | 47 | 48 | 49 | Open 50 | 51 | 52 | 53 | 54 | Empty Trash 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "applicationmodel.h" 28 | #include "mainwindow.h" 29 | 30 | int main(int argc, char *argv[]) 31 | { 32 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); 33 | QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); 34 | QApplication app(argc, argv); 35 | 36 | if (!QDBusConnection::sessionBus().registerService("com.cutefish.Dock")) { 37 | return -1; 38 | } 39 | 40 | qmlRegisterType("Cutefish.Dock", 1, 0, "DockSettings"); 41 | 42 | QString qmFilePath = QString("%1/%2.qm").arg("/usr/share/cutefish-dock/translations/").arg(QLocale::system().name()); 43 | if (QFile::exists(qmFilePath)) { 44 | QTranslator *translator = new QTranslator(QApplication::instance()); 45 | if (translator->load(qmFilePath)) { 46 | QGuiApplication::installTranslator(translator); 47 | } else { 48 | translator->deleteLater(); 49 | } 50 | } 51 | 52 | MainWindow w; 53 | 54 | if (!QDBusConnection::sessionBus().registerObject("/Dock", &w)) { 55 | return -1; 56 | } 57 | 58 | return app.exec(); 59 | } 60 | -------------------------------------------------------------------------------- /src/xwindowinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef XWINDOWINTERFACE_H 21 | #define XWINDOWINTERFACE_H 22 | 23 | #include "applicationitem.h" 24 | #include "docksettings.h" 25 | #include 26 | 27 | // KLIB 28 | #include 29 | #include 30 | 31 | class XWindowInterface : public QObject 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | static XWindowInterface *instance(); 37 | explicit XWindowInterface(QObject *parent = nullptr); 38 | 39 | void enableBlurBehind(QWindow *view, bool enable = true, const QRegion ®ion = QRegion()); 40 | 41 | WId activeWindow(); 42 | void minimizeWindow(WId win); 43 | void closeWindow(WId id); 44 | void forceActiveWindow(WId win); 45 | 46 | QMap requestInfo(quint64 wid); 47 | QString requestWindowClass(quint64 wid); 48 | bool isAcceptableWindow(quint64 wid); 49 | 50 | void setViewStruts(QWindow *view, DockSettings::Direction direction, const QRect &rect, bool compositing = false); 51 | void clearViewStruts(QWindow *view); 52 | 53 | void startInitWindows(); 54 | 55 | QString desktopFilePath(quint64 wid); 56 | 57 | void setIconGeometry(quint64 wid, const QRect &rect); 58 | 59 | signals: 60 | void windowAdded(quint64 wid); 61 | void windowRemoved(quint64 wid); 62 | void activeChanged(quint64 wid); 63 | 64 | private: 65 | void onWindowadded(quint64 wid); 66 | }; 67 | 68 | #endif // XWINDOWINTERFACE_H 69 | -------------------------------------------------------------------------------- /src/trashmanager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * Author: rekols 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * any later version. 9 | * 10 | * This program 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 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "trashmanager.h" 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | const QString TrashDir = QDir::homePath() + "/.local/share/Trash"; 27 | const QDir::Filters ItemsShouldCount = QDir::AllEntries | QDir::Hidden | QDir::System | QDir::NoDotAndDotDot; 28 | 29 | TrashManager::TrashManager(QObject *parent) 30 | : QObject(parent), 31 | m_filesWatcher(new QFileSystemWatcher(this)), 32 | m_count(0) 33 | { 34 | onDirectoryChanged(); 35 | connect(m_filesWatcher, &QFileSystemWatcher::directoryChanged, this, &TrashManager::onDirectoryChanged, Qt::QueuedConnection); 36 | } 37 | 38 | void TrashManager::moveToTrash(QList urls) 39 | { 40 | QStringList paths; 41 | 42 | for (const QUrl &url : urls) { 43 | if (!url.isLocalFile()) 44 | continue; 45 | paths.append(url.toLocalFile()); 46 | } 47 | 48 | QProcess::startDetached("cutefish-filemanager", QStringList() << "--move-to-trash" << paths); 49 | } 50 | 51 | void TrashManager::emptyTrash() 52 | { 53 | QProcess::startDetached("cutefish-filemanager", QStringList() << "-e"); 54 | } 55 | 56 | void TrashManager::openTrash() 57 | { 58 | QProcess::startDetached("cutefish-filemanager", QStringList() << "trash:///"); 59 | } 60 | 61 | void TrashManager::onDirectoryChanged() 62 | { 63 | m_filesWatcher->addPath(TrashDir); 64 | 65 | if (QDir(TrashDir + "/files").exists()) { 66 | m_filesWatcher->addPath(TrashDir + "/files"); 67 | m_count = QDir(TrashDir + "/files").entryList(ItemsShouldCount).count(); 68 | } else { 69 | m_count = 0; 70 | } 71 | 72 | emit countChanged(); 73 | } 74 | -------------------------------------------------------------------------------- /src/docksettings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef DOCKSETTINGS_H 21 | #define DOCKSETTINGS_H 22 | 23 | #include 24 | #include 25 | 26 | class DockSettings : public QObject 27 | { 28 | Q_OBJECT 29 | Q_PROPERTY(Direction direction READ direction WRITE setDirection NOTIFY directionChanged) 30 | Q_PROPERTY(int iconSize READ iconSize WRITE setIconSize NOTIFY iconSizeChanged) 31 | Q_PROPERTY(int edgeMargins READ edgeMargins WRITE setEdgeMargins) 32 | Q_PROPERTY(bool roundedWindowEnabled READ roundedWindowEnabled WRITE setRoundedWindowEnabled NOTIFY roundedWindowEnabledChanged) 33 | Q_PROPERTY(Style style READ style WRITE setStyle NOTIFY styleChanged) 34 | 35 | public: 36 | enum Direction { 37 | Left = 0, 38 | Bottom, 39 | Right 40 | }; 41 | Q_ENUMS(Direction) 42 | 43 | enum Visibility { 44 | AlwaysShow = 0, 45 | // AutoHide, 46 | AlwaysHide, 47 | IntellHide 48 | }; 49 | Q_ENUMS(Visibility) 50 | 51 | enum Style { 52 | Round = 0, 53 | Straight 54 | }; 55 | Q_ENUMS(Style) 56 | 57 | static DockSettings *self(); 58 | explicit DockSettings(QObject *parent = nullptr); 59 | 60 | int iconSize() const; 61 | void setIconSize(int iconSize); 62 | 63 | Direction direction() const; 64 | void setDirection(const Direction &direction); 65 | 66 | Visibility visibility() const; 67 | void setVisibility(const Visibility &visibility); 68 | 69 | int edgeMargins() const; 70 | void setEdgeMargins(int edgeMargins); 71 | 72 | bool roundedWindowEnabled() const; 73 | void setRoundedWindowEnabled(bool enabled); 74 | 75 | Style style() const; 76 | void setStyle(const Style &style); 77 | 78 | signals: 79 | void iconSizeChanged(); 80 | void directionChanged(); 81 | void visibilityChanged(); 82 | void roundedWindowEnabledChanged(); 83 | void styleChanged(); 84 | 85 | private: 86 | int m_iconSize; 87 | int m_edgeMargins; 88 | bool m_roundedWindowEnabled; 89 | Direction m_direction; 90 | Visibility m_visibility; 91 | Style m_style; 92 | QSettings *m_settings; 93 | }; 94 | 95 | #endif // DOCKSETTINGS_H 96 | -------------------------------------------------------------------------------- /src/activity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: Reion Wong 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "activity.h" 21 | #include "docksettings.h" 22 | 23 | #include 24 | #include 25 | 26 | static Activity *SELF = nullptr; 27 | 28 | Activity *Activity::self() 29 | { 30 | if (!SELF) 31 | SELF = new Activity; 32 | 33 | return SELF; 34 | } 35 | 36 | Activity::Activity(QObject *parent) 37 | : QObject(parent) 38 | , m_existsWindowMaximized(false) 39 | { 40 | onActiveWindowChanged(); 41 | 42 | connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this, &Activity::onActiveWindowChanged); 43 | connect(KWindowSystem::self(), static_cast(&KWindowSystem::windowChanged), 44 | this, &Activity::onActiveWindowChanged); 45 | } 46 | 47 | bool Activity::existsWindowMaximized() const 48 | { 49 | return m_existsWindowMaximized; 50 | } 51 | 52 | bool Activity::launchPad() const 53 | { 54 | return m_launchPad; 55 | } 56 | #include 57 | void Activity::onActiveWindowChanged() 58 | { 59 | KWindowInfo info(KWindowSystem::activeWindow(), 60 | NET::WMState | NET::WMVisibleName, 61 | NET::WM2WindowClass); 62 | 63 | bool launchPad = info.windowClassClass() == "cutefish-launcher"; 64 | 65 | if (DockSettings::self()->visibility() == DockSettings::IntellHide) { 66 | bool existsWindowMaximized = false; 67 | 68 | for (WId wid : KWindowSystem::windows()) { 69 | KWindowInfo i(wid, NET::WMState, NET::WM2WindowClass); 70 | 71 | if (i.isMinimized() || i.hasState(NET::SkipTaskbar)) 72 | continue; 73 | 74 | if (i.hasState(NET::MaxVert) || i.hasState(NET::MaxHoriz)) { 75 | existsWindowMaximized = true; 76 | break; 77 | } 78 | } 79 | 80 | if (m_existsWindowMaximized != existsWindowMaximized) { 81 | m_existsWindowMaximized = existsWindowMaximized; 82 | emit existsWindowMaximizedChanged(); 83 | } 84 | } 85 | 86 | if (m_launchPad != launchPad) { 87 | m_launchPad = launchPad; 88 | emit launchPadChanged(); 89 | } 90 | 91 | m_pid = info.pid(); 92 | m_windowClass = info.windowClassClass().toLower(); 93 | } 94 | -------------------------------------------------------------------------------- /src/applicationmodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef APPLICATIONMODEL_H 21 | #define APPLICATIONMODEL_H 22 | 23 | #include 24 | #include "applicationitem.h" 25 | #include "systemappmonitor.h" 26 | #include "xwindowinterface.h" 27 | 28 | class ApplicationModel : public QAbstractListModel 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | enum Roles { 34 | AppIdRole = Qt::UserRole + 1, 35 | IconNameRole, 36 | VisibleNameRole, 37 | ActiveRole, 38 | WindowCountRole, 39 | IsPinnedRole, 40 | DesktopFileRole, 41 | FixedItemRole 42 | }; 43 | 44 | explicit ApplicationModel(QObject *parent = nullptr); 45 | 46 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 47 | QHash roleNames() const override; 48 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 49 | 50 | void addItem(const QString &desktopFile); 51 | void removeItem(const QString &desktopFile); 52 | bool desktopContains(const QString &desktopFile); 53 | bool isDesktopPinned(const QString &desktopFile); 54 | 55 | Q_INVOKABLE void save() { savePinAndUnPinList(); } 56 | 57 | Q_INVOKABLE void clicked(const QString &id); 58 | Q_INVOKABLE void raiseWindow(const QString &id); 59 | 60 | Q_INVOKABLE bool openNewInstance(const QString &appId); 61 | Q_INVOKABLE void closeAllByAppId(const QString &appId); 62 | Q_INVOKABLE void pin(const QString &appId); 63 | Q_INVOKABLE void unPin(const QString &appId); 64 | 65 | Q_INVOKABLE void updateGeometries(const QString &id, QRect rect); 66 | 67 | Q_INVOKABLE void move(int from, int to); 68 | 69 | signals: 70 | void countChanged(); 71 | 72 | void itemAdded(); 73 | void itemRemoved(); 74 | 75 | private: 76 | ApplicationItem *findItemByWId(quint64 wid); 77 | ApplicationItem *findItemById(const QString &id); 78 | ApplicationItem *findItemByDesktop(const QString &desktop); 79 | 80 | bool contains(const QString &id); 81 | int indexOf(const QString &id); 82 | void initPinnedApplications(); 83 | void savePinAndUnPinList(); 84 | 85 | void handleDataChangedFromItem(ApplicationItem *item); 86 | 87 | void onWindowAdded(quint64 wid); 88 | void onWindowRemoved(quint64 wid); 89 | void onActiveChanged(quint64 wid); 90 | 91 | private: 92 | XWindowInterface *m_iface; 93 | SystemAppMonitor *m_sysAppMonitor; 94 | QList m_appItems; 95 | }; 96 | 97 | #endif // APPLICATIONMODEL_H 98 | -------------------------------------------------------------------------------- /src/mainwindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: Reion Wong 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef MAINWINDOW_H 21 | #define MAINWINDOW_H 22 | 23 | #include 24 | #include 25 | 26 | #include "activity.h" 27 | #include "docksettings.h" 28 | #include "applicationmodel.h" 29 | #include "fakewindow.h" 30 | #include "trashmanager.h" 31 | 32 | class MainWindow : public QQuickView 33 | { 34 | Q_OBJECT 35 | Q_PROPERTY(QRect primaryGeometry READ primaryGeometry NOTIFY primaryGeometryChanged) 36 | Q_PROPERTY(int direction READ direction NOTIFY directionChanged) 37 | Q_PROPERTY(int visibility READ visibility NOTIFY visibilityChanged) 38 | Q_PROPERTY(int style READ style NOTIFY styleChanged) 39 | 40 | public: 41 | explicit MainWindow(QQuickView *parent = nullptr); 42 | ~MainWindow(); 43 | 44 | // DBus interface 45 | void add(const QString &desktop); 46 | void remove(const QString &desktop); 47 | bool pinned(const QString &desktop); 48 | 49 | QRect primaryGeometry() const; 50 | int direction() const; 51 | 52 | int visibility() const; 53 | 54 | void setDirection(int direction); 55 | void setIconSize(int iconSize); 56 | void setVisibility(int visibility); 57 | 58 | int style() const; 59 | void setStyle(int style); 60 | 61 | Q_INVOKABLE void updateSize(); 62 | 63 | signals: 64 | void resizingFished(); 65 | void iconSizeChanged(); 66 | void directionChanged(); 67 | void primaryGeometryChanged(); 68 | void visibilityChanged(); 69 | void styleChanged(); 70 | 71 | private: 72 | QRect windowRect() const; 73 | void resizeWindow(); 74 | void initScreens(); 75 | void initSlideWindow(); 76 | void updateViewStruts(); 77 | void clearViewStruts(); 78 | 79 | void createFakeWindow(); 80 | void deleteFakeWindow(); 81 | 82 | private slots: 83 | void onPrimaryScreenChanged(QScreen *screen); 84 | void onPositionChanged(); 85 | void onIconSizeChanged(); 86 | void onVisibilityChanged(); 87 | 88 | void onHideTimeout(); 89 | 90 | protected: 91 | bool eventFilter(QObject *obj, QEvent *e) override; 92 | void resizeEvent(QResizeEvent *) override; 93 | 94 | private: 95 | Activity *m_activity; 96 | DockSettings *m_settings; 97 | ApplicationModel *m_appModel; 98 | FakeWindow *m_fakeWindow; 99 | TrashManager *m_trashManager; 100 | 101 | bool m_hideBlocked; 102 | 103 | QTimer *m_showTimer; 104 | QTimer *m_hideTimer; 105 | }; 106 | 107 | #endif // MAINWINDOW_H 108 | -------------------------------------------------------------------------------- /qml/AppItem.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | import QtQuick 2.12 21 | import QtQuick.Controls 2.12 22 | import Cutefish.Dock 1.0 23 | import FishUI 1.0 as FishUI 24 | 25 | DockItem { 26 | id: appItem 27 | 28 | property var windowCount: model.windowCount 29 | property var dragSource: null 30 | 31 | iconName: model.iconName ? model.iconName : "application-x-desktop" 32 | isActive: model.isActive 33 | popupText: model.visibleName 34 | enableActivateDot: windowCount !== 0 35 | draggable: !model.fixed 36 | dragItemIndex: index 37 | 38 | onXChanged: { 39 | if (windowCount > 0) 40 | updateGeometry() 41 | } 42 | 43 | onYChanged: { 44 | if (windowCount > 0) 45 | updateGeometry() 46 | } 47 | 48 | onWindowCountChanged: { 49 | if (windowCount > 0) 50 | updateGeometry() 51 | } 52 | 53 | onPositionChanged: updateGeometry() 54 | onPressed: updateGeometry() 55 | onRightClicked: if (model.appId !== "cutefish-launcher") contextMenu.show() 56 | 57 | onClicked: { 58 | if (mouse.button === Qt.LeftButton) 59 | appModel.clicked(model.appId) 60 | else if (mouse.button === Qt.MiddleButton) 61 | appModel.openNewInstance(model.appId) 62 | } 63 | 64 | dropArea.onEntered: { 65 | appItem.dragSource = drag.source 66 | dropTimer.restart() 67 | } 68 | 69 | dropArea.onExited: { 70 | appItem.dragSource = null 71 | dropTimer.stop() 72 | } 73 | 74 | dropArea.onDropped: { 75 | appModel.save() 76 | updateGeometry() 77 | } 78 | 79 | Timer { 80 | id: dropTimer 81 | interval: 300 82 | onTriggered: { 83 | if (appItem.dragSource) 84 | appModel.move(appItem.dragSource.dragItemIndex, 85 | appItem.dragItemIndex) 86 | else 87 | appModel.raiseWindow(model.appId) 88 | } 89 | } 90 | 91 | FishUI.DesktopMenu { 92 | id: contextMenu 93 | 94 | MenuItem { 95 | text: qsTr("Open") 96 | visible: windowCount === 0 97 | onTriggered: appModel.openNewInstance(model.appId) 98 | } 99 | 100 | MenuItem { 101 | text: model.visibleName 102 | visible: windowCount > 0 && model.visibleName 103 | onTriggered: appModel.openNewInstance(model.appId) 104 | } 105 | 106 | MenuItem { 107 | text: model.isPinned ? qsTr("Unpin") : qsTr("Pin") 108 | visible: model.desktopFile !== "" 109 | onTriggered: { 110 | model.isPinned ? appModel.unPin(model.appId) : appModel.pin(model.appId) 111 | } 112 | } 113 | 114 | MenuItem { 115 | visible: windowCount !== 0 116 | text: windowCount === 1 ? qsTr("Close window") 117 | : qsTr("Close %1 windows").arg(windowCount) 118 | onTriggered: appModel.closeAllByAppId(model.appId) 119 | } 120 | } 121 | 122 | 123 | function updateGeometry() { 124 | if (model.fixed) 125 | return 126 | 127 | appModel.updateGeometries(model.appId, Qt.rect(appItem.mapToGlobal(0, 0).x, 128 | appItem.mapToGlobal(0, 0).y, 129 | appItem.width, appItem.height)) 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/fakewindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "fakewindow.h" 21 | #include "docksettings.h" 22 | 23 | // Qt 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | 33 | // X11 34 | #include 35 | 36 | FakeWindow::FakeWindow(QQuickView *parent) 37 | : QQuickView(parent) 38 | , m_delayedContainsMouse(false) 39 | , m_containsMouse(false) 40 | { 41 | setColor(Qt::transparent); 42 | setDefaultAlphaBuffer(true); 43 | setFlags(Qt::FramelessWindowHint | 44 | Qt::WindowStaysOnTopHint | 45 | Qt::NoDropShadowWindowHint | 46 | Qt::WindowDoesNotAcceptFocus); 47 | // setScreen(qApp->primaryScreen()); 48 | // updateGeometry(); 49 | show(); 50 | 51 | m_delayedMouseTimer.setSingleShot(true); 52 | m_delayedMouseTimer.setInterval(50); 53 | connect(&m_delayedMouseTimer, &QTimer::timeout, this, [this]() { 54 | if (m_delayedContainsMouse) { 55 | setContainsMouse(true); 56 | } else { 57 | setContainsMouse(false); 58 | } 59 | }); 60 | 61 | connect(DockSettings::self(), &DockSettings::directionChanged, this, &FakeWindow::updateGeometry); 62 | } 63 | 64 | bool FakeWindow::containsMouse() const 65 | { 66 | return m_containsMouse; 67 | } 68 | 69 | bool FakeWindow::event(QEvent *e) 70 | { 71 | if (e->type() == QEvent::DragEnter || e->type() == QEvent::DragMove) { 72 | if (!m_containsMouse) { 73 | m_delayedContainsMouse = false; 74 | m_delayedMouseTimer.stop(); 75 | setContainsMouse(true); 76 | emit dragEntered(); 77 | } 78 | } else if (e->type() == QEvent::Enter) { 79 | m_delayedContainsMouse = true; 80 | if (!m_delayedMouseTimer.isActive()) { 81 | m_delayedMouseTimer.start(); 82 | } 83 | } else if (e->type() == QEvent::Leave || e->type() == QEvent::DragLeave) { 84 | m_delayedContainsMouse = false; 85 | if (!m_delayedMouseTimer.isActive()) { 86 | m_delayedMouseTimer.start(); 87 | } 88 | } else if (e->type() == QEvent::Show) { 89 | KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher); 90 | } 91 | 92 | return QQuickView::event(e); 93 | } 94 | 95 | void FakeWindow::setContainsMouse(bool contains) 96 | { 97 | if (m_containsMouse != contains) { 98 | m_containsMouse = contains; 99 | emit containsMouseChanged(contains); 100 | } 101 | } 102 | 103 | void FakeWindow::updateGeometry() 104 | { 105 | int length = 5; 106 | const QRect screenRect = qApp->primaryScreen()->geometry(); 107 | QRect newRect; 108 | 109 | switch (DockSettings::self()->direction()) 110 | { 111 | case DockSettings::Left: 112 | newRect = QRect(screenRect.x() - (length * 2), 113 | (screenRect.height() + length) / 2, 114 | length, screenRect.height()); 115 | break; 116 | case DockSettings::Bottom: 117 | newRect = QRect(screenRect.x(), 118 | screenRect.y() + screenRect.height() - length, 119 | screenRect.width(), length); 120 | break; 121 | case DockSettings::Right: 122 | newRect = QRect(screenRect.x() + screenRect.width() - length, 123 | screenRect.y(), 124 | length, screenRect.height()); 125 | break; 126 | } 127 | 128 | setGeometry(newRect); 129 | } 130 | -------------------------------------------------------------------------------- /src/docksettings.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 CutefishOS Team. 3 | * 4 | * Author: rekols 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "docksettings.h" 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | static DockSettings *SELF = nullptr; 30 | 31 | DockSettings *DockSettings::self() 32 | { 33 | if (SELF == nullptr) 34 | SELF = new DockSettings; 35 | 36 | return SELF; 37 | } 38 | 39 | DockSettings::DockSettings(QObject *parent) 40 | : QObject(parent) 41 | , m_iconSize(0) 42 | , m_edgeMargins(0) 43 | , m_roundedWindowEnabled(true) 44 | , m_direction(Left) 45 | , m_visibility(AlwaysShow) 46 | , m_settings(new QSettings(QSettings::UserScope, "cutefishos", "dock")) 47 | { 48 | if (!m_settings->contains("IconSize")) 49 | m_settings->setValue("IconSize", 53); 50 | if (!m_settings->contains("Direction")) 51 | m_settings->setValue("Direction", Bottom); 52 | if (!m_settings->contains("Visibility")) 53 | m_settings->setValue("Visibility", AlwaysShow); 54 | if (!m_settings->contains("RoundedWindow")) 55 | m_settings->setValue("RoundedWindow", true); 56 | if (!m_settings->contains("Style")) 57 | m_settings->setValue("Style", Round); 58 | if (!m_settings->contains("EdgeMargins")) 59 | m_settings->setValue("EdgeMargins", 10); 60 | 61 | m_settings->sync(); 62 | 63 | m_iconSize = m_settings->value("IconSize").toInt(); 64 | m_direction = static_cast(m_settings->value("Direction").toInt()); 65 | m_visibility = static_cast(m_settings->value("Visibility").toInt()); 66 | m_roundedWindowEnabled = m_settings->value("RoundedWindow").toBool(); 67 | m_style = static_cast