From 76a395149d306374f4b39a028b70e3791c980e1f Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 24 Jul 2024 20:44:14 +0200 Subject: [PATCH] fix screensharing and add workspaces --- home-manager/hyprland/hyprland-settings.nix | 24 ++++++++++++++++++--- modules/graphical/code.nix | 1 + modules/graphical/hyprland.nix | 3 ++- modules/graphical/noise-supression.nix | 12 +++++------ overlays.nix | 1 + 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/home-manager/hyprland/hyprland-settings.nix b/home-manager/hyprland/hyprland-settings.nix index 87cdeb6..4f8fa9b 100644 --- a/home-manager/hyprland/hyprland-settings.nix +++ b/home-manager/hyprland/hyprland-settings.nix @@ -31,6 +31,17 @@ in { ",preferred,auto,auto" ]; + workspace = + lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [ + "1,monitor:DP-1" + "2,monitor:DP-1" + "3,monitor:DP-1" + "4,monitor:DP-1" + "5,monitor:DP-1" + "9,monitor:HDMI-A-1" + "10,monitor:HDMI-A-1" + ]; + # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch @@ -50,12 +61,15 @@ in { kb_options = ""; kb_rules = ""; - follow_mouse = 2; + follow_mouse = 1; float_switch_override_focus = 2; touchpad = { natural_scroll = true; }; - sensitivity = if osConfig.networking.hostName == "kop-pc" then -0.3 else 0; # -1.0 - 1.0, 0 means no modification. + sensitivity = if osConfig.networking.hostName == "kop-pc" then + -0.3 + else + 0; # -1.0 - 1.0, 0 means no modification. }; general = { @@ -249,8 +263,12 @@ in { "${pkgs.swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)" "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &" "${pkgs.waybar}/bin/waybar &" + "dex --autostart --environment Hyprland" "hypridle &" #"${pkgs.dunst}/bin/dunst &" + ] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [ + "[workspace 9 silent] vesktop" + "[workspace 10 silent] firefox" ]; }; extraConfig = let @@ -291,7 +309,7 @@ in { submap = reset ''; - #experimental:explicit_sync = true + #experimental:explicit_sync = true }; }; } diff --git a/modules/graphical/code.nix b/modules/graphical/code.nix index 21188f0..3fcdfcc 100644 --- a/modules/graphical/code.nix +++ b/modules/graphical/code.nix @@ -14,6 +14,7 @@ in man-pages kate jetbrains.idea-ultimate + typescript #jetbrains.clion insomnia nodejs_22 # needed for tabby extension diff --git a/modules/graphical/hyprland.nix b/modules/graphical/hyprland.nix index 1305321..f764226 100644 --- a/modules/graphical/hyprland.nix +++ b/modules/graphical/hyprland.nix @@ -45,7 +45,7 @@ in { }; xdg.portal.enable = true; - xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ]; + xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; programs.hyprland = { enable = true; }; @@ -62,6 +62,7 @@ in { networkmanagerapplet wayland wl-clipboard + dex # starts applications according to .desktop files #qt5.qtwayland #qt6.qmake #qt6.qtwayland diff --git a/modules/graphical/noise-supression.nix b/modules/graphical/noise-supression.nix index dfb838d..e215a24 100644 --- a/modules/graphical/noise-supression.nix +++ b/modules/graphical/noise-supression.nix @@ -1,17 +1,15 @@ -{config, lib, pkgs, ...}: -with lib; +{config, pkgs, lib, ...}: let cfg = config.custom.graphical.noise-supression; in { options.custom.graphical.noise-supression = { - enable = mkEnableOption "Enables noise-supression"; + enable = lib.mkEnableOption "Enables noise-supression"; }; - config = mkIf cfg.enable { - programs.noisetorch.enable = true; - environment.systemPackages = [ - pkgs.easyeffects + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + easyeffects ]; }; } diff --git a/overlays.nix b/overlays.nix index f6db131..0af03da 100644 --- a/overlays.nix +++ b/overlays.nix @@ -15,6 +15,7 @@ mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); hyprland = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}.hyprland; + xdg-desktop-portal-hyprland = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; # .png doesnt work :( #fastfetch = prev.fastfetch.overrideAttrs (oldAttrs: {