l3d.i3wm

I3 Window Manager - Ansible Role

This role helps you install and set up a basic configuration of I3 Window Manager using Ansible.
You can optionally set your screen resolution, decide which apps to assign to which screens, and what should start automatically when you log in.
If you prefer Wayland over Xorg, consider using Sway as your window manager. You can find the respective Ansible role on GitHub.

How to Get It from Ansible Galaxy

To install the I3 Window Manager role, run:

$ ansible-galaxy install roles-ansible.i3wm

Role Variables

For an overview of the variables you can use, check defaults/main.yml.

Example Usage

Here is an example of how to use this role in your playbook:

 - name: Install i3wm on localhost
   hosts: localhost
   vars_files:
     - vars/main.yml
   roles:
     - {role: roles-ansible.i3wm, tags: [i3, i3wm]}

vars/main.yml

    # List of users for i3wm config
    i3wm_user_list:
      - user: "alice"
        home: "/home/alice"
      - user: "bob"
        home: "/home/bob"

    # Background image
    i3_desktop_background: "~/Bilder/wallpaper.jpg"

    # Extra keybindings
    i3_keybindings_extra:
      - keybinding:
        name: Volume (mute/unmute)
        key: $mod+F12
        exec: --no-startup-id amixer sset Master toggle
      - keybinding:
        name: Volume (default)
        key: $mod+Shift+F12
        exec: --no-startup-id amixer sset Master 40%

    # Monitor configuration
    i3_monitors:
      - monitor:
        id: 1
        output: "HDMI-A-0"
        mode: "1920x1080"
        pos: "0x0"
        rotate: "normal"
        workspaces: [0,1,2,3,4,5,6]
      - monitor:
        id: 2
        output: "DisplayPort-0"
        mode: "1920x1080"
        pos: "1920x0"
        rotate: "normal"
        workspaces: [7,8,9]

    # Startup applications
    i3_applications:
      - application:
        class: "Firefox"
        name: "firefox"
        workspace: 1
        on_startup: false
      - application:
        class: "Code"
        name: "code"
        workspace: 7
        on_startup: true

    # Lock the screen after 90 minutes
    enable_lock_after_time: true

    # Enable multiple i3blocks options
    i3_i3blocks_options:
      weather: true
      audio_volume: true
      wifisignal: true
      ipaddress: true
      clock: true
      battery: true
      ddate: true

    # Choose rofi theme
    i3_rofi_config_file: 'files/rofi/dracula_dark.rasi'

Requirements

You will need the community.general collection for some parts of this Ansible role. You can install it with the following command:

ansible-galaxy collection install -r requirements.yml --upgrade
Informazioni sul progetto

Install and configure i3wm on common linux distibutions (https://i3wm.org/)

Installa
ansible-galaxy install l3d.i3wm
Licenza
mit
Download
546
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy