dotfiles/pkgs/waybar/config-sway.jsonc
2024-06-08 00:27:59 +03:00

160 lines
4.5 KiB
Plaintext

{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 20,
"modules-left": [
"custom/power_btn",
"custom/launch_apps",
"idle_inhibitor",
"sway/workspaces",
"sway/mode"
],
"modules-center": [
"clock"
],
"modules-right": [
"custom/updates",
"cpu",
"pulseaudio",
"pulseaudio#microphone",
"backlight",
"tray",
"temperature",
"custom/power_profile",
"battery",
"sway/language",
"custom/weather"
],
"include": [
"~/.config/HyprV/waybar/conf/mesu.jsonc",
// "~/.config/HyprV/waybar/conf/asus-rog.jsonc",
"~/.config/HyprV/waybar/conf/hyprv-util.jsonc"
],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰛐",
"deactivated": "󰛑"
},
"tooltip": true
},
"custom/launch_apps": {
"format": "󱗼 ",
"on-click": "sh -c '(sleep 0.5s; pkill nwg-drawer || nwg-drawer -term wezterm)' & disown",
"tooltip": false
},
"sway/language": {
"interval": 30,
"format": "<span font-family=\"Twitter Color Emoji\"> {}</span>",
"format-en": "🇬🇧",
"format-ru": "🇷🇺",
"on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next",
"signal": 8
},
"custom/power_btn": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown",
"tooltip": false
},
"custom/lock_screen": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; swaylock)' & disown",
"tooltip": false
},
"cpu": {
"interval": 10,
"format": "",
"max-length": 10,
"format-alt-click": "click-right",
"format-alt": " {usage}%",
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
},
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 20
},
"format": "{icon}",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt-click": "click-right",
"format-alt": "{icon} {capacity}%",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
"pulseaudio": {
"format": "{icon}",
"format-muted": "",
"on-click": "~/.config/HyprV/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/HyprV/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/volume --dec",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"format-alt-click": "click-middle",
"format-alt": "{icon} {volume}%",
"tooltip": true,
"tooltip-format": "{icon} {volume}%"
},
"pulseaudio#microphone": {
"format": "{format_source}",
"format-source": "",
"format-source-muted": "",
"on-click": "~/.config/HyprV/waybar/scripts/volume --toggle-mic",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/HyprV/waybar/scripts/volume --mic-inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/volume --mic-dec",
"scroll-step": 5,
"format-alt-click": "click-middle",
"format-alt": " {volume}%",
"tooltip": true,
"tooltip-format": " {volume}%"
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-alt-click": "click-right",
"format-alt": "{icon} {percent}%",
"format-icons": ["󰃞", "󰃟", "󰃠"],
"on-scroll-up": "~/.config/HyprV/waybar/scripts/brightness --inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/brightness --dec"
},
"tray": {
"icon-size": 16,
"spacing": 10
},
"custom/updates": {
"format": "{}",
"exec": "~/.config/HyprV/waybar/scripts/update-sys",
"on-click": "~/.config/HyprV/waybar/scripts/update-sys update",
"interval": 300,
"tooltip": true
}
}