-
-
Notifications
You must be signed in to change notification settings - Fork 625
feat: add support of ydotool alongside with wtype
#1821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 5 commits
ecc9981
fa15999
610e094
6a38c49
d1e0dfd
e286162
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 || trueRepository: HyDE-Project/HyDE Length of output: 44013 Ensure
🤖 Prompt for AI Agents |
||
|
|
||
| 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" | ||
|
|
@@ -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() { | ||
|
|
||
There was a problem hiding this comment.
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### Changedif necessary.🤖 Prompt for AI Agents