[colors]
background = #FF000000
background-alt = ${xrdb:polybar*color8}
foreground = ${xrdb:polybar*foreground}
urgent = #B34747
foreground-alt = #555
primary = ${xrdb:polybar*color3}
secondary = ${xrdb:polybar*color1}
alert = ${xrdb:polybar*color13}


[settings]
screenchange-reload = true
screenchange = true
throttle-output = 5
throttle-output-for = 10
throttle-input-for = 30
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
pseudo-transparency = true


[global/wm]
margin-top = 0
#margin-bottom = 0


[bar/default]
#monitor = ${env:MONITOR:eDP-1}
monitor-fallback = eDP-1
bottom = true
width = 100%
height = 25
;offset-x = 1%
offset-y = -1
radius = 0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 0
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin-left = 2
module-margin-right = 2
;font-0 = Terminus :pixelsize=12;4
font-0 =  FontAwesome
font-1 = DejaVu Sans:pixelsize=11
#modules-left = date wlan memory cpu xbacklight mic pavolume battery abdullah gmail
modules-left = date wlan memory cpu pulseaudio arch_backlight temperature battery 
#modules-center = xworkspaces
modules-center = bspwm
modules-right = mpd-new
#modules-right =  mpd mic pavolume backlight memory cpu battery date menu
tray-position = right
tray-padding = 6
tray-background = #24292A00
wm-restack = bspwm
override-redirect = false
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev


[module/bspwm]
type = internal/bspwm
pin-workspaces = true
inline-mode = false
enable-click = true
enable-scroll = true
reverse-scroll = true
fuzzy-match = false
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"
format = <label-state> <label-mode>
label-monitor = %name%
label-dimmed-foreground = #555
label-dimmed-focused-background = #f00
label-focused = %icon% %name%
label-focused-underline= ${colors.primary}
label-focused-foreground = #f00000
label-occupied = %icon% %name%
label-occupied-underline = #555555
label-urgent = %icon% %name%
label-urgent-underline = ${colors.primary}
label-urgent-background = ${colors.alert}
label-empty = %icon% %name%
label-empty-foreground = ${colors.foreground-alt}
label-monocle = 
label-tiled = 
label-fullscreen = 
label-floating = 
label-pseudotiled = P
label-locked = 
label-locked-foreground = #bd2c40
label-sticky = 
label-sticky-foreground = #fba922
label-private = 
label-private-foreground = #bd2c40
label-marked = M
label-separator = 
label-separator-padding = 3
label-separator-foreground = #ffb52a
label-occupied-padding = 3
label-empty-padding = 3
label-urgent-padding = 3



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


[module/backlight-acpi]
type = internal/backlight
sub = module/backlight-acpi
base = module/xbacklight
inherit = module/xbacklight
card = intel_backlight
format = <ramp><label>
label = %percentage%%
ramp-0 = 🌕
ramp-1 = 🌔
ramp-2 = 🌓
ramp-3 = 🌒
ramp-4 = 🌑


;[module/backlight]
;type = internal/backlight
;card = intel_backlight
;;output = eDP-1
;format = <ramp><label>
;label = %percentage%%
;label-foreground = #3EC13F
;format-padding = 1
;ramp-0 = 🌕
;ramp-1 = 🌔
;ramp-2 = 🌓
;ramp-3 = 🌒
;ramp-4 = 🌑
;enable-scroll = true
;scroll-up = exec light -A 5
;scroll-down = exec light -U 6
;

[module/pavolume]
type = custom/script
tail = true
label = %output%
label-foreground = #D1FF00
exec = ~/.config/polybar/scripts/pavolume.sh --listen
click-right = exec pavucontrol
scroll-up = ~/.config/polybar/scripts/pavolume.sh --up
scroll-down = ~/.config/polybar/scripts/pavolume.sh --down
format-underline = #3EC13F
format-foreground = ${colors.foreground}
format-background = ${colors.background}


[module/xworkspaces]
type = internal/xworkspaces
pin-workspaces = true
; Create click handler used to focus desktop
enable-click = true
index-sort = true
wrapping-scroll = false
#ws-num = 9
icon-0 = code;♚
icon-1 = office;♛
icon-2 = graphics;♜
icon-3 = mail;♝
icon-4 = web;♞
icon-default = ♟
show-all = true
label-empty-foreground =  ${colors.foreground-alt}
#label-empty = %icon%
label-mode-padding = 3
label-mode-foreground = ${colors.background}
label-mode-background = #a8df5a
label-focused = %icon%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
label-unfocused = %icon%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent-foreground = ${xrdb:polybar*color8}
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
; Create scroll handlers used to cycle desktops
;enable-scroll = true
label-monitor = %name%
format = <label-state>
label-active = %icon% %name%
label-active-foreground = #ffffff
#label-active-background = #3f3f3f
label-active-underline = #fba922
label-occupied = %icon%
label-occupied-underline = #555555
label-urgent = %icon%
#label-empty = %icon%
#label-empty-foreground = #55


[module/wlan]
type = internal/network
interface = wlan0
#interval = 3.0
tail = true
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected =  %essid%%{A}
label-disconnected = 
format-disconnected = <label-disconnected>
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}


[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
bar-width = 10
bar-indicator =  
bar-indicator-foreground = #fff
bar-empty = 
bar-fill = 
format-prefix = " "
label-foreground = #3EC13F
format-padding = 1


[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "cpu "
format-prefix-foreground = ${xrdb:polybar*color3}
format-underline = #f90000
label = %percentage%%


[module/memory]
type = internal/memory
interval = 2
format-prefix = "mem "
format-prefix-foreground = ${xrdb:polybar*color2}
format-underline = #4bffdc
label = %percentage_used%%


[module/date]
type = internal/date
interval = 1
date = " %a %d %b -"
date-alt = " %d %b -"
time = %H:%M
time-alt = %H:%M:%S
format-prefix = " "
format-prefix-foreground = ${xrdb:polybar*color4}
format-underline = #0a6cf5
label = %date% %time%


[module/battery]
type = internal/battery
battery = BAT0
adapter = AC0
full-at = 100
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
label-charging = %percentage%% - time left %time%
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
label-discharging = %percentage%% - time left %time%
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
label-full = %percentage%%
ramp-capacity-0 = " "
ramp-capacity-1 = " "
ramp-capacity-2 = " "
ramp-capacity-3 = " "
ramp-capacity-4 = " "
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = " "
animation-charging-1 = " "
animation-charging-2 = " "
animation-charging-3 = " "
animation-charging-4 = " "
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750


[module/mpd]
type = internal/mpd
format-online = "<label-song> <label-time> <icon-prev> <icon-stop> <toggle> <icon-next>"
;format-prefix-foreground = ${xrdb:polybar*color6}
format-underline = #FF00DB
format-prefix-foreground = #00A5FF
icon-prev = 
icon-stop = 
icon-play-prefix = #f00
icon-play = 
icon-pause = 
icon-next = 
label-song = %artist% - %title%
label-song-foreground = #00A5FF
label-song-maxlen = 40
label-song-ellipsis = true
bar-progress-width = 10
bar-progress-indicator = 
bar-progress-fill = 
bar-progress-empty = 
bar-progress-fill-foreground = #ff0
bar-progress-fill-background = ${colors.background}
bar-progress-indicator-foreground = ${colors.foreground}
;format-online-foreground = ${colors.foreground}
;format-online-background = ${colors.background}
label-time-foreground = #ff0

[module/gmail]
type = custom/script
#exec = python3 ~/.config/polybar/gmail/run.py 2>/dev/null
#exec = ping -c 1 google.com 2&>/dev/null && python3 ~/.config/polybar/gmail/run.py || echo 'no network'
exec = ~/bin/gmailScript4Polybar 
tail = true
click-right= /usr/bin/google-chrome-stable https://mail.google.com
click-left= urxvtc -e mutg
;format-background = #00A5FF
;format-underline = #FF00DB

[module/abdullah]
type = custom/script
exec = python3 ~/.config/polybar/abdullah/inbox.py 
tail = true
interval = 60
click-right= google-chrome https://mail.google.com
click-left= urxvtc -e mutt -F ~/.config/mutt/muttrc
;format-background = #00A5FF
;format-underline = #FF00DB

[module/mail]
type = custom/script
#exec = python3 ~/.config/polybar/theak/myinbox.py 2>/dev/null
#exec = python3 ~/.config/polybar/theak/networktheak.py
tail = true
#exec = "if ping -c 1 google.com &> /dev/null \
#then python3 ~/.config/polybar/theak/myinbox.py \
#else \
#  echo "no network"
#  fi"
#exec = "ping -c 1 theak.me \&> /dev/null && python3 ~/.config/polybar/theak/myinbox.py || echo "
exec = ping -c 1 theak.me \&> /dev/null \&& python3 ~/.config/polybar/theak/myinbox.py || echo 'no network'
#click-right= qutebrowser https://mail.theak.me
click-left= urxvtc -e mutt 
#format-background = #00A5FF
format-underline = #FF00DB


[module/music]
type = custom/script
exec = mpc current | skroll -l
tail = true


[module/mpd1]
type = custom/script
exec = ~/.config/polybar/scripts/mpd.sh
tail = true
format-foreground = ${colors.foreground}
format-underline = #FF00DB
format-prefix-foreground = #00A5FF
format-background = ${colors.background}
click-left = exec smus
click-right = mpc pause & pkill -F /tmp/smus.pid


[module/bluetooth]
type = custom/script
exec = ~/.config/polybar/scripts/isactive-bluetooth.sh
tail = true
;format-foreground = ${colors.foreground}
format-underline = #FF00DB
format-background = ${colors.background}
format-prefix = ""


[module/menu]
type = custom/menu
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${xrdb:polybar*color9}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
format-spacing = 1
;label-open = "  "
;label-open-foreground = ${colors.foreground}
;label-close = "  "
;label-close-foreground = ${colors.foreground}
;label-separator = "│"
;label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = Top
menu-0-0-exec = menu-open-1
menu-0-1 = Extra
menu-0-1-exec = menu-open-2
menu-0-2 = Music
menu-0-2-exec = menu-open-3
menu-0-3 = Power
menu-0-3-exec = menu-open-4
menu-1-0 = "  "
menu-1-0-exec = qutebrowser
menu-1-1 = "  "
menu-1-1-exec = urxvt
menu-1-2 = "  "
menu-1-2-exec = urxvtc -e ranger
menu-1-3 = "  "
menu-1-3-exec = subl3
menu-2-0 = "  "
menu-2-0-exec = gimp-2.8
menu-2-1 = "  "
menu-2-1-exec = spotify --force-device-scale-factor=1.5
menu-2-2 = "  "
menu-2-2-exec = deluge
menu-2-3 = "  "
menu-2-3-exec = claws-mail
menu-2-4 = "  "
menu-2-4-exec = steam-runtime
menu-2-5 = "  "
menu-2-5-exec = scrot %F-%S_$wx$h_scrot.png -e 'mv $f /tmp/foo.png'
menu-3-0 = "  "
menu-3-0-exec = $HOME/bin/smus
menu-3-1 = "  "
menu-3-1-exec = mpc prev
menu-3-2 = "  "
menu-3-2-exec = mpc stop 
menu-3-3 = "  "
menu-3-3-exec = mpc pause 
menu-3-4 = "  "
menu-3-4-exec = mpc next
menu-4-0 = "  "
menu-4-0-exec = lock
menu-4-1 = "  "
menu-4-1-exec = systemctl reboot
menu-4-2 = "  "
menu-4-2-exec = systemctl poweroff


[module/arch_backlight]
type = custom/script
exec = ~/.config/polybar/scripts/backlight.sh
tail = true
scroll-up = exec light -A 5
scroll-down = exec light -U 5
format-prefix = " "
label = %output%%
label-foreground = #3EC13F
format-padding = 1

[module/backlight]
type = internal/backlight
card = intel_backlight
exec = light | cut -d . -f1
format = <label>
;tail = true
;interval = 0.2
label = %percentage%%
enable-scroll = true
scroll-up = exec /usr/sbin/light -A 5
scroll-down = exec /usr/sbin/light -U 5
format-prefix = " "
;label = %output%%
label-foreground = #3EC13F
format-padding = 1



[module/mpd-new]
type = internal/mpd
format-online = <label-song> <icon-prev> <toggle> <icon-next> <icon-random>  <icon-repeat> <label-time> 
format-offline = <label-offline>
label-offline =  no music
icon-prev = 
icon-stop = o
icon-play = 
icon-pause = 
icon-next = 
icon-seekf = >>
icon-random = 
icon-repeat = 
label-song = 𝄞 %title% - %artist% 
label-song-maxlen = 25
label-song-ellipsis = true
toggle-on-foreground = #e60053
toggle-off-foreground = #66


[module/pulseaudio]
type = internal/pulseaudio
sink = alsa_output.pci-0000_00_1b.0.analog-stereo
format-volume = <ramp-volume><label-volume> 
label-volume =  %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = 
bar-volume-indicator-font = 2
bar-volume-fill = 
bar-volume-fill-font = 2
bar-volume-empty = 
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊


[module/mic]
type = internal/pulseaudio
sink = alsa_input.pci-0000_00_1b.0.analog-stereo
format-volume = <label-volume> <bar-volume>
label-volume =  %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = 
bar-volume-indicator-font = 2
bar-volume-fill = 
bar-volume-fill-font = 2
bar-volume-empty = 
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}


[module/tags]
type = internal/xworkspaces
label-active = %name%
label-active-padding = 2
label-active-background = ${colors.background}
label-active-foreground = ${colors.foreground}
label-occupied = %name%
label-occupied-background = #ff0000
label-empty = %name%
label-empty-padding = 2
label-urgent = %name%
label-urgent-padding = 2
label-urgent-background = ${colors.background}
label-urgent-foreground = ${colors.foreground}


[module/temperature]
type = internal/temperature
interval = 3
thermal-zone = 0
warn-temperature = 70
format = <ramp><label>
format-padding = 1
;label = %{A1:termite --exec='watch sensors' & disown:} %temperature%%{A}
ramp-0 = ""
ramp-0-foreground = ${xrdb:polybar*color4}
ramp-1 = ""
ramp-1-foreground = ${xrdb:polybar*color16}
ramp-2 = ""
ramp-2-foreground = ${xrdb:polybar*color17}
ramp-3 = ""
ramp-3-foreground = ${xrdb:polybar*urgent}
format-warn = <label-warn>
label-warn = " %temperature-c%"
label-warn-padding = 1
label-warn-foreground = ${colors.urgent}


[module/window_switch]
type = custom/script
interval = 5
label = "%{A1:skippy-xd:} %{A3:skippy-xd:} %output% %{A} %{A}"
exec = echo ""
format = <label>


[bar/dwm]
inherit = settings
background = ${colors.background}
foreground = ${colors.foreground}
override-redirect = true
;width = 55%
;height = 26
;offset-x = 45%
modules-left = date wlan memory cpu pulseaudio backlight-acpi battery 
modules-right = mpd-new
modules-center = window_switch
font-0 =  FontAwesome
font-1 = DejaVu Sans:pixelsize=11
bottom = true
width = 100%
height = 20
;offset-x = 1%
offset-y = -1
radius = 0
fixed-center = true
line-size = 0
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin-left = 2
module-margin-right = 2


[bar/hdmi]
inherit = bar/default
monitor = HDMI2


; vim:ft=dosini
