refactor(waybar): move modules to sep files

This commit is contained in:
Smirnov Oleksandr 2023-11-15 14:56:43 +02:00
parent c5b3d5be80
commit 993945b13e
3 changed files with 124 additions and 125 deletions

View file

@ -1,4 +1,3 @@
// vim: ft=jsonc
{ {
"position": "top", "position": "top",
"layer": "top", "layer": "top",
@ -7,14 +6,14 @@
"margin-bottom": 0, "margin-bottom": 0,
"margin-left": 0, "margin-left": 0,
"margin-right": 0, "margin-right": 0,
"modules-left": [
"hyprland/workspaces", "include": [
"hyprland/window" "~/.config/waybar/modules/hypr.json",
], "~/.config/waybar/modules/info.json"
"modules-center": [
"clock",
"cpu"
], ],
"modules-left": ["hyprland/workspaces", "hyprland/window"],
"modules-center": ["clock", "cpu"],
"modules-right": [ "modules-right": [
"memory", "memory",
"tray", "tray",
@ -23,107 +22,5 @@
"battery", "battery",
"pulseaudio", "pulseaudio",
"network" "network"
], ]
// modules
"clock": {
"format": " {:%a, %d %b %H:%M}",
"tooltip": "true",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"on-click": "morgen"
},
"hyprland/workspaces": {
"active-only": false,
"all-outputs": true,
"disable-scroll": false,
"on-scroll-up": "hyprctl dispatch workspace -1",
"on-scroll-down": "hyprctl dispatch workspace +1",
"format": "{icon}",
"on-click": "activate",
"sort-by-number": true,
"persistent_workspaces": { "*": 9 },
"format-icons": {
"urgent": "",
"default": "",
"1": "󰅨",
"2": "󰖟",
"3": "",
"4": "󰠮",
"5": "",
"6": "󰅨",
"7": "󰎄"
}
},
"hyprland/window": {
"max-length": "40"
},
"battery": {
"format":"{icon} {capacity}%",
"format-charging":"{icon} {capacity}%",
"format-plugged": "{capacity}% ",
"format-alt": "{icon} {time}",
"format-icons": ["", "", "", "", ""],
"tooltip": false,
"states": {
"good": 95,
"warning": 30,
"critical": 15
}
},
"memory": {
"format": "󰍛 {used}%",
"interval": 5
},
"cpu": {
"format": "󰻠 {usage}%",
"format-alt": "󰻠 {avg_frequency} GHz",
"interval": 5
},
"network": {
"format-wifi": "󰤨 {essid}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": "󰤭",
"format-alt": "󰤨 {ifname}: {ipaddr}/{cidr}",
"tooltip-format": "{essid}",
"on-click-right": "nm-connection-editor",
"tooltip": false
},
"tray": {
"icon-size": 16,
"spacing": 5
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"on-scroll-up": "brightnessctl set +10%",
"on-scroll-down": "brightnessctl set 10%-",
"tooltip": false
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "󰝟",
"format-icons": {
"default": ["󰕿", "󰖀", "󰕾"],
"headphone": ""
},
"on-click": "pavucontrol",
"tooltip": false,
"on-scroll-up": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+",
"on-scroll-down": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
},
"hyprland/language": {
"format": "󰌌 {}",
"format-uk": "укр",
"format-en": "eng"
}
} }

View file

@ -0,0 +1,34 @@
{
"hyprland/window": {
"max-length": "40"
},
"hyprland/workspaces": {
"active-only": false,
"all-outputs": true,
"disable-scroll": false,
"on-scroll-up": "hyprctl dispatch workspace -1",
"on-scroll-down": "hyprctl dispatch workspace +1",
"format": "{icon}",
"on-click": "activate",
"sort-by-number": true,
"persistent_workspaces": { "*": 9 },
"format-icons": {
"urgent": "",
"default": "",
"1": "󰅨",
"2": "󰖟",
"3": "",
"4": "󰠮",
"5": "",
"6": "󰅨",
"7": "󰎄"
}
},
"hyprland/language": {
"format": "󰌌 {}",
"format-uk": "укр",
"format-en": "eng"
}
}

View file

@ -0,0 +1,68 @@
{
"tray": {
"icon-size": 16,
"spacing": 10
},
"clock": {
"format": " {:%a, %d %b %H:%M}",
"tooltip": "true",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"on-click": "morgen"
},
"battery": {
"format": "{icon} {capacity}%",
"format-charging": "{icon} {capacity}%",
"format-plugged": "{capacity}% ",
"format-alt": "{icon} {time}",
"format-icons": ["", "", "", "", ""],
"tooltip": false,
"states": {
"good": 95,
"warning": 30,
"critical": 15
}
},
"memory": {
"format": "󰍛 {used}%",
"interval": 5
},
"cpu": {
"format": "󰻠 {usage}%",
"format-alt": "󰻠 {avg_frequency} GHz",
"interval": 5
},
"network": {
"format-wifi": "󰤨 {essid}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": "󰤭",
"format-alt": "󰤨 {ifname}: {ipaddr}/{cidr}",
"tooltip-format": "{essid}",
"on-click-right": "nm-connection-editor",
"tooltip": false
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"on-scroll-up": "brightnessctl set +10%",
"on-scroll-down": "brightnessctl set 10%-",
"tooltip": false
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "󰝟",
"format-icons": {
"default": ["󰕿", "󰖀", "󰕾"],
"headphone": ""
},
"on-click": "pavucontrol",
"tooltip": false,
"on-scroll-up": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+",
"on-scroll-down": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
}
}