mirror of
https://github.com/duma799/hyprduma-config.git
synced 2026-05-13 14:11:01 +00:00
Waybar is visible only on my main Monitor(tune for your setup), added power profiles script + icon, removed battery percentage.
This commit is contained in:
+14
-5
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": "HDMI-A-1",
|
||||
"reload_style_on_change": true,
|
||||
"modules-left": ["hyprland/workspaces"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["group/expand","pulseaudio","bluetooth","network","battery"],
|
||||
"modules-right": ["group/expand","pulseaudio","bluetooth","network","custom/power-profile","battery"],
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"format": "{name}",
|
||||
@@ -55,10 +56,10 @@
|
||||
"warning": 30,
|
||||
"critical": 20
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format": "{icon}",
|
||||
"format-charging": "",
|
||||
"format-plugged": "",
|
||||
"tooltip-format": "{capacity}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
@@ -68,6 +69,14 @@
|
||||
""
|
||||
]
|
||||
},
|
||||
"custom/power-profile": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"interval": 10,
|
||||
"exec": "~/hyprduma-config/waybar/scripts/power-profile.sh",
|
||||
"on-click": "~/hyprduma-config/waybar/scripts/power-profile.sh --cycle && pkill -RTMIN+8 waybar",
|
||||
"signal": 8
|
||||
},
|
||||
"custom/expand": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
get_profile() {
|
||||
profile=$(powerprofilesctl get)
|
||||
case $profile in
|
||||
"performance")
|
||||
icon=""
|
||||
;;
|
||||
"balanced")
|
||||
icon=""
|
||||
;;
|
||||
"power-saver")
|
||||
icon=""
|
||||
;;
|
||||
esac
|
||||
echo "{\"text\":\"$icon\",\"tooltip\":\"Power Profile: $profile\",\"class\":\"$profile\"}"
|
||||
}
|
||||
|
||||
cycle_profile() {
|
||||
current=$(powerprofilesctl get)
|
||||
case $current in
|
||||
"performance")
|
||||
powerprofilesctl set balanced
|
||||
;;
|
||||
"balanced")
|
||||
powerprofilesctl set power-saver
|
||||
;;
|
||||
"power-saver")
|
||||
powerprofilesctl set performance
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case $1 in
|
||||
"--cycle")
|
||||
cycle_profile
|
||||
;;
|
||||
*)
|
||||
get_profile
|
||||
;;
|
||||
esac
|
||||
+8
-4
@@ -33,7 +33,7 @@ tooltip {
|
||||
background:@background;
|
||||
color: @color7;
|
||||
}
|
||||
#pulseaudio:hover, #bluetooth:hover, #network:hover, #battery:hover, #cpu:hover, #memory:hover, #temperature:hover{
|
||||
#pulseaudio:hover, #bluetooth:hover, #network:hover, #custom-power-profile:hover, #battery:hover, #cpu:hover, #memory:hover, #temperature:hover{
|
||||
transition: all .3s ease;
|
||||
color:@color9;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ tooltip {
|
||||
text-shadow: 0px 0px 8px @color1, 0px 0px 15px @color1;
|
||||
}
|
||||
#bluetooth{
|
||||
padding: 0px 5px;
|
||||
padding: 0px 3px;
|
||||
transition: all .3s ease;
|
||||
color:@color7;
|
||||
|
||||
@@ -99,12 +99,16 @@ tooltip {
|
||||
#pulseaudio.muted{
|
||||
color: #f53c3c;
|
||||
}
|
||||
#custom-power-profile{
|
||||
padding: 0px 5px;
|
||||
transition: all .3s ease;
|
||||
color:@color7;
|
||||
|
||||
}
|
||||
#battery{
|
||||
padding: 0px 5px;
|
||||
transition: all .3s ease;
|
||||
color:@color7;
|
||||
font-family: "JetBrains Mono";
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
#battery.charging {
|
||||
|
||||
Reference in New Issue
Block a user