Use eww from repo
This commit is contained in:
parent
56d23a2480
commit
2478135dc5
4 changed files with 68 additions and 9 deletions
47
flake.lock
47
flake.lock
|
@ -2,7 +2,7 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"crane": {
|
"crane": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"ha-now-playing",
|
"ha-now-playing",
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
|
@ -74,7 +74,47 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eww": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": [
|
||||||
|
"rust-overlay"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1686423460,
|
||||||
|
"narHash": "sha256-8e6gHSg6FDp6nU5v89D44Tqb1lR5aQpS0lXOVqzoUS4=",
|
||||||
|
"owner": "elkowar",
|
||||||
|
"repo": "eww",
|
||||||
|
"rev": "25e50eda46379bccd8a7887c18ee35833e0460e8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "elkowar",
|
||||||
|
"repo": "eww",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1650374568,
|
||||||
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1673956053,
|
||||||
|
@ -90,7 +130,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1673956053,
|
||||||
|
@ -446,7 +486,7 @@
|
||||||
},
|
},
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
|
@ -474,6 +514,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
|
"eww": "eww",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"ha-now-playing": "ha-now-playing",
|
"ha-now-playing": "ha-now-playing",
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -72,6 +72,12 @@
|
||||||
url = "github:rytec-nl/nixpkgs/submit/add-nomachine-server";
|
url = "github:rytec-nl/nixpkgs/submit/add-nomachine-server";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
eww = {
|
||||||
|
url = "github:elkowar/eww";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.rust-overlay.follows = "rust-overlay";
|
||||||
|
};
|
||||||
|
|
||||||
ha-now-playing = {
|
ha-now-playing = {
|
||||||
url = "git+https://git.datarift.nl/erwin/ha-now-playing.git?ref=main";
|
url = "git+https://git.datarift.nl/erwin/ha-now-playing.git?ref=main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -132,6 +138,8 @@
|
||||||
pamedia.overlays.${system}
|
pamedia.overlays.${system}
|
||||||
emacs-overlay.overlay
|
emacs-overlay.overlay
|
||||||
nil.overlays.default
|
nil.overlays.default
|
||||||
|
inputs.eww.overlays.default
|
||||||
|
inputs.rust-overlay.overlays.default
|
||||||
(_final: _prev: {
|
(_final: _prev: {
|
||||||
nomachine = nomachine-pkgs.nomachine;
|
nomachine = nomachine-pkgs.nomachine;
|
||||||
})
|
})
|
||||||
|
@ -248,6 +256,8 @@
|
||||||
taplo
|
taplo
|
||||||
just
|
just
|
||||||
|
|
||||||
|
eww-wayland
|
||||||
|
|
||||||
disko.packages.${system}.disko
|
disko.packages.${system}.disko
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
(defvar show-volume false)
|
(defvar show-volume false)
|
||||||
(defvar volume-muted false)
|
(defvar volume-muted false)
|
||||||
|
|
||||||
(defvar ha-now-playing "/nix/store/n3364y7amwgjs94whqapvdvp9d7d3zrh-ha-now-playing-0.5.0/bin/ha-now-playing --host home.datarift.nl --token-file /run/secrets/ha_now_playing_token --entity media_player.sonos_woonkamer")
|
(defvar ha-now-playing "ha-now-playing --host home.datarift.nl --token-file /run/secrets/ha_now_playing_token --entity media_player.sonos_woonkamer")
|
||||||
;; Polls
|
;; Polls
|
||||||
(defpoll volume-current
|
(defpoll volume-current
|
||||||
:initial 0
|
:initial 0
|
||||||
|
@ -14,11 +14,11 @@
|
||||||
;; Listen
|
;; Listen
|
||||||
(deflisten sonos-now-playing
|
(deflisten sonos-now-playing
|
||||||
:initial "{\"muted\":false,\"text\":\"\"}"
|
:initial "{\"muted\":false,\"text\":\"\"}"
|
||||||
`/nix/store/n3364y7amwgjs94whqapvdvp9d7d3zrh-ha-now-playing-0.5.0/bin/ha-now-playing --host home.datarift.nl --token-file /run/secrets/ha_now_playing_token --entity media_player.sonos_woonkamer`)
|
`ha-now-playing --host home.datarift.nl --token-file /run/secrets/ha_now_playing_token --entity media_player.sonos_woonkamer`)
|
||||||
|
|
||||||
(deflisten wm-info
|
(deflisten wm-info
|
||||||
:initial "{\"workspaces\":[],\"mode\":\"default\",\"title\":\"\"}"
|
:initial "{\"workspaces\":[],\"mode\":\"default\",\"title\":\"\"}"
|
||||||
`scripts/workspaces.nu`)
|
`./scripts/workspaces.nu`)
|
||||||
|
|
||||||
;; Widgets
|
;; Widgets
|
||||||
(defwidget mode []
|
(defwidget mode []
|
||||||
|
@ -64,6 +64,8 @@
|
||||||
(eventbox :onclick "${ha-now-playing} play-pause"
|
(eventbox :onclick "${ha-now-playing} play-pause"
|
||||||
:onrightclick "${ha-now-playing} ${sonos-now-playing.muted ? 'unmute' : 'mute'}"
|
:onrightclick "${ha-now-playing} ${sonos-now-playing.muted ? 'unmute' : 'mute'}"
|
||||||
:onscroll "${ha-now-playing} volume-{}"
|
:onscroll "${ha-now-playing} volume-{}"
|
||||||
|
:active true
|
||||||
|
:halign "start"
|
||||||
(box :class "ha-now-playing"
|
(box :class "ha-now-playing"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 2
|
:spacing 2
|
||||||
|
@ -188,6 +190,8 @@
|
||||||
(defwidget left []
|
(defwidget left []
|
||||||
(box :orientation "h"
|
(box :orientation "h"
|
||||||
:halign "start"
|
:halign "start"
|
||||||
|
:space-evenly false
|
||||||
|
:spacing 5
|
||||||
(workspaces)
|
(workspaces)
|
||||||
(ha-now-playing)))
|
(ha-now-playing)))
|
||||||
|
|
||||||
|
@ -216,7 +220,7 @@
|
||||||
(end))))
|
(end))))
|
||||||
|
|
||||||
;; Bar windows
|
;; Bar windows
|
||||||
(defwindow bar-x11
|
(defwindow bar-home
|
||||||
:geometry (geometry :x "0"
|
:geometry (geometry :x "0"
|
||||||
:y "0"
|
:y "0"
|
||||||
:width "100%"
|
:width "100%"
|
||||||
|
|
|
@ -16,6 +16,8 @@ in
|
||||||
package = cfg.package;
|
package = cfg.package;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
systemd.user.services.eww-daemon = {
|
systemd.user.services.eww-daemon = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "eww";
|
Description = "eww";
|
||||||
|
@ -23,7 +25,9 @@ in
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${cfg.package}/bin/eww --no-daemonize daemon";
|
ExecStart = "${cfg.package}/bin/eww --no-daemonize daemon";
|
||||||
Environment.PATH = makeBinPath [ pkgs.ha-now-playing pkgs.jaq pkgs.pamedia ];
|
Environment = [
|
||||||
|
"PATH=${makeBinPath [ pkgs.ha-now-playing pkgs.jaq pkgs.pamedia pkgs.bash ]}:${config.home.profileDirectory}/bin"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install = {
|
||||||
|
|
Loading…
Reference in a new issue