diff --git a/machines/enka/hyprland/default.nix b/machines/enka/hyprland/default.nix index 2180770..f5f778e 100644 --- a/machines/enka/hyprland/default.nix +++ b/machines/enka/hyprland/default.nix @@ -5,6 +5,8 @@ }) (homeConfiguration "nixos" { + home.file.".config/hypr/volume.sh".source = ./volume.sh; + wayland.windowManager.hyprland = enabled { package = hyprland; @@ -68,6 +70,13 @@ bind = SHIFT, PRINT, exec, grim - | wl-copy bind = CTRL, PRINT, exec, kazam + binde = , XF86AudioRaiseVolume, exec, wpctl set-volume --limit 1.5 @DEFAULT_AUDIO_SINK@ 5%+; /home/nixos/.config/hypr/volume.sh + binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; /home/nixos/.config/hypr/volume.sh + + + binde = , XF86MonBrightnessUp, exec, brightnessctl set 5%+; dunstctl close-all; dunstify --timeout 1000 $(brightnessctl -m | cut -d, -f4) + binde = , XF86MonBrightnessDown, exec, brightnessctl set --min-value=0 5%-; dunstctl close-all; dunstify --timeout 1000 $(brightnessctl -m | cut -d, -f4) + decoration { drop_shadow = false rounding = 0 @@ -133,6 +142,7 @@ }) (with pkgs; homePackages "nixos" [ + brightnessctl grim slurp wl-clipboard diff --git a/machines/enka/hyprland/volume.sh b/machines/enka/hyprland/volume.sh new file mode 100755 index 0000000..237a75b --- /dev/null +++ b/machines/enka/hyprland/volume.sh @@ -0,0 +1,5 @@ +#!/bin/sh +dunstctl close-all; + +volume_float=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/Volume: //' ) +dunstify --timeout 1000 "$(awk "BEGIN { print($volume_float * 100) }")%"