dotfiles/eggs/waybar/bar/config.jsonc
2025-05-19 16:47:38 +02:00

403 lines
13 KiB
JSON
Executable File

{
// Used pkill -SIGRTMIN+n
// n=10: update notification status
// n=11: change whether info
"layer": "top",
"position": "right",
"margin-left": 5,
"spacing": 0,
"output": "DP-2",
"width": 64,
"modules-left": ["group/power", "hyprland/workspaces", "custom/specialWs", "group/activeApp"],
"modules-center": ["clock", "custom/weather#n1", "custom/weather#n2"],
"modules-right": ["privacy", "systemd-failed-units", "hyprland/submap",
"cpu#avrage", "temperature", "memory", "disk",
"group/sysBehavior", "group/player", "group/audio", "group/net", "group/systray"],
"custom/apps": {
"format": "{icon}",
"format-icons": "  ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "nwg-drawer -ovl -wm hyprland &"
},
"custom/lock": {
"format": "{icon}",
"format-icons": "󰌾 ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "bash ~/.local/share/until-scripts/sleep.sh"
},
"custom/suspend": {
"format": "{icon}",
"format-icons": "󰒲 ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "bash ~/.local/share/until-scripts/sleep.sh suspend"
},
"custom/hibernate": {
"format": "{icon}",
"format-icons": "󰥠 ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "bash ~/.local/share/until-scripts/sleep.sh hibernate"
},
"custom/logout": {
"format": "{icon}",
"format-icons": "󰗽 ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "hyprctl dispatch exit"
},
"custom/restart": {
"format": "{icon}",
"format-icons": "󰜉 ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "systemctl reboot"
},
"custom/poweroff": {
"format": "{icon}",
"format-icons": " ",
"exec-on-event": "true",
"tooltip": false,
"on-click": "systemctl poweroff",
},
"group/power": {
"orientation": "vertical",
"modules": ["custom/apps", "custom/lock", "custom/logout", "custom/suspend", "custom/hibernate", "custom/restart", "custom/poweroff"],
"drawer": {
"transition-duration": 500,
"children-class": "player",
"transition-left-to-right": true,
}
},
"hyprland/workspaces": {
"persistent-workspaces": {
"*": 8,
},
"on-click": "rofi -show run",
"format": "{icon}",
},
"custom/specialWs": {
"format": "S",
"exec-on-event": "true",
"on-click": "hyprctl dispatch togglespecialworkspace scratchpad"
},
"group/activeApp": {
"orientation": "vertical",
"modules": ["hyprland/window", "custom/activeWindowCloseWindow", "custom/activeWindowMaximize", "custom/activeWindowFloating"],
"drawer": {
"transition-duration": 500,
"children-class": "player",
"transition-left-to-right": true,
}
},
"hyprland/window": {
"tooltip-format": "{title}\n{class}",
"icon": true,
"icon-size": 35,
"format": "󱃼{}",
"rewrite": {
"(.*)" : "",
},
"justify": "center",
},
"custom/activeWindowCloseWindow": {
"format": "{icon}",
"format-icons": "",
"exec-on-event": "true",
"justify": "center",
"tooltip": false,
"on-click": "hyprctl dispatch killactive",
},
"custom/activeWindowMaximize": {
"format": "{icon}",
"format-icons": "",
"justify": "center",
"exec-on-event": "true",
"tooltip": false,
"on-click": "hyprctl dispatch fullscreen 1",
},
"custom/activeWindowFloating": {
"format": "{icon}",
"format-icons": "",
"justify": "center",
"exec-on-event": "true",
"tooltip": false,
"on-click": "hyprctl dispatch togglefloating",
},
"clock": {
"format": " \n<big>{:%H:%M}</big>",
"format-alt": "󰃭\n<big>{:%m.%d}</big>",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"justify": "center",
"calendar": {
"mode" : "year",
"mode-mon-col" : 2,
"weeks-pos" : "left",
"on-scroll" : 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
"custom/weather#n1": {
"exec": "~/.config/waybar/bar/scripts/weather_waper.sh get icon rain,wind moon humidity,pressure",
"on-click": "~/.config/waybar/bar/scripts/weather_waper.sh toggle",
// For somereason I need to call this program to makt it work wtf?
"on-click-right": "~/.config/waybar/bar/scripts/launch_detailed_weather.sh",
"signal": 11,
"interval": 300,
"max-length": 6,
"return-type": "json",
"format": "{}"
},
"custom/weather#n2": {
"exec": "~/.config/waybar/bar/scripts/weather_waper.sh get temp rain,wind uv humidity,pressure",
"on-click": "~/.config/waybar/bar/scripts/weather_waper.sh toggle ",
"on-click-right": "~/.config/waybar/bar/scripts/launch_detailed_weather.sh",
"signal": 11,
"interval": 301,
"max-length": 6,
"return-type": "json",
"format": "{}"
},
"privacy": {
"icon-spacing": 4,
"icon-size": 20,
"justify": "center",
"transition-duration": 500,
},
"systemd-failed-units": {
"hide-on-ok": true, // Do not hide if there is zero failed units.
"format": "✗ {nr_failed}",
"system": true, // Monitor failed systemwide units.
"user": true // Ignore failed user units.
},
"hyprland/submap": {
"format": "<b>{}</b>",
"max-length": 1,
"tooltip": true,
"tooltip-format": "Submap: {}",
"justify": "center",
"on-click": "hyprctl dispatch submap reset",
},
"cpu#avrage": {
"interval": 2,
"format": " {usage}%",
"tooltip": true,
"tooltip-format": "Load: {load}\n~Freq: {avg_frequency}",
},
"temperature": {
"interval": 2,
"critical-threshold": 90,
"format-critical": "<span foreground='#e78284'> {temperatureC}°C</span>",
"format": " {temperatureC}°C",
"tooltip-format": "CPU Temp: {temperatureC}",
"format-icons": ["", "", ""]
},
"memory": {
"interval": 20,
"format": " {percentage}%",
"on-click": "htop",
"tooltip-format": "Mem: {used:0.1f}G/{total:0.1f}G \nSwp: {swapUsed:0.1f}G/{swapTotal:0.1f}G ",
},
"disk": {
"interval": 15,
"format": "󰋊 {specific_used:3.0f}GB",
"unit": "GB"
},
"custom/idleWatch": {
"format": "{}",
"exec-on-event": true,
"tooltip": false,
"signal": 12,
"exec": "if systemctl --user is-active hypridle.service > /dev/null; then echo '󰒲'; else echo '󰒳'; fi",
"on-click": "if systemctl --user is-active hypridle.service; then systemctl --user stop hypridle.service; else systemctl --user start hypridle.service; fi; pkill -SIGRTMIN+12 waybar",
},
"custom/notification": {
"format": "{}",
// With pkill -SIGRTMIN+10 waybar used as workaround
// for buged exec-on-event
"interval": "once",
"signal": 10,
"exec-on-event": false,
"return-type": "json",
"tooltip": false,
"exec": "bash ~/.config/waybar/bar/scripts/notification_status.sh | jq --unbuffered --compact-output",
"on-click": "bash ~/.local/share/until-scripts/notification_history.sh mute; pkill -SIGRTMIN+10 waybar",
"on-click-right": "bash ~/.local/share/until-scripts/notification_history.sh show",
"on-click-middle": "bash ~/.local/share/until-scripts/notification_history.sh remove"
},
"group/sysBehavior": {
"orientation": "vertical",
"modules": ["custom/notification", "custom/idleWatch"],
"drawer": {
"transition-duration": 500,
"children-class": "sysBehavior",
"transition-left-to-right": false,
}
},
"group/player": {
"orientation": "vertical",
"modules": ["mpris#status", "image#album-art", "mpris#title"],
"drawer": {
"transition-duration": 500,
"children-class": "player",
"transition-left-to-right": false,
}
},
"image#album-art": {
"exec":"bash ~/.config/waybar/bar/scripts/album_art.sh",
"on-click": "qimgv $(bash ~/.config/waybar/bar/scripts/album_art.sh) &",
"size": 71,
"interval": 5
},
"mpris#status": {
"format": "{status_icon}",
"tooltip": "{player} {status}",
"status-icons": {
"paused": "",
"playing": "",
"stopped": "󰓛"
// onclick: using defaults
},
},
"mpris#title": {
"rotate": 270,
"format": "{title}",
"title-len": 16,
"format-stopped": "",
"tooltip-format": "{artist} - {title}\n"
// onclick: using defaults
},
"group/audio": {
"orientation": "vertical",
"modules": ["pulseaudio", "pulseaudio/slider"],
"drawer": {
"transition-duration": 500,
"children-class": "audio",
"transition-left-to-right": false,
}
},
"pulseaudio/slider": {
"min": 0,
"max": 150,
"orientation": "vertical"
},
"pulseaudio": {
"justify": "center",
"format": "{icon} \n{volume}%",
"format-bluetooth": "{icon} \nvolume}% ",
"format-bluetooth-muted": "󰖁 \n{icon} 󰂯",
"format-muted": "󰖁 \n{format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "󰋋",
"hands-free": "󱡒",
"headset": "󰋎",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "hyprctl dispatch exec '[float] bash ~/.local/share/until-scripts/kill-on-unfocus.sh pwvucontrol'",
"on-click-middle": ""
},
"group/net": {
"orientation": "vertical",
"modules": ["network#total", "network#addr", "network#up", "network#down" ],
"drawer": {
"transition-duration": 500,
"children-class": "audio",
"transition-left-to-right": false,
}
},
"network#addr": {
"on-click": "nm-connection-editor &",
"rotate": 270,
"format-wifi": " {ipaddr}",
"format-ethernet": "󰈀 {ipaddr}/{cidr}",
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
"tooltip-format": "{ifname} via {gwaddr}",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"network#up": {
"format": "󰕒 \n{bandwidthUpBits}",
"justify": "center",
"on-click": "kitty --class 'bar_popup' --title 'Connection Editor' nmtui-edit;exit",
"tooltip": false
},
"network#down":{
"format": "󰇚 \n{bandwidthDownBits}",
"justify": "center",
"on-click": "kitty --class 'bar_popup' --title 'Connection Editor' nmtui-edit;exit",
"tooltip": false
},
"network#total": {
"format": " \n{bandwidthTotalBits}",
"justify": "center",
"on-click": "bash ~/.local/share/until-scripts/kill-on-unfocus.sh kitty --class 'bar_popup' --title 'Connection Editor' sh -c 'nmtui-connect;exit'",
"tooltip": false
},
"group/systray": {
"orientation": "vertical",
"modules": ["custom/systrayDrawer", "tray"],
"drawer": {
"transition-duration": 500,
"children-class": "audio",
"transition-left-to-right": false,
}
},
"custom/systrayDrawer": {
"format": "󰋽",
"tooltip": false
},
"tray": {
"icon-size": 18,
"spacing": 5,
"show-passive-items": true,
},
}