This commit is contained in:
soraefir
2026-06-05 04:14:08 +02:00
parent 1590a1cf31
commit c2cd4e42c1
12 changed files with 359 additions and 230 deletions

View File

@@ -1,7 +1,21 @@
{ lib, config, pkgs, ... }: {
{ lib, config, pkgs, ... }:
let
openOnCurrentScreen = pkgs.writeShellScriptBin "eww-open-on-current-screen" ''
window="$1"
shift
screen="$(hyprctl monitors -j | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true) | .name' | head -n1)"
if [ -n "$screen" ]; then
exec ${lib.getExe pkgs.eww} open "$window" --screen "$screen" "$@"
fi
exec ${lib.getExe pkgs.eww} open "$window" "$@"
'';
in {
config = lib.mkIf (config.usercfg.wm == "Wayland") {
home.packages = with pkgs; [ eww jq jaq custom.amdgpu_top ];
home.packages = with pkgs; [ eww jq jaq custom.amdgpu_top openOnCurrentScreen ];
xdg.configFile."eww" = {
source = lib.cleanSourceWith {