Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Life is tight as of the moment. Any help will do. 💓
- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.



### Fixed
Expand Down
15 changes: 13 additions & 2 deletions Configs/.local/lib/hyde/globalcontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,17 @@ get_rofi_pos() {

}
paste_string() {
if ! command -v wtype >/dev/null; then exit 0; fi
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
Comment on lines +376 to +383

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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 || true

Repository: 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.


if [ -t 1 ]; then return 0; fi

ignore_paste_file="$HYDE_STATE_HOME/ignore.paste"
if [[ ! -e $ignore_paste_file ]]; then
cat <<EOF >"$ignore_paste_file"
Expand All @@ -386,11 +395,13 @@ Alacritty
xterm-256color
EOF
fi

ignore_class=$(echo "$@" | awk -F'--ignore=' '{print $2}')
[ -n "$ignore_class" ] && echo "$ignore_class" >>"$ignore_paste_file" && print_log -y "[ignore]" "'$ignore_class'" && exit 0

class=$(hyprctl -j activewindow | jq -r '.initialClass')
if ! grep -q "$class" "$ignore_paste_file"; then
hyprctl -q dispatch exec 'wtype -M ctrl V -m ctrl'
hyprctl -q dispatch exec "$paste_cmd"
fi
}
is_hovered() {
Expand Down
3 changes: 3 additions & 0 deletions Scripts/dots/deps.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pacman = [
"satty", # Modern Screenshot Annotation
"cliphist", # clipboard manager
"wl-clip-persist", # Keep Wayland clipboard even after programs close (avoids crashes)
"ydotool", # preferred tool for auto-pasting from clipboard
# "wtype", # alternative tool for auto-pasting from clipboard

# Dependencies
"hyprpolkitagent", # authentication agent
"xdg-desktop-portal-hyprland", # xdg desktop portal for hyprland
Expand Down
2 changes: 2 additions & 0 deletions Scripts/pkg_extra.lst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ python-requests|wttrbar # script dependency
ddcui # GUI to control brightness for external monitors
# hyprgui-bin # GUI for hyprland configuration // might mess your userprefs but convenient // Just disappeared
# power-profiles-daemon # for managing power profiles from waybar
# ydotool # preferred tool for auto-pasting from clipboard
# wtype # alternative tool for auto-pasting from clipboard

# --------------------------------------------------- // Shell

Expand Down
Loading