Set up bluetooth handling
This commit is contained in:
parent
cfc5d686d2
commit
346f521e0d
4 changed files with 45 additions and 12 deletions
|
@ -22,6 +22,7 @@ foreground-alt = #717f24
|
|||
primary = #2f7e25
|
||||
secondary = #2f6a7f
|
||||
alert = #7f2b26
|
||||
|
||||
disabled = #707880
|
||||
|
||||
|
||||
|
@ -51,9 +52,9 @@ font-2 = FontAwesome:size=10;1"
|
|||
font-3 = SymbolsNerdFont:size=15;3
|
||||
|
||||
|
||||
modules-left = my-text-label xworkspaces xwindow
|
||||
modules-right = filesystem memory cpu battery temperature wlan date
|
||||
; modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date
|
||||
modules-left = my-text-label xworkspaces
|
||||
modules-right = filesystem memory cpu battery temperature pulseaudio bluetooth wlan date
|
||||
; modules-right = xwindow filesystem pulseaudio xkeyboard memory cpu wlan eth date
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
|
@ -91,20 +92,24 @@ type = internal/fs
|
|||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
label-mounted = %{F#2f7e25} %{F-} %percentage_used%% (%used%/%free%)
|
||||
#label-mounted = %{F#2f7e25} %{F-} %percentage_used%% (%used%/%free%)
|
||||
label-mounted = %{F#2f7e25} %{F-} %percentage_used%%
|
||||
label-mounted-underline = #2f7e25
|
||||
label-unmounted = %mountpoint% not mounted
|
||||
label-unmounted-foreground = ${colors.disabled}
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
format-volume-prefix = "VOL "
|
||||
format-volume-prefix = " "
|
||||
format-volume-prefix-foreground = ${colors.primary}
|
||||
format-volume = <label-volume>
|
||||
label-volume = %percentage%%
|
||||
label-muted = muted
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
label-muted = "muted"
|
||||
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
label-padding = 1
|
||||
format-volume-underline = #00aae0
|
||||
format-muted-underline = ${colors.alert}
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
@ -121,8 +126,10 @@ interval = 2
|
|||
format-prefix = ""
|
||||
format-underline = #707f23
|
||||
format-prefix-foreground = ${colors.primary}
|
||||
label = %percentage_used:2%% (%gb_used%/%gb_free%)
|
||||
# label = %percentage_used:2%% (%gb_used%/%gb_free%)
|
||||
label = %percentage_used:2%%
|
||||
label-padding = 1
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
|
@ -168,10 +175,8 @@ format-underline = #2f697f
|
|||
format-prefix-foreground = ${colors.primary}
|
||||
format-prefix = ""
|
||||
date = %a %d %b %Y
|
||||
date-alt = %Y-%m-%d %H:%M:%S
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
label = %date% %{F#717f24}%time%
|
||||
label = %date% | %{F#2f7e25}%time%
|
||||
label-padding = 2
|
||||
|
||||
[module/temperature]
|
||||
|
@ -237,6 +242,15 @@ content =
|
|||
content-foreground = #2f6a7f
|
||||
content-padding = 1
|
||||
|
||||
[module/bluetooth]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/polybar_scripts/launch_bluetooth_manager.sh
|
||||
interval = 2
|
||||
click-right = exec blueberry
|
||||
click-left = exec ~/.config/polybar/polybar_scripts/toggle_bluetooth.sh
|
||||
format-padding = 1
|
||||
format-foreground = ${colors.primary}
|
||||
format-underline = ${colors.primary}
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
|
12
polybar/polybar_scripts/launch_bluetooth_manager.sh
Executable file
12
polybar/polybar_scripts/launch_bluetooth_manager.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
|
||||
then
|
||||
echo "%{F#66ffffff}"
|
||||
else
|
||||
if [ $(echo info | bluetoothctl | grep 'Device' | wc -c) -eq 0 ]
|
||||
then
|
||||
echo ""
|
||||
fi
|
||||
echo "%{F#73fa91}"
|
||||
fi
|
7
polybar/polybar_scripts/toggle_bluetooth.sh
Executable file
7
polybar/polybar_scripts/toggle_bluetooth.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
|
||||
then
|
||||
bluetoothctl power on
|
||||
else
|
||||
bluetoothctl power off
|
||||
fi
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"editor.fontFamily": "Liberation Mono",
|
||||
"editor.fontFamily": "Liga Liberation Mono",
|
||||
"editor.fontLigatures": true,
|
||||
"editor.fontSize": 12,
|
||||
"editor.fontWeight": 500,
|
||||
|
|
Loading…
Add table
Reference in a new issue