Files
.dotfiles/dotfiles/config/waybar/config.jsonc
2023-07-12 15:41:39 +08:00

188 lines
5.1 KiB
JSON

{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 50,
"modules-left": [
"custom/launch_wofi",
"wlr/workspaces",
"hyprland/window"
],
"modules-center": [
"idle_inhibitor",
"custom/lock_screen",
"custom/power_btn",
"custom/updates",
"clock",
"wlr/taskbar"
],
"modules-right": [
"custom/weather",
"cpu",
"memory",
"disk",
"temperature",
"battery",
"backlight",
"pulseaudio",
"pulseaudio#microphone",
"tray",
"custom/light_dark"
],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰛐",
"deactivated": "󰛑"
},
"tooltip": true
},
"hyprland/window": {
"format": "{}"
},
"custom/launch_wofi": {
"format": "󱗼",
"on-click": "sh -c '(sleep 0.5s; pkill wofi || wofi -c ~/.config/wofi/config-lmenu)' & disown",
"tooltip": false
},
"custom/lock_screen": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; swaylock)' & disown",
"tooltip": false
},
"custom/light_dark": {
"format": "󰐾",
"on-click": "~/.config/waybar/scripts/baraction light",
"tooltip": false
},
"custom/power_btn": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown",
"tooltip": false
},
"cpu": {
"interval": 10,
"format": " {usage}%",
"max-length": 10,
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
},
"disk": {
"interval": 30,
"format": "󰋊 {percentage_used}%",
"path": "/",
"tooltip": true,
"tooltip-format": "HDD - {used} used out of {total} on {path} ({percentage_used}%)",
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
},
"memory": {
"interval": 30,
"format": " {}%",
"max-length": 10,
"tooltip": true,
"tooltip-format": "Memory - {used:0.1f}GB used",
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
},
"custom/updates": {
"format": "{}",
"exec": "~/.config/waybar/scripts/update-sys",
"on-click": "~/.config/waybar/scripts/update-sys update",
"interval": 300,
"tooltip": true
},
"wlr/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"on-click": "activate",
"persistent_workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": [],
"7": [],
"8": [],
"9": [],
"10": []
}
},
"tray": {
"icon-size": 18,
"spacing": 10
},
"pulseaudio": {
"format": "{icon}",
"format-muted": "",
"on-click": "~/.config/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/waybar/scripts/volume --dec",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"tooltip": true,
"tooltip-format": "{icon} at {volume}%"
},
"pulseaudio#microphone": {
"format": "{format_source}",
"format-source": "",
"format-source-muted": "",
"on-click": "~/.config/waybar/scripts/volume --toggle-mic",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/waybar/scripts/volume --mic-inc",
"on-scroll-down": "~/.config/waybar/scripts/volume --mic-dec",
"scroll-step": 5,
"tooltip": true,
"tooltip-format": " at {volume}%"
},
"clock": {
"format": "{:%H:%M}",
"tooltip-format": "{: %A, %e %B %Y}"
},
"custom/weather": {
//shows the current weather and forecast
"tooltip" : true,
"format" : "{}",
"interval" : 30,
"exec" : "~/.config/waybar/scripts/waybar-wttr.py",
"return-type" : "json"
},
"temperature": {
"thermal-zone": 1,
"format": "",
"format-alt-click": "click-right",
"format-alt": " {temperatureC}°C",
"critical-threshold": 70,
"format-critical": " {temperatureC}°C",
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 24,
"all-outputs": true,
"tooltip-format": "{name} - {title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"wofi"
],
"app_ids-mapping": {
"steam_app_39210": "Final Fantasy 14"
}
}
}