summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/hyprland/meta/main.yml1
-rw-r--r--roles/hyprland/tasks/main.yml2
-rw-r--r--roles/hyprland/templates/hyprland/bindings.conf.j23
-rw-r--r--roles/hyprland/templates/hyprland/hyprlock.conf.j282
-rw-r--r--roles/hyprlock/meta/argument_specs.yml6
-rw-r--r--roles/hyprlock/meta/main.yml11
-rw-r--r--roles/hyprlock/tasks/main.yml6
7 files changed, 110 insertions, 1 deletions
diff --git a/roles/hyprland/meta/main.yml b/roles/hyprland/meta/main.yml
index 79117f19..d6670e78 100644
--- a/roles/hyprland/meta/main.yml
+++ b/roles/hyprland/meta/main.yml
@@ -9,6 +9,7 @@ dependencies:
- role: "brightnessctl"
- role: "waybar"
- role: "swaybg"
+ - role: "hyprlock"
galaxy_info:
author: "a14m"
description: "Install hyprland"
diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml
index 5afb6f1e..76e9f2d1 100644
--- a/roles/hyprland/tasks/main.yml
+++ b/roles/hyprland/tasks/main.yml
@@ -53,5 +53,7 @@
dest: "/etc/hypr/looknfeel.conf"
- src: "hyprland/rules.conf.j2"
dest: "/etc/hypr/rules.conf"
+ - src: "hyprland/hyprlock.conf.j2"
+ dest: "/etc/hypr/hyprlock.conf"
- src: "hyprland/hyprland.conf.j2"
dest: "/etc/hypr/hyprland.conf"
diff --git a/roles/hyprland/templates/hyprland/bindings.conf.j2 b/roles/hyprland/templates/hyprland/bindings.conf.j2
index c607f393..3347f047 100644
--- a/roles/hyprland/templates/hyprland/bindings.conf.j2
+++ b/roles/hyprland/templates/hyprland/bindings.conf.j2
@@ -4,7 +4,8 @@
# See https://wiki.hypr.land/Configuring/Binds/
bindd = SUPER, Q, Quit, killactive,
-bindd = SUPER CONTROL, Q, Logout, exit,
+bindd = SUPER CONTROL, Q, Lock System, exec, hyprlock
+bindd = SUPER SHIFT, Q, Logout, exit,
# Switch workspaces with ctrl + [0-9] (MacOS-like)
bind = CONTROL, 1, workspace, 1
diff --git a/roles/hyprland/templates/hyprland/hyprlock.conf.j2 b/roles/hyprland/templates/hyprland/hyprlock.conf.j2
new file mode 100644
index 00000000..8176e079
--- /dev/null
+++ b/roles/hyprland/templates/hyprland/hyprlock.conf.j2
@@ -0,0 +1,82 @@
+$font = JetBrainsMono Nerd Font
+
+general {
+ hide_cursor = false
+ ignore_empty_input = true
+ fail_timeout = 5000
+}
+
+auth {
+ fingerprint:enabled = true
+}
+
+animations {
+ enabled = false
+}
+
+background {
+ monitor =
+ path = /home/$USER/.config/themes/current/background
+ blur_passes = 3
+}
+
+input-field {
+ monitor =
+ size = 20%, 5%
+ outline_thickness = 2
+ position = 0, -20
+ halign = center
+ valign = center
+
+ inner_color = rgba(17, 17, 17, 7.0)
+ outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
+ check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
+ fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
+
+ font_color = rgb(143, 143, 143)
+ font_family = $font
+
+ placeholder_text = Enter Password
+ fail_text = <i>$FAIL ($ATTEMPTS)</i>
+
+ rounding = 50
+ shadow_passes = 0
+ fade_on_empty = false
+}
+
+# TIME
+label {
+ monitor =
+ text = $TIME
+ font_size = 90
+ font_family = $font
+
+ position = -30, 0
+ halign = right
+ valign = top
+}
+
+# DATE
+label {
+ monitor =
+ text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
+ font_size = 25
+ font_family = $font
+
+ position = -30, -150
+ halign = right
+ valign = top
+}
+
+label {
+ monitor =
+ text = $LAYOUT
+ font_size = 12
+ font_family = $font
+ onclick = hyprctl switchxkblayout all next
+
+ position = 10, -10
+ halign = left
+ valign = top
+}
+
diff --git a/roles/hyprlock/meta/argument_specs.yml b/roles/hyprlock/meta/argument_specs.yml
new file mode 100644
index 00000000..6b4ca676
--- /dev/null
+++ b/roles/hyprlock/meta/argument_specs.yml
@@ -0,0 +1,6 @@
+---
+argument_specs:
+ main:
+ short_description: "Install hyprlock on ArchLinux"
+ description: "Install hyprlock on ArchLinux"
+ options: {}
diff --git a/roles/hyprlock/meta/main.yml b/roles/hyprlock/meta/main.yml
new file mode 100644
index 00000000..3f6b4c32
--- /dev/null
+++ b/roles/hyprlock/meta/main.yml
@@ -0,0 +1,11 @@
+---
+dependencies: []
+galaxy_info:
+ author: "a14m"
+ description: "Install hyprlock on ArchLinux"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
diff --git a/roles/hyprlock/tasks/main.yml b/roles/hyprlock/tasks/main.yml
new file mode 100644
index 00000000..8ccb3f7a
--- /dev/null
+++ b/roles/hyprlock/tasks/main.yml
@@ -0,0 +1,6 @@
+---
+- name: "Ensure hyprlock is installed"
+ become: true
+ ansible.builtin.package:
+ name: "hyprlock"
+ state: "present"