From 4d0b092f9b8b69832729022cf6b7f3c303389b4c Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 8 Apr 2023 14:40:44 +0530 Subject: [PATCH] start kanshi and swayidle independent of sway/hyprland --- home/wm/addon/kanshi.nix | 1 + home/wm/addon/swayidle.nix | 1 + home/wm/hyprland/default.nix | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/home/wm/addon/kanshi.nix b/home/wm/addon/kanshi.nix index 09431d6..9c56945 100644 --- a/home/wm/addon/kanshi.nix +++ b/home/wm/addon/kanshi.nix @@ -1,6 +1,7 @@ { ... }: { services.kanshi = { enable = true; + systemdTarget = "graphical-session.target"; profiles = { undocked = { outputs = [ diff --git a/home/wm/addon/swayidle.nix b/home/wm/addon/swayidle.nix index bbd70ea..fe0e2c3 100644 --- a/home/wm/addon/swayidle.nix +++ b/home/wm/addon/swayidle.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { services.swayidle = { enable = true; + systemdTarget = "graphical-session.target"; events = [ { event = "before-sleep"; diff --git a/home/wm/hyprland/default.nix b/home/wm/hyprland/default.nix index 768eea7..67815fe 100644 --- a/home/wm/hyprland/default.nix +++ b/home/wm/hyprland/default.nix @@ -110,8 +110,6 @@ in exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 exec-once = ${hyprctl} setcursor ${config.gtk.cursorTheme.name} 24 - exec-once = systemctl --user start kanshi.service - exec-once = systemctl --user start swayidle.service exec-once = ${change-wallpaper} bindm = SUPER,mouse:272, movewindow @@ -122,8 +120,10 @@ in bind = SUPER_SHIFT,F, fullscreen,0 bind = SUPER_SHIFT,C, exec, ${hyprctl} reload - bind = SUPER_SHIFT,C, exec, systemctl --user restart waybar.service + bind = SUPER_SHIFT,C, exec, systemctl --user restart swayidle.service bind = SUPER_SHIFT,C, exec, systemctl --user restart kanshi.service + bind = SUPER_SHIFT,C, exec, systemctl --user reload waybar.service + bind = SUPER,Return, exec, ${kitty} ${tmux} new bind = SUPER_SHIFT,Return, exec, ${kitty} bind = SUPER,d, exec, ${rofi} -show drun