forked from Shinonome/dots-hyprland
use python venv for opencv python scripts (#2143)
This commit is contained in:
@@ -152,7 +152,7 @@ Variants {
|
||||
property int contentHeight: 300
|
||||
property int horizontalPadding: bgRoot.movableXSpace
|
||||
property int verticalPadding: bgRoot.movableYSpace
|
||||
command: [Quickshell.shellPath("scripts/images/least_busy_region.py"), "--screen-width", Math.round(bgRoot.screen.width / bgRoot.effectiveWallpaperScale), "--screen-height", Math.round(bgRoot.screen.height / bgRoot.effectiveWallpaperScale), "--width", contentWidth, "--height", contentHeight, "--horizontal-padding", horizontalPadding, "--vertical-padding", verticalPadding, path
|
||||
command: [Quickshell.shellPath("scripts/images/least-busy-region-venv.sh"), "--screen-width", Math.round(bgRoot.screen.width / bgRoot.effectiveWallpaperScale), "--screen-height", Math.round(bgRoot.screen.height / bgRoot.effectiveWallpaperScale), "--width", contentWidth, "--height", contentHeight, "--horizontal-padding", horizontalPadding, "--vertical-padding", verticalPadding, path
|
||||
// "--visual-output",
|
||||
,]
|
||||
stdout: StdioCollector {
|
||||
|
||||
@@ -307,7 +307,7 @@ ShellRoot {
|
||||
|
||||
Process {
|
||||
id: imageDetectionProcess
|
||||
command: ["bash", "-c", `${Directories.scriptPath}/images/find_regions.py `
|
||||
command: ["bash", "-c", `${Directories.scriptPath}/images/find-regions-venv.sh `
|
||||
+ `--hyprctl `
|
||||
+ `--image '${StringUtils.shellSingleQuoteEscape(panelWindow.screenshotPath)}' `
|
||||
+ `--max-width ${Math.round(panelWindow.screen.width * root.falsePositivePreventionRatio)} `
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate
|
||||
"$SCRIPT_DIR/find_regions.py" "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env -S\_/bin/sh\_-c\_"source\_\$(eval\_echo\_\$ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate&&exec\_python\_-E\_"\$0"\_"\$@""
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import cv2
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate
|
||||
"$SCRIPT_DIR/least_busy_region.py" "$@"
|
||||
|
||||
@@ -13,5 +13,4 @@ depends=(
|
||||
libportal-gtk4
|
||||
gobject-introspection
|
||||
sassc
|
||||
python-opencv
|
||||
)
|
||||
|
||||
@@ -14,3 +14,5 @@ loguru
|
||||
pycairo
|
||||
pygobject
|
||||
tqdm
|
||||
numpy
|
||||
opencv-contrib-python
|
||||
|
||||
@@ -22,8 +22,12 @@ materialyoucolor==2.0.10
|
||||
# kde-material-you-colors
|
||||
numpy==2.2.2
|
||||
# via
|
||||
# -r scriptdata/uv/requirements.in
|
||||
# kde-material-you-colors
|
||||
# material-color-utilities
|
||||
# opencv-contrib-python
|
||||
opencv-contrib-python==4.12.0.88
|
||||
# via -r scriptdata/uv/requirements.in
|
||||
packaging==24.2
|
||||
# via
|
||||
# build
|
||||
|
||||
Reference in New Issue
Block a user