feat: add support of ydotool alongside with wtype - #1821
Conversation
π WalkthroughWalkthrough
ChangesPaste backend selection
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
π₯ Pre-merge checks | β 4 | β 1β Failed checks (1 warning)
β Passed checks (4 passed)
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 2
π€ Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 69: Move the clipboard bullet about preferring ydotool over wtype from
the v26.7.4 section into ## Unreleased, creating or reusing its ### Changed
subsection as needed. Keep the existing wording and release sections otherwise
unchanged.
In `@Configs/.local/lib/hyde/globalcontrol.sh`:
- Around line 376-383: Update the paste-command selection around the ydotool
branch to verify that a usable ydotoold backend is available before choosing
ydotool. If ydotoold is unavailable or unconfigured, continue to the existing
wtype fallback; preserve the current ydotool and no-backend behavior when its
backend is usable.
πͺ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
βΉοΈ Review info
βοΈ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 669074ca-ebdc-40fe-9f13-610aef5ab556
π Files selected for processing (4)
CHANGELOG.mdConfigs/.local/lib/hyde/globalcontrol.shScripts/dots/deps.tomlScripts/pkg_extra.lst
| - Hyprland: Drop of hyprlang support | ||
| - GTK: Have a separate 'DCONF_PROFILE' for GTK apps! For QT, twas always handled by qt6ct and should not | ||
| mangle with QT. But KDE apps uses ~/.config/kdeglobals which might break KDE apps for multi DE. (No fix for now) | ||
| - Clipboard: `ydotool` is preferred over `wtype` for auto-pasting selected entry from clipboard |
There was a problem hiding this comment.
π Maintainability & Code Quality | π‘ Minor | β‘ Quick win
Move this entry under ## Unreleased.
The clipboard bullet is currently under ## v26.7.4, although this change is intended for the Unreleased section. Move it there, adding ### Changed if necessary.
π€ Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 69, Move the clipboard bullet about preferring ydotool
over wtype from the v26.7.4 section into ## Unreleased, creating or reusing its
### Changed subsection as needed. Keep the existing wording and release sections
otherwise unchanged.
| local paste_cmd="" | ||
| if command -v ydotool >/dev/null; then | ||
| paste_cmd="ydotool key 29:1 && sleep 0.01 && ydotool key 47:1 47:0 && sleep 0.01 && ydotool key 29:0" | ||
| elif command -v wtype >/dev/null; then | ||
| paste_cmd="wtype -M ctrl V -m ctrl" | ||
| else | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
π― Functional Correctness | π Major | ποΈ Heavy lift
π§© Analysis chain
π Script executed:
#!/usr/bin/env bash
rg -n --hidden --glob '!.git/**' \
'ydotoold|YDOTOOL_SOCKET|systemctl.*ydotool' .Repository: HyDE-Project/HyDE
Length of output: 155
π Script executed:
#!/usr/bin/env bash
set -euo pipefail
# Locate and inspect the referenced script around the paste backend selection and dispatch.
if [ -f "Configs/.local/lib/hyde/globalcontrol.sh" ]; then
wc -l "Configs/.local/lib/hyde/globalcontrol.sh"
sed -n '340,420p' "Configs/.local/lib/hyde/globalcontrol.sh" | cat -n
else
fd -a 'globalcontrol\.sh$' .
printf '\nReferenced file missing.\n'
fi
printf '\nRepository-wide ydotool-related references:\n'
rg -n --hidden --glob '!.git/**' 'ydotool|ydotoold|YDOTOOL|clipboard|paste' . || true
printf '\nRepository-wide daemon start/socket references:\n'
rg -n --hidden --glob '!.git/**' 'systemctl|xdotool|wtype|ydotool|ydotool.socket|clipboard|xdg|wayland|x11|rclone|sway|hyprland|i3|awesome|qtile|dunst' . | head -200 || trueRepository: HyDE-Project/HyDE
Length of output: 44013
Ensure ydotool has a usable ydotoold backend before selecting it.
command -v ydotool only checks for the executable, but ydotool depends on a running ydotoold backend. If that backend is unavailable, this branch beats wtype and auto-paste from the clipboard can silently fail. Select wtype unless ydotoold is reliably available, or document that ydotoold must be started/configured before HyDE uses this path.
π€ Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Configs/.local/lib/hyde/globalcontrol.sh` around lines 376 - 383, Update the
paste-command selection around the ydotool branch to verify that a usable
ydotoold backend is available before choosing ydotool. If ydotoold is
unavailable or unconfigured, continue to the existing wtype fallback; preserve
the current ydotool and no-backend behavior when its backend is usable.
Pull Request
Description
This PR add feature to use
ydotoolwhenwtypeis not present in the system. It can be helpful for multi-layout keyboard users becausewtypebreaks waybar indication of selected language.Type of change
Checklist
@kRHYME7 I'm a little bit confused about adding changelog entry: should I create smth like
## v26.x.x | Future Releasein the head of theCHANGELOG.md?Summary by CodeRabbit
ydotoolwhen available and falling back towtypeotherwise.ydotool-over-wtypepreference.ydotoolandwtypeas optional (commented) entries.