From 1a485154102994e6d77287ff33f7e772b945c3c5 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 19 Oct 2023 07:40:03 +0100 Subject: [PATCH] Switch swaync for mako, swayosd for avizo mako and avizo are both themed with stylix so easier to keep consistent Reduce opacity of popups 0.8 -> 0.5 --- flake.nix | 2 +- home/hyprland/config.nix | 24 ++++++++++-------------- home/hyprland/default.nix | 4 ++-- home/hyprland/mako.nix | 3 ++- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index cf729d74..0cc70eab 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,7 @@ "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; polarity = "dark"; opacity = { - popups = 0.8; + popups = 0.5; terminal = 0.8; }; fonts = rec { diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index e3d3642c..03766546 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -100,7 +100,8 @@ in '' bind = SUPER SHIFT, M, fullscreen, 1 bind = SUPER, P, exec, pkill rofi || rofi-pass bind = SUPER SHIFT, P, exec, pkill rofi || rofi-pass --last-used - bind = SUPER, X, exec, swaync-client -t + bind = SUPER, X, exec, ${pkgs.mako}/bin/makoctl restore + bind = SUPER SHIFT, X, exec, ${pkgs.mako}/bin/makoctl dismiss -a # Common program shortcuts bind = SUPER, Space, exec, pkill anyrun || anyrun @@ -121,20 +122,15 @@ in '' bind=,Print,exec,watershot bind=,XF86Calculator,exec,pkill anyrun || anyrun - # Bind modifiers to show state using swayosd - bindl=,Num_lock,exec,${pkgs.swayosd}/bin/swayosd --num-lock - bindl=,Caps_lock,exec,${pkgs.swayosd}/bin/swayosd --caps-lock - bindl=,Scroll_lock,exec,${pkgs.swayosd}/bin/swayosd --scroll-lock - # Sound - bindl=,XF86AudioMute,exec,${pkgs.swayosd}/bin/swayosd --output-volume=mute-toggle - bindl=,XF86AudioMicMute,exec,${pkgs.swayosd}/bin/swayosd --input-volume=mute-toggle - bindle=,XF86AudioRaiseVolume,exec,${pkgs.swayosd}/bin/swayosd --output-volume=+5 - bindle=,XF86AudioLowerVolume,exec,${pkgs.swayosd}/bin/swayosd --output-volume=-5 + bindl=,XF86AudioMute,exec,${pkgs.avizo}/bin/volumectl % + bindl=,XF86AudioMicMute,exec,${pkgs.avizo}/bin/volumectl -m % + bindle=,XF86AudioRaiseVolume,exec,${pkgs.avizo}/bin/volumectl -u + 5 + bindle=,XF86AudioLowerVolume,exec,${pkgs.avizo}/bin/volumectl -u - 5 # Brightness - bindle=,XF86MonBrightnessUp,exec,${pkgs.swayosd}/bin/swayosd --brightness=+5 - bindle=,XF86MonBrightnessDown,exec,${pkgs.swayosd}/bin/swayosd --brightness=-5 + bindle=,XF86MonBrightnessUp,exec,${pkgs.avizo}/bin/lightctl + 5 + bindle=,XF86MonBrightnessDown,exec,${pkgs.avizo}/bin/lightctl - 5 # Playback bindl=,XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause @@ -152,9 +148,9 @@ in '' bind = SUPER SHIFT, J, movewindow, d # Layer rules - $layers = ^(waybar|system-menu|anyrun|gtk-layer-shell|swaync-.+|swayosd)$ + $layers = ^(waybar|system-menu|anyrun|gtk-layer-shell|notifications)$ layerrule = blur, $layers - layerrule = ignorealpha 0.5, $layers + layerrule = ignorealpha 0.3, $layers # Window rules windowrule = float,(org.kde.polkit-kde-authentication-agent-1) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index ab0e7b57..23abf8cc 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -5,13 +5,13 @@ ./wlogout/default.nix ./waybar/default.nix ./ironbar/default.nix - ./swaync/default.nix ./rofi/default.nix ./anyrun.nix ./gtk.nix + ./mako.nix ]; home.packages = [ anyrun.packages.${pkgs.system}.default ]; - services.swayosd.enable = true; + services.avizo.enable = true; wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; diff --git a/home/hyprland/mako.nix b/home/hyprland/mako.nix index b93023c8..2b25fa75 100644 --- a/home/hyprland/mako.nix +++ b/home/hyprland/mako.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: { services.mako = { @@ -7,6 +7,7 @@ anchor = "top-right"; defaultTimeout = 5000; icons = true; + iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}"; layer = "overlay"; margin = "20"; padding = "10";