use waybar for network
This commit is contained in:
parent
b90385ae0d
commit
49c5ae6d87
3 changed files with 45 additions and 11 deletions
|
@ -240,8 +240,7 @@ in {
|
|||
monitor=",highrr,auto,auto";
|
||||
|
||||
exec-once = [
|
||||
"${lib.getExe pkgs.networkmanagerapplet}" # network applet
|
||||
"${lib.getExe pkgs.wl-clip-persist} --clipboard regular" # to fix wl clipboards disappearing
|
||||
"${lib.getExe pkgs.wl-clip-persist} --clipboard regular" # to fix wl clipboards disappearing
|
||||
];
|
||||
|
||||
env = [
|
||||
|
|
|
@ -104,9 +104,12 @@ window#waybar.floating #window {
|
|||
color: @teal;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
#cpu, #network {
|
||||
color: @sapphire;
|
||||
}
|
||||
#network.disabled, #network.disconnected {
|
||||
color: @overlay1;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
|
|
|
@ -29,7 +29,7 @@ in {
|
|||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 4;
|
||||
height = 30;
|
||||
height = 32;
|
||||
margin-top = 6;
|
||||
margin-left = 6;
|
||||
margin-right = 6;
|
||||
|
@ -62,6 +62,7 @@ in {
|
|||
"backlight"
|
||||
"cpu"
|
||||
"memory"
|
||||
"network"
|
||||
"power-profiles-daemon"
|
||||
"battery"
|
||||
"custom/weather"
|
||||
|
@ -79,7 +80,7 @@ in {
|
|||
powerMenuScript = pkgs.writeShellScript "power-menu" ''
|
||||
set -euo pipefail
|
||||
|
||||
cmd=$(echo '⏻ shutdown|↻ reboot| lock|⎋ exit desktop environment' | ${lib.getExe pkgs.rofi-wayland} -dmenu -sep '|' -i -p 'what to do ?' -theme-str 'window { height: 132px; }')
|
||||
cmd=$(echo '⏻ shutdown|↻ reboot| sleep| hibernate| lock|⎋ exit desktop environment' | ${lib.getExe config.modules.desktop.rofi.package} -dmenu -sep '|' -i -p 'what to do ?')
|
||||
case "$cmd" in
|
||||
"⏻ shutdown")
|
||||
poweroff
|
||||
|
@ -87,11 +88,17 @@ in {
|
|||
"↻ reboot")
|
||||
reboot
|
||||
;;
|
||||
" sleep")
|
||||
systemctl suspend
|
||||
;;
|
||||
" hibernate")
|
||||
systemctl hibernate
|
||||
;;
|
||||
" lock")
|
||||
${pkgs.systemd}/bin/loginctl lock-session
|
||||
;;
|
||||
"⎋ exit desktop environment")
|
||||
${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit
|
||||
${pkgs.systemd}/bin/loginctl terminate-session $XDG_SESSION_ID
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
|
@ -176,9 +183,13 @@ in {
|
|||
format = " {usage}%";
|
||||
on-click = "${lib.getExe pkgs.gnome-system-monitor}";
|
||||
};
|
||||
# bluetooth = {
|
||||
#
|
||||
# };
|
||||
memory = {
|
||||
interval = 4;
|
||||
format = " {percentage}%";
|
||||
tooltip = true;
|
||||
tooltip-format = "{used:0.1f}GiB/{avail:0.1f}GiB used\n{swapUsed:0.1f}GiB/{swapAvail:0.1f}GiB swap";
|
||||
on-click = "${lib.getExe pkgs.gnome-system-monitor}";
|
||||
states = {
|
||||
|
@ -186,10 +197,27 @@ in {
|
|||
critical = 90;
|
||||
};
|
||||
};
|
||||
network = {
|
||||
format = "{icon}";
|
||||
tooltip = true;
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%)";
|
||||
tooltip-format-ethernet = "{ifname}";
|
||||
tooltip-format-linked = "{ifname} (no ip)";
|
||||
tooltip-format-disabled = "Disabled";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
format-icons = {
|
||||
wifi = "";
|
||||
ethernet = ""; # TODO: change symbol to ethernet, this represents lan
|
||||
linked = ""; # TODO: this symbol is deprecated
|
||||
disabled = "睊";
|
||||
disconnected = "睊";
|
||||
};
|
||||
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
||||
};
|
||||
power-profiles-daemon = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
performance = " perf";
|
||||
|
@ -207,8 +235,9 @@ in {
|
|||
format = "{icon} {capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-critical = " {capacity}%";
|
||||
tooltip-format = "{timeTo} ({power}W)";
|
||||
format-charging = " {capacity}%";
|
||||
tooltip = true;
|
||||
tooltip-format = "{timeTo} ({power}W)";
|
||||
};
|
||||
privacy = {
|
||||
icon-spacing = 0;
|
||||
|
@ -220,11 +249,13 @@ in {
|
|||
];
|
||||
};
|
||||
mpris = {
|
||||
format = "♫ {dynamic}";
|
||||
format-paused = "{status_icon} {dynamic}";
|
||||
format = "{status_icon} {dynamic}";
|
||||
dynamic-len = 32;
|
||||
title-len = 32;
|
||||
dynamic-order = [ "artist" "title" ];
|
||||
dynamic-importance-order = [ "title" "artist" ];
|
||||
tooltip = true;
|
||||
tooltip-format = "{player} | {status_icon} {artist} - {title} from {album} ({position}/{length})";
|
||||
title-length = 48;
|
||||
interval = 1;
|
||||
status-icons = {
|
||||
playing = "⏸";
|
||||
|
@ -234,6 +265,7 @@ in {
|
|||
clock = {
|
||||
format = "{:%H:%M}";
|
||||
format-alt = "{:%a %b %d %R}";
|
||||
tooltip = true;
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue