diff --git a/defaults/main.yml b/defaults/main.yml index 9463156..33c568a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,6 +6,15 @@ sway__user_list: sway__dynamic_names: true +# sway behavior and favorites +sway__logo_key: 'Mod4' +sway__term: 'foot' +sway__reload: '$mod+Shift+r' +swaywm__term_pkgs: + - foot + - foot-terminfo + - foot-themes + # version check for this role? submodules_versioncheck: true diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index acb8882..2360c99 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -19,7 +19,16 @@ state: "present" become: true with_items: - - "sway" + - 'sway' + - 'sway-backgrounds' + - 'swaylock' + - 'sway-notification-center' + - 'swaybg' + - 'swayidle' + - 'swayimg' + - 'wdisplays' + - 'wlsunset' + - 'waybar' - name: Ensure font-awesome is installed ansible.builtin.apt: @@ -27,6 +36,13 @@ state: "present" become: true with_items: - - "fonts-font-awesome" - - "virtualenv" + - 'fonts-font-awesome' + - 'virtualenv' when: sway__dynamic_names | bool + +- name: Ensure terminal Packages are installed + ansible.builtin.apt: + name: "{{ item }}" + state: "present" + become: true + with_items: "{{ swaywm__term_pkgs }}" diff --git a/templates/config.j2 b/templates/config.j2 index 3ecc093..fbdbbbd 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -6,15 +6,19 @@ ### Variables # -# Logo key. Use Mod1 for Alt. -set $mod Mod4 +# Logo key. +# Use Mod4 for WIN or Mod1 for Alt. +set $mod {{ sway__logo_key }} + # Home row direction keys, like vim set $left h set $down j set $up k set $right l + # Your preferred terminal emulator -set $term foot +set $term {{ sway__term }} + # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened # on the original workspace that the command was run on. @@ -89,10 +93,10 @@ input type:keyboard { floating_modifier $mod normal # Reload the configuration file - bindsym $mod+Shift+c reload + bindsym {{ sway__reload }} reload # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' --button-dismiss 'Reload and Continue' 'swaymsg reload' --button-no-terminal 'Yes, exit sway' 'swaymsg exit' # # Moving around: #