更新polybar配置

master
yutent 2023-07-05 06:38:35 +00:00
parent 126c84ddcb
commit 8787445c29
9 changed files with 162 additions and 111 deletions

View File

@ -0,0 +1,24 @@
[color]
background = #475569
foreground = #d8dee9
altbackground = #39404f
altforeground = #768bb2
accent = #81a1c1
black = #3b4252
red = #bf616a
green = #a3be8c
yellow = #ebcb8b
blue = #81a1c1
magenta = #b48ead
cyan = #88c0d0
white = #e5e9f0
altblack = #4c566a
altred = #bf616a
altgreen = #a3be8c
altyellow = #ebcb8b
altblue = #81a1c1
altmagenta = #b48ead
altcyan = #8fbcbb
altwhite = #eceff4

View File

@ -1,54 +1,28 @@
[colors]
xfs=#e1e1e1
xbs=#8c91cf
xbg=#80d0d0d0
xbg2=#00000000
xfg=#ffffff
;; ------------------------------
color0=#282828
color1=#383838
color2=#4b4b4b
color3=#5b5b5b
color4=#bdbdbd
color5=#cecece
color6=#e0e0e0
color7=#f5f5f5
red=#eb0029
orange=#E85D00
yellow=#faa41a
green=#87a566
aqua=#00a489
blue=#4169e1
purple=#7851a9
brown=#574F4A
[global/wm]
margin-top = 0
margin-bottom = 0
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
include-file = ./colors.ini
include-file = ./modules.ini
[variables]
mpadding = 1
margin = 3
[bar/main]
;override-redirect = true
owm-restack = i3
;owm-restack = Xfwm4
locale = zh_CN.UTF-8
;locale = zh_CN.UTF-8
background = ${colors.xbg}
foreground = ${colors.xfg}
background = ${color.background}
foreground = ${color.foreground}
width = 100%
height = 30
height = 26
border-top-size = 5
border-bottom-size = 5
border-top-color = ${colors.xbg}
border-bottom-color = ${colors.xbg}
border-size = 6
border-color = ${color.background}
padding-left = 0
padding-right = 2
@ -56,94 +30,52 @@ offset-x = 0
offset-y = 0
;radius = 18
font-0 = "HarmonyOS Sans SC:size=11;3"
font-1 = "Symbols Nerd Font:size=16;4"
font-2 = "DejaVu Sans:size=16;4"
font-0 = "Raleway:size=11;3"
font-1 = "HarmonyOS Sans SC:size=11;3"
font-2 = "Symbols Nerd Font:size=15;4"
;font-3 = "DejaVu Sans: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
tray-position = right
tray-maxsize = 16
tray-padding = 5
tray-detached = false
tray-background = ${color.background}
tray-scale = 1.0
enable-ipc = true
; 可点击鼠标状态
cursor-click = pointer
;; 事件 Fallback
;; 当模块的事件没有定义时, 会fallback 到这里的
;click-left =
;click-middle =
;click-right =
;scroll-up = bspc desktop -f prev.local
;scroll-down = bspc desktop -f next.local
;double-click-left =
;double-click-middle =
;double-click-right =
[settings]
throttle-output = 5
throttle-output-for = 10
[module/logo]
type = custom/text
content =
content-foreground = ${colors.red}
content-padding = 4
screenchange-reload = false
[module/i3]
type = internal/i3
enable-click = false
index-sort = true
label-focused = %index%
label-focused-background = ${colors.orange}
label-focused-padding = 3
label-unfocused = %index%
label-unfocused-padding = 3
label-unfocused-foreground = ${colors.color4}
label-visible= %index%
label-visible-padding = 3
label-visible-foreground = ${colors.color4}
[module/date]
type = internal/date
format-padding = ${variables.mpadding}
date = "%m月%d %A"
time = "%k:%M"
label = %date% %time%
label-font = 1
#click-left = alacritty -e "/usr/bin/cal"
[module/netspeed]
type = internal/network
interface = enp86s0
interval = 1.0
format-connected = <label-connected>
format-connected-padding = ${variables.mpadding}
label-connected = "↑%upspeed% ↓%downspeed%"
[module/hibernate]
type = custom/text
;click-left = lxsession-logout -p ""
content = %{T9}%{T-}
content-foreground = ${colors.yellow}
[module/logout]
type = custom/text
;click-left = lxsession-logout -p ""
content = %{T9}襤%{T-}
content-foreground = ${colors.red}
content-padding = 2
[module/space]
type = custom/text
content = %{T1} %{T-}
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over

View File

@ -0,0 +1,8 @@
; load all modules
;
include-file = ./modules/comm.ini
include-file = ./modules/launch.ini
include-file = ./modules/date.ini
include-file = ./modules/speed.ini
include-file = ./modules/workspace.ini
include-file = ./modules/power.ini

View File

@ -0,0 +1,30 @@
; 空格
[module/space]
type = custom/text
content = %{T1} %{T-}
; 一个点
[module/dot]
type = custom/text
content =
content-foreground = ${color.altbackground}
content-padding = 1
content-font = 4
; 颜色反转的点
[module/dot-alt]
inherit = module/dot
content-foreground = ${color.altforeground}
; 左右半圆符号, 用于来实现polybar圆角的
[module/LD]
type = custom/text
content = "%{T3}%{T-}"
content-background = ${color.background}
content-foreground = ${color.altbackground}
[module/RD]
type = custom/text
content = "%{T3}%{T-}"
content-background = ${color.background}
content-foreground = ${color.altbackground}

View File

@ -0,0 +1,8 @@
[module/date]
type = internal/date
format-padding = 3
date = "%a, %m/%d"
time = "%k:%M"
label = %date% %time%
label-font = 1
#click-left = alacritty -e "/usr/bin/cal"

View File

@ -0,0 +1,5 @@
[module/logo]
type = custom/text
content =
content-foreground = ${color.red}
content-padding = 3

View File

@ -0,0 +1,14 @@
[module/hibernate]
type = custom/text
;click-left = lxsession-logout -p ""
content = %{T9}%{T-}
content-foreground = ${color.yellow}
[module/logout]
type = custom/text
;click-left = lxsession-logout -p ""
content = %{T9}襤%{T-}
content-foreground = ${color.red}
content-padding = 2

View File

@ -0,0 +1,8 @@
[module/netspeed]
type = internal/network
; 网卡名称, 自行修改
interface = enp86s0
interval = 1.0
format-connected = <label-connected>
format-connected-padding = 1
label-connected = "↑%upspeed% ↓%downspeed%"

View File

@ -0,0 +1,22 @@
[module/i3]
type = internal/xworkspaces
enable-click = true
enable-scroll = false
index-sort = true
label-active =
label-active-foreground = ${color.green}
;label-active-background = ${color.altbackground}
label-active-padding = 1
label-occupied =
label-occupied-foreground = ${color.accent}
;label-occupied-background = ${color.altbackground}
label-occupied-padding = 1
label-empty =
label-empty-foreground = ${color.accent}
;label-empty-background = ${color.altbackground}
label-empty-padding = 1