From 7d2d003ece0415eea9759af94c55518825c19f16 Mon Sep 17 00:00:00 2001 From: Liam Malone Date: Fri, 14 Nov 2025 13:35:46 +0000 Subject: [PATCH] silent workspace sending, more laptop hardware management --- configs/hypr/hyprland.conf | 13 +++++++++++++ hosts/darp8/configuration.nix | 28 +++++++++++++++++++++++----- hosts/graphical/configuration.nix | 1 + 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/configs/hypr/hyprland.conf b/configs/hypr/hyprland.conf index 5a06ff7..46bc58d 100644 --- a/configs/hypr/hyprland.conf +++ b/configs/hypr/hyprland.conf @@ -279,8 +279,21 @@ $mainCtrlShift = $mainCtrl SHIFT bind = $mainShift, $ws_program, movetoworkspace, $ws_program bind = $mainShift, $ws_extra, movetoworkspace, name:extra + bind = $altShift, $ws_game, movetoworkspacesilent, $ws_game + bind = $altShift, $ws_shell, movetoworkspacesilent, $ws_shell + bind = $altShift, $ws_web, movetoworkspacesilent, $ws_web + bind = $altShift, $ws_music, movetoworkspacesilent, $ws_music + bind = $altShift, $ws_image, movetoworkspacesilent, $ws_image + bind = $altShift, $ws_chat, movetoworkspacesilent, $ws_chat + bind = $altShift, $ws_audio, movetoworkspacesilent, $ws_audio + bind = $altShift, $ws_video, movetoworkspacesilent, $ws_video + bind = $altShift, $ws_program, movetoworkspacesilent, $ws_program + bind = $altShift, $ws_extra, movetoworkspacesilent, name:extra + bind = $mainCtrlShift, right, movetoworkspace, +1 bind = $mainCtrlShift, left, movetoworkspace, -1 + bind = $altCtrlShift, right, movetoworkspacesilent, +1 + bind = $altCtrlShift, left, movetoworkspacesilent, -1 bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 diff --git a/hosts/darp8/configuration.nix b/hosts/darp8/configuration.nix index ae525d8..5bf377c 100644 --- a/hosts/darp8/configuration.nix +++ b/hosts/darp8/configuration.nix @@ -31,34 +31,52 @@ boot.resumeDevice = "/dev/disk/by-uuid/c7704142-d0b9-4a85-af1c-ce776b895c0f"; boot.kernelParams = [ "resume_offset=13629440" - "mem_sleep_default=deep" + "mem_sleep_default=s2idle" ]; boot.initrd.postMountCommands = lib.mkAfter '' swapon /mnt-root/var/swapfile ''; + boot.kernelPackages = pkgs.linuxPackages_latest; services.system76-scheduler.enable = true; services.tailscale.enable = false; services.power-profiles-daemon.enable = false; - services.auto-cpufreq.enable = false; services.thermald.enable = true; systemd.services.charge-thresholds = { description = "Set System76 battery charge thresholds"; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; # Ensure daemon is ready + wantedBy = [ "multi-user.target" "post-resume.target" ]; + after = [ "network.target" "suspend.target" "hibernate.target" "hybrid-sleep.target" ]; # Ensures it runs post-resume serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.system76-power}/bin/system76-power charge-thresholds --profile balanced"; RemainAfterExit = true; }; }; - services.logind.lidSwitch = "suspend-then-hibernate"; + systemd.services.thunderbolt-suspend = { + description = "Disable Thunderbolt on suspend"; + wantedBy = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.bolt}/bin/boltctl forget --all"; # Or echo 1 > /sys/bus/thunderbolt/devices/*/authorized if no bolt + }; + }; + systemd.services.thunderbolt-resume = { + description = "Re-enable Thunderbolt on resume"; + wantedBy = [ "post-resume.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.bolt}/bin/boltctl authorize --all"; # Adjust as needed + }; + }; systemd.sleep.extraConfig = '' HibernateDelaySec=20m SuspendState=mem ''; + services.logind.lidSwitch = "suspend-then-hibernate"; + services.hardware.bolt.enable = true; + home-manager = { useGlobalPkgs = true; extraSpecialArgs = { inherit inputs; inherit cfg; }; diff --git a/hosts/graphical/configuration.nix b/hosts/graphical/configuration.nix index d9ad301..560ff5d 100644 --- a/hosts/graphical/configuration.nix +++ b/hosts/graphical/configuration.nix @@ -159,6 +159,7 @@ environment.systemPackages = with pkgs; [ bat + bolt discord fd file