summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-07-21 21:28:27 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-07-21 21:28:27 +0200
commit2e8835e2faa2e68764e55ac68d9240977f83b551 (patch)
treef77f337eef65c5808967f647bc54352d2b41d341 /custom
parent26b1dc2dcd3409a922aae4702fb5853894389ebb (diff)
downloadnixos-2e8835e2faa2e68764e55ac68d9240977f83b551.tar
nixos-2e8835e2faa2e68764e55ac68d9240977f83b551.tar.gz
nixos-2e8835e2faa2e68764e55ac68d9240977f83b551.tar.bz2
nixos-2e8835e2faa2e68764e55ac68d9240977f83b551.tar.xz
nixos-2e8835e2faa2e68764e55ac68d9240977f83b551.zip
dep
Diffstat (limited to 'custom')
-rw-r--r--custom/notify-user.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/custom/notify-user.nix b/custom/notify-user.nix
index e3437ea7..bf03f72f 100644
--- a/custom/notify-user.nix
+++ b/custom/notify-user.nix
@@ -13,9 +13,11 @@ stdenv.mkDerivation {
13 13
14 import Data.List (isPrefixOf) 14 import Data.List (isPrefixOf)
15 15
16 import Control.Monad (forM_)
17
16 main = do 18 main = do
17 envFiles <- glob "/home/${user}/.dbus/session-bus/*" 19 envFiles <- glob "/home/${user}/.dbus/session-bus/*"
18 forM envFiles $ \envFile -> do 20 forM_ envFiles $ \envFile -> do
19 sessionAddr <- snd . break (== '=') . head . filter ("DBUS_SESSION_BUS_ADDRESS=" `isPrefixOf`) . lines <$> readFile envFile 21 sessionAddr <- snd . break (== '=') . head . filter ("DBUS_SESSION_BUS_ADDRESS=" `isPrefixOf`) . lines <$> readFile envFile
20 setEnv "DBUS_SESSION_BUS_ADDRESS" sessionAddr 22 setEnv "DBUS_SESSION_BUS_ADDRESS" sessionAddr
21 callProcess "${libnotify}/bin/notify-send" =<< getArgs 23 callProcess "${libnotify}/bin/notify-send" =<< getArgs