Skip to content

Commit 612b5ce

Browse files
feat: add Safe Eyes application and update clipboard manager script
- Introduced Safe Eyes as a new autostart application to remind users to take breaks and reduce eye strain. - Updated the clipboard manager script to improve the order of clipboard backends for Wayland and X11, enhancing usability and fallback options. - Adjusted error messages in the clipboard manager for better clarity regarding the availability of clipboard targets.
1 parent e945025 commit 612b5ce

3 files changed

Lines changed: 26 additions & 9 deletions

File tree

home/.chezmoiscripts/linux/run_onchange_before_install-packages.sh.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ set -eufo pipefail
3535
{{ $aurPackages := list
3636
"cava"
3737
"auto-cpufreq"
38+
"safeeyes"
3839
"nwg-bar"
3940
"nwg-drawer"
4041
-}}
@@ -50,6 +51,7 @@ set -eufo pipefail
5051
"pamixer"
5152
"playerctl"
5253
"pipewire-pulse"
54+
"python-pywayland"
5355
"sxiv"
5456
"w3m"
5557
"wmctrl"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Safe Eyes
4+
Comment=Break reminder to reduce eye strain
5+
Exec=safeeyes
6+
Terminal=false
7+
Hidden=false
8+
NoDisplay=false
9+
X-GNOME-Autostart-enabled=true
10+
StartupNotify=false
11+
Categories=Utility;Health;

home/dot_local/bin/executable_dots-clipboard

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## dots-clipboard: Clipboard manager wrapper
44
## Copyright (C) 2019-2025 Ulises Jeremias Cornejo Fandos
55
## Licensed under MIT.
6-
## Wayland order (auto): quickshell > copyq > cliphist+(fuzzel|wofi) > minimal
7-
## X11 order (auto): quickshell > copyq > minimal
6+
## Wayland order (auto): copyq > cliphist+(fuzzel|wofi) > quickshell > minimal
7+
## X11 order (auto): copyq > quickshell > minimal
88
## Usage:
99
## @script.name [OPTIONS]
1010
## Options:
@@ -25,7 +25,7 @@ is_wayland() { [[ ${XDG_SESSION_TYPE:-} == wayland ]]; }
2525
menu_pick() {
2626
local title="$1"
2727
if command -v fuzzel >/dev/null 2>&1; then
28-
fuzzel --prompt "$title> "
28+
fuzzel --dmenu --prompt "$title> " || wofi --dmenu --prompt "$title> "
2929
elif command -v wofi >/dev/null 2>&1; then
3030
wofi --dmenu --prompt "$title> "
3131
else
@@ -39,8 +39,13 @@ do_copyq() {
3939
}
4040
do_quickshell() {
4141
pgrep -x quickshell >/dev/null 2>&1 || return 1
42-
dots-quickshell ipc utilities toggle
43-
return 0
42+
# New Quickshell stack currently has no dedicated clipboard history drawer.
43+
# Keep this backend as a last-resort utility panel toggle only.
44+
if quickshell ipc show 2>/dev/null | rg -q "^target drawers$"; then
45+
dots-quickshell ipc utilities toggle
46+
return 0
47+
fi
48+
return 1
4449
}
4550
do_cliphist() {
4651
command -v cliphist >/dev/null 2>&1 || return 1
@@ -76,16 +81,15 @@ case "$BACKEND" in
7681
}
7782
;;
7883
quickshell) do_quickshell || {
79-
echo "quickshell is not running" >&2
84+
echo "quickshell clipboard target unavailable (use cliphist/copyq)" >&2
8085
exit 1
8186
} ;;
8287
minimal) minimal_fallback ;;
8388
auto | *)
84-
do_quickshell && exit 0
8589
if is_wayland; then
86-
do_copyq || do_cliphist || minimal_fallback
90+
do_copyq || do_cliphist || do_quickshell || minimal_fallback
8791
else
88-
do_copyq || minimal_fallback
92+
do_copyq || do_quickshell || minimal_fallback
8993
fi
9094
;;
9195
esac

0 commit comments

Comments
 (0)