From 62be429c6de44dac7651ae57e37574d0b6e57272 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 25 Feb 2020 21:54:42 +0100 Subject: [PATCH] [systemd] revert mako and swayidle to start via sway --- install.conf.yaml | 8 +++----- mako/mako.service | 13 ++++++++----- sway/config | 9 ++++++++- sway/swayidle.service | 9 +++++---- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/install.conf.yaml b/install.conf.yaml index 0341102..3f35e66 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -52,9 +52,7 @@ - link: ~/.config/i3status/config: i3/i3status ~/.local/bin/lock: sway/lock.sh - ~/.config/systemd/user/swayidle.service: sway/swayidle.service ~/.config/mako/config: mako/config - ~/.config/systemd/user/mako.service: mako/mako.service ~/.config/redshift.conf: redshift/redshift.conf ~/.config/redshift/hooks/hook.sh: redshift/hook.sh ~/.config/rofi/config.rasi: rofi/config.rasi @@ -76,9 +74,9 @@ ~/.local/bin/clean: bin/clean.sh # systemd -- shell: - - ["systemctl enable --user mako", "enable mako"] - - ["systemctl enable --user swayidle", "enable swayidle"] +#- shell: +# - ["systemctl enable --user $PWD/mako/mako.service --now", "enable mako"] +# - ["systemctl enable --user $PWD/sway/swayidle.service --now", "enable swayidle"] - shell: - ["git submodule update --init --jobs $(nproc) --recursive", "Installing submodules"] diff --git a/mako/mako.service b/mako/mako.service index e1ffbf2..413cffc 100644 --- a/mako/mako.service +++ b/mako/mako.service @@ -3,9 +3,12 @@ Description=A lightweight Wayland notification daemon Documentation=man:mako(1) PartOf=graphical-session.target -[Service] -Type=simple -ExecStart=/usr/bin/mako - [Install] -WantedBy=sway-session.target +WantedBy=graphical-session.target + +[Service] +Type=dbus +BusName=org.freedesktop.Notifications +ExecStart=/usr/bin/mako +RestartSec=5 +Restart=always diff --git a/sway/config b/sway/config index a718ed8..dccc0b8 100644 --- a/sway/config +++ b/sway/config @@ -28,6 +28,13 @@ output * bg #0C0C0D solid_color exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec nm-applet --indicator exec gnome-keyring-daemon --start --components secrets +exec swayidle -w \ + timeout 285 'notify-send -a lockscreen -c lock-warn -u critical -t 14900 -i system-lock-screen "Locking Screen" "Will Lock Screen in 15s"' \ + timeout 300 '~/.dotfiles/sway/lock.sh' \ + timeout 600 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep '~/.dotfiles/sway/lock.sh' +exec mako exec sleep 2 && QSyncthingTray exec telegram-desktop -startintray exec /usr/lib/geoclue-2.0/demos/agent @@ -81,7 +88,7 @@ bindsym $mod+e exec subl3 bindsym $mod+w exec firefox bindsym $mod+u exec feedreader -# dunst +# mako bindsym $mod+dead_circumflex exec makoctl dismiss bindsym $mod+Shift+dead_circumflex exec makoctl dismiss --all bindsym $mod+grave exec makoctl dismiss diff --git a/sway/swayidle.service b/sway/swayidle.service index 261dc75..cc0c063 100644 --- a/sway/swayidle.service +++ b/sway/swayidle.service @@ -1,7 +1,9 @@ [Unit] Description=Idle manager for Wayland Documentation=man:swayidle(1) -PartOf=graphical-session.target + +[Install] +WantedBy=graphical-session.target [Service] Type=simple @@ -11,6 +13,5 @@ ExecStart=/usr/bin/swayidle -w \ timeout 600 'swaymsg "output * dpms off"' \ resume 'swaymsg "output * dpms on"' \ before-sleep '~/.dotfiles/sway/lock.sh' - -[Install] -WantedBy=sway-session.target \ No newline at end of file +RestartSec=5 +Restart=always