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 {
|
devShells."x86_64-linux".default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(pkgs.haskellPackages.ghcWithPackages
|
(pkgs.haskellPackages.ghcWithPackages
|
||||||
(pkgs: with pkgs; [xmonad xmonad-contrib xmobar]))
|
(pkgs:
|
||||||
|
with pkgs; [
|
||||||
|
xmonad
|
||||||
|
xmonad-contrib
|
||||||
|
xmobar
|
||||||
|
statgrab
|
||||||
|
]))
|
||||||
pkgs.haskell-language-server
|
pkgs.haskell-language-server
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import Xmobar
|
import Xmobar
|
||||||
|
import System.Statgrab
|
||||||
|
|
||||||
-- TODOS:
|
-- TODOS:
|
||||||
-- - custom cpu module
|
-- - custom cpu module
|
||||||
|
@ -15,7 +16,9 @@ data CustomCpu = CustomCpu
|
||||||
|
|
||||||
instance Exec CustomCpu where
|
instance Exec CustomCpu where
|
||||||
alias CustomCpu = "cpu"
|
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>"
|
fc code content = "<fc=" ++ code ++ ">" ++ content ++ "</fc>"
|
||||||
|
|
||||||
|
@ -31,7 +34,7 @@ config =
|
||||||
bgColor = "#282828",
|
bgColor = "#282828",
|
||||||
fgColor = "#ebdbb2",
|
fgColor = "#ebdbb2",
|
||||||
commands =
|
commands =
|
||||||
[ Run $ Memory ["t", "Mem: <usedratio>%"] 10,
|
[ Run $ Xmobar.Memory ["t", "Mem: <usedratio>%"] 10,
|
||||||
Run $ CustomCpu,
|
Run $ CustomCpu,
|
||||||
Run $ Date (icon "\983277" ++ " %Y" ++ sep "-" ++ "%m" ++ sep "-" ++ "%d " ++ icon "\988236" ++ " %H" ++ sep ":" ++ "%M" ++ sep ":" ++ "%S ") "date" 10
|
Run $ Date (icon "\983277" ++ " %Y" ++ sep "-" ++ "%m" ++ sep "-" ++ "%d " ++ icon "\988236" ++ " %H" ++ sep ":" ++ "%M" ++ sep ":" ++ "%S ") "date" 10
|
||||||
],
|
],
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs: with pkgs; [xmobar]);
|
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
|
||||||
|
with pkgs; [
|
||||||
|
xmobar
|
||||||
|
statgrab
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
home.packages = [xmobarGhc pkgs.xmonadctl];
|
home.packages = [xmobarGhc pkgs.xmonadctl];
|
||||||
programs.xmobar = {
|
programs.xmobar = {
|
||||||
|
|
Loading…
Reference in a new issue