Updated bspwmrc, polybar scripts.

This commit is contained in:
Salyrus
2021-12-05 09:38:44 +01:00
parent 5f7b0fda75
commit 8e93f468ef
6 changed files with 283 additions and 32 deletions

233
polybar/.config_backup Normal file
View File

@ -0,0 +1,233 @@
;==========================================================
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 32
;offset-x = 1%
;offset-y = 1%
radius = 1.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin-left = 1
module-margin-right = 1
font-0 = RobotoMono:pixelsize=10;1
font-1 = noto-fonts-emoji:pixelsize=10;1
modules-left = bspwm
modules-center = mpd
modules-right = backlight-acpi battery wlan date powermenu
tray-position = right
tray-padding = 1
;tray-background = #0063ff
wm-restack = bspwm
cursor-click = pointer
cursor-scroll = ns-resize
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
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
; Separator in between workspaces
; label-separator = |
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/wlan]
type = internal/network
interface = wlp8s0
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-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = void0
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1
date = %Y-%m-%d
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% %time%
[module/battery]
type = internal/battery
battery = BAT1
adapter = ACAD
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View File

@ -26,18 +26,18 @@ padding-left = 0
padding-right = 1
spacing = 1
module-margin = 1
module-margin-left = 1
font-0 = RobotoMono:size=10;1
font-1 = coins:style=Regular;1
font-2 = FontAwesome;1
font-3 = MaterialIcons;1
font-0 = RobotoMono:size=10;2
font-1 = MaterialIcons;3
modules-left = bspwm
modules-right = xbps-updates pulseaudio-control brightnessctl bt-status wireless-network wired-network battery date
modules-right = xbps-updates pulseaudio-control brightnessctl wireless-network battery date
;modules-center = bspwm
fixed-center = true
tray-position = right
[module/bt-status]
type = custom/script
exec = ~/.config/polybar/scripts/bt-status.sh
@ -55,7 +55,7 @@ type = custom/script
tail = true
label-foreground = ${colors.foreground}
exec = ~/.config/polybar/scripts/pulseaudio-control.bash --icons-volume " , " --icon-muted "" --sink-nicknames-from "alsa.card_name" --sink-nickname "usb-Topping_D30-00.analog-stereo:  D30" --sink-nickname "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor: Speakers" listen
exec = ~/.config/polybar/scripts/pulseaudio-control.bash --icons-volume ", , " --icon-muted "" --sink-nicknames-from "alsa.card_name" --sink-nickname "usb-Topping_D30-00.analog-stereo:  D30" --sink-nickname "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor: Speakers" listen
click-right = exec pavucontrol &
click-left = ~/.config/polybar/scripts/pulseaudio-control.bash togmute
click-middle = ~/.config/polybar/scripts/pulseaudio-control.bash --sink-blacklist "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor" next-sink
@ -68,9 +68,8 @@ exec = ~/.config/polybar/scripts/brightnessctl.sh
scroll-up = exec brightnessctl set +5%
scroll-down = exec brightnessctl set 5%-
interval = 1
interval = 0.5
format-prefix = " "
label = %output%
label-foreground = ${colors.foreground}
@ -89,21 +88,21 @@ adapter = ACAD
full-at = 98
click-left = ~/.config/polybar/scripts/bat_toggle.sh
format-charging = <label-charging>
format-charging = <label-charging>
format-discharging = <ramp-capacity><label-discharging>
format-full = <ramp-capacity><label-full>
format-charging-foreground = #90C2E7
ramp-capacity-0 =
ramp-capacity-0 =
ramp-capacity-0-foreground = #DB5461
ramp-capacity-1 =
ramp-capacity-1 =
ramp-capacity-1-foreground = #E9C46A
ramp-capacity-2 =
ramp-capacity-2 =
ramp-capacity-2-foreground = #E9C46A
ramp-capacity-3 =
ramp-capacity-3 =
ramp-capacity-3-foreground = #169873
ramp-capacity-4 =
ramp-capacity-4 =
ramp-capacity-4-foreground = #169873
bar-capacity-width = 10
@ -118,24 +117,25 @@ bar-capacity-empty-foreground = #44ffffff
[module/bspwm]
type = internal/bspwm
label-focused = ""
label-focused = ""
label-focused-background= ${colors.foreground-alt}
label-focused-padding = 1
label-occupied = ""
label-occupied = ""
label-occupied-padding = 1
label-urgent = ""
label-urgent = ""
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = ""
label-empty = ""
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 1
[module/date]
type = internal/date
date = %Y-%m-%d %H:%M:%S
date = %H:%M
; full date: %Y-%m-%d %H:%M:%S
[module/wireless-network]
type = internal/network
@ -143,19 +143,20 @@ interface = wlp8s0
interval = 5.0
ping-interval = 10
format-connected = <ramp-signal>
label-disconnected = 
label-connected = %essid%
format-connected = <ramp-signal><label-connected>
label-disconnected = 
label-disconnected-foreground = #66
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
animation-packetloss-0 = 
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 =
animation-packetloss-1 =
animation-packetloss-1-foreground = ${bar/top.foreground}
animation-packetloss-framerate = 500
@ -166,7 +167,7 @@ headphone-mixer = Headphone
headphone-id = 9
format-volume = <ramp-volume> <label-volume>
label-muted =  muted
label-muted =  muted
label-muted-foreground = #66
ramp-volume-0 = 

3
polybar/scripts/bkpctl.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "$(brightnessctl | grep -o "(.*" | tr -d "()")"

View File

@ -1,3 +1,16 @@
#!/bin/bash
echo "$(brightnessctl | grep -o "(.*" | tr -d "()")"
BRIGHTNESS_VALUE=`brightnessctl | grep -o "(.*" | tr -d "()"`
BRIGHTNESS_NR=${BRIGHTNESS_VALUE//%}
if [ $BRIGHTNESS_NR -lt 20 ]; then
BRIGHTNESS_ICON=''
elif [ $BRIGHTNESS_NR -lt 50 ]; then
BRIGHTNESS_ICON=''
elif [ $BRIGHTNESS_NR -lt 80 ]; then
BRIGHTNESS_ICON=''
else
BRIGHTNESS_ICON=''
fi
echo "$BRIGHTNESS_ICON $BRIGHTNESS_VALUE"

View File

@ -3,7 +3,7 @@
updates=$(xbps-install -Mun 2> /dev/null | wc -l)
if [ -n "$updates" ] && [ "$updates" -gt 0 ]; then
echo " $updates"
echo " $updates"
else
echo ""
fi