l3d.i3wm

Ansible Galaxy MIT License Maintainance

I3 窗口管理器 - Ansible 角色

通过 Ansible 安装和部署基本配置的 I3 窗口管理器
可选配置您的分辨率、哪些应用程序绑定到哪个屏幕,以及自动启动中包含哪些内容。
如果您想使用 Wayland 而不是 Xorg,可以考虑使用 Sway 作为窗口管理器。相应的 Ansible 角色位于 github.com/roles-ansible/role-sway

从 Ansible Galaxy 直接获取

$ ansible-galaxy install roles-ansible.i3wm

角色变量

有关可能变量的良好概览,请查看 defaults/main.yml

示例用法

 - name: 在本地主机上安装 i3wm
   hosts: localhost
   vars_files:
     - vars/main.yml
   roles:
     - {role: roles-ansible.i3wm, tags[i3, i3wm]}

vars/main.yml

    # i3wm 配置的用户列表
    i3wm_user_list:
      - user: "alice"
        home: "/home/alice"
      - user: "bob"
        home: "/home/bob"

    # 背景图像
    i3_desktop_background: "~/Bilder/wallpaper.jpg"

    # 需要额外的快捷键吗?
    i3_keybindings_extra:
      - keybinding:
        name: 音量(静音/取消静音)
        key: $mod+F12
        exec: --no-startup-id amixer sset Master toggle
      - keybinding:
        name: 音量(默认)
        key: $mod+Shift+F12
        exec: --no-startup-id amixer sset Master 40%

    # 您的显示器配置
    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]

    # 启动的应用程序
    i3_applications:
      - application:
        class: "Firefox"
        name: "firefox"
        workspace: 1
        on_startup: false
      - application:
        class: "Code"
        name: "code"
        workspace: 7
        on_startup: true

    # 90分钟后锁定屏幕
    enable_lock_after_time: true

    files/rofi/dracula_dark.rasi

    # 启用多个 i3blocks 选项
    i3_i3blocks_options:
      weather: true
      audio_volume: true
      wifisignal: true
      ipaddress: true
      clock: true
      battery: true
      ddate: true

    # 选择 rofi 主题
    i3_rofi_config_file: 'files/rofi/dracula_dark.rasi'

需求

某些 Ansible 角色需要 community.general 集合。 您可以使用以下命令安装它:

ansible-galaxy collection install -r requirements.yml --upgrade
关于项目

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

安装
ansible-galaxy install l3d.i3wm
许可证
mit
下载
546
拥有者
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy