aboutsummaryrefslogtreecommitdiff
path: root/polybar
diff options
context:
space:
mode:
Diffstat (limited to 'polybar')
-rw-r--r--polybar/.config/polybar/bspwm.ini73
-rw-r--r--polybar/.config/polybar/config140
-rw-r--r--polybar/.config/polybar/i3.ini86
-rw-r--r--polybar/.config/polybar/mpd22
-rwxr-xr-xpolybar/scripts/polybar/cal.sh15
5 files changed, 198 insertions, 138 deletions
diff --git a/polybar/.config/polybar/bspwm.ini b/polybar/.config/polybar/bspwm.ini
new file mode 100644
index 0000000..0e7d1dd
--- /dev/null
+++ b/polybar/.config/polybar/bspwm.ini
@@ -0,0 +1,73 @@
+[bar/bspwm]
+width = 100%
+height = 25
+offset-y = 0
+
+; Prefer fixed center position for the `modules-center` block
+; When false, the center position will be based on the size of the other blocks.
+; fixed-center = true
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+overline-size = 0
+overline-color = #f00
+underline-size = 1
+underline-color = #00f
+
+border-bottom-size = 1
+border-bottom-color = #d8dee9
+
+spacing = 1
+padding-left = 0
+padding-right = 0
+module-margin-left = 1
+module-margin-right = 1
+
+font-0 = Dejavu Sans Mono:size=12
+font-1 = materialdesignicons:size=16
+
+modules-left = bspwm
+#modules-center =
+#modules-right = mopidy date
+modules-right = date
+
+tray-position = right
+tray-padding = 2
+
+scroll-up = "#bspwm.prev"
+scroll-down = "#bspwm.next"
+
+[module/bspwm]
+label = %name%
+padding = 2
+#label-active-font = 0
+type = internal/bspwm
+enable-scroll = false
+
+label-focused = ${self.label}
+label-focused-padding = ${self.padding}
+label-focused-foreground = ${colors.foreground-alt}
+label-focused-background = ${colors.background-emph}
+
+label-occupied = ${self.label}
+label-occupied-background = ${colors.background-alt}
+label-occupied-foreground = ${colors.foreground}
+label-occupied-padding = ${self.padding}
+
+label-urgent = ${self.label}
+label-urgent-background = ${colors.alert}
+label-urgent-foreground = ${colors.foreground-alt}
+label-urgent-padding = ${self.padding}
+
+label-visible = ${self.label}
+label-visible-background = ${self.label-focused-background}
+label-visible-padding = ${self.padding}
+
+#strip-wsnumbers = true
+#fuzzy-match = true
+
+; Separator in between workspaces
+; label-separator = |
+; label-separator-padding = 2
+; label-separator-foreground = #ffb52a
diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config
index 43f70d5..b709ba0 100644
--- a/polybar/.config/polybar/config
+++ b/polybar/.config/polybar/config
@@ -8,142 +8,36 @@
;=====================================================
include-file = ~/.config/polybar/tengwar_icons.ini
+include-file = ~/.config/polybar/mpd
+include-file = ~/.config/polybar/i3.ini
+include-file = ~/.config/polybar/bspwm.ini
[colors]
#pseudo-transparency = true
-#background = #fffffff
-#background-alt = #fffffff
-background = #d8dee9
-background-alt = #d8dee9
-foreground = ${xrdb:color7}
-#foreground-alt = ${xrdb:color3}
-foreground-alt = #4A3131
+; Used in the whole bar background
+background = #2e3440
+
+; Alternative background used in the workspaces
+#background-alt = #4c566a
+background-alt = ${background}
+background-emph = #434c5e
+
+; Color useed in the default text
+foreground = #d8dee9
+foreground-alt = #e5e9f0
+
primary = #ffb52a
secondary = #e60053
-alert = ${xrdb:color1}
+alert = ${xrdb:color9}
[global/wm]
#margin-top = 0
margin-bottom = 0
-[bar/i3]
-width = 100%
-height = 30
-offset-y = 0
-
-; Prefer fixed center position for the `modules-center` block
-; When false, the center position will be based on the size of the other blocks.
-fixed-center = true
-
-background = ${colors.background}
-foreground = ${colors.foreground-alt}
-
-overline-size = 2
-overline-color = #f00
-underline-size = 2
-underline-color = #00f
-
-border-bottom-size = 0
-border-bottom-color = #333
-
-spacing = 1
-padding-left = 0
-padding-right = 2
-module-margin-left = 1
-module-margin-right = 2
-
-font-0 = Dejavu Sans Mono:size=12
-font-1 = materialdesignicons:size=16
-
-#modules-left = i3
-modules-center = i3
-modules-right = date
-
-tray-position = right
-tray-padding = 2
-;tray-transparent = true
-;tray-background = #0063ff
-
-;wm-restack = bspwm
-;wm-restack = i3
-
-;override-redirect = true
-
-scroll-up = "#i3.prev"
-scroll-down = "#i3.next"
-
-[module/xwindow]
-type = internal/xwindow
-label = %title:0:60:...%
-
-[module/bspwm]
-type = internal/bspwm
-ws-icon-default = x
-
-label-focused = %index%
-label-focused-underline= ${colors.primary}
-label-focused-padding = 2
-
-label-occupied = %index%
-label-occupied-padding = 2
-
-label-urgent = %index%!
-label-urgent-background = ${colors.alert}
-label-urgent-padding = 2
-
-label-empty = %index%
-label-empty-foreground = ${colors.foreground-alt}
-label-empty-padding = 2
-
-[module/i3]
-label = %icon%%name%
-label-active-font = 0
-type = internal/i3
-index-sort = false
-wrapping-scroll = false
-
-label-mode = %mode%
-label-mode-padding = 2
-#label-mode-foreground = #000000
-#label-mode-background = ${colors.primary}
-
-#border-size = 1
-#border-colol = #000
-
-label-focused = ${self.label}
-label-focused-background = ${colors.foreground-alt}
-label-focused-padding = ${module/bspwm.label-focused-padding}
-label-focused-foreground = ${colors.foreground}
-
-label-unfocused = ${self.label}
-label-unfocused-padding = ${module/bspwm.label-occupied-padding}
-label-unfocused-background = ${colors.background-alt}
-label-unfocused-foreground = ${colors.foreground-alt}
-
-label-urgent = ${self.label}
-label-urgent-background = ${colors.background}
-label-urgent-foreground = ${module/bspwm.label-urgent-background}
-label-urgent-underline = ${module/bspwm.label-urgent-background}
-label-urgent-padding = ${module/bspwm.label-urgent-padding}
-
-label-visible = ${self.label}
-label-visible-background = ${self.label-focused-background}
-#label-visible-underline = ${self.label-focused-underline}
-label-visible-padding = ${self.label-focused-padding}
-
-strip-wsnumbers = true
-fuzzy-match = true
-
-
-; Separator in between workspaces
-#label-separator = " "
-#label-separator-padding = 0
-#label-separator-foreground = #ffb52a
-
[module/date]
type = custom/script
exec = ~/scripts/polybar/date.sh
tail = true
-click-left = ~/scripts/polybar/cal.sh
+click-left = gsimplecal
#click-left = kill -USR1 %pid%
format-prefix = " "
diff --git a/polybar/.config/polybar/i3.ini b/polybar/.config/polybar/i3.ini
new file mode 100644
index 0000000..890b460
--- /dev/null
+++ b/polybar/.config/polybar/i3.ini
@@ -0,0 +1,86 @@
+[bar/i3]
+width = 100%
+height = 25
+offset-y = 0
+
+; Prefer fixed center position for the `modules-center` block
+; When false, the center position will be based on the size of the other blocks.
+; fixed-center = true
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+overline-size = 2
+overline-color = #f00
+underline-size = 2
+underline-color = #00f
+
+border-bottom-size = 0
+border-bottom-color = #333
+
+spacing = 0
+padding-left = 0
+padding-right = 0
+module-margin-left = 1
+module-margin-right = 1
+
+font-0 = Dejavu Sans Mono:size=12
+font-1 = materialdesignicons:size=16
+
+modules-left = i3
+#modules-center =
+modules-right = mopidy date
+
+tray-position = right
+tray-padding = 2
+;tray-transparent = true
+;tray-background = #0063ff
+
+;wm-restack = bspwm
+;wm-restack = i3
+
+;override-redirect = true
+
+scroll-up = "#i3.prev"
+scroll-down = "#i3.next"
+
+[module/i3]
+label = %icon%%name%
+padding = 2
+label-active-font = 0
+type = internal/i3
+index-sort = false
+wrapping-scroll = false
+
+label-mode = %mode%
+label-mode-padding = 2
+#label-mode-foreground = #000000
+#label-mode-background = ${colors.primary}
+
+label-focused = ${self.label}
+label-focused-background = ${colors.background-emph}
+label-focused-padding = ${self.padding}
+label-focused-foreground = ${colors.foreground-alt}
+
+label-unfocused = ${self.label}
+label-unfocused-padding = ${self.padding}
+label-unfocused-background = ${colors.background-alt}
+label-unfocused-foreground = ${colors.foreground}
+
+label-urgent = ${self.label}
+label-urgent-background = ${colors.alert}
+label-urgent-foreground = ${colors.foreground-alt}
+label-urgent-padding = ${self.padding}
+
+label-visible = ${self.label}
+label-visible-background = ${self.label-focused-background}
+label-visible-padding = ${self.padding}
+
+strip-wsnumbers = true
+fuzzy-match = true
+
+; Separator in between workspaces
+#label-separator = "x"
+#label-separator-padding = 1
+#label-separator-foreground = #ffb52a
+
diff --git a/polybar/.config/polybar/mpd b/polybar/.config/polybar/mpd
new file mode 100644
index 0000000..4ee0087
--- /dev/null
+++ b/polybar/.config/polybar/mpd
@@ -0,0 +1,22 @@
+[module/mopidy]
+type = internal/mpd
+
+host = 127.0.0.1
+port = 6600
+
+; Seconds to sleep between progressbar/song timer sync
+; Default: 1
+interval = 5
+
+#format-playing = <icon-stop> <toggle> %{F#a3be8c}%{F-} <label-song>
+format-playing = <icon-stop> <toggle> %{F#a3be8c}%{F-}
+format-paused = <icon-stop> <toggle>
+format-stopped = <toggle>
+
+label-song = %artist% - %title%
+# label-song-background = ${colors.background-alt}
+
+; Only applies if <icon-X> is used
+icon-play = 
+icon-stop = 
+icon-pause = 
diff --git a/polybar/scripts/polybar/cal.sh b/polybar/scripts/polybar/cal.sh
deleted file mode 100755
index a69d088..0000000
--- a/polybar/scripts/polybar/cal.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# Add a fake tty to get the day highlight
-# https://stackoverflow.com/a/32981392
-faketty () {
- script -qfec "$(printf "%q " "$@")"
-}
-
-# Get the max line width
-width=$(ncal -3 | wc -L)
-
-cal=$(faketty ncal -3 \
- | sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|g' \
- | sed 's|\s*$||')
-rofi -font "mono 9" -markup -width -"${width}" -lines 8 -location 3 -e "${cal}"