diff --git a/pkgs/candybar/candybar.cabal b/pkgs/candybar/candybar.cabal new file mode 100644 index 0000000..e002219 --- /dev/null +++ b/pkgs/candybar/candybar.cabal @@ -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 diff --git a/pkgs/candybar/candybar.hs b/pkgs/candybar/candybar.hs new file mode 100644 index 0000000..348f5aa --- /dev/null +++ b/pkgs/candybar/candybar.hs @@ -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: %"] 10, + Run $ Kbd [], + Run $ Date "%a %_d %b %Y %H:%M:%S" "date" 10 + ], + template = "%XMonadLog% }{ %kbd% | %date% | %memory%", + alignSep = "}{" + } + +main :: IO () +main = xmobar config -- or: configFromArgs config >>= xmobar diff --git a/pkgs/candybar/default.nix b/pkgs/candybar/default.nix new file mode 100644 index 0000000..53db48d --- /dev/null +++ b/pkgs/candybar/default.nix @@ -0,0 +1,9 @@ +{ pkgs }: + +pkgs.haskellPackages.developPackage { + root = ./.; + modifier = drv: + pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages; + [ cabal-install ] + ); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 8c5e910..1f8f311 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -3,4 +3,5 @@ { pkgs ? (import ../nixpkgs.nix) { } }: { # example = pkgs.callPackage ./example { }; + candybar = pkgs.callPackage ./candybar { }; }