[Asahi] Rice waybar.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
92a54e297e
commit
7bbbe5c1e7
1 changed files with 174 additions and 120 deletions
|
|
@ -4,39 +4,152 @@
|
||||||
"waybar"
|
"waybar"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
home.file.".config/waybar/style.css" = {
|
||||||
|
text = ''
|
||||||
|
* {
|
||||||
|
font-family: "CaskaydiaCove Nerd Font", "Font Awesome 6 Free", "Font Awesome 6 Free Solid";
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #dcdfe1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#waybar {
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces,
|
||||||
|
#window,
|
||||||
|
#tray{
|
||||||
|
/*background-color: rgba(29,31,46, 0.95);*/
|
||||||
|
background-color: rgba(15,27,53,0.9);
|
||||||
|
padding: 4px 6px;
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-left: 6px;
|
||||||
|
margin-right: 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#custom-power{
|
||||||
|
background-color: rgba(15,27,53,0.9);
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-right: 6px;
|
||||||
|
/*margin-bottom: 4px;*/
|
||||||
|
padding: 4px 2px;
|
||||||
|
border-radius: 0 10px 10px 0;
|
||||||
|
border-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor,
|
||||||
|
#custom-lock{
|
||||||
|
background-color: rgba(15,27,53,0.9);
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-left: 6px;
|
||||||
|
/*margin-bottom: 4px;*/
|
||||||
|
padding: 4px 2px;
|
||||||
|
border-radius: 10px 0 0 10px;
|
||||||
|
border-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-reboot,
|
||||||
|
#bluetooth,
|
||||||
|
#battery,
|
||||||
|
#wireplumber,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#custom-temperature,
|
||||||
|
#memory,
|
||||||
|
#cpu{
|
||||||
|
background-color: rgba(15,27,53,0.9);
|
||||||
|
margin-top: 6px;
|
||||||
|
/*margin-bottom: 4px;*/
|
||||||
|
padding: 4px 2px;
|
||||||
|
border-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custpm-temperature.critical,
|
||||||
|
#pulseaudio.muted {
|
||||||
|
color: #FF0000;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bluetooth:hover,
|
||||||
|
#network:hover,
|
||||||
|
/*#tray:hover,*/
|
||||||
|
#backlight:hover,
|
||||||
|
#battery:hover,
|
||||||
|
#pulseaudio:hover,
|
||||||
|
#custom-temperature:hover,
|
||||||
|
#memory:hover,
|
||||||
|
#cpu:hover,
|
||||||
|
#clock:hover,
|
||||||
|
#custom-lock:hover,
|
||||||
|
#custom-reboot:hover,
|
||||||
|
#custom-power:hover,
|
||||||
|
/*#workspaces:hover,*/
|
||||||
|
#window:hover {
|
||||||
|
background-color: rgba(70, 75, 90, 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover{
|
||||||
|
background-color: rgba(97, 175, 239, 0.2);
|
||||||
|
padding: 2px 8px;
|
||||||
|
margin: 0 2px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
background-color: #61afef; /* 蓝色高亮 */
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 2px 8px;
|
||||||
|
margin: 0 2px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
color: #888888;
|
||||||
|
padding: 2px 8px;
|
||||||
|
margin: 0 2px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = [
|
settings = [
|
||||||
{
|
{
|
||||||
# "layer": "top", # Waybar at top layer
|
layer = "top";
|
||||||
# "position": "bottom", # Waybar position (top|bottom|left|right)
|
position = "top";
|
||||||
height = 30; # Waybar height (to be removed for auto height)
|
height = 32;
|
||||||
# "width": 1280, # Waybar width
|
spacing = 0;
|
||||||
spacing = 4; # Gaps between modules (4px)
|
|
||||||
# Choose the order of the modules
|
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"hyprland/workspaces"
|
"hyprland/workspaces"
|
||||||
];
|
"tray"
|
||||||
modules-center = [
|
"custom/lock"
|
||||||
"hyprland/window"
|
"custom/reboot"
|
||||||
|
"custom/power"
|
||||||
];
|
];
|
||||||
|
modules-center = [];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"mpd"
|
|
||||||
"idle_inhibitor"
|
"idle_inhibitor"
|
||||||
"wireplumber"
|
|
||||||
"network"
|
"network"
|
||||||
"power-profiles-daemon"
|
"wireplumber"
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
"temperature"
|
|
||||||
"backlight"
|
"backlight"
|
||||||
"keyboard-state"
|
|
||||||
"sway/language"
|
|
||||||
"battery"
|
"battery"
|
||||||
"battery#bat2"
|
"battery#bat2"
|
||||||
"clock"
|
"clock"
|
||||||
"tray"
|
|
||||||
"custom/power"
|
|
||||||
];
|
];
|
||||||
# Modules configuration
|
# Modules configuration
|
||||||
"hyprland/workspaces" = {
|
"hyprland/workspaces" = {
|
||||||
|
|
@ -44,61 +157,23 @@
|
||||||
all-outputs = true;
|
all-outputs = true;
|
||||||
warp-on-scroll = false;
|
warp-on-scroll = false;
|
||||||
format = "{name} {icon}";
|
format = "{name} {icon}";
|
||||||
|
on-click = "activate";
|
||||||
|
persistent-workspaces = {
|
||||||
|
"*" = [ 1 2 3 4 5 6 7 8 9 ];
|
||||||
|
};
|
||||||
format-icons = {
|
format-icons = {
|
||||||
active = "";
|
"1" = "";
|
||||||
default = "";
|
"7" = "";
|
||||||
|
"8" = "";
|
||||||
|
"9" = "";
|
||||||
|
"default" = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
keyboard-state = {
|
|
||||||
numlock = true;
|
|
||||||
capslock = true;
|
|
||||||
format = "{name} {icon}";
|
|
||||||
format-icons = {
|
|
||||||
locked = "";
|
|
||||||
unlocked = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# "sway/mode": {
|
|
||||||
# "format": "<span style=\"italic\">{}</span>"
|
|
||||||
# },
|
|
||||||
# "sway/scratchpad": {
|
|
||||||
# "format": "{icon} {count}",
|
|
||||||
# "show-empty": false,
|
|
||||||
# "format-icons": ["", ""],
|
|
||||||
# "tooltip": true,
|
|
||||||
# "tooltip-format": "{app}: {title}"
|
|
||||||
# },
|
|
||||||
mpd = {
|
|
||||||
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ";
|
|
||||||
format-disconnected = "Disconnected ";
|
|
||||||
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
|
|
||||||
unknown-tag = "N/A";
|
|
||||||
interval = 5;
|
|
||||||
consume-icons = {
|
|
||||||
on = " ";
|
|
||||||
};
|
|
||||||
random-icons = {
|
|
||||||
off = "<span color=\"#f53c3c\"></span> ";
|
|
||||||
on = " ";
|
|
||||||
};
|
|
||||||
repeat-icons = {
|
|
||||||
on = " ";
|
|
||||||
};
|
|
||||||
single-icons = {
|
|
||||||
on = "1 ";
|
|
||||||
};
|
|
||||||
state-icons = {
|
|
||||||
paused = "";
|
|
||||||
playing = "";
|
|
||||||
};
|
|
||||||
tooltip-format = "MPD (connected)";
|
|
||||||
tooltip-format-disconnected = "MPD (disconnected)";
|
|
||||||
};
|
|
||||||
idle_inhibitor = {
|
idle_inhibitor = {
|
||||||
format = "{icon}";
|
format = " {icon}";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
activated = "";
|
activated = " ";
|
||||||
deactivated = "";
|
deactivated = " ";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
tray = {
|
tray = {
|
||||||
|
|
@ -115,39 +190,25 @@
|
||||||
format-alt = "{:%Y-%m-%d}";
|
format-alt = "{:%Y-%m-%d}";
|
||||||
};
|
};
|
||||||
cpu = {
|
cpu = {
|
||||||
format = "{usage}% ";
|
format = "<span color='#FF9F0A'> </span>{usage}% ";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
memory = {
|
memory = {
|
||||||
format = "{}% ";
|
format = "<span color='#8A2BE2'> </span>{}% ";
|
||||||
};
|
|
||||||
temperature = {
|
|
||||||
# "thermal-zone": 2,
|
|
||||||
# "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
|
||||||
critical-threshold = 80;
|
|
||||||
# "format-critical": "{temperatureC}°C {icon}",
|
|
||||||
format = "{temperatureC}°C {icon}";
|
|
||||||
format-icons = ["" "" ""];
|
|
||||||
};
|
};
|
||||||
backlight = {
|
backlight = {
|
||||||
# "device": "acpi_video1",
|
format = "<span color='#FFD700'> {icon}</span>{percent}% ";
|
||||||
format = "{percent}% {icon}";
|
format-icons = [" " " " " " " " " " " " " " " " " "];
|
||||||
format-icons = ["" "" "" "" "" "" "" "" ""];
|
|
||||||
};
|
};
|
||||||
battery = {
|
battery = {
|
||||||
states = {
|
states = {
|
||||||
# "good": 95,
|
|
||||||
warning = 30;
|
warning = 30;
|
||||||
critical = 15;
|
critical = 15;
|
||||||
};
|
};
|
||||||
format = "{capacity}% {icon}";
|
format = "<span color='#28CD41'> {icon} </span>{capacity}% ";
|
||||||
format-full = "{capacity}% {icon}";
|
format-charging = "<span color='#28CD41'> </span>{capacity}% ";
|
||||||
format-charging = "{capacity}% ";
|
|
||||||
format-plugged = "{capacity}% ";
|
|
||||||
format-alt = "{time} {icon}";
|
|
||||||
# "format-good": "", // An empty format will hide the module
|
|
||||||
# "format-full": "",
|
|
||||||
format-icons = ["" "" "" "" ""];
|
format-icons = ["" "" "" "" ""];
|
||||||
|
interval = 1;
|
||||||
};
|
};
|
||||||
"battery#bat2" = {
|
"battery#bat2" = {
|
||||||
bat = "BAT2";
|
bat = "BAT2";
|
||||||
|
|
@ -164,45 +225,38 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
network = {
|
network = {
|
||||||
# "interface": "wlp2*", // (Optional) To force the use of this interface
|
format-wifi = "<span color='#00FFFF'> </span> ";
|
||||||
format-wifi = "{essid} ({signalStrength}%) ";
|
format-ethernet = "<span color='#7FFF00'> {ipaddr} </span> ";
|
||||||
format-ethernet = "{ipaddr}/{cidr} ";
|
tooltip-format = "{essid}({ifname}) -> {ipaddr}/{cidr}";
|
||||||
tooltip-format = "{ifname} via {gwaddr} ";
|
format-linked = "<span color='#FFA500'> </span>{ifname} (No IP) ";
|
||||||
format-linked = "{ifname} (No IP) ";
|
format-disconnected = "<span color='#FF4040'> </span>Disconnected ";
|
||||||
format-disconnected = "Disconnected ⚠";
|
interval = 1;
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
||||||
};
|
};
|
||||||
wireplumber = {
|
wireplumber = {
|
||||||
format = "{volume}% {icon}";
|
format = " {icon} {volume}% ";
|
||||||
format-muted = "";
|
format-muted = "<span color='#FF4040'> </span>";
|
||||||
# on-click = "helvum";
|
# on-click = "helvum";
|
||||||
max-volume = 150;
|
max-volume = 150;
|
||||||
scroll-step = 0.15;
|
scroll-step = 0.15;
|
||||||
format-icons = [" " " " " "];
|
format-icons = ["" " " " "];
|
||||||
};
|
};
|
||||||
"custom/media" = {
|
"custom/lock" = {
|
||||||
format = "{icon} {text}";
|
format = "<span color='#00FFFF'> </span>";
|
||||||
return-type = "json";
|
on-click = "hyprlock";
|
||||||
max-length = 40;
|
tooltip = true;
|
||||||
format-icons = {
|
tooltip-format = "lock";
|
||||||
spotify = "";
|
};
|
||||||
default = "🎜";
|
"custom/reboot" = {
|
||||||
};
|
format = "<span color='#FFD700'> </span>";
|
||||||
escape = true;
|
on-click = "systemctl reboot";
|
||||||
exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; # Script in resources folder;
|
tooltip = true;
|
||||||
# "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
|
tooltip-format = "reboot";
|
||||||
};
|
};
|
||||||
"custom/power" = {
|
"custom/power" = {
|
||||||
format = "⏻ ";
|
format = "<span color='#FF4040'> </span>";
|
||||||
tooltip = false;
|
on-click = "systemctl poweroff";
|
||||||
menu = "on-click";
|
tooltip = true;
|
||||||
menu-file = "$HOME/.config/waybar/power_menu.xml"; # Menu file in resources folde;
|
tooltip-format = "poweroff";
|
||||||
"menu-actions" = {
|
|
||||||
shutdown = "shutdown";
|
|
||||||
reboot = "reboot";
|
|
||||||
suspend = "systemctl suspend";
|
|
||||||
hibernate = "systemctl hibernate";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue