Skip to content

Commit 5c249c8

Browse files
fix(clipboard): make copyq the default backend
Remove quickshell integration from dots-clipboard and prioritize copyq in auto mode with cliphist/minimal fallbacks. Update script registry description so documented behavior matches runtime defaults. Made-with: Cursor
1 parent 2dab615 commit 5c249c8

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

home/dot_local/bin/executable_dots-clipboard

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
## dots-clipboard: Clipboard manager wrapper
44
## Copyright (C) 2019-2025 Ulises Jeremias Cornejo Fandos
55
## Licensed under MIT.
6-
## Wayland order (auto): quickshell > cliphist > copyq > minimal
7-
## X11 order (auto): quickshell > copyq > minimal
6+
## Wayland order (auto): copyq > cliphist > minimal
7+
## X11 order (auto): copyq > minimal
88
## Usage:
99
## @script.name [OPTIONS]
1010
## Options:
1111
## -h, --help Show help
12-
## --backend=NAME Force backend: quickshell|copyq|cliphist|minimal
12+
## --backend=NAME Force backend: copyq|cliphist|minimal
1313
## Examples:
1414
## @script.name --backend=copyq # force copyq GUI
1515
## @script.name --backend=cliphist # force cliphist picker
@@ -26,10 +26,6 @@ do_copyq() {
2626
command -v copyq >/dev/null 2>&1 || return 1
2727
exec copyq show
2828
}
29-
do_quickshell() {
30-
pgrep -x quickshell >/dev/null 2>&1 || return 1
31-
dots-quickshell ipc utilities toggle
32-
}
3329
do_cliphist() {
3430
command -v cliphist >/dev/null 2>&1 || return 1
3531
local max=25
@@ -45,8 +41,8 @@ do_cliphist() {
4541
printf "Select entry [1-%d, empty to cancel]: " "${#entries[@]}"
4642
read -r idx || return 1
4743
[[ -z ${idx:-} ]] && return 0
48-
[[ "$idx" =~ ^[0-9]+$ ]] || return 1
49-
(( idx >= 1 && idx <= ${#entries[@]} )) || return 1
44+
[[ $idx =~ ^[0-9]+$ ]] || return 1
45+
((idx >= 1 && idx <= ${#entries[@]})) || return 1
5046
local selection="${entries[$((idx - 1))]}"
5147
cliphist decode <<<"$selection" | wl-copy
5248
return 0
@@ -62,10 +58,6 @@ minimal_fallback() {
6258
}
6359

6460
case "$BACKEND" in
65-
quickshell) do_quickshell || {
66-
echo "quickshell is not running" >&2
67-
exit 1
68-
} ;;
6961
copyq) do_copyq || {
7062
echo "copyq not available" >&2
7163
exit 1
@@ -83,9 +75,9 @@ case "$BACKEND" in
8375
minimal) minimal_fallback ;;
8476
auto | *)
8577
if is_wayland; then
86-
do_quickshell || do_cliphist || do_copyq || minimal_fallback
78+
do_copyq || do_cliphist || minimal_fallback
8779
else
88-
do_quickshell || do_copyq || minimal_fallback
80+
do_copyq || minimal_fallback
8981
fi
9082
;;
9183
esac

home/dot_local/lib/dots/dots-scripts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ scripts_list=(
99
"🌐 check-network: Check network connectivity status"
1010
"📦 checkupdates: Check for available system package updates"
1111
"🎨 color-scheme: Manage colour schemes, variants, and dark/light mode for Quickshell"
12-
"📋 clipboard: Unified clipboard manager (quickshell > cliphist/copyq > minimal)"
12+
"📋 clipboard: Unified clipboard manager (copyq-first, with cliphist/minimal fallback)"
1313
"🎛️ appearance: Unified appearance manager (list/current/apply/variant/mode/wallpaper/sync)"
1414
"⚙️ config-manager: Manage configuration snapshots and backups"
1515
"🎯 default-apps: Configure XDG default applications using handlr"

0 commit comments

Comments
 (0)