-
Notifications
You must be signed in to change notification settings - Fork 277
Hyprland Visual Editor (HVE) #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
80f841e
feat(hve): add plugin folder as a standard directory
XimoCP 949b837
Merge branch 'noctalia-dev:main' into main
XimoCP cac5f03
feat(hyprland-visual-editor): initial release v1.0.0 featuring animat…
XimoCP bce3a2f
Merge branch 'noctalia-dev:main' into main
XimoCP bc7f1e0
refactor: implement Noctalia UI standards and remove hardcoded values
XimoCP 16bbcd6
Merge branch 'noctalia-dev:main' into main
XimoCP 349cce4
merge: synchronize with remote changes
XimoCP 428a5ef
Merge branch 'main' of https://github.com/XimoCP/noctalia-plugins
XimoCP c0040db
style: apply Style singleton for borders
XimoCP 0ed8606
change de spacing:0 a Style Singleton
XimoCP 6338cec
chore: final cleanup - removing accidental git file
XimoCP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Persistencia de Noctalia | ||
| LEEME.md | ||
|
|
||
| # Persistencia antigua de QML | ||
| assets/welcome.conf | ||
| assets/borders/store.conf | ||
|
|
||
| # Archivos generados dinámicamente | ||
| overlay.conf | ||
| assets/fragments/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import Quickshell | ||
| import qs.Commons | ||
| import qs.Services.UI | ||
| import qs.Widgets | ||
|
|
||
| NIconButton { | ||
| id: root | ||
|
|
||
| property var pluginApi: null | ||
|
|
||
| property ShellScreen screen | ||
| property string widgetId: "" | ||
| property string section: "" | ||
|
|
||
| property var cfg: pluginApi?.pluginSettings || ({}) | ||
| property var defaults: pluginApi?.manifest?.metadata?.defaultSettings || ({}) | ||
|
|
||
| readonly property string iconColorKey: cfg.iconColor ?? defaults.iconColor ?? "onSurface" | ||
|
|
||
| icon: "adjustments-horizontal" | ||
| tooltipText: pluginApi?.tr("widget.tooltip") | ||
|
|
||
| tooltipDirection: BarService.getTooltipDirection(screen?.name) | ||
| baseSize: Style.getCapsuleHeightForScreen(screen?.name) | ||
|
|
||
| customRadius: Style.radiusM | ||
|
|
||
| colorBg: Style.capsuleColor | ||
| colorFg: Color.resolveColorKey(iconColorKey) | ||
|
|
||
| border.color: Style.capsuleBorderColor | ||
| border.width: 1 * Style.uiScaleRatio | ||
|
XimoCP marked this conversation as resolved.
Outdated
|
||
|
|
||
| onClicked: { | ||
| if (pluginApi) { | ||
| pluginApi.openPanel(root.screen, this); | ||
| } | ||
| } | ||
|
|
||
| NPopupContextMenu { | ||
| id: contextMenu | ||
|
|
||
| model: [ | ||
| { | ||
| "label": pluginApi?.tr("widget.menu_settings"), | ||
| "action": "settings", | ||
| "icon": "settings" | ||
| }, | ||
| ] | ||
|
|
||
| onTriggered: function (action) { | ||
| contextMenu.close(); | ||
| PanelService.closeContextMenu(screen); | ||
| if (action === "settings") { | ||
| BarService.openPluginSettings(root.screen, pluginApi.manifest); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| onRightClicked: { | ||
| PanelService.showContextMenu(contextMenu, root, screen); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,194 @@ | ||
| import QtQuick | ||
| import Quickshell | ||
| import Quickshell.Io | ||
| import QtQuick.Layouts | ||
| import QtQuick.Controls | ||
| import qs.Commons | ||
| import qs.Widgets | ||
| import qs.Services.UI | ||
| import "./modules" | ||
|
|
||
| Item { | ||
| id: root | ||
|
|
||
| property var pluginApi: null | ||
|
|
||
| readonly property real barHeight: Style.marginXL | ||
|
|
||
| readonly property string pluginDir: pluginApi?.pluginDir || "" | ||
| readonly property var geometryPlaceholder: panelContainer | ||
| readonly property bool allowAttach: true | ||
|
|
||
| Component { | ||
| id: processFactory | ||
| Process { | ||
| id: tempProcess | ||
| onStderrChanged: if (stderr.trim() !== "") Logger.e("HVE", "Script Error: " + stderr) | ||
| onExited: tempProcess.destroy() | ||
| } | ||
| } | ||
|
|
||
| function runScript(scriptName, args) { | ||
| var scriptPath = pluginDir + "/assets/scripts/" + scriptName | ||
| Logger.i("HVE", "Executing: " + scriptPath + " " + args) | ||
|
|
||
| var p = processFactory.createObject(root) | ||
| p.command = ["bash", scriptPath, args] | ||
| p.running = true | ||
| } | ||
|
|
||
| property real contentPreferredWidth: 700 * Style.uiScaleRatio | ||
| property real contentPreferredHeight: 700 * Style.uiScaleRatio | ||
|
|
||
| anchors.fill: parent | ||
|
|
||
| NBox { | ||
| id: panelContainer | ||
| anchors.fill: parent | ||
| anchors.topMargin: root.barHeight | ||
| color: "transparent" | ||
|
|
||
| ColumnLayout { | ||
| anchors.fill: parent | ||
| anchors.margins: Style.marginL | ||
| spacing: Style.marginM | ||
|
|
||
| RowLayout { | ||
| Layout.fillWidth: true | ||
| spacing: Style.marginS | ||
| Layout.bottomMargin: Style.marginL | ||
|
|
||
| Item { Layout.fillWidth: true } | ||
|
|
||
| NIcon { | ||
| icon: "adjustments-horizontal" | ||
| color: Color.mPrimary | ||
| pointSize: Style.fontSizeXXL | ||
| } | ||
|
|
||
| ColumnLayout { | ||
| spacing: 0 | ||
| Layout.alignment: Qt.AlignCenter | ||
| NText { | ||
| text: pluginApi?.tr("panel.header_title") | ||
| pointSize: Style.fontSizeXL | ||
| font.weight: Font.Bold | ||
| color: Color.mPrimary | ||
| } | ||
| NText { | ||
| text: pluginApi?.tr("panel.header_subtitle") | ||
| pointSize: Style.fontSizeS | ||
| color: Color.mOnSurfaceVariant | ||
| } | ||
| } | ||
|
|
||
| Item { Layout.fillWidth: true } | ||
| } | ||
|
|
||
| RowLayout { | ||
| Layout.fillWidth: true | ||
| spacing: Style.marginS | ||
|
|
||
| TabItem { | ||
| label: pluginApi?.tr("panel.tabs.home") | ||
| iconName: "home" | ||
| index: 0 | ||
| accentColor: "#38bdf8" | ||
| isSelected: stackLayout.currentIndex === 0 | ||
| } | ||
| TabItem { | ||
| label: pluginApi?.tr("panel.tabs.animations") | ||
| iconName: "movie" | ||
| index: 1 | ||
| accentColor: "#fbbf24" | ||
| isSelected: stackLayout.currentIndex === 1 | ||
| } | ||
| TabItem { | ||
| label: pluginApi?.tr("panel.tabs.borders") | ||
| iconName: "border-all" | ||
| index: 2 | ||
| accentColor: "#10b981" | ||
| isSelected: stackLayout.currentIndex === 2 | ||
| } | ||
| TabItem { | ||
| label: pluginApi?.tr("panel.tabs.effects") | ||
| iconName: "wand" | ||
| index: 3 | ||
| accentColor: "#c084fc" | ||
| isSelected: stackLayout.currentIndex === 3 | ||
| } | ||
| } | ||
|
|
||
| NBox { | ||
| Layout.fillWidth: true | ||
| Layout.fillHeight: true | ||
| color: Color.mSurfaceVariant | ||
| radius: Style.radiusM | ||
| clip: true | ||
|
|
||
| StackLayout { | ||
| id: stackLayout | ||
| anchors.fill: parent | ||
| anchors.margins: Style.marginS | ||
| currentIndex: 0 | ||
|
|
||
| WelcomeModule { pluginApi: root.pluginApi; runScript: root.runScript } | ||
| AnimationModule { pluginApi: root.pluginApi; runScript: root.runScript } | ||
| BorderModule { pluginApi: root.pluginApi; runScript: root.runScript } | ||
| ShaderModule { pluginApi: root.pluginApi; runScript: root.runScript } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| component TabItem : NBox { | ||
| id: tabRoot | ||
| property string label | ||
| property string iconName | ||
| property color accentColor: Color.mPrimary | ||
| property int index | ||
| property bool isSelected | ||
|
|
||
| Layout.fillWidth: true | ||
| implicitHeight: tabContent.implicitHeight + (Style.marginM * 2) | ||
| radius: Style.radiusM | ||
|
|
||
| readonly property color currentAccent: isSelected ? Color.mPrimary : accentColor | ||
|
|
||
| color: isSelected ? Qt.alpha(Color.mPrimary, Style.stateOpacityActive) : (tabMouse.containsMouse ? Qt.alpha(accentColor, Style.stateOpacityHover) : "transparent") | ||
|
|
||
| border.width: 1 * Style.uiScaleRatio | ||
|
XimoCP marked this conversation as resolved.
Outdated
|
||
|
|
||
| border.color: isSelected ? Color.mPrimary : (tabMouse.containsMouse ? accentColor : Qt.alpha(accentColor, Style.stateOpacityHover)) | ||
|
|
||
| Behavior on color { ColorAnimation { duration: 150 } } | ||
| Behavior on border.color { ColorAnimation { duration: 150 } } | ||
|
|
||
| MouseArea { | ||
| id: tabMouse | ||
| anchors.fill: parent | ||
| hoverEnabled: true | ||
| cursorShape: Qt.PointingHandCursor | ||
| onClicked: stackLayout.currentIndex = index | ||
| } | ||
|
|
||
| RowLayout { | ||
| id: tabContent | ||
| anchors.centerIn: parent | ||
| spacing: Style.marginS | ||
|
|
||
| NIcon { | ||
| icon: iconName | ||
| color: (isSelected || tabMouse.containsMouse) ? tabRoot.currentAccent : Color.mOnSurfaceVariant | ||
| Behavior on color { ColorAnimation { duration: 150 } } | ||
| } | ||
|
|
||
| NText { | ||
| text: label | ||
| font.weight: isSelected ? Font.Bold : Font.Normal | ||
| color: (isSelected || tabMouse.containsMouse) ? Color.mOnSurface : Color.mOnSurfaceVariant | ||
| pointSize: Style.fontSizeS | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.