summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-01-31 15:32:27 +0100
committerAhmed Abdelhalim <[email protected]>2026-01-31 15:33:25 +0100
commit949f072ae5e4234d8469ff1cb608dedcd65a8a78 (patch)
tree6978a5933fa68869eb2b5b83168dd2e4d8afc8c2
parent80d47420cdea14f224fcd51c7d3d7196bea00e59 (diff)
Install clipse clipboard manager role with hyprland binding/rules
-rw-r--r--roles/clipse/meta/argument_specs.yml6
-rw-r--r--roles/clipse/meta/main.yml12
-rw-r--r--roles/clipse/tasks/main.yml21
-rw-r--r--roles/hyprland/meta/main.yml1
-rw-r--r--roles/hyprland/templates/hyprland/autostart.conf.j21
-rw-r--r--roles/hyprland/templates/hyprland/bindings.conf.j25
-rw-r--r--roles/hyprland/templates/hyprland/rules.conf.j23
7 files changed, 48 insertions, 1 deletions
diff --git a/roles/clipse/meta/argument_specs.yml b/roles/clipse/meta/argument_specs.yml
new file mode 100644
index 00000000..5216c3af
--- /dev/null
+++ b/roles/clipse/meta/argument_specs.yml
@@ -0,0 +1,6 @@
+---
+argument_specs:
+ main:
+ short_description: "Install clipse on ArchLinux"
+ description: "Install clipse on ArchLinux"
+ options: {}
diff --git a/roles/clipse/meta/main.yml b/roles/clipse/meta/main.yml
new file mode 100644
index 00000000..dd553dbb
--- /dev/null
+++ b/roles/clipse/meta/main.yml
@@ -0,0 +1,12 @@
+---
+dependencies:
+ - role: "yay"
+galaxy_info:
+ author: "a14m"
+ description: "Install clipse on ArchLinux"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
diff --git a/roles/clipse/tasks/main.yml b/roles/clipse/tasks/main.yml
new file mode 100644
index 00000000..8bbc567f
--- /dev/null
+++ b/roles/clipse/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+- name: "Ensure wl-clipboard is installed"
+ become: true
+ ansible.builtin.package:
+ name: "wl-clipboard"
+ state: "present"
+
+- name: "Ensure clipse is installed"
+ become: true
+ become_user: "aur_builder"
+ kewlfft.aur.aur:
+ name: "clipse"
+ state: "present"
+ use: "yay"
+
+- name: "Configure system defaults"
+ become: true
+ ansible.builtin.template:
+ src: "config.json"
+ dest: "/etc/xdg/clipse/config.json"
+ mode: "0644"
diff --git a/roles/hyprland/meta/main.yml b/roles/hyprland/meta/main.yml
index f8cd9ed4..d847df16 100644
--- a/roles/hyprland/meta/main.yml
+++ b/roles/hyprland/meta/main.yml
@@ -11,6 +11,7 @@ dependencies:
- role: "waybar"
- role: "hyprtheme"
- role: "hyprcursor"
+ - role: "clipse"
galaxy_info:
author: "a14m"
description: "Install hyprland"
diff --git a/roles/hyprland/templates/hyprland/autostart.conf.j2 b/roles/hyprland/templates/hyprland/autostart.conf.j2
index c908b0fe..d110a6bd 100644
--- a/roles/hyprland/templates/hyprland/autostart.conf.j2
+++ b/roles/hyprland/templates/hyprland/autostart.conf.j2
@@ -4,3 +4,4 @@ exec-once = uwsm-app -- hypridle
exec-once = uwsm-app -- mako
exec-once = uwsm-app -- waybar
exec-once = uwsm-app -- swaybg -i ~/.config/hyprtheme/current/background -m fill
+exec-once = uwsm-app -- clipse -listen
diff --git a/roles/hyprland/templates/hyprland/bindings.conf.j2 b/roles/hyprland/templates/hyprland/bindings.conf.j2
index bf339b11..1a4e66ce 100644
--- a/roles/hyprland/templates/hyprland/bindings.conf.j2
+++ b/roles/hyprland/templates/hyprland/bindings.conf.j2
@@ -9,6 +9,11 @@ bindd = SUPER, Q, Quit, killactive,
bindd = SUPER CONTROL, Q, Lock System, exec, hyprlock
bindd = SUPER SHIFT, Q, Logout, exit,
+# Clipboard managers
+binde = SUPER, C, sendshortcut, CTRL, INSERT,
+binde = SUPER, V, sendshortcut, SHIFT, INSERT,
+bindd = SUPER SHIFT, V, Clipboard Manager, exec, alacritty --class work.kartoffln.clipse -e 'clipse'
+
# Switch workspaces with ctrl + [0-9] (MacOS-like)
bind = CONTROL, 1, workspace, 1
bind = CONTROL, 2, workspace, 2
diff --git a/roles/hyprland/templates/hyprland/rules.conf.j2 b/roles/hyprland/templates/hyprland/rules.conf.j2
index 65fb3915..2a7d41ac 100644
--- a/roles/hyprland/templates/hyprland/rules.conf.j2
+++ b/roles/hyprland/templates/hyprland/rules.conf.j2
@@ -8,8 +8,9 @@ windowrule = scroll_touchpad 0.2, match:class com.mitchellh.ghostty
windowrule = float on, match:tag floating-window
windowrule = center on, match:tag floating-window
windowrule = size 875 600, match:tag floating-window
+windowrule = stay_focused on, match:tag floating-window
-windowrule = tag +floating-window, match:class work.kartoffln.(bluetui|btop|wiremix|wlctl)
+windowrule = tag +floating-window, match:class work.kartoffln.(bluetui|btop|wiremix|wlctl|clipse)
windowrule = float on, match:class org.gnome.Calculator
# Picture-in-picture overlays