dotfiles/system/.config/polybar/config
Severin Kaderli c94d46b9ef
Fix polybar battery module
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
2019-05-29 14:02:41 +02:00

318 lines
No EOL
7.6 KiB
Text

# SCRIPT NAME:
# .config/polybar/config
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# This file contains my Polybar configuration
#
# USAGE:
# This file is automatically used by Polybar.
#######################################
# Variables
#######################################
[settings]
padding = 4
background-color = #BF080808
foreground-color = #BFA1B0B8
bar-height = 35
#######################################
# Top bar
#######################################
[bar/top]
monitor = HDMI1
width = 100%
height = ${settings.bar-height}
offset-x = 0
offset-y = 0
font-0 = Noto Sans:pixelsize=12;3
font-1 = Noto Sans CJK JP:pixelsize=12;3
font-2 = Font Awesome 5 Free:style=Solid::pixelsize=12;3
font-3 = Font Awesome 5 Brands:pixelsize=12;3
font-4 = siji:pixelsize=12;3
background = ${settings.background-color}
foreground = ${settings.foreground-color}
padding-right = 2
module-margin = 2
modules-left = i3
modules-center =
modules-right = update gmail todo battery volume backlight wlan date power
tray-position = none
separator = |
scroll-up = i3wm-desknext
scroll-down = i3wm-deskprev
[bar/top2]
inherit = bar/top
monitor = eDP1
[bar/top3]
inherit = bar/top
monitor = DP2
[bar/top-nvidia]
inherit = bar/top
monitor = HDMI-1-1
[bar/top2-nvidia]
inherit = bar/top
monitor = eDP-1-1
#######################################
# Bottom bar
#######################################
[bar/bottom]
inherit = bar/top
bottom = true
modules-left =
modules-center =
modules-right = music
tray-position = none
[bar/bottom2]
inherit = bar/bottom
monitor = eDP1
tray-position = left
[bar/bottom3]
inherit = bar/bottom
monitor = DP2
tray-position = left
[bar/bottom-nvidia]
inherit = bar/bottom
monitor = HDMI-1-1
tray-position = none
[bar/bottom2-nvidia]
inherit = bar/bottom
monitor = eDP-1-1
tray-position = left
#######################################
# i3 workspaces
#######################################
[module/i3]
type = internal/i3
pin-workspaces = true
strip-wsnumbers = true
index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = false
format = <label-state> <label-mode>
label-mode = [ %mode% ]
label-mode-padding = ${settings.padding}
label-focused = %name%
label-focused-foreground = ${settings.background-color}
label-focused-background = ${settings.foreground-color}
label-focused-padding = ${settings.padding}
label-unfocused = %name%
label-unfocused-padding = ${settings.padding}
label-visible = %name%
label-visible-padding = ${settings.padding}
label-urgent = %name%
label-urgent-foreground = ${settings.foreground-color}
label-urgent-background = ${settings.background-color}
label-urgent-padding = ${settings.padding}
###############################################################################
# RSS count #
###############################################################################
[module/rss]
type = custom/script
exec = newsboat -x print-unread | cut -d " " -f1
format = <label>
label =  %output%
interval = 60
###############################################################################
# Update count #
###############################################################################
[module/update]
type = custom/script
exec = ${XDG_CONFIG_HOME}/polybar/scripts/update-count
format = <label>
label =  %output%
interval = 60
click-left = xdg-open "https://www.archlinux.org/"
###############################################################################
# G-Mail #
###############################################################################
[module/gmail]
type = custom/script
exec = ${XDG_CONFIG_HOME}/polybar/scripts/gmail/count.py
format = <label>
label =  %output%
interval = 60
click-left = xdg-open https://mail.google.com
###############################################################################
# Todo #
###############################################################################
[module/todo]
type = custom/script
exec = task count due.before:tomorrow and status:pending or due: and status:pending
format = <label>
label =  %output%
interval = 60
###############################################################################
# Battery indicator #
###############################################################################
[module/battery]
type = internal/battery
full-at = 99
battery = ${env:POLYBAR_BATTERY}
adapter = AC
time-format = %H:%M
label-full =  %percentage%%
format-charging = <animation-charging> <label-charging>
label-charging = %percentage%% %time%
format-discharging = <ramp-capacity> <label-discharging>
label-discharging = %percentage%% %time%
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${settings.foreground-color}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 500
interval = 5
poll-interval = 5
##############################################################################
# Volume indicator #
##############################################################################
[module/volume]
type = internal/pulseaudio
use-ui-max = true
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
format-muted =  <label-muted>
label-muted = %percentage%%
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
interval = 5
##############################################################################
# Brightness indicator #
##############################################################################
[module/backlight]
type = custom/script
exec = light -G | cut -d. -f1
format =  <label>
label = %output%%
interval = 0.1
scroll-up = light -A 5
scroll-down = light -U 5
##############################################################################
# WiFi indicator #
##############################################################################
[module/wlan]
type = internal/network
interface = wlp3s0
format-connected = <ramp-signal> <label-connected>
label-connected = %essid%
format-disconnected = <label-disconnected>
label-disconnected = Disconnected
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${settings.foreground-color}
interval = 1
##############################################################################
# Time and date #
##############################################################################
[module/date]
type = custom/script
exec = date +"%F %H:%M:%S"
format =  <label>
label = %output%
interval = 1
click-left = xdg-open "https://calendar.google.com"
##############################################################################
# Power menu #
##############################################################################
[module/power]
type = custom/text
content = 
click-left = $XDG_BIN_HOME/power
#######################################
# Music status in the bottom bar
#######################################
[module/music]
type = custom/script
exec = ${XDG_BIN_HOME}/music
format = <label>
label = %output%
interval = 0.5