From be924e6c873c00c73b5baf86bfefe16ce96b0f93 Mon Sep 17 00:00:00 2001 From: Jakob Lechner Date: Fri, 24 Oct 2025 20:57:34 +0200 Subject: [PATCH] Replace pavucontrol with mixxc --- users/jalr/modules/default.nix | 1 + users/jalr/modules/mixxc/default.nix | 10 ++ users/jalr/modules/mixxc/style.css | 224 +++++++++++++++++++++++++++ users/jalr/modules/sway/default.nix | 1 + users/jalr/modules/sway/waybar.nix | 2 +- 5 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 users/jalr/modules/mixxc/default.nix create mode 100644 users/jalr/modules/mixxc/style.css diff --git a/users/jalr/modules/default.nix b/users/jalr/modules/default.nix index 30ed808..0b32c3e 100644 --- a/users/jalr/modules/default.nix +++ b/users/jalr/modules/default.nix @@ -21,6 +21,7 @@ ./jameica.nix ./kicad.nix ./lsd + ./mixxc ./mpv.nix ./mute-indicator.nix ./mycli diff --git a/users/jalr/modules/mixxc/default.nix b/users/jalr/modules/mixxc/default.nix new file mode 100644 index 0000000..efde8d1 --- /dev/null +++ b/users/jalr/modules/mixxc/default.nix @@ -0,0 +1,10 @@ +{ nixosConfig, lib, pkgs, ... }: + +lib.mkIf nixosConfig.jalr.gui.enable { + home.packages = with pkgs; [ + mixxc + ]; + xdg.configFile = { + "mixxc/style.css".source = ./style.css; + }; +} diff --git a/users/jalr/modules/mixxc/style.css b/users/jalr/modules/mixxc/style.css new file mode 100644 index 0000000..33dbf39 --- /dev/null +++ b/users/jalr/modules/mixxc/style.css @@ -0,0 +1,224 @@ +.side { + $hide: false; + + .output { + transition: background 750ms; + padding: 5px; + + &.master { + transition: background 0ms; + } + + &.master:hover { + } + + .icon { + -gtk-icon-style: symbolic; + -gtk-icon-size: 16px; + } + } + + @if $hide { + min-height: 0; + min-width: 0; + + .output { + padding: 0; + + .icon { + -gtk-icon-style: symbolic; + -gtk-icon-size: 0; + } + } + } +} + +.main { + margin: 20px; +} + +.client { + $hide-name: false; + $hide-description: false; + + font-family: 'Iosevka Nerd Font'; + font-size: 1.2em; + + .icon { + -gtk-icon-style: symbolic; + } + + @if $hide-name { + .name { + font-size: 0; + } + } + + @if $hide-description { + .description { + font-size: 0; + } + } + + scale { + trough { + /* Slider Bar */ + border-radius: 10px; + + slider { + /* Slider Knob */ + padding: 0; + + border: none; + border-radius: 2px; + + transition-duration: 400ms; + } + + highlight { + /* Slider Bar Filled */ + border: none; + border-radius: 10px; + + margin: 2px; + + transition: background-image 300ms; + } + + fill { + /* Slider Peak */ + background: none; + + border-radius: 10px; + + margin: 0px; + } + } + } + + scale:active { + trough slider { + /* Slider Knob */ + transform: scale(1.1); + } + } +} + +.client.horizontal { + &.new { + animation: client-add-horizontal 300ms ease; + } + + &.removed { + animation: client-remove-horizontal 300ms ease; + } + + .icon { + padding-right: 13px; + + -gtk-icon-size: 16px; + } + + .volume { + /* Numeric Volume Level */ + padding-left: 22px; + padding-bottom: 3px; + } + + scale { + trough { + /* Slider Bar */ + min-height: 6px; + + slider { + /* Slider Knob */ + min-height: 21px; + min-width: 9px; + + margin-top: -7px; + margin-bottom: -7px; + } + } + } + +} + +@keyframes client-add-horizontal { + from { + transform: translateX(-200px); + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes client-remove-horizontal { + from { + opacity: 1; + } + to { + transform: translateX(-200px); + opacity: 0; + } +} + +.client.vertical { + &.new { + animation: client-add-vertical 300ms ease; + } + + &.removed { + animation: client-remove-vertical 300ms ease; + } + + .icon { + padding-bottom: 5px; + + -gtk-icon-size: 20px; + } + + .volume { + /* Numeric Volume Level */ + padding-top: 10px; + } + + scale { + trough { + /* Slider Bar */ + min-width: 4px; + + margin-top: 10px; + + slider { + /* Slider Knob */ + margin-left: -7px; + margin-right: -7px; + + min-height: 6px; + min-width: 14px; + } + } + } +} + +@keyframes client-add-vertical { + from { + transform: translateY(200px); + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes client-remove-vertical { + from { + opacity: 1; + } + to { + transform: translateY(200px); + opacity: 0; + } +} + diff --git a/users/jalr/modules/sway/default.nix b/users/jalr/modules/sway/default.nix index 2d7bb71..7e4e764 100644 --- a/users/jalr/modules/sway/default.nix +++ b/users/jalr/modules/sway/default.nix @@ -234,6 +234,7 @@ in "XF86AudioMute" = "exec pactl set-source-mute alsa_input.usb-BEHRINGER_UMC202HD_192k-00.HiFi__umc202hd_mono_in_U192k_0_1__source toggle"; "${cfg.modifier}+l" = "exec ${lockScreen}"; + "${cfg.modifier}+v" = "exec GSK_RENDERER=cairo GTK_USE_PORTAL=0 ${pkgs.mixxc}/bin/mixxc -A"; }; bars = [ ]; # managed as systemd user unit diff --git a/users/jalr/modules/sway/waybar.nix b/users/jalr/modules/sway/waybar.nix index b30d1ae..a275d36 100644 --- a/users/jalr/modules/sway/waybar.nix +++ b/users/jalr/modules/sway/waybar.nix @@ -171,7 +171,7 @@ in phone = "󰏲"; portable = "󰏲"; }; - on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol"; + on-click-right = "GSK_RENDERER=cairo GTK_USE_PORTAL=0 ${pkgs.mixxc}/bin/mixxc -A -a t -a r"; }; network = { format-wifi = "{essid} ({signalStrength}%) 󰖩 ";