diff --git a/modules/home/desktop/i3.nix b/modules/home/desktop/i3.nix index fbec6d5..c4c9d60 100644 --- a/modules/home/desktop/i3.nix +++ b/modules/home/desktop/i3.nix @@ -1,33 +1,30 @@ -{ pkgs, lib, config, options, ... }: { +{ pkgs, lib, config, osConfig, ... }: { options.mods.i3.enable = lib.mkEnableOption "enables i3"; config = lib.mkIf config.mods.i3.enable { programs.rofi.enable = true; - programs.i3status = { + programs.i3status-rust = { enable = true; - general.interval = 1; - modules = { - "volume master" = { - position = 1; - settings = { - format = "🔊 %volume"; - format_muted = "🔇 %volume"; - device = "default"; - mixer = "Master"; - mixer_idx = 0; - }; + bars.default = { + settings.theme.overrides = with config.lib.stylix.colors.withHashtag; { + idle_bg = base00; + idle_fg = base05; + separator = ""; }; - "tztime local".settings = { - format = "🗓 %Y-%m-%d %a %H:%M:%S "; - }; - ipv6.enable = false; - "wireless _first_".enable = false; - "ethernet _first_".enable = false; - "battery all".enable = false; - "disk /".enable = false; - load.enable = false; - memory.enable = false; + icons = "awesome5"; + blocks = [{ + block = "sound"; + format = " $icon $volume "; + click = [{ + button = "left"; + cmd = "pavucontrol"; + }]; + } { + block = "time"; + format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') "; + interval = 1; + }]; }; }; @@ -69,22 +66,30 @@ moveKeys = ["h" "j" "k" "l"]; moveDirs = ["left" "down" "up" "right"]; - workspKeys = genSpaces (x: x); + workspKeys = genSpaces (x: lib.mod (x+1) wsAmount); in lib.mkOptionDefault ( (zipBinds "+" "focus" moveKeys moveDirs) // (zipBinds "+Shift+" "move" moveKeys moveDirs) // (zipBinds "+" "workspace number" workspKeys workspaces) // (zipBinds "+Shift+" "move container to workspace number" - workspKeys workspaces) + workspKeys workspaces) // + { + "XF86AudioRaiseVolume" = + "exec --no-startup-id pactl set-sink-volume 0 +2%"; + "XF86AudioLowerVolume" = + "exec --no-startup-id pactl set-sink-volume 0 -2%"; + } ); bars = let + status_conf = + "${config.xdg.configHome}/i3status-rust/config-default.toml"; stylix_bar = { mode = "dock"; hiddenState = "hide"; position = "bottom"; - statusCommand = "${lib.getExe pkgs.i3status}"; + statusCommand = "${lib.getExe pkgs.i3status-rust} ${status_conf}"; command = "${pkgs.i3}/bin/i3bar"; workspaceButtons = true; workspaceNumbers = true; @@ -93,10 +98,6 @@ in [ stylix_bar ]; - # bars = [ - # options.xsession.windowManager.i3.config.default - # config.lib.stylix.i3.bar - # ]; }; }; }; diff --git a/modules/home/desktop/media.nix b/modules/home/desktop/media.nix index 5c2ab62..ae2e7fa 100644 --- a/modules/home/desktop/media.nix +++ b/modules/home/desktop/media.nix @@ -3,10 +3,11 @@ lib.mkEnableOption "enables entertainment programs"; config = lib.mkIf config.mods.desktop.media.enable { - # home.packages = with pkgs; [ - # # Movies/TV - # mpv - # ]; + home.packages = with pkgs; [ + # Audio + pulseaudio + pavucontrol + ]; programs.mpv.enable = true; }; }