mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-09 17:52:36 +08:00
Add xmobar, WIP
This commit is contained in:
parent
041787d8cd
commit
087ed3974d
10 changed files with 96 additions and 1 deletions
|
|
@ -14,7 +14,8 @@
|
|||
# WMish things
|
||||
./xmonad
|
||||
#./sway.nix
|
||||
./taffybar # Disabled, because it rarely works
|
||||
# ./taffybar # Disabled, because it rarely works
|
||||
./xmobar
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
|||
20
features/desktopish/xmobar/default.nix
Normal file
20
features/desktopish/xmobar/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
xmobarPkg = pkgs.callPackage ./xmobar-srid { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
systemd.user.services.xmobar = {
|
||||
enable = true;
|
||||
description = "Xmobar";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${xmobarPkg}/bin/xmobar-srid";
|
||||
Restart = "on-abnormal";
|
||||
};
|
||||
};
|
||||
|
||||
# Battery widget requires this.
|
||||
services.upower = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
2
features/desktopish/xmobar/xmobar-srid/.gitignore
vendored
Normal file
2
features/desktopish/xmobar/xmobar-srid/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
result
|
||||
dist-newstyle
|
||||
8
features/desktopish/xmobar/xmobar-srid/.vscode/extensions.json
vendored
Normal file
8
features/desktopish/xmobar/xmobar-srid/.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"haskell.haskell",
|
||||
"arrterian.nix-env-selector"
|
||||
]
|
||||
}
|
||||
6
features/desktopish/xmobar/xmobar-srid/.vscode/settings.json
vendored
Normal file
6
features/desktopish/xmobar/xmobar-srid/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"nixEnvSelector.nixShellConfig": "${workspaceRoot}/default.nix",
|
||||
"editor.formatOnType": true,
|
||||
"editor.formatOnSave": true,
|
||||
"nixEnvSelector.nixFile": "${workspaceRoot}/default.nix"
|
||||
}
|
||||
5
features/desktopish/xmobar/xmobar-srid/CHANGELOG.md
Normal file
5
features/desktopish/xmobar/xmobar-srid/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Revision history for xmobar-srid
|
||||
|
||||
## 0.1.0.0 -- YYYY-mm-dd
|
||||
|
||||
* First version. Released on an unsuspecting world.
|
||||
7
features/desktopish/xmobar/xmobar-srid/Main.hs
Normal file
7
features/desktopish/xmobar/xmobar-srid/Main.hs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
module Main where
|
||||
|
||||
import Xmobar
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
xmobarMain
|
||||
2
features/desktopish/xmobar/xmobar-srid/Setup.hs
Normal file
2
features/desktopish/xmobar/xmobar-srid/Setup.hs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
16
features/desktopish/xmobar/xmobar-srid/default.nix
Normal file
16
features/desktopish/xmobar/xmobar-srid/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Since the xmonad config will be built by nixos-rebuild, we use the
|
||||
# nix-channel's nixpkgs.
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
pkgs.haskellPackages.developPackage {
|
||||
name = "xmobar-srid";
|
||||
root = ./.;
|
||||
modifier = drv:
|
||||
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
|
||||
[
|
||||
cabal-install
|
||||
cabal-fmt
|
||||
ghcid
|
||||
haskell-language-server
|
||||
]);
|
||||
overrides = self: super: with pkgs.haskell.lib; { };
|
||||
}
|
||||
28
features/desktopish/xmobar/xmobar-srid/xmobar-srid.cabal
Normal file
28
features/desktopish/xmobar/xmobar-srid/xmobar-srid.cabal
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
cabal-version: >=1.10
|
||||
-- Initial package description 'xmobar-srid.cabal' generated by 'cabal
|
||||
-- init'. For further documentation, see
|
||||
-- http://haskell.org/cabal/users-guide/
|
||||
|
||||
name: xmobar-srid
|
||||
version: 0.1.0.0
|
||||
-- synopsis:
|
||||
-- description:
|
||||
-- bug-reports:
|
||||
-- license:
|
||||
license-file: LICENSE
|
||||
author: Sridhar Ratnakumar
|
||||
maintainer: srid@srid.ca
|
||||
-- copyright:
|
||||
-- category:
|
||||
build-type: Simple
|
||||
extra-source-files: CHANGELOG.md
|
||||
|
||||
executable xmobar-srid
|
||||
main-is: Main.hs
|
||||
-- other-modules:
|
||||
-- other-extensions:
|
||||
build-depends: base >=4.13 && <4.14
|
||||
, xmobar
|
||||
, text
|
||||
-- hs-source-dirs:
|
||||
default-language: Haskell2010
|
||||
Loading…
Add table
Add a link
Reference in a new issue