From bf50da669770132faaab23cd5bfb602b3f4dab5d Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 5 Jul 2023 09:18:59 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9F=B3=E9=87=8F=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/config/polybar/config.ini | 4 +- home/config/polybar/modules/volume.ini | 62 ++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 home/config/polybar/modules/volume.ini diff --git a/home/config/polybar/config.ini b/home/config/polybar/config.ini index 4947a89..ab8b4bb 100644 --- a/home/config/polybar/config.ini +++ b/home/config/polybar/config.ini @@ -37,9 +37,9 @@ font-2 = "Symbols Nerd Font:size=15;4" fixed-center = true -modules-left = logo i3 +modules-left = logo i3 modules-center = date -modules-right = netspeed space space hibernate space logout +modules-right = netspeed volume space space hibernate space logout tray-position = right diff --git a/home/config/polybar/modules/volume.ini b/home/config/polybar/modules/volume.ini new file mode 100644 index 0000000..38a62e6 --- /dev/null +++ b/home/config/polybar/modules/volume.ini @@ -0,0 +1,62 @@ +[module/volume] +type = internal/pulseaudio + +; Sink to be used, if it exists (find using `pacmd list-sinks`, name field) +; If not, uses default sink +sink = + +; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false +; Default: true +use-ui-max = false + + +; 音量显示格式 +format-volume = +format-volume-background = ${color.background} +format-volume-padding = 1 + +; 静音图标 +format-muted = +format-muted-prefix = 婢 +format-muted-prefix-font = 2 +format-muted-prefix-foreground = ${color.altforeground} +format-muted-background = ${color.background} +format-muted-padding = 1 + +; 静音的文字提示 +label-muted = " " +label-muted-foreground = ${color.altforeground} + +; 音量条 +bar-volume-width = 5 +bar-volume-gradient = false + +bar-volume-indicator = 雷 +bar-volume-indicator-font = 2 +bar-volume-indicator-foreground = ${color.blue} + +bar-volume-fill = 絛 +bar-volume-fill-font = 3 +bar-volume-foreground-0 = ${color.blue} +bar-volume-foreground-1 = ${color.blue} +bar-volume-foreground-2 = ${color.blue} +bar-volume-foreground-3 = ${color.blue} +bar-volume-foreground-4 = ${color.blue} + +bar-volume-empty = 絛 +bar-volume-empty-font = 3 +bar-volume-empty-foreground = ${color.altbackground} + +; 根据音量变换图标 +ramp-volume-0 = 奄 +ramp-volume-1 = 奄 +ramp-volume-2 = 奄 +ramp-volume-3 = 奔 +ramp-volume-4 = 奔 +ramp-volume-5 = 奔 +ramp-volume-6 = 墳 +ramp-volume-7 = 墳 +ramp-volume-8 = 墳 +ramp-volume-9 = 墳 +ramp-volume-font = 2 +ramp-volume-foreground = ${color.blue} \ No newline at end of file