haskell things
This commit is contained in:
parent
ab508dbcb9
commit
6687b0ff4a
3 changed files with 18 additions and 5 deletions
|
@ -36,7 +36,13 @@
|
|||
devShells."x86_64-linux".default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.haskellPackages.ghcWithPackages
|
||||
(pkgs: with pkgs; [xmonad xmonad-contrib xmobar]))
|
||||
(pkgs:
|
||||
with pkgs; [
|
||||
xmonad
|
||||
xmonad-contrib
|
||||
xmobar
|
||||
statgrab
|
||||
]))
|
||||
pkgs.haskell-language-server
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Xmobar
|
||||
import System.Statgrab
|
||||
|
||||
-- TODOS:
|
||||
-- - custom cpu module
|
||||
|
@ -10,12 +11,14 @@ import Xmobar
|
|||
-- - mail/message monitoring
|
||||
-- - if possible, different bars per workspace
|
||||
|
||||
data CustomCpu = CustomCpu
|
||||
data CustomCpu = CustomCpu
|
||||
deriving (Read, Show)
|
||||
|
||||
instance Exec CustomCpu where
|
||||
alias CustomCpu = "cpu"
|
||||
run CustomCpu = return "meow"
|
||||
run CustomCpu = do
|
||||
-- return (show :: IO String (snapshot :: Stats CPUPercent))
|
||||
return "meow"
|
||||
|
||||
fc code content = "<fc=" ++ code ++ ">" ++ content ++ "</fc>"
|
||||
|
||||
|
@ -31,7 +34,7 @@ config =
|
|||
bgColor = "#282828",
|
||||
fgColor = "#ebdbb2",
|
||||
commands =
|
||||
[ Run $ Memory ["t", "Mem: <usedratio>%"] 10,
|
||||
[ Run $ Xmobar.Memory ["t", "Mem: <usedratio>%"] 10,
|
||||
Run $ CustomCpu,
|
||||
Run $ Date (icon "\983277" ++ " %Y" ++ sep "-" ++ "%m" ++ sep "-" ++ "%d " ++ icon "\988236" ++ " %H" ++ sep ":" ++ "%M" ++ sep ":" ++ "%S ") "date" 10
|
||||
],
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs: with pkgs; [xmobar]);
|
||||
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
|
||||
with pkgs; [
|
||||
xmobar
|
||||
statgrab
|
||||
]);
|
||||
in {
|
||||
home.packages = [xmobarGhc pkgs.xmonadctl];
|
||||
programs.xmobar = {
|
||||
|
|
Loading…
Reference in a new issue