From 3b36a1eabcc2dea597714ee53672d1148c743664 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Thu, 17 Sep 2026 15:05:35 +0100 Subject: Start chat clients with the Sway session --- dot_config/sway/config | 4 ++-- dot_config/systemd/user/mattermost.service | 16 ++++++++++++++++ dot_config/systemd/user/nheko@.service | 14 ++++++++++++++ dot_config/systemd/user/sway-session.target | 2 +- dot_config/systemd/user/whatsie.service | 16 ++++++++++++++++ dot_config/waybar/config.jsonc | 3 +++ 6 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 dot_config/systemd/user/mattermost.service create mode 100644 dot_config/systemd/user/nheko@.service create mode 100644 dot_config/systemd/user/whatsie.service (limited to 'dot_config') diff --git a/dot_config/sway/config b/dot_config/sway/config index 62e23c3..11125ab 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -256,8 +256,8 @@ bindsym $mod+t exec ~/.config/sway/tb-toggle.sh # as waybar modules printing different output from the same script run # interactively. PATH is the critical one; GNUPGHOME / GPG_TTY keep # pass-otp + pinentry consistent with the interactive shell. -exec systemctl --user import-environment PATH DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR GNUPGHOME GPG_TTY -exec dbus-update-activation-environment --systemd PATH DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR GNUPGHOME GPG_TTY +exec systemctl --user import-environment PATH DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP XDG_DATA_DIRS PASSWORD_STORE_DIR GNUPGHOME GPG_TTY +exec dbus-update-activation-environment --systemd PATH DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP XDG_DATA_DIRS PASSWORD_STORE_DIR GNUPGHOME GPG_TTY exec "sleep 2 && ~/.config/sway/display-toggle.sh apply" exec systemctl --user start sway-session.target exec ~/.config/sway/tb-autostart.sh diff --git a/dot_config/systemd/user/mattermost.service b/dot_config/systemd/user/mattermost.service new file mode 100644 index 0000000..e6bda87 --- /dev/null +++ b/dot_config/systemd/user/mattermost.service @@ -0,0 +1,16 @@ +[Unit] +Description=Mattermost Desktop (flatpak) +PartOf=graphical-session.target +After=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY + +[Service] +Type=simple +ExecStart=/usr/bin/flatpak run com.mattermost.Desktop +ExecStop=/usr/bin/flatpak kill com.mattermost.Desktop +Restart=on-failure +RestartSec=5s +TimeoutStopSec=10s + +[Install] +WantedBy=sway-session.target diff --git a/dot_config/systemd/user/nheko@.service b/dot_config/systemd/user/nheko@.service new file mode 100644 index 0000000..656f333 --- /dev/null +++ b/dot_config/systemd/user/nheko@.service @@ -0,0 +1,14 @@ +[Unit] +Description=Nheko Matrix client (%i profile) +PartOf=graphical-session.target +After=graphical-session.target waybar.service +ConditionEnvironment=DISPLAY + +[Service] +Type=simple +ExecStart=/usr/bin/flatpak run --die-with-parent im.nheko.Nheko --profile %i +Restart=on-failure +RestartSec=5s + +[Install] +WantedBy=sway-session.target diff --git a/dot_config/systemd/user/sway-session.target b/dot_config/systemd/user/sway-session.target index 2c31361..e05f2b6 100644 --- a/dot_config/systemd/user/sway-session.target +++ b/dot_config/systemd/user/sway-session.target @@ -2,5 +2,5 @@ Description=sway compositor session Documentation=man:systemd.special(7) BindsTo=graphical-session.target -Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service waybar.service signal.service +Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service waybar.service signal.service mattermost.service nheko@personal.service nheko@work.service whatsie.service After=graphical-session-pre.target diff --git a/dot_config/systemd/user/whatsie.service b/dot_config/systemd/user/whatsie.service new file mode 100644 index 0000000..01d5b81 --- /dev/null +++ b/dot_config/systemd/user/whatsie.service @@ -0,0 +1,16 @@ +[Unit] +Description=WhatSie (flatpak) +PartOf=graphical-session.target +After=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY + +[Service] +Type=simple +ExecStart=/usr/bin/flatpak run com.ktechpit.whatsie --minimized +ExecStop=/usr/bin/flatpak kill com.ktechpit.whatsie +Restart=on-failure +RestartSec=5s +TimeoutStopSec=10s + +[Install] +WantedBy=sway-session.target diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc index 2dbe4b5..b2a2ba8 100644 --- a/dot_config/waybar/config.jsonc +++ b/dot_config/waybar/config.jsonc @@ -157,6 +157,9 @@ "tray": { "spacing": 8, + "icons": { + "Mattermost_status_icon_1": "com.mattermost.Desktop", + }, }, "idle_inhibitor": { -- cgit v1.3.1