From 5ea91d02ef3213fce28b163e50b23574a39936e6 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 7 Jul 2018 09:57:54 -0700 Subject: [PATCH] [taffybar] Change taffybar service to Type=notify This makes it so that SNITray services that are listed as after will always see that there is an SNW as well as a SNH at startup and WILL display. --- dotfiles/config/systemd/user/taffybar.service | 7 ++++--- dotfiles/config/taffybar/taffybar | 2 +- dotfiles/config/taffybar/taffybar.hs | 8 +++++++- 3 files changed, 12 insertions(+), 5 deletions(-) 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")