Enable emptty for Void desktops

This commit is contained in:
Fabio Scotto di Santolo
2026-03-28 15:47:55 +01:00
parent 64a28d2d73
commit 93af57f401
8 changed files with 85 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ desktop_manage_icloud_keyring: false
desktop_protonmail_bridge_cert_path: ~/.var/app/ch.protonmail.protonmail-bridge/config/protonmail/bridge-v3/cert.pem desktop_protonmail_bridge_cert_path: ~/.var/app/ch.protonmail.protonmail-bridge/config/protonmail/bridge-v3/cert.pem
profile_packages: profile_packages:
- emptty
- i3 - i3
- i3blocks - i3blocks
- i3blocks-blocklets - i3blocks-blocklets

View File

@@ -28,6 +28,7 @@ void_packages_base:
enabled_services: enabled_services:
- dbus - dbus
- elogind - elogind
- emptty
- NetworkManager - NetworkManager
- ufw - ufw
- bluetoothd - bluetoothd

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=i3
Comment=improved dynamic tiling window manager
Exec=i3
TryExec=i3
Type=Application
DesktopNames=i3
Keywords=tiling;wm;windowmanager;window;manager;

View File

@@ -0,0 +1,5 @@
---
- name: Restart emptty
ansible.builtin.command: sv restart emptty
changed_when: true
when: not ansible_check_mode

View File

@@ -96,6 +96,46 @@
line: "password optional pam_gnome_keyring.so use_authtok" line: "password optional pam_gnome_keyring.so use_authtok"
state: present state: present
- name: Ensure emptty log directory exists
tags: [packages, services, emptty]
ansible.builtin.file:
path: /var/log/emptty
state: directory
owner: root
group: root
mode: "0755"
- name: Ensure emptty session directories exist
tags: [packages, services, emptty]
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "0755"
loop:
- /etc/emptty/xsessions
- /etc/emptty/wayland-sessions
- name: Install allowed emptty X11 sessions
tags: [packages, services, emptty]
ansible.builtin.copy:
src: i3.desktop
dest: /etc/emptty/xsessions/i3.desktop
owner: root
group: root
mode: "0644"
- name: Configure emptty
tags: [packages, services, emptty]
ansible.builtin.template:
src: emptty-conf.j2
dest: /etc/emptty/conf
owner: root
group: root
mode: "0644"
notify: Restart emptty
- name: Copy desktop dotfiles - name: Copy desktop dotfiles
tags: [dotfiles, dotfiles:desktop] tags: [dotfiles, dotfiles:desktop]
ansible.builtin.copy: ansible.builtin.copy:

View File

@@ -0,0 +1,12 @@
TTY_NUMBER=7
SWITCH_TTY=true
DEFAULT_ENV=xorg
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
LOGGING=rotate
SESSION_ERROR_LOGGING=disabled

View File

@@ -4,7 +4,3 @@
# Get the aliases and functions # Get the aliases and functions
[ -f $HOME/.bashrc ] && . $HOME/.bashrc [ -f $HOME/.bashrc ] && . $HOME/.bashrc
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
exec startx
fi

View File

@@ -1,11 +1,20 @@
#!/bin/sh #!/bin/sh
# dbus session [ $# -gt 0 ] || set -- i3
export XDG_CURRENT_DESKTOP=i3
exec dbus-run-session sh -c " [ -r /etc/profile ] && . /etc/profile
umask 077 [ -r "$HOME/.profile" ] && . "$HOME/.profile"
printf '%s\n' \"\$DBUS_SESSION_BUS_ADDRESS\" > \"\$HOME/.dbus-session-bus-address\"
eval \$(ssh-agent -s) session_name=${1##*/}
gpgconf --launch gpg-agent
exec i3 export XDG_CURRENT_DESKTOP="$session_name"
" export XDG_SESSION_DESKTOP="$session_name"
export XDG_SESSION_TYPE=x11
exec dbus-run-session sh -eu -c '
umask 077
printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$HOME/.dbus-session-bus-address"
eval "$(ssh-agent -s)" >/dev/null
gpgconf --launch gpg-agent
exec "$@"
' sh "$@"