;; ┌──────────────────────────────────────────────────────────────────────────────-----┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█░█░█▀▀░█▀▀░█▀▄░░░█▄█░█▀█░█▀▄░█░█░█░░░█▀▀░█▀▀ │
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░█░▀▀█░█▀▀░█▀▄░░░█░█░█░█░█░█░█░█░█░░░█▀▀░▀▀█ │
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀▀▀░▀▀▀ │
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; └──────────────────────────────────────────────────────────────────────────────-----┘

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/checknet]
type = custom/script

; Available tokens:
;   %counter%
; Command to be executed (using "/usr/bin/env sh -c [command]")
exec = ~/.config/polybar/hack/scripts/check-network

; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
;;exec-if = ""

; Will the script output continous content?
; Default: false
tail = true

; Seconds to sleep between updates
; Default: 2 (0 if `tail = true`)
interval = 5

; Available tags:
;   <output> - deprecated
;   <label> (default)
format = <label>
;format-prefix = 

; Available tokens:
;   %output%
; Default: %output%
label = %output%

; Available tokens:
;   %counter%
;   %pid%
;
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
click-left = networkmanager_dmenu &
click-right = networkmanager_dmenu &
;;double-click-left = echo double left %counter%
;;double-click-middle = echo double middle %counter%
;;double-click-right = echo double right %counter%

; Available tokens:
;   %counter%
;   %pid%
;
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
;;scroll-up = echo scroll up %counter%
;;scroll-down = echo scroll down %counter%

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/updates]
type = custom/script

; Available tokens:
;   %counter%
; Command to be executed (using "/usr/bin/env sh -c [command]")
exec = ~/.config/polybar/hack/scripts/updates.sh
; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
;;exec-if = ""

; Will the script output continous content?
; Default: false
tail = true

; Seconds to sleep between updates
; Default: 2 (0 if `tail = true`)
interval = 2

; Available tags:
;   <output> - deprecated
;   <label> (default)
format = <label>
format-prefix = "󰮯 "

; Available tokens:
;   %output%
; Default: %output%
label = %output%

; Available tokens:
;   %counter%
;   %pid%
;
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
click-left = exo-open --launch TerminalEmulator &
click-right = exo-open --launch TerminalEmulator &
;;double-click-left = echo double left %counter%
;;double-click-middle = echo double middle %counter%
;;double-click-right = echo double right %counter%

; Available tokens:
;   %counter%
;   %pid%
;
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
;;scroll-up = echo scroll up %counter%
;;scroll-down = echo scroll down %counter%

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/launcher]
type = custom/text
content = 󱙧

; "content" has the same properties as "format-NAME"
content-foreground = ${color.primary}

; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
click-left = ~/.config/polybar/hack/scripts/launcher.sh &
;;click-middle = ~/.config/polybar/hack/scripts/launcher-full
click-right = ~/.config/polybar/hack/scripts/color-switch.sh &

; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND"
;;scroll-up = ~/.config/polybar/hack/scripts/launcher.sh &
;;scroll-down = ~/.config/polybar/hack/scripts/color-switch.sh &

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/sysmenu]
type = custom/text
content = "  "

content-foreground = ${color.primary}

click-left = ~/.config/polybar/hack/scripts/powermenu.sh &

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/color-switch]
type = custom/text
content = " "

content-foreground = ${color.primary}
click-left = ~/.config/polybar/hack/scripts/color-switch.sh &

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/sep]
type = custom/text
content = "   "
content-foreground = ${color.background}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/powermenu]
type = custom/menu

; If true, <label-toggle> will be to the left of the menu items (default).
; If false, it will be on the right of all the items.
expand-right = true

; "menu-LEVEL-N" has the same properties as "label-NAME" with
; the additional "exec" property
;
; Available exec commands:
;   menu-open-LEVEL
;   menu-close
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = shutdown
menu-0-1-exec = menu-open-2

menu-1-0 = back
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = systemctl reboot

menu-2-0 = shutdown
menu-2-0-exec = systemctl poweroff
menu-2-1 = back
menu-2-1-exec = menu-open-0

; Available tags:
;   <label-toggle> (default) - gets replaced with <label-(open|close)>
;   <menu> (default)
; Note that if you use <label-toggle> you must also include
; the definition for <label-open>

format = <label-toggle> <menu>
format-foreground = ${color.primary}

label-open = 
label-close = 

; Optional item separator
; Default: none
label-separator = " | "

;;label-open-foreground = ${color.foreground}
;;label-close-foreground = ${color.background}
;;label-separator-foreground = ${color.background}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/menu]
type = custom/menu

; If true, <label-toggle> will be to the left of the menu items (default).
; If false, it will be on the right of all the items.
expand-right = true

; "menu-LEVEL-N" has the same properties as "label-NAME" with
; the additional "exec" property
;
; Available exec commands:
;   menu-open-LEVEL
;   menu-close
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
menu-0-0 = Menu
menu-0-0-exec = ~/.config/polybar/cuts/scripts/launcher.sh &
menu-0-1 = Files
menu-0-1-exec = thunar &
menu-0-2 = Terminal
menu-0-2-exec = termite &
menu-0-3 = Browser
menu-0-3-exec = firefox &

; Available tags:
;   <label-toggle> (default) - gets replaced with <label-(open|close)>
;   <menu> (default)
; Note that if you use <label-toggle> you must also include
; the definition for <label-open>

format = <label-toggle> <menu>
format-foreground = ${color.primary}

label-open = 
label-close = 

; Optional item separator
; Default: none
label-separator = " | "

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/vpn]
type = custom/script
exec = ip link show | grep '_wg:' | awk -F ': ' '{print $2}' | awk '{print $1}'
exec-if = echo 1
interval = 5
format-prefix-foreground = ${color.foreground}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/monocle]
type = custom/script
exec = echo MONOCLE
exec-if = bspc query -T -d focused | grep -e "monocle"
interval = 0.1
format-foreground = ${color.red}
format-prefix-foreground = ${color.red}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/vodka]
type = custom/script
exec = echo RUSSIAN
exec-if = xset -q | grep LED | awk '{ print $10 }' | grep -e '00001001'
interval = 0.1
format-foreground = ${color.red}
format-prefix-foreground = ${color.red}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/windows]
type = custom/script
exec = ~/.config/polybar/hack/scripts/windows.sh
format = <label>
label = %output%
label-padding = 1
interval = 1

[module/bluetooth]
type = custom/script
exec = ~/.config/polybar/hack/scripts/bluetooth.sh
format = "<label> "
format-prefix = "󰂯 "
label = %output%
label-padding = 1
interval = 2

[module/dim]
type = custom/script
exec = ~/.config/polybar/hack/scripts/dim.sh
format = "<label> "
format-prefix = "󰷛 "
label = ""
label-padding = 1
interval = 5
