Sway: Difference between revisions
imported>Artturin add theming and additional packages |
imported>Artturin add brightness and volume |
||
Line 78: | Line 78: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Note|This will recompile all packages that have xclip or xsel in their dependencies|warn}} | {{Note|This will recompile all packages that have xclip or xsel in their dependencies|warn}} | ||
=== Brightness and volume === | |||
Brightnessctl has worked better for me than light | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
environment.systemPackages = with pkgs; [ brightnessctl ]; | |||
users.users.yourusername.extraGroups = [ "video" ]; | |||
# or | |||
programs.light.enable = true; | |||
environment.systemPackages = with pkgs; [ pactl ]; | |||
</nowiki>}} | |||
{{file|sway config|bash| | |||
# Brightness | |||
bindsym XF86MonBrightnessDown exec "brightnessctl set 2%-" | |||
bindsym XF86MonBrightnessUp exec "brightnessctl set +2%" | |||
# Volume | |||
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%' | |||
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%' | |||
bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle' | |||
}} | |||
=== Polkit === | === Polkit === |