dotfiles/dot_config/polybar/config.ini.tmpl

305 lines
6.5 KiB
Cheetah
Raw Normal View History

;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
background = #121212
background-alt = #1c1c1c
foreground = #cccccc
foreground-alt = #77
foreground-gray = #77
primary = #FFD75F
secondary = #d64937
alert = #d64937
[global/wm]
margin-bottom = 0
[bar/top]
enable-ipc = true
bottom = false
2024-03-09 19:10:41 +09:00
{{- if eq .chezmoi.hostname "arch" }}
monitor = DP-2
{{- else if eq .chezmoi.hostname "buzz" }}
monitor = eDP1
{{- end }}
width = 100%
height = 16
offset-x = 0
offset-y = 0
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 0
overline-color = #f00
underline-size = 0
underline-color = #1c1c1c
border-bottom-size = 1
border-bottom-color = #121212
spacing = 1
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 1
; font-N = <fontconfig pattern>;<vertical offset>
font-0 = "Source Han Code JP R:style=Bold:pixelsize=8;2"
font-1 = "NotoEmoji:scale=11"
font-2 = "siji:pixelsize=10;2"
font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;2"
font-4 = "Font Awesome 6 Brands:pixelsize=8;2"
font-5 = "Symbols Nerd Font:pixelsize=12;2"
2024-03-09 19:10:41 +09:00
{{- if eq .chezmoi.hostname "arch" }}
modules-left = i3 clicker xwindow
modules-center = date
modules-right = pueue filesystem temp cpu memory eth-down eth-up ipv6 ollama caffeine cam tray
2024-03-09 19:10:41 +09:00
{{- else if eq .chezmoi.hostname "buzz" }}
modules-left = i3 xwindow
modules-center = date
modules-right = filesystem temp cpu memory battery tray
2024-03-09 19:10:41 +09:00
{{- end }}
; tray-position = right
; tray-padding = 4
; tray-maxsize = 12
; wm-restack = i3
; override-redirect = true
[module/tray]
type = internal/tray
; tray-spacing = 2
tray-padding = 4
tray-size = 75%
{{ if eq .chezmoi.hostname "buzz" }}
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 98
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 15
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = AC
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
{{ end }}
[module/pueue]
type = custom/script
interval = 5
exec = /home/inkch/.config/polybar/scripts/pueue-count.py
[module/mic]
type = custom/script
interval = 5
exec = /home/inkch/.config/polybar/scripts/mic.py
[module/cam]
type = custom/script
interval = 5
exec = /home/inkch/.config/polybar/scripts/camera.py
[module/vms]
type = custom/script
interval = 5
exec = /home/inkch/.config/polybar/scripts/vm-stat.py
2024-03-09 19:10:41 +09:00
{{ if eq .chezmoi.hostname "arch" }}
[module/clicker]
type = custom/script
format = <label>
label = INSANE CLICKER IS RUNNNING
interval = 1
format-background = ${colors.alert}
label-padding-left = 2
label-padding-right = 2
exec = /home/inkch/.config/polybar/scripts/clicker-stat.sh
[module/ollama]
type = custom/script
format = <label>
label = %output%
interval = 3
exec = /home/inkch/.config/polybar/scripts/ollama.sh
{{- end }}
[module/caffeine]
type = custom/script
format = <label>
label = %output%
interval = 1
exec = /home/inkch/.config/polybar/scripts/caffeine-check-status.py
click-left = /home/inkch/.config/polybar/scripts/caffeine-toggle.py
[module/ipv6]
type = custom/script
format = <label>
label = %output:6%
interval = 3
exec = /home/inkch/.config/polybar/scripts/ipv6-stat.py
[module/vpn]
type = custom/script
format = <label>
label = %output:2%
interval = 3
exec = /home/inkch/.config/polybar/scripts/vpn-stat.py
[module/xwindow]
type = internal/xwindow
label = %title%
label-maxlen = 100
[module/temp]
type = internal/temperature
interval = 0.5
thermal-zone = 0
hwmon-path = /sys/class/hwmon/hwmon0/temp1_input
warn-temperature = 60
format-underline = ${colors.foreground}
format-warn-underline = ${colors.alert}
[module/filesystem]
type = internal/fs
interval = 30
2024-03-09 19:10:41 +09:00
{{ if eq .chezmoi.hostname "arch" }}
mount-0 = /
mount-1 = /mnt/hdd
mount-2 = /mnt/hdd2
2024-03-09 19:10:41 +09:00
{{ else if eq .chezmoi.hostname "buzz" }}
mount-0 = /
{{ end }}
label-mounted = %free:2%
label-mounted-foreground = ${colors.foreground-alt}
label-unmounted = x
label-unmounted-foreground = ${colors.foreground-alt}
fixed-values = true
[module/i3]
type = internal/i3
ws-icon-default = x
index-sort = true
label-mode = %mode%
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.alert}
label-focused = %index%
label-focused-background = ${colors.primary}
label-focused-foreground = #000000
label-focused-underline= ${colors.primary}
label-focused-padding = 1
label-unfocused = %index%
label-unfocused-foreground = ${colors.foreground-gray}
label-unfocused-background = ${colors.background}
label-unfocused-padding = 1
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-visible = %index%
label-visible-padding = 1
[module/cpu]
type = internal/cpu
interval = 1
format-underline = ${colors.primary}
{{ if eq .chezmoi.hostname "buzz" }}
format-foreground = ${colors.foreground-alt}
{{ end }}
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 1
format-underline = #32bbc2
label = %percentage_used:2%%
{{ if eq .chezmoi.hostname "buzz" }}
format-foreground = ${colors.foreground-alt}
{{ end }}
[module/eth-up]
type = internal/network
2024-03-09 19:10:41 +09:00
{{ if eq .chezmoi.hostname "arch" }}
interface = enp34s0
2024-03-09 19:10:41 +09:00
{{ else if eq .chezmoi.hostname "buzz" }}
interface = enp3s0
{{ end }}
interval = 1.0
format-connected = <label-connected>
format-connected-underline = #9f78e1
format-disconnected-underline = ${self.format-connected-underline}
label-connected = %upspeed:8%↑
label-disconnected = 
label-disconnected-foreground = ${colors.foreground-alt}
[module/eth-down]
type = internal/network
2024-03-09 19:10:41 +09:00
{{ if eq .chezmoi.hostname "arch" }}
interface = enp34s0
2024-03-09 19:10:41 +09:00
{{ else if eq .chezmoi.hostname "buzz" }}
interface = enp3s0
{{ end }}
interval = 1.0
format-connected = <label-connected>
format-connected-underline = #9f78e1
format-disconnected-underline = ${self.format-connected-underline}
label-connected = %downspeed:8%↓
label-disconnected = 
label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1.0
date = "[#%V] %d %a"
date-alt = "[#%V] %d %a"
time = "%H:%M:%S"
time-alt = "%H:%M:%S"
format-time-offset=10
label = "%date% %time%"
; vim:set ft=toml: