powerline

This commit is contained in:
Zoe 2022-04-22 18:37:41 +02:00
parent d4dc640b96
commit 0f4c3197c9
3 changed files with 246 additions and 25 deletions

214
\ Normal file
View file

@ -0,0 +1,214 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
include-file = ./powerline-for-polybar/powerline-for-polybar.config
[colors]
background = #282a36
background-alt = #44475a
foreground = #f8f8f2
primary = #f8f8f2
secondary = #ff79c6
alert = #ff5555
disabled = #6272a4
green = #50fa7b
cyan = #8be9fd
orange = #ffb86c
pink = #ff79c6
purple = #bd93f9
red = #ff5555
yellow = #f1fa8c
white = #f8f8f2
[bar/bar]
width = 100%
height = 16pt
radius = 0
#dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 0pt
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 0
module-margin = 0
separator =
separator-foreground = ${colors.disabled}
font-0 = "CaskaydiaCove Nerd Font:size=11; 3"
modules-left = i3 xwindow
modules-center = player-mpris-tail
modules-right = battery1 battery0 pulseaudio xkeyboard memory cpu date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; tray-position = left
wm-restack = i3
; override-redirect = true
[module/i3]
type = internal/i3
pin-workspaces = false
show-urgent = true
strip-wsnumbers = true
index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = true
reverse-scroll = false
fuzzy-match = true
label-focused-foreground = ${colors.secondary}
label-focused-padding = 0
label-unfocused-padding = 0
label-separator = |
label-separator-padding = 0
label-separator-foreground = ${colors.disabled}
[module/xwindow]
type = internal/xwindow
label = %title:0:24:...%
[module/player-mpris-tail]
type = custom/script
exec = $HOME/.config/polybar/player-mpris-tail.py -f '{icon} {artist} - {title}' --icon-playing "契" --icon-paused ""
tail = true
click-left = $HOME/.config/polybar/player-mpris-tail.py previous &
click-right = $HOME/.config/polybar/player-mpris-tail.py next &
click-middle = $HOME/.config/polybar/player-mpris-tail.py play-pause &
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume>
label-volume =蓼 %percentage%%
label-volume-background = ${colors.yellow}
label-volume-foreground = ${colors.background}
label-volume-padding = 1
label-muted = 遼
label-muted-foreground = ${colors.disabled}
label-muted-background = ${colors.red}
click-right = pavucontrol
label-muted-padding = 1
[module/battery0]
type = internal/battery
full-at = 99
low-at = 5
battery = BAT0
adapter = ADP1
poll-interval = 120
label-discharging-background = ${colors.orange}
label-discharging-foreground = ${colors.background}
label-discharging-padding = 1
label-discharging = %percentage%%
label-charging-background = ${colors.orange}
label-charging-foreground = ${colors.background}
label-charging = %percentage%%
label-charging-padding = 1
label-full = %percentage%%
label-full-background = ${colors.orange}
label-full-foreground = ${colors.background}
label-full-padding = 1
[module/battery1]
type = internal/battery
full-at = 99
low-at = 5
battery = BAT1
adapter = ADP1
poll-interval = 120
label-discharging-background = ${colors.red}
label-discharging-foreground = ${colors.background}
label-discharging-padding = 1
label-discharging = %percentage%%
label-charging-background = ${colors.red}
label-charging-foreground = ${colors.background}
label-charging = %percentage%%
label-charging-padding = 1
label-full = %percentage%%
label-full-background = ${colors.red}
label-full-foreground = ${colors.background}
label-full-padding = 1
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.background}
label-layout-background = ${colors.green}
label-layout-padding = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
label = %percentage_used:2%%
label-background = ${colors.cyan}
label-foreground = ${colors.background}
label-padding = 1
[module/cpu]
type = internal/cpu
interval = 20
label = %percentage:2%%
label-background = ${colors.purple}
label-foreground = ${colors.background}
label-padding = 1
[module/date]
inherit = powerline-templates/right-to-left-item
background = ${colors.pink}
background-next = ${colors.purple}
type = internal/date
interval = 1
date = %H:%M
date-alt = %d %m %Y %H:%M:%S
label =﨟 %date%
label-foreground = ${colors.background}
label-background = ${colors.pink}
label-padding = 1
[settings]
screenchange-reload = true
pseudo-transparency = false
# vim:ft=dosini

View file

@ -16,6 +16,8 @@
; ;
;========================================================== ;==========================================================
include-file = ./powerline-for-polybar/powerline-for-polybar.config
[colors] [colors]
background = #282a36 background = #282a36
background-alt = #44475a background-alt = #44475a
@ -35,7 +37,7 @@ white = #f8f8f2
[bar/bar] [bar/bar]
width = 100% width = 100%
height = 18pt height = 20
radius = 0 radius = 0
#dpi = 96 #dpi = 96
@ -51,25 +53,23 @@ border-color = #00000000
padding-left = 0 padding-left = 0
padding-right = 0 padding-right = 0
module-margin = 1 module-margin = 0
separator = separator =
separator-foreground = ${colors.disabled} separator-foreground = ${colors.disabled}
font-0 = "CaskaydiaCove Nerd Font:size=11; 3" font-0 = "CaskaydiaCove Nerd Font:size=11; 2"
font-1 = "CaskaydiaCove Nerd Font Mono:size=11; 3"
modules-left = i3 xwindow modules-left = i3 xwindow
modules-center = player-mpris-tail modules-center = player-mpris-tail battery1 battery0
modules-right = battery1 battery0 pulseaudio xkeyboard memory cpu date modules-right = pulseaudio xkeyboard memory cpu date
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize
enable-ipc = true enable-ipc = true
tray-position = left ; tray-position = left
wm-restack = i3 wm-restack = i3
@ -89,8 +89,7 @@ fuzzy-match = true
label-focused-foreground = ${colors.secondary} label-focused-foreground = ${colors.secondary}
label-focused-padding = 0 label-focused-padding = 0
label-unfocused-padding = 0 label-unfocused-padding = 0
label-separator =| label-separator-padding = 0
label-separator-padding = 1
label-separator-foreground = ${colors.disabled} label-separator-foreground = ${colors.disabled}
@ -108,6 +107,10 @@ click-middle = $HOME/.config/polybar/player-mpris-tail.py play-pause &
[module/pulseaudio] [module/pulseaudio]
inherit = powerline-templates/right-to-left-item
background = ${colors.yellow}
background-next = ${colors.background}
type = internal/pulseaudio type = internal/pulseaudio
format-volume = <label-volume> format-volume = <label-volume>
@ -118,29 +121,24 @@ label-volume-foreground = ${colors.background}
label-volume-padding = 1 label-volume-padding = 1
label-muted = label-muted =
label-muted-foreground = ${colors.disabled} label-muted-foreground = ${colors.background}
label-muted-background = ${colors.red} label-muted-background = ${colors.yellow}
click-right = pavucontrol click-right = pavucontrol
label-muted-padding = 1 label-muted-padding = 1
[module/battery0] [module/battery0]
inherit = powerline-templates/right-to-left-item
type = internal/battery type = internal/battery
full-at = 99 full-at = 99
low-at = 5 low-at = 5
battery = BAT0 battery = BAT0
adapter = ADP1 adapter = ADP1
poll-interval = 120 poll-interval = 120
label-discharging-background = ${colors.orange}
label-discharging-foreground = ${colors.background}
label-discharging-padding = 1 label-discharging-padding = 1
label-discharging = %percentage%% label-discharging = %percentage%%
label-charging-background = ${colors.orange}
label-charging-foreground = ${colors.background}
label-charging = %percentage%% label-charging = %percentage%%
label-charging-padding = 1 label-charging-padding = 1
label-full = %percentage%% label-full = %percentage%%
label-full-background = ${colors.orange}
label-full-foreground = ${colors.background}
label-full-padding = 1 label-full-padding = 1
[module/battery1] [module/battery1]
@ -150,20 +148,18 @@ low-at = 5
battery = BAT1 battery = BAT1
adapter = ADP1 adapter = ADP1
poll-interval = 120 poll-interval = 120
label-discharging-background = ${colors.red}
label-discharging-foreground = ${colors.background}
label-discharging-padding = 1 label-discharging-padding = 1
label-discharging = %percentage%% label-discharging = %percentage%%
label-charging-background = ${colors.red}
label-charging-foreground = ${colors.background}
label-charging = %percentage%% label-charging = %percentage%%
label-charging-padding = 1 label-charging-padding = 1
label-full = %percentage%% label-full = %percentage%%
label-full-background = ${colors.red}
label-full-foreground = ${colors.background}
label-full-padding = 1 label-full-padding = 1
[module/xkeyboard] [module/xkeyboard]
inherit = powerline-templates/right-to-left-item
background = ${colors.green}
background-next = ${colors.yellow}
type = internal/xkeyboard type = internal/xkeyboard
blacklist-0 = num lock blacklist-0 = num lock
@ -176,6 +172,9 @@ label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary} label-indicator-background = ${colors.secondary}
[module/memory] [module/memory]
inherit = powerline-templates/right-to-left-item
background = ${colors.cyan}
background-next = ${colors.green}
type = internal/memory type = internal/memory
interval = 2 interval = 2
label = %percentage_used:2%% label = %percentage_used:2%%
@ -184,6 +183,9 @@ label-foreground = ${colors.background}
label-padding = 1 label-padding = 1
[module/cpu] [module/cpu]
inherit = powerline-templates/right-to-left-item
background = ${colors.purple}
background-next = ${colors.cyan}
type = internal/cpu type = internal/cpu
interval = 20 interval = 20
label = %percentage:2%% label = %percentage:2%%
@ -192,11 +194,15 @@ label-foreground = ${colors.background}
label-padding = 1 label-padding = 1
[module/date] [module/date]
inherit = powerline-templates/right-to-left-item
background = ${colors.pink}
background-next = ${colors.purple}
type = internal/date type = internal/date
interval = 1 interval = 1
date = %H:%M date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S date-alt = %d %m %Y %H:%M:%S
label =﨟 %date% label =﨟 %date%
label-foreground = ${colors.background} label-foreground = ${colors.background}

1
powerline-for-polybar Submodule

@ -0,0 +1 @@
Subproject commit fb48d19f5d5acf23586d3803e12c9538832d8789