aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:17 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:17 +0100
commitadab2a82eae921f3ca48e160e6ec5b91e3d6fa57 (patch)
tree769106e2f04cb6c7e345e2d64eebe43a4f4ab790
parent51d6762a8fd005b7be8e761bff9e09646f62f862 (diff)
downloaddotfiles-adab2a82eae921f3ca48e160e6ec5b91e3d6fa57.tar.gz
dotfiles-adab2a82eae921f3ca48e160e6ec5b91e3d6fa57.tar.bz2
dotfiles-adab2a82eae921f3ca48e160e6ec5b91e3d6fa57.zip
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.
-rw-r--r--KEYBINDS.md2
-rw-r--r--dot_config/sway/config4
-rw-r--r--dot_config/systemd/user/cliphist-image.service14
-rw-r--r--dot_config/systemd/user/cliphist-text.service14
-rw-r--r--dot_config/systemd/user/sway-session.target2
-rw-r--r--meta/wayland.txt1
6 files changed, 36 insertions, 1 deletions
diff --git a/KEYBINDS.md b/KEYBINDS.md
index 3dddeaa..69ba8de 100644
--- a/KEYBINDS.md
+++ b/KEYBINDS.md
@@ -317,6 +317,8 @@ Mod key: `Super` (Mod4). Only personal additions beyond sway defaults listed.
| `Super+Shift+s` | Lock screen + pause media |
| `Super+n` | Dismiss notification |
| `Super+Shift+n` | Dismiss all notifications |
+| `Super+v` | Clipboard history picker (cliphist + fuzzel) |
+| `Super+Shift+v` | Clipboard history delete entry |
| `Super+Tab` | Next workspace |
| `Super+Shift+Tab` | Previous workspace |
| `F7` | Toggle display mode (laptop-off/side-by-side) |
diff --git a/dot_config/sway/config b/dot_config/sway/config
index 39ddd65..c3b347a 100644
--- a/dot_config/sway/config
+++ b/dot_config/sway/config
@@ -144,6 +144,10 @@ bindsym $mod+Shift+s exec "playerctl -a pause; swaylock -f -e -c 282828"
bindsym $mod+n exec makoctl dismiss
bindsym $mod+Shift+n exec makoctl dismiss --all
+# Clipboard history
+bindsym $mod+v exec sh -c 'cliphist list | fuzzel --dmenu | cliphist decode | wl-copy'
+bindsym $mod+Shift+v exec sh -c 'cliphist list | fuzzel --dmenu | cliphist delete'
+
# Display mode switching
bindsym --no-repeat F7 exec ~/.config/sway/display-toggle.sh
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
diff --git a/meta/wayland.txt b/meta/wayland.txt
index 341c98b..f40c60e 100644
--- a/meta/wayland.txt
+++ b/meta/wayland.txt
@@ -22,6 +22,7 @@ swayidle
# Clipboard
wl-clipboard
+cliphist
# Screenshots & recording
grim