;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================
include-file = ~/.config/polybar/mocha.ini
[global/wm]
margin-top = 0
margin-bottom = 0

[module/i3]
type = internal/i3
pin-workspaces = true
show-urgent = true

label-focused = %index%
label-focused-foreground = #ffffff
label-focused-background = #3f3f3f
label-focused-underline = ${colors.nomai}
label-focused-padding = 3
label-unfocused-padding = 1


[colors]
background = #1e1e2e
background-alt = #373B41
foreground = #C5C8C6
primary = #f68c23
secondary = ${colors.nomai}
disabled = #707880

[bar/example]
width = 100%
height = 22pt
radius = 6
monitor = ${env:MONITOR:}

; dpi = 96

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

line-size = 3pt

border-size = 0pt
border-color = #00000000
border-left = 6 
border-right = 6
border-top = 6

padding-left = 0
padding-right = 1

module-margin = 1

separator = |
separator-foreground = ${colors.disabled}

font-0 = "Liberation Mono:size=11;3"
font-1 = "Symbols Nerd Font Mono:size=13;3"
; font-0 = "JetBrainsMonoNL Nerd Font Mono:size=11;3"

; modules-left = i3 xwindow 
modules-left = i3 
modules-right = wlan battery filesystem_root pulseaudio memory cpu xkeyboard date

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

enable-ipc = true

[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%

[module/filesystem_home]
type = internal/fs
interval = 25

mount-0 = /home

format-mounted-prefix = "/home "
format-mounted-prefix-foreground = ${colors.primary}

label-mounted = %percentage_used%%

label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}

[module/filesystem_root]
type = internal/fs
interval = 25

mount-0 = /

format-mounted-prefix = "/ "
format-mounted-prefix-foreground = ${colors.secondary}

label-mounted = %percentage_used%%

label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}


[module/pulseaudio]
type = internal/pulseaudio

format-volume-prefix = " "
format-volume-prefix-foreground = ${colors.secondary}
format-volume = <label-volume>

label-volume = %percentage%%

label-muted =  muted
label-muted-foreground = ${colors.disabled}

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock

; label-layout = %{T2}%{T-}
label-layout =  %name%
label-layout-foreground = ${colors.secondary}
layout-icon-0 = ru;ru
layout-icon-1 = us;us

label-indicator-on = %name%
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}

format = <label-indicator><label-layout>

[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.secondary}
label = %percentage_used:2%%  
; type = internal/memory
; interval = 2
; format-prefix = " "
; format-prefix-foreground = ${colors.primary}
; label = %percentage_used:2%%

[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.secondary}
label = %percentage:2%%

[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected

[module/wireless-network]
type = internal/network
interface = wlan1


[module/date]
type = internal/date
interval = 1

date = %a %d-%b %H:%M:%S
date-alt = %Y-%m-%d %H:%M:%S

label = %date%
label-foreground = ${colors.secondary}

[settings]
screenchange-reload = true
pseudo-transparency = true

; vim:ft=dosini
[module/network-home]
type = internal/network
; Name of the network interface to display. You can get the names of the
; interfaces on your machine with `ip link`
; Wireless interfaces often start with `wl` and ethernet interface with `eno` or `eth`
interface = eno1

; If no interface is specified, polybar can detect an interface of the given type.
; If multiple are found, it will prefer running interfaces and otherwise just
; use the first one found.
; Either 'wired' or 'wireless'
; New in version 3.6.0
interface-type = wired

; Seconds to sleep between updates
; Default: 1
interval = 3.0

; NOTE: Experimental (might change or be removed in the future)
; Test connectivity every Nth update by pinging 8.8.8.8
; In case the ping fails 'format-packetloss' is used until the next ping
; A value of 0 disables the feature
; Default: 0
;ping-interval = 3

; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
; Minimum output width of upload/download rate
; Default: 3
udspeed-minwidth = 5

; Accumulate values from all interfaces
; when querying for up/downspeed rate
; Default: false
accumulate-stats = true

; Consider an `UNKNOWN` interface state as up.
; Some devices like USB network adapters have 
; an unknown state, even when they're running
; Default: false
unknown-as-up = true

; The unit used for displaying network speeds
; For example if set to the empty string, a speed of 5 KB/s is displayed as 5 K
; Default: B/s
; New in version 3.6.0
speed-unit = ''

[module/network-vpn]
type = internal/network
; Name of the network interface to display. You can get the names of the
; interfaces on your machine with `ip link`
; Wireless interfaces often start with `wl` and ethernet interface with `eno` or `eth`
interface = vpn0

; If no interface is specified, polybar can detect an interface of the given type.
; If multiple are found, it will prefer running interfaces and otherwise just
; use the first one found.
; Either 'wired' or 'wireless'
; New in version 3.6.0
interface-type = wired

; Seconds to sleep between updates
; Default: 1
interval = 3.0

; NOTE: Experimental (might change or be removed in the future)
; Test connectivity every Nth update by pinging 8.8.8.8
; In case the ping fails 'format-packetloss' is used until the next ping
; A value of 0 disables the feature
; Default: 0
;ping-interval = 3

; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
; Minimum output width of upload/download rate
; Default: 3
udspeed-minwidth = 5

; Accumulate values from all interfaces
; when querying for up/downspeed rate
; Default: false
accumulate-stats = true

; Consider an `UNKNOWN` interface state as up.
; Some devices like USB network adapters have 
; an unknown state, even when they're running
; Default: false
unknown-as-up = true

; The unit used for displaying network speeds
; For example if set to the empty string, a speed of 5 KB/s is displayed as 5 K
; Default: B/s
; New in version 3.6.0
speed-unit = ''

[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 99

; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 5

; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1

; 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
label-discharging = %{F#FF8C00}󱟞%{F-} %percentage%% %time%
label-charging = %{F#09f429}󰂄%{F-} %percentage%%
label-full = %{F#a6e3a1}󱊣%{F-} %percentage%%
label-low = %{F#f20202}󱊡%{F-} BATTERY LOW %percentage%%

[module/wlan]
type = internal/network
interface = wlp2s0
format-connected = <label-connected>
label-connected = %{F#a6e3a1}%{F-} %{T6}%essid% %signal%

