Skip to content

Commit

Permalink
Add volume control to polybar.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cribac committed Jun 25, 2022
1 parent 6bbd13b commit 31bf753
Showing 1 changed file with 50 additions and 31 deletions.
81 changes: 50 additions & 31 deletions .config/polybar/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ foreground = ${colors.foreground}

line-size = 3pt

border-size = 4pt
; border-size 0 removes the "margin" around the polybar
border-size = 0
border-color = #00000000

padding-left = 0
Expand All @@ -34,7 +35,8 @@ separator-foreground = ${colors.disabled}
font-0 = "MesloLGS Nerd Font Mono:size=11;2"

modules-left = xworkspaces xwindow
modules-right = filesystem memory cpu pulseaudio wlan eth date
modules-center = date
modules-right = i3-volume temperature memory cpu

cursor-click = pointer
cursor-scroll = ns-resize
Expand Down Expand Up @@ -72,17 +74,6 @@ label-empty-padding = 1
type = internal/xwindow
label = %title:0:60:...%

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

mount-0 = /

label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%

label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}

[module/memory]
type = internal/memory
interval = 2
Expand All @@ -106,32 +97,60 @@ label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}

[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#88C0D0}%ifname%%{F#707880} disconnected

[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#88C0D0}%ifname%%{F-} %essid% %local_ip%

[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#88C0D0}%ifname%%{F-} %local_ip%

[module/date]
type = internal/date
interval = 1
date = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}

[module/temperature]
type = internal/temperature
; Seconds to sleep between updates
; Default: 1
interval = 1

; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
hwmon-path = /sys/devices/virtual/thermal/thermal_zone0/hwmon1/temp1_input

; Base temperature for where to start the ramp (in degrees celsius)
; Default: 0
base-temperature = 20

; Threshold temperature to display warning label (in degrees celsius)
; Default: 80
warn-temperature = 70
format = <ramp> <label>
format-warn = <ramp> <label-warn>
label-warn = TEMP %temperature-c%
label-warn-foreground = #FFFC00
label = TEMP %temperature-c%
label-foreground = ${colors.primary}
ramp-0 = A
ramp-1 = B
ramp-2 = C
ramp-foreground = #55

[module/i3-volume]
type = custom/script
tail = true
label = %output%
exec = i3-volume listen "%i %v %p\n"
scroll-up = i3-volume up
scroll-down = i3-volume down
click-left = i3-volume mute
click-right = exec pavucontrol &

[settings]
screenchange-reload = true
pseudo-transparency = true

; vim:ft=dosini

0 comments on commit 31bf753

Please sign in to comment.