From 92164a24dc30f03b0709db54f05ef5da27c14d7d Mon Sep 17 00:00:00 2001 From: Bluemedia Date: Sun, 26 Nov 2023 22:24:59 +0100 Subject: [PATCH] Fix variable usage in templates --- roles/desktop-environment/templates/bash_profile.j2 | 2 +- roles/desktop-environment/templates/sway-config.j2 | 4 ++-- roles/desktop-environment/templates/waybar-config.j2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/desktop-environment/templates/bash_profile.j2 b/roles/desktop-environment/templates/bash_profile.j2 index aa2e162..9ddfa4f 100644 --- a/roles/desktop-environment/templates/bash_profile.j2 +++ b/roles/desktop-environment/templates/bash_profile.j2 @@ -14,7 +14,7 @@ fi export GPG_TTY=$(tty) # Autostart sway at login -{% if isVm == true %} +{% if isVm | bool %} export WLR_NO_HARDWARE_CURSORS=1 {% endif %} if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec sway; fi \ No newline at end of file diff --git a/roles/desktop-environment/templates/sway-config.j2 b/roles/desktop-environment/templates/sway-config.j2 index ee26a2a..80f30f8 100644 --- a/roles/desktop-environment/templates/sway-config.j2 +++ b/roles/desktop-environment/templates/sway-config.j2 @@ -213,7 +213,7 @@ exec hash dbus-update-activation-environment 2>/dev/null && \ exec waybar # Autostart applications -{% if nextcloud == true %} +{% if nextcloud is defined and nextcloud | bool %} exec --no-startup-id nextcloud --background {% endif %} @@ -226,7 +226,7 @@ client.placeholder #c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7 client.background #1f1f1f -{% if isNotebook == true %} +{% if isNotebook | bool %} # backlight control bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl -d intel_backlight set +5% bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl -d intel_backlight set 5%- diff --git a/roles/desktop-environment/templates/waybar-config.j2 b/roles/desktop-environment/templates/waybar-config.j2 index 076ba43..89abcc7 100644 --- a/roles/desktop-environment/templates/waybar-config.j2 +++ b/roles/desktop-environment/templates/waybar-config.j2 @@ -30,7 +30,7 @@ "reverse-scrolling": true, "on-click": "swaymsg exec amixer -q set Master toggle" }, - {% if isNotebook == true %} + {% if isNotebook | bool %} "battery": { "format": "{icon} {capacity}%", "format-charging": " {capacity}%",