;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================

; dark
[colors]
background = #0B0A07
background-alt = #0B0A07
background-inactive = #4A4430
foreground = #BBCEA8
foreground-alt = #E3D87E
primary = #ffb52a
secondary = #e60053
underline = #F0EC57
alert = #bd2c40

; transparent
[colors2]
background = #00553555
background-alt = #50553555
background-inactive = #50755B69
foreground = #000000
foreground-alt = #fff
primary = #ffb52a
secondary = #e60053
alert = #bd2c40

[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = false

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 3
line-color = #f00

border-size = 0
border-color = #00000000

padding-left = 0
padding-right = 2

module-margin-left = 1
module-margin-right = 2

font-0 = fixed:pixelsize=10;1
font-1 = Source Han Sans JP,源ノ角ゴシック JP:style=Regular
font-2 = NotoSansMono Nerd Font:style=Regular
font-3 = FontAwesome6Free

modules-left = i3 title
modules-center =
modules-right = pacman finance memory cpu filesystem wireless-network weather date

tray-position = right
tray-padding = 2
;tray-background = #0063ff

;wm-restack = bspwm
;wm-restack = i3

;override-redirect = true

;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev

;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

cursor-click = pointer
cursor-scroll = ns-resize

[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
strip-wsnumbers = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true

ws-icon-0 = 1;一
ws-icon-1 = 2;二
ws-icon-2 = 3;三
ws-icon-3 = 4;四
ws-icon-4 = 5;五
ws-icon-5 = 6;六
ws-icon-6 = 7;七
ws-icon-7 = 8;八
ws-icon-8 = 9;九
ws-icon-9 = 0;十

label-mode-padding = 1
label-mode-foreground = #000
label-mode-background = ${colors.primary}

; focused = Active workspace on focused monitor
label-focused = %icon%
label-focused-background = ${colors.background-alt}
label-focused-foreground = ${colors.foreground-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 1

; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-background = ${colors.background-inactive}
label-unfocused-underline= ${colors.primary}
label-unfocused-padding = 1

; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-foreground = ${colors.foreground-alt}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}

; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2

; Separator in between workspaces
;label-separator = |

[module/date]
type = internal/date
interval = 1.0
date = %{A1:alacritty -e calcurse:} 📅 %A, %B %d, %Y  %I:%M:%S %p %{A}

[module/filesystem]
type = internal/fs
interval = 60

mount-0 = /
mount-1 = /home

label-mounted = %{A1:alacritty --hold -e df -h:}  %mountpoint%: %percentage_used%% %{A}
;label-unmounted = %mountpoint% not mounted
;label-unmounted-foreground = ${colors.foreground-alt}

; Separator in between workspaces
label-separator = |

[module/cpu]
type = internal/cpu
interval = 10
warn-percentage = 95
label = %{A1:alacritty -e htop:}  CPU %percentage%% %{A}

[module/title]
type = internal/xwindow
format-background = ${colors.background-alt}
format-foreground = ${colors.foreground}
format-padding = 2
label-underline = ${colors.primary}
label-maxlen = 30

[module/memory]
type = internal/memory
interval = 10
warn-percentage = 95
format = <label>
label =  RAM %gb_used%/%gb_total%
bar-used-width = 50
bar-used-indicator =
bar-used-fill = ▐
bar-used-empty = ▐

[module/wireless-network]
type = internal/network
interface = wlan0
interval = 10
label-connected =  SSID: %essid% %signal%% %local_ip%
format-background = #444444

[module/weather]
type = custom/script
exec = ~/.scripts/i3_weather.sh
interval = 3600
click-left = alacritty --hold -e curl -Ss http://wttr.in

[module/finance]
type = custom/script
exec = ~/.scripts/i3_finance.sh
interval = 3600

[module/pacman]
type = custom/script
exec = ~/.scripts/i3_pacman.sh
interval = 3600
click-left = [[ $(pacman -Qu | wc -l) -gt 0 ]] && alacritty --hold -e pacman -Qu

[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false

[global/wm]
margin-top = 5
margin-bottom = 5

; vim:ft=dosini
