From a52f7fdbb8eaeeb8046ff8c8c83ff5020121e3c8 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 25 Jul 2024 16:22:23 -0400 Subject: [PATCH] home/waybar: use rofi with networkmanager_dmenu for wifi --- homeManagerModules/apps/rofi/default.nix | 13 +++++++++++++ homeManagerModules/apps/waybar/default.nix | 4 ++-- homeManagerModules/desktop/hyprland/settings.nix | 1 - homeManagerModules/desktop/sway/settings.nix | 1 - 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/apps/rofi/default.nix b/homeManagerModules/apps/rofi/default.nix index 2ba180fd..efe62725 100644 --- a/homeManagerModules/apps/rofi/default.nix +++ b/homeManagerModules/apps/rofi/default.nix @@ -46,5 +46,18 @@ in { window-thumbnail = false; }; }; + + xdg.configFile."networkmanager-dmenu/config.ini".text = '' + [dmenu] + dmenu_command = ${lib.getExe config.programs.rofi.package} + l = 40 + rofi_highlight = True + + [dmenu_passphrase] + rofi_obscure = True + + [editor] + gui_if_available = True + ''; }; } diff --git a/homeManagerModules/apps/waybar/default.nix b/homeManagerModules/apps/waybar/default.nix index 2c361ab5..9e64bf6f 100644 --- a/homeManagerModules/apps/waybar/default.nix +++ b/homeManagerModules/apps/waybar/default.nix @@ -159,7 +159,7 @@ "tooltip-format-wifi" = "{essid} ({signalStrength}%) {icon}"; "tooltip-format-ethernet" = "{ifname} "; "tooltip-format-disconnected" = "Disconnected"; - "on-click" = "${lib.getExe config.ar.home.defaultApps.terminalEditor} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; + "on-click" = lib.getExe pkgs.networkmanager_dmenu; }; "tray" = {"spacing" = 15;}; @@ -193,7 +193,7 @@ "group/hardware" = { "orientation" = "horizontal"; - modules = ["pulseaudio" "power-profiles-daemon" "battery" "custom/logout"]; + modules = ["pulseaudio" "network" "power-profiles-daemon" "battery" "custom/logout"]; }; }; }; diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 576719b6..cea8b142 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -125,7 +125,6 @@ in { scripts.idleD (lib.getExe pkgs.wayland-pipewire-idle-inhibit) (lib.getExe' pkgs.blueman "blueman-applet") - (lib.getExe' pkgs.networkmanagerapplet "nm-applet") (lib.getExe' pkgs.playerctl "playerctld") (lib.getExe' pkgs.swayosd "swayosd-server") (lib.getExe pkgs.mako) diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix index 6fa7e0a7..4f96ac49 100644 --- a/homeManagerModules/desktop/sway/settings.nix +++ b/homeManagerModules/desktop/sway/settings.nix @@ -159,7 +159,6 @@ in { {command = "${scripts.idleD}";} {command = lib.getExe pkgs.autotiling;} {command = lib.getExe' pkgs.blueman "blueman-applet";} - {command = lib.getExe' pkgs.networkmanagerapplet "nm-applet";} {command = lib.getExe' pkgs.playerctl "playerctld";} {command = lib.getExe' pkgs.swayosd "swayosd-server";} {command = lib.getExe pkgs.mako;}