diff options
| author | Don Williams <don.e.williams@gmail.com> | 2025-11-30 20:04:02 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2025-11-30 20:04:02 -0500 |
| commit | ca0c23cce006ea3f7d793c5fa8eee6acff196470 (patch) | |
| tree | 092a7446c0f494c958b11b1af09474d99718a74e /config/quickshell/overview/common/functions | |
| parent | 510eafbe0560cff6e459b64fcb778d645cd43ab3 (diff) | |
Integrate Quickshell-Overview with Qt6 fixes and automation scripts
## Overview
This commit integrates the corrected Quickshell-Overview feature across all
installation and update workflows. The overview provides an AGS alternative
with live window previews toggled via Super+TAB keybind.
## Changes
### 1. Quickshell Overview QML Files
- Added config/quickshell/overview/ subdirectory with Qt6-compatible QML
- Includes 20+ files covering:
* OverviewWindow.qml with proper clipping (no OpacityMask, uses QtQuick.Effects)
* OverviewWidget.qml for window handling
* Overview.qml main component with Hyprland integration
* Common utilities and styling
* Services for Hyprland data and global state management
### 2. copy.sh Updates
- Removes default shell.qml that blocks quickshell named config detection
- Auto-copies config/quickshell/overview to ~/.config/quickshell/overview/
- Updates old 'qs' startup commands to 'qs -c overview'
- Handles both fresh installs and config overwrite scenarios
### 3. upgrade.sh Updates
- Added config/quickshell/ to upgrade directory list
- Excludes shell.qml to preserve overview config detection capability
- Enables seamless upgrades without losing quickshell settings
### 4. IPC Command Fixes
- Corrected OverviewToggle.sh to use proper 'qs ipc -c overview call overview toggle'
- Fixed startup commands from old 'qs' to 'qs -c overview'
- Hyprland-Dots now uses corrected toggle script
## Qt6 Compatibility
- Replaced Qt5Compat.GraphicalEffects with QtQuick.Effects
- Removed OpacityMask in favor of Qt6-compatible clipping technique
- All QML properly imports Qt6 modules
## Release Script
- release.sh automatically uses copy.sh, inheriting all quickshell updates
## Testing
- Verified on target systems (Fedora 43 VM, jak-nixos)
- qs -c overview successfully launches overview config when shell.qml is removed
- IPC toggle commands work correctly within Wayland sessions
## Files Modified
- config/quickshell/overview/* (20 new files)
- copy.sh (enhanced QS handling)
- upgrade.sh (added quickshell to upgrade paths)
Diffstat (limited to 'config/quickshell/overview/common/functions')
| -rw-r--r-- | config/quickshell/overview/common/functions/ColorUtils.qml | 68 | ||||
| -rw-r--r-- | config/quickshell/overview/common/functions/qmldir | 1 |
2 files changed, 69 insertions, 0 deletions
diff --git a/config/quickshell/overview/common/functions/ColorUtils.qml b/config/quickshell/overview/common/functions/ColorUtils.qml new file mode 100644 index 00000000..6162df18 --- /dev/null +++ b/config/quickshell/overview/common/functions/ColorUtils.qml @@ -0,0 +1,68 @@ +pragma Singleton +import Quickshell + +Singleton { + id: root + + function colorWithHueOf(color1, color2) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + var hue = c2.hsvHue; + var sat = c1.hsvSaturation; + var val = c1.hsvValue; + var alpha = c1.a; + return Qt.hsva(hue, sat, val, alpha); + } + + function colorWithSaturationOf(color1, color2) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + var hue = c1.hsvHue; + var sat = c2.hsvSaturation; + var val = c1.hsvValue; + var alpha = c1.a; + return Qt.hsva(hue, sat, val, alpha); + } + + function colorWithLightness(color, lightness) { + var c = Qt.color(color); + return Qt.hsla(c.hslHue, c.hslSaturation, lightness, c.a); + } + + function colorWithLightnessOf(color1, color2) { + var c2 = Qt.color(color2); + return colorWithLightness(color1, c2.hslLightness); + } + + function adaptToAccent(color1, color2) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + var hue = c2.hslHue; + var sat = c2.hslSaturation; + var light = c1.hslLightness; + var alpha = c1.a; + return Qt.hsla(hue, sat, light, alpha); + } + + function mix(color1, color2, percentage = 0.5) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + return Qt.rgba( + percentage * c1.r + (1 - percentage) * c2.r, + percentage * c1.g + (1 - percentage) * c2.g, + percentage * c1.b + (1 - percentage) * c2.b, + percentage * c1.a + (1 - percentage) * c2.a + ); + } + + function transparentize(color, percentage = 1) { + var c = Qt.color(color); + return Qt.rgba(c.r, c.g, c.b, c.a * (1 - percentage)); + } + + function applyAlpha(color, alpha) { + var c = Qt.color(color); + var a = Math.max(0, Math.min(1, alpha)); + return Qt.rgba(c.r, c.g, c.b, a); + } +} diff --git a/config/quickshell/overview/common/functions/qmldir b/config/quickshell/overview/common/functions/qmldir new file mode 100644 index 00000000..4c648e7e --- /dev/null +++ b/config/quickshell/overview/common/functions/qmldir @@ -0,0 +1 @@ +singleton ColorUtils 1.0 ColorUtils.qml |
