From 2eec2e410c29449e2c0d08ea9a65a6a06f9a63b6 Mon Sep 17 00:00:00 2001
From: Jens Nolte <jens@nightmarestudio.de>
Date: Sat, 18 Apr 2020 01:56:35 +0200
Subject: [PATCH] Remove legacy configuration preset

Configuration is now possible via cli arguments, so it is no longer
necessary to include my personal configuration.
---
 src/QBar/Cli.hs           |  3 +--
 src/QBar/DefaultConfig.hs | 19 -------------------
 2 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/src/QBar/Cli.hs b/src/QBar/Cli.hs
index 13cee76..4a30501 100644
--- a/src/QBar/Cli.hs
+++ b/src/QBar/Cli.hs
@@ -77,8 +77,7 @@ blockParser =
   subparser (
     commandGroup "Available presets:" <>
     metavar "CONFIG..." <>
-    command "default" (info (pure defaultBarConfig) (progDesc "Load default set of blocks.")) <>
-    command "legacy" (info (pure legacyBarConfig) (progDesc "Load the legacy configuration. Requires some custom block scripts."))
+    command "default" (info (pure defaultBarConfig) (progDesc "Load default set of blocks."))
   )
   <|>
   subparser (
diff --git a/src/QBar/DefaultConfig.hs b/src/QBar/DefaultConfig.hs
index 7891a7c..e51da67 100644
--- a/src/QBar/DefaultConfig.hs
+++ b/src/QBar/DefaultConfig.hs
@@ -1,11 +1,8 @@
 module QBar.DefaultConfig where
 
 import QBar.Blocks
-import QBar.BlockOutput
 import QBar.Core
 
-import Pipes
-
 defaultBarConfig :: BarIO ()
 defaultBarConfig = do
   -- TODO: commented-out blocks should be added as soon as they are implemented in qbar
@@ -18,19 +15,3 @@ defaultBarConfig = do
   --addBlock cpuTemperatureBlock
   addBlock networkManagerBlock
 
-legacyBarConfig :: BarIO ()
-legacyBarConfig = do
-  let ram = pollScriptBlock (blockLocation "memory") >-> modify (addIcon "🐏\xFE0E") >-> autoPadding
-  let temperature = (pollScriptBlock $ blockLocation "temperature") >-> autoPadding
-  let volumeBlock = scriptBlock $ blockLocation "volume-pulseaudio -S -F3"
-
-  addBlock dateBlock
-  addBlock batteryBlock
-  addBlock volumeBlock
-  addBlock $ cpuUsageBlock 1
-  addBlock ram
-  addBlock temperature
-  addBlock networkManagerBlock
-  where
-    blockLocation :: String -> FilePath
-    blockLocation name = "~/.config/qbar/blocks/" <> name
-- 
GitLab