This commit is contained in:
Leon Kowarschick 2020-04-21 22:04:59 +02:00
parent f467da5f56
commit 0fa2f22b97
3 changed files with 7 additions and 23 deletions

View file

@ -73,15 +73,15 @@ padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=10;1
font-0 = fixed:pixelsize=10;2
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
;font-2 = siji:pixelsize=10;1
;font-7 = NotoEmoji:size=7;
;font-7 = "JetBrainsMono Nerd Font:size=7"
;font-0 = "JetBrainsMono Nerd Font:fontformat=truetype:size=10;2"
;font-1 = "NotoEmoji:scale=10;1"
font-1 = "Symbola:size=10;1"
font-2 = FontAwesome5Free:style=Solid:size=8;0
font-1 = "Symbola:size=8;1"
font-2 = "FontAwesome5Free:style=Solid:size=8;2"
font-3 = "Iosevka Nerd Font:size=17;4"
;font-1 = "FontAwesome:fontformat=truetype:size=12;1"
@ -104,10 +104,6 @@ cursor-scroll = ns-resize
;; MODULES ----------------------------------------------- {{{
; show's currently focussed window, already contained in xmonad module
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/filesystem]
type = internal/fs
@ -143,21 +139,15 @@ label-song-ellipsis = true
[module/cpu]
type = internal/cpu
interval = 2
;format-prefix = "cpu: "
;format-prefix-foreground = ${colors.foreground-alt}
format-prefix = "%{F#fe8019}  %{F-} "
;format-prefix = "  "
#format-underline = #f9a000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
;format-prefix = "mem: "
;format-prefix-foreground = ${colors.foreground-alt}
format-prefix = "%{F#83a598}  %{F-} "
;format-prefix = " "
#format-underline = #0a6cf5
label = %percentage_used%%
[module/date]
@ -169,10 +159,7 @@ time = %H:%M
time-alt = %H:%M:%S
;format-prefix = "%{F#fbff8c}  %{F-}"
;format-prefix = "  "
;format-prefix-foreground = ${colors.foreground-alt}
;#format-underline = #4bffdc
#format-underline = #fbff8c
label = "%{F#444} %{F-}%{B#444} %time% | %date% %{B-}%{F#444} %{F-}"
[module/xmonad]
@ -223,7 +210,6 @@ format = "<label> %{A1:dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spo
exec = python ~/.config/polybar/polybar-scripts/spotify_status.py -f '{artist} - {song} {play_pause}'
click-left = "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
exec-if = "pgrep spotify"
#format-underline = #1db954
[module/updates-arch]
@ -235,7 +221,6 @@ interval = 600
[module/pulseaudio-control]
type = custom/script
tail = true
label = %output%
click-right = exec pavucontrol &
exec = bash ~/.config/polybar/polybar-scripts/pulseaudio-control.bash listen
@ -243,7 +228,6 @@ click-left = bash ~/.config/polybar/polybar-scripts/pulseaudio-control.bash togm
click-middle = bash ~/.config/polybar/polybar-scripts/pulseaudio-control.bash next-sink
scroll-up = bash ~/.config/polybar/polybar-scripts/pulseaudio-control.bash up
scroll-down = bash ~/.config/polybar/polybar-scripts/pulseaudio-control.bash down
label-padding = 2
label-foreground = ${colors.foreground}

View file

@ -44,7 +44,7 @@ function getCurSink() {
# Saves the sink passed by parameter's volume into a variable named `curVol`.
function getCurVol() {
curVol=$(pacmd list-sinks | grep -A 15 'index: '"$1"'' | grep 'volume:' | grep -E -v 'base volume:' | awk -F : '{print $3}' | grep -o -P '.{0,3}%' | sed s/.$// | tr -d ' ')
curVol=$(pacmd list-sinks | grep -A 15 'index: '"$1"'' | grep 'volume:' | grep -E -v 'base volume:' | awk -F : '{print $3}' | grep -o -P '.{0,3}%' | sed 's/.$//' | tr -d ' ')
}
@ -288,9 +288,9 @@ function output() {
# Showing the formatted message
if [ "$isMuted" = "yes" ]; then
echo "${MUTED_COLOR}${MUTED_ICON}${curVol}% ${SINK_ICON}${nickname}${END_COLOR}"
echo "${MUTED_COLOR}${nickname} ${curVol}%${END_COLOR}"
else
echo "${volIcon}${curVol}% ${SINK_ICON}${nickname}"
echo "${nickname} ${curVol}%"
fi
}