Update dots

This commit is contained in:
Marco Thomas
2020-08-28 11:06:20 +02:00
parent 90d6443b27
commit db23326055
11 changed files with 118 additions and 76 deletions

View File

@@ -1,5 +1,4 @@
; vim: ft=dosini
; ft=dosini
[colors]
transparent = #00000000
@@ -43,13 +42,29 @@ radius = 12
height = 27px
foreground = ${colors.foreground}
background = #d12e3440
background = #2e3440
module-margin= 0
wm-name = i3
wm-restack = i3
################################################################################
[bar/all]
inherit = bar/global
width = 80%
override-redirect = true
padding = 3
offset-x = 10%:-8px
offset-y = 8px
modules-left = i3
modules-center = spotify
modules-right = update brightness volume date
################################################################################
[bar/workspaces]
inherit = bar/global
@@ -63,14 +78,13 @@ offset-y = 8px
modules-center = i3
################################################################################
[bar/middle]
[bar/music]
inherit = bar/global
width = 25%
width = 22%
override-redirect = true
fixed-center = true
offset-x = 37.25%
offset-x = 11.5%-8px
offset-y = 8px
modules-center = spotify
@@ -78,17 +92,30 @@ modules-center = spotify
################################################################################
[bar/status]
inherit = bar/global
width = 31%
width = 22%
override-redirect = true
fixed-center = true
offset-x = 69%:-8px
offset-x = 67%:-8px
offset-y = 8px
#tray-position = left
modules-center = update backlight volume battery date
modules-center = update backlight volume battery network date
################################################################################
[bar/tray]
inherit = bar/global
width = 10%
override-redirect = true
fixed-center = true
offset-x = 90%:-8px
offset-y = 8px
tray-position = center
modules-center = update
###############################################################################
[module/i3]
@@ -116,6 +143,7 @@ ws-icon-default = 
#label-focused = ""
label-focused = "%icon%"
label-focused-padding = 1
label-focused-underline = ${colors.red}
#label-unfocused = ""
label-unfocused = "%icon%"
@@ -135,7 +163,7 @@ format-padding = 1
interval = 1.0
#time =  %I:%M %p - %A, %d %B %Y
time =  %I:%M %p - %d.%m.%Y
time =  %I:%M %p %d.%m.%Y
time-alt =  %I:%M %p
format = <label>

View File

@@ -3,9 +3,15 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
if type "xrandr"; then
for mon in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$mon polybar --reload workspaces &
MONITOR=$mon polybar --reload middle &
MONITOR=$mon polybar --reload status &
if [ "$1" = "laptop" ]; then
MONITOR=$mon polybar --reload workspaces &
MONITOR=$mon polybar --reload music &
MONITOR=$mon polybar --reload status &
MONITOR=$mon polybar --reload tray &
fi
if [ "$1" = "all" ]; then
MONITOR=$mon polybar --reload all &
fi
done
else
echo "No Bars loaded."

View File

@@ -1,15 +1,17 @@
#!/bin/sh
length=20
function scroll () {
prefix="$1"
scrolling="$2"
temp="$(echo "$scrolling"| sed "s/^\(.\{20\}\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$//")"
temp="$(echo "$scrolling"| sed "s/^\(.\{$length\}\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$//")"
suffix="$3"
if [ "$(echo -n $scrolling |wc -c)" -gt 20 ]; then
if [ "$(echo -n $scrolling |wc -c)" -gt $length ]; then
echo "$prefix%{T7}$temp%{T-}$suffix"
sleep 0.5
zscroll -l 20 \
zscroll -l $length \
--delay 0.2 \
--before-text "$prefix%{T7}" \
--after-text "%{T-}$suffix" \
@@ -23,7 +25,7 @@ function scroll () {
} #
function get_artist () {
echo "$(playerctl -p spotify metadata --format "{{ artist }}"| sed -e "s/[[(]....*[])]*//g" | sed "s/ *$//"| sed "s/^\(.\{20\}[^ ]*\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$/.../")"
echo "$(playerctl -p spotify metadata --format "{{ artist }}"| sed -e "s/[[(]....*[])]*//g" | sed "s/ *$//"| sed "s/^\(.\{$length\}[^ ]*\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$/.../")"
} #
function get_title () {