add candybar package
This commit is contained in:
parent
9b62c6fdd7
commit
29560e8589
27
pkgs/candybar/candybar.cabal
Normal file
27
pkgs/candybar/candybar.cabal
Normal 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
20
pkgs/candybar/candybar.hs
Normal 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
|
9
pkgs/candybar/default.nix
Normal file
9
pkgs/candybar/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.haskellPackages.developPackage {
|
||||
root = ./.;
|
||||
modifier = drv:
|
||||
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
|
||||
[ cabal-install ]
|
||||
);
|
||||
}
|
|
@ -3,4 +3,5 @@
|
|||
|
||||
{ pkgs ? (import ../nixpkgs.nix) { } }: {
|
||||
# example = pkgs.callPackage ./example { };
|
||||
candybar = pkgs.callPackage ./candybar { };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue