waybar: add gpumode module

This commit is contained in:
krolxon 2025-08-06 21:34:11 +05:30
parent 221967f368
commit f835448ed5
3 changed files with 32 additions and 26 deletions

View File

@ -14,6 +14,7 @@
"hyprland/window"
],
"modules-right": [
"custom/gpumode",
"tray",
"pulseaudio",
"battery",
@ -80,6 +81,11 @@
"interval": 1,
"tooltip": false
},
"custom/gpumode": {
"exec": "~/.config/waybar/scripts/gpu_mode.sh",
"format": "{}",
"interval": "once",
},
"cpu": {
"format": " {usage:2}%",
"interval": 1,

View File

@ -0,0 +1,19 @@
#!/bin/bash
mode=$(envycontrol -q | awk '{print $NF}')
case "$mode" in
integrated)
icon=""
;;
hybrid)
icon=""
;;
nvidia)
icon=""
;;
*)
icon=""
;;
esac
echo "$icon $mode"

View File

@ -4,7 +4,6 @@
* Maintainer: rubyowo
*
*/
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@ -36,18 +35,8 @@
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;
/* * { */
/* `otf-font-awesome` is required to be installed for icons */
/* font-family: JetBrains Mono Nerd Font, FontAwesome; */
/* font-size: 13px; */
/* font-weight: bold; */
/* } */
* {
font-family: "JetBrainsMono Nerd Font";
font-family: "JetBrainsMono Nerd Font", "FontAwesome";
font-weight: bold;
min-height: 0;
/* set font-size to 100% if font scaling is set to 1.00 using nwg-look */
@ -56,15 +45,6 @@ font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"';
padding: 0.03125rem;
}
/* window#waybar { */
/* background-color: rgba(0, 0, 0, 0); */
/* color: #e3e3e3; */
/* transition-property: background-color; */
/* transition-duration: .5s; */
/* border: none; */
/* border-radius: 0; */
/* } */
window#waybar {
transition-property: background-color;
transition-duration: 0.5s;
@ -101,7 +81,7 @@ window#waybar.hidden {
border: none;
border-radius: 0;
color: #d8dee9;
color: @text;
transition: all 0.2s ease;
text-shadow: none;
@ -126,7 +106,7 @@ window#waybar.hidden {
#workspaces button:hover {
transition-duration: .2s;
color: @base;
box-shadow: inset 0 -3px #e3e3e3;
box-shadow: inherit;
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
text-shadow: inherit;
}
@ -164,6 +144,7 @@ window#waybar.hidden {
#clock,
#custom-date,
#custom-gpumode,
#battery,
#backlight,
#cpu,
@ -196,7 +177,7 @@ window#waybar.hidden {
}
#window {
color: #e3e3e3
color: @text
}
#clock {
@ -261,7 +242,7 @@ label:focus {
}
#pulseaudio {
color: #d8dee9;
color: @text;
}
@ -274,7 +255,7 @@ label:focus {
}
#tray {
color: #eceff4;
color: @subtext0;
}