Sway : Add brightness and volume controls.

This commit is contained in:
Dmitry Voronin 2024-03-28 06:33:58 +03:00
parent bab42fe2c1
commit 164c0a9ec9
5 changed files with 30 additions and 12 deletions

View file

@ -10,7 +10,7 @@
xdg.mime.defaultApplications = { xdg.mime.defaultApplications = {
# Use `file -i file.txt` to find file mime type. # Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app. # Use `xdg-mime query default "text/plain"` to find default app.
"application/pdf" = "org.gnome.Evince.desktop"; "application/pdf" = "org.gnome.Evince.desktop"; # TODO: Different apps?
"application/vnd.openxmlformats-officedocument.*" = "onlyoffice-desktopeditors.desktop"; "application/vnd.openxmlformats-officedocument.*" = "onlyoffice-desktopeditors.desktop";
"audio/*" = "mpv.desktop"; "audio/*" = "mpv.desktop";
"image/*" = "org.gnome.Loupe.desktop"; "image/*" = "org.gnome.Loupe.desktop";
@ -21,7 +21,10 @@
# Extra apps. # Extra apps.
services.gnome.gnome-keyring.enable = lib.mkForce false; services.gnome.gnome-keyring.enable = lib.mkForce false;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wl-clipboard grim # Screenshot.
mako # Notification system.
slurp # Screenshot.
wl-clipboard # Clipboard.
]; ];
# Sound. # Sound.
@ -47,6 +50,10 @@
]; ];
}; };
# Brightness control.
programs.light.enable = true;
# Configs.
environment.variables = { environment.variables = {
FOOT_CONFIG = ./foot/Foot.ini; FOOT_CONFIG = ./foot/Foot.ini;
SWAY_CONFIG = ./sway/module; SWAY_CONFIG = ./sway/module;

View file

@ -0,0 +1,3 @@
# Brightness
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10

View file

@ -0,0 +1,4 @@
# 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'

View file

@ -3,12 +3,14 @@
./home/Dasha.nix ./home/Dasha.nix
]; ];
users.users.dasha = { users.users.dasha = {
hashedPassword = "$y$j9T$WGMPv/bRhGBUidcZLZ7CE/$raZhwFFdI/XvegVZVHLILJLMiBkOxSErc6gao/Cxt33"; # Use `mkpasswd`.
uid = 1001;
createHome = true; createHome = true;
isNormalUser = true;
description = "Daria Dranchak"; description = "Daria Dranchak";
extraGroups = [ "networkmanager" ]; hashedPassword = "$y$j9T$WGMPv/bRhGBUidcZLZ7CE/$raZhwFFdI/XvegVZVHLILJLMiBkOxSErc6gao/Cxt33";
packages = with pkgs; [ ]; isNormalUser = true;
uid = 1001;
extraGroups = [
"networkmanager"
"video"
];
}; };
} }

View file

@ -3,12 +3,14 @@
./home/Voronind.nix ./home/Voronind.nix
]; ];
users.users.voronind = { users.users.voronind = {
hashedPassword = const.hashedPassword;
uid = 1000;
createHome = true; createHome = true;
isNormalUser = true;
description = "Dmitry Voronin"; description = "Dmitry Voronin";
extraGroups = [ "networkmanager" ]; hashedPassword = const.hashedPassword;
packages = with pkgs; [ ]; isNormalUser = true;
uid = 1000;
extraGroups = [
"networkmanager"
"video"
];
}; };
} }