From 2cf2bb3747fe6a942c49a774436286b0c025ca62 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 25 Jul 2024 18:03:57 -0400 Subject: [PATCH] home/waybar: use networkmanager-dmenu and blueberry (#63) * home/waybar: use rofi with networkmanager_dmenu for wifi * home/rofi: improve networkmanager-dmenu settings * home/waybar: move to wofi * home/waybar: use blueberry for bluetooth * home/hyprland: add bluberry window rules --- homeManagerModules/apps/rofi/default.nix | 26 ++++++++++++++----- homeManagerModules/apps/waybar/default.nix | 8 +++--- .../desktop/hyprland/settings.nix | 5 ++-- homeManagerModules/desktop/sway/settings.nix | 1 - .../desktop/wayland/default.nix | 1 + 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/homeManagerModules/apps/rofi/default.nix b/homeManagerModules/apps/rofi/default.nix index 2ba180fd..cb363f36 100644 --- a/homeManagerModules/apps/rofi/default.nix +++ b/homeManagerModules/apps/rofi/default.nix @@ -7,6 +7,8 @@ cfg = config.ar.home; in { config = lib.mkIf cfg.apps.rofi.enable { + home.packages = [pkgs.networkmanager_dmenu]; + programs.rofi = { enable = true; font = "NotoSansM Nerd Font ${toString config.gtk.font.size}"; @@ -27,12 +29,10 @@ in { "ssh" ]; - display-drun = "  "; - display-filebrowser = "  "; - display-power-menu = "  "; - display-run = "  "; - display-ssh = "  "; - display-window = " 﩯 "; + display-combi = "Search"; + display-filebrowser = "Files"; + display-ssh = "SSH"; + display-window = "Windows"; drun-display-format = "{icon} {name}"; hide-scrollbar = true; hover-select = true; @@ -46,5 +46,19 @@ in { window-thumbnail = false; }; }; + + xdg.configFile."networkmanager-dmenu/config.ini".text = '' + [dmenu] + dmenu_command = ${lib.getExe config.programs.rofi.package} + highlight = True + + [dmenu_passphrase] + obscure = True + + [editor] + gui = ${pkgs.networkmanagerapplet}/bin/nm-connection-editor + gui_if_available = True + terminal = ${lib.getExe cfg.defaultApps.terminal} + ''; }; } diff --git a/homeManagerModules/apps/waybar/default.nix b/homeManagerModules/apps/waybar/default.nix index 2c361ab5..ce37725c 100644 --- a/homeManagerModules/apps/waybar/default.nix +++ b/homeManagerModules/apps/waybar/default.nix @@ -121,9 +121,9 @@ }; "bluetooth" = { - "format" = "󰂯"; + "format" = ""; "format-disabled" = ""; # an empty format will hide the module - "format-connected" = "󰂯 {num_connections} connected"; + "format-connected" = " {num_connections}"; "tooltip-format" = "{controller_alias} {controller_address}"; "tooltip-format-connected" = '' {controller_alias} {controller_address} @@ -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" "bluetooth" "network" "power-profiles-daemon" "battery" "custom/logout"]; }; }; }; diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 576719b6..3c1d92c6 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -124,8 +124,6 @@ in { (lib.getExe pkgs.waybar) 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) @@ -183,15 +181,18 @@ in { windowrulev2 = [ "center(1),class:(.blueman-manager-wrapped)" + "center(1),class:(blueberry.py)" "center(1),class:(com.github.wwmm.easyeffects)" "center(1),class:(pavucontrol)" "float, class:^(firefox)$, title:^(Picture-in-Picture)$" "float,class:(.blueman-manager-wrapped)" + "float,class:(blueberry.py)" "float,class:(com.github.wwmm.easyeffects)" "float,class:(pavucontrol)" "move 70% 20%, class:^(firefox)$, title:^(Picture-in-Picture)$" "pin,class:^(firefox)$, title:^(Picture-in-Picture)$" "size 40% 60%,class:(.blueman-manager-wrapped)" + "size 40% 60%,class:(blueberry.py)" "size 40% 60%,class:(com.github.wwmm.easyeffects)" "size 40% 60%,class:(pavucontrol)" "suppressevent maximize, class:.*" 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;} diff --git a/homeManagerModules/desktop/wayland/default.nix b/homeManagerModules/desktop/wayland/default.nix index cbe89b13..a2c40223 100644 --- a/homeManagerModules/desktop/wayland/default.nix +++ b/homeManagerModules/desktop/wayland/default.nix @@ -22,6 +22,7 @@ }; home.packages = with pkgs; [ + blueberry gnome.file-roller networkmanagerapplet swayosd