; vim: ft=dosini

[colors]
nord_red = #BF616A
nord_orange = #D08770
nord_yellow = #EBCB8B
nord_green = #A3BE8C
nord_purple = #B48EAD

nord_blue0 = #8FBCBB
nord_blue1 = #88C0D0
nord_blue2 = #81A1C1
nord_blue3 = #5E81AC

nord0 = #2E3440
nord3 = #4C566A

frost2 = #ECEFF4


accent = ${colors.nord_green}
modules_fg = ${colors.frost2}
background = ${colors.nord0}
foreground = ${colors.frost2}

###############################################################################
[settings]
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-padding = 0
format-margin = 0
screenchange-reload = true

###############################################################################
[bar/laptop]
monitor = "eDP-1"
enable-ipc = false

font-0 = "Inconsolata:pixelsize=11;2"
font-1 = "InconsolataLGC Nerd Font Mono:pixelsize=14;4"
font-2 = "IPAGothic:fontformat=truetype:antialias=false:pixelsize=11"

bottom = false
fixed-center = true

padding-left = 0
padding-right = 1

radius = 0.0

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

tray-position = right

width = 100%:-16px
height = 27

offset-y = 8px
offset-x = 8px

override-redirect = true

module-margin = 1

modules-left = i3tabs title
modules-center = spotify_current
modules-right = firefox spotify discord pipe backlight volume battery pipe network pipe date time pipe
separator =

wm-name = i3
wm-restack = i3

###############################################################################
[bar/external]
inherit = bar/laptop

tray-position =

monitor = ${env:MONITOR:}

modules-left = i3tabs title
modules-center = spotify_current
modules-right = firefox spotify discord pipe volume battery pipe network pipe date time
separator =

###############################################################################
[module/i3tabs]
type = internal/i3

pin-workspaces = true
index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = false

format = <label-state> <label-mode>

background = ${colors.background}

ws-icon-0 = 1;1
ws-icon-1 = 2;2
ws-icon-2 = 3;3
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;9
ws-icon-9 = 10;10

label-focused = %icon%
label-focused-foreground = ${colors.background}
label-focused-background = ${colors.accent}
label-focused-padding = 1

label-unfocused = %index%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-background = ${self.background}
label-unfocused-padding = 1

label-visible = %index%
label-visible-foreground = ${colors.foreground}
label-visible-background = ${self.background}
label-visible-padding = 1

label-urgent = %index%
label-urgent-foreground = ${colors.nord_red}
label-urgent-background = ${self.background}
label-urgent-padding = 1

label-mode = %mode%
label-mode-padding = 0
label-mode-foreground = ${colors.accent}
label-mode-background = ${self.background}

###############################################################################
[module/date]
type = internal/date

interval = 1.0

date = %Y-%m-%d%
date-alt = %A, %d %B %Y

label = 冀 %date%

###############################################################################
[module/time]
type = internal/date

interval = 1.0

time = %H:%M

label =  %time%

###############################################################################
[module/title]
type = internal/xwindow
label = %title%
format = <label>
label-maxlen = 80
label-empty = "Yoroshiku!"
format-padding = 2

###############################################################################
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
apdapter = ADP1

format-charging = <ramp-capacity> <label-charging>
format-charging-foreground = ${colors.nord_green}
label-charging = %percentage%% 

format-discharging = <ramp-capacity> <label-discharging>
format-discharging-foreground = ${colors.nord_green}
label-discharging = %percentage%%

ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 

format-full = <label-full>
format-full-foreground = ${colors.nord_green}
label-full =  FULL

###############################################################################
[module/volume]
type = internal/pulseaudio

format-volume = <label-volume>
label-volume = 墳 %percentage%%

format-muted = <label-muted>
format-muted-foreground = ${colors.nord_red}
label-muted = 婢 MUTED

###############################################################################
[module/network]
type = internal/network
interface = wlo1
interval = 10.0

format-connected = <label-connected>
label-connected = 泌 %essid%

format-disconnectded = <label-disconnected>
label-disconnected = 泌 No Wifi

###############################################################################
[module/backlight]
type = internal/backlight
# ls -1 /sys/class/backlight
card = amdgpu_bl0

format = <label>
label =  %percentage%%

###############################################################################
[module/load]
type = custom/script
exec = ~/.config/polybar/scripts/load.sh
interval = 5.0

###############################################################################
[module/spotify_current]
type = custom/script
exec = ~/.config/polybar/scripts/spotify.sh %artist% - %title%
tail = true
interval = 2

###############################################################################
[module/spotify]
type = custom/text
content = ""
click-left = spotify &

###############################################################################
[module/discord]
type = custom/text
content = "ﭮ"
click-left = Discord &

###############################################################################
[module/firefox]
type = custom/text
content = ""
click-left = firefox &

###############################################################################
[module/pipe]
type = custom/text
content = "|"
