mirror of
https://github.com/fscotto/infra.git
synced 2026-05-31 07:49:57 +00:00
desktop: add sway/swayfx profile (dormant) with waybar, kanshi, cliphist
New profile_desktop_sway role gated by desktop_sessions_enabled, with SwayFX effects, Waybar bar (1:1 with Polybar layout + pulseaudio), swayidle + swaylock-effects for locking, swayosd for OSD, cliphist for clipboard history and kanshi for multi-monitor profiles. Emptty gains WAYLAND_SESSIONS_PATH + wayland-sessions dir. start-sway wrapper handles session env (dbus-run-session, gpg-agent, turnstile env). Profile stays dormant until a host opts in via desktop_sessions_enabled. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,11 @@
|
||||
if 'i3' in (desktop_sessions_enabled | default([]))
|
||||
else []
|
||||
)
|
||||
+ (
|
||||
(desktop_sway_packages | default([]))
|
||||
if 'sway' in (desktop_sessions_enabled | default([]))
|
||||
else []
|
||||
)
|
||||
+ (host_packages | default([]))
|
||||
)
|
||||
| unique
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
mode: "0755"
|
||||
loop:
|
||||
- /etc/emptty/xsessions
|
||||
- /etc/emptty/wayland-sessions
|
||||
when: "'void' in group_names"
|
||||
|
||||
- name: Configure emptty
|
||||
|
||||
@@ -10,6 +10,7 @@ DEFAULT_SESSION_ENV={{ desktop_default_session_env | default('') }}
|
||||
DBUS_LAUNCH=false
|
||||
XINITRC_LAUNCH=true
|
||||
XORG_SESSIONS_PATH=/etc/emptty/xsessions
|
||||
WAYLAND_SESSIONS_PATH=/etc/emptty/wayland-sessions
|
||||
VERTICAL_SELECTION=true
|
||||
IDENTIFY_ENVS=true
|
||||
SELECT_LAST_USER=global
|
||||
|
||||
5
ansible/roles/profile_desktop_sway/files/sway.desktop
Normal file
5
ansible/roles/profile_desktop_sway/files/sway.desktop
Normal file
@@ -0,0 +1,5 @@
|
||||
[Desktop Entry]
|
||||
Name=Sway
|
||||
Comment=SwayFX (Wayland)
|
||||
Exec=start-sway
|
||||
Type=Application
|
||||
41
ansible/roles/profile_desktop_sway/tasks/main.yml
Normal file
41
ansible/roles/profile_desktop_sway/tasks/main.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
- name: Ensure sway config directories exist
|
||||
tags: [dotfiles, dotfiles:desktop, sway]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ user_home }}/.config/alacritty"
|
||||
- "{{ user_home }}/.config/dunst"
|
||||
- "{{ user_home }}/.config/rofi"
|
||||
- "{{ user_home }}/.config/sway"
|
||||
- "{{ user_home }}/.config/sway/scripts"
|
||||
- "{{ user_home }}/.config/sway/wallpapers"
|
||||
- "{{ user_home }}/.config/waybar"
|
||||
when: "'sway' in (desktop_sessions_enabled | default([]))"
|
||||
|
||||
- name: Install allowed emptty Wayland sessions
|
||||
tags: [packages, services, emptty, sway]
|
||||
ansible.builtin.copy:
|
||||
src: sway.desktop
|
||||
dest: /etc/emptty/wayland-sessions/sway.desktop
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: "'sway' in (desktop_sessions_enabled | default([]))"
|
||||
|
||||
- name: Copy sway desktop dotfiles
|
||||
tags: [dotfiles, dotfiles:desktop, sway]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ desktop_sway_dotfiles | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
when: "'sway' in (desktop_sessions_enabled | default([]))"
|
||||
Reference in New Issue
Block a user