Some scripts still use pre-0.55 hyprctl dispatch syntax (logout silently fails)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Read the four listed scripts and verify which dispatch calls still use the pre-0.55 syntax. The issue reports observed-effect checks in a nested Hyprland instance and explains that window move and float operations need focus first. Confirm each replacement by its listed effect, including logout exiting the session; also check whether the unreferenced toggleallfloat.sh should be removed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Under the Lua config manager, hyprctl dispatch evaluates its argument as
hl.dispatch(...), so the pre-0.55 form errors out:
$ hyprctl dispatch workspace 4
error: [string "return hl.dispatch(workspace 4)"]:1: ')' expected near '4'
Most of the dotfiles are already migrated. Four scripts still use the old form.
The one users will notice is logout: power.sh exit fails silently, because the
script does not check the return value.
Why this is easy to miss: hyprctl prints ok for dispatches that do
nothing. These have to be checked by observed effect, not exit code. Worth
knowing for anyone auditing the rest.
Affected
| File | Effect |
|---|---|
hypr/scripts/power.sh |
Logout does nothing |
hypr/scripts/moveTo.sh |
Move all windows to workspace |
hypr/scripts/toggle-animations.sh |
Animation toggle |
ml4w/scripts/ml4w-toggle-allfloat |
Float all windows |
Two that need more than a syntax swap
hl.window.move and hl.window.float have no window-targeting argument. Their
argument sets are direction, x+y(+relative), workspace, into_group, out_of_group and action respectively, and they act on the focused window.
Passing window= is accepted without error but does not target. So the patch
focuses the target first, then acts.
Also noticed
hypr/scripts/toggleallfloat.sh is no longer referenced by anything. The
SUPER+SHIFT+T bind calls ml4w-toggle-allfloat. It still contains
hyprctl dispatch workspaceopt allfloat, which cannot work
(hl.dsp.workspaceopt does not exist). Looks like a leftover from the #1495
fix. Might be worth deleting rather than patching.
Tested on
Hyprland 0.56.1, ML4W 2.14.1. Each replacement verified by observed effect in a
nested Hyprland instance: session actually exited, active workspace actually
changed, only the intended window floated or moved.
Patch
diff --git a/dotfiles/.config/hypr/scripts/moveTo.sh b/dotfiles/.config/hypr/scripts/moveTo.sh
--- a/dotfiles/.config/hypr/scripts/moveTo.sh
+++ b/dotfiles/.config/hypr/scripts/moveTo.sh
@@ -36,12 +36,13 @@
for address in $window_addresses; do
log_message "Moving window $address to workspace $target_workspace"
- hyprctl dispatch movetoworkspacesilent "$target_workspace,address:$address"
+ hyprctl dispatch "hl.dsp.focus({window = 'address:$address'})"
+ hyprctl dispatch "hl.dsp.window.move({workspace = '$target_workspace'})"
done
# Switch to the target workspace
-hyprctl dispatch workspace "$target_workspace"
+hyprctl dispatch "hl.dsp.focus({workspace = '$target_workspace'})"
diff --git a/dotfiles/.config/hypr/scripts/power.sh b/dotfiles/.config/hypr/scripts/power.sh
--- a/dotfiles/.config/hypr/scripts/power.sh
+++ b/dotfiles/.config/hypr/scripts/power.sh
@@ -41,7 +41,7 @@
terminate_clients
sleep 0.5
- hyprctl dispatch exit
+ hyprctl dispatch "hl.dsp.exit()"
sleep 2
diff --git a/dotfiles/.config/hypr/scripts/toggle-animations.sh b/dotfiles/.config/hypr/scripts/toggle-animations.sh
--- a/dotfiles/.config/hypr/scripts/toggle-animations.sh
+++ b/dotfiles/.config/hypr/scripts/toggle-animations.sh
@@ -4,10 +4,10 @@
if [ -f $cache_file ]; then
- hyprctl keyword animations:enabled true
+ hyprctl eval "hl.config({animations={enabled=true}})"
rm $cache_file
else
- hyprctl keyword animations:enabled false
+ hyprctl eval "hl.config({animations={enabled=false}})"
touch $cache_file
diff --git a/dotfiles/.config/ml4w/scripts/ml4w-toggle-allfloat b/dotfiles/.config/ml4w/scripts/ml4w-toggle-allfloat
--- a/dotfiles/.config/ml4w/scripts/ml4w-toggle-allfloat
+++ b/dotfiles/.config/ml4w/scripts/ml4w-toggle-allfloat
@@ -4,5 +4,6 @@
for addr in "${addresses[@]}"; do
- hyprctl dispatch togglefloating "address:$addr"
+ hyprctl dispatch "hl.dsp.focus({window = 'address:$addr'})"
+ hyprctl dispatch "hl.dsp.window.float({action = 'toggle'})"
done
- Ngôn ngữ chính
- QML
- Star
- 5.1k
- Fork
- 386
- Merge trung bình
- 16 giờ 45 phút
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mylinuxforwork/dotfiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mylinuxforwork/dotfiles#1904 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
mylinuxforwork/dotfiles#1829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement solved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
mylinuxforwork/dotfiles#1807 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
mylinuxforwork/dotfiles#1765 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEATURE] add keycap 1 app window over all windowsCó thể đã có người làm @mylinuxforwork đã nhận 1 ngày trước. Đang mởenhancement
mylinuxforwork/dotfiles#1902 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mylinuxforwork/dotfiles
Issue tương tự
-
can't see cursor under wayfireĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat images never show without ImageMagick: ffprobe fallback uses an option string ffprobe 9 rejectsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
eliasstravik/herdr-projects#1011 ·
-
bug priority::low upstream
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100