waybar fixes

This commit is contained in:
2024-11-04 14:37:53 +01:00
parent 34e94621b8
commit 3b6cbf4398

View File

@@ -7,252 +7,252 @@
settings.mainBar = { settings.mainBar = {
layer = "top"; # Waybar at top layer layer = "top"; # Waybar at top layer
height = 32; # Waybar height (to be removed for auto height) height = 32; # Waybar height (to be removed for auto height)
spacing = 0; # Gaps between modules (4px) spacing = 0; # Gaps between modules (4px)
position = "top"; position = "top";
margin = "10 20 0"; margin = "10 20 0";
# Choose the order of the modules # Choose the order of the modules
modules-left = [ modules-left = [
"hyprland/workspaces" "hyprland/workspaces"
"custom/media" "custom/media"
]; ];
modules-center = ["hyprland/window"]; modules-center = ["hyprland/window"];
modules-right = [ modules-right = [
"mpris" "mpris"
# "idle_inhibitor", # "idle_inhibitor",
"pulseaudio" "pulseaudio"
# "network", # "network",
"cpu" "cpu"
"memory" "memory"
# "temperature", # "temperature",
"backlight" "backlight"
# "keyboard-state", # "keyboard-state",
"battery" "battery"
"clock" "clock"
"tray" "tray"
]; ];
# Modules configuration # Modules configuration
# "sway/workspaces = { # sway/workspaces = {
# "disable-scroll = true, # "disable-scroll = true,
# "all-outputs = true, # "all-outputs = true,
# "warp-on-scroll = false, # "warp-on-scroll = false,
# "format = "{name}: {icon}", # "format = "{name}: {icon}",
# "format-icons = { # "format-icons = {
# "1 = "", # "1 = "",
# "2 = "", # "2 = "",
# "3 = "", # "3 = "",
# "4 = "", # "4 = "",
# "5 = "", # "5 = "",
# "urgent = "", # "urgent = "",
# "focused = "", # "focused = "",
# "default = "" # "default = ""
# } # }
# }, # },
"hyprland/workspaces" = { "hyprland/workspaces" = {
active-only = false; active-only = false;
format = "{icon}"; format = "{icon}";
# format-icons = { format-icons = {
# 1 = "一"; "1" = "";
# 2 = "二"; "2" = "";
# 3 = "三"; "3" = "";
# 4 = "四"; "4" = "";
# 5 = "五"; "5" = "";
# 6 = "六"; "6" = "";
# 7 = "七"; "7" = "";
# 8 = "八"; "8" = "";
# 9 = "九"; "9" = "";
# 10 = "十"; "10" = "";
# 11 = "一"; "11" = "";
# 12 = "二"; "12" = "";
# 13 = "三"; "13" = "";
# 14 = "四"; "14" = "";
# 15 = "五"; "15" = "";
# 16 = "六"; "16" = "";
# 17 = "七"; "17" = "";
# 18 = "八"; "18" = "";
# 19 = "九"; "19" = "";
# 20 = "十"; "20" = "";
# 21 = "一"; "21" = "";
# 22 = "二"; "22" = "";
# 23 = "三"; "23" = "";
# 24 = "四"; "24" = "";
# 25 = "五"; "25" = "";
# 26 = "六"; "26" = "";
# 27 = "七"; "27" = "";
# 28 = "八"; "28" = "";
# 29 = "九"; "29" = "";
# 30 = "十"; "30" = "";
# }; };
on-scroll-up = "hyprctl dispatch workspace e+1"; on-scroll-up = "hyprctl dispatch workspace e+1";
on-scroll-down = "hyprctl dispatch workspace e-1"; on-scroll-down = "hyprctl dispatch workspace e-1";
persistent-workspaces = { persistent-workspaces = {
HDMI-A-1 = [1 2 3 4 5 6 7 8 9 10]; HDMI-A-1 = [1 2 3 4 5 6 7 8 9 10];
DP-1 = [11 12 13 14 15 16 17 18 19 20]; DP-1 = [11 12 13 14 15 16 17 18 19 20];
DP-2 = [21 22 23 24 25 26 27 28 29 30]; DP-2 = [21 22 23 24 25 26 27 28 29 30];
};
}; };
}; keyboard-state = {
keyboard-state = { numlock = false;
numlock = false; capslock = true;
capslock = true; format = "{name} {icon}";
format = "{name} {icon}"; format-icons = {
format-icons = { locked = "";
locked = ""; unlocked = "";
unlocked = ""; };
}; };
}; "sway/mode" = {
"sway/mode" = { format = "<span style=\"italic\">{}</span>";
format = "<span style=\"italic\">{}</span>";
};
"sway/scratchpad" = {
format = "{icon} {count}";
show-empty = false;
format-icons = ["" ""];
tooltip = true;
tooltip-format = "{app}: {title}";
};
mpris = {
interval = 1;
format = "{player_icon} {status_icon}";
format-paused = "{player_icon} {status_icon}";
tooltip-format = "{player_icon} {dynamic}";
tooltip-format-paused = "{player_icon} {dynamic}";
player-icons = {
default = "󰎄";
mpv = "󰝚";
vlc = "󰕼";
spotify = "";
}; };
status-icons = { "sway/scratchpad" = {
playing = ""; format = "{icon} {count}";
paused = ""; show-empty = false;
stopped = ""; format-icons = ["" ""];
tooltip = true;
tooltip-format = "{app}: {title}";
}; };
# "ignored-players = ["firefox"] mpris = {
}; interval = 1;
mpd = { format = "{player_icon} {status_icon}";
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) {songPosition}|{queueLength} {volume}% "; format-paused = "{player_icon} {status_icon}";
format-disconnected = "Disconnected "; tooltip-format = "{player_icon} {dynamic}";
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; tooltip-format-paused = "{player_icon} {dynamic}";
unknown-tag = "N/A"; player-icons = {
interval = 2; default = "󰎄";
consume-icons = { mpv = "󰝚";
on = " "; vlc = "󰕼";
spotify = "";
};
status-icons = {
playing = "";
paused = "";
stopped = "";
};
# "ignored-players = ["firefox"]
}; };
random-icons = { mpd = {
off = "<span color=\"#f53c3c\"></span> "; format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) {songPosition}|{queueLength} {volume}% ";
on = " "; format-disconnected = "Disconnected ";
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
unknown-tag = "N/A";
interval = 2;
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)";
}; };
repeat-icons = { idle_inhibitor = {
on = " "; format = "{icon}";
format-icons = {
activated = "󰅶";
deactivated = "󰾪";
};
}; };
single-icons = { tray = {
on = "1 "; # "icon-size = 21,
spacing = 10;
show-passive-items = true;
}; };
state-icons = { clock = {
paused = ""; format = "{:%b %d %I:%M %p}";
playing = ""; tooltip-format = "<big>{:%d %B %Y}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d %I:%M %p}";
}; };
tooltip-format = "MPD (connected)"; cpu = {
tooltip-format-disconnected = "MPD (disconnected)"; format = "{usage}% ";
}; tooltip = false;
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "󰅶";
deactivated = "󰾪";
}; };
}; memory = {
tray = { format = "{}% ";
# "icon-size = 21,
spacing = 10;
show-passive-items = true;
};
clock = {
format = "{:%b %d %I:%M %p}";
tooltip-format = "<big>{:%d %B %Y}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d %I:%M %p}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = {
format = "{}% ";
};
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 = {
# "device = "acpi_video1",
format = "{percent}% {icon}";
format-icons = ["" "" "" "" "" "" "" "" ""];
};
battery = {
bat = "BAT0";
states = {
# good = 95,
warning = 30;
critical = 15;
}; };
format = "{capacity}% {icon}"; temperature = {
format-charging = "{capacity}% "; # "thermal-zone = 2,
format-plugged = "{capacity}% "; # "hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input",
format-alt = "{time} {icon}"; critical-threshold = 80;
# "format-good = "", # An empty format will hide the module # "format-critical = "{temperatureC}°C {icon}",
# "format-full = "", format = "{temperatureC}°C {icon}";
format-icons = ["" "" "" "" ""]; format-icons = ["" "" " "];
};
network = {
# "interface = "wlp2*", # (Optional) To force the use of this interface
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰈀";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
on-click-right = "kitty nmtui";
};
pulseaudio = {
# "scroll-step = 1, # %, can be a float
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = "󰝟 {icon} {format_source}";
format-muted = "󰝟 {format_source}";
format-source = " {volume}% ";
format-source-muted = " ";
format-icons = {
headphone = "󰋋";
hands-free = "󰟅";
headset = "󰋎";
phone = "";
portable = "";
car = "";
default = ["" "" ""];
}; };
on-click = "pavucontrol"; backlight = {
}; # "device = "acpi_video1",
"custom/media" = { format = "{percent}% {icon}";
format = "{icon} {}"; format-icons = ["" "" "" "" "" "" "" "" ""];
return-type = "json"; };
max-length = 40; battery = {
format-icons = { bat = "BAT0";
spotify = ""; states = {
default = "🎜"; # good = 95,
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% ";
format-plugged = "{capacity}% ";
format-alt = "{time} {icon}";
# "format-good = "", # An empty format will hide the module
# "format-full = "",
format-icons = ["" "" "" "" ""];
};
network = {
# "interface = "wlp2*", # (Optional) To force the use of this interface
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰈀";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
on-click-right = "kitty nmtui";
};
pulseaudio = {
# "scroll-step = 1, # %, can be a float
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = "󰝟 {icon} {format_source}";
format-muted = "󰝟 {format_source}";
format-source = " {volume}% ";
format-source-muted = " ";
format-icons = {
headphone = "󰋋";
hands-free = "󰟅";
headset = "󰋎";
phone = "";
portable = "";
car = "";
default = ["" "" ""];
};
on-click = "pavucontrol";
};
"custom/media" = {
format = "{icon} {}";
return-type = "json";
max-length = 40;
format-icons = {
spotify = "";
default = "🎜";
};
escape = true;
exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; # Script in resources folder
# exec = "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" # Filter player based on name
};
"custom/archicon" = {
format = "󰣇";
# "on-click":"nwg-menu -d -fm nemo -cmd-lock gtklock -va top",
on-click = "jgmenu_run";
tooltip = false;
}; };
escape = true;
exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; # Script in resources folder
# exec = "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" # Filter player based on name
};
"custom/archicon" = {
format = "󰣇";
# "on-click":"nwg-menu -d -fm nemo -cmd-lock gtklock -va top",
on-click = "jgmenu_run";
tooltip = false;
};
}; };
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -290,8 +290,8 @@
} }
window#waybar { window#waybar {
background-color: @background-hard-contrast; background-color: @surface;
color: @foreground; color: @text;
transition-property: background-color; transition-property: background-color;
transition-duration: 0.5s; transition-duration: 0.5s;
border-radius: 10px; border-radius: 10px;
@@ -321,8 +321,8 @@
#workspaces button { #workspaces button {
box-shadow: inset 0 -3px transparent; box-shadow: inset 0 -3px transparent;
padding: 0 8px; padding: 0 8px;
background-color: @background; background-color: @base;
color: @foreground; color: @text;
border: none; border: none;
border-radius: 0; border-radius: 0;
font-weight: 800; font-weight: 800;
@@ -339,36 +339,36 @@
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover { #workspaces button:hover {
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
background-color: @background-soft-contrast; background-color: @overlay;
/* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */ /* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */
} }
#workspaces button.empty { #workspaces button.empty {
color: @foreground-soft-contrast; color: @muted;
box-shadow: inherit; box-shadow: inherit;
text-shadow: inherit; text-shadow: inherit;
} }
#workspaces button.active { #workspaces button.active {
color: @yellow; color: @gold;
box-shadow: inset 0 -100px 0 -97px @bright-yellow; box-shadow: inset 0 -100px 0 -97px @bright-yellow;
text-shadow: inherit; text-shadow: inherit;
} }
#workspaces button.focused { #workspaces button.focused {
background-color: @background-soft-contrast; background-color: @overlay;
color: @foreground; color: @text;
/* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */ /* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: @bright-red; background-color: @love;
color: @background; color: @base;
} }
#mode { #mode {
background-color: @background-soft-contrast; background-color: @overlay;
border-bottom: 3px solid @yellow; border-bottom: 3px solid @gold;
} }
#cava, #cava,
@@ -394,7 +394,7 @@
#scratchpad, #scratchpad,
#mpd { #mpd {
padding: 0 10px; padding: 0 10px;
color: @foreground; color: @text;
} }
#window, #window,
@@ -404,7 +404,7 @@
} }
.modules-right { .modules-right {
background-color: @background-soft-contrast; background-color: @overlay;
border-radius: 10px; border-radius: 10px;
} }
@@ -419,15 +419,15 @@
} }
#mpris { #mpris {
color: @yellow; color: @gold;
} }
#clock { #clock {
color: @yellow; color: @gold;
} }
#battery { #battery {
color: @blue; color: @foam;
} }
#battery.charging, #battery.charging,
@@ -470,20 +470,20 @@
} }
#cpu { #cpu {
color: @blue; color: @foam;
} }
#memory { #memory {
color: @magenta; color: @iris;
} }
#network { #network {
color: @blue; color: @foam;
} }
#network.disconnected { #network.disconnected {
background-color: @bright-red; background-color: @love;
color: @background; color: @base;
} }
/*#disk { /*#disk {
@@ -493,15 +493,15 @@
#pulseaudio, #pulseaudio,
#pulseaudio.muted, #pulseaudio.muted,
#pulseaudio.bluetooth { #pulseaudio.bluetooth {
color: @cyan; color: @pine;
} }
#tray { #tray {
} }
#tray > .needs-attention { #tray > .needs-attention {
background-color: @bright-red; background-color: @love;
color: @background; color: @base;
} }
#idle_inhibitor { #idle_inhibitor {