From 865cb8d84e46412dd371eb8b9cdffe9439d0b446 Mon Sep 17 00:00:00 2001 From: Uzair Mohammed Date: Thu, 26 Dec 2024 19:43:55 -0800 Subject: [PATCH] 2: Added home/modules/waybar.nix with starter config and moved xwayland enablement from system/modules/wayland.nix to home/modules/hyprland.nix --- home/modules/hyprland.nix | 9 ++++++++- home/modules/waybar.nix | 28 ++++++++++++++++++++++++++++ system/modules/wayland.nix | 1 - 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 home/modules/waybar.nix diff --git a/home/modules/hyprland.nix b/home/modules/hyprland.nix index 4ab9e16..966e114 100644 --- a/home/modules/hyprland.nix +++ b/home/modules/hyprland.nix @@ -1,6 +1,8 @@ {pkgs, inputs, ...}: { + imports = [ + ./waybar.nix + ]; programs.kitty.enable = true; - programs.waybar.enable = true; home.packages = [ inputs.hyprland-qtutils.packages."${pkgs.system}".default @@ -8,6 +10,7 @@ wayland.windowManager.hyprland = { enable = true; + xwayland.enable = true; settings = { "$mod" = "SUPER"; @@ -30,5 +33,9 @@ 9) ); }; + + extraConfig = '' + exec-once = waybar + ''; }; } diff --git a/home/modules/waybar.nix b/home/modules/waybar.nix new file mode 100644 index 0000000..10f9812 --- /dev/null +++ b/home/modules/waybar.nix @@ -0,0 +1,28 @@ +{ + programs.waybar = { + enable = true; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 30; + output = [ + "eDP-1" + "HDMI-A-1" + ]; + modules-left = [ "hyprland/workspaces" "hyprland/window" ]; + modules-center = [ "tray" ]; + modules-left[ "pulseaudio" "backlight" "bluetooth" "network" "battery" "clock" ]; + + "hyprland/workspaces" = { + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + + "hyrland/window" = { + separate-outputs = true; + }; + }; + }; + }; +} diff --git a/system/modules/wayland.nix b/system/modules/wayland.nix index 8c1e3c1..af570cf 100644 --- a/system/modules/wayland.nix +++ b/system/modules/wayland.nix @@ -10,7 +10,6 @@ enable = true; package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; - xwayland.enable = true; }; environment.sessionVariables = {