增加polybar配置

i3
yutent 2023-06-28 11:31:09 +00:00
parent 99cd84240f
commit 977743ad0e
2 changed files with 162 additions and 0 deletions

View File

@ -0,0 +1,152 @@
[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
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
[variables]
mpadding = 1
margin = 3
[bar/main]
;override-redirect = true
;wm-restack = Cinnamon
locale = zh_CN.UTF-8
background = ${colors.xbg}
foreground = ${colors.xfg}
width = 98%
height = 36
padding-left = 2
padding-right = 4
offset-x = 1%
offset-y = 12
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"
fixed-center = true
modules-left = logo ws
modules-center = date
modules-right = netspeed space space hibernate space logout
tray-position = right
tray-maxsize = 16
enable-ipc = true
[module/logo]
type = custom/text
content =
content-foreground = ${colors.red}
content-padding = 2
[module/ws]
type = internal/xworkspaces
icon-0 = "Workspace 1;➊"
icon-1 = "Workspace 2;➋"
icon-2 = "Workspace 3;➌"
icon-default = "➓"
label-active = %icon%
label-active-foreground = ${colors.orange}
label-active-padding = 2
label-urgent = %icon%
label-urgent-padding = 2
label-urgent-foreground = ${colors.color4}
label-occupied = %icon%
label-occupied-padding = 2
label-occupied-foreground = ${colors.color4}
label-empty = %icon%
label-empty-padding = 2
label-empty-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
[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-}

10
home/config/polybar/launch.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
# Launch polybar
polybar main -r &