updates to waybar

This commit is contained in:
Tyler Starr 2023-12-14 20:44:57 -08:00
parent 342e693c10
commit 6705721a3a
4 changed files with 45 additions and 8 deletions

View File

@ -4,7 +4,13 @@
// Choose the order of the modules
"modules-left": ["hyprland/workspaces", "hyprland/submap", "hyprland/window"],
"modules-center": ["clock"],
"modules-right": ["tray", "custom/separator", "network", "custom/separator", "cpu", "custom/separator", "memory", "custom/separator", "pulseaudio", "custom/separator", "custom/disk"],
"modules-right": ["tray", "custom/separator",
"network", "custom/separator",
"cpu", "custom/separator",
"memory", "custom/separator",
"custom/mouse", "custom/separator",
"pulseaudio", "custom/separator",
"custom/disk", "custom/bits"],
"hyprland/workspaces": {
"format": "{icon}",
@ -18,10 +24,15 @@
"hyprland/submap": {
"format": " {}"
},
"custom/disk": {
"format": " 󰉉 <span color=\"{{ .themes.gruvbox.red }}\">{}</span>G ",
"interval": 30,
"exec": "df -h --output=avail / | awk 'NR==2 {sub(/.$/, \"\", $1); print $1}'",
"custom/bits": {
"format": "{}",
"interval": 5,
"exec": "~/.config/waybar/scripts/bits.sh",
},
"custom/disk": {
"format": " 󰉉 <span color=\"{{ .themes.gruvbox.red }}\">{}</span>G ",
"interval": 30,
"exec": "df -h --output=avail / | awk 'NR==2 {sub(/.$/, \"\", $1); print $1}'",
},
"cpu": {
"format": " <span color=\"{{ .themes.gruvbox.red }}\">{usage}</span>%",
@ -38,6 +49,11 @@
"format-disconnected": "",
"on-click": "nm-connection-editor"
},
"custom/mouse": {
"format": " 󰍽 <span color=\"{{ .themes.gruvbox.red }}\">{}</span>% ",
"interval": 5,
"exec": "cat /sys/class/power_supply/hidpp_battery_[0-9]*/capacity | head -n 1",
},
"pulseaudio": {
"format": "{icon} <span color=\"{{ .themes.gruvbox.red }}\">{volume}</span>% {format_source}",
"format-muted": "󰖁 {format_source}",

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# https://github.com/starr-dusT/dotfiles
bits=""
# Gamemode bit
if [ "$(gamemoded -s)" != "gamemode is inactive" ]; then
bits+="<span color=\"{{ .themes.gruvbox.blue0 }}\">G</span>"
fi
# VPN bit
if [ -f ~/.wg0 ]; then
bits+="<span color=\"{{ .themes.gruvbox.purple0 }}\">V</span>"
fi
# Print bits if there are any
if [ "$bits" != "" ]; then
# Seperator
echo " | $bits "
fi

View File

@ -1,3 +0,0 @@
swayidle -w \
timeout 300 'hyprctl dispatch dpms off' \
resume 'hyprctl dispatch dpms on' \

View File

@ -118,6 +118,10 @@ window#waybar.hidden {
color: @fg;
}
#custom-mouse {
color: @fg;
}
#tray {
padding: 0 6px;
}