From ec23a7fe14ad5fffede64f42e31c8329d72e73aa Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Fri, 26 Sep 2025 20:37:09 -0500 Subject: [PATCH] upd --- flake.nix | 2 - .../x86_64-linux/matt@matt-nixos/default.nix | 1 - modules/home/programs/hyprland/default.nix | 60 +++++++++---------- modules/home/programs/waybar/default.nix | 1 + .../programs/waybar/scripts/audio-control.nix | 33 ++++++++++ modules/nixos/desktop/hyprland/default.nix | 2 +- systems/x86_64-linux/matt-nixos/default.nix | 1 + 7 files changed, 66 insertions(+), 34 deletions(-) create mode 100644 modules/home/programs/waybar/scripts/audio-control.nix diff --git a/flake.nix b/flake.nix index e096c2d..9a30b09 100644 --- a/flake.nix +++ b/flake.nix @@ -257,8 +257,6 @@ permittedInsecurePackages = [ # ... "libsoup-2.74.3" - # "libxml2-2.13.8" - "qtwebengine-5.15.19" ]; }; diff --git a/homes/x86_64-linux/matt@matt-nixos/default.nix b/homes/x86_64-linux/matt@matt-nixos/default.nix index d1b599c..ca0b9ec 100755 --- a/homes/x86_64-linux/matt@matt-nixos/default.nix +++ b/homes/x86_64-linux/matt@matt-nixos/default.nix @@ -58,7 +58,6 @@ in ]; extraConfig = '' - exec-once = nm-applet exec-once = [silent] firefox exec-once = [silent] vesktop exec-once = [silent] chromium --app="https://music.apple.com" diff --git a/modules/home/programs/hyprland/default.nix b/modules/home/programs/hyprland/default.nix index 1653529..b7e7c3e 100644 --- a/modules/home/programs/hyprland/default.nix +++ b/modules/home/programs/hyprland/default.nix @@ -461,42 +461,42 @@ in ++ cfg.windowRule; plugin = { - touch_gestures = { - # The default sensitivity is probably too low on tablet screens, - # I recommend turning it up to 4.0 - sensitivity = "4.0"; + # touch_gestures = { + # # The default sensitivity is probably too low on tablet screens, + # # I recommend turning it up to 4.0 + # sensitivity = "4.0"; - # must be >= 3 - workspace_swipe_fingers = "3"; + # # must be >= 3 + # workspace_swipe_fingers = "3"; - # switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers - # and can be used at the same time - # possible values: l, r, u, or d - # to disable it set it to anything else - workspace_swipe_edge = "d"; + # # switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers + # # and can be used at the same time + # # possible values: l, r, u, or d + # # to disable it set it to anything else + # workspace_swipe_edge = "d"; - # in milliseconds - long_press_delay = "400"; + # # in milliseconds + # long_press_delay = "400"; - # resize windows by long-pressing on window borders and gaps. - # If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating - # windows - resize_on_border_long_press = true; + # # resize windows by long-pressing on window borders and gaps. + # # If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating + # # windows + # resize_on_border_long_press = true; - # in pixels, the distance from the edge that is considered an edge - edge_margin = "10"; + # # in pixels, the distance from the edge that is considered an edge + # edge_margin = "10"; - # emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe. - # ONLY triggers when finger count is equal to workspace_swipe_fingers - # - # might be removed in the future in favor of event hooks - emulate_touchpad_swipe = false; + # # emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe. + # # ONLY triggers when finger count is equal to workspace_swipe_fingers + # # + # # might be removed in the future in favor of event hooks + # emulate_touchpad_swipe = false; - experimental = { - # send proper cancel events to windows instead of hacky touch_up events, - # NOT recommended as it crashed a few times, once it's stabilized I'll make it the default - send_cancel = "0"; - }; + # experimental = { + # # send proper cancel events to windows instead of hacky touch_up events, + # # NOT recommended as it crashed a few times, once it's stabilized I'll make it the default + # send_cancel = "0"; + # }; # hyprgrass-bind = [ # # swipe left from right edge @@ -522,7 +522,7 @@ in # ", longpress:2, movewindow" # ", longpress:3, resizewindow" # ]; - }; + # }; }; # gestures = { diff --git a/modules/home/programs/waybar/default.nix b/modules/home/programs/waybar/default.nix index 497ce54..514f52c 100755 --- a/modules/home/programs/waybar/default.nix +++ b/modules/home/programs/waybar/default.nix @@ -35,6 +35,7 @@ in { imports = [ ./options.nix + ./scripts/audio-control.nix ./scripts/hass.nix ./scripts/weather.nix ]; diff --git a/modules/home/programs/waybar/scripts/audio-control.nix b/modules/home/programs/waybar/scripts/audio-control.nix new file mode 100644 index 0000000..5914b7d --- /dev/null +++ b/modules/home/programs/waybar/scripts/audio-control.nix @@ -0,0 +1,33 @@ +{ + config, + lib, + namespace, + pkgs, + ... +}: +let + cfg = config.mjallen.programs.waybar; + + pythonEnv = pkgs.python3.withPackages (_ps: [ + pkgs.${namespace}.pipewire-python + ]); + + waybar-audio = pkgs.writeScriptBin "waybar-audio" '' + #!${pythonEnv}/bin/python + """run with the special python""" + + from pipewire_python.controller import Controller + + audio_controller = Controller() + + print(audio_controller.get_config()) + print(audio_controller.get_list_targets()) + ''; +in +{ + imports = [ ../options.nix ]; + + config = lib.mkIf cfg.enable { + home.packages = [ waybar-audio ]; + }; +} diff --git a/modules/nixos/desktop/hyprland/default.nix b/modules/nixos/desktop/hyprland/default.nix index eab0c93..639a6f7 100755 --- a/modules/nixos/desktop/hyprland/default.nix +++ b/modules/nixos/desktop/hyprland/default.nix @@ -71,7 +71,7 @@ in portalPackage = lib.mkDefault pkgs.xdg-desktop-portal-hyprland; }; - nm-applet.enable = true; + nm-applet.enable = false; }; security = { diff --git a/systems/x86_64-linux/matt-nixos/default.nix b/systems/x86_64-linux/matt-nixos/default.nix index 84f7c18..5a89fe2 100644 --- a/systems/x86_64-linux/matt-nixos/default.nix +++ b/systems/x86_64-linux/matt-nixos/default.nix @@ -63,6 +63,7 @@ }; programs.coolercontrol.enable = true; + systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; environment.variables = { GDK_SCALE = "1";