From 11ede73150610d797d99ff0b0bbef812d2752c1d Mon Sep 17 00:00:00 2001 From: joygnu Date: Sat, 3 Aug 2024 12:00:20 +0200 Subject: [PATCH] eeeehehehehhe --- home/hyprland/default.nix | 21 +++++++++++++++++---- home/hyprland/vm.sh | 10 +++++++++- modules/misc/default.nix | 1 - 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index b7fe2d8..0018be6 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -1,4 +1,5 @@ { pkgs, ... }: { + home.packages = with pkgs; [ rofi-wayland pavucontrol @@ -27,12 +28,24 @@ env = [ "HYPRCURSOR_THEME = Bibata-Modern-Ice" "HYPRCURSOR_SIZE = 24" + "NIXOS_OZONE_WL = "1"" + ]; + + monitor = [ + "eDP-1,1920x1080@60.01000,0x0,1" ]; exec-once = [ "ags" ]; - + + windowrule = [ + "float,title:^(Volume)(.*)$" + "float,title:^(Disks)(.*)$" + "float,title:^(Calculator)(.*)$" + "float,title:^(Bluetooth)(.*)$" + ]; + bind = [ # launch Apps @@ -109,7 +122,7 @@ "$mod+Shift, 0, movetoworkspace, 10" ]; - + bindm = [ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" @@ -118,8 +131,8 @@ bindl = [ ", XF86MonBrightnessUp, exec, brightnessctl set +10%" ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" - ", XF86AudioRaiseVolume, exec, amixer set Master 5%+" - ", XF86AudioLowerVolume, exec, amixer set Master 5%-" + ", XF86AudioRaiseVolume, exec, amixer set Master 10%+" + ", XF86AudioLowerVolume, exec, amixer set Master 10%-" ]; general = { diff --git a/home/hyprland/vm.sh b/home/hyprland/vm.sh index e01271e..638ca27 100755 --- a/home/hyprland/vm.sh +++ b/home/hyprland/vm.sh @@ -9,4 +9,12 @@ if [ "$vm_state" != "running" ]; then sleep 5 fi -xfreerdp -grab-keyboard /v:192.168.122.93 /u:joy /p:1 /size:100% /dynamic-resolution /gfx-h264:avc444 +gfx-progressive /sec:nla /bpp:32 /rfx /rfx-mode:video -bitmap-cache -offscreen-cache -glyph-cache +# Get the IP address of the VM +VM_IP=$(virsh --connect qemu:///system domifaddr "$VM_NAME" | grep -oP '(\d+\.){3}\d+' | head -1) + +if [ -z "$VM_IP" ]; then + echo "Failed to retrieve IP address for VM: $VM_NAME" + exit 1 +fi + +xfreerdp -grab-keyboard /v:"$VM_IP" /u:joy /p:1 /size:100% /dynamic-resolution /gfx-h264:avc444 +gfx-progressive /sec:nla /bpp:32 /rfx /rfx-mode:video -bitmap-cache -offscreen-cache -glyph-cache diff --git a/modules/misc/default.nix b/modules/misc/default.nix index 51dd572..e0c996e 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -18,7 +18,6 @@ virtualisation.docker.enable = true; nixpkgs.config.allowUnfree = true; programs.hyprland.enable = true; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; users.defaultUserShell = pkgs.zsh; programs.zsh.enable = true; nix.settings.experimental-features = [ "nix-command" "flakes"];