From 15dc7f68f0c38ff72bacf44a74ee95c557e7627c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Tue, 9 Jun 2020 18:50:09 -0300 Subject: [PATCH] wayland: move waybar and swayidle to services --- wayland/.config/sway/config | 23 +++++++------------ .../share/wayland-services/swayidle/run | 7 ++++++ .../.local/share/wayland-services/waybar/run | 3 +++ 3 files changed, 18 insertions(+), 15 deletions(-) create mode 100755 wayland/.local/share/wayland-services/swayidle/run create mode 100755 wayland/.local/share/wayland-services/waybar/run diff --git a/wayland/.config/sway/config b/wayland/.config/sway/config index 89cdbc2..3023517 100644 --- a/wayland/.config/sway/config +++ b/wayland/.config/sway/config @@ -147,14 +147,7 @@ client.focused $focused_bgcolor $focused_bgcolor $focused_textcolor $focused_ind client.focused_inactive $inactive_bgcolor $inactive_bgcolor $inactive_textcolor $inactive_indicator $inactive_bgcolor client.unfocused $unfocused_bgcolor $unfocused_bgcolor $unfocused_textcolor $unfocused_indicator $unfocused_bgcolor -## Idle configuration -# Automatic behavior -exec swayidle -w \ - timeout 300 'swaylock' \ - timeout 600 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock' -# Manual behavior +## Idle configuratio- manual behavior bindsym $mod+Shift+x exec swaylock bindsym --locked $mod+Mod1+a output * dpms on bindsym --locked $mod+Mod1+z output * dpms off @@ -278,13 +271,13 @@ mode "resize" { bindsym $mod+r mode "resize" ## Status bar -bar { - id mainbar - position top - mode hide - hidden_state hide - swaybar_command waybar -} +# bar { +# id mainbar +# position top +# mode hide +# hidden_state hide +# swaybar_command waybar +# } ## Services directory exec runsvdir-sway diff --git a/wayland/.local/share/wayland-services/swayidle/run b/wayland/.local/share/wayland-services/swayidle/run new file mode 100755 index 0000000..da4de2d --- /dev/null +++ b/wayland/.local/share/wayland-services/swayidle/run @@ -0,0 +1,7 @@ +#!/bin/sh + +exec swayidle -w \ + timeout 300 'swaylock' \ + timeout 600 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock' diff --git a/wayland/.local/share/wayland-services/waybar/run b/wayland/.local/share/wayland-services/waybar/run new file mode 100755 index 0000000..06042c6 --- /dev/null +++ b/wayland/.local/share/wayland-services/waybar/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec waybar