Enhanced waybar

Switched back from tlp to asusd
This commit is contained in:
GaspardCulis 2023-10-19 13:32:23 +02:00
parent 4f545de7ef
commit 234db0eb0d
3 changed files with 149 additions and 89 deletions

View file

@ -6,17 +6,18 @@
"passthrough": false,
"gtk-layer-shell": true,
"height": 50,
"modules-left": ["clock","custom/weather","wlr/workspaces"],
"modules-left": ["clock","custom/weather","hyprland/workspaces"],
"modules-center": ["hyprland/window"],
"modules-right": ["network", "bluetooth", "temperature","custom/power_profile","battery","pulseaudio","pulseaudio#microphone","tray"],
"modules-right": ["network", "bluetooth", "memory", "cpu", "temperature","custom/power_profile","battery","pulseaudio","pulseaudio#microphone","tray"],
"hyprland/window": {
"format": "{}"
},
"wlr/workspaces": {
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"on-click": "activate",
/*
"persistent_workspaces": {
"1": [],
"2": [],
@ -28,13 +29,15 @@
"8": [],
"9": [],
"10": []
}
}*/
},
"custom/power_profile":{
//shows the current power profile and switches to next on click
"exec": "asusctl profile -p | sed s:'Active profile is'::",
"exec": "~/.config/waybar/scripts/powerprofile.sh",
"return-type": "json",
"interval": 30,
"tooltip": false,
"format": "󰈐 {}",
"on-click": "asusctl profile -n; pkill -SIGRTMIN+8 waybar",
"signal": 8
@ -107,14 +110,16 @@
"on-click": "pamixer --default-source -t",
"on-scroll-up": "pamixer --default-source -i 5",
"on-scroll-down": "pamixer --default-source -d 5",
"scroll-step": 5
"scroll-step": 5,
"tooltip": false
},
"temperature": {
"thermal-zone": 0,
"critical-threshold": 80,
"format": "{temperatureC}°C ",
"format-critical": "{temperatureC}°C "
"format-critical": "{temperatureC}°C ",
"tooltip": false
},
"network": {
@ -127,6 +132,26 @@
"format-alt": "{ifname}:{essid} {ipaddr}/{cidr}"
},
"cpu": {
"interval": 1,
"format": "󰻠 {usage:>2}%",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
"states": {
"critical": 90,
"warning": 50
},
},
"memory": {
"interval": 1,
"format": "󰍛 {used:0.1f}G/{total:0.1f}G",
"states": {
"critical": 90,
"warning": 50
},
"tooltip": false
},
"bluetooth": {
"format": " {status}",
"format-disabled": "", // an empty format will hide the module

View file

@ -0,0 +1,3 @@
#!/bin/bash
profile=$(asusctl profile -p | sed s:'Active profile is '::)
echo "{\"text\": \"$profile\", \"class\": \"$profile\"}"

View file

@ -28,24 +28,19 @@ tooltip {
#workspaces button.active {
color: #a6adc8;
}
#workspaces button.focused {
color: #a6adc8;
background: #eba0ac;
background: #3F84E5;
border-radius: 10px;
}
#workspaces button.urgent {
color: #11111b;
background: #a6e3a1;
background: #FC6471;
border-radius: 10px;
}
#workspaces button:hover {
background: #11111b;
#workspaces button:hover:not(.active) {
background: #1e1e2e;
color: #cdd6f4;
border-radius: 10px;
}
#custom-power_profile,
@ -59,6 +54,8 @@ tooltip {
#temperature,
#workspaces,
#tray,
#memory,
#cpu,
#backlight {
background: #1e1e2e;
opacity: 0.8;
@ -68,12 +65,39 @@ tooltip {
border: 1px solid #181825;
}
#temperature {
#memory {
border-radius: 10px 0px 0px 10px;
border-right: 0px;
}
#memory.warning {
color: #EDAE49;
}
#memory.critical {
color: #FC6471;
}
#cpu {
border-left: 0px;
border-right: 0px;
}
#cpu.warning {
color: #EDAE49;
}
#cpu.critical {
color: #FC6471;
}
#temperature {
border-left: 0px;
border-right: 0px;
}
#temperature.critical {
color: #eba0ac;
color: #FC6471;
}
#backlight {
@ -99,6 +123,14 @@ tooltip {
border-right: 0px;
}
#custom-power_profile.Performance {
color: #FC6471;
}
#custom-power_profile.Balanced {
color: #EDAE49;
}
#window {
border-radius: 10px;
margin-left: 60px;
@ -129,6 +161,7 @@ tooltip {
color: #89b4fa;
border-left: 0px;
border-right: 0px;
border-radius: 10px 0px 0px 10px;
}
#pulseaudio.microphone {
@ -148,7 +181,6 @@ tooltip {
#custom-weather {
border-radius: 0px 10px 10px 0px;
border-right: 0px;
border-left: 0px;
margin-left: 0px;
}