xmobar-config

This commit is contained in:
♥ Minnie ♥ 2023-04-25 21:28:53 +08:00
parent 061583c342
commit d8e21e872a
6 changed files with 55 additions and 48 deletions

View file

@ -0,0 +1,9 @@
{ pkgs }:
pkgs.haskellPackages.developPackage {
root = ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[ cabal-install ]
);
}

View file

@ -0,0 +1,30 @@
import Xmobar
import System.Environment (getEnv)
import System.IO.Unsafe (unsafeDupablePerformIO)
-- | Candybar
config :: Config
config = defaultConfig
-- general settings
{ font = "Fira Code Semi Bold 9"
, additionalFonts = [ ]
, bgColor = "#282828"
, fgColor = "#d4be98"
, position = Static { xpos = 1920, ypos = 0, width = 2560, height = 24 }
, iconRoot = homeDir <> "/.config/xmonad/icons"
-- commands to run
, commands =
[ Run $ XMonadLog
]
-- format our bar
, sepChar = "%"
, alignSep = "}{"
, template = "\59255 %XMonadLog%"
}
-- | Get home directory
homeDir :: String
homeDir = unsafeDupablePerformIO (getEnv "HOME")
main :: IO ()
main = configFromArgs config >>= xmobar

View file

@ -0,0 +1,24 @@
cabal-version: 3.0
name: xmobar-config
version: 0.1.0.0
description: xmobar configs
author: sajenim
maintainer: its.jassy@pm.me
license: BSD-3-Clause
build-type: Simple
executable xmobar-top
main-is: xmobar-top.hs
hs-source-dirs: src
ghc-options: -Wall -threaded
build-depends: base,
xmobar
default-language: Haskell2010
-- executable xmobar-bottom
-- main-is: xmobar-bottom.hs
-- hs-source-dirs: src
-- ghc-options: -Wall -threaded
-- build-depends: base,
-- xmobar
-- default-language: Haskell2010