From dd5bada3079c25e43dc268c66fd6207d0d3e3a65 Mon Sep 17 00:00:00 2001 From: Lilian Roller Date: Tue, 11 Jun 2019 09:19:11 +0200 Subject: [PATCH] Rename some enviroment variables --- README.md | 3 +-- defaults/main.yml | 8 +++----- molecule/default/playbook.yml | 3 +-- templates/config.j2 | 10 ++++------ 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 68f77b9..af65aab 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Including an example of how to use your role (for instance, with variables passe *`vars/main.yml`* ```bash - i3_desktop_env: - background: "~/wallpaper.jpg" + i3_desktop_background: "~/Bilder/wallpaper.jpg" i3_packages_extra: - ranger diff --git a/defaults/main.yml b/defaults/main.yml index f204037..dedb701 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,14 +24,12 @@ i3_run_on_startup: [] # - foo # - bar ## set default font size -i3: - font_size: 9 - focus_follows_mouse: true +i3_font_size: 9 +i3_focus_follows_mouse: true # set i3lock options i3lock_options: "i3lock --image=/home/{{ i3wm_user }}/.config/lockscreen.png --color 000000" # use fancy background -i3_desktop_env: - background: "/home/{{ i3wm_user }}/.config/background.png" +i3_desktop_background: "/home/{{ i3wm_user }}/.config/background.png" # install additional packages i3_packages_extra: - ranger diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index 4ec227d..3a3b221 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -3,8 +3,7 @@ hosts: all vars: - i3_desktop_env: - background: "~/wallpaper.jpg" + i3_desktop_background: "~/wallpaper.jpg" i3_packages_extra: - ranger diff --git a/templates/config.j2 b/templates/config.j2 index 6c365c8..7e932a2 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -4,8 +4,8 @@ set $term terminator # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -font pango:monospace {{ i3.font_size }} -focus_follows_mouse {% if i3.focus_follows_mouse %}yes{% else %}no{% endif %} +font pango:monospace {{ i3_font_size }} +focus_follows_mouse {% if i3_focus_follows_mouse | bool %}yes{% else %}no{% endif %} # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -153,10 +153,8 @@ bar { } # Background -{% if i3_desktop_env is defined %} -{% if i3_desktop_env.background is defined %} -exec_always feh --bg-scale {{ i3_desktop_env.background}} -{% endif %} +{% if i3_desktop_background is defined %} +exec_always feh --bg-scale {{ i3_desktop_background }} {% endif %} # Setup Monitors