add brightness control, plus battery module

This commit is contained in:
Gabriel Fontes
2021-11-24 21:05:18 -03:00
parent c72275c8ef
commit 660c711327
3 changed files with 18 additions and 6 deletions
+3 -1
View File
@@ -59,6 +59,8 @@
};
programs = {
light.enable = true;
gamemode.enable = true;
# Use GPG as SSH
@@ -97,7 +99,7 @@
# My user info
users.users.misterio = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
extraGroups = [ "wheel" "networkmanager" "video" ];
shell = pkgs.fish;
passwordFile = "/data/home/misterio/.password";
openssh.authorizedKeys.keys = [
@@ -187,16 +187,15 @@ in rec {
# Volume
"XF86AudioRaiseVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +1%";
"XF86AudioLowerVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -1%";
"Shift+XF86AudioRaiseVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"Shift+XF86AudioLowerVolume" =
"XF86AudioLowerVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"Shift+XF86AudioMute" =
"exec ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
# Brightness
"XF86MonBrightnessUp" = "exec ${light} -A 10";
"XF86MonBrightnessDown" = "exec ${light} -U 10";
# Media
"XF86AudioNext" =
@@ -21,6 +21,7 @@ in {
"custom/gamemode"
"custom/ethminer"
"custom/theme"
"battery"
"pulseaudio"
"cpu"
"custom/gpu"
@@ -53,6 +54,16 @@ in {
};
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
battery = {
bat = "BAT0";
interval = 40;
states = {
warning = 30;
critical = 16;
format-icons = ["" "" "" "" ""];
};
format = "{capacity}% {icon}";
};
"sway/window" = { max-length = 50; };
"sway/workspaces" = {
format = "{icon} {name}";