; vim:ft=dosini
[module/i3]
type = internal/i3

pin-workspaces = ${config.i3-pin-workspaces}

strip-wsnumbers = true

index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = true
reverse-scroll = true

fuzzy-match = false

; Available tags:
;   <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
;   <label-mode> (default)
format = <label-state> <label-mode>

; icons
ws-icon-0 = 1:Home;
ws-icon-1 = 2:Browser;
ws-icon-2 = 3:Coding;
ws-icon-3 = 4:Learning;
ws-icon-4 = 5:Fun;
ws-icon-5 = 25:Desktop;
ws-icon-default = 

; color
label-focused = 
label-focused-underline = #fbf1c7
label-focused-foreground = #ebdbb2
label-focused-padding = 2

label-unfocused = •
label-unfocused-foreground = #ebdbb2
label-unfocused-padding = 2

label-urgent = 
label-urgent-foreground = ${colors.urgent}
label-urgent-background = ${colors.foreground}
label-urgent-padding = 2

; seperator
label-separator = |
label-separator-foreground = #ebdbb2


[module/pipewire]
type = custom/ipc

label = "%output%"
label-font = 1

hook-0 = ~/.config/polybar/scripts/sound.sh
hook-1 = ~/.config/polybar/scripts/sound.sh up
hook-2 = ~/.config/polybar/scripts/sound.sh down
hook-3 = ~/.config/polybar/scripts/sound.sh mute
hook-4 = sleep 1 && ~/.config/polybar/scripts/sound.sh
initial = 5

scroll-up = exec polybar-msg action "#pipewire.hook.1"
scroll-down = exec polybar-msg action "#pipewire.hook.2"
click-left = exec polybar-msg action "#pipewire.hook.3"
click-right = exec pavucontrol &

[module/kdeconnect]  
type = custom/script  
exec = "/home/sourav2k/.config/polybar/scripts/polybar-kdeconnect.sh -d"  
tail = true


[module/bspwm]
type = internal/bspwm

ws-icon-0 = I;
ws-icon-1 = II;
ws-icon-2 = III;
ws-icon-3 = IV;
ws-icon-4 = V;
ws-icon-5 = VI;
ws-icon-6 = VII;
ws-icon-7 = VIII;
ws-icon-8 = IX;
ws-icon-9 = X;


label-focused = %icon%
label-focused-underline = ${colors.nord7}
label-focused-foreground = ${colors.nord7}
label-focused-padding = 2

label-occupied = %icon%
label-occupied-underline = ${colors.nord9}
label-occupied-foreground = ${colors.nord9}
label-occupied-padding = 2

label-empty = %icon%
label-empty-foreground = ${colors.buffer}
label-empty-padding = 2

label-urgent = 
label-urgent-foreground = ${colors.urgent}
label-urgent-background = ${colors.foreground}
label-urgent-padding = 2

; seperator
label-separator = |
label-separator-foreground = ${colors.buffer}

[module/workspace-name]
type = internal/i3
strip-wsnumbers = true

format = <label-state>

label-focused = %name%
label-focused-padding = 2
label-focused-foreground = ${colors.nord7}
label-focused-underline = ${colors.nord7}

label-unfocused = 

label-urgent = %name%
label-urgent-foreground = ${colors.urgent}
label-urgent-background = ${colors.foreground}
label-urgent-padding = 2

[module/title]
type = internal/xwindow
format-foreground = #fbf1c7
format-underline = #fbf1c7
format-padding = 4

label-maxlen = 30
label-empty = Sourav2k @ Arch Linux (Pavilion)
label-empty-foreground = #00282828

[module/date]
type = internal/date
interval = 1.0
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date-alt = %r
date = %Y-%m-%d %a



format = <label>
label =  %date%
label-margin = 1
label-underline = #fbf1c7

[module/battery]
type = internal/battery

full-at = ${config.battery-full-at}

battery = ${config.battery-bat}
adapter = ${config.battery-adp}

format-charging = <animation-charging> <label-charging>
format-charging-underline = ${colors.foreground}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 750

format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${colors.notify}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${colors.notify}

label-full = 
label-full-foreground = #fbf1c7
label-full-underline = #fbf1c7

[module/keyboard]
type = internal/xkeyboard

; List of indicators to ignore
bufferlist-0 = num lock
bufferlist-1 = scroll lock

; Format
format = <label-indicator>

label-indicator-on-capslock =  CL
label-indicator-on-capslock-foreground = #fbf1c7
label-indicator-on-capslock-underline = #fbf1c7

; Icons
layout-icon-default = 

[module/alsa]
type = internal/alsa

master-soundcard = ${config.master-soundcard}
speaker-soundcard = ${config.speaker-soundcard}
headphone-soundcard = ${config.headphone-soundcard}

master-mixer = ${config.master-mixer}

; Format 
format-volume = <ramp-volume> <label-volume>
format-volume-underline = #fbf1c7

label-muted =  muted
label-muted-foreground = ${colors.urgent}
label-muted-underline = ${colors.urgent}

ramp-volume-0 = 
ramp-volume-0-foreground = #fbf1c7
ramp-volume-1 = 
ramp-volume-1-foreground = #fbf1c7
ramp-volume-2 = 
ramp-volume-2-foreground = ${colors.urgent}

ramp-headphones-0 = 

ramp-volume-foreground = #fbf1c7

[module/backlight]
type = internal/backlight
card = intel_backlight
enable-scroll = true

; Format
format = <ramp> <label>
format-underline = #fbf1c7

ramp-0 = 

label = %{A1:$HOME/.config/polybar/scripts/toggle-redshift.sh:}%percentage%%%{A}
ramp-foreground = #fbf1c7

[module/mpd]
type = internal/mpd

host = ${config.mpd-host}
port = ${config.mpd-port}

; Format
format-online = <toggle> <icon-prev> <label-song> <icon-next> <icon-stop> | <bar-progress> | <icon-repeat> <icon-random>
format-paused = <toggle> <icon-prev> <label-song> <icon-next> <icon-stop>
format-stopped =  <toggle>

label-song-underline = #fbf1c7
label-song = %artist:0:10:...% - %title:0:10:...%

icon-play = 
icon-play-foreground = #fbf1c7
icon-play-margin = 1
icon-pause = 
icon-pause-foreground = #fbf1c7
icon-pause-margin = 1
icon-stop = 
icon-stop-foreground = #fbf1c7
icon-stop-margin = 1
icon-prev = 
icon-prev-foreground = #fbf1c7
icon-prev-margin = 1
icon-next = 
icon-next-foreground = #fbf1c7
icon-next-margin = 1
icon-repeat = 
icon-repeat-margin = 1
icon-random = 
icon-random-margin = 1

toggle-on-foreground = #fbf1c7
toggle-off-foreground = #fbf1c7

bar-progress-width = 20
bar-progress-indicator = |
bar-progress-fill = -
bar-progress-empty = -
bar-progress-gradient = true
bar-progress-foreground-0 = #fbf1c7 
bar-progress-foreground-1 = #fbf1c7
bar-progress-foreground-2 = #fbf1c7

[module/notify]
type = custom/text
content = 
content-foreground = ${colors.warning}
content-underline = ${colors.warning}
content-padding = 1

click-left = ${config.notify-click-left}

[module/network-short]
type = internal/network
interface = ${config.interface}

interval = 1

format-connected = %{A1:networkmanager_dmenu:}<ramp-signal>%{A}
format-disconnected = %{A1:networkmanager_dmenu:}<label-disconnected>%{A}

label-disconnected = 
label-disconnected-foreground = ${colors.urgent}

ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 

ramp-signal-0-foreground = #fbf1c7
ramp-signal-0-underline = #fbf1c7

ramp-signal-1-foreground = ${colors.notify}
ramp-signal-1-underline = ${colors.notify}

ramp-signal-2-foreground = ${colors.nord7}
ramp-signal-2-underline = ${colors.nord7}

ramp-signal-3-foreground = ${colors.success}
ramp-signal-3-underline = ${colors.success}

[module/clash-widget]
type = custom/script

exec = ~/.config/polybar/scripts/clash.sh
interval = 3

click-left = ~/.config/polybar/scripts/clash.sh toggle

[module/spotify]
type = custom/script
interval = 1
format-prefix = " "
format = <label>
exec = python3 $HOME/.config/polybar/scripts/spotify_status.py -f '{artist}: {song}'
format-underline = #b8bb26
;control players (optional)
click-left = playerctl --player=spotify play-pause 
click-right = playerctl --player=spotify next 
click-middle = playerctl --player=spotify previous

[module/onedrive-widget]
type = custom/script

exec = ~/.config/polybar/scripts/onedrive.sh
interval = 3

click-left = ~/.config/polybar/scripts/onedrive.sh toggle

[module/clipmenu-widget]
type = custom/script

exec = ~/.config/polybar/scripts/clipmenu.sh
interval = 3

click-left = ~/.config/polybar/scripts/clipmenu.sh menu
click-right = ~/.config/polybar/scripts/clipmenu.sh toggle

[module/rofi-run]
type = custom/text

content = 
content-background = #fbf1c7
content-foreground = #282828
content-padding = 3

click-left = ~/.config/polybar/scripts/rofi_run
