[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.
This commit is contained in:
Ivan Malison 2018-07-07 09:57:54 -07:00
parent 13a1e642dc
commit 5ea91d02ef
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
3 changed files with 12 additions and 5 deletions

View File

@ -4,11 +4,12 @@ Wants=status-notifier-watcher.service
After=status-notifier-watcher.service After=status-notifier-watcher.service
[Service] [Service]
Type=simple Type=notify
ExecStart=/usr/bin/env taffybar ExecStart=/usr/bin/env imalison-taffybar
ExecStop=/usr/bin/env pkill taffybar ExecStop=/usr/bin/env pkill imalison-taffybar
Restart=always Restart=always
RestartSec=3 RestartSec=3
NotifyAccess=all
[Install] [Install]
WantedBy=wm.target WantedBy=wm.target

@ -1 +1 @@
Subproject commit 80bc3440144ad3e8697677fde7480b5501f14f98 Subproject commit bb275b4fcbd02207b81c2e8265bfe4f5edafc387

View File

@ -23,6 +23,7 @@ import System.Log.Logger
import System.Process import System.Process
import System.Taffybar import System.Taffybar
import System.Taffybar.Auth import System.Taffybar.Auth
import System.Taffybar.Context (appendHook)
import System.Taffybar.DBus import System.Taffybar.DBus
import System.Taffybar.DBus.Toggle import System.Taffybar.DBus.Toggle
import System.Taffybar.Hooks import System.Taffybar.Hooks
@ -130,6 +131,7 @@ main = do
mem = pollingGraphNew memCfg 1 memCallback mem = pollingGraphNew memCfg 1 memCallback
layout = layoutNew defaultLayoutConfig layout = layoutNew defaultLayoutConfig
windows = windowsNew defaultWindowsConfig windows = windowsNew defaultWindowsConfig
notifySystemD = void $ runCommandFromPath ["systemd-notify", "--ready"]
myWorkspacesConfig = myWorkspacesConfig =
defaultWorkspacesConfig defaultWorkspacesConfig
{ underlineHeight = 3 { underlineHeight = 3
@ -171,8 +173,12 @@ main = do
-- , startWidgets = [flip widgetSetClass "Workspaces" =<< workspaces] -- , startWidgets = [flip widgetSetClass "Workspaces" =<< workspaces]
-- } -- }
startTaffybar $ startTaffybar $
appendHook notifySystemD $
appendHook (void $ getHost False) $
withBatteryRefresh $ withBatteryRefresh $
withLogServer $ withToggleServer $ toTaffyConfig simpleTaffyConfig withLogServer $
withToggleServer $
toTaffyConfig simpleTaffyConfig
-- Local Variables: -- Local Variables:
-- flycheck-ghc-args: ("-Wno-missing-signatures") -- flycheck-ghc-args: ("-Wno-missing-signatures")