upadted waybar + hypr theme
This commit is contained in:
@@ -13,7 +13,7 @@ general {
|
|||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||||
# col.active_border = rgba(cba6f7ee) rgba(f38ba8ee) 45deg
|
# col.active_border = rgba(cba6f7ee) rgba(f38ba8ee) 45deg
|
||||||
col.active_border = rgb($mauveAlpha) rgb($tealAlpha) 30deg
|
col.active_border = rgb($mauveAlpha) rgb($blueAlpha) 30deg
|
||||||
col.inactive_border = rgb($surface2Alpha)
|
col.inactive_border = rgb($surface2Alpha)
|
||||||
|
|
||||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||||
@@ -96,8 +96,7 @@ master {
|
|||||||
misc {
|
misc {
|
||||||
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||||
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
||||||
vrr = 1
|
vrr = 0
|
||||||
vfr = true
|
|
||||||
font_family = FiraCode Nerd Font
|
font_family = FiraCode Nerd Font
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,19 +7,19 @@
|
|||||||
"modules-left": ["hyprland/workspaces"],
|
"modules-left": ["hyprland/workspaces"],
|
||||||
"modules-center": [],
|
"modules-center": [],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
// "custom/bluetooth-audio",
|
|
||||||
"custom/pixelbuds_pro",
|
"custom/pixelbuds_pro",
|
||||||
"wireplumber",
|
"wireplumber",
|
||||||
"custom/audio-output",
|
"custom/audio-output",
|
||||||
"network",
|
"network",
|
||||||
"custom/cpu",
|
|
||||||
"custom/mem",
|
"custom/mem",
|
||||||
|
"custom/cpu",
|
||||||
|
"custom/disk-root",
|
||||||
|
"custom/disk-gdrive",
|
||||||
"custom/tlp",
|
"custom/tlp",
|
||||||
"tray",
|
"tray",
|
||||||
"clock"
|
"clock"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"on-click": "activate"
|
"on-click": "activate"
|
||||||
@@ -34,188 +34,14 @@
|
|||||||
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
},
|
},
|
||||||
"custom/cpu": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
|
||||||
"interval": 3
|
|
||||||
},
|
|
||||||
"custom/mem": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/memory.sh",
|
|
||||||
"interval": 3
|
|
||||||
},
|
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"format": "CPU: {usage}%",
|
"format": "CPU: {usage}%",
|
||||||
"tooltip": true
|
"tooltip": true,
|
||||||
|
"interval": 1
|
||||||
},
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
"format": "MEM: {used}/{total}GB"
|
"format": "MEM: {used}/{total}GB",
|
||||||
},
|
"interval": 3
|
||||||
"network": {
|
|
||||||
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
|
||||||
"format-ethernet": "{ifname}: {ipaddr}",
|
|
||||||
"format-disconnected": "Disconnected",
|
|
||||||
"tooltip-format": "{ifname} via {gwaddr}"
|
|
||||||
},
|
|
||||||
"wireplumber": {
|
|
||||||
"format": "{volume}% {icon}",
|
|
||||||
"format-muted": "",
|
|
||||||
"format-icons": {
|
|
||||||
"headphone": "",
|
|
||||||
"hands-free": "",
|
|
||||||
"default": ["", "", ""]
|
|
||||||
},
|
|
||||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
|
||||||
"on-click-right": "~/.config/waybar/scripts/cycle_audio_output.sh",
|
|
||||||
"scroll-step": 1
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/bluetooth-audio": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/bluetooth_audio.sh",
|
|
||||||
"interval": 3,
|
|
||||||
"on-click": "~/.config/waybar/scripts/bluetooth_audio.sh disconnect"
|
|
||||||
},
|
|
||||||
|
|
||||||
"pulseaudio": {
|
|
||||||
"format": "{icon} {volume}%",
|
|
||||||
"format-muted": " Muted",
|
|
||||||
"format-icons": {
|
|
||||||
"headphone": "",
|
|
||||||
"hands-free": "",
|
|
||||||
"headset": "",
|
|
||||||
"phone": "",
|
|
||||||
"portable": "",
|
|
||||||
"car": "",
|
|
||||||
"default": ["", ""]
|
|
||||||
},
|
|
||||||
"on-click": "pavucontrol"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"icon-size": 18,
|
|
||||||
"spacing": 10
|
|
||||||
},
|
|
||||||
"custom/power": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false,
|
|
||||||
"on-click": "~/.config/hypr/scripts/powermenu.sh"
|
|
||||||
},
|
|
||||||
"custom/tlp": {
|
|
||||||
"format": "{}",
|
|
||||||
"exec": "~/.config/waybar/scripts/tlp-profile.sh",
|
|
||||||
"return-type": "json",
|
|
||||||
"interval": 5
|
|
||||||
},
|
|
||||||
"battery": {
|
|
||||||
"states": {
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"format": "{capacity}%",
|
|
||||||
"format-charging": "{capacity}%",
|
|
||||||
"format-plugged": "{capacity}%",
|
|
||||||
"format-alt": "{time} {icon}",
|
|
||||||
"format-full": "{capacity}%",
|
|
||||||
"format-icons": ["", "", "", "", ""]
|
|
||||||
},
|
|
||||||
"custom/pixelbuds_pro": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/pixelbuds_pro_control.sh",
|
|
||||||
"interval": 5,
|
|
||||||
"on-click-right": "~/.config/waybar/scripts/pixelbuds_pro_control.sh connect",
|
|
||||||
"on-click": "~/.config/waybar/scripts/pixelbuds_pro_control.sh cycle_anc"
|
|
||||||
},
|
|
||||||
"custom/audio-output": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "/home/narl/.config/waybar/scripts/audio.sh show",
|
|
||||||
"on-click": "/home/narl/.config/waybar/scripts/audio.sh cycle",
|
|
||||||
"interval": 1
|
|
||||||
},
|
|
||||||
"custom/gamemode": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/gamemode_status.sh",
|
|
||||||
"on-click": "~/.config/hypr/scripts/gamemode.sh",
|
|
||||||
"interval": 1
|
|
||||||
},
|
|
||||||
"custom/gpu-screen-recorder": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
|
||||||
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save",
|
|
||||||
"on-click": "~/.config/waybar/scripts/toggle-replay.sh",
|
|
||||||
"interval": 1
|
|
||||||
},
|
|
||||||
"custom/gpu-usage": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/gpu_usage.sh",
|
|
||||||
"interval": 5
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"layer": "top",
|
|
||||||
"position": "top",
|
|
||||||
"output": "!eDP-1",
|
|
||||||
"height": 40,
|
|
||||||
"modules-left": ["hyprland/workspaces"],
|
|
||||||
"modules-center": [],
|
|
||||||
"modules-right": [
|
|
||||||
// "custom/bluetooth-audio",
|
|
||||||
// "custom/pixelbuds_pro",
|
|
||||||
"wireplumber",
|
|
||||||
"custom/audio-output",
|
|
||||||
"network",
|
|
||||||
"custom/cpu",
|
|
||||||
"custom/mem",
|
|
||||||
"custom/tlp",
|
|
||||||
"tray",
|
|
||||||
"clock"
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
"hyprland/workspaces": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"on-click": "activate"
|
|
||||||
},
|
|
||||||
"hyprland/window": {
|
|
||||||
"format": "{}",
|
|
||||||
"max-length": 35
|
|
||||||
},
|
|
||||||
"clock": {
|
|
||||||
"format": "{:%a %d %b %H:%M}",
|
|
||||||
"format-alt": false,
|
|
||||||
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
|
||||||
"tooltip": false,
|
|
||||||
},
|
|
||||||
"custom/gpu": {
|
|
||||||
"format": "GPU: {}%",
|
|
||||||
"exec": "~/.config/waybar/scripts/gpu_usage.sh",
|
|
||||||
"interval": 1,
|
|
||||||
"tooltip": true
|
|
||||||
},
|
|
||||||
"custom/cpu": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
|
||||||
"interval": 3
|
|
||||||
},
|
|
||||||
"custom/mem": {
|
|
||||||
"format": "{}",
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/waybar/scripts/memory.sh",
|
|
||||||
"interval": 3
|
|
||||||
},
|
|
||||||
"cpu": {
|
|
||||||
"format": "CPU: {usage}%",
|
|
||||||
"tooltip": true
|
|
||||||
},
|
|
||||||
"memory": {
|
|
||||||
"format": "MEM: {used}/{total}GB"
|
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
||||||
@@ -225,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
"wireplumber": {
|
"wireplumber": {
|
||||||
"format": "{volume}% {icon}",
|
"format": "{volume}% {icon}",
|
||||||
"format-muted": "",
|
"format-muted": "--- ",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"headphone": "",
|
"headphone": "",
|
||||||
"hands-free": "",
|
"hands-free": "",
|
||||||
@@ -236,12 +62,13 @@
|
|||||||
"on-click-middle": "pavucontrol",
|
"on-click-middle": "pavucontrol",
|
||||||
"scroll-step": 1
|
"scroll-step": 1
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/bluetooth-audio": {
|
"custom/bluetooth-audio": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "~/.config/waybar/scripts/bluetooth_audio.sh",
|
"exec": "~/.config/waybar/scripts/bluetooth_audio.sh",
|
||||||
"interval": 3,
|
"interval": 3,
|
||||||
"on-click": "~/.config/waybar/scripts/bluetooth_audio.sh disconnect"
|
"on-click": "~/.config/waybar/scripts/bluetooth_audio.sh disconnect & disown"
|
||||||
},
|
},
|
||||||
|
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
@@ -256,7 +83,7 @@
|
|||||||
"car": "",
|
"car": "",
|
||||||
"default": ["", ""]
|
"default": ["", ""]
|
||||||
},
|
},
|
||||||
"on-click": "pavucontrol"
|
"on-click": "pavucontrol & disown"
|
||||||
},
|
},
|
||||||
"tray": {
|
"tray": {
|
||||||
"icon-size": 18,
|
"icon-size": 18,
|
||||||
@@ -265,7 +92,7 @@
|
|||||||
"custom/power": {
|
"custom/power": {
|
||||||
"format": "",
|
"format": "",
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"on-click": "~/.config/hypr/scripts/powermenu.sh"
|
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown"
|
||||||
},
|
},
|
||||||
"custom/tlp": {
|
"custom/tlp": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
@@ -290,35 +117,274 @@
|
|||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "~/.config/waybar/scripts/pixelbuds_pro_control.sh",
|
"exec": "~/.config/waybar/scripts/pixelbuds_pro_control.sh",
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
"on-click-right": "~/.config/waybar/scripts/pixelbuds_pro_control.sh connect",
|
"on-click": "~/.config/waybar/scripts/pixelbuds_pro_control.sh connect & disown",
|
||||||
"on-click": "~/.config/waybar/scripts/pixelbuds_pro_control.sh cycle_anc"
|
"on-click-right": "~/.config/waybar/scripts/pixelbuds_pro_control.sh cycle_anc & disown"
|
||||||
},
|
},
|
||||||
"custom/audio-output": {
|
"custom/audio-output": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "/home/narl/.config/waybar/scripts/audio.sh show",
|
"exec": "/home/narl/.config/waybar/scripts/audio.sh show",
|
||||||
"on-click": "/home/narl/.config/waybar/scripts/audio.sh cycle",
|
"on-click": "/home/narl/.config/waybar/scripts/audio.sh cycle & disown",
|
||||||
"interval": 1
|
"interval": 1
|
||||||
},
|
},
|
||||||
"custom/gamemode": {
|
"custom/gamemode": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "~/.config/waybar/scripts/gamemode_status.sh",
|
"exec": "~/.config/waybar/scripts/gamemode_status.sh",
|
||||||
"on-click": "~/.config/hypr/scripts/gamemode.sh",
|
"on-click": "~/.config/hypr/scripts/gamemode.sh & disown",
|
||||||
"interval": 1
|
"interval": 1
|
||||||
},
|
},
|
||||||
"custom/gpu-screen-recorder": {
|
"custom/gpu-screen-recorder": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||||
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save",
|
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||||
"on-click": "~/.config/waybar/scripts/toggle-replay.sh",
|
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||||
|
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||||
"interval": 1
|
"interval": 1
|
||||||
},
|
},
|
||||||
"custom/gpu-usage": {
|
"custom/gpu": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "~/.config/waybar/scripts/gpu_usage.sh",
|
"exec": "~/.config/waybar/scripts/gpu_info.sh",
|
||||||
"interval": 5
|
"on-click": "lact gui & disown",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/cpu": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
||||||
|
"on-click": "zenmonitor & disown",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/mem": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/memory.sh",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/btrfs": {
|
||||||
|
"format": "{}",
|
||||||
|
"exec": "~/.config/waybar/scripts/btrfs.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-root": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh /",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-gdrive": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/gdrive",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-data": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/data",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-games": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/games",
|
||||||
|
"interval": 30
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"output": "!eDP-1",
|
||||||
|
"height": 40,
|
||||||
|
"modules-left": ["hyprland/workspaces"],
|
||||||
|
"modules-center": [],
|
||||||
|
"modules-right": [
|
||||||
|
// "custom/pixelbuds_pro",
|
||||||
|
"wireplumber",
|
||||||
|
"custom/audio-output",
|
||||||
|
"network",
|
||||||
|
"custom/mem",
|
||||||
|
"custom/cpu",
|
||||||
|
"custom/disk-root",
|
||||||
|
"custom/disk-gdrive",
|
||||||
|
"custom/tlp",
|
||||||
|
"tray",
|
||||||
|
"clock"
|
||||||
|
],
|
||||||
|
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "activate"
|
||||||
|
},
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{}",
|
||||||
|
"max-length": 35
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%a %d %b %H:%M}",
|
||||||
|
"format-alt": false,
|
||||||
|
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
||||||
|
"tooltip": false,
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "CPU: {usage}%",
|
||||||
|
"tooltip": true,
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "MEM: {used}/{total}GB",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
||||||
|
"format-ethernet": "{ifname}: {ipaddr}",
|
||||||
|
"format-disconnected": "Disconnected",
|
||||||
|
"tooltip-format": "{ifname} via {gwaddr}"
|
||||||
|
},
|
||||||
|
"wireplumber": {
|
||||||
|
"format": "{volume}% {icon}",
|
||||||
|
"format-muted": "--- ",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||||
|
"on-click-right": "~/.config/waybar/scripts/audio.sh cycle",
|
||||||
|
"on-click-middle": "pavucontrol",
|
||||||
|
"scroll-step": 1
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/bluetooth-audio": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/bluetooth_audio.sh",
|
||||||
|
"interval": 3,
|
||||||
|
"on-click": "~/.config/waybar/scripts/bluetooth_audio.sh disconnect & disown"
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": " Muted",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol & disown"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 18,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"custom/power": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown"
|
||||||
|
},
|
||||||
|
"custom/tlp": {
|
||||||
|
"format": "{}",
|
||||||
|
"exec": "~/.config/waybar/scripts/tlp-profile.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 5
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{capacity}%",
|
||||||
|
"format-charging": "{capacity}%",
|
||||||
|
"format-plugged": "{capacity}%",
|
||||||
|
"format-alt": "{time} {icon}",
|
||||||
|
"format-full": "{capacity}%",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"custom/pixelbuds_pro": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/pixelbuds_pro_control.sh",
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "~/.config/waybar/scripts/pixelbuds_pro_control.sh connect & disown",
|
||||||
|
"on-click-right": "~/.config/waybar/scripts/pixelbuds_pro_control.sh cycle_anc & disown"
|
||||||
|
},
|
||||||
|
"custom/audio-output": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "/home/narl/.config/waybar/scripts/audio.sh show",
|
||||||
|
"on-click": "/home/narl/.config/waybar/scripts/audio.sh cycle & disown",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"custom/gamemode": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/gamemode_status.sh",
|
||||||
|
"on-click": "~/.config/hypr/scripts/gamemode.sh & disown",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"custom/gpu-screen-recorder": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||||
|
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||||
|
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||||
|
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"custom/gpu": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/gpu_info.sh",
|
||||||
|
"on-click": "lact gui & disown",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/cpu": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
||||||
|
"on-click": "zenmonitor & disown",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/mem": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/memory.sh",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/btrfs": {
|
||||||
|
"format": "{}",
|
||||||
|
"exec": "~/.config/waybar/scripts/btrfs.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-root": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh /",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-gdrive": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/gdrive",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-data": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/data",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-games": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/games",
|
||||||
|
"interval": 30
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
202
waybar/config.jsonc.new
Normal file
202
waybar/config.jsonc.new
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
// ~/.config/waybar/config.jsonc
|
||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"height": 36,
|
||||||
|
"modules-left": [
|
||||||
|
"hyprland/workspaces"
|
||||||
|
],
|
||||||
|
"modules-center": [
|
||||||
|
],
|
||||||
|
"modules-right": [
|
||||||
|
// "custom/bluetooth-audio",
|
||||||
|
// "custom/pixelbuds_pro",
|
||||||
|
"custom/mem",
|
||||||
|
"custom/cpu",
|
||||||
|
"custom/gpu",
|
||||||
|
"custom/disk-root",
|
||||||
|
"custom/disk-gdrive",
|
||||||
|
"custom/disk-data",
|
||||||
|
"custom/disk-games",
|
||||||
|
// "network",
|
||||||
|
"custom/audio-output",
|
||||||
|
"wireplumber",
|
||||||
|
"tray",
|
||||||
|
"custom/gpu-screen-recorder",
|
||||||
|
"custom/gamemode",
|
||||||
|
"clock"
|
||||||
|
],
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "activate"
|
||||||
|
},
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{}",
|
||||||
|
"max-length": 35
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%a %d %b %H:%M}",
|
||||||
|
"format-alt": false,
|
||||||
|
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
||||||
|
"tooltip": false,
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "CPU: {usage}%",
|
||||||
|
"tooltip": true,
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "MEM: {used}/{total}GB",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
||||||
|
"format-ethernet": "{ifname}: {ipaddr}",
|
||||||
|
"format-disconnected": "Disconnected",
|
||||||
|
"tooltip-format": "{ifname} via {gwaddr}"
|
||||||
|
},
|
||||||
|
"wireplumber": {
|
||||||
|
"format": "{volume}% {icon}",
|
||||||
|
"format-muted": "--- ",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||||
|
"on-click-right": "~/.config/waybar/scripts/audio.sh cycle",
|
||||||
|
"on-click-middle": "pavucontrol",
|
||||||
|
"scroll-step": 1
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/bluetooth-audio": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/bluetooth_audio.sh",
|
||||||
|
"interval": 3,
|
||||||
|
"on-click": "~/.config/waybar/scripts/bluetooth_audio.sh disconnect & disown"
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": " Muted",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol & disown"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 18,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"custom/power": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown"
|
||||||
|
},
|
||||||
|
"custom/tlp": {
|
||||||
|
"format": "{}",
|
||||||
|
"exec": "~/.config/waybar/scripts/tlp-profile.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 5
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{capacity}%",
|
||||||
|
"format-charging": "{capacity}%",
|
||||||
|
"format-plugged": "{capacity}%",
|
||||||
|
"format-alt": "{time} {icon}",
|
||||||
|
"format-full": "{capacity}%",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"custom/pixelbuds_pro": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/pixelbuds_pro_control.sh",
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "~/.config/waybar/scripts/pixelbuds_pro_control.sh connect & disown",
|
||||||
|
"on-click-right": "~/.config/waybar/scripts/pixelbuds_pro_control.sh cycle_anc & disown"
|
||||||
|
},
|
||||||
|
"custom/audio-output": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "/home/narl/.config/waybar/scripts/audio.sh show",
|
||||||
|
"on-click": "/home/narl/.config/waybar/scripts/audio.sh cycle & disown",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"custom/gamemode": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/gamemode_status.sh",
|
||||||
|
"on-click": "~/.config/hypr/scripts/gamemode.sh & disown",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"custom/gpu-screen-recorder": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||||
|
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||||
|
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||||
|
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"custom/gpu": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/gpu_info.sh",
|
||||||
|
"on-click": "lact gui & disown",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/cpu": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
||||||
|
"on-click": "zenmonitor & disown",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/mem": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/memory.sh",
|
||||||
|
"interval": 3
|
||||||
|
},
|
||||||
|
"custom/btrfs": {
|
||||||
|
"format": "{}",
|
||||||
|
"exec": "~/.config/waybar/scripts/btrfs.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-root": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh /",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-gdrive": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/gdrive",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-data": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/data",
|
||||||
|
"interval": 30
|
||||||
|
},
|
||||||
|
"custom/disk-games": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh ~/games",
|
||||||
|
"interval": 30
|
||||||
|
}
|
||||||
|
}
|
45
waybar/scripts/btrfs.sh
Executable file
45
waybar/scripts/btrfs.sh
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get BTRFS filesystems
|
||||||
|
btrfs_filesystems=$(df -hT | grep btrfs)
|
||||||
|
|
||||||
|
# Initialize variables
|
||||||
|
total_used=0
|
||||||
|
total_size=0
|
||||||
|
|
||||||
|
# Process each BTRFS filesystem
|
||||||
|
while read -r line; do
|
||||||
|
size_str=$(echo "$line" | awk '{print $3}')
|
||||||
|
used_str=$(echo "$line" | awk '{print $4}')
|
||||||
|
|
||||||
|
size=$(echo "$size_str" | sed 's/[GT]//')
|
||||||
|
used=$(echo "$used_str" | sed 's/[GT]//')
|
||||||
|
|
||||||
|
if [[ $size_str == *T ]]; then
|
||||||
|
size=$(awk -v s="$size" 'BEGIN {print s*1024}')
|
||||||
|
fi
|
||||||
|
if [[ $used_str == *T ]]; then
|
||||||
|
used=$(awk -v u="$used" 'BEGIN {print u*1024}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
total_size=$(awk -v total="$total_size" -v size="$size" 'BEGIN {print total+size}')
|
||||||
|
total_used=$(awk -v total="$total_used" -v used="$used" 'BEGIN {print total+used}')
|
||||||
|
|
||||||
|
done <<< "$btrfs_filesystems"
|
||||||
|
|
||||||
|
# Calculate usage percentage
|
||||||
|
usage_percentage=$(awk -v used="$total_used" -v total="$total_size" 'BEGIN {printf "%.0f", (used/total)*100}')
|
||||||
|
|
||||||
|
# Set class based on usage
|
||||||
|
if [ "$usage_percentage" -gt 95 ]; then
|
||||||
|
class="max"
|
||||||
|
elif [ "$usage_percentage" -gt 80 ]; then
|
||||||
|
class="high"
|
||||||
|
else
|
||||||
|
class="normal"
|
||||||
|
fi
|
||||||
|
|
||||||
|
text="$(printf "%.0f" $total_used)G / $(printf "%.0f" $total_size)G"
|
||||||
|
|
||||||
|
# Manually construct the JSON output
|
||||||
|
echo "{\"text\": \"$text\", \"tooltip\": \"\", \"class\": \"$class\"}"
|
@@ -1,9 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
USAGE=$(mpstat 1 1 | awk '/Average:/ {print 100 - $12}')
|
USAGE=$(mpstat 1 1 | awk '/Average:/ {print 100 - $12}')
|
||||||
TEMP=$(cat /sys/class/hwmon/hwmon6/temp1_input)
|
TEMP=$(cat /sys/class/hwmon/hwmon3/temp1_input)
|
||||||
TEXT="$(printf "%.1f" $(echo "$USAGE"))% TEMP: $(printf "%.1f" $(echo "scale=2; $TEMP"/1000 | bc -l))C"
|
TEXT="$(printf "%.1f" $(echo "$USAGE"))% $(printf "%.1f" $(echo "scale=2; $TEMP"/1000 | bc -l))C"
|
||||||
CPU=$(lscpu | grep 'Model name' | awk -F': ' '{print $2}' | sed 's/^[ \t]*//')
|
CPU=$(lscpu | grep 'Model name' | awk -F': ' '{print $2}' | sed 's/^[ \t]*//')
|
||||||
TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk -v ncores=$(nproc) '{printf "%.1f%%\t%s\\n", $1/ncores, $2}')
|
# TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk '{output = output sprintf("%.1f%%\t%s\\n", $1, $2)} END {printf "%s", output}')
|
||||||
|
# TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk -v ncores=$(nproc) '{printf "%.1f%%\t%s\n", $1/ncores, $2}')
|
||||||
|
# TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk -v ncores=$(nproc) '{printf "%.1f%%\t%s\\n", $1/ncores, $2}')
|
||||||
|
# TOOLTIP=$(top -b -n 1 | sed '1,7d' | head -n 5 | awk '{output = output sprintf("%.1f%%\t%s\\n", $9, $12)} END {printf "%s", output}')
|
||||||
|
|
||||||
CLASS=""
|
CLASS=""
|
||||||
|
|
||||||
@@ -15,4 +18,5 @@ else
|
|||||||
CLASS="normal"
|
CLASS="normal"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "{\"text\":\"CPU: $TEXT\", \"tooltip\": \"$TOOLTIP\", \"class\":\"$CLASS\"}"
|
# echo "{\"text\":\"CPU: $TEXT\", \"tooltip\": \"$TOOLTIP\", \"class\":\"$CLASS\"}"
|
||||||
|
echo "{\"text\":\"CPU: $TEXT\", \"class\":\"$CLASS\"}"
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
SINKS=($(pactl list short sinks | awk '{print $2}'))
|
|
||||||
CURRENT_SINK=$(pactl info | grep 'Default Sink' | cut -d ' ' -f3)
|
|
||||||
NUM_SINKS=${#SINKS[@]}
|
|
||||||
|
|
||||||
for i in "${!SINKS[@]}"; do
|
|
||||||
if [[ "${SINKS[$i]}" == "$CURRENT_SINK" ]]; then
|
|
||||||
NEXT_INDEX=$(( (i + 1) % NUM_SINKS ))
|
|
||||||
pactl set-default-sink "${SINKS[$NEXT_INDEX]}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
31
waybar/scripts/disk_info.sh
Executable file
31
waybar/scripts/disk_info.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: $0 <mountpoint>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
MOUNTPOINT=$1
|
||||||
|
|
||||||
|
# Get disk usage info
|
||||||
|
USED=$(df -h --output=used "$MOUNTPOINT" | sed '1d' | awk '{print $1}')
|
||||||
|
TOTAL=$(df -h --output=size "$MOUNTPOINT" | sed '1d' | awk '{print $1}')
|
||||||
|
PERCENTAGE=$(df --output=pcent "$MOUNTPOINT" | sed '1d' | tr -d '%' | awk '{print $1}')
|
||||||
|
|
||||||
|
# Set class based on usage
|
||||||
|
CLASS="normal"
|
||||||
|
if [ "$PERCENTAGE" -gt 95 ]; then
|
||||||
|
CLASS="max"
|
||||||
|
elif [ "$PERCENTAGE" -gt 80 ]; then
|
||||||
|
CLASS="high"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create tooltip with more details
|
||||||
|
TOOLTIP=$(df -h "$MOUNTPOINT" | sed '1d' | awk '{printf "Used: %s\nTotal: %s\nFree: %s", $3, $2, $4}')
|
||||||
|
|
||||||
|
# Output JSON for Waybar using jq
|
||||||
|
jq -n -c \
|
||||||
|
--arg text "$1 $USED/$TOTAL" \
|
||||||
|
--arg tooltip "$TOOLTIP" \
|
||||||
|
--arg class "$CLASS" \
|
||||||
|
'{"text": $text, "tooltip": $tooltip, "class": $class}'
|
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
DEFAULT_SINK=$(pactl info | grep 'Default Sink' | cut -d ' ' -f3)
|
|
||||||
DESCRIPTION=$(pactl list sinks | grep -A2 "Name: $DEFAULT_SINK" | grep "Description:" | cut -d ' ' -f2-)
|
|
||||||
|
|
||||||
if [ -z "$DESCRIPTION" ]; then
|
|
||||||
DESCRIPTION=$DEFAULT_SINK
|
|
||||||
fi
|
|
||||||
|
|
||||||
TEXT=$(echo "$DESCRIPTION" | cut -c -20)
|
|
||||||
|
|
||||||
printf '{"text": "%s", "tooltip": "%s"}
|
|
||||||
' "$TEXT" "$DESCRIPTION"
|
|
@@ -6,7 +6,7 @@ EDGE_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp1_input)
|
|||||||
JUNC_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp2_input)
|
JUNC_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp2_input)
|
||||||
MEM_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp3_input)
|
MEM_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp3_input)
|
||||||
GPU=$(/opt/rocm/bin/rocm-smi --showproductname | grep "Card Series" | awk -F':' '{print $3}' | xargs)
|
GPU=$(/opt/rocm/bin/rocm-smi --showproductname | grep "Card Series" | awk -F':' '{print $3}' | xargs)
|
||||||
TEXT="$USAGE% $(printf "%.1f" $(echo "scale=2; $MEM_USED/1024/1024/1024" | bc -l))/$(printf "%.1f" $(echo "scale=2; $MEM_TOTAL/1024/1024/1024" | bc -l))GB TEMP: $(printf "%.1f" $(echo "scale=2; $EDGE_TEMP/1000" | bc -l))/$(printf "%.1f" $(echo "scale=2; $JUNC_TEMP/1000" | bc -l))/$(printf "%.1f" $(echo "scale=2; $MEM_TEMP/1000" | bc -l))C"
|
TEXT="$USAGE% $(printf "%.1f" $(echo "scale=2; $MEM_USED/1024/1024/1024" | bc -l))/$(printf "%.1f" $(echo "scale=2; $MEM_TOTAL/1024/1024/1024" | bc -l))GB $(printf "%.1f" $(echo "scale=2; $EDGE_TEMP/1000" | bc -l))/$(printf "%.1f" $(echo "scale=2; $MEM_TEMP/1000" | bc -l))C"
|
||||||
RATIO=$(echo "$MEM_USED/ $MEM_TOTAL" | bc -l)
|
RATIO=$(echo "$MEM_USED/ $MEM_TOTAL" | bc -l)
|
||||||
|
|
||||||
CLASS=""
|
CLASS=""
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
USAGE=$(cat /sys/class/drm/card1/device/gpu_busy_percent)
|
|
||||||
MEM_USED=$(cat /sys/class/drm/card1/device/mem_info_vram_used)
|
|
||||||
MEM_TOTAL=$(cat /sys/class/drm/card1/device/mem_info_vram_total)
|
|
||||||
GPU=$(/opt/rocm/bin/rocm-smi --showproductname | grep "Card Series" | awk -F':' '{print $3}' | xargs)
|
|
||||||
TEXT="$USAGE% $(printf "%.2f\n" $(echo "scale=2; $MEM_USED/1024/1024/1024" | bc -l))/$(echo "scale=2; $MEM_TOTAL/1024/1024/1024" | bc -l)GB"
|
|
||||||
RATIO=$(echo "$MEM_USED/ $MEM_TOTAL" | bc -l)
|
|
||||||
|
|
||||||
CLASS=""
|
|
||||||
|
|
||||||
if (( $(echo "$USAGE > 95" | bc -l) )); then
|
|
||||||
CLASS="max_usage"
|
|
||||||
elif (( $(echo "$USAGE > 75" | bc -l) )); then
|
|
||||||
CLASS="high_usage"
|
|
||||||
else
|
|
||||||
CLASS="normal_usage"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "{\"text\":\"GPU: $TEXT\", \"tooltip\": \"$GPU\", \"class\":\"$CLASS\"}"
|
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
TOOLTIP=$(ps -eo rss,comm --sort=-rss | head -n 6 | sed '1d' | awk '{output = output sprintf("%.2f GB\t%s\\n", $1/1024/1024, $2)} END {printf "%s", output}')
|
# TOOLTIP=$(ps -eo rss,comm --sort=-rss | head -n 6 | sed '1d' | awk '{output = output sprintf("%.2f GB\t%s\\n", $1/1024/1024, $2)} END {printf "%s", output}')
|
||||||
TOTAL=$(awk '/MemTotal/ {printf "%.2f\n", $2/1024/1024}' /proc/meminfo)
|
TOTAL=$(awk '/MemTotal/ {printf "%.2f\n", $2/1024/1024}' /proc/meminfo)
|
||||||
USED=$(awk '/MemTotal/ {total=$2} /MemAvailable/ {available=$2} END {printf "%.2f\n", (total-available)/1024/1024}' /proc/meminfo)
|
USED=$(awk '/MemTotal/ {total=$2} /MemAvailable/ {available=$2} END {printf "%.2f\n", (total-available)/1024/1024}' /proc/meminfo)
|
||||||
RATIO=$(echo "$USED/ $TOTAL" | bc -l)
|
RATIO=$(echo "$USED/ $TOTAL" | bc -l)
|
||||||
@@ -15,4 +15,5 @@ else
|
|||||||
CLASS="normal"
|
CLASS="normal"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '{"text": "MEM: %s/%sGB", "tooltip": "%s", "class": "%s"}' "$USED" "$TOTAL" "$TOOLTIP" "$CLASS"
|
# printf '{"text": "%s/%sGB", "tooltip": "%s", "class": "%s"}' "$USED" "$TOTAL" "$TOOLTIP" "$CLASS"
|
||||||
|
printf '{"text": "%s/%sGB", "class": "%s"}' "$USED" "$TOTAL" "$CLASS"
|
||||||
|
@@ -1,73 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# --- CONFIGURATION ---
|
|
||||||
# Your Pixel Buds Pro's MAC Address
|
|
||||||
MAC_ADDRESS="B4:23:A2:09:D3:53"
|
|
||||||
# --- END CONFIGURATION ---
|
|
||||||
|
|
||||||
# First, check if the device is connected using bluetoothctl.
|
|
||||||
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
|
|
||||||
# --- DEVICE IS CONNECTED ---
|
|
||||||
|
|
||||||
# This function gets the current ANC status and formats it for Waybar.
|
|
||||||
get_status() {
|
|
||||||
# Get the mode from pbpctrl. Redirect errors to null in case of a temporary glitch.
|
|
||||||
current_mode=$(pbpctrl get anc 2>/dev/null)
|
|
||||||
|
|
||||||
# Fallback: If pbpctrl fails or returns 'unknown', hide the module.
|
|
||||||
# This handles cases where buds are connected but not fully ready.
|
|
||||||
if [[ $? -ne 0 || "$current_mode" == "unknown (0)"* || -z "$current_mode" ]]; then
|
|
||||||
echo "{}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set icon and tooltip based on the current mode.
|
|
||||||
case "$current_mode" in
|
|
||||||
"active")
|
|
||||||
icon="ANC: Active"
|
|
||||||
class="anc-active"
|
|
||||||
;;
|
|
||||||
"aware")
|
|
||||||
icon="ANC: Aware"
|
|
||||||
class="anc-aware"
|
|
||||||
;;
|
|
||||||
"off")
|
|
||||||
icon="ANC: Off"
|
|
||||||
class="anc-off"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Failsafe to hide the module if the mode is unrecognized.
|
|
||||||
echo "{}"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
echo "{\"text\":\"$icon\", \"class\":\"$class\"}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Handle click actions passed from Waybar.
|
|
||||||
case "$1" in
|
|
||||||
# Right-click: Cycle between active and aware modes.
|
|
||||||
cycle)
|
|
||||||
current_mode=$(pbpctrl get anc 2>/dev/null)
|
|
||||||
if [[ "$current_mode" == "active" ]]; then
|
|
||||||
pbpctrl set anc aware
|
|
||||||
else
|
|
||||||
pbpctrl set anc active
|
|
||||||
fi
|
|
||||||
sleep 0.1 # Brief pause for the state to update.
|
|
||||||
;;
|
|
||||||
# Left-click: Turn ANC off.
|
|
||||||
off)
|
|
||||||
pbpctrl set anc off
|
|
||||||
sleep 0.1 # Brief pause for the state to update.
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Always display the current status after any action or on a scheduled interval.
|
|
||||||
get_status
|
|
||||||
|
|
||||||
else
|
|
||||||
# --- DEVICE IS NOT CONNECTED ---
|
|
||||||
# Output an empty JSON object to completely hide the Waybar module.
|
|
||||||
echo "{}"
|
|
||||||
fi
|
|
@@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# --- CONFIGURATION ---
|
|
||||||
# Your Pixel Buds Pro's MAC Address
|
|
||||||
MAC_ADDRESS="B4:23:A2:09:D3:53"
|
|
||||||
# --- END CONFIGURATION ---
|
|
||||||
|
|
||||||
# Check if the device is connected using bluetoothctl.
|
|
||||||
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
|
|
||||||
|
|
||||||
# If connected, get battery info from pbpctrl.
|
|
||||||
if battery_output=$(pbpctrl show battery); then
|
|
||||||
# Use awk to grab the third field, which is the percentage or "unknown".
|
|
||||||
left_bud=$(echo "$battery_output" | grep "left bud:" | awk '{print $3}')
|
|
||||||
right_bud=$(echo "$battery_output" | grep "right bud:" | awk '{print $3}')
|
|
||||||
|
|
||||||
# If both buds are unknown (e.g., case is closed and buds are out of range),
|
|
||||||
# or if the command output is empty, hide the module.
|
|
||||||
if ([[ "$left_bud" == "unknown" ]] && [[ "$right_bud" == "unknown" ]]) || \
|
|
||||||
[[ -z "$left_bud" && -z "$right_bud" ]]; then
|
|
||||||
echo "{}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare the display string for the left bud.
|
|
||||||
if [[ "$left_bud" == "unknown" ]]; then
|
|
||||||
left_display="L: ---"
|
|
||||||
else
|
|
||||||
left_display="L: $left_bud"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare the display string for the right bud.
|
|
||||||
if [[ "$right_bud" == "unknown" ]]; then
|
|
||||||
right_display="R: ---"
|
|
||||||
else
|
|
||||||
right_display="R: $right_bud"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Format the final output for Waybar as JSON.
|
|
||||||
printf '{"text": "%s | %s", "tooltip": "Pixel Buds Pro 2", "class": "connected"}\n' "$left_display" "$right_display"
|
|
||||||
|
|
||||||
else
|
|
||||||
# pbpctrl failed to run, so hide the module.
|
|
||||||
echo "{}"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Not connected, output an empty JSON object to hide the module.
|
|
||||||
echo "{}"
|
|
||||||
fi
|
|
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
wlogout -p layer-shell
|
|
@@ -21,9 +21,6 @@ window#waybar.hidden {
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces {
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
all: initial;
|
all: initial;
|
||||||
/* Remove GTK theme values (waybar #1351) */
|
/* Remove GTK theme values (waybar #1351) */
|
||||||
@@ -32,15 +29,15 @@ window#waybar.hidden {
|
|||||||
box-shadow: inset 0 -3px transparent;
|
box-shadow: inset 0 -3px transparent;
|
||||||
/* Use box-shadow instead of border so the text isn't offset */
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
padding: 6px 18px;
|
padding: 6px 18px;
|
||||||
margin: 6px 3px;
|
margin: 0px 3px;
|
||||||
border-radius: 4px;
|
border-radius: 10px;
|
||||||
background-color: @base;
|
background-color: @base;
|
||||||
color: @subtext0;
|
color: @subtext0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
color: @text;
|
color: @text;
|
||||||
border-bottom: 3px solid @teal;
|
border-bottom: 3px solid @blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:hover {
|
#workspaces button:hover {
|
||||||
@@ -68,12 +65,17 @@ window#waybar.hidden {
|
|||||||
#network,
|
#network,
|
||||||
#clock,
|
#clock,
|
||||||
#tray,
|
#tray,
|
||||||
|
#custom-disk-root,
|
||||||
|
#custom-disk-gdrive,
|
||||||
|
#custom-disk-games,
|
||||||
|
#custom-disk-data,
|
||||||
#custom-pixelbuds_pro,
|
#custom-pixelbuds_pro,
|
||||||
#custom-bluetooth-audio,
|
#custom-bluetooth-audio,
|
||||||
#custom-audio-output,
|
#custom-audio-output,
|
||||||
|
#custom-btrfs,
|
||||||
#custom-gpu-screen-recorder {
|
#custom-gpu-screen-recorder {
|
||||||
border-radius: 4px;
|
border-radius: 10px;
|
||||||
margin: 6px 3px;
|
margin: 0px 3px;
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
background-color: @base;
|
background-color: @base;
|
||||||
color: @text;
|
color: @text;
|
||||||
@@ -134,8 +136,8 @@ window#waybar.hidden {
|
|||||||
|
|
||||||
#custom-gpu-screen-recorder.recording,
|
#custom-gpu-screen-recorder.recording,
|
||||||
#custom-gamemode.active {
|
#custom-gamemode.active {
|
||||||
color: @teal;
|
color: @maroon;
|
||||||
border-bottom: 3px solid @teal;
|
border-bottom: 3px solid @maroon;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-tlp {
|
#custom-tlp {
|
||||||
@@ -144,8 +146,8 @@ window#waybar.hidden {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#custom-tlp.charging {
|
#custom-tlp.charging {
|
||||||
color: @teal;
|
color: @mauve;
|
||||||
border-bottom: 3px solid @teal;
|
border-bottom: 3px solid @mauve;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-tlp.bat {
|
#custom-tlp.bat {
|
||||||
@@ -178,25 +180,41 @@ window#waybar.hidden {
|
|||||||
|
|
||||||
#custom-gpu.max,
|
#custom-gpu.max,
|
||||||
#custom-cpu.max,
|
#custom-cpu.max,
|
||||||
#custom-mem.max {
|
#custom-mem.max,
|
||||||
|
#custom-btrfs.max,
|
||||||
|
#custom-disk-root.max,
|
||||||
|
#custom-disk-gdrive.max,
|
||||||
|
#custom-disk-games.max,
|
||||||
|
#custom-disk-data.max {
|
||||||
color: @maroon;
|
color: @maroon;
|
||||||
/* border-bottom: 3px solid @maroon; */
|
/* border-bottom: 3px solid @maroon; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-gpu.high,
|
#custom-gpu.high,
|
||||||
#custom-gpu.high,
|
#custom-gpu.high,
|
||||||
#custom-mem.high {
|
#custom-mem.high,
|
||||||
|
#custom-btrfs.high,
|
||||||
|
#custom-disk-root.high,
|
||||||
|
#custom-disk-gdrive.high,
|
||||||
|
#custom-disk-games.high,
|
||||||
|
#custom-disk-data.high {
|
||||||
color: @yellow;
|
color: @yellow;
|
||||||
/* border-bottom: 3px solid @yellow; */
|
/* border-bottom: 3px solid @yellow; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#memory,
|
#memory,
|
||||||
#cpu,
|
#cpu,
|
||||||
#network,
|
#disk,
|
||||||
|
#network,
|
||||||
#custom-gpu.normal,
|
#custom-gpu.normal,
|
||||||
#custom-cpu.normal,
|
#custom-cpu.normal,
|
||||||
#custom-mem.normal {
|
#custom-mem.normal,
|
||||||
color: @lavender;
|
#custom-btrfs.normal,
|
||||||
|
#custom-disk-root.normal,
|
||||||
|
#custom-disk-gdrive.normal,
|
||||||
|
#custom-disk-games.normal,
|
||||||
|
#custom-disk-data.normal {
|
||||||
|
color: @blue;
|
||||||
/* border-bottom: 3px solid @mauve; */
|
/* border-bottom: 3px solid @mauve; */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,14 +228,12 @@ window#waybar.hidden {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#custom-audio-output.unmuted, #wireplumber {
|
#custom-audio-output.unmuted, #wireplumber {
|
||||||
color: @maroon;
|
color: @mauve;
|
||||||
border-bottom: 3px solid @maroon;
|
border-bottom: 3px solid @mauve;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
color: @maroon;
|
color: @mauve;
|
||||||
}
|
}
|
||||||
|
|
||||||
#network {
|
#network {
|
||||||
@@ -225,7 +241,7 @@ window#waybar.hidden {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: @base;
|
background-color: @base;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user