From 97ac64195c65eb1edce7674082896d2bc24f04b3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 9 Jul 2024 18:39:40 +0100 Subject: [PATCH] autorandr: fix automatically switching when a ...monitor is plugged or unplugged --- lib/nixos/modules/autorandr.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/nixos/modules/autorandr.nix b/lib/nixos/modules/autorandr.nix index 72efcc6..ad4dace 100644 --- a/lib/nixos/modules/autorandr.nix +++ b/lib/nixos/modules/autorandr.nix @@ -1,14 +1,4 @@ -{ username, ... }: { - # xdg.configFile."autorandr/postswitch" = { - # executable = true; - # text = '' - # #!/usr/bin/env bash - # - # feh --randomize --bg-scale /home/${username}/Pictures/Wallpaper/*; - # ''; - # }; - services.autorandr = { enable = true; @@ -49,5 +39,9 @@ }; }; }; + + hooks.postswitch = { + "reload-awesome" = ''echo 'awesome.restart()' | awesome-client''; + }; }; }