diff --git a/src/QBar/DefaultConfig.hs b/src/QBar/DefaultConfig.hs index dba836d7b20f662ab79e5264fafdabb860cf68ff..bcea4e8790edf9ec2a5a0311ac773ed56beed25e 100644 --- a/src/QBar/DefaultConfig.hs +++ b/src/QBar/DefaultConfig.hs @@ -6,18 +6,21 @@ import QBar.Core import Control.Concurrent.Async import Pipes +blockLocation :: String -> FilePath +blockLocation name = "~/.config/qbar/blocks/" <> name + generateDefaultBarConfig :: BarUpdateChannel -> IO [BlockProducer] generateDefaultBarConfig barUpdateChannel = do (systemInfoInterval, systemInfoIntervalTask) <- sharedInterval barUpdateChannel 10 link systemInfoIntervalTask - --let irc = (systemInfoInterval $ blockScript "/home/jens/run/blocks/irc") - let todo = (systemInfoInterval $ blockScript "/home/jens/run/blocks/todo") - let wifi = (systemInfoInterval $ blockScript "/home/jens/run/blocks/wifi2 wlan") >-> modify (addIcon "📡") - let networkEnvironment = (systemInfoInterval $ blockScript "/home/jens/run/blocks/network-environment") - let cpu = (systemInfoInterval $ blockScript "/home/jens/run/blocks/cpu_usage") >-> modify (setBlockName "cpu" . addIcon "💻") >-> autoPadding - let ram = (systemInfoInterval $ blockScript "/home/jens/run/blocks/memory") >-> modify (addIcon "ðŸ") >-> autoPadding - let temperature = (systemInfoInterval $ blockScript "/home/jens/run/blocks/temperature") >-> autoPadding - let volumeBlock = startPersistentBlockScript barUpdateChannel "/home/jens/run/blocks/volume-pulseaudio -S -F3" - let battery = (systemInfoInterval $ blockScript "/home/jens/run/blocks/battery2") + --let irc = (systemInfoInterval $ blockScript "irc") + let todo = (systemInfoInterval $ blockScript $ blockLocation "todo") + let wifi = (systemInfoInterval $ blockScript $ blockLocation "wifi2 wlan") >-> modify (addIcon "📡") + let networkEnvironment = (systemInfoInterval $ blockScript $ blockLocation "network-environment") + let cpu = (systemInfoInterval $ blockScript $ blockLocation "cpu_usage") >-> modify (setBlockName "cpu" . addIcon "💻") >-> autoPadding + let ram = (systemInfoInterval $ blockScript $ blockLocation "memory") >-> modify (addIcon "ðŸ") >-> autoPadding + let temperature = (systemInfoInterval $ blockScript $ blockLocation "temperature") >-> autoPadding + let volumeBlock = startPersistentBlockScript barUpdateChannel $ blockLocation "volume-pulseaudio -S -F3" + let battery = (systemInfoInterval $ blockScript $ blockLocation "battery2") let date = dateBlockProducer barUpdateChannel return [todo, wifi, networkEnvironment, cpu, ram, temperature, volumeBlock, battery, date] \ No newline at end of file