From 534b75605b24215e671ebfdf0849fcd20c17c641 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 1 Aug 2025 01:26:56 +0800 Subject: [PATCH] modify file --- .config/lf/lfrc | 9 --------- .config/lf/pv.sh | 13 ++++++++----- .config/polybar/config.ini | 18 +++++++++++++++--- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 3b36840..24cce76 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -23,12 +23,3 @@ map k up map l open map h updir -# 预览文本/图片/归档 -cmd pv %{{ - case "$(file -Lb --mime-type "$1")" in - text/*) bat --paging=never --color=always "$1" ;; - image/*) chafa -c 256 -s 80x25 "$1" ;; - application/zip|application/x-tar) atool -l "$1" ;; - *) file -b "$1" ;; - esac -}} diff --git a/.config/lf/pv.sh b/.config/lf/pv.sh index 3e19aa8..66857da 100755 --- a/.config/lf/pv.sh +++ b/.config/lf/pv.sh @@ -1,6 +1,9 @@ #!/bin/sh -case "$(file -Lb --mime-type "$1")" in - text/*|application/json|application/xml) bat --color=always --paging=never "$1" ;; - image/*) chafa -c 256 -s "$2"x"$3" "$1" ;; - *) file -b "$1" ;; -esac +cmd pv %{{ + case "$(file -Lb --mime-type "$1")" in + text/*) bat --paging=never --color=always "$1" ;; + image/*) feh "$1";; + application/zip|application/x-tar) atool -l "$1" ;; + *) file -b "$1" ;; + esac +}} diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index 18b2928..9f55aa2 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -31,13 +31,17 @@ height = 20pt radius = 6 ; dpi = 96 +; 关闭默认的背景色和文本或其他元素的前景色 ;background = ${colors.background} ;foreground = ${colors.foreground} -background = #80222222 -;foreground = #90a333 +; 设置背景透明 +background = #80222222 + +; 隐藏分隔线,使得 Polybar 的模块之间没有分隔线,看起来更加紧凑。 line-size = 0pt +; 关闭polybar的默认留空宽度 border-size = 0 border-color = #00000000 @@ -49,10 +53,12 @@ module-margin = 1 separator = | separator-foreground = ${colors.disabled} +; 多字体支持,让polybar更好显示中文、emoji等多种字体 font-0 = Sarasa Term SC Nerd:bold:italic:siza=10;2 font-1 = MesloLGM Nerd Font Mono:bold:size=10;2 -;font-1 = Maple Mono Normal CN:size=10;2 +font-2 = Maple Mono Normal CN:size=10;2 +; 设定要显示的模块 modules-left = xworkspaces modules-right = netrate volume memory cpu battery date @@ -88,15 +94,18 @@ label-active = %name% label-active-background = ${colors.background-alt} label-active-underline= ${colors.primary} label-active-padding = 1 +; 当前活动工作区或标签的文本颜色 label-active-foreground = #0afaee label-occupied = %name% label-occupied-padding = 1 +; 设置被占用但未激活的工作区或标签的文本颜色 label-occupied-foreground = #6487b4 label-urgent = %name% label-urgent-background = ${colors.alert} label-urgent-padding = 1 +; 设置紧急工作区或标签的文本颜色 label-urgent-foreground = #ea2e4e label-empty = %name% @@ -130,6 +139,7 @@ label = %title:0:60:...% ;label-muted = muted ;label-muted-foreground = ${colors.disabled} +; 自定义的网络信息显示模块,加载自己编写获取本机网络信息的脚本 [module/netrate] type = custom/script exec = ~/.config/polybar/netrate.sh @@ -139,6 +149,7 @@ format-prefix-foreground = ${colors.primary} label = %output% label-foreground = #7e9d7b +; 自定义的声音音量信息显示模块,加载自己编写获得本机声音音量信息的脚本 [module/volume] type = custom/script exec = ~/.config/polybar/sndio.sh @@ -185,6 +196,7 @@ label-foreground = #7e9d7b ;format =