mirror of
https://github.com/ksyasuda/rice.git
synced 2024-10-28 09:04:10 -07:00
add bluetooth module to new bar
fix dymanic colors for bluetooth module
This commit is contained in:
parent
2040c98abd
commit
9abd3b77cf
@ -145,7 +145,7 @@ font-2 = "FiraCode Nerd Font:size=10;3"
|
||||
modules-left = sep launcher sep workspaces sep cust-mpd-prev custom-mpd cust-mpd-next
|
||||
modules-center = title
|
||||
; modules-right = color-switch sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
modules-right = updates sep pulseaudio sep battery sep network sep date sep sysmenu sep
|
||||
modules-right = updates sep bluetooth-4k sep pulseaudio sep battery sep network sep date sep sysmenu sep
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
|
@ -148,7 +148,7 @@ font-3 = "Material Icons:size=10;3"
|
||||
modules-left = sep launcher sep workspaces sep cust-mpd-icon cust-mpd-prev custom-mpd cust-mpd-next
|
||||
modules-center = title
|
||||
; modules-right = color-switch sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
modules-right = updates sep pulseaudio sep network sep date sep sysmenu sep
|
||||
modules-right = updates sep bluetooth sep pulseaudio sep network-wlan sep date sep sysmenu sep
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
|
@ -831,6 +831,115 @@ interface = eth0
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
|
||||
|
||||
[module/network-wlan]
|
||||
type = internal/network
|
||||
interface = wlan0
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 1.0
|
||||
|
||||
; Test connectivity every Nth update
|
||||
; A value of 0 disables the feature
|
||||
; NOTE: Experimental (needs more testing)
|
||||
; Default: 0
|
||||
;ping-interval = 3
|
||||
|
||||
; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
|
||||
; Minimum output width of upload/download rate
|
||||
; Default: 3
|
||||
;;udspeed-minwidth = 5
|
||||
|
||||
; Accumulate values from all interfaces
|
||||
; when querying for up/downspeed rate
|
||||
; Default: false
|
||||
accumulate-stats = true
|
||||
|
||||
; Consider an `UNKNOWN` interface state as up.
|
||||
; Some devices have an unknown state, even when they're running
|
||||
; Default: false
|
||||
unknown-as-up = true
|
||||
|
||||
; Available tags:
|
||||
; <label-connected> (default)
|
||||
; <ramp-signal>
|
||||
format-connected = <ramp-signal><label-connected>
|
||||
;format-connected-prefix =
|
||||
format-connected-overline = ${color.background}
|
||||
format-connected-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-disconnected> (default)
|
||||
format-disconnected = <label-disconnected>
|
||||
format-disconnected-prefix =
|
||||
format-disconnected-prefix-background = ${color.orange}
|
||||
format-disconnected-prefix-padding = 1
|
||||
format-disconnected-overline = ${color.background}
|
||||
format-disconnected-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-connected> (default)
|
||||
; <label-packetloss>
|
||||
; <animation-packetloss>
|
||||
;;format-packetloss = <animation-packetloss> <label-connected>
|
||||
|
||||
; Available tokens:
|
||||
; %ifname% [wireless+wired]
|
||||
; %local_ip% [wireless+wired]
|
||||
; %local_ip6% [wireless+wired]
|
||||
; %essid% [wireless]
|
||||
; %signal% [wireless]
|
||||
; %upspeed% [wireless+wired]
|
||||
; %downspeed% [wireless+wired]
|
||||
; %linkspeed% [wired]
|
||||
; Default: %ifname% %local_ip%
|
||||
label-connected = "%{A1:networkmanager_dmenu &:}%essid%%{A}"
|
||||
label-connected-background = ${color.background-alt}
|
||||
label-connected-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %ifname% [wireless+wired]
|
||||
; Default: (none)
|
||||
label-disconnected = "%{A1:networkmanager_dmenu &:}Offline%{A}"
|
||||
label-disconnected-background = ${color.background-alt}
|
||||
label-disconnected-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %ifname% [wireless+wired]
|
||||
; %local_ip% [wireless+wired]
|
||||
; %local_ip6% [wireless+wired]
|
||||
; %essid% [wireless]
|
||||
; %signal% [wireless]
|
||||
; %upspeed% [wireless+wired]
|
||||
; %downspeed% [wireless+wired]
|
||||
; %linkspeed% [wired]
|
||||
; Default: (none)
|
||||
;label-packetloss = %essid%
|
||||
;label-packetloss-foreground = #eefafafa
|
||||
|
||||
; Only applies if <ramp-signal> is used
|
||||
; ramp-signal-0 =
|
||||
; ramp-signal-1 =
|
||||
; ramp-signal-2 =
|
||||
; ramp-signal-3 =
|
||||
|
||||
ramp-signal-0 = ﲁ
|
||||
ramp-signal-1 = ﰐ
|
||||
ramp-signal-2 = ﰑ
|
||||
ramp-signal-3 = ﰒ
|
||||
ramp-signal-background = ${color.purple}
|
||||
ramp-signal-padding = 1
|
||||
|
||||
; Only applies if <animation-packetloss> is used
|
||||
;;animation-packetloss-0 = ⚠
|
||||
;;animation-packetloss-0-foreground = #ffa64c
|
||||
;;animation-packetloss-1 = ⚠
|
||||
;;animation-packetloss-1-foreground = #000000
|
||||
; Framerate in milliseconds
|
||||
;;animation-packetloss-framerate = 500
|
||||
|
||||
|
||||
; Normal Module
|
||||
[module/network]
|
||||
type = internal/network
|
||||
@ -1189,7 +1298,8 @@ label-monitor = %name%
|
||||
; Default: %icon% %name%
|
||||
; label-active = %icon%
|
||||
label-active = %icon% %name%
|
||||
label-active-foreground = ${color.indigo}
|
||||
; label-active-foreground = ${color.indigo}
|
||||
label-active-foreground = ${color.foreground}
|
||||
label-active-background = ${color.primary}
|
||||
|
||||
|
||||
@ -1200,7 +1310,8 @@ label-active-background = ${color.primary}
|
||||
; Default: %icon% %name%
|
||||
; label-occupied = %icon%
|
||||
label-occupied = %icon% %name%
|
||||
label-occupied-foreground = ${color.indigo}
|
||||
; label-occupied-foreground = ${color.indigo}
|
||||
label-occupied-foreground = ${color.foreground}
|
||||
label-occupied-background = ${color.gray}
|
||||
|
||||
; Available tokens:
|
||||
@ -1210,7 +1321,8 @@ label-occupied-background = ${color.gray}
|
||||
; Default: %icon% %name%
|
||||
; label-urgent = %icon%
|
||||
label-urgent = %icon% %name%
|
||||
label-urgent-foreground = ${color.indigo}
|
||||
; label-urgent-foreground = ${color.indigo}
|
||||
label-urgent-foreground = ${color.foreground}
|
||||
label-urgent-background = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
@ -1220,7 +1332,8 @@ label-urgent-background = ${color.red}
|
||||
; Default: %icon% %name%
|
||||
; label-empty = %icon%
|
||||
label-empty = %icon% %name%
|
||||
label-empty-foreground = ${color.indigo}
|
||||
; label-empty-foreground = ${color.indigo}
|
||||
label-empty-foreground = ${color.foreground}
|
||||
label-empty-background = ${color.background-alt}
|
||||
|
||||
label-active-padding = 1
|
||||
|
@ -292,4 +292,28 @@ label-close-padding = 1
|
||||
; Default: none
|
||||
;label-separator = " | "
|
||||
|
||||
[module/bluetooth]
|
||||
type = custom/script
|
||||
exec = rofi-bluetooth --status
|
||||
interval = 2
|
||||
click-left = ~/SudacodeRice/scripts/rofi-bluetooth.desktop
|
||||
click-right = blueman-manager
|
||||
format-background = ${color.background-alt}
|
||||
format-padding = 1
|
||||
format-prefix-padding = 1
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
[module/bluetooth-4k]
|
||||
type = custom/script
|
||||
exec = rofi-bluetooth --status
|
||||
interval = 2
|
||||
click-left = ~/SudacodeRice/scripts/rofi-bluetooth
|
||||
click-right = blueman-manager
|
||||
format-background = ${color.background-alt}
|
||||
format-padding = 1
|
||||
format-prefix-padding = 1
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
@ -183,7 +183,7 @@ toggle_trust() {
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
printf ''
|
||||
echo "%{F#A3BE8C} %{F-}"
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
@ -203,7 +203,7 @@ print_status() {
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo ""
|
||||
echo "%{F#EC7875} %{F-}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user