From dc8f42e5666e9d498bd19b323f5e1c3b9440ba3f Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sun, 8 Feb 2026 23:25:11 +0100 Subject: Move template files --- roles/hyprland/tasks/main.yml | 20 +-- roles/hyprland/templates/autostart.conf.j2 | 8 ++ roles/hyprland/templates/bindings.conf.j2 | 79 +++++++++++ roles/hyprland/templates/envs.conf.j2 | 28 ++++ roles/hyprland/templates/hypridle.conf.j2 | 26 ++++ roles/hyprland/templates/hyprland.conf.j2 | 13 ++ .../hyprland/templates/hyprland/autostart.conf.j2 | 8 -- roles/hyprland/templates/hyprland/bindings.conf.j2 | 79 ----------- roles/hyprland/templates/hyprland/envs.conf.j2 | 28 ---- roles/hyprland/templates/hyprland/hypridle.conf.j2 | 26 ---- roles/hyprland/templates/hyprland/hyprland.conf.j2 | 13 -- roles/hyprland/templates/hyprland/hyprlock.conf.j2 | 134 ------------------- roles/hyprland/templates/hyprland/input.conf.j2 | 39 ------ .../hyprland/templates/hyprland/looknfeel.conf.j2 | 148 --------------------- roles/hyprland/templates/hyprland/monitors.conf.j2 | 20 --- roles/hyprland/templates/hyprland/rules.conf.j2 | 31 ----- roles/hyprland/templates/hyprlock.conf.j2 | 134 +++++++++++++++++++ roles/hyprland/templates/input.conf.j2 | 39 ++++++ roles/hyprland/templates/looknfeel.conf.j2 | 148 +++++++++++++++++++++ roles/hyprland/templates/monitors.conf.j2 | 20 +++ roles/hyprland/templates/rules.conf.j2 | 31 +++++ 21 files changed, 536 insertions(+), 536 deletions(-) create mode 100644 roles/hyprland/templates/autostart.conf.j2 create mode 100644 roles/hyprland/templates/bindings.conf.j2 create mode 100644 roles/hyprland/templates/envs.conf.j2 create mode 100644 roles/hyprland/templates/hypridle.conf.j2 create mode 100644 roles/hyprland/templates/hyprland.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/autostart.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/bindings.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/envs.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/hypridle.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/hyprland.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/hyprlock.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/input.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/looknfeel.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/monitors.conf.j2 delete mode 100644 roles/hyprland/templates/hyprland/rules.conf.j2 create mode 100644 roles/hyprland/templates/hyprlock.conf.j2 create mode 100644 roles/hyprland/templates/input.conf.j2 create mode 100644 roles/hyprland/templates/looknfeel.conf.j2 create mode 100644 roles/hyprland/templates/monitors.conf.j2 create mode 100644 roles/hyprland/templates/rules.conf.j2 diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml index 8217923a..5255a318 100644 --- a/roles/hyprland/tasks/main.yml +++ b/roles/hyprland/tasks/main.yml @@ -45,25 +45,25 @@ dest: "{{ item.dest }}" mode: "0644" loop: - - src: "hyprland/autostart.conf.j2" + - src: "autostart.conf.j2" dest: "/etc/hypr/autostart.conf" - - src: "hyprland/monitors.conf.j2" + - src: "monitors.conf.j2" dest: "/etc/hypr/monitors.conf" - - src: "hyprland/input.conf.j2" + - src: "input.conf.j2" dest: "/etc/hypr/input.conf" - - src: "hyprland/bindings.conf.j2" + - src: "bindings.conf.j2" dest: "/etc/hypr/bindings.conf" - - src: "hyprland/envs.conf.j2" + - src: "envs.conf.j2" dest: "/etc/hypr/envs.conf" - - src: "hyprland/looknfeel.conf.j2" + - src: "looknfeel.conf.j2" dest: "/etc/hypr/looknfeel.conf" - - src: "hyprland/rules.conf.j2" + - src: "rules.conf.j2" dest: "/etc/hypr/rules.conf" - - src: "hyprland/hyprlock.conf.j2" + - src: "hyprlock.conf.j2" dest: "/etc/hypr/hyprlock.conf" - - src: "hyprland/hypridle.conf.j2" + - src: "hypridle.conf.j2" dest: "/etc/hypr/hypridle.conf" - - src: "hyprland/hyprland.conf.j2" + - src: "hyprland.conf.j2" dest: "/etc/hypr/hyprland.conf" - name: "Configure user defaults" diff --git a/roles/hyprland/templates/autostart.conf.j2 b/roles/hyprland/templates/autostart.conf.j2 new file mode 100644 index 00000000..164d1df9 --- /dev/null +++ b/roles/hyprland/templates/autostart.conf.j2 @@ -0,0 +1,8 @@ +# vim: set filetype=hyprlang.ansible : + +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 +exec-once = uwsm-app -- syshud diff --git a/roles/hyprland/templates/bindings.conf.j2 b/roles/hyprland/templates/bindings.conf.j2 new file mode 100644 index 00000000..7ace0c99 --- /dev/null +++ b/roles/hyprland/templates/bindings.conf.j2 @@ -0,0 +1,79 @@ +# vim: set filetype=hyprlang.ansible : + +# Configure Hyprland Bindings +# +# See https://wiki.hypr.land/Configuring/Keywords/ +# See https://wiki.hypr.land/Configuring/Binds/ + +bindd = SUPER, Q, Quit, killactive, +bindd = SUPER CONTROL, Q, Lock System, exec, hyprlock +bindd = SUPER SHIFT, Q, Logout, exit, + +# Launcher +bindd = SUPER, SPACE, App Launcher, exec, uwsm app -- $(tofi-drun) + +# Clipboard managers +bindd = SUPER, C, MacOS Copy, sendshortcut, CTRL, INSERT, +bindd = SUPER, V, MacOS Paste, sendshortcut, SHIFT, INSERT, +bindd = SUPER, X, MacOS Cut, sendshortcut, CTRL, X, +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 +bind = CONTROL, 3, workspace, 3 +bind = CONTROL, 4, workspace, 4 +bind = CONTROL, 5, workspace, 5 +bind = CONTROL, 6, workspace, 6 +bind = CONTROL, 7, workspace, 7 +bind = CONTROL, 8, workspace, 8 +bind = CONTROL, 9, workspace, 9 +bind = CONTROL, 0, workspace, 10 + +# Move active window to a workspace with ctrl + SHIFT + [0-9] +bind = CONTROL SHIFT, 1, movetoworkspace, 1 +bind = CONTROL SHIFT, 2, movetoworkspace, 2 +bind = CONTROL SHIFT, 3, movetoworkspace, 3 +bind = CONTROL SHIFT, 4, movetoworkspace, 4 +bind = CONTROL SHIFT, 5, movetoworkspace, 5 +bind = CONTROL SHIFT, 6, movetoworkspace, 6 +bind = CONTROL SHIFT, 7, movetoworkspace, 7 +bind = CONTROL SHIFT, 8, movetoworkspace, 8 +bind = CONTROL SHIFT, 9, movetoworkspace, 9 +bind = CONTROL SHIFT, 0, movetoworkspace, 10 + +# Move/resize windows with mouse (SUPER + SHIFT + left/right click) +bindm = SUPER SHIFT, mouse:272, movewindow +bindm = SUPER SHIFT, mouse:273, resizewindow + +# Move focus with (SUPER + h/j/k/l) +binde = SUPER, h, movefocus, l +binde = SUPER, j, movefocus, d +binde = SUPER, k, movefocus, u +binde = SUPER, l, movefocus, r + +# Swap windows with (SUPER + SHIFT + h/j/k/l) +binde = SUPER SHIFT, h, swapwindow, l +binde = SUPER SHIFT, j, swapwindow, d +binde = SUPER SHIFT, k, swapwindow, u +binde = SUPER SHIFT, l, swapwindow, r + +# Resize windows with (SUPER + CONTROL + h/j/k/l) +binde = SUPER CONTROL, h, resizeactive, -20 0 +binde = SUPER CONTROL, j, resizeactive, 0 20 +binde = SUPER CONTROL, k, resizeactive, 0 -20 +binde = SUPER CONTROL, l, resizeactive, 20 0 + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 1%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, /etc/hypr/scripts/brightness.sh --inc 5 +bindel = ,XF86MonBrightnessDOWN, exec, /etc/hypr/scripts/brightness.sh --dec 5 + +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous diff --git a/roles/hyprland/templates/envs.conf.j2 b/roles/hyprland/templates/envs.conf.j2 new file mode 100644 index 00000000..afd84a20 --- /dev/null +++ b/roles/hyprland/templates/envs.conf.j2 @@ -0,0 +1,28 @@ +# vim: set filetype=hyprlang.ansible : + +# Configure Hyprland Environment Variables +# See https://wiki.hypr.land/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 + +# Force all apps to use Wayland +env = GDK_BACKEND,wayland,x11,* +env = QT_QPA_PLATFORM,wayland;xcb +env = QT_STYLE_OVERRIDE,kvantum +env = SDL_VIDEODRIVER,wayland +env = MOZ_ENABLE_WAYLAND,1 +env = ELECTRON_OZONE_PLATFORM_HINT,wayland +env = OZONE_PLATFORM,wayland +env = XDG_SESSION_TYPE,wayland + +# Allow better support for screen sharing (Google Meet, Discord, etc) +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland + +{% if hyprland_nvidia %} +# NVIDIA Wayland support +env = LIBVA_DRIVER_NAME,nvidia +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = NVD_BACKEND,direct +{% endif %} diff --git a/roles/hyprland/templates/hypridle.conf.j2 b/roles/hyprland/templates/hypridle.conf.j2 new file mode 100644 index 00000000..2c060988 --- /dev/null +++ b/roles/hyprland/templates/hypridle.conf.j2 @@ -0,0 +1,26 @@ +# vim: set filetype=hyprlang.ansible : + +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session # lock before suspend + after_sleep_cmd = hyprctl dispatch dpms on +} + +# Lock the screen (after 5 minutes) +listener { + timeout = 300 + on-timeout = loginctl lock-session +} + +# Turn off screen (after 10 minutes) +listener { + timeout = 600 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +# Suspend the system (after 15 minutes) +listener { + timeout = 900 + on-timeout = systemctl suspend +} diff --git a/roles/hyprland/templates/hyprland.conf.j2 b/roles/hyprland/templates/hyprland.conf.j2 new file mode 100644 index 00000000..6f10fe0f --- /dev/null +++ b/roles/hyprland/templates/hyprland.conf.j2 @@ -0,0 +1,13 @@ +# vim: set filetype=hyprlang.ansible : + +# Hyprland main configuration file +# Inspired by omarchy setup + +# Use default configuration files +source = /etc/hypr/autostart.conf +source = /etc/hypr/monitors.conf +source = /etc/hypr/input.conf +source = /etc/hypr/bindings.conf +source = /etc/hypr/envs.conf +source = /etc/hypr/looknfeel.conf +source = /etc/hypr/rules.conf diff --git a/roles/hyprland/templates/hyprland/autostart.conf.j2 b/roles/hyprland/templates/hyprland/autostart.conf.j2 deleted file mode 100644 index 164d1df9..00000000 --- a/roles/hyprland/templates/hyprland/autostart.conf.j2 +++ /dev/null @@ -1,8 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -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 -exec-once = uwsm-app -- syshud diff --git a/roles/hyprland/templates/hyprland/bindings.conf.j2 b/roles/hyprland/templates/hyprland/bindings.conf.j2 deleted file mode 100644 index 6c74522f..00000000 --- a/roles/hyprland/templates/hyprland/bindings.conf.j2 +++ /dev/null @@ -1,79 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Configure Hyprland Bindings -# -# See https://wiki.hypr.land/Configuring/Keywords/ -# See https://wiki.hypr.land/Configuring/Binds/ - -bindd = SUPER, Q, Quit, killactive, -bindd = SUPER CONTROL, Q, Lock System, exec, hyprlock -bindd = SUPER SHIFT, Q, Logout, exit, - -# Launcher -bindd = SUPER, SPACE, App Launcher, exec, uwsm app -- $(tofi-drun) - -# Clipboard managers -bindd = SUPER, C, MacOS Copy, sendshortcut, CTRL, INSERT, -bindd = SUPER, V, MacOS Paste, sendshortcut, SHIFT, INSERT, -bindd = SUPER, X, MacOS Cut, sendshortcut, CTRL, X, -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 -bind = CONTROL, 3, workspace, 3 -bind = CONTROL, 4, workspace, 4 -bind = CONTROL, 5, workspace, 5 -bind = CONTROL, 6, workspace, 6 -bind = CONTROL, 7, workspace, 7 -bind = CONTROL, 8, workspace, 8 -bind = CONTROL, 9, workspace, 9 -bind = CONTROL, 0, workspace, 10 - -# Move active window to a workspace with ctrl + SHIFT + [0-9] -bind = CONTROL SHIFT, 1, movetoworkspace, 1 -bind = CONTROL SHIFT, 2, movetoworkspace, 2 -bind = CONTROL SHIFT, 3, movetoworkspace, 3 -bind = CONTROL SHIFT, 4, movetoworkspace, 4 -bind = CONTROL SHIFT, 5, movetoworkspace, 5 -bind = CONTROL SHIFT, 6, movetoworkspace, 6 -bind = CONTROL SHIFT, 7, movetoworkspace, 7 -bind = CONTROL SHIFT, 8, movetoworkspace, 8 -bind = CONTROL SHIFT, 9, movetoworkspace, 9 -bind = CONTROL SHIFT, 0, movetoworkspace, 10 - -# Move/resize windows with mouse (SUPER + SHIFT + left/right click) -bindm = SUPER SHIFT, mouse:272, movewindow -bindm = SUPER SHIFT, mouse:273, resizewindow - -# Move focus with (SUPER + h/j/k/l) -binde = SUPER, h, movefocus, l -binde = SUPER, j, movefocus, d -binde = SUPER, k, movefocus, u -binde = SUPER, l, movefocus, r - -# Swap windows with (SUPER + SHIFT + h/j/k/l) -binde = SUPER SHIFT, h, swapwindow, l -binde = SUPER SHIFT, j, swapwindow, d -binde = SUPER SHIFT, k, swapwindow, u -binde = SUPER SHIFT, l, swapwindow, r - -# Resize windows with (SUPER + CONTROL + h/j/k/l) -binde = SUPER CONTROL, h, resizeactive, -20 0 -binde = SUPER CONTROL, j, resizeactive, 0 20 -binde = SUPER CONTROL, k, resizeactive, 0 -20 -binde = SUPER CONTROL, l, resizeactive, 20 0 - -# Laptop multimedia keys for volume and LCD brightness -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ -bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ -bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- - -# Requires playerctl -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPause, exec, playerctl play-pause -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioPrev, exec, playerctl previous diff --git a/roles/hyprland/templates/hyprland/envs.conf.j2 b/roles/hyprland/templates/hyprland/envs.conf.j2 deleted file mode 100644 index afd84a20..00000000 --- a/roles/hyprland/templates/hyprland/envs.conf.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Configure Hyprland Environment Variables -# See https://wiki.hypr.land/Configuring/Environment-variables/ - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - -# Force all apps to use Wayland -env = GDK_BACKEND,wayland,x11,* -env = QT_QPA_PLATFORM,wayland;xcb -env = QT_STYLE_OVERRIDE,kvantum -env = SDL_VIDEODRIVER,wayland -env = MOZ_ENABLE_WAYLAND,1 -env = ELECTRON_OZONE_PLATFORM_HINT,wayland -env = OZONE_PLATFORM,wayland -env = XDG_SESSION_TYPE,wayland - -# Allow better support for screen sharing (Google Meet, Discord, etc) -env = XDG_CURRENT_DESKTOP,Hyprland -env = XDG_SESSION_DESKTOP,Hyprland - -{% if hyprland_nvidia %} -# NVIDIA Wayland support -env = LIBVA_DRIVER_NAME,nvidia -env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = NVD_BACKEND,direct -{% endif %} diff --git a/roles/hyprland/templates/hyprland/hypridle.conf.j2 b/roles/hyprland/templates/hyprland/hypridle.conf.j2 deleted file mode 100644 index 2c060988..00000000 --- a/roles/hyprland/templates/hyprland/hypridle.conf.j2 +++ /dev/null @@ -1,26 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -general { - lock_cmd = pidof hyprlock || hyprlock - before_sleep_cmd = loginctl lock-session # lock before suspend - after_sleep_cmd = hyprctl dispatch dpms on -} - -# Lock the screen (after 5 minutes) -listener { - timeout = 300 - on-timeout = loginctl lock-session -} - -# Turn off screen (after 10 minutes) -listener { - timeout = 600 - on-timeout = hyprctl dispatch dpms off - on-resume = hyprctl dispatch dpms on -} - -# Suspend the system (after 15 minutes) -listener { - timeout = 900 - on-timeout = systemctl suspend -} diff --git a/roles/hyprland/templates/hyprland/hyprland.conf.j2 b/roles/hyprland/templates/hyprland/hyprland.conf.j2 deleted file mode 100644 index 6f10fe0f..00000000 --- a/roles/hyprland/templates/hyprland/hyprland.conf.j2 +++ /dev/null @@ -1,13 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Hyprland main configuration file -# Inspired by omarchy setup - -# Use default configuration files -source = /etc/hypr/autostart.conf -source = /etc/hypr/monitors.conf -source = /etc/hypr/input.conf -source = /etc/hypr/bindings.conf -source = /etc/hypr/envs.conf -source = /etc/hypr/looknfeel.conf -source = /etc/hypr/rules.conf diff --git a/roles/hyprland/templates/hyprland/hyprlock.conf.j2 b/roles/hyprland/templates/hyprland/hyprlock.conf.j2 deleted file mode 100644 index 95d063a9..00000000 --- a/roles/hyprland/templates/hyprland/hyprlock.conf.j2 +++ /dev/null @@ -1,134 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -source = ~/.config/hyprtheme/current/hyprlock.conf - -# Variables - -general { - hide_cursor = false - ignore_empty_input = true - fail_timeout = 5000 -} - -auth { - fingerprint:enabled = true -} - -animations { - enabled = false -} - -background { - monitor = - # path = ~/.config/hyprtheme/current/background - color = $color - blur_passes = 3 -} - -# Password input -input-field { - monitor = - font_family = $font - font_color = $font_color - - placeholder_text = Enter Password - fade_on_empty = false - fail_text = $FAIL ($ATTEMPTS) - - shadow_passes = 0 - rounding = 50 - outline_thickness = 2 - inner_color = $inner_color - outer_color = $outer_color - check_color = $check_color - - size = 20%, 3% - halign = center - valign = center -} - -# TIME -label { - monitor = - text = $TIME - font_size = 108 - font_family = $font - color = $font_color - - halign = right - valign = top - position = -30, 0 -} - -# DATE -label { - monitor = - text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds - font_size = 36 - font_family = $font - color = $font_color - - halign = right - valign = top - position = -30, -150 -} - -# Keyboard switcher -label { - monitor = - text = $LAYOUT - font_size = 12 - font_family = $font - color = $font_color - - onclick = hyprctl switchxkblayout all next - - halign = left - valign = top - position = 10, -10 -} - -# Reboot -label { - monitor = - text = 󰑙 - font_size = 36 - font_family = $font - color = $font_color - - onclick = reboot - - halign = center - valign = center - position = 0, -150 -} - -# Power off -label { - monitor = - text = - font_size = 36 - font_family = $font - color = $font_color - - onclick = shutdown now - - halign = center - valign = center - position = -150, -150 -} - -# Suspend -label { - monitor = - text = 󰤄 - font_size = 36 - font_family = $font - color = $font_color - - onclick = systemctl suspend - - halign = center - valign = center - position = 150, -150 -} diff --git a/roles/hyprland/templates/hyprland/input.conf.j2 b/roles/hyprland/templates/hyprland/input.conf.j2 deleted file mode 100644 index 51ddef45..00000000 --- a/roles/hyprland/templates/hyprland/input.conf.j2 +++ /dev/null @@ -1,39 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Control your input devices -# See https://wiki.hypr.land/Configuring/Variables/#input -input { - kb_layout = us,de - - # Change speed of keyboard repeat - repeat_rate = 50 - repeat_delay = 500 - - # Don't start with numlock on by default - numlock_by_default = false - - # Increase sensitivity for mouse/trackpad (default: 0) - # sensitivity = 0.35 - - # focus follows mouse pointer - # follow_mouse = 1 - - touchpad { - natural_scroll = false - - # Use two-finger clicks for right-click instead of lower-right corner - clickfinger_behavior = true - - # Control the speed of your scrolling - scroll_factor = 0.4 - } -} - -# Enable touchpad gestures for changing workspaces -# See https://wiki.hyprland.org/Configuring/Gestures/ -# gesture = 3, horizontal, workspace - -misc { - # key_press_enables_dpms = true # key press will trigger wake - # mouse_move_enables_dpms = true # mouse move will trigger wake -} diff --git a/roles/hyprland/templates/hyprland/looknfeel.conf.j2 b/roles/hyprland/templates/hyprland/looknfeel.conf.j2 deleted file mode 100644 index 768eafef..00000000 --- a/roles/hyprland/templates/hyprland/looknfeel.conf.j2 +++ /dev/null @@ -1,148 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Look'n'feel configurations -# Inspired by Omarchy Hyprland setup -# Source: https://github.com/basecamp/omarchy/tree/8a37f3dce71b0764e3758cb86478c503a4a8746e/config/hypr/looknfeel.conf -# Defaults: https://github.com/basecamp/omarchy/blob/8a37f3dce71b0764e3758cb86478c503a4a8746e/default/hypr/looknfeel.conf - -# Load current theme variables -source = ~/.config/hyprtheme/current/hyprland.conf - -# Refer to https://wiki.hyprland.org/Configuring/Variables/ -# Variables -$activeBorderColor = $active -$inactiveBorderColor = $inactive - -# https://wiki.hyprland.org/Configuring/Variables/#general -general { - gaps_in = 2 - gaps_out = 5 - - border_size = 2 - - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = $activeBorderColor - col.inactive_border = $inactiveBorderColor - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = dwindle -} - -# https://wiki.hyprland.org/Configuring/Variables/#decoration -decoration { - rounding = 5 - - shadow { - enabled = true - range = 2 - render_power = 3 - color = rgba(1a1a1aee) - } - - # Change transparency of focused and unfocused windows - active_opacity = 1.0 - inactive_opacity = 0.85 - - # https://wiki.hyprland.org/Configuring/Variables/#blur - blur { - enabled = true - size = 2 - passes = 2 - special = true - brightness = 0.60 - contrast = 0.75 - } -} - -# https://wiki.hypr.land/Configuring/Variables/#group -group { - col.border_active = $activeBorderColor - col.border_inactive = $inactiveBorderColor - col.border_locked_active = -1 - col.border_locked_inactive = -1 - - groupbar { - font_size = 12 - font_family = monospace - font_weight_active = ultraheavy - font_weight_inactive = normal - - indicator_height = 0 - indicator_gap = 5 - height = 22 - gaps_in = 5 - gaps_out = 0 - - text_color = rgb(ffffff) - text_color_inactive = rgba(ffffff90) - col.active = rgba(00000040) - col.inactive = rgba(00000020) - - gradients = true - gradient_rounding = 0 - gradient_round_only_edges = false - } -} - - -# https://wiki.hyprland.org/Configuring/Variables/#animations -animations { - enabled = yes, please :) - - # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = easeOutQuint,0.23,1,0.32,1 - bezier = easeInOutCubic,0.65,0.05,0.36,1 - bezier = linear,0,0,1,1 - bezier = almostLinear,0.5,0.5,0.75,1.0 - bezier = quick,0.15,0,0.1,1 - - animation = global, 1, 10, default - animation = border, 1, 5.39, easeOutQuint - animation = windows, 1, 4.79, easeOutQuint - animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% - animation = windowsOut, 1, 1.49, linear, popin 87% - animation = fadeIn, 1, 1.73, almostLinear - animation = fadeOut, 1, 1.46, almostLinear - animation = fade, 1, 3.03, quick - animation = layers, 1, 3.81, easeOutQuint - animation = layersIn, 1, 4, easeOutQuint, fade - animation = layersOut, 1, 1.5, linear, fade - animation = fadeLayersIn, 1, 1.79, almostLinear - animation = fadeLayersOut, 1, 1.39, almostLinear - animation = workspaces, 0, 0, ease -} - -# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more -dwindle { - pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # You probably want this - force_split = 2 # Always split on the right -} - -# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more -master { - new_status = master -} - -# https://wiki.hyprland.org/Configuring/Variables/#misc -misc { - disable_hyprland_logo = true - disable_splash_rendering = true - focus_on_activate = true - anr_missed_pings = 3 - on_focus_under_fullscreen = 1 -} - -# https://wiki.hypr.land/Configuring/Variables/#cursor -cursor { - hide_on_key_press = true - sync_gsettings_theme = true - no_hardware_cursors = 1 - inactive_timeout = 5 -} diff --git a/roles/hyprland/templates/hyprland/monitors.conf.j2 b/roles/hyprland/templates/hyprland/monitors.conf.j2 deleted file mode 100644 index 266cb0af..00000000 --- a/roles/hyprland/templates/hyprland/monitors.conf.j2 +++ /dev/null @@ -1,20 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Configure Hyprland Monitors -# See https://wiki.hypr.land/Configuring/Monitors/ - -{% if hyprland_monitors is defined %} -{{ hyprland_monitors }} -{% else %} -# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K. -# env = GDK_SCALE,2 -# monitor=,preferred,auto,auto - -# Good compromise for 27" or 32" 4K monitors (but fractional!) -# env = GDK_SCALE,1.75 -# monitor=,preferred,auto,1.6 - -# Straight 1x setup for low-resolution displays like 1080p or 1440p -env = GDK_SCALE,1 -monitor=,preferred,auto,1 -{% endif %} diff --git a/roles/hyprland/templates/hyprland/rules.conf.j2 b/roles/hyprland/templates/hyprland/rules.conf.j2 deleted file mode 100644 index 2a7d41ac..00000000 --- a/roles/hyprland/templates/hyprland/rules.conf.j2 +++ /dev/null @@ -1,31 +0,0 @@ -# vim: set filetype=hyprlang.ansible : - -# Scroll nicely in the terminal -windowrule = scroll_touchpad 1.5, match:class (Alacritty|kitty) -windowrule = scroll_touchpad 0.2, match:class com.mitchellh.ghostty - -# Floating windows -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|clipse) -windowrule = float on, match:class org.gnome.Calculator - -# Picture-in-picture overlays -windowrule = tag +pic-in-pic, match:title (Picture.?in.?[Pp]icture) -windowrule = float on, match:tag pic-in-pic -windowrule = pin on, match:tag pic-in-pic -windowrule = size 600 338, match:tag pic-in-pic -windowrule = opacity 1.0 override 1.0 override, match:tag pic-in-pic -windowrule = move (monitor_w-window_w-40) (monitor_h*0.04), match:tag pic-in-pic - -# Browser types -windowrule = tag +chromium-based-browser, match:class ((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium) -windowrule = tag +firefox-based-browser, match:class ([fF]irefox|zen|librewolf) -windowrule = opacity 1.0 override 0.97 override, match:tag chromium-based-browser -windowrule = opacity 1.0 override 0.97 override, match:tag firefox-based-browser - -# Pinentry windows -windowrule = match:class (pinentry-)(.*), stay_focused on diff --git a/roles/hyprland/templates/hyprlock.conf.j2 b/roles/hyprland/templates/hyprlock.conf.j2 new file mode 100644 index 00000000..95d063a9 --- /dev/null +++ b/roles/hyprland/templates/hyprlock.conf.j2 @@ -0,0 +1,134 @@ +# vim: set filetype=hyprlang.ansible : + +source = ~/.config/hyprtheme/current/hyprlock.conf + +# Variables + +general { + hide_cursor = false + ignore_empty_input = true + fail_timeout = 5000 +} + +auth { + fingerprint:enabled = true +} + +animations { + enabled = false +} + +background { + monitor = + # path = ~/.config/hyprtheme/current/background + color = $color + blur_passes = 3 +} + +# Password input +input-field { + monitor = + font_family = $font + font_color = $font_color + + placeholder_text = Enter Password + fade_on_empty = false + fail_text = $FAIL ($ATTEMPTS) + + shadow_passes = 0 + rounding = 50 + outline_thickness = 2 + inner_color = $inner_color + outer_color = $outer_color + check_color = $check_color + + size = 20%, 3% + halign = center + valign = center +} + +# TIME +label { + monitor = + text = $TIME + font_size = 108 + font_family = $font + color = $font_color + + halign = right + valign = top + position = -30, 0 +} + +# DATE +label { + monitor = + text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds + font_size = 36 + font_family = $font + color = $font_color + + halign = right + valign = top + position = -30, -150 +} + +# Keyboard switcher +label { + monitor = + text = $LAYOUT + font_size = 12 + font_family = $font + color = $font_color + + onclick = hyprctl switchxkblayout all next + + halign = left + valign = top + position = 10, -10 +} + +# Reboot +label { + monitor = + text = 󰑙 + font_size = 36 + font_family = $font + color = $font_color + + onclick = reboot + + halign = center + valign = center + position = 0, -150 +} + +# Power off +label { + monitor = + text = + font_size = 36 + font_family = $font + color = $font_color + + onclick = shutdown now + + halign = center + valign = center + position = -150, -150 +} + +# Suspend +label { + monitor = + text = 󰤄 + font_size = 36 + font_family = $font + color = $font_color + + onclick = systemctl suspend + + halign = center + valign = center + position = 150, -150 +} diff --git a/roles/hyprland/templates/input.conf.j2 b/roles/hyprland/templates/input.conf.j2 new file mode 100644 index 00000000..51ddef45 --- /dev/null +++ b/roles/hyprland/templates/input.conf.j2 @@ -0,0 +1,39 @@ +# vim: set filetype=hyprlang.ansible : + +# Control your input devices +# See https://wiki.hypr.land/Configuring/Variables/#input +input { + kb_layout = us,de + + # Change speed of keyboard repeat + repeat_rate = 50 + repeat_delay = 500 + + # Don't start with numlock on by default + numlock_by_default = false + + # Increase sensitivity for mouse/trackpad (default: 0) + # sensitivity = 0.35 + + # focus follows mouse pointer + # follow_mouse = 1 + + touchpad { + natural_scroll = false + + # Use two-finger clicks for right-click instead of lower-right corner + clickfinger_behavior = true + + # Control the speed of your scrolling + scroll_factor = 0.4 + } +} + +# Enable touchpad gestures for changing workspaces +# See https://wiki.hyprland.org/Configuring/Gestures/ +# gesture = 3, horizontal, workspace + +misc { + # key_press_enables_dpms = true # key press will trigger wake + # mouse_move_enables_dpms = true # mouse move will trigger wake +} diff --git a/roles/hyprland/templates/looknfeel.conf.j2 b/roles/hyprland/templates/looknfeel.conf.j2 new file mode 100644 index 00000000..768eafef --- /dev/null +++ b/roles/hyprland/templates/looknfeel.conf.j2 @@ -0,0 +1,148 @@ +# vim: set filetype=hyprlang.ansible : + +# Look'n'feel configurations +# Inspired by Omarchy Hyprland setup +# Source: https://github.com/basecamp/omarchy/tree/8a37f3dce71b0764e3758cb86478c503a4a8746e/config/hypr/looknfeel.conf +# Defaults: https://github.com/basecamp/omarchy/blob/8a37f3dce71b0764e3758cb86478c503a4a8746e/default/hypr/looknfeel.conf + +# Load current theme variables +source = ~/.config/hyprtheme/current/hyprland.conf + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ +# Variables +$activeBorderColor = $active +$inactiveBorderColor = $inactive + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 2 + gaps_out = 5 + + border_size = 2 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col.active_border = $activeBorderColor + col.inactive_border = $inactiveBorderColor + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 5 + + shadow { + enabled = true + range = 2 + render_power = 3 + color = rgba(1a1a1aee) + } + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 0.85 + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = true + size = 2 + passes = 2 + special = true + brightness = 0.60 + contrast = 0.75 + } +} + +# https://wiki.hypr.land/Configuring/Variables/#group +group { + col.border_active = $activeBorderColor + col.border_inactive = $inactiveBorderColor + col.border_locked_active = -1 + col.border_locked_inactive = -1 + + groupbar { + font_size = 12 + font_family = monospace + font_weight_active = ultraheavy + font_weight_inactive = normal + + indicator_height = 0 + indicator_gap = 5 + height = 22 + gaps_in = 5 + gaps_out = 0 + + text_color = rgb(ffffff) + text_color_inactive = rgba(ffffff90) + col.active = rgba(00000040) + col.inactive = rgba(00000020) + + gradients = true + gradient_rounding = 0 + gradient_round_only_edges = false + } +} + + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = easeOutQuint,0.23,1,0.32,1 + bezier = easeInOutCubic,0.65,0.05,0.36,1 + bezier = linear,0,0,1,1 + bezier = almostLinear,0.5,0.5,0.75,1.0 + bezier = quick,0.15,0,0.1,1 + + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 0, 0, ease +} + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this + force_split = 2 # Always split on the right +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + disable_hyprland_logo = true + disable_splash_rendering = true + focus_on_activate = true + anr_missed_pings = 3 + on_focus_under_fullscreen = 1 +} + +# https://wiki.hypr.land/Configuring/Variables/#cursor +cursor { + hide_on_key_press = true + sync_gsettings_theme = true + no_hardware_cursors = 1 + inactive_timeout = 5 +} diff --git a/roles/hyprland/templates/monitors.conf.j2 b/roles/hyprland/templates/monitors.conf.j2 new file mode 100644 index 00000000..266cb0af --- /dev/null +++ b/roles/hyprland/templates/monitors.conf.j2 @@ -0,0 +1,20 @@ +# vim: set filetype=hyprlang.ansible : + +# Configure Hyprland Monitors +# See https://wiki.hypr.land/Configuring/Monitors/ + +{% if hyprland_monitors is defined %} +{{ hyprland_monitors }} +{% else %} +# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K. +# env = GDK_SCALE,2 +# monitor=,preferred,auto,auto + +# Good compromise for 27" or 32" 4K monitors (but fractional!) +# env = GDK_SCALE,1.75 +# monitor=,preferred,auto,1.6 + +# Straight 1x setup for low-resolution displays like 1080p or 1440p +env = GDK_SCALE,1 +monitor=,preferred,auto,1 +{% endif %} diff --git a/roles/hyprland/templates/rules.conf.j2 b/roles/hyprland/templates/rules.conf.j2 new file mode 100644 index 00000000..2a7d41ac --- /dev/null +++ b/roles/hyprland/templates/rules.conf.j2 @@ -0,0 +1,31 @@ +# vim: set filetype=hyprlang.ansible : + +# Scroll nicely in the terminal +windowrule = scroll_touchpad 1.5, match:class (Alacritty|kitty) +windowrule = scroll_touchpad 0.2, match:class com.mitchellh.ghostty + +# Floating windows +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|clipse) +windowrule = float on, match:class org.gnome.Calculator + +# Picture-in-picture overlays +windowrule = tag +pic-in-pic, match:title (Picture.?in.?[Pp]icture) +windowrule = float on, match:tag pic-in-pic +windowrule = pin on, match:tag pic-in-pic +windowrule = size 600 338, match:tag pic-in-pic +windowrule = opacity 1.0 override 1.0 override, match:tag pic-in-pic +windowrule = move (monitor_w-window_w-40) (monitor_h*0.04), match:tag pic-in-pic + +# Browser types +windowrule = tag +chromium-based-browser, match:class ((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium) +windowrule = tag +firefox-based-browser, match:class ([fF]irefox|zen|librewolf) +windowrule = opacity 1.0 override 0.97 override, match:tag chromium-based-browser +windowrule = opacity 1.0 override 0.97 override, match:tag firefox-based-browser + +# Pinentry windows +windowrule = match:class (pinentry-)(.*), stay_focused on -- cgit v1.2.3