diff --git a/dotfiles/config/systemd/user/taffybar.service b/dotfiles/config/systemd/user/taffybar.service index caba20a4..7fd218ff 100644 --- a/dotfiles/config/systemd/user/taffybar.service +++ b/dotfiles/config/systemd/user/taffybar.service @@ -4,11 +4,12 @@ Wants=status-notifier-watcher.service After=status-notifier-watcher.service [Service] -Type=simple -ExecStart=/usr/bin/env taffybar -ExecStop=/usr/bin/env pkill taffybar +Type=notify +ExecStart=/usr/bin/env imalison-taffybar +ExecStop=/usr/bin/env pkill imalison-taffybar Restart=always RestartSec=3 +NotifyAccess=all [Install] WantedBy=wm.target diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index 80bc3440..bb275b4f 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit 80bc3440144ad3e8697677fde7480b5501f14f98 +Subproject commit bb275b4fcbd02207b81c2e8265bfe4f5edafc387 diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index b19f93c2..bac9127d 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -23,6 +23,7 @@ import System.Log.Logger import System.Process import System.Taffybar import System.Taffybar.Auth +import System.Taffybar.Context (appendHook) import System.Taffybar.DBus import System.Taffybar.DBus.Toggle import System.Taffybar.Hooks @@ -130,6 +131,7 @@ main = do mem = pollingGraphNew memCfg 1 memCallback layout = layoutNew defaultLayoutConfig windows = windowsNew defaultWindowsConfig + notifySystemD = void $ runCommandFromPath ["systemd-notify", "--ready"] myWorkspacesConfig = defaultWorkspacesConfig { underlineHeight = 3 @@ -171,8 +173,12 @@ main = do -- , startWidgets = [flip widgetSetClass "Workspaces" =<< workspaces] -- } startTaffybar $ + appendHook notifySystemD $ + appendHook (void $ getHost False) $ withBatteryRefresh $ - withLogServer $ withToggleServer $ toTaffyConfig simpleTaffyConfig + withLogServer $ + withToggleServer $ + toTaffyConfig simpleTaffyConfig -- Local Variables: -- flycheck-ghc-args: ("-Wno-missing-signatures")