From 159ae86722bc706ff42d4d3e4b0f49ede2f253de Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Mon, 2 May 2022 20:19:04 +0200 Subject: [PATCH] Start sway as a systemd user process again After login on TTY1 sway was started by calling exec sway See also b84d88fc92c6710cff8e294315eb23ceb7ecf40e Co-authored-by: Hendrik Sokolowski --- modules/sway/config/config.d/custom-keybindings.conf | 2 +- modules/sway/default.nix | 1 + modules/terminal-life/zsh/default.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 5faddece..d5887e3e 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -37,7 +37,7 @@ set $mode_system (l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutd bindsym $mod+0 mode "$mode_system" mode "$mode_system" { bindsym l exec swaylock-bg, mode "default" - bindsym e exec swaymsg exit, mode "default" + bindsym e exec systemctl --user stop graphical-session.target, mode "default" bindsym s exec systemctl suspend, mode "default" bindsym h exec systemctl hibernate, mode "default" bindsym r exec systemctl reboot, mode "default" diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 83f407e4..35013dd2 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -86,6 +86,7 @@ in #programs.waybar.systemd.enable = true; systemd.user.services.mako = import ./mako.service.nix pkgs; + systemd.user.services.sway = import ./sway.service.nix pkgs; systemd.user.services.swayidle = import ./swayidle.service.nix pkgs; systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs; systemd.user.services.waybar = import ./waybar.service.nix pkgs; diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 91bb422c..5cc81ca8 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -19,7 +19,7 @@ in }; loginExtra = '' - [ "$(tty)" = "/dev/tty1" ] && exec sway + [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.sway-service}/bin/sway-service ''; shellAliases = {