add candybar package

This commit is contained in:
♥ Minnie ♥ 2023-04-25 08:13:04 +08:00
parent 9b62c6fdd7
commit 29560e8589
4 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,27 @@
cabal-version: 3.0
name: candybar
version: 0.1.0.0
-- synopsis:
-- description:
license: BSD-3-Clause
-- license-file: LICENSE
author: sajenim
maintainer: its.jassy@pm.me
-- copyright:
build-type: Simple
-- extra-doc-files: CHANGELOG.md
-- extra-source-files:
common warnings
ghc-options: -Wall
-threaded
executable candybar
import: warnings
main-is: candybar.hs
-- other-modules:
-- other-extensions:
build-depends: base,
xmobar
hs-source-dirs: .
default-language: Haskell2010

20
pkgs/candybar/candybar.hs Normal file
View file

@ -0,0 +1,20 @@
import Xmobar
config :: Config
config =
defaultConfig
{ font = "DejaVu Sans Mono 9",
allDesktops = True,
alpha = 200,
commands =
[ Run XMonadLog,
Run $ Memory ["t", "Mem: <usedratio>%"] 10,
Run $ Kbd [],
Run $ Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10
],
template = "%XMonadLog% }{ %kbd% | %date% | %memory%",
alignSep = "}{"
}
main :: IO ()
main = xmobar config -- or: configFromArgs config >>= xmobar

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

@ -3,4 +3,5 @@
{ pkgs ? (import ../nixpkgs.nix) { } }: {
# example = pkgs.callPackage ./example { };
candybar = pkgs.callPackage ./candybar { };
}