diff --git a/home/features/desktop/default.nix b/home/features/desktop/default.nix index 562205e..2af744e 100644 --- a/home/features/desktop/default.nix +++ b/home/features/desktop/default.nix @@ -3,6 +3,7 @@ imports = [ ./firefox.nix ./gtk.nix + ./qt.nix ./vscode.nix ]; diff --git a/home/features/desktop/wayland-wm/default.nix b/home/features/desktop/wayland-wm/default.nix index 5b2efd8..f609bba 100644 --- a/home/features/desktop/wayland-wm/default.nix +++ b/home/features/desktop/wayland-wm/default.nix @@ -1,7 +1,8 @@ { pkgs, ... }: { imports = [ - ./mako.nix ./kitty.nix + ./mako.nix + ./waybar.nix ]; xdg.mimeApps.enable = true; diff --git a/home/features/desktop/wayland-wm/waybar.nix b/home/features/desktop/wayland-wm/waybar.nix new file mode 100644 index 0000000..a1b1300 --- /dev/null +++ b/home/features/desktop/wayland-wm/waybar.nix @@ -0,0 +1,49 @@ +{ ouputs, cofig, lib, pkgs, ... }: +let + cat = "${pkgs.coreutils}/bin/cat"; + cut = "${pkgs.coreutils}/bin/cut"; + find = "${pkgs.findutils}/bin/find"; + grep = "${pkgs.gnugrep}/bin/grep"; + journalctl = "${pkgs.systemd}/bin/journalctl"; + jq = "${pkgs.jq}/bin/jq"; + pgrep = "${pkgs.procps}/bin/pgrep"; + ping = "${pkgs.iputils}/bin/ping"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; + playerctld = "${pkgs.playerctl}/bin/playerctld"; + systemctl = "${pkgs.systemd}/bin/systemctl"; + tail = "${pkgs.coreutils}/bin/tail"; + timeout = "${pkgs.coreutils}/bin/timeout"; + wc = "${pkgs.coreutils}/bin/wc"; + wofi = "${pkgs.wofi}/bin/wofi"; + xargs = "${pkgs.findutils}/bin/xargs"; + + jsonOutput = name: { pre ? "", text ? "", tooltip ? "", alt? "", class ? "", percentage ? "" }: "${pkgs.writeShellScriptBin "waybar-${name}" '' + set -euo pipefail + ${pre} + ${jq} -cn \ + --arg text "${text}" \ + --arg tooltip "${tooltip}" \ + --arg alt "${alt}" \ + --arg class "${class}" \ + --arg percentage "${percentage}" \ + '{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}' + ''}/bin/waybar-${name}"; +in +{ + programs.waybar = { + enable = true; + package = pkgs.waybar.overrideAttrs (oa: { + mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ]; + }); + systemd.enable = true; + settings = { + primary = { + mode = "dock"; + layer = "top"; + position = "top"; + height = 24; + margin = "6"; + }; + }; + }; +} \ No newline at end of file