add more modules to waybar and improve mpd

This commit is contained in:
Leonardo Eugênio 2022-08-12 20:58:53 -03:00
parent c329928582
commit 40d26f0371
3 changed files with 67 additions and 16 deletions

View File

@ -4,25 +4,24 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "vfat";
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "vfat";
};
swapDevices = [ ];
@ -35,6 +34,7 @@
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "i15"; # Define your hostname.
}

View File

@ -326,6 +326,16 @@ in {
services.mpd = {
enable = true;
musicDirectory = "~/Música";
extraConfig = ''
restore_paused "yes"
auto_update "yes"
audio_output {
type "pulse"
name "My Pulse Output"
mixer_type "hardware"
}
filesystem_charset "UTF-8"
'';
};
home.pointerCursor = {
name = "capitaine-cursors";

View File

@ -8,9 +8,31 @@ in {
systemd.target = "sway-session.target";
settings = [{
layer = "top";
modules-left = [ "sway/workspaces" "sway/mode" ];
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
modules-center = [ "clock" ];
modules-right = [ "custom/caffeine" "pulseaudio" "network" ];
modules-right = [
"sway/language"
"mpd"
"tray"
"custom/caffeine"
"pulseaudio"
"network"
"battery"
];
battery = {
tooltip = true;
states = {
full = 100;
good = 95;
warning = 25;
};
format = "{icon} ";
format-charging = "";
format-plugged = "";
format-full = "";
format-warning = "{icon} {time}";
format-icons = [ "" "" "" "" "" "" ];
};
network = {
interval = 5;
tooltip = false;
@ -40,11 +62,30 @@ in {
default = "";
};
};
"sway/window" = { max-length = 40; };
"tray"= {
"spacing"= 7;
"icon-size"=19;
};
clock = {
interval = 60;
format = "<b>{:%H:%M %a %d/%m}</b>";
tooltip = false;
};
mpd = {
format = "{stateIcon} {title} - {artist}";
format-paused = "{stateIcon}";
format-stopped = "";
state-icons = {
paused = "";
playing = "";
};
tooltip = false;
on-click = "mpc toggle";
on-scroll-up = "mpc vol +10";
on-scroll-down = "mpc vol -10";
};
"sway/language" = { format = "{short} {variant}"; };
"custom/caffeine" = {
format = "{}";
exec = "pidof swayidle > /dev/null && echo || echo ";