From e3ec57928cc8ec9ad46da4c31955c2cce355ba43 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:03:29 +0100 Subject: [PATCH 01/12] feat: add nixfmt-rfc-style as nix fmt --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 534683dcc..bde86aa71 100644 --- a/flake.nix +++ b/flake.nix @@ -206,5 +206,7 @@ overlays = import ./overlays { inherit inputs; }; # Custom packages; acessible via 'nix build', 'nix shell', etc packages = helper.forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # Formatter for .nix files, available via 'nix fmt' + formatter = helper.forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style); }; } From 854434d5d53297da33d1a4bdc64082c98c45fed9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:05:55 +0100 Subject: [PATCH 02/12] style: nixfmt-plus for darwin/ --- darwin/_mixins/desktop/apps/utilities/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/darwin/_mixins/desktop/apps/utilities/default.nix b/darwin/_mixins/desktop/apps/utilities/default.nix index 9e72e5dd1..317702686 100644 --- a/darwin/_mixins/desktop/apps/utilities/default.nix +++ b/darwin/_mixins/desktop/apps/utilities/default.nix @@ -16,8 +16,6 @@ lib.mkIf (lib.elem username installFor) { ]; homebrew = { - casks = [ - "balenaetcher" - ]; + casks = [ "balenaetcher" ]; }; } From a7e1598da381f41877f9719d7938ec57c7c7f665 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:10:25 +0100 Subject: [PATCH 03/12] style: nixfmt-plus for nixos/ --- nixos/_mixins/desktop/gnome/default.nix | 1 - nixos/_mixins/desktop/hyprland/default.nix | 12 ++----- nixos/_mixins/desktop/hyprland/greetd.nix | 17 ++++----- .../features/power-management/default.nix | 30 ++++++++++------ nixos/_mixins/features/zram/default.nix | 11 +++--- nixos/_mixins/services/clamav/default.nix | 1 - nixos/default.nix | 35 +++++++++++-------- nixos/shaa/default.nix | 7 ++-- 8 files changed, 64 insertions(+), 50 deletions(-) diff --git a/nixos/_mixins/desktop/gnome/default.nix b/nixos/_mixins/desktop/gnome/default.nix index 028951a0c..aef97848c 100644 --- a/nixos/_mixins/desktop/gnome/default.nix +++ b/nixos/_mixins/desktop/gnome/default.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - hostname, isInstall, username, ... diff --git a/nixos/_mixins/desktop/hyprland/default.nix b/nixos/_mixins/desktop/hyprland/default.nix index 334fd2021..d9ad4d56b 100644 --- a/nixos/_mixins/desktop/hyprland/default.nix +++ b/nixos/_mixins/desktop/hyprland/default.nix @@ -1,16 +1,12 @@ { config, isInstall, - hostname, lib, pkgs, - username, ... }: { - imports = [ - ./greetd.nix - ]; + imports = [ ./greetd.nix ]; environment = { # Enable HEIC image previews in Nautilus pathsToLink = [ "share/thumbnailers" ]; @@ -91,7 +87,7 @@ udevil.enable = true; }; security = { - pam.services.hyprlock = {}; + pam.services.hyprlock = { }; polkit = { enable = true; }; @@ -100,9 +96,7 @@ services = { dbus = { implementation = "broker"; - packages = with pkgs; [ - gcr - ]; + packages = with pkgs; [ gcr ]; }; devmon.enable = true; gnome = { diff --git a/nixos/_mixins/desktop/hyprland/greetd.nix b/nixos/_mixins/desktop/hyprland/greetd.nix index e0eaa1bfd..0a8f3c6db 100644 --- a/nixos/_mixins/desktop/hyprland/greetd.nix +++ b/nixos/_mixins/desktop/hyprland/greetd.nix @@ -1,9 +1,4 @@ -{ - hostname, - pkgs, - username, - ... -}: +{ hostname, pkgs, ... }: { # Use a minimal Sway to run regreet environment = { @@ -34,8 +29,14 @@ fit = "Cover"; }; commands = { - reboot = [ "${pkgs.systemd}/bin/systemctl" "reboot" ]; - poweroff = [ "${pkgs.systemd}/bin/systemctl" "poweroff" ]; + reboot = [ + "${pkgs.systemd}/bin/systemctl" + "reboot" + ]; + poweroff = [ + "${pkgs.systemd}/bin/systemctl" + "poweroff" + ]; }; GTK = { application_prefer_dark_theme = true; diff --git a/nixos/_mixins/features/power-management/default.nix b/nixos/_mixins/features/power-management/default.nix index 41252acd3..c6f3baa17 100644 --- a/nixos/_mixins/features/power-management/default.nix +++ b/nixos/_mixins/features/power-management/default.nix @@ -1,9 +1,19 @@ -{ config, hostname, isInstall, lib, pkgs, ... }: +{ + config, + hostname, + isInstall, + lib, + pkgs, + ... +}: let isIntelCPU = config.hardware.cpu.intel.updateMicrocode; isLaptop = hostname != "vader" && hostname != "phasma" && hostname != "revan"; - isThinkpad = hostname == "tanis" || hostname == "sidious"|| hostname == "shaa"; - usePowerProfiles = config.programs.hyprland.enable || config.services.xserver.desktopManager.gnome.enable || config.services.xserver.desktopManager.pantheon.enable; + isThinkpad = hostname == "tanis" || hostname == "sidious" || hostname == "shaa"; + usePowerProfiles = + config.programs.hyprland.enable + || config.services.xserver.desktopManager.gnome.enable + || config.services.xserver.desktopManager.pantheon.enable; in lib.mkIf isInstall { # Power Management strategy: @@ -16,20 +26,20 @@ lib.mkIf isInstall { # - Thinkpads have a battery threshold charging either via the GNOME extension or auto-cpufreq # Disable USB autosuspend on desktop always on power workstations - boot.kernelParams = lib.optionals (!isLaptop) [ - "usbcore.autosuspend=-1" - ]; + boot.kernelParams = lib.optionals (!isLaptop) [ "usbcore.autosuspend=-1" ]; # Install Battery Threshold GNOME extensions for Thinkpads - environment.systemPackages = with pkgs; lib.optionals (isThinkpad && config.services.xserver.desktopManager.gnome.enable) [ - gnomeExtensions.thinkpad-battery-threshold - ]; + environment.systemPackages = + with pkgs; + lib.optionals (isThinkpad && config.services.xserver.desktopManager.gnome.enable) [ + gnomeExtensions.thinkpad-battery-threshold + ]; powerManagement.powertop.enable = lib.mkDefault false; programs = { auto-cpufreq = { - enable = (!usePowerProfiles && isLaptop); + enable = !usePowerProfiles && isLaptop; settings = { battery = { governor = "powersave"; diff --git a/nixos/_mixins/features/zram/default.nix b/nixos/_mixins/features/zram/default.nix index c71e9b9fd..10f3f4e36 100644 --- a/nixos/_mixins/features/zram/default.nix +++ b/nixos/_mixins/features/zram/default.nix @@ -1,13 +1,16 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let # Only enable zram swap if no swap devices are configured usezramSwap = builtins.length config.swapDevices == 0; in { # Keep zram swap (lz4) latency in check - boot.kernel.sysctl = lib.mkIf usezramSwap { - "vm.page-cluster" = 1; - }; + boot.kernel.sysctl = lib.mkIf usezramSwap { "vm.page-cluster" = 1; }; # Enable Multi-Gen LRU: # - https://docs.kernel.org/next/admin-guide/mm/multigen_lru.html diff --git a/nixos/_mixins/services/clamav/default.nix b/nixos/_mixins/services/clamav/default.nix index 7967fe2a7..25e9354ac 100644 --- a/nixos/_mixins/services/clamav/default.nix +++ b/nixos/_mixins/services/clamav/default.nix @@ -17,7 +17,6 @@ let all-sus-dirs = builtins.concatMap ( dir: attrsets.mapAttrsToList (_username: config: config.home + "/" + dir) all-normal-users ) sus-user-dirs; - all-user-folders = attrsets.mapAttrsToList (_username: config: config.home) all-normal-users; all-system-folders = [ "/boot" "/etc" diff --git a/nixos/default.nix b/nixos/default.nix index eba4d4610..4d93e5976 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -103,22 +103,27 @@ }; }; - nix = let - flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; - in { - settings = { - experimental-features = "flakes nix-command"; - # Workaround for https://github.com/NixOS/nix/issues/9574 - nix-path = config.nix.nixPath; - trusted-users = [ "root" "${username}" ]; - warn-dirty = false; + nix = + let + flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in + { + settings = { + experimental-features = "flakes nix-command"; + # Workaround for https://github.com/NixOS/nix/issues/9574 + nix-path = config.nix.nixPath; + trusted-users = [ + "root" + "${username}" + ]; + warn-dirty = false; + }; + # Opinionated: disable channels + channel.enable = false; + # Opinionated: make flake registry and nix path match flake inputs + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; - # Opinionated: disable channels - channel.enable = false; - # Opinionated: make flake registry and nix path match flake inputs - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; - nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; - }; nixpkgs.hostPlatform = lib.mkDefault "${platform}"; diff --git a/nixos/shaa/default.nix b/nixos/shaa/default.nix index ddaf03a89..6666f7d64 100644 --- a/nixos/shaa/default.nix +++ b/nixos/shaa/default.nix @@ -33,10 +33,13 @@ # Force use of the thinkpad_acpi driver for backlight control. # This allows the backlight save/load systemd service to work. # Thinkpad T14s AMD Gen 1 does not wake up from suspend using 'deep' sleep. - kernelParams = [ "acpi_backlight=native" "mem_sleep_default=s2idle" ]; + kernelParams = [ + "acpi_backlight=native" + "mem_sleep_default=s2idle" + ]; }; - hardware ={ + hardware = { trackpoint = { enable = lib.mkDefault true; emulateWheel = lib.mkDefault config.hardware.trackpoint.enable; From 2c55831976b5418ebf1d8d951b438881ce54a9e3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:15:30 +0100 Subject: [PATCH 04/12] style: nixfmt-plus for home-manager/ --- .../_mixins/desktop/apps/joplin/default.nix | 6 +- .../_mixins/desktop/features/gtk/default.nix | 3 +- .../desktop/hyprland/avizo/default.nix | 9 +- .../_mixins/desktop/hyprland/default.nix | 93 +-- .../desktop/hyprland/fuzzel/default.nix | 11 +- .../desktop/hyprland/grimblast/default.nix | 2 +- .../desktop/hyprland/hyprlock/default.nix | 132 ++-- .../desktop/hyprland/hyprpaper/default.nix | 14 +- .../desktop/hyprland/swaync/default.nix | 722 +++++++++--------- .../desktop/hyprland/waybar/default.nix | 716 +++++++++-------- .../desktop/hyprland/wlogout/default.nix | 22 +- home-manager/default.nix | 5 +- 12 files changed, 891 insertions(+), 844 deletions(-) diff --git a/home-manager/_mixins/desktop/apps/joplin/default.nix b/home-manager/_mixins/desktop/apps/joplin/default.nix index 3dfa1c0d2..b995c384b 100644 --- a/home-manager/_mixins/desktop/apps/joplin/default.nix +++ b/home-manager/_mixins/desktop/apps/joplin/default.nix @@ -12,11 +12,7 @@ in lib.mkIf (lib.elem username installFor) { # Jopin CLI fails to build on x86_64-darwin home = { - packages = with pkgs; [ - font-awesome_5 - ] ++ lib.optionals (platform != "x86_64-darwin") [ - joplin - ]; + packages = with pkgs; [ font-awesome_5 ] ++ lib.optionals (platform != "x86_64-darwin") [ joplin ]; }; programs.joplin-desktop = { diff --git a/home-manager/_mixins/desktop/features/gtk/default.nix b/home-manager/_mixins/desktop/features/gtk/default.nix index d078ea0ca..f7821a750 100644 --- a/home-manager/_mixins/desktop/features/gtk/default.nix +++ b/home-manager/_mixins/desktop/features/gtk/default.nix @@ -6,7 +6,8 @@ }: let inherit (pkgs.stdenv) isLinux; - buttonLayout = if config.wayland.windowManager.hyprland.enable then "appmenu" else "close,minimize,maximize"; + buttonLayout = + if config.wayland.windowManager.hyprland.enable then "appmenu" else "close,minimize,maximize"; in lib.mkIf isLinux { # TODO: Migrate to Colloid-gtk-theme 2024-06-18 or newer; now has catppuccin colors diff --git a/home-manager/_mixins/desktop/hyprland/avizo/default.nix b/home-manager/_mixins/desktop/hyprland/avizo/default.nix index fe76b443b..a61b10e08 100644 --- a/home-manager/_mixins/desktop/hyprland/avizo/default.nix +++ b/home-manager/_mixins/desktop/hyprland/avizo/default.nix @@ -1,9 +1,4 @@ -{ - lib, - pkgs, - ... -}: -{ +_: { # avizo is an osd notification daemon for audio and backlight # avizo provides volumectl and lightctl for controlling audio and backlight services = { @@ -23,7 +18,7 @@ image-opacity = 0.9; padding = 32; time = 2; - fade-in = 0.50; + fade-in = 0.5; fade-out = 0.75; width = 480; height = 240; diff --git a/home-manager/_mixins/desktop/hyprland/default.nix b/home-manager/_mixins/desktop/hyprland/default.nix index 3f45d493f..b51a7fad1 100644 --- a/home-manager/_mixins/desktop/hyprland/default.nix +++ b/home-manager/_mixins/desktop/hyprland/default.nix @@ -5,7 +5,6 @@ ... }: let - isLaptop = hostname != "vader" && hostname != "phasma" && hostname != "revan"; monitors = (import ./monitors.nix { }).${hostname}; in { @@ -46,9 +45,7 @@ in wayland.windowManager.hyprland = { enable = true; catppuccin.enable = true; - plugins = with pkgs; [ - hyprlandPlugins.hyprtrails - ]; + plugins = with pkgs; [ hyprlandPlugins.hyprtrails ]; settings = { inherit (monitors) monitor; "$mod" = "SUPER"; @@ -62,48 +59,54 @@ in # Move windows with $mod + LMB and dragging "$mod, mouse:272, movewindow" ]; - bind = [ - # Process management - "$mod, Q, killactive" - # Launch applications - "$mod, E, exec, nautilus --new-window" - "$mod, T, exec, alacritty" - # Move focus - "ALT, Tab, cyclenext" - "ALT, Tab, bringactivetotop" - "ALT SHIFT, Tab, cyclenext, prev" - "ALT SHIFT, Tab, bringactivetotop" - # Move focus with SHIFT + arrow keys - "SHIFT, left, movefocus, l" - "SHIFT, right, movefocus, r" - "SHIFT, up, movefocus, u" - "SHIFT, down, movefocus, d" - "$mod, left, swapwindow, l" - "$mod, right, swapwindow, r" - "$mod, up, fullscreen, 1" - "$mod, down, swapwindow, d" - "$mod, F, togglefloating" - "$mod, P, pseudo" - # Switch workspace - "CTRL ALT, left, workspace, e-1" - "CTRL ALT, right, workspace, e+1" - ] ++ ( - # workspaces - # binds ctrl + alt + {1..8} to switch to workspace {1..8} - # binds $mod + alt + {1..8} to move window to workspace {1..8} - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 9; + bind = + [ + # Process management + "$mod, Q, killactive" + # Launch applications + "$mod, E, exec, nautilus --new-window" + "$mod, T, exec, alacritty" + # Move focus + "ALT, Tab, cyclenext" + "ALT, Tab, bringactivetotop" + "ALT SHIFT, Tab, cyclenext, prev" + "ALT SHIFT, Tab, bringactivetotop" + # Move focus with SHIFT + arrow keys + "SHIFT, left, movefocus, l" + "SHIFT, right, movefocus, r" + "SHIFT, up, movefocus, u" + "SHIFT, down, movefocus, d" + "$mod, left, swapwindow, l" + "$mod, right, swapwindow, r" + "$mod, up, fullscreen, 1" + "$mod, down, swapwindow, d" + "$mod, F, togglefloating" + "$mod, P, pseudo" + # Switch workspace + "CTRL ALT, left, workspace, e-1" + "CTRL ALT, right, workspace, e+1" + ] + ++ ( + # workspaces + # binds ctrl + alt + {1..8} to switch to workspace {1..8} + # binds $mod + alt + {1..8} to move window to workspace {1..8} + builtins.concatLists ( + builtins.genList ( + x: + let + ws = + let + c = (x + 1) / 9; + in + builtins.toString (x + 1 - (c * 9)); in - builtins.toString (x + 1 - (c * 9)); - in [ - "CTRL ALT, ${ws}, workspace, ${toString (x + 1)}" - "$mod ALT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] + [ + "CTRL ALT, ${ws}, workspace, ${toString (x + 1)}" + "$mod ALT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) 9 ) - 9) - ); + ); # https://wiki.hyprland.org/Configuring/Variables/#animations animations = { enabled = true; @@ -140,7 +143,7 @@ in shadow_range = 304; shadow_render_power = 4; shadow_offset = "0, 42"; - shadow_scale = 0.90; + shadow_scale = 0.9; }; #https://wiki.hyprland.org/Configuring/Master-Layout/ master = { diff --git a/home-manager/_mixins/desktop/hyprland/fuzzel/default.nix b/home-manager/_mixins/desktop/hyprland/fuzzel/default.nix index 5246d684e..0659b9bc7 100644 --- a/home-manager/_mixins/desktop/hyprland/fuzzel/default.nix +++ b/home-manager/_mixins/desktop/hyprland/fuzzel/default.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: { # Fuzzel powered app launcher, emoji picker and clipboard manager for Hyprland home = { @@ -29,9 +24,7 @@ }; wayland.windowManager.hyprland = { settings = { - bindr = [ - "$mod, SUPER_L, exec, fuzzel --prompt '󰵆 > '" - ]; + bindr = [ "$mod, SUPER_L, exec, fuzzel --prompt '󰵆 > '" ]; bind = [ "$mod, SPACE, exec, fuzzel --prompt '󰌧 > ' --show-actions" "CTRL ALT, C, exec, cliphist list | fuzzel --dmenu --prompt '󰅌 > ' | cliphist decode | wl-copy --primary --regular --trim-newline" diff --git a/home-manager/_mixins/desktop/hyprland/grimblast/default.nix b/home-manager/_mixins/desktop/hyprland/grimblast/default.nix index 769e2bec9..14ca71f61 100644 --- a/home-manager/_mixins/desktop/hyprland/grimblast/default.nix +++ b/home-manager/_mixins/desktop/hyprland/grimblast/default.nix @@ -30,7 +30,7 @@ "SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} save area - | ${lib.getExe pkgs.swappy} -f -" "CTRL ALT, Print, exec, ${lib.getExe pkgs.grimblast} save active - | ${lib.getExe pkgs.swappy} -f -" "CTRL, Print, exec, ${lib.getExe pkgs.grimblast} save output - | ${lib.getExe pkgs.swappy} -f -" - ]; + ]; }; }; } diff --git a/home-manager/_mixins/desktop/hyprland/hyprlock/default.nix b/home-manager/_mixins/desktop/hyprland/hyprlock/default.nix index ee6af15bc..dda8c5cbe 100644 --- a/home-manager/_mixins/desktop/hyprland/hyprlock/default.nix +++ b/home-manager/_mixins/desktop/hyprland/hyprlock/default.nix @@ -1,14 +1,8 @@ -{ - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: let batteryLockInfo = pkgs.writeShellApplication { name = "battery-lock-info"; - runtimeInputs = with pkgs; [ - coreutils-full - ]; + runtimeInputs = with pkgs; [ coreutils-full ]; text = '' battery="BAT0" @@ -55,28 +49,32 @@ in no_fade_in = false; no_fade_out = false; }; - background = [{ - path = "screenshot"; - blur_passes = 3; - color = "rgb(1e1e2e)"; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - }]; - image = [{ - # Avatar - path = "$HOME/.face"; - border_size = 2; - border_color = "rgba(137, 180, 250, 0.7)"; - size = 130; - rounding = -1; - rotate = 0; - reload_time = -1; - position = "0, 40"; - halign = "center"; - valign = "center"; - }]; + background = [ + { + path = "screenshot"; + blur_passes = 3; + color = "rgb(1e1e2e)"; + contrast = 0.8916; + brightness = 0.8172; + vibrancy = 0.1696; + vibrancy_darkness = 0.0; + } + ]; + image = [ + { + # Avatar + path = "$HOME/.face"; + border_size = 2; + border_color = "rgba(137, 180, 250, 0.7)"; + size = 130; + rounding = -1; + rotate = 0; + reload_time = -1; + position = "0, 40"; + halign = "center"; + valign = "center"; + } + ]; label = [ { # Date (1 hour) @@ -130,41 +128,45 @@ in } ]; # Username box - shape = [{ - size = "300, 60"; - position = "0, -130"; - color = "rgba(88, 91, 112, 1.0)"; - rounding = 8; - border_size = 2; - border_color = "rgba(137, 180, 250, 1.0)"; - rotate = 0; - xray = false; # do not make a "hole" in the background - halign = "center"; - valign = "center"; - }]; + shape = [ + { + size = "300, 60"; + position = "0, -130"; + color = "rgba(88, 91, 112, 1.0)"; + rounding = 8; + border_size = 2; + border_color = "rgba(137, 180, 250, 1.0)"; + rotate = 0; + xray = false; # do not make a "hole" in the background + halign = "center"; + valign = "center"; + } + ]; # Password - input-field = [{ - size = "300, 60"; - position = "0, -210"; - outline_thickness = 2; - dots_size = 0.2; - dots_spacing = 0.2; - dots_center = true; - fade_on_empty = false; - placeholder_text = ''󰌋 enter password''; - fail_text = " incorrect ($ATTEMPTS)"; - fail_timeout = 3000; - hide_input = false; - halign = "center"; - valign = "center"; - rounding = 8; - outer_color = "rgba(137, 180, 250, 1.0)"; - inner_color = "rgba(88, 91, 112, 1.0)"; - font_color = "rgba(205, 214, 244, 1.0)"; - capslock_color = "rgba(249, 226, 175, 1.0)"; - check_color = "rgba(205, 214, 244, 1.0)"; - fail_color = "rgba(243, 139, 168, 1.0)"; - }]; + input-field = [ + { + size = "300, 60"; + position = "0, -210"; + outline_thickness = 2; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + fade_on_empty = false; + placeholder_text = ''󰌋 enter password''; + fail_text = " incorrect ($ATTEMPTS)"; + fail_timeout = 3000; + hide_input = false; + halign = "center"; + valign = "center"; + rounding = 8; + outer_color = "rgba(137, 180, 250, 1.0)"; + inner_color = "rgba(88, 91, 112, 1.0)"; + font_color = "rgba(205, 214, 244, 1.0)"; + capslock_color = "rgba(249, 226, 175, 1.0)"; + check_color = "rgba(205, 214, 244, 1.0)"; + fail_color = "rgba(243, 139, 168, 1.0)"; + } + ]; }; }; }; @@ -195,7 +197,7 @@ in bind = [ "$mod, L, exec, ${lib.getExe pkgs.hyprlock} --immediate" "CTRL ALT, L, exec, ${lib.getExe pkgs.hyprlock} --immediate" - ]; + ]; }; }; } diff --git a/home-manager/_mixins/desktop/hyprland/hyprpaper/default.nix b/home-manager/_mixins/desktop/hyprland/hyprpaper/default.nix index 4cfef08b2..a63d51cdb 100644 --- a/home-manager/_mixins/desktop/hyprland/hyprpaper/default.nix +++ b/home-manager/_mixins/desktop/hyprland/hyprpaper/default.nix @@ -1,8 +1,4 @@ -{ - hostname, - ... -}: -{ +_: { # hyprpaper is a wallpaper manager and part of the hyprland suite # TODO: Use correct wallpaper path for each host services = { @@ -11,12 +7,8 @@ settings = { splash = false; splash_offset = 2.0; - preload = [ - "/etc/backgrounds/DeterminateColorway-1920x1080.png" - ]; - wallpaper = [ - ", /etc/backgrounds/DeterminateColorway-1920x1080.png" - ]; + preload = [ "/etc/backgrounds/DeterminateColorway-1920x1080.png" ]; + wallpaper = [ ", /etc/backgrounds/DeterminateColorway-1920x1080.png" ]; }; }; }; diff --git a/home-manager/_mixins/desktop/hyprland/swaync/default.nix b/home-manager/_mixins/desktop/hyprland/swaync/default.nix index 92fdd810d..56d993f85 100644 --- a/home-manager/_mixins/desktop/hyprland/swaync/default.nix +++ b/home-manager/_mixins/desktop/hyprland/swaync/default.nix @@ -1,8 +1,4 @@ -{ - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: { # swaync is a notification daemon services = { @@ -23,13 +19,31 @@ ]; widget-config = { buttons-grid.actions = [ - { label = "󰹑"; command = "${lib.getExe pkgs.grimblast} save screen - | ${lib.getExe pkgs.swappy} -f -"; } - { label = "󱩌"; command = "notify-desktop NightLight"; } - { label = "󰍹"; command = "${lib.getExe pkgs.wdisplays}"; } - { label = ""; command = "${lib.getExe pkgs.gnome-usage}"; } - { label = "󰀝"; command = "notify-desktop AirplaneMode"; } + { + label = "󰹑"; + command = "${lib.getExe pkgs.grimblast} save screen - | ${lib.getExe pkgs.swappy} -f -"; + } + { + label = "󱩌"; + command = "notify-desktop NightLight"; + } + { + label = "󰍹"; + command = "${lib.getExe pkgs.wdisplays}"; + } + { + label = ""; + command = "${lib.getExe pkgs.gnome-usage}"; + } + { + label = "󰀝"; + command = "notify-desktop AirplaneMode"; + } # 󰀞 - { label = "󰐥"; command = "${lib.getExe pkgs.wlogout} --buttons-per-row 5 --no-span"; } + { + label = "󰐥"; + command = "${lib.getExe pkgs.wlogout} --buttons-per-row 5 --no-span"; + } ]; title = { text = "Notifications"; @@ -51,349 +65,349 @@ # https://github.com/catppuccin/swaync # 0.2.3 (mocha) style = '' - * { - all: unset; - font-size: 20px; - font-family: "Work Sans"; - transition: 200ms; - } - - trough highlight { - background: #cdd6f4; - } - - scale trough { - margin: 0rem 1rem; - background-color: #313244; - min-height: 8px; - min-width: 70px; - } - - slider { - background-color: #89b4fa; - } - - .floating-notifications.background .notification-row .notification-background { - box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; - border-radius: 12.6px; - margin: 18px; - background-color: #1e1e2e; - color: #cdd6f4; - padding: 0; - } - - .floating-notifications.background .notification-row .notification-background .notification { - padding: 7px; - border-radius: 12.6px; - } - - .floating-notifications.background .notification-row .notification-background .notification.critical { - box-shadow: inset 0 0 7px 0 #f38ba8; - } - - .floating-notifications.background .notification-row .notification-background .notification .notification-content { - margin: 7px; - } - - .floating-notifications.background .notification-row .notification-background .notification .notification-content .summary { - color: #cdd6f4; - } - - .floating-notifications.background .notification-row .notification-background .notification .notification-content .time { - color: #a6adc8; - } - - .floating-notifications.background .notification-row .notification-background .notification .notification-content .body { - color: #cdd6f4; - } - - .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * { - min-height: 3.4em; - } - - .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action { - border-radius: 7px; - color: #cdd6f4; - background-color: #313244; - box-shadow: inset 0 0 0 1px #45475a; - margin: 7px; - } - - .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #313244; - color: #cdd6f4; - } - - .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #74c7ec; - color: #cdd6f4; - } - - .floating-notifications.background .notification-row .notification-background .close-button { - margin: 7px; - padding: 2px; - border-radius: 6.3px; - color: #1e1e2e; - background-color: #f38ba8; - } - - .floating-notifications.background .notification-row .notification-background .close-button:hover { - background-color: #eba0ac; - color: #1e1e2e; - } - - .floating-notifications.background .notification-row .notification-background .close-button:active { - background-color: #f38ba8; - color: #1e1e2e; - } - - .control-center { - box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; - border-radius: 12.6px; - margin: 18px; - background-color: #1e1e2e; - color: #cdd6f4; - padding: 14px; - } - - .control-center .widget-title > label { - color: #cdd6f4; - font-size: 1.3em; - } - - .control-center .widget-title button { - border-radius: 7px; - color: #cdd6f4; - background-color: #313244; - box-shadow: inset 0 0 0 1px #45475a; - padding: 8px; - } - - .control-center .widget-title button:hover { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #585b70; - color: #cdd6f4; - } - - .control-center .widget-title button:active { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #74c7ec; - color: #1e1e2e; - } - - .control-center .notification-row .notification-background { - border-radius: 7px; - color: #cdd6f4; - background-color: #313244; - box-shadow: inset 0 0 0 1px #45475a; - margin-top: 14px; - } - - .control-center .notification-row .notification-background .notification { - padding: 7px; - border-radius: 7px; - } - - .control-center .notification-row .notification-background .notification.critical { - box-shadow: inset 0 0 7px 0 #f38ba8; - } - - .control-center .notification-row .notification-background .notification .notification-content { - margin: 7px; - } - - .control-center .notification-row .notification-background .notification .notification-content .summary { - color: #cdd6f4; - } - - .control-center .notification-row .notification-background .notification .notification-content .time { - color: #a6adc8; - } - - .control-center .notification-row .notification-background .notification .notification-content .body { - color: #cdd6f4; - } - - .control-center .notification-row .notification-background .notification > *:last-child > * { - min-height: 3.4em; - } - - .control-center .notification-row .notification-background .notification > *:last-child > * .notification-action { - border-radius: 7px; - color: #cdd6f4; - background-color: #11111b; - box-shadow: inset 0 0 0 1px #45475a; - margin: 7px; - } - - .control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #313244; - color: #cdd6f4; - } - - .control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #74c7ec; - color: #cdd6f4; - } - - .control-center .notification-row .notification-background .close-button { - margin: 7px; - padding: 2px; - border-radius: 6.3px; - color: #1e1e2e; - background-color: #eba0ac; - } - - .close-button { - border-radius: 6.3px; - } - - .control-center .notification-row .notification-background .close-button:hover { - background-color: #f38ba8; - color: #1e1e2e; - } - - .control-center .notification-row .notification-background .close-button:active { - background-color: #f38ba8; - color: #1e1e2e; - } - - .control-center .notification-row .notification-background:hover { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #7f849c; - color: #cdd6f4; - } - - .control-center .notification-row .notification-background:active { - box-shadow: inset 0 0 0 1px #45475a; - background-color: #74c7ec; - color: #cdd6f4; - } - - .notification.critical progress { - background-color: #f38ba8; - } - - .notification.low progress, - .notification.normal progress { - background-color: #89b4fa; - } - - .control-center-dnd { - margin-top: 5px; - border-radius: 8px; - background: #313244; - border: 1px solid #45475a; - box-shadow: none; - } - - .control-center-dnd:checked { - background: #313244; - } - - .control-center-dnd slider { - background: #45475a; - border-radius: 8px; - } - - .widget-dnd { - margin: 0px; - font-size: 1.1rem; - } - - .widget-dnd > switch { - font-size: initial; - border-radius: 8px; - background: #313244; - border: 1px solid #45475a; - box-shadow: none; - } - - .widget-dnd > switch:checked { - background: #313244; - } - - .widget-dnd > switch slider { - background: #45475a; - border-radius: 8px; - border: 1px solid #6c7086; - } - - .widget-mpris .widget-mpris-player { - background: #313244; - padding: 7px; - } - - .widget-mpris .widget-mpris-title { - font-size: 1.2rem; - } - - .widget-mpris .widget-mpris-subtitle { - font-size: 0.8rem; - } - - .widget-menubar > box > .menu-button-bar > button > label { - font-size: 3rem; - padding: 0.5rem 2rem; - } - - .widget-menubar > box > .menu-button-bar > :last-child { - color: #f38ba8; - } - - .power-buttons button:hover, - .powermode-buttons button:hover, - .screenshot-buttons button:hover { - background: #313244; - } - - .control-center .widget-label > label { - color: #cdd6f4; - font-size: 2rem; - } - - .widget-buttons-grid { - padding-top: 1rem; - } - - .widget-buttons-grid > flowbox > flowboxchild > button label { - font-family: "FiraCode Nerd Font Mono"; - font-size: 2rem; - } - - .widget-volume { - padding-top: 1rem; - } - - .widget-volume label { - font-size: 1.5rem; - color: #74c7ec; - } - - .widget-volume trough highlight { - background: #74c7ec; - } - - .widget-backlight trough highlight { - background: #f9e2af; - } - - .widget-backlight label { - font-size: 1.5rem; - color: #f9e2af; - } - - .widget-backlight .KB { - padding-bottom: 1rem; - } - - .image { - padding-right: 0.5rem; - } + * { + all: unset; + font-size: 20px; + font-family: "Work Sans"; + transition: 200ms; + } + + trough highlight { + background: #cdd6f4; + } + + scale trough { + margin: 0rem 1rem; + background-color: #313244; + min-height: 8px; + min-width: 70px; + } + + slider { + background-color: #89b4fa; + } + + .floating-notifications.background .notification-row .notification-background { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; + border-radius: 12.6px; + margin: 18px; + background-color: #1e1e2e; + color: #cdd6f4; + padding: 0; + } + + .floating-notifications.background .notification-row .notification-background .notification { + padding: 7px; + border-radius: 12.6px; + } + + .floating-notifications.background .notification-row .notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #f38ba8; + } + + .floating-notifications.background .notification-row .notification-background .notification .notification-content { + margin: 7px; + } + + .floating-notifications.background .notification-row .notification-background .notification .notification-content .summary { + color: #cdd6f4; + } + + .floating-notifications.background .notification-row .notification-background .notification .notification-content .time { + color: #a6adc8; + } + + .floating-notifications.background .notification-row .notification-background .notification .notification-content .body { + color: #cdd6f4; + } + + .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * { + min-height: 3.4em; + } + + .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + margin: 7px; + } + + .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #313244; + color: #cdd6f4; + } + + .floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #cdd6f4; + } + + .floating-notifications.background .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #1e1e2e; + background-color: #f38ba8; + } + + .floating-notifications.background .notification-row .notification-background .close-button:hover { + background-color: #eba0ac; + color: #1e1e2e; + } + + .floating-notifications.background .notification-row .notification-background .close-button:active { + background-color: #f38ba8; + color: #1e1e2e; + } + + .control-center { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; + border-radius: 12.6px; + margin: 18px; + background-color: #1e1e2e; + color: #cdd6f4; + padding: 14px; + } + + .control-center .widget-title > label { + color: #cdd6f4; + font-size: 1.3em; + } + + .control-center .widget-title button { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + padding: 8px; + } + + .control-center .widget-title button:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #585b70; + color: #cdd6f4; + } + + .control-center .widget-title button:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #1e1e2e; + } + + .control-center .notification-row .notification-background { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + margin-top: 14px; + } + + .control-center .notification-row .notification-background .notification { + padding: 7px; + border-radius: 7px; + } + + .control-center .notification-row .notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #f38ba8; + } + + .control-center .notification-row .notification-background .notification .notification-content { + margin: 7px; + } + + .control-center .notification-row .notification-background .notification .notification-content .summary { + color: #cdd6f4; + } + + .control-center .notification-row .notification-background .notification .notification-content .time { + color: #a6adc8; + } + + .control-center .notification-row .notification-background .notification .notification-content .body { + color: #cdd6f4; + } + + .control-center .notification-row .notification-background .notification > *:last-child > * { + min-height: 3.4em; + } + + .control-center .notification-row .notification-background .notification > *:last-child > * .notification-action { + border-radius: 7px; + color: #cdd6f4; + background-color: #11111b; + box-shadow: inset 0 0 0 1px #45475a; + margin: 7px; + } + + .control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #313244; + color: #cdd6f4; + } + + .control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #cdd6f4; + } + + .control-center .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #1e1e2e; + background-color: #eba0ac; + } + + .close-button { + border-radius: 6.3px; + } + + .control-center .notification-row .notification-background .close-button:hover { + background-color: #f38ba8; + color: #1e1e2e; + } + + .control-center .notification-row .notification-background .close-button:active { + background-color: #f38ba8; + color: #1e1e2e; + } + + .control-center .notification-row .notification-background:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #7f849c; + color: #cdd6f4; + } + + .control-center .notification-row .notification-background:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #cdd6f4; + } + + .notification.critical progress { + background-color: #f38ba8; + } + + .notification.low progress, + .notification.normal progress { + background-color: #89b4fa; + } + + .control-center-dnd { + margin-top: 5px; + border-radius: 8px; + background: #313244; + border: 1px solid #45475a; + box-shadow: none; + } + + .control-center-dnd:checked { + background: #313244; + } + + .control-center-dnd slider { + background: #45475a; + border-radius: 8px; + } + + .widget-dnd { + margin: 0px; + font-size: 1.1rem; + } + + .widget-dnd > switch { + font-size: initial; + border-radius: 8px; + background: #313244; + border: 1px solid #45475a; + box-shadow: none; + } + + .widget-dnd > switch:checked { + background: #313244; + } + + .widget-dnd > switch slider { + background: #45475a; + border-radius: 8px; + border: 1px solid #6c7086; + } + + .widget-mpris .widget-mpris-player { + background: #313244; + padding: 7px; + } + + .widget-mpris .widget-mpris-title { + font-size: 1.2rem; + } + + .widget-mpris .widget-mpris-subtitle { + font-size: 0.8rem; + } + + .widget-menubar > box > .menu-button-bar > button > label { + font-size: 3rem; + padding: 0.5rem 2rem; + } + + .widget-menubar > box > .menu-button-bar > :last-child { + color: #f38ba8; + } + + .power-buttons button:hover, + .powermode-buttons button:hover, + .screenshot-buttons button:hover { + background: #313244; + } + + .control-center .widget-label > label { + color: #cdd6f4; + font-size: 2rem; + } + + .widget-buttons-grid { + padding-top: 1rem; + } + + .widget-buttons-grid > flowbox > flowboxchild > button label { + font-family: "FiraCode Nerd Font Mono"; + font-size: 2rem; + } + + .widget-volume { + padding-top: 1rem; + } + + .widget-volume label { + font-size: 1.5rem; + color: #74c7ec; + } + + .widget-volume trough highlight { + background: #74c7ec; + } + + .widget-backlight trough highlight { + background: #f9e2af; + } + + .widget-backlight label { + font-size: 1.5rem; + color: #f9e2af; + } + + .widget-backlight .KB { + padding-bottom: 1rem; + } + + .image { + padding-right: 0.5rem; + } ''; }; }; diff --git a/home-manager/_mixins/desktop/hyprland/waybar/default.nix b/home-manager/_mixins/desktop/hyprland/waybar/default.nix index 568f9f98e..82b595d36 100644 --- a/home-manager/_mixins/desktop/hyprland/waybar/default.nix +++ b/home-manager/_mixins/desktop/hyprland/waybar/default.nix @@ -1,9 +1,4 @@ -{ - hostname, - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: let bluetoothToggle = pkgs.writeShellApplication { name = "bluetooth-toggle"; @@ -30,374 +25,425 @@ in enable = true; catppuccin.enable = true; style = '' -* { - font-family: FiraCode Nerd Font Mono; - font-size: 22px; - min-height: 0; -} + * { + font-family: FiraCode Nerd Font Mono; + font-size: 22px; + min-height: 0; + } -tooltip { - background: @mantle; - opacity: 0.95; - border: 1px solid @blue; -} + tooltip { + background: @mantle; + opacity: 0.95; + border: 1px solid @blue; + } -tooltip label { - color: @text; - font-family: Work Sans; - font-size: 18px; -} + tooltip label { + color: @text; + font-family: Work Sans; + font-size: 18px; + } -#waybar { - background: transparent; - color: @text; - margin: 5px 0 0 0; -} + #waybar { + background: transparent; + color: @text; + margin: 5px 0 0 0; + } -#workspaces { - border-radius: 0.75rem; - background-color: @base; - margin: 5px 0 0 0.5rem; - opacity: 0.9; -} + #workspaces { + border-radius: 0.75rem; + background-color: @base; + margin: 5px 0 0 0.5rem; + opacity: 0.9; + } -#workspaces button { - border-radius: 0.75rem; - color: @mauve; - padding: 0.25rem 0.75rem; -} + #workspaces button { + border-radius: 0.75rem; + color: @mauve; + padding: 0.25rem 0.75rem; + } -#workspaces button.active { - color: @peach; -} + #workspaces button.active { + color: @peach; + } -#workspaces button:hover { - background-color: @mantle; -} + #workspaces button:hover { + background-color: @mantle; + } -#idle_inhibitor { - border-radius: 0.75rem 0 0 0.75rem; - color: @flamingo; -} + #idle_inhibitor { + border-radius: 0.75rem 0 0 0.75rem; + color: @flamingo; + } -#clock { - color: @rosewater; - font-size: 16px; -} + #clock { + color: @rosewater; + font-size: 16px; + } -#custom-swaync { - border-radius: 0 0.75rem 0.75rem 0; - color: @flamingo; -} + #custom-swaync { + border-radius: 0 0.75rem 0.75rem 0; + color: @flamingo; + } -#idle_inhibitor, -#clock, -#custom-swaync { - background-color: @base; - margin: 5px 0 0 0; - padding: 0.25rem 0.75rem; - opacity: 0.9; -} + #idle_inhibitor, + #clock, + #custom-swaync { + background-color: @base; + margin: 5px 0 0 0; + padding: 0.25rem 0.75rem; + opacity: 0.9; + } -#idle_inhibitor:hover, -#clock:hover, -#custom-swaync:hover { - background-color: #242536; -} + #idle_inhibitor:hover, + #clock:hover, + #custom-swaync:hover { + background-color: #242536; + } -#tray { - margin-right: 1rem; - border-radius: 0.75rem; -} + #tray { + margin-right: 1rem; + border-radius: 0.75rem; + } -#tray menu * { - font-family: Work Sans; - font-size: 18px; -} + #tray menu * { + font-family: Work Sans; + font-size: 18px; + } -#tray, -#wireplumber, -#pulseaudio, -#bluetooth, -#network, -#backlight, -#temperature, -#power-profiles-daemon, -#battery, -#custom-session { - background-color: @base; - margin: 5px 0 0 0; - padding: 0.25rem 0.75rem; - opacity: 0.9; -} + #tray, + #wireplumber, + #pulseaudio, + #bluetooth, + #network, + #backlight, + #temperature, + #power-profiles-daemon, + #battery, + #custom-session { + background-color: @base; + margin: 5px 0 0 0; + padding: 0.25rem 0.75rem; + opacity: 0.9; + } -#wireplumber:hover, -#pulseaudio:hover, -#bluetooth:hover, -#network:hover, -#backlight:hover, -#temperature:hover, -#power-profiles-daemon:hover, -#battery:hover, -#custom-session:hover { - background-color: #242536; -} + #wireplumber:hover, + #pulseaudio:hover, + #bluetooth:hover, + #network:hover, + #backlight:hover, + #temperature:hover, + #power-profiles-daemon:hover, + #battery:hover, + #custom-session:hover { + background-color: #242536; + } -#wireplumber { - color: @mauve; - border-radius: 0.75rem 0 0 0.75rem; - margin-left: 1rem; -} + #wireplumber { + color: @mauve; + border-radius: 0.75rem 0 0 0.75rem; + margin-left: 1rem; + } -#pulseaudio { - border-radius: 0; - color: @mauve; -} + #pulseaudio { + border-radius: 0; + color: @mauve; + } -#bluetooth { - border-radius: 0; - color: @blue; -} + #bluetooth { + border-radius: 0; + color: @blue; + } -#network { - border-radius: 0; - color: @sapphire; -} + #network { + border-radius: 0; + color: @sapphire; + } -#backlight { - border-radius: 0; - color: @yellow; -} + #backlight { + border-radius: 0; + color: @yellow; + } -#temperature { - border-radius: 0; - color: @peach; -} + #temperature { + border-radius: 0; + color: @peach; + } -#temperature.critical { - color: @red; -} + #temperature.critical { + color: @red; + } -#power-profiles-daemon { - border-radius: 0; - color: @maroon; - font-size: 25px; -} + #power-profiles-daemon { + border-radius: 0; + color: @maroon; + font-size: 25px; + } -#battery { - border-radius: 0 0.75rem 0.75rem 0; - color: @green; - margin-right: 1rem; -} + #battery { + border-radius: 0 0.75rem 0.75rem 0; + color: @green; + margin-right: 1rem; + } -#battery.charging { - color: @green; -} + #battery.charging { + color: @green; + } -#battery.warning:not(.charging) { - color: @red; -} + #battery.warning:not(.charging) { + color: @red; + } -#custom-session { - border-radius: 0.75rem; - color: @red; - margin-right: 0.5rem; -} + #custom-session { + border-radius: 0.75rem; + color: @red; + margin-right: 0.5rem; + } ''; - settings = [{ - exclusive = true; - layer = "top"; - position = "top"; - modules-left = [ "hyprland/workspaces" ]; - modules-center = [ "idle_inhibitor" "clock" "custom/swaync" ]; - modules-right = [ "tray" "wireplumber" "pulseaudio" "bluetooth" "network" "backlight" "temperature" "power-profiles-daemon" "battery" "custom/session" ]; - "hyprland/workspaces" = { - active-only = false; - all-outputs = true; - format = "{icon}"; - format-icons = { - "1" = "󰖟"; - "2" = "󱒔"; - "3" = "󰭹"; - "4" = "󰅴"; - "5" = "󱆃"; - "6" = "󰡨"; - "7" = "󰦔"; - "8" = "󰺵"; + settings = [ + { + exclusive = true; + layer = "top"; + position = "top"; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ + "idle_inhibitor" + "clock" + "custom/swaync" + ]; + modules-right = [ + "tray" + "wireplumber" + "pulseaudio" + "bluetooth" + "network" + "backlight" + "temperature" + "power-profiles-daemon" + "battery" + "custom/session" + ]; + "hyprland/workspaces" = { + active-only = false; + all-outputs = true; + format = "{icon}"; + format-icons = { + "1" = "󰖟"; + "2" = "󱒔"; + "3" = "󰭹"; + "4" = "󰅴"; + "5" = "󱆃"; + "6" = "󰡨"; + "7" = "󰦔"; + "8" = "󰺵"; + }; + persistent_workspaces = { + # TODO: On desktops workstations, only put workspace 6 (Cast) on the dummy output + # https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#persistent-workspaces + "*" = 8; + }; + on-click = "activate"; }; - persistent_workspaces = { - # TODO: On desktops workstations, only put workspace 6 (Cast) on the dummy output - # https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#persistent-workspaces - "*" = 8; + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = "󰅶"; + deactivated = "󰾪"; + }; + start-activated = false; + tooltip-format-activated = "󰅶 Caffeination {status}"; + tooltip-format-deactivated = "󰾪 Caffeination {status}"; }; - on-click = "activate"; - }; - idle_inhibitor = { - format = "{icon}"; - format-icons = { - activated = "󰅶"; - deactivated = "󰾪"; + clock = { + actions = { + on-click = "shift_down"; + on-click-middle = "shift_reset"; + on-click-right = "shift_up"; + }; + calendar = { + mode = "year"; + mode-mon-col = 3; + on-scroll = 1; + weeks-pos = "right"; + format = { + days = "{}"; + months = "{}"; + weeks = "󱦰{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + format = "{:%H:%M}"; + format-alt = "{:%a, %d %b %R}"; + interval = 60; + timezone = "Europe/London"; + #timezones = [ "Europe/London" "Europe/Amsterdam" "America/Boston" "America/Los_Angeles" "Africa/Lagos" ]; + tooltip-format = "{calendar}"; }; - start-activated = false; - tooltip-format-activated = "󰅶 Caffeination {status}"; - tooltip-format-deactivated = "󰾪 Caffeination {status}"; - }; - clock = { - actions = { - on-click = "shift_down"; - on-click-middle = "shift_reset"; - on-click-right = "shift_up"; + #https://haseebmajid.dev/posts/2024-03-15-til-how-to-get-swaync-to-play-nice-with-waybar/ + "custom/swaync" = { + format = "{icon}"; + format-icons = { + none = ""; + notification = "󱅫"; + dnd-none = "󰂠"; + dnd-notification = "󰂞"; + inhibited-none = ""; + inhibited-notification = "󰅸"; + dnd-inhibited-none = "󰪓"; + dnd-inhibited-notification = "󰂟"; + }; + max-length = 3; + return-type = "json"; + escape = true; + exec-if = "which ${pkgs.swaynotificationcenter}/bin/swaync-client"; + exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar"; + on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait"; + on-click-middle = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait"; + tooltip-format = "󰵚 {} notification(s)"; }; - calendar = { - mode = "year"; - mode-mon-col = 3; - on-scroll = 1; - weeks-pos = "right"; - format = { - days = "{}"; - months = "{}"; - weeks = "󱦰{}"; - weekdays = "{}"; - today = "{}"; + tray = { + icon-size = 22; + spacing = 12; + }; + wireplumber = { + scroll-step = 5; + format = "{icon}"; + format-alt = "{icon} {volume}󰏰"; + format-muted = "󰖁"; + format-icons = { + default = [ + "󰕿" + "󰖀" + "󰕾" + ]; }; + max-volume = 100; + on-click-middle = "${pkgs.avizo}/bin/volumectl toggle-mute"; + on-click-right = "${lib.getExe pkgs.pwvucontrol}"; + on-scroll-up = "${pkgs.avizo}/bin/volumectl -u up 2"; + on-scroll-down = "${pkgs.avizo}/bin/volumectl -u down 2"; + tooltip-format = "󰓃 {volume}󰏰\n󰒓 {node_name}"; + }; + pulseaudio = { + format = "{format_source}"; + format-alt = "{format_source} {source_volume}󰏰"; + format-source = "󰍰"; + format-source-muted = "󰍱"; + on-click-middle = "${pkgs.avizo}/bin/volumectl -m toggle-mute"; + on-click-right = "${lib.getExe pkgs.pwvucontrol}"; + on-scroll-up = "${pkgs.avizo}/bin/volumectl -m up 2"; + on-scroll-down = "${pkgs.avizo}/bin/volumectl -m down 2"; + tooltip-format = " {source_volume}󰏰\n󰒓 {desc}"; }; - format = "{:%H:%M}"; - format-alt = "{:%a, %d %b %R}"; - interval = 60; - timezone = "Europe/London"; - #timezones = [ "Europe/London" "Europe/Amsterdam" "America/Boston" "America/Los_Angeles" "Africa/Lagos" ]; - tooltip-format = "{calendar}"; - }; - #https://haseebmajid.dev/posts/2024-03-15-til-how-to-get-swaync-to-play-nice-with-waybar/ - "custom/swaync" = { - format = "{icon}"; - format-icons = { - none = ""; - notification = "󱅫"; - dnd-none = "󰂠"; - dnd-notification = "󰂞"; - inhibited-none = ""; - inhibited-notification = "󰅸"; - dnd-inhibited-none = "󰪓"; - dnd-inhibited-notification = "󰂟"; + network = { + format = "{icon}"; + format-alt = " {bandwidthDownBits}{bandwidthUpBits}"; + format-ethernet = "󰈀"; + format-disconnected = "󱚵"; + format-linked = ""; + format-wifi = "󰖩"; + interval = 2; + on-click-right = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; + tooltip-format = " {ifname}\n󰩠 {ipaddr} via {gwaddr}\n {bandwidthDownBits}\t {bandwidthUpBits}"; + tooltip-format-wifi = "󱛁 {essid} \n󰒢 {signalStrength}󰏰\n󰩠 {ipaddr} via {gwaddr}\n {bandwidthDownBits}\t {bandwidthUpBits}"; + tooltip-format-ethernet = "󰈀 {ifname}\n󰩠 {ipaddr} via {gwaddr})\n {bandwidthDownBits}\t {bandwidthUpBits}"; + tooltip-format-disconnected = "󱚵 disconnected"; }; - max-length = 3; - return-type = "json"; - escape = true; - exec-if = "which ${pkgs.swaynotificationcenter}/bin/swaync-client"; - exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar"; - on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait"; - on-click-middle = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait"; - tooltip-format = "󰵚 {} notification(s)"; - }; - tray = { - icon-size = 22; - spacing = 12; - }; - wireplumber = { - scroll-step = 5; - format = "{icon}"; - format-alt = "{icon} {volume}󰏰"; - format-muted = "󰖁"; - format-icons = { - default = [ "󰕿" "󰖀" "󰕾" ]; + bluetooth = { + format = "{icon}"; + format-connected = "󰂱"; + format-disabled = "󰂲"; + format-on = "󰂯"; + format-off = "󰂲"; + on-click-middle = "${lib.getExe bluetoothToggle}"; + on-click-right = "${lib.getExe pkgs.overskride}"; + tooltip-format = " {controller_alias}\n󰿀 {controller_address}\n󰂴 {num_connections} connected"; + tooltip-format-connected = "󰂱 {controller_alias}\n󰿀 {controller_address}\n󰂴 {num_connections} connected\n{device_enumerate}"; + tooltip-format-disabled = "󰂲 {controller_alias}\n󰿀 {controller_address}\n󰂳 {status}"; + tooltip-format-enumerate-connected = "󰂱 {device_alias}\n󰿀 {device_address}"; + tooltip-format-enumerate-connected-battery = "󰂱 {device_alias}\t󰿀 {device_address}\n󰥉 {device_battery_percentage}󰏰"; + tooltip-format-off = "󰂲 {controller_alias}\n󰿀 {controller_address}\n󰂳 {status}"; }; - max-volume = 100; - on-click-middle = "${pkgs.avizo}/bin/volumectl toggle-mute"; - on-click-right = "${lib.getExe pkgs.pwvucontrol}"; - on-scroll-up = "${pkgs.avizo}/bin/volumectl -u up 2"; - on-scroll-down = "${pkgs.avizo}/bin/volumectl -u down 2"; - tooltip-format = "󰓃 {volume}󰏰\n󰒓 {node_name}"; - }; - pulseaudio = { - format = "{format_source}"; - format-alt = "{format_source} {source_volume}󰏰"; - format-source = "󰍰"; - format-source-muted = "󰍱"; - on-click-middle = "${pkgs.avizo}/bin/volumectl -m toggle-mute"; - on-click-right = "${lib.getExe pkgs.pwvucontrol}"; - on-scroll-up = "${pkgs.avizo}/bin/volumectl -m up 2"; - on-scroll-down = "${pkgs.avizo}/bin/volumectl -m down 2"; - tooltip-format = " {source_volume}󰏰\n󰒓 {desc}"; - }; - network = { - format = "{icon}"; - format-alt = " {bandwidthDownBits}{bandwidthUpBits}"; - format-ethernet = "󰈀"; - format-disconnected = "󱚵"; - format-linked = ""; - format-wifi = "󰖩"; - interval = 2; - on-click-right = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; - tooltip-format = " {ifname}\n󰩠 {ipaddr} via {gwaddr}\n {bandwidthDownBits}\t {bandwidthUpBits}"; - tooltip-format-wifi = "󱛁 {essid} \n󰒢 {signalStrength}󰏰\n󰩠 {ipaddr} via {gwaddr}\n {bandwidthDownBits}\t {bandwidthUpBits}"; - tooltip-format-ethernet = "󰈀 {ifname}\n󰩠 {ipaddr} via {gwaddr})\n {bandwidthDownBits}\t {bandwidthUpBits}"; - tooltip-format-disconnected = "󱚵 disconnected"; - }; - bluetooth = { - format = "{icon}"; - format-connected = "󰂱"; - format-disabled = "󰂲"; - format-on = "󰂯"; - format-off = "󰂲"; - on-click-middle = "${lib.getExe bluetoothToggle}"; - on-click-right = "${lib.getExe pkgs.overskride}"; - tooltip-format = " {controller_alias}\n󰿀 {controller_address}\n󰂴 {num_connections} connected"; - tooltip-format-connected = "󰂱 {controller_alias}\n󰿀 {controller_address}\n󰂴 {num_connections} connected\n{device_enumerate}"; - tooltip-format-disabled = "󰂲 {controller_alias}\n󰿀 {controller_address}\n󰂳 {status}"; - tooltip-format-enumerate-connected = "󰂱 {device_alias}\n󰿀 {device_address}"; - tooltip-format-enumerate-connected-battery = "󰂱 {device_alias}\t󰿀 {device_address}\n󰥉 {device_battery_percentage}󰏰"; - tooltip-format-off = "󰂲 {controller_alias}\n󰿀 {controller_address}\n󰂳 {status}"; - }; - backlight = { - device = "thinkpad_acpi"; - format = "{icon}"; - format-alt = "{icon} {percent}󰏰"; - format-icons = ["" "" "" "" "" "" "" "" ""]; - on-click-middle = "${pkgs.avizo}/bin/lightctl set 50"; - on-scroll-up = "${pkgs.avizo}/bin/lightctl up 2"; - on-scroll-down = "${pkgs.avizo}/bin/lightctl down 2"; - tooltip-format = "󰃠 {percent}󰏰"; - }; - power-profiles-daemon = { - format = "{icon}"; - format-icons = { - default = ""; - performance = "󰤇"; - balanced = "󰗑"; - power-saver = "󰴻"; + backlight = { + device = "thinkpad_acpi"; + format = "{icon}"; + format-alt = "{icon} {percent}󰏰"; + format-icons = [ + "" + "" + "" + "" + "" + "" + "" + "" + "" + ]; + on-click-middle = "${pkgs.avizo}/bin/lightctl set 50"; + on-scroll-up = "${pkgs.avizo}/bin/lightctl up 2"; + on-scroll-down = "${pkgs.avizo}/bin/lightctl down 2"; + tooltip-format = "󰃠 {percent}󰏰"; + }; + power-profiles-daemon = { + format = "{icon}"; + format-icons = { + default = ""; + performance = "󰤇"; + balanced = "󰗑"; + power-saver = "󰴻"; + }; + tooltip-format = " Power profile: {profile}\n󰒓 Driver: {driver}"; + }; + temperature = { + thermal-zone = 0; + critical-threshold = 80; + format = "{icon}"; + format-alt = "{icon} {temperatureC}󰔄"; + format-critical = "󰸁 {temperatureC}󰔄"; + format-icons = [ + "" + "󱃃" + "󱃃" + "󰔏" + "󰔏" + "󰔏" + "󱃂" + ]; + tooltip-format = "󰔐 CPU {temperatureC}󰔄"; + }; + battery = { + states = { + good = 80; + warning = 20; + critical = 5; + }; + format = "{icon}"; + format-alt = "{icon} {capacity}󰏰"; + format-charging = "󰂄"; + format-full = "󰁹"; + format-plugged = "󰚥"; + format-icons = [ + "󰂃" + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + tooltip-format = "󱊣 {time} ({capacity}󰏰)"; }; - tooltip-format = " Power profile: {profile}\n󰒓 Driver: {driver}"; - }; - temperature = { - thermal-zone = 0; - critical-threshold = 80; - format = "{icon}"; - format-alt = "{icon} {temperatureC}󰔄"; - format-critical = "󰸁 {temperatureC}󰔄"; - format-icons = [ "" "󱃃" "󱃃" "󰔏" "󰔏" "󰔏" "󱃂" ]; - tooltip-format = "󰔐 CPU {temperatureC}󰔄"; - }; - battery = { - states = { - good = 80; - warning = 20; - critical = 5; + "custom/session" = { + format = "󰐥"; + on-click = "${lib.getExe pkgs.wlogout} --buttons-per-row 5 --no-span"; + tooltip-format = "󰐥 Session Menu"; }; - format = "{icon}"; - format-alt = "{icon} {capacity}󰏰"; - format-charging = "󰂄"; - format-full = "󰁹"; - format-plugged = "󰚥"; - format-icons = [ "󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; - tooltip-format = "󱊣 {time} ({capacity}󰏰)"; - }; - "custom/session" = { - format = "󰐥"; - on-click = "${lib.getExe pkgs.wlogout} --buttons-per-row 5 --no-span"; - tooltip-format = "󰐥 Session Menu"; - }; - }]; + } + ]; systemd = { enable = true; }; diff --git a/home-manager/_mixins/desktop/hyprland/wlogout/default.nix b/home-manager/_mixins/desktop/hyprland/wlogout/default.nix index a2e9c86ce..814c8b77d 100644 --- a/home-manager/_mixins/desktop/hyprland/wlogout/default.nix +++ b/home-manager/_mixins/desktop/hyprland/wlogout/default.nix @@ -1,17 +1,19 @@ -{ - config, - pkgs, - ... -}: +{ config, ... }: let - pngFiles = builtins.filter (file: builtins.match ".*\\.png" file != null) (builtins.attrNames (builtins.readDir ./.)); + pngFiles = builtins.filter (file: builtins.match ".*\\.png" file != null) ( + builtins.attrNames (builtins.readDir ./.) + ); in { # Copy .png files in the current directory to the wlogout configuration directory - home.file = builtins.listToAttrs (builtins.map (pngFile: { - name = "${config.xdg.configHome}/wlogout/${pngFile}"; - value = { source = ./. + "/${pngFile}"; }; - }) pngFiles); + home.file = builtins.listToAttrs ( + builtins.map (pngFile: { + name = "${config.xdg.configHome}/wlogout/${pngFile}"; + value = { + source = ./. + "/${pngFile}"; + }; + }) pngFiles + ); programs = { wlogout = { diff --git a/home-manager/default.nix b/home-manager/default.nix index a2355f540..1173c7221 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -182,7 +182,10 @@ in package = pkgs.nixVersions.latest; settings = { experimental-features = "flakes nix-command"; - trusted-users = [ "root" "${username}" ]; + trusted-users = [ + "root" + "${username}" + ]; }; }; From 298b0d7bcb42b34560bbc61b8a2fc38fbc1fe9cf Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:15:59 +0100 Subject: [PATCH 05/12] style: nixfmt-plus for lib/ --- lib/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index f595f2c19..1e2c3c1b3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -8,5 +8,10 @@ let helpers = import ./helpers.nix { inherit inputs outputs stateVersion; }; in { - inherit (helpers) mkDarwin mkHome mkNixos forAllSystems; + inherit (helpers) + mkDarwin + mkHome + mkNixos + forAllSystems + ; } From 359eac93534b988863337bf5cb508931c3dae3b4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:19:45 +0100 Subject: [PATCH 06/12] style: nixfmt-plus for overlays/ --- overlays/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index 36646d934..1c67bb4dd 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,12 +1,13 @@ # This file defines overlays -{inputs, ...}: { +{ inputs, ... }: +{ # This one brings our custom packages from the 'pkgs' directory additions = final: _prev: import ../pkgs final.pkgs; # This one contains whatever you want to overlay # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays - modifications = final: prev: { + modifications = _final: prev: { # https://discourse.nixos.org/t/davinci-resolve-studio-install-issues/37699/44 # https://theholytachanka.com/posts/setting-up-resolve/ davinci-resolve = prev.davinci-resolve.override (old: { @@ -42,7 +43,7 @@ # }); #}); - openasar = prev.openasar.overrideAttrs ( old: rec { + openasar = prev.openasar.overrideAttrs (_old: rec { pname = "openasar"; version = "0-unstable-2024-06-30"; src = prev.fetchFromGitHub { @@ -67,7 +68,7 @@ # be accessible through 'pkgs.unstable' unstable-packages = final: _prev: { unstable = import inputs.nixpkgs-unstable { - system = final.system; + inherit (final) system; config.allowUnfree = true; }; }; From 438ada97b4c518f71408a9bc9367fa62fcd664e3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:21:46 +0100 Subject: [PATCH 07/12] style: nixfmt-plus for pkgs/fonts/ --- pkgs/fonts/fixedsys-core-font/default.nix | 5 +---- pkgs/fonts/fixedsys-excelsior-font/default.nix | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/fonts/fixedsys-core-font/default.nix b/pkgs/fonts/fixedsys-core-font/default.nix index 8887c7c75..40e887fc2 100644 --- a/pkgs/fonts/fixedsys-core-font/default.nix +++ b/pkgs/fonts/fixedsys-core-font/default.nix @@ -1,7 +1,4 @@ -{ - lib, - stdenvNoCC, -}: +{ lib, stdenvNoCC }: stdenvNoCC.mkDerivation rec { pname = "fixedsys_core"; diff --git a/pkgs/fonts/fixedsys-excelsior-font/default.nix b/pkgs/fonts/fixedsys-excelsior-font/default.nix index 74bed3026..b62337df8 100644 --- a/pkgs/fonts/fixedsys-excelsior-font/default.nix +++ b/pkgs/fonts/fixedsys-excelsior-font/default.nix @@ -1,8 +1,4 @@ -{ - fetchFromGitHub, - lib, - stdenvNoCC, -}: +{ lib, stdenvNoCC }: stdenvNoCC.mkDerivation rec { pname = "fixedsys_excelsior"; From ce3ae53d15f088eee902790402cdbb055568750f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 15:26:05 +0100 Subject: [PATCH 08/12] feat: disable global flake registry --- nixos/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index 4d93e5976..7af705438 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -110,6 +110,8 @@ { settings = { experimental-features = "flakes nix-command"; + # Disable global registry + flake-registry = ""; # Workaround for https://github.com/NixOS/nix/issues/9574 nix-path = config.nix.nixPath; trusted-users = [ @@ -118,9 +120,9 @@ ]; warn-dirty = false; }; - # Opinionated: disable channels + # Disable channels channel.enable = false; - # Opinionated: make flake registry and nix path match flake inputs + # Make flake registry and nix path match flake inputs registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; From 5654be76411fc4f8ca982dc263dfb1fc8542de3f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 16:26:02 +0100 Subject: [PATCH 09/12] fix: only apply shadows to floating windows in hyprland --- home-manager/_mixins/desktop/hyprland/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-manager/_mixins/desktop/hyprland/default.nix b/home-manager/_mixins/desktop/hyprland/default.nix index b51a7fad1..f912ee11f 100644 --- a/home-manager/_mixins/desktop/hyprland/default.nix +++ b/home-manager/_mixins/desktop/hyprland/default.nix @@ -222,7 +222,7 @@ in }; windowrulev2 = [ # only allow shadows for floating windows - #"noshadow, floating:0" + "noshadow, floating:0" # make pop-up file dialogs floating, centred, and pinned "float, title:(Open|Progress|Save File)" From 0ce37edbc3546126508d97cbebdd7c9d8c8d3485 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 16:53:41 +0100 Subject: [PATCH 10/12] feat: float windows for transient apps --- home-manager/_mixins/desktop/hyprland/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home-manager/_mixins/desktop/hyprland/default.nix b/home-manager/_mixins/desktop/hyprland/default.nix index f912ee11f..d79c2f13a 100644 --- a/home-manager/_mixins/desktop/hyprland/default.nix +++ b/home-manager/_mixins/desktop/hyprland/default.nix @@ -231,6 +231,12 @@ in "float, class:^(code)$" "center, class:^(code)$" "pin, class:^(code)$" + + # Apps that should be floating + "float, title:(overskride|Pipewire Volume Control|Trayscale)" + "center, title:(overskride|Pipewire Volume Control|Trayscale)" + "float, class:(nm-connection-editor)" + "center, class:(nm-connection-editor)" ]; # Simulate static workspaces workspace = [ From 7b1b5f021e485a09834598e893ea06f636ba5682 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 17:05:04 +0100 Subject: [PATCH 11/12] fix: delay starting syncthingtray and trayscale --- home-manager/_mixins/desktop/hyprland/default.nix | 3 ++- home-manager/_mixins/services/syncthing/default.nix | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/home-manager/_mixins/desktop/hyprland/default.nix b/home-manager/_mixins/desktop/hyprland/default.nix index d79c2f13a..615a68df1 100644 --- a/home-manager/_mixins/desktop/hyprland/default.nix +++ b/home-manager/_mixins/desktop/hyprland/default.nix @@ -158,6 +158,8 @@ in pseudotile = true; }; exec-once = [ + "sleep 0.25 && hyprctl dispatch workspace 1" + "sleep 1 && trayscale --gapplication-service --hide-window" #"sleep 1 && hyprctl dispatch exec [workspace 1 silent] brave" #"sleep 2 && hyprctl dispatch exec [workspace 2 silent] wavebox" #"sleep 2 && hyprctl dispatch exec [workspace 2 silent] discord" @@ -166,7 +168,6 @@ in #"sleep 4 && hyprctl dispatch exec [workspace 4 silent] code" #"sleep 4 && hyprctl dispatch exec [workspace 4 silent] gitkraken" #"sleep 5 && hyprctl dispatch exec [workspace 5 silent] alacritty" - "sleep 5 && trayscale --gapplication-service --hide-window" ]; general = { gaps_in = 5; diff --git a/home-manager/_mixins/services/syncthing/default.nix b/home-manager/_mixins/services/syncthing/default.nix index 7cd8fe222..8a13a3835 100644 --- a/home-manager/_mixins/services/syncthing/default.nix +++ b/home-manager/_mixins/services/syncthing/default.nix @@ -51,4 +51,9 @@ lib.mkIf (lib.elem username installFor && isLinux && !isLima) { Wants = [ "graphical-session-pre.target" ]; }; }; + # If waybar is enabled, start syncthingtray after waybar so the tray is ready + systemd.user.services.syncthingtray = lib.mkIf config.programs.waybar.enable { + Service.ExecStartPre = "${pkgs.coreutils-full}/bin/sleep 0.25"; + Unit.After = lib.mkDefault [ "waybar.service" ]; + }; } From 031b6d38c178ea41c240bc890335e2563eb83468 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 30 Aug 2024 17:24:35 +0100 Subject: [PATCH 12/12] fix: launch transient apps on the current workspace --- .../_mixins/desktop/hyprland/waybar/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/home-manager/_mixins/desktop/hyprland/waybar/default.nix b/home-manager/_mixins/desktop/hyprland/waybar/default.nix index 82b595d36..62c368001 100644 --- a/home-manager/_mixins/desktop/hyprland/waybar/default.nix +++ b/home-manager/_mixins/desktop/hyprland/waybar/default.nix @@ -255,8 +255,7 @@ in }; clock = { actions = { - on-click = "shift_down"; - on-click-middle = "shift_reset"; + on-click-middle = "shift_down"; on-click-right = "shift_up"; }; calendar = { @@ -319,7 +318,7 @@ in }; max-volume = 100; on-click-middle = "${pkgs.avizo}/bin/volumectl toggle-mute"; - on-click-right = "${lib.getExe pkgs.pwvucontrol}"; + on-click-right = "hyprctl dispatch exec [workspace current] ${lib.getExe pkgs.pwvucontrol}"; on-scroll-up = "${pkgs.avizo}/bin/volumectl -u up 2"; on-scroll-down = "${pkgs.avizo}/bin/volumectl -u down 2"; tooltip-format = "󰓃 {volume}󰏰\n󰒓 {node_name}"; @@ -330,7 +329,7 @@ in format-source = "󰍰"; format-source-muted = "󰍱"; on-click-middle = "${pkgs.avizo}/bin/volumectl -m toggle-mute"; - on-click-right = "${lib.getExe pkgs.pwvucontrol}"; + on-click-right = "hyprctl dispatch exec [workspace current] ${lib.getExe pkgs.pwvucontrol}"; on-scroll-up = "${pkgs.avizo}/bin/volumectl -m up 2"; on-scroll-down = "${pkgs.avizo}/bin/volumectl -m down 2"; tooltip-format = " {source_volume}󰏰\n󰒓 {desc}"; @@ -343,7 +342,7 @@ in format-linked = ""; format-wifi = "󰖩"; interval = 2; - on-click-right = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; + on-click-right = "hyprctl dispatch exec [workspace current] ${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; tooltip-format = " {ifname}\n󰩠 {ipaddr} via {gwaddr}\n {bandwidthDownBits}\t {bandwidthUpBits}"; tooltip-format-wifi = "󱛁 {essid} \n󰒢 {signalStrength}󰏰\n󰩠 {ipaddr} via {gwaddr}\n {bandwidthDownBits}\t {bandwidthUpBits}"; tooltip-format-ethernet = "󰈀 {ifname}\n󰩠 {ipaddr} via {gwaddr})\n {bandwidthDownBits}\t {bandwidthUpBits}"; @@ -356,7 +355,7 @@ in format-on = "󰂯"; format-off = "󰂲"; on-click-middle = "${lib.getExe bluetoothToggle}"; - on-click-right = "${lib.getExe pkgs.overskride}"; + on-click-right = "hyprctl dispatch exec [workspace current] ${lib.getExe pkgs.overskride}"; tooltip-format = " {controller_alias}\n󰿀 {controller_address}\n󰂴 {num_connections} connected"; tooltip-format-connected = "󰂱 {controller_alias}\n󰿀 {controller_address}\n󰂴 {num_connections} connected\n{device_enumerate}"; tooltip-format-disabled = "󰂲 {controller_alias}\n󰿀 {controller_address}\n󰂳 {status}";