From adab2a82eae921f3ca48e160e6ec5b91e3d6fa57 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:17 +0100 Subject: feat(wayland): add cliphist clipboard history Install cliphist and wire two user services (text + image watchers) into sway-session.target. Bind $mod+v to pick an entry via fuzzel and $mod+Shift+v to delete one. --- dot_config/systemd/user/cliphist-image.service | 14 ++++++++++++++ dot_config/systemd/user/cliphist-text.service | 14 ++++++++++++++ dot_config/systemd/user/sway-session.target | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 dot_config/systemd/user/cliphist-image.service create mode 100644 dot_config/systemd/user/cliphist-text.service (limited to 'dot_config/systemd') diff --git a/dot_config/systemd/user/cliphist-image.service b/dot_config/systemd/user/cliphist-image.service new file mode 100644 index 0000000..5ddab8f --- /dev/null +++ b/dot_config/systemd/user/cliphist-image.service @@ -0,0 +1,14 @@ +[Unit] +Description=Clipboard history (image) via cliphist +PartOf=graphical-session.target +After=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY + +[Service] +Type=simple +ExecStart=/usr/bin/wl-paste --type image --watch cliphist store +Restart=on-failure +RestartSec=2s + +[Install] +WantedBy=sway-session.target diff --git a/dot_config/systemd/user/cliphist-text.service b/dot_config/systemd/user/cliphist-text.service new file mode 100644 index 0000000..96b0602 --- /dev/null +++ b/dot_config/systemd/user/cliphist-text.service @@ -0,0 +1,14 @@ +[Unit] +Description=Clipboard history (text) via cliphist +PartOf=graphical-session.target +After=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY + +[Service] +Type=simple +ExecStart=/usr/bin/wl-paste --type text --watch cliphist store +Restart=on-failure +RestartSec=2s + +[Install] +WantedBy=sway-session.target diff --git a/dot_config/systemd/user/sway-session.target b/dot_config/systemd/user/sway-session.target index db57db4..0c33a40 100644 --- a/dot_config/systemd/user/sway-session.target +++ b/dot_config/systemd/user/sway-session.target @@ -2,6 +2,6 @@ Description=sway compositor session Documentation=man:systemd.special(7) BindsTo=graphical-session.target -Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service +Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service After=graphical-session-pre.target StopWhenUnneeded=yes -- cgit v1.3.1