{ config, lib, pkgs, ... }: { home.packages = [ (pkgs.writeShellScriptBin "nmgui" '' windowID=`niri msg --json windows | jq -re '[.[] | select(.app_id == "com.network.manager") | .id][0]'` if [ $windowID != "null" ] then exec niri msg action close-window --id=$windowID else app2unit -- ${ lib.getExe ( pkgs.unstable.nmgui.overrideAttrs { src = pkgs.fetchFromGitHub { owner = "s-adi-dev"; repo = "nmgui"; rev = "08b2380e5b230a2215a6430878e2aa13c3d86d44"; hash = "sha256-qRFJbzam48GTbQnLrZINE0vAvAJfVN4bJey8MZwCsm4="; }; } ) } fi '') ]; xdg.configFile."nmgui/style.css".text = '' * { font-family: "Adwaita Sans", "Symbols Nerd Font"; outline-color: @accent-color; color: white; } window { border: 2px solid @accent-border-color; background: @background-color; } window { border-top: unset; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; } #wifi-scan-label, button, entry { border-radius: 4px; } separator { min-height: 2px; margin: 0 -20px; background: @border-color; } entry { min-height: 32px; padding-left: 9px; padding-right: 8px; border: 1px solid; border-spacing: 6px; } entry:hover { outline: none; background: @button-hover-color; border: 1px solid @border-color; } text selection { color: white; background: @accent-color; } button { min-height: 24px; min-width: 16px; padding: 4px 9px; background: @button-color; border: 1px solid @border-color; color: white; } button.image-button { padding: 8px 12px 8px 8px; border: unset; background: unset; } button:hover { background: @button-hover-color; } button:disabled { border-left: 4px solid @accent-color; border-top: unset; border-bottom: unset; padding: unset; } button:disabled box { margin: -2px; margin-right: 0; background: @button-hover-color; padding: 4px 10px 4px 8px; border: 1px solid @border-color; border-right: unset; } switch { border-radius: 4px; border: 1px solid @border-color; background: @button-color; } switch:checked { background: alpha(@accent-color, .5); } switch slider { border-radius: 4px; border: 1px solid @border-color; background: rgb(190, 190, 190); margin: 3px; min-height: 15px; min-width: 15px; } switch:hover slider, switch slider:hover { border 1px solid @border-color; background: rgb(170, 170, 170); } #wifi-label { font-size: 15pt; font-weight: 400; } #wifi-networks-label { font-size: 12pt; font-weight: 300; } #wifi-scan-label { padding: 5px 8px; background: @button-color; border: 1px solid @border-color; color: white; } #wifi-scan-label:hover { background: @button-hover-color; color: white; } #network-list-box #network-button { margin-right: -5px; border-right: 0; border-top-right-radius: unset; border-bottom-right-radius: unset; } #network-list-box .more-details-button { border-top-left-radius: unset; border-bottom-left-radius: unset; margin-left: unset; } /* Details page */ window > box .image-button { margin-left:-10px; } window > box > box > box > box:last-child { margin: 0 -20px -20px; } window > box > box > box > box:last-child > button:first-child { margin-right: 15px; } /* dialogs */ .titlebar { background: transparent; } .dialog-vbox button { margin: 10px; } .dialog-vbox button:first-child { margin-right: 5px; } .dialog-vbox button:last-child { margin-left: 5px; } .dialog-vbox box > label:last-child { margin: 0 10px 20px; } .password { background: @button-color; border: 1px solid @border-color; color: white; } ''; programs.niri.settings.window-rules = [ { matches = [ { app-id = "com.network.manager$"; } ]; focus-ring.enable = false; open-focused = true; open-floating = true; default-floating-position = { x = 40; y = 0; relative-to = "top-right"; }; geometry-corner-radius = { "bottom-left" = 9.0; "bottom-right" = 9.0; "top-left" = 0.0; "top-right" = 0.0; }; min-width = 400; max-width = 400; min-height = 500; max-height = 500; } ]; }