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:
@ -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": {
|
||||||
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,3 +74,7 @@ window#waybar {
|
|||||||
color: #f53c3c;
|
color: #f53c3c;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
color: #ff2222;
|
||||||
|
}
|
||||||
|
3
home.nix
3
home.nix
@ -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
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user