Fix whitespaces in templates

This commit is contained in:
Oliver Traber 2024-05-27 23:37:19 +02:00
parent bfd2d6ca03
commit 28a08ec28e
Signed by: Bluemedia
GPG key ID: C0674B105057136C
5 changed files with 18 additions and 17 deletions

View file

@ -1,6 +1,6 @@
# Monitor configuration (see https://wiki.hyprland.org/Configuring/Monitors/)
{% for monitor in hostvars[ansible_hostname]['monitors'] -%}
monitor=desc:{{ monitor['desc'] }}, {{ monitor['resolution'] }}, {{ monitor['position'] }}, 1
{% for monitor in hostvars[ansible_hostname]['monitors'] %}
monitor=desc:{{ monitor['desc'] }}, {{ monitor['resolution'] }}, {{ monitor['position'] | default('auto') }}, 1
{% endfor %}
# Programs to use
@ -99,8 +99,9 @@ windowrulev2 = float,title:^(Application Finder)$
windowrulev2 = size 500 500,title:^(Application Finder)$
# Workspace rules
{% for workspace in hostvars[ansible_hostname]['workspaces'] -%}
{% for workspace in hostvars[ansible_hostname]['workspaces'] %}
workspace = {{ workspace['id'] }}{% if 'monitor' in workspace %}, monitor:desc:{{ workspace['monitor'] }}{% endif %}{% if 'default' in workspace %}, default:{{ workspace['default'] }}{% endif %}{% if 'layoutopt_orientation' in workspace %}, layoutopt:orientation:{{ workspace['layoutopt_orientation'] }}{% endif %}{% if 'on_created_empty' in workspace %}, on-created-empty:{{ workspace['on_created_empty'] }}{% endif %}
{% endfor %}
# Execute apps at launch
@ -109,7 +110,7 @@ exec-once = waybar & ~/.local/bin/hyprhelpr background & ~/.local/bin/hyprhelpr
{% if 'nextcloud' in role_names %}
exec-once = nextcloud --background
{% endif %}
{% for autostart in hostvars[ansible_hostname]['autostart'] -%}
{% for autostart in hostvars[ansible_hostname]['autostart'] %}
exec-once = {% if 'workspace' in autostart %}[workspace {{ autostart['workspace'] }}] {% endif %}{{ autostart['command'] }}
{% endfor %}

View file

@ -1,7 +1,7 @@
{
"modules-left": ["hyprland/workspaces"],
"modules-center": ["clock"],
"modules-right": ["cpu", "memory", "network", "pulseaudio", {% if isNotebook | bool %}"battery", {% endif %}"custom/power"],
"modules-right": ["cpu", "memory", "network", "pulseaudio", {% if (hostvars[ansible_hostname]['mobile_platform'] | default('false')) | bool %}"battery", {% endif %}"custom/power"],
"hyprland/workspaces": {},
"clock": {
"format": " {:%H:%M %d.%m.}",
@ -27,12 +27,12 @@
"format-icons": ["", "", ""],
"reverse-scrolling": true,
"on-click": "swaymsg exec amixer -q set Master toggle"
{% if (hostvars[ansible_hostname]['mobile_platform'] | default('false')) | bool %}
},
{% if hostvars[ansible_hostname]['mobile_platform'] | bool %}
"battery": {
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-icons": ["", "", "", "", ""]
}
{% endif %}
}
}