summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/xmobar
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-12-05 16:56:41 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-12-05 16:58:32 +0100
commite019e80eac1b03a5c177ef5d358b720bdbc774ac (patch)
treef2d86a62a62af8f2233c80c115b4943a379996dc /accounts/gkleen@sif/xmobar
parent73875ac457ec19f1cabb3d343e0c44c1b1171f3d (diff)
downloadnixos-e019e80eac1b03a5c177ef5d358b720bdbc774ac.tar
nixos-e019e80eac1b03a5c177ef5d358b720bdbc774ac.tar.gz
nixos-e019e80eac1b03a5c177ef5d358b720bdbc774ac.tar.bz2
nixos-e019e80eac1b03a5c177ef5d358b720bdbc774ac.tar.xz
nixos-e019e80eac1b03a5c177ef5d358b720bdbc774ac.zip
gkleen@sif: taffybar
Diffstat (limited to 'accounts/gkleen@sif/xmobar')
-rw-r--r--accounts/gkleen@sif/xmobar/default.nix7
-rw-r--r--accounts/gkleen@sif/xmobar/nixpkgs.nix9
-rw-r--r--accounts/gkleen@sif/xmobar/package.yaml13
-rw-r--r--accounts/gkleen@sif/xmobar/shell.nix28
-rw-r--r--accounts/gkleen@sif/xmobar/stack.nix17
-rw-r--r--accounts/gkleen@sif/xmobar/stack.yaml10
-rw-r--r--accounts/gkleen@sif/xmobar/stack.yaml.lock12
-rw-r--r--accounts/gkleen@sif/xmobar/stackage.nix31
-rw-r--r--accounts/gkleen@sif/xmobar/xmobar-yggdrasil.nix13
-rw-r--r--accounts/gkleen@sif/xmobar/xmobar.hs54
10 files changed, 0 insertions, 194 deletions
diff --git a/accounts/gkleen@sif/xmobar/default.nix b/accounts/gkleen@sif/xmobar/default.nix
deleted file mode 100644
index fcac5e60..00000000
--- a/accounts/gkleen@sif/xmobar/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
1argumentPackages@{ ... }:
2
3let
4 # defaultPackages = (import ./stackage.nix {});
5 # haskellPackages = defaultPackages // argumentPackages;
6 haskellPackages = argumentPackages;
7in haskellPackages.callPackage ./xmobar-yggdrasil.nix {}
diff --git a/accounts/gkleen@sif/xmobar/nixpkgs.nix b/accounts/gkleen@sif/xmobar/nixpkgs.nix
deleted file mode 100644
index 783ede00..00000000
--- a/accounts/gkleen@sif/xmobar/nixpkgs.nix
+++ /dev/null
@@ -1,9 +0,0 @@
1{ nixpkgs ? import <nixpkgs>
2}:
3
4import ((nixpkgs {}).fetchFromGitHub {
5 owner = "NixOS";
6 repo = "nixpkgs";
7 rev = "10e61bf5be57736035ec7a804cb0bf3d083bf2cf";
8 sha256 = "0fplfm2zx4vk7gs8bdcxnvzkdmpx2w0llqwf8475z9dz9cl132rm";
9})
diff --git a/accounts/gkleen@sif/xmobar/package.yaml b/accounts/gkleen@sif/xmobar/package.yaml
deleted file mode 100644
index b638b6ac..00000000
--- a/accounts/gkleen@sif/xmobar/package.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
1name: xmobar-yggdrasil
2
3executables:
4 xmobar:
5 dependencies:
6 - base
7 - xmobar
8
9 main: xmobar.hs
10 source-dirs:
11 - .
12
13 ghc-options: -threaded
diff --git a/accounts/gkleen@sif/xmobar/shell.nix b/accounts/gkleen@sif/xmobar/shell.nix
deleted file mode 100644
index 16beb322..00000000
--- a/accounts/gkleen@sif/xmobar/shell.nix
+++ /dev/null
@@ -1,28 +0,0 @@
1{ nixpkgs ? import ./nixpkgs.nix {} }:
2
3let
4 inherit (nixpkgs {}) pkgs;
5 haskellPackages = import ./stackage.nix { inherit nixpkgs; };
6
7 drv = haskellPackages.callPackage ./xmobar-yggdrasil.nix {};
8 override = oldAttrs: {
9 nativeBuildInputs = oldAttrs.nativeBuildInputs ++ (with pkgs; []) ++ (with haskellPackages; [ stack cabal-install cabal2nix ]);
10 shellHook = ''
11 export PROMPT_INFO="${oldAttrs.name}"
12
13 if [ -n "$ZSH_VERSION" ]; then
14 autoload -U +X compinit && compinit
15 autoload -U +X bashcompinit && bashcompinit
16 fi
17 eval "$(stack --bash-completion-script stack)"
18
19 ${oldAttrs.shellHook}
20 '';
21 };
22
23 dummy = pkgs.stdenv.mkDerivation {
24 name = "interactive-xmobar-environment";
25 shellHook = "";
26 };
27in pkgs.lib.overrideDerivation dummy override
28 #pkgs.lib.overrideDerivation drv.env override
diff --git a/accounts/gkleen@sif/xmobar/stack.nix b/accounts/gkleen@sif/xmobar/stack.nix
deleted file mode 100644
index 17a49e04..00000000
--- a/accounts/gkleen@sif/xmobar/stack.nix
+++ /dev/null
@@ -1,17 +0,0 @@
1{ ghc, nixpkgs ? import ./nixpkgs.nix {} }:
2
3let
4 haskellPackages = import ./stackage.nix { inherit nixpkgs; };
5 inherit (nixpkgs {}) pkgs;
6in pkgs.haskell.lib.buildStackProject {
7 inherit ghc;
8 inherit (haskellPackages) stack;
9 name = "stackenv";
10 buildInputs = (with pkgs;
11 [ xorg.libX11 xorg.libXrandr xorg.libXinerama xorg.libXScrnSaver xorg.libXext xorg.libXft
12 cairo
13 glib
14 ]) ++ (with haskellPackages;
15 [
16 ]);
17}
diff --git a/accounts/gkleen@sif/xmobar/stack.yaml b/accounts/gkleen@sif/xmobar/stack.yaml
deleted file mode 100644
index b8ed1147..00000000
--- a/accounts/gkleen@sif/xmobar/stack.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
1nix:
2 enable: true
3 shell-file: stack.nix
4
5resolver: lts-13.21
6
7packages:
8 - .
9
10extra-deps: []
diff --git a/accounts/gkleen@sif/xmobar/stack.yaml.lock b/accounts/gkleen@sif/xmobar/stack.yaml.lock
deleted file mode 100644
index fcc2f5f3..00000000
--- a/accounts/gkleen@sif/xmobar/stack.yaml.lock
+++ /dev/null
@@ -1,12 +0,0 @@
1# This file was autogenerated by Stack.
2# You should not edit this file by hand.
3# For more information, please see the documentation at:
4# https://docs.haskellstack.org/en/stable/lock_files
5
6packages: []
7snapshots:
8- completed:
9 size: 498180
10 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/21.yaml
11 sha256: eff2de19a6d4691ccbf6edc1fba858f1918683047dce0f09adede874bbd2a8f3
12 original: lts-13.21
diff --git a/accounts/gkleen@sif/xmobar/stackage.nix b/accounts/gkleen@sif/xmobar/stackage.nix
deleted file mode 100644
index c162ca2c..00000000
--- a/accounts/gkleen@sif/xmobar/stackage.nix
+++ /dev/null
@@ -1,31 +0,0 @@
1{ nixpkgs ? import ./nixpkgs.nix {}
2, snapshot ? "lts-13.21"
3}:
4
5let
6 stackage = import (fetchTarball {
7 url = "https://stackage.serokell.io/zb36jsy3r5h4ydz0pnp00g9vk94dvv03-stackage/default.nix.tar.gz";
8 sha256 = "0h6f80gds0ds77y51hhiadh2h2k8njqq8n0gayp729ana9m9agma";
9 });
10
11 overlays =
12 [ stackage."${snapshot}"
13 (self: super: {
14 haskell = super.haskell // {
15 packages = super.haskell.packages // {
16 "${snapshot}" = super.haskell.packages."${snapshot}".override {
17 overrides = hself: hsuper: {
18 zip-archive = self.haskell.lib.overrideCabal hsuper.zip-archive (old: {
19 testToolDepends = old.testToolDepends ++ (with self; [ unzip which ]);
20 });
21 alex = self.haskell.lib.dontCheck hsuper.alex;
22 };
23 };
24 };
25 };
26 }
27 )
28 ];
29
30 inherit (nixpkgs { inherit overlays; }) pkgs;
31in pkgs.haskell.packages."${snapshot}"
diff --git a/accounts/gkleen@sif/xmobar/xmobar-yggdrasil.nix b/accounts/gkleen@sif/xmobar/xmobar-yggdrasil.nix
deleted file mode 100644
index 852fb8e5..00000000
--- a/accounts/gkleen@sif/xmobar/xmobar-yggdrasil.nix
+++ /dev/null
@@ -1,13 +0,0 @@
1{ mkDerivation, base, hpack, lib, xmobar }:
2mkDerivation {
3 pname = "xmobar-yggdrasil";
4 version = "0.0.0";
5 src = ./.;
6 isLibrary = false;
7 isExecutable = true;
8 libraryToolDepends = [ hpack ];
9 executableHaskellDepends = [ base xmobar ];
10 preConfigure = "hpack";
11 license = "unknown";
12 hydraPlatforms = lib.platforms.none;
13}
diff --git a/accounts/gkleen@sif/xmobar/xmobar.hs b/accounts/gkleen@sif/xmobar/xmobar.hs
deleted file mode 100644
index 322b4449..00000000
--- a/accounts/gkleen@sif/xmobar/xmobar.hs
+++ /dev/null
@@ -1,54 +0,0 @@
1import Xmobar
2
3import Data.List (intercalate)
4
5
6main :: IO ()
7main = xmobar config
8 where
9 config = defaultConfig
10 { font = "xft:FiraCode Nerd Font Mono:style=Regular:pixelsize=21"
11 , position = OnScreen 0 $ TopP 0 307
12 , bgColor = "black"
13 , fgColor = "#808080"
14 , overrideRedirect = False
15 , template =
16 let left = intercalate " | "
17 [ "%XMonadWorkspaces%"
18 , "%XMonadLayout%"
19 , "%XMonadTitle%"
20 ]
21 right = intercalate " | "
22 [ {- "%status%"
23 , -} "%battery%"
24 , "%kbd%"
25 , "%worktime%"
26 , "%worktime-today%"
27 , "%date%"
28 , "%weekdate%"
29 , "%time%"
30 ]
31 in left <> "}{" <> right
32 , commands =
33 [ Run $ NamedXPropertyLog "_XMONAD_WORKSPACES" "XMonadWorkspaces"
34 , Run $ NamedXPropertyLog "_XMONAD_LAYOUT" "XMonadLayout"
35 , Run $ NamedXPropertyLog "_XMONAD_TITLE" "XMonadTitle"
36 , Run $ Date "%Y-%m-%d" "date" 500
37 , Run $ Date "W%V-%u" "weekdate" 500
38 , Run $ Date "%H:%M:%S%Ez" "time" 2
39 , Run $ Com "worktime" [] "worktime" 1500
40 , Run $ Com "worktime" ["today"] "worktime-today" 1500
41 , Run $ Com "ssh" ["status.odin"] "status" 600
42 , Run $ Kbd [("us(dvp)", "dvp")]
43 , Run $ Battery
44 [ "--template", "<watts> <left> (<timeleft>) AC <acstatus>"
45 , "--suffix", "On"
46 , "--Low", "10"
47 , "--High", "80"
48 , "--low", "darkred"
49 , "--normal", "darkorange"
50 , "--high", "darkgreen"
51 , "-p", "3"
52 ] 50
53 ]
54 }