setup custom xmobar package
This commit is contained in:
parent
1170a10612
commit
5c20a15385
6 changed files with 5 additions and 139 deletions
|
@ -1,13 +0,0 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
xmobar = inputs.xmobar-config.packages.${pkgs.system}.xmobar-config;
|
||||
})
|
||||
];
|
||||
|
||||
home.pkgs = with pkgs; [
|
||||
xmobar
|
||||
];
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688466019,
|
||||
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1689950301,
|
||||
"narHash": "sha256-sUYqHggNUIMuBVOsRoseBn3/tx58yMnMvOM31Rqf9dU=",
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"rev": "92aabc529c4487960c14016b65b3ac7e7e159b13",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1689935543,
|
||||
"narHash": "sha256-6GQ9ib4dA/r1leC5VUpsBo0BmDvNxLjKrX1iyL+h8mc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e43e2448161c0a2c4928abec4e16eae1516571bc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1688049487,
|
||||
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
haskell-flake.url = "github:srid/haskell-flake";
|
||||
};
|
||||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
imports = [ inputs.haskell-flake.flakeModule ];
|
||||
|
||||
perSystem = { self', pkgs, ... }: {
|
||||
|
||||
# Typically, you just want a single project named "default". But
|
||||
# multiple projects are also possible, each using different GHC version.
|
||||
haskellProjects.default = {
|
||||
# If you have a .cabal file in the root, this option is determined
|
||||
# automatically. Otherwise, specify all your local packages here.
|
||||
packages.xmobar-config.root = ./.;
|
||||
|
||||
# The base package set representing a specific GHC version.
|
||||
# By default, this is pkgs.haskellPackages.
|
||||
# You may also create your own. See https://haskell.flake.page/package-set
|
||||
# basePackages = pkgs.haskellPackages;
|
||||
|
||||
# Dependency overrides go here. See https://haskell.flake.page/dependency
|
||||
# source-overrides = { };
|
||||
# overrides = self: super: { };
|
||||
|
||||
# devShell = {
|
||||
# # Enabled by default
|
||||
# enable = true;
|
||||
#
|
||||
# # Programs you want to make available in the shell.
|
||||
# # Default programs can be disabled by setting to 'null'
|
||||
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
|
||||
#
|
||||
# hlsCheck.enable = true;
|
||||
# };
|
||||
};
|
||||
|
||||
# haskell-flake doesn't set the default package, but you can do it here.
|
||||
packages.default = self'.packages.xmobar-config;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
import Xmobar
|
||||
|
||||
-- | Configuration
|
||||
config :: Config
|
||||
config = defaultConfig
|
||||
-- general settings
|
||||
{ font = "Fira Code Semi Bold 9"
|
||||
, additionalFonts = [ "Symbols Nerd Font 2048-em 24" ]
|
||||
, bgColor = bg1
|
||||
, fgColor = fg0
|
||||
, position = Static { xpos = 0, ypos = 0, width = 2560, height = 24 }
|
||||
-- commands to run
|
||||
, commands =
|
||||
[ Run $ XPropertyLog "_XMONAD_LOG_1"
|
||||
, Run $ Com "uname" ["-r","-s"] "" 0
|
||||
, Run $ Date "%a %b %_d %Y <fc=#d8a657>%H:%M:%S</fc>" "date" 10
|
||||
, Run $ Weather "YPJT"
|
||||
[ "-t", "Temp: <fc=#d3869b><tempC>C</fc> <fc=#7c6f64>|</fc> Wind: <fc=#a9b665><windKmh>km/h</fc> <fc=#7c6f64>|</fc> Humidity: <fc=#e78a4e><rh>%</fc>" ]
|
||||
18000
|
||||
]
|
||||
-- format our bar
|
||||
, sepChar = "%"
|
||||
, alignSep = "}{"
|
||||
, template = "<hspace=6/><fn=1>\59255</fn> <fc=#a9b665>%uname%</fc> <fc=#7c6f64>|</fc>%_XMONAD_LOG_1%}{%YPJT% <fc=#7c6f64>|</fc> %date%<hspace=6/>"
|
||||
}
|
||||
|
||||
-- | Gruvbox material
|
||||
bg0, bg1, fg0, fg1, red, orange, yellow, green, aqua, blue, purple :: String
|
||||
-- backgrounds
|
||||
bg0 = "#1d2021"
|
||||
bg1 = "#282828"
|
||||
-- foregrounds
|
||||
fg0 = "#d4be98"
|
||||
fg1 = "#ddc7a1"
|
||||
-- greys
|
||||
grey0 = "#7c6f64"
|
||||
-- colors
|
||||
red = "#ea6962"
|
||||
orange = "#e78a4e"
|
||||
yellow = "#d8a658"
|
||||
green = "#a9b665"
|
||||
aqua = "#89b482"
|
||||
blue = "#7daea3"
|
||||
purple = "#d3869b"
|
||||
|
||||
main :: IO ()
|
||||
main = configFromArgs config >>= xmobar
|
|
@ -1,18 +0,0 @@
|
|||
cabal-version: 3.0
|
||||
name: xmobar-config
|
||||
version: 0.1.0.0
|
||||
synopsis: A Minimalistic Text Based Status Bar
|
||||
description: my xmobar configuration
|
||||
license: BSD-3-Clause
|
||||
author: sajenim
|
||||
maintainer: its.jassy@pm.me
|
||||
build-type: Simple
|
||||
|
||||
executable xmobar-top
|
||||
main-is: xmobar-top.hs
|
||||
hs-source-dirs: src
|
||||
ghc-options: -Wall -threaded
|
||||
build-depends: base,
|
||||
xmobar
|
||||
default-language: Haskell2010
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue