From 7811a30543f4b5fd80bd85a3440fb1372c428e73 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Thu, 31 Aug 2023 15:09:39 -0400 Subject: [PATCH] added native bluetooth to waybar --- home-config/hypr/autostart.sh | 2 -- home-config/waybar/config | 24 ++++++++++++++++++------ home-config/waybar/style.css | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/home-config/hypr/autostart.sh b/home-config/hypr/autostart.sh index 4881fd9..ad57e9e 100755 --- a/home-config/hypr/autostart.sh +++ b/home-config/hypr/autostart.sh @@ -11,5 +11,3 @@ swaybg -i ~/.config/hypr/Wallpapers/mountains.jpg & swayidle -w timeout 300 'swaylock --screenshots --clock --indicator --grace 3 --fade-in 1 --effect-blur 7x5 --effect-greyscale' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000' & syncthing serve --no-browser & - -blueman-applet & diff --git a/home-config/waybar/config b/home-config/waybar/config index 9d4b88f..677c60c 100644 --- a/home-config/waybar/config +++ b/home-config/waybar/config @@ -1,11 +1,11 @@ { - "layer": "bottom", + "layer": "top", "position": "top", "height": 30, "modules-left": ["wlr/workspaces", "hyprland/submap"], "modules-center": ["hyprland/window"], - "modules-right": ["tray", "custom/spotify", "custom/weather", "custom/mail", "custom/storage", "backlight", "pulseaudio", "network", "idle_inhibitor", "battery", "clock"], + "modules-right": ["tray", "custom/spotify", "custom/weather", "custom/mail", "custom/storage", "backlight", "bluetooth", "pulseaudio", "network", "idle_inhibitor", "battery", "clock"], "hyprland/submap": { "format": " {}" }, @@ -15,7 +15,8 @@ }, "hyprland/window": { "max-length": 80, - "tooltip": false + "tooltip": false, + "separate-outputs": true }, "clock": { "format": "{:%a %d %b %H:%M}", @@ -34,14 +35,25 @@ "tooltip": false, "bat":"BAT1" }, + "bluetooth": { + "format": "", + "format-disabled": "", + "format-connected": "", + "format-connected-battery": " {device_battery_percentage}%", + "on-click": "blueman-manager", + "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" + }, "network": { - "format-alt": "{icon}", + "format-alt": "{ipaddr}/{cidr} {icon} {bandwidthTotalBytes}󰹹", "format": "{ipaddr}/{cidr} {icon}", "format-alt-click": "click-right", "format-icons": { - "wifi": ["", "" ,""], + "wifi": ["󰤟", "󰤢" ,"󰤥", "󰤨"], "ethernet": [""], - "disconnected": ["睊"] + "disconnected": ["󰤭"] }, "on-click": "alacritty -e doas nmtui", "tooltip": false diff --git a/home-config/waybar/style.css b/home-config/waybar/style.css index cf776ad..0e98fc6 100644 --- a/home-config/waybar/style.css +++ b/home-config/waybar/style.css @@ -46,7 +46,7 @@ window#waybar.solo { color: rgba(238, 46, 36, 1); } -#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail { +#mode, #battery, #cpu, #memory, #network, #bluetooth, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail { margin: 0px 6px 0px 10px; min-width: 25px; }