haideralipunjabi / polybar-kdeconnect

KDEConnect module for Polybar
https://blog.haideralipunjabi.com/posts/making-modules-for-polybar-shell-python/
165 stars 11 forks source link

error: Duplicate key name "type" defined on line X #15

Closed JohnTheCoolingFan closed 4 years ago

JohnTheCoolingFan commented 4 years ago

I've copied module config from README to my polybar config and polybar throws error from title My config:

;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================

[colors]
;background = ${xrdb:color0:#222}
background = #99020202
background-alt = #bb040404
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #fbae00
secondary = #e60053
alert = #bd2c40

[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 28
;offset-x = 1%
;offset-y = 1%
radius-bottom = 8.0
fixed-center = false

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

line-size = 3
line-color = #f00

#border-size = 4
border-left-size = 32
border-right-size = 32
border-color = #00000000

padding-left = 0
padding-right = 2

module-margin-left = 1
module-margin-right = 2

font-0 = Hack Nerd Font:style=Regular:pixelsize=10;1
font-1 = fixed:pixelsize=10;1
font-2 = unifont:fontformat=truetype:size=8:antialias=false;0
font-3 = siji:pixelsize=10;1

modules-left = bspwm
modules-center = xwindow
modules-right = filesystem xkeyboard memory cpu wlan temperature date powermenu

tray-position = right
tray-padding = 2
;tray-background = #0063ff

wm-restack = bspwm
;wm-restack = i3

;override-redirect = true

;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev

;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

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

[bar/bsp1]
inherit = bar/example
monitor = HDMI-A-0
tray-position = center
modules-right = filesystem kdeconnect gmail wlan eth
modules-center =

[bar/bsp2]
inherit = bar/example
monitor = DVI-D-0
modules-right = xkeyboard memory cpu date
tray-position = none

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

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

format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}

label-layout = %layout%
label-layout-underline = ${colors.secondary}

label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

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

mount-0 = /

label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %used%/%total%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}

[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-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2

label-occupied = %icon%
label-occupied-padding = 2

label-urgent = %icon%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2

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

; Separator in between workspaces
; label-separator = |

[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false

; Only show workspaces on the same output as the bar
;pin-workspaces = true

label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}

; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2

; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2

; visible = Active workspace on unfocused monitor
label-visible = %index%
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 = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2

; Separator in between workspaces
; label-separator = |

[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU ["
format-prefix-foreground = ${colors.foreground-alt}
format-suffix = "]"
format-suffix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage-core1:3%%%{F#555}][%{F-}%percentage-core2:3%%%{F#555}][%{F-}%percentage-core3:3%%%{F#555}][%{F-}%percentage-core4:3%%

[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %gb_used%/%gb_total%

[module/wlan]
type = internal/network
interface = wlp0s16f0u1u3
interval = 3.0

format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

ramp-signal-0 = 
ramp-signal-foreground = ${colors.foreground-alt}

[module/eth]
type = internal/network
interface = enp4s0
interval = 3.0

format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%

format-disconnected = 

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

date = %d.%m.%Y
date-alt = "%Y-%m-%d"

time = %H:%M:%S
time-alt = %H:%M:%S

format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5

label = %date%  %{F#555}%{F-} %time%

[module/gmail]
type = custom/script
exec = ~/.config/polybar/gmail/launch.py -p  -c \#555 -ns
tail = true
click-left = chromium https://mail.google.com &
format-underline = #96e900

[module/kdeconnect]  
type = custom/script  
exec = "~/.config/polybar/polybar-kdeconnect/polybar-kdeconnect.sh -d"  
tail = true
format-underline = #FFC500

[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false

; vim:ft=dosini
haideralipunjabi commented 4 years ago

Try removing the space after [module/kdeconnect]

JohnTheCoolingFan commented 4 years ago

Oh, that helped. Thanks!