use waybar for network
This commit is contained in:
parent
b90385ae0d
commit
49c5ae6d87
3 changed files with 45 additions and 11 deletions
|
@ -240,7 +240,6 @@ in {
|
||||||
monitor=",highrr,auto,auto";
|
monitor=",highrr,auto,auto";
|
||||||
|
|
||||||
exec-once = [
|
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
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,12 @@ window#waybar.floating #window {
|
||||||
color: @teal;
|
color: @teal;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#cpu, #network {
|
||||||
color: @sapphire;
|
color: @sapphire;
|
||||||
}
|
}
|
||||||
|
#network.disabled, #network.disconnected {
|
||||||
|
color: @overlay1;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
to {
|
to {
|
||||||
|
|
|
@ -29,7 +29,7 @@ in {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "top";
|
||||||
spacing = 4;
|
spacing = 4;
|
||||||
height = 30;
|
height = 32;
|
||||||
margin-top = 6;
|
margin-top = 6;
|
||||||
margin-left = 6;
|
margin-left = 6;
|
||||||
margin-right = 6;
|
margin-right = 6;
|
||||||
|
@ -62,6 +62,7 @@ in {
|
||||||
"backlight"
|
"backlight"
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
|
"network"
|
||||||
"power-profiles-daemon"
|
"power-profiles-daemon"
|
||||||
"battery"
|
"battery"
|
||||||
"custom/weather"
|
"custom/weather"
|
||||||
|
@ -79,7 +80,7 @@ in {
|
||||||
powerMenuScript = pkgs.writeShellScript "power-menu" ''
|
powerMenuScript = pkgs.writeShellScript "power-menu" ''
|
||||||
set -euo pipefail
|
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
|
case "$cmd" in
|
||||||
"⏻ shutdown")
|
"⏻ shutdown")
|
||||||
poweroff
|
poweroff
|
||||||
|
@ -87,11 +88,17 @@ in {
|
||||||
"↻ reboot")
|
"↻ reboot")
|
||||||
reboot
|
reboot
|
||||||
;;
|
;;
|
||||||
|
" sleep")
|
||||||
|
systemctl suspend
|
||||||
|
;;
|
||||||
|
" hibernate")
|
||||||
|
systemctl hibernate
|
||||||
|
;;
|
||||||
" lock")
|
" lock")
|
||||||
${pkgs.systemd}/bin/loginctl lock-session
|
${pkgs.systemd}/bin/loginctl lock-session
|
||||||
;;
|
;;
|
||||||
"⎋ exit desktop environment")
|
"⎋ exit desktop environment")
|
||||||
${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit
|
${pkgs.systemd}/bin/loginctl terminate-session $XDG_SESSION_ID
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
|
@ -176,9 +183,13 @@ in {
|
||||||
format = " {usage}%";
|
format = " {usage}%";
|
||||||
on-click = "${lib.getExe pkgs.gnome-system-monitor}";
|
on-click = "${lib.getExe pkgs.gnome-system-monitor}";
|
||||||
};
|
};
|
||||||
|
# bluetooth = {
|
||||||
|
#
|
||||||
|
# };
|
||||||
memory = {
|
memory = {
|
||||||
interval = 4;
|
interval = 4;
|
||||||
format = " {percentage}%";
|
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";
|
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}";
|
on-click = "${lib.getExe pkgs.gnome-system-monitor}";
|
||||||
states = {
|
states = {
|
||||||
|
@ -186,10 +197,27 @@ in {
|
||||||
critical = 90;
|
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 = {
|
power-profiles-daemon = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
|
||||||
tooltip = true;
|
tooltip = true;
|
||||||
|
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
default = "";
|
default = "";
|
||||||
performance = " perf";
|
performance = " perf";
|
||||||
|
@ -207,8 +235,9 @@ in {
|
||||||
format = "{icon} {capacity}%";
|
format = "{icon} {capacity}%";
|
||||||
format-icons = ["" "" "" "" ""];
|
format-icons = ["" "" "" "" ""];
|
||||||
format-critical = " {capacity}%";
|
format-critical = " {capacity}%";
|
||||||
tooltip-format = "{timeTo} ({power}W)";
|
|
||||||
format-charging = " {capacity}%";
|
format-charging = " {capacity}%";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-format = "{timeTo} ({power}W)";
|
||||||
};
|
};
|
||||||
privacy = {
|
privacy = {
|
||||||
icon-spacing = 0;
|
icon-spacing = 0;
|
||||||
|
@ -220,11 +249,13 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
mpris = {
|
mpris = {
|
||||||
format = "♫ {dynamic}";
|
format = "{status_icon} {dynamic}";
|
||||||
format-paused = "{status_icon} {dynamic}";
|
dynamic-len = 32;
|
||||||
|
title-len = 32;
|
||||||
dynamic-order = [ "artist" "title" ];
|
dynamic-order = [ "artist" "title" ];
|
||||||
|
dynamic-importance-order = [ "title" "artist" ];
|
||||||
|
tooltip = true;
|
||||||
tooltip-format = "{player} | {status_icon} {artist} - {title} from {album} ({position}/{length})";
|
tooltip-format = "{player} | {status_icon} {artist} - {title} from {album} ({position}/{length})";
|
||||||
title-length = 48;
|
|
||||||
interval = 1;
|
interval = 1;
|
||||||
status-icons = {
|
status-icons = {
|
||||||
playing = "⏸";
|
playing = "⏸";
|
||||||
|
@ -234,6 +265,7 @@ in {
|
||||||
clock = {
|
clock = {
|
||||||
format = "{:%H:%M}";
|
format = "{:%H:%M}";
|
||||||
format-alt = "{:%a %b %d %R}";
|
format-alt = "{:%a %b %d %R}";
|
||||||
|
tooltip = true;
|
||||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||||
calendar = {
|
calendar = {
|
||||||
mode = "year";
|
mode = "year";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue