https://github.com/michalkielan/ansible-role-swaywm
Ansible role to generate sway config.
https://github.com/michalkielan/ansible-role-swaywm
ansible ansible-role sway swaywm
Last synced: 3 months ago
JSON representation
Ansible role to generate sway config.
- Host: GitHub
- URL: https://github.com/michalkielan/ansible-role-swaywm
- Owner: michalkielan
- License: bsd-3-clause
- Created: 2024-12-10T20:59:19.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-03-05T14:16:04.000Z (3 months ago)
- Last Synced: 2025-03-05T15:26:22.830Z (3 months ago)
- Topics: ansible, ansible-role, sway, swaywm
- Language: Jinja
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/michalkielan/ansible-role-swaywm/actions/workflows/tests.yml)
ansible-role-swaywm
===================An Ansible role to generate and deploy a customized Sway configuration. This role supports a wide range of configuration options from the Sway manual, which are exposed as variables for easier customization and management of your Sway setup.
Requirements
------------Sway: This role is designed for use with the Sway window manager. Ensure that Sway is installed on your system.
Role Variables
--------------See [defaults/main.yml](https://github.com/michalkielan/ansible-role-swaywm/blob/master/defaults/main.yml) and [tests/*.yml](https://github.com/michalkielan/ansible-role-swaywm/tree/master/tests) for the full set of default variables.
Variable
Type
Default Value
Description
swaywm_sysconfdir
String
/etc
System configuration directory.
swaywm_font
Dict
defaults/main.yml
Sets font to use for the title bars.
swaywm_logo_key
String
Mod4
Specify modifier key.
swaywm_dir_keys
Dict
n/a
Direction keys.
swaywm_term
String
foot
Default terminal.
swaywm_menu
String
wmenu-run
Default application launcher.
swaywm_extra_variables
List
[]
List of user defined variables, e.g.:
swaywm_extra_variables:
- name: "var1"
value: "value1"
- name: "var2"
value: "value2"
swaywm_for_window
List
[]
List offor_window
commands, e.g.:
swaywm_for_window:
- class: "app_id='floating_shell'"
criteria: "floating enable"
swaywm_client
List
[]
List ofclient
commands, e.g.:
swaywm_client:
- name: focused
border: <color>
background: <color>
text: <color>
indicator: <color> # optional
child_border: <color> # optional
swaywm_outputs
List
[]
List of output configurations, e.g.:
swaywm_outputs:
- name: "*"
options: "bg 'wallpaper.png' fill"
swaywm_inputs
List
[]
List of input configurations, e.g.:
swaywm_inputs:
- name: "type:touchpad"
options:
- name: "Disable when typing"
key: dwt
value: "enabled"
- name: "Enable tap"
key: tap
value: "enabled"
swaywm_keybindings_basics
List
[]
List of basics key bindings, e.g.:
swaywm_keybindings_basics:
- name: "Start a terminal"
key: "$mod+Return"
exec: "exec $term"
swaywm_keybindings_utilities
List
[]
List of utilities key bindings, e.g.:
swaywm_keybindings_utilities:
- name: "Audio mute"
key: XF86AudioMute
locked: true # optional
exec: "<mute command>"
swaywm_keybindings_extra
List
[]
List of extra key bindings, e.g.:
swaywm_keybindings_extra:
- name: "<name>"
key: <shortcut>
locked: false # optional
exec: "<command>"
swaywm_bar
Dict
...
Bar configuration
swaywm_autostart_apps
List
[]
List of autostart apps, e.g.:
swaywm_autostart_apps:
- name: <app name>
exec_always: false # optional
exec: <exe path>
Dependencies
------------None.
Example Playbook
----------------The following example demonstrates a minimal playbook that deploys a default Sway configuration. The deployed config will be the same as the default one from `/etc/sway/config` unless overridden by specific variables.
```yml
----
- name: Deploy Sway configuration
hosts: localhost
vars:
swaywm_users:
- username: "{{ ansible_user_id }}"
home: "{{ ansible_env.HOME | default('/home/{{ ansible_user_id }}') }}"roles:
- ansible-role-swaywm
```License
-------[BSD](https://github.com/michalkielan/ansible-role-swaywm/blob/master/LICENSE)