Skip to content

Commit

Permalink
Merge pull request #32 from Thaodan/kf6
Browse files Browse the repository at this point in the history
Kf6
  • Loading branch information
duvholt authored Apr 28, 2024
2 parents 880ed6a + 9ded353 commit fd0951b
Show file tree
Hide file tree
Showing 15 changed files with 609 additions and 463 deletions.
13 changes: 13 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0

variables:
GIT_SUBMODULE_STRATEGY: recursive

include:
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/linux.yml
- /gitlab-templates/freebsd.yml
- /gitlab-templates/linux-qt6.yml
- /gitlab-templates/freebsd-qt6.yml
26 changes: 26 additions & 0 deletions .kde-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Dependencies:
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']
'require':
'frameworks/extra-cmake-modules': '@stable'
'frameworks/kcoreaddons': '@stable'
'frameworks/kconfig': '@stable'
'frameworks/kconfigwidgets': '@stable'
'frameworks/ki18n': '@stable'
'frameworks/knotifications': '@stable'
'frameworks/krunner': '@stable'
'frameworks/kcmutils': '@stable'
'frameworks/kguiaddons': '@stable'
'plasma/libplasma': '@stable'

- 'on': ['Linux/Qt6', 'FreeBSD/Qt6']
'require':
'frameworks/extra-cmake-modules': '@latest-kf6'
'frameworks/kcoreaddons': '@latest-kf6'
'frameworks/kconfig': '@latest-kf6'
'frameworks/kconfigwidgets': '@latest-kf6'
'frameworks/ki18n': '@latest-kf6'
'frameworks/knotifications': '@latest-kf6'
'frameworks/krunner': '@latest-kf6'
'frameworks/kcmutils': '@latest-kf6'
'frameworks/kguiaddons': '@latest-kf6'
'plasma/libplasma': '@latest-kf6'
33 changes: 28 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.16.0)

project(I3Pager)

find_package(ECM REQUIRED NO_MODULE)

set(CMAKE_CXX_STANDARD 17)
set(QT_MAJOR_VERSION "6")
set(QT_MIN_VERSION "6.4.0")
set(KF_MIN_VERSION "6.0.0")
set(KF_MAJOR_VERSION "6")

set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH})

include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(FeatureSummary)

find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION}
CONFIG REQUIRED
Quick
Concurrent
# Plugin
Widgets
)
find_package(KF${KF_MAJOR_VERSION} ${KF6_MIN_VERSION}
REQUIRED COMPONENTS
WindowSystem
# Pulled in by Plasma
Config

)
find_package(Plasma)

find_package(KF5Plasma REQUIRED)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Quick)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Plasma)
find_package(KF5WindowSystem)

plasma_install_package(plasmoid org.kde.I3Pager)

Expand All @@ -22,3 +43,5 @@ add_subdirectory(i3ipc++)

target_compile_options(i3ipc++ PRIVATE -fexceptions -fPIC -Wno-deprecated-declarations)
add_subdirectory(src)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
2 changes: 1 addition & 1 deletion i3ipc++
6 changes: 3 additions & 3 deletions plasmoid/contents/config/config.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import QtQuick 2.0
import org.kde.plasma.configuration 2.0
import QtQuick 2.15
import org.kde.plasma.configuration

ConfigModel {
ConfigCategory {
Expand All @@ -12,4 +12,4 @@ ConfigModel {
icon: "monitor"
source: "configScreens.qml"
}
}
}
233 changes: 126 additions & 107 deletions plasmoid/contents/ui/configGeneral.qml
Original file line number Diff line number Diff line change
@@ -1,141 +1,160 @@
import QtQuick 2.0
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.12
import org.kde.kirigami 2.4 as Kirigami
import QtQuick 2.15
import QtQuick.Controls
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kcmutils as KCM

Kirigami.FormLayout {
id : page
width : childrenRect.width
height : childrenRect.height
KCM.SimpleKCM {

property alias cfg_showWorkspaceNames : showWorkspaceNames.checked
property alias cfg_filterByCurrentScreen : filterByCurrentScreen.checked
property alias cfg_urgentColorWholeWorkspace : urgentColorWholeWorkspace.checked
property alias cfg_rounded : rounded.checked
property var cfg_orderWorkspacesBy
property var cfg_style
property var cfg_styleDefault
property var cfg_indicatorPosition
property var cfg_colorWorkspaceByScreen
property var cfg_colorWorkspaceByScreenDefault
property var cfg_filterByCurrentScreenDefault
property var cfg_indicatorPositionDefault
property var cfg_orderWorkspacesByDefault
property var cfg_roundedDefault
property var cfg_screenColorList
property var cfg_screenColorListDefault
property var cfg_screenColorOpacity
property var cfg_screenColorOpacityDefault
property var cfg_screenNameList
property var cfg_screenNameListDefault
property var cfg_showWorkspaceNamesDefault
property var cfg_urgentColorWholeWorkspaceDefault

Kirigami.FormLayout {
id : page
width : childrenRect.width
height : childrenRect.height

ColumnLayout {
Kirigami.FormData.label : i18n("Basic:")
Kirigami.FormData.buddyFor : showWorkspaceNames

CheckBox {
id : showWorkspaceNames
text : i18n("Show workspace names")
checked : plasmoid.configuration.showWorkspaceNames
onCheckedChanged : plasmoid.configuration.showWorkspaceNames = checked
}

ColumnLayout {
Kirigami.FormData.label : i18n("Basic:")
Kirigami.FormData.buddyFor : showWorkspaceNames

CheckBox {
id : showWorkspaceNames
text : i18n("Show workspace names")
checked : plasmoid.configuration.showWorkspaceNames
onCheckedChanged : plasmoid.configuration.showWorkspaceNames = checked
}
CheckBox {
id : filterByCurrentScreen
text : i18n("Filter workspaces by current screen")
checked : plasmoid.configuration.filterByCurrentScreen
onCheckedChanged : plasmoid.configuration.filterByCurrentScreen = checked
}

CheckBox {
id : filterByCurrentScreen
text : i18n("Filter workspaces by current screen")
checked : plasmoid.configuration.filterByCurrentScreen
onCheckedChanged : plasmoid.configuration.filterByCurrentScreen = checked
}
CheckBox {
id : urgentColorWholeWorkspace
text : i18n("Color the whole workspace if urgent")
checked : plasmoid.configuration.urgentColorWholeWorkspace
onCheckedChanged : plasmoid.configuration.urgentColorWholeWorkspace = checked
}

CheckBox {
id : urgentColorWholeWorkspace
text : i18n("Color the whole workspace if urgent")
checked : plasmoid.configuration.urgentColorWholeWorkspace
onCheckedChanged : plasmoid.configuration.urgentColorWholeWorkspace = checked
CheckBox {
id : rounded
text : i18n("Rounded corners")
checked : plasmoid.configuration.rounded
onCheckedChanged : plasmoid.configuration.rounded = checked
}
}

CheckBox {
id : rounded
text : i18n("Rounded corners")
checked : plasmoid.configuration.rounded
onCheckedChanged : plasmoid.configuration.rounded = checked
Item {
Kirigami.FormData.isSection : true
}
}

Item {
Kirigami.FormData.isSection : true
}

ColumnLayout {
Kirigami.FormData.label : i18n("Order workspaces by:")
Kirigami.FormData.buddyFor : orderWorkspacesByDefaultRadio

RadioButton {
id : orderWorkspacesByDefaultRadio
text : i18n("Default")
checked : cfg_orderWorkspacesBy == "default"
onClicked : {
cfg_orderWorkspacesBy = "default"
ColumnLayout {
Kirigami.FormData.label : i18n("Order workspaces by:")
Kirigami.FormData.buddyFor : orderWorkspacesByDefaultRadio

RadioButton {
id : orderWorkspacesByDefaultRadio
text : i18n("Default")
checked : cfg_orderWorkspacesBy == "default"
onClicked : {
cfg_orderWorkspacesBy = "default"
}
}
}

RadioButton {
id : orderWorkspacesByScreenRadio
text : i18n("Screen")
checked : cfg_orderWorkspacesBy == "screen"
onClicked : {
cfg_orderWorkspacesBy = "screen"
RadioButton {
id : orderWorkspacesByScreenRadio
text : i18n("Screen")
checked : cfg_orderWorkspacesBy == "screen"
onClicked : {
cfg_orderWorkspacesBy = "screen"
}
}
}

RadioButton {
id : orderWorkspacesByName
text : i18n("Name")
checked : cfg_orderWorkspacesBy == "name"
onClicked : {
cfg_orderWorkspacesBy = "name"

RadioButton {
id : orderWorkspacesByName
text : i18n("Name")
checked : cfg_orderWorkspacesBy == "name"
onClicked : {
cfg_orderWorkspacesBy = "name"
}
}
}
}

Item {
Kirigami.FormData.isSection : true
}

ColumnLayout {
Kirigami.FormData.label : i18n("Indicator style:")
Kirigami.FormData.buddyFor : styleUnderlineRadio
Item {
Kirigami.FormData.isSection : true
}

RadioButton {
id : styleUnderlineRadio
text : i18n("Line")
checked : cfg_style == "line"
onClicked : {
cfg_style = "line"
ColumnLayout {
Kirigami.FormData.label : i18n("Indicator style:")
Kirigami.FormData.buddyFor : styleUnderlineRadio

RadioButton {
id : styleUnderlineRadio
text : i18n("Line")
checked : cfg_style == "line"
onClicked : {
cfg_style = "line"
}
}
}

RadioButton {
id : styleBorderRadio
text : i18n("Border")
checked : cfg_style == "border"
onClicked : {
cfg_style = "border"
RadioButton {
id : styleBorderRadio
text : i18n("Border")
checked : cfg_style == "border"
onClicked : {
cfg_style = "border"
}
}
}
}

Item {
Kirigami.FormData.isSection : true
}
Item {
Kirigami.FormData.isSection : true
}

ColumnLayout {
Kirigami.FormData.label : i18n("Indicator position:")
Kirigami.FormData.buddyFor : indicatorPositionTopRadio
visible : cfg_style == "line"

RadioButton {
id : indicatorPositionTopRadio
text : i18n("Top")
checked : cfg_indicatorPosition == "top"
onClicked : {
cfg_indicatorPosition = "top"
ColumnLayout {
Kirigami.FormData.label : i18n("Indicator position:")
Kirigami.FormData.buddyFor : indicatorPositionTopRadio
visible : cfg_style == "line"

RadioButton {
id : indicatorPositionTopRadio
text : i18n("Top")
checked : cfg_indicatorPosition == "top"
onClicked : {
cfg_indicatorPosition = "top"
}
}
}

RadioButton {
id : indicatorPositionBottomRadio
text : i18n("Bottom")
checked : cfg_indicatorPosition == "bottom"
onClicked : {
cfg_indicatorPosition = "bottom"
RadioButton {
id : indicatorPositionBottomRadio
text : i18n("Bottom")
checked : cfg_indicatorPosition == "bottom"
onClicked : {
cfg_indicatorPosition = "bottom"
}
}
}
}
Expand Down
Loading

0 comments on commit fd0951b

Please sign in to comment.