mirror of
https://github.com/RGBCube/ncc
synced 2025-07-31 12:07:48 +00:00
Limit max volume
This commit is contained in:
parent
00b9edd9cd
commit
20a39d18ec
2 changed files with 15 additions and 0 deletions
|
@ -5,6 +5,8 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(homeConfiguration "nixos" {
|
||||||
|
home.file.".config/hypr/volume.sh".source = ./volume.sh;
|
||||||
|
|
||||||
wayland.windowManager.hyprland = enabled {
|
wayland.windowManager.hyprland = enabled {
|
||||||
package = hyprland;
|
package = hyprland;
|
||||||
|
|
||||||
|
@ -68,6 +70,13 @@
|
||||||
bind = SHIFT, PRINT, exec, grim - | wl-copy
|
bind = SHIFT, PRINT, exec, grim - | wl-copy
|
||||||
bind = CTRL, PRINT, exec, kazam
|
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 {
|
decoration {
|
||||||
drop_shadow = false
|
drop_shadow = false
|
||||||
rounding = 0
|
rounding = 0
|
||||||
|
@ -133,6 +142,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(with pkgs; homePackages "nixos" [
|
||||||
|
brightnessctl
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
|
5
machines/enka/hyprland/volume.sh
Executable file
5
machines/enka/hyprland/volume.sh
Executable file
|
@ -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) }")%"
|
Loading…
Add table
Add a link
Reference in a new issue