waybar config is now aproximatively the same as polybar. ready set waybar's config file declaratively in nix-home. add playerctl

This commit is contained in:
2024-10-24 02:23:20 +02:00
parent 82575ce368
commit 39286050b6
3 changed files with 55 additions and 25 deletions

View File

@ -6,37 +6,29 @@
// Choose the order of the modules // Choose the order of the modules
"margin-left":5, "margin-left":5,
"margin-right":5, "margin-right":5,
"output":"eDP-1",
"modules-left": ["hyprland/workspaces", "custom/music"], "modules-left": ["hyprland/workspaces", "custom/music"],
"modules-center": ["hyprland/window"], "modules-center": ["hyprland/window"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "clock"], "modules-right": ["custom/fans", "custom/dgpu", "disk", "pulseaudio", "network", "cpu", "temperature", "custom/pipe", "memory", "battery", "clock"],
"hyprland/workspaces": { "hyprland/workspaces": {
"disable-scroll": true, "disable-scroll": true,
"all-outputs": false, "all-outputs": false,
"format": "{icon}", "format": "{id}"
"format-icons": {
"1:1": "1",
"2:2": "2",
"3:3": "3",
"4:4": "4",
"5:5": "5",
"6:6": "6",
}
}, },
"clock": { "clock": { "interval" : 1,
"interval" : 1, "format-alt": " {:%Y-%m-%d}",
"format-alt": "{:%Y-%m-%d}", "format" : " {:%H:%M:%S}"
"format" : "{:%H:%M:%S}"
}, },
"cpu": { "cpu": {
"format": "{usage}% |" "format": "{usage}% |",
"interval":5
}, },
"memory": { "memory": {
"format": "{}% |" "format": "{}% |",
"interval":5
}, },
"battery": { "battery": {
@ -47,7 +39,7 @@
"critical": 15 "critical": 15
}, },
"format-time": " {H}:{m}", "format-time": " {H}:{m}",
"format": "{icon}{capacity}%{time}|", "format": " {icon} {capacity}%{time} |",
// "format-good": "", // An empty format will hide the module // "format-good": "", // An empty format will hide the module
// "format-full": "", // "format-full": "",
"format-icons": [" ", " ", " ", " ", " "], "format-icons": [" ", " ", " ", " ", " "],
@ -55,14 +47,15 @@
}, },
"network": { "network": {
// "interface": "wlp2s0", // (Optional) To force the use of this interface // "interface": "wlp2s0", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%)  |", "format-wifi": " {icon} {essid} |",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} |", "format-ethernet": "{ifname}: {ipaddr}/{cidr} |",
"format-disconnected": "Disconnected |" "format-disconnected": "Disconnected |",
"format-icons":["󰤟 ", "󰤢 ", "󰤥 ", "󰤨 "]
}, },
"pulseaudio": { "pulseaudio": {
//"scroll-step": 1, //"scroll-step": 1,
"format": "{volume}% {icon}|", "format": " {icon}{volume}% |",
"format-bluetooth": "{volume}% {icon}|", "format-bluetooth": "  {icon} {volume}% |",
"format-muted": "", "format-muted": "",
"format-icons": { "format-icons": {
"headphones": " ", "headphones": " ",
@ -71,8 +64,40 @@
"phone": " ", "phone": " ",
"portable": " ", "portable": " ",
"car": " ", "car": " ",
"default": [" ", " "] "default": [" ", " ", " "]
}, },
"on-click": "pavucontrol" "on-click": "pavucontrol"
}, },
"temperature":{
"thermal-zone":0,
"critical-threshold":80,
"interval":5,
"format":" {icon} {temperatureC}°C ",
"format-icons": ["", "", "", "", ""]
},
"disk":{
"format":" 󰋊 {percentage_used}% |"
},
"custom/pipe":{
"format":"|"
},
"custom/music":{
"exec-if" : "playerctl metadata 2>&1 >/dev/null",
"exec" : "playerctl metadata --format ' {{ artist }} - {{title}}'",
"interval" : 1,
"interval-if" : 5
},
"custom/dgpu":{
"exec-if" : "test \"$(supergfxctl -g)\" = \"Hybrid\"",
"exec" : "echo \"  on |\"",
"interval-if" : 10,
"interval":100
},
"custom/fans":{
"exec-if" : "test \"$(cat /sys/class/hwmon/hwmon6/fan1_input)\" -gt 0 -o \"$(cat /sys/class/hwmon/hwmon6/fan2_input)\" -gt 0",
"exec" : "echo \" \" \"$(cat /sys/class/hwmon/hwmon6/fan1_input).$(cat /sys/class/hwmon/hwmon6/fan2_input) |\"",
"interval" : 1,
"interval-if" : 1
}
} }

View File

@ -74,3 +74,7 @@ window#waybar {
color: #f53c3c; color: #f53c3c;
font-weight:bold; font-weight:bold;
} }
#temperature.critical {
color: #ff2222;
}

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ # # By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# # # Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
# Updated: 2024/10/24 01:22:24 by tomoron ### ########.fr # # Updated: 2024/10/24 02:09:16 by tomoron ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
@ -43,6 +43,7 @@
wofi wofi
waybar waybar
brightnessctl brightnessctl
playerctl
swaybg swaybg
]; ];