From 760c7034aa15adda6e791d4d65f7d37a7e03d07b Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 11 May 2026 23:45:44 +0200 Subject: [PATCH 1/2] qs: fix hyprland dispatchers --- .../quickshell/ii/modules/ii/bar/UtilButtons.qml | 4 ++-- .../quickshell/ii/modules/ii/bar/Workspaces.qml | 12 ++++++------ .../quickshell/ii/modules/ii/overview/Overview.qml | 6 ------ .../ii/modules/ii/overview/OverviewWidget.qml | 14 +++++++------- .../ii/modules/ii/sidebarLeft/anime/BooruImage.qml | 8 ++++---- .../ii/sidebarRight/SidebarRightContent.qml | 2 +- .../ii/modules/waffle/taskView/TaskViewContent.qml | 4 ++-- .../ii/modules/waffle/taskView/TaskViewWindow.qml | 6 +++--- .../quickshell/ii/services/LauncherSearch.qml | 2 +- .../anti-flashbang.glsl | 2 +- 10 files changed, 27 insertions(+), 33 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/ii/bar/UtilButtons.qml b/dots/.config/quickshell/ii/modules/ii/bar/UtilButtons.qml index abda8a63b..615ed6539 100644 --- a/dots/.config/quickshell/ii/modules/ii/bar/UtilButtons.qml +++ b/dots/.config/quickshell/ii/modules/ii/bar/UtilButtons.qml @@ -107,9 +107,9 @@ Item { Layout.alignment: Qt.AlignVCenter onClicked: event => { if (Appearance.m3colors.darkmode) { - Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`); + Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`]) } else { - Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`); + Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`]) } } MaterialSymbol { diff --git a/dots/.config/quickshell/ii/modules/ii/bar/Workspaces.qml b/dots/.config/quickshell/ii/modules/ii/bar/Workspaces.qml index 36c488730..ec845be1a 100644 --- a/dots/.config/quickshell/ii/modules/ii/bar/Workspaces.qml +++ b/dots/.config/quickshell/ii/modules/ii/bar/Workspaces.qml @@ -88,9 +88,9 @@ Item { WheelHandler { onWheel: (event) => { if (event.angleDelta.y < 0) - Hyprland.dispatch(`workspace r+1`); + Hyprland.dispatch(`hl.dsp.focus({workspace = "r+1"})`); else if (event.angleDelta.y > 0) - Hyprland.dispatch(`workspace r-1`); + Hyprland.dispatch(`hl.dsp.focus({workspace = "r-1"})`); } acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad } @@ -100,7 +100,7 @@ Item { acceptedButtons: Qt.BackButton onPressed: (event) => { if (event.button === Qt.BackButton) { - Hyprland.dispatch(`togglespecialworkspace`); + Hyprland.dispatch(`hl.dsp.workspace.toggle_special("special")`); } } } @@ -199,9 +199,9 @@ Item { property int workspaceValue: workspaceGroup * root.workspacesShown + index + 1 implicitHeight: vertical ? Appearance.sizes.verticalBarWidth : Appearance.sizes.barHeight implicitWidth: vertical ? Appearance.sizes.verticalBarWidth : Appearance.sizes.verticalBarWidth - onPressed: Hyprland.dispatch(`workspace ${workspaceValue}`) - width: vertical ? undefined : workspaceButtonWidth - height: vertical ? workspaceButtonWidth : undefined + onPressed: Hyprland.dispatch(`hl.dsp.focus({ workspace = ${workspaceValue}})`) + width: vertical ? undefined : root.workspaceButtonWidth + height: vertical ? root.workspaceButtonWidth : undefined background: Item { id: workspaceButtonBackground diff --git a/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml b/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml index fe3df64a3..b28ff5a46 100644 --- a/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml +++ b/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml @@ -80,12 +80,6 @@ Scope { Keys.onPressed: event => { if (event.key === Qt.Key_Escape) { GlobalStates.overviewOpen = false; - } else if (event.key === Qt.Key_Left) { - if (!panelWindow.searchingText) - Hyprland.dispatch("workspace r-1"); - } else if (event.key === Qt.Key_Right) { - if (!panelWindow.searchingText) - Hyprland.dispatch("workspace r+1"); } } diff --git a/dots/.config/quickshell/ii/modules/ii/overview/OverviewWidget.qml b/dots/.config/quickshell/ii/modules/ii/overview/OverviewWidget.qml index 4fa2bef67..3bd504c76 100644 --- a/dots/.config/quickshell/ii/modules/ii/overview/OverviewWidget.qml +++ b/dots/.config/quickshell/ii/modules/ii/overview/OverviewWidget.qml @@ -142,7 +142,7 @@ Item { onPressed: { if (root.draggingTargetWorkspace === -1) { GlobalStates.overviewOpen = false - Hyprland.dispatch(`workspace ${workspace.workspaceValue}`) + Hyprland.dispatch(`hl.dsp.focus({ workspace = ${workspace.workspaceValue} })`) } } } @@ -266,7 +266,7 @@ Item { window.Drag.active = false root.draggingFromWorkspace = -1 if (targetWorkspace !== -1 && targetWorkspace !== windowData?.workspace.id) { - Hyprland.dispatch(`movetoworkspacesilent ${targetWorkspace}, address:${window.windowData?.address}`) + Hyprland.dispatch(`hl.dsp.window.move({ workspace = ${targetWorkspace}, follow = false, window = "address:${window.windowData?.address}" })`) updateWindowPosition.restart() } else { @@ -274,9 +274,9 @@ Item { updateWindowPosition.restart() return } - const percentageX = Math.round((window.x - xOffset) / root.workspaceImplicitWidth * 100) - const percentageY = Math.round((window.y - yOffset) / root.workspaceImplicitHeight * 100) - Hyprland.dispatch(`movewindowpixel exact ${percentageX}% ${percentageY}%, address:${window.windowData?.address}`) + const percentageX = (window.x - xOffset) / root.workspaceImplicitWidth + const percentageY = (window.y - yOffset) / root.workspaceImplicitHeight + Hyprland.dispatch(`hl.dsp.window.move({ x = "${percentageX * root.screen.width}", y = "${percentageY * root.screen.height}", window = "address:${window.windowData?.address}" })`) } } onClicked: (event) => { @@ -284,10 +284,10 @@ Item { if (event.button === Qt.LeftButton) { GlobalStates.overviewOpen = false - Hyprland.dispatch(`focuswindow address:${windowData.address}`) + Hyprland.dispatch(`hl.dsp.focus({window = "address:${windowData.address}"})`) event.accepted = true } else if (event.button === Qt.MiddleButton) { - Hyprland.dispatch(`closewindow address:${windowData.address}`) + Hyprland.dispatch(`hl.dsp.window.close({window = "address:${windowData.address}"})`) event.accepted = true } } diff --git a/dots/.config/quickshell/ii/modules/ii/sidebarLeft/anime/BooruImage.qml b/dots/.config/quickshell/ii/modules/ii/sidebarLeft/anime/BooruImage.qml index ef0d7540e..9447abf88 100644 --- a/dots/.config/quickshell/ii/modules/ii/sidebarLeft/anime/BooruImage.qml +++ b/dots/.config/quickshell/ii/modules/ii/sidebarLeft/anime/BooruImage.qml @@ -147,9 +147,9 @@ Button { buttonText: Translation.tr("Open file link") onClicked: { root.showActions = false - Hyprland.dispatch("keyword cursor:no_warps true") + Hyprland.dispatch("hl.config({cursor = {no_warps = true}})") Qt.openUrlExternally(root.imageData.file_url) - Hyprland.dispatch("keyword cursor:no_warps false") + Hyprland.dispatch("hl.config({cursor = {no_warps = false}})") } } MenuButton { @@ -160,9 +160,9 @@ Button { enabled: root.imageData.source && root.imageData.source.length > 0 onClicked: { root.showActions = false - Hyprland.dispatch("keyword cursor:no_warps true") + Hyprland.dispatch("hl.config({cursor = {no_warps = true}})") Qt.openUrlExternally(root.imageData.source) - Hyprland.dispatch("keyword cursor:no_warps false") + Hyprland.dispatch("hl.config({cursor = {no_warps = false}})") } } MenuButton { diff --git a/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRightContent.qml b/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRightContent.qml index 0f733ed82..412912ed7 100644 --- a/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRightContent.qml +++ b/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRightContent.qml @@ -268,7 +268,7 @@ Item { toggled: false buttonIcon: "restart_alt" onClicked: { - Hyprland.dispatch("reload"); + Quickshell.execDetached(["hyprctl", "reload"]) Quickshell.reload(true); } StyledToolTip { diff --git a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml index 6828098cf..6a403dfe5 100644 --- a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml +++ b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml @@ -186,7 +186,7 @@ Rectangle { } else { root.draggingWindow = false; if (root.hoveredWorkspace !== null && root.hoveredWorkspace.workspace !== windowItem.hyprlandClient.workspace.id) { - Hyprland.dispatch(`movetoworkspacesilent ${root.hoveredWorkspace.workspace}, address:${windowItem.hyprlandClient.address}`); + Hyprland.dispatch(`hl.dsp.window.move({ workspace = ${root.hoveredWorkspace.workspace}, follow = false, window = "address:${windowItem.hyprlandClient.address}" })`) } else { windowItem.openedX = 0; windowItem.openedY = 0; @@ -292,7 +292,7 @@ Rectangle { onClicked: { GlobalStates.overviewOpen = false; root.closed(); // Close immediately to avoid weird animations - Hyprland.dispatch(`workspace ${workspaceItem.workspace}`); + Hyprland.dispatch(`hl.dsp.focus({workspace = ${workspaceItem.workspace}})`); } } } diff --git a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWindow.qml b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWindow.qml index b91655097..0450dcd79 100644 --- a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWindow.qml +++ b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWindow.qml @@ -62,14 +62,14 @@ WMouseAreaButton { } function closeWindow() { - Hyprland.dispatch(`closewindow address:${root.hyprlandClient?.address}`); + Hyprland.dispatch(`hl.dsp.window.close({window = "address:${root.hyprlandClient?.address}"})`) } acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton onClicked: event => { if (event.button === Qt.LeftButton) { GlobalStates.overviewOpen = false; - Hyprland.dispatch(`focuswindow address:${root.hyprlandClient?.address}`); + Hyprland.dispatch(`hl.dsp.focus({window = "address:${root.hyprlandClient?.address}"})`) GlobalStates.overviewOpen = false; } else if (event.button === Qt.MiddleButton) { root.closeWindow(); @@ -143,7 +143,7 @@ WMouseAreaButton { icon.name: isPinned ? "checkmark" : "empty" text: Translation.tr("Show this window on all desktops") onTriggered: { - Hyprland.dispatch(`pin address:${root.hyprlandClient?.address}`); + Hyprland.dispatch(`hl.dsp.window.pin({window = "address:${root.hyprlandClient?.address}"})`); } } Action { diff --git a/dots/.config/quickshell/ii/services/LauncherSearch.qml b/dots/.config/quickshell/ii/services/LauncherSearch.qml index 38287460e..25701fb6c 100644 --- a/dots/.config/quickshell/ii/services/LauncherSearch.qml +++ b/dots/.config/quickshell/ii/services/LauncherSearch.qml @@ -109,7 +109,7 @@ Singleton { { action: "wallpaper", execute: () => { - Hyprland.dispatch("global quickshell:wallpaperSelectorToggle") + Hyprland.dispatch(`hl.dsp.global("quickshell:wallpaperSelectorToggle")`) } }, { diff --git a/dots/.config/quickshell/ii/services/hyprlandAntiFlashbangShader/anti-flashbang.glsl b/dots/.config/quickshell/ii/services/hyprlandAntiFlashbangShader/anti-flashbang.glsl index 32e6ad2ed..5828185bb 100644 --- a/dots/.config/quickshell/ii/services/hyprlandAntiFlashbangShader/anti-flashbang.glsl +++ b/dots/.config/quickshell/ii/services/hyprlandAntiFlashbangShader/anti-flashbang.glsl @@ -12,8 +12,8 @@ float overlayOpacityForBrightness(float x) { // float y = pow(x, 2.0) * 0.75; // float y = (1.0 - exp(-x))*1.15; // float y = (1.0 - exp(-pow((x-0.15), 0.6)))*1.18; - float y = x*0.75; + float y = x*0.75; return min(max(y, 0.001), 1.0); } From e11d084be8f8c617506868d3824e3cf8557de4bf Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 11 May 2026 23:46:23 +0200 Subject: [PATCH 2/2] remove redundant wallpaper switching stuff --- .../quickshell/ii/scripts/colors/applycolor.sh | 12 +++++------- .../scripts/colors/code/material-code-set-color.sh | 1 + .../quickshell/ii/scripts/colors/switchwall.sh | 2 +- dots/.config/quickshell/ii/services/Wallpapers.qml | 5 ----- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dots/.config/quickshell/ii/scripts/colors/applycolor.sh b/dots/.config/quickshell/ii/scripts/colors/applycolor.sh index 2aab8dfce..a215c5abd 100755 --- a/dots/.config/quickshell/ii/scripts/colors/applycolor.sh +++ b/dots/.config/quickshell/ii/scripts/colors/applycolor.sh @@ -42,6 +42,9 @@ apply_kitty() { done # Reload + if ! pgrep -f kitty >/dev/null; then + return + fi kill -SIGUSR1 $(pidof kitty) } @@ -71,13 +74,8 @@ apply_anyterm() { } apply_term() { - apply_kitty - apply_anyterm -} - -apply_qt() { - sh "$CONFIG_DIR/scripts/kvantum/materialQT.sh" # generate kvantum theme - python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors + apply_anyterm & + apply_kitty & } # Check if terminal theming is enabled in config diff --git a/dots/.config/quickshell/ii/scripts/colors/code/material-code-set-color.sh b/dots/.config/quickshell/ii/scripts/colors/code/material-code-set-color.sh index 2f68d2658..613e41eda 100755 --- a/dots/.config/quickshell/ii/scripts/colors/code/material-code-set-color.sh +++ b/dots/.config/quickshell/ii/scripts/colors/code/material-code-set-color.sh @@ -9,6 +9,7 @@ settings_paths=( "${XDG_CONFIG_HOME:-$HOME/.config}/Code - Insiders/User/settings.json" "${XDG_CONFIG_HOME:-$HOME/.config}/Cursor/User/settings.json" "${XDG_CONFIG_HOME:-$HOME/.config}/Antigravity/User/settings.json" + "${XDG_CONFIG_HOME:-$HOME/.config}/Windsurf/User/settings.json" # Add more paths as needed for other forks ) diff --git a/dots/.config/quickshell/ii/scripts/colors/switchwall.sh b/dots/.config/quickshell/ii/scripts/colors/switchwall.sh index 318e3411e..381d879df 100755 --- a/dots/.config/quickshell/ii/scripts/colors/switchwall.sh +++ b/dots/.config/quickshell/ii/scripts/colors/switchwall.sh @@ -307,8 +307,8 @@ switch() { source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate" python3 "$SCRIPT_DIR/generate_colors_material.py" "${generate_colors_material_args[@]}" \ > "$STATE_DIR"/user/generated/material_colors.scss - "$SCRIPT_DIR"/applycolor.sh deactivate + "$SCRIPT_DIR"/applycolor.sh # Pass screen width, height, and wallpaper path to post_process max_width_desired="$(hyprctl monitors -j | jq '([.[].width] | min)' | xargs)" diff --git a/dots/.config/quickshell/ii/services/Wallpapers.qml b/dots/.config/quickshell/ii/services/Wallpapers.qml index 560b5fb39..a871187bf 100644 --- a/dots/.config/quickshell/ii/services/Wallpapers.qml +++ b/dots/.config/quickshell/ii/services/Wallpapers.qml @@ -34,11 +34,6 @@ Singleton { signal thumbnailGeneratedFile(filePath: string) function load () {} // For forcing initialization - - // Executions - Process { - id: applyProc - } function openFallbackPicker(darkMode = Appearance.m3colors.darkmode) { Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", darkMode ? "dark" : "light"]);