feat: add light theme waybar
This commit is contained in:
parent
aa06b182e7
commit
21db39a399
10 changed files with 761 additions and 366 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, nixosConfig, hy3, ... }:
|
||||
{ pkgs, lib, nixosConfig, hy3, config, ... }:
|
||||
let
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
|
||||
|
|
@ -32,8 +32,8 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
../sway/waybar.nix
|
||||
../sway/wofi.nix
|
||||
../waybar.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -93,8 +93,8 @@ in
|
|||
"_JAVA_OPTIONS,\"-Dawt.useSystemAAFontSettings=on\""
|
||||
];
|
||||
"exec-once" = with pkgs; [
|
||||
"${config.programs.waybar.package}/bin/waybar -c ${config.xdg.configHome}/waybar/hyprbar.json -s ${config.xdg.configHome}/waybar/hyprbar.css"
|
||||
"${swaybg}/bin/swaybg -m fill -i ${common.wallpaper}"
|
||||
"${waybar}/bin/waybar"
|
||||
"${dbus}/bin/dbus-update-activation-environment --all"
|
||||
"${kanshi}/bin/kanshi"
|
||||
"${networkmanagerapplet}/bin/nm-applet"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ in
|
|||
# Available themes:
|
||||
# https://github.com/alacritty/alacritty-theme
|
||||
|
||||
"${pkgs.alacritty-theme}/atom_one_light.toml"
|
||||
"${pkgs.alacritty-theme}/alabaster.toml"
|
||||
];
|
||||
env.TERM = "xterm-256color";
|
||||
font = {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ in
|
|||
imports = [
|
||||
./kanshi.nix
|
||||
./swaync
|
||||
./waybar.nix
|
||||
./wofi.nix
|
||||
../waybar.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -275,7 +275,7 @@ in
|
|||
};
|
||||
bars = [
|
||||
{
|
||||
command = "${pkgs.waybar}/bin/waybar";
|
||||
command = "${config.programs.waybar.package}/bin/waybar -c ${config.xdg.configHome}/waybar/swaybar.json -s ${config.xdg.configHome}/waybar/swaybar.css";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,354 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
||||
settings.mainBar = {
|
||||
layer = "top";
|
||||
margin = "5 5 5 5";
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"sway/mode"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [ "tray" "network" "pulseaudio" "custom/mem" "temperature" "backlight" "battery" ];
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
};
|
||||
};
|
||||
"sway/window" = {
|
||||
format = "{title}";
|
||||
max-length = 43;
|
||||
};
|
||||
"sway/mode" = {
|
||||
format = "<span style=\"italic\">{}</span>";
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
};
|
||||
"hyprland/window" = {
|
||||
format = "{title}";
|
||||
};
|
||||
clock = {
|
||||
timezones = [ "Europe/Berlin" ];
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format = "{:%a, %d %b, %H:%M}";
|
||||
actions = {
|
||||
on-click = "tz_up";
|
||||
};
|
||||
};
|
||||
network = {
|
||||
interval = 1;
|
||||
format = "{ifname}";
|
||||
format-wifi = "{signalStrength}% ";
|
||||
format-ethernet = "eth ";
|
||||
format-disconnected = ""; # An empty format will hide the module.
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
};
|
||||
pulseaudio = {
|
||||
reverse-scrolling = 1;
|
||||
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 = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
min-length = 13;
|
||||
};
|
||||
"custom/mem" = {
|
||||
format = "{} ";
|
||||
interval = 3;
|
||||
exec = "free -h | awk '/Mem:/{printf $3}'";
|
||||
tooltip = false;
|
||||
};
|
||||
temperature = {
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip = false;
|
||||
};
|
||||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-alt = "{time} {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-update = pkgs.writeShellScript "check-battery" ''
|
||||
bat=/sys/class/power_supply/BAT0
|
||||
CRIT=''${1:-15}
|
||||
|
||||
FILE=~/.config/waybar/.notified.target
|
||||
|
||||
stat=$(cat $bat/status)
|
||||
perc=$(cat $bat/capacity)
|
||||
|
||||
if [[ $perc -le $CRIT ]] && [[ $stat == "Discharging" ]]; then
|
||||
if [[ ! -f "$FILE" ]]; then
|
||||
notify-send --urgency=critical --icon=dialog-warning "Battery Low" "Current charge: $perc%"
|
||||
touch $FILE
|
||||
fi
|
||||
elif [[ -f "$FILE" ]]; then
|
||||
rm $FILE
|
||||
fi
|
||||
'';
|
||||
};
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 0;
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
@define-color bg-color #212529;
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: DejaVuSansM Nerd Font;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
margin-right: 8px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
color: #7c818c;
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#workspaces button.persistent {
|
||||
color: #7c818c;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
color: @bg-color;
|
||||
background: #7c818c;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#window {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-right: 8px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#mode {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#custom-mem {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#battery {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: #ffbe61;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
692
users/gandalf/modules/gui/waybar.nix
Normal file
692
users/gandalf/modules/gui/waybar.nix
Normal file
|
|
@ -0,0 +1,692 @@
|
|||
{ pkgs, waybar, ... }:
|
||||
let
|
||||
check-battery = pkgs.writeShellScript "check-battery" ''
|
||||
bat=/sys/class/power_supply/BAT0
|
||||
CRIT=''${1:-15}
|
||||
|
||||
FILE=~/.config/waybar/.notified.target
|
||||
|
||||
stat=$(cat $bat/status)
|
||||
perc=$(cat $bat/capacity)
|
||||
|
||||
if [[ $perc -le $CRIT ]] && [[ $stat == "Discharging" ]]; then
|
||||
if [[ ! -f "$FILE" ]]; then
|
||||
notify-send --urgency=critical --icon=dialog-warning "Battery Low" "Current charge: $perc%"
|
||||
touch $FILE
|
||||
fi
|
||||
elif [[ -f "$FILE" ]]; then
|
||||
rm $FILE
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
xdg.configFile = {
|
||||
"waybar/swaybar.json".text = ''
|
||||
[
|
||||
{
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"battery": {
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"format-plugged": "{capacity}% ",
|
||||
"on-update": "${check-battery}",
|
||||
"states": {
|
||||
"critical": 15,
|
||||
"warning": 30
|
||||
}
|
||||
},
|
||||
"clock": {
|
||||
"actions": {
|
||||
"on-click": "tz_up"
|
||||
},
|
||||
"format": "{:%a, %d %b, %H:%M}",
|
||||
"timezones": [
|
||||
"Europe/Berlin"
|
||||
],
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
||||
},
|
||||
"custom/mem": {
|
||||
"exec": "free -h | awk '/Mem:/{printf $3}'",
|
||||
"format": "{} ",
|
||||
"interval": 3,
|
||||
"tooltip": false
|
||||
},
|
||||
"layer": "top",
|
||||
"margin": "5 5 5 5",
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-left": [
|
||||
"sway/workspaces",
|
||||
"sway/window",
|
||||
"sway/mode"
|
||||
],
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"network",
|
||||
"pulseaudio",
|
||||
"custom/mem",
|
||||
"temperature",
|
||||
"backlight",
|
||||
"battery"
|
||||
],
|
||||
"name": "swaybar",
|
||||
"network": {
|
||||
"format": "{ifname}",
|
||||
"format-disconnected": "",
|
||||
"format-ethernet": "eth ",
|
||||
"format-wifi": "{signalStrength}% ",
|
||||
"interval": 1,
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"tooltip-format-ethernet": "{ifname} ",
|
||||
"tooltip-format-wifi": "{essid} ({signalStrength}%) "
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-icons": {
|
||||
"car": "",
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"hands-free": "",
|
||||
"headphone": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": ""
|
||||
},
|
||||
"format-muted": " {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"min-length": 13,
|
||||
"on-click": "${pkgs.pavucontrol}/bin/pavucontrol",
|
||||
"reverse-scrolling": 1
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"sway/window": {
|
||||
"format": "{title}",
|
||||
"max-length": 43
|
||||
},
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"persistent-workspaces": {
|
||||
"1": [],
|
||||
"2": [],
|
||||
"3": [],
|
||||
"4": []
|
||||
}
|
||||
},
|
||||
"temperature": {
|
||||
"critical-threshold": 80,
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
'';
|
||||
|
||||
"waybar/swaybar.css".text = ''
|
||||
@define-color bg-color #212529;
|
||||
|
||||
window.swaybar,
|
||||
window.swaybar * {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: DejaVuSansM Nerd Font;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
window.swaybar#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.swaybar#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
window.swaybar #workspaces {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
margin-right: 8px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #workspaces button {
|
||||
transition: none;
|
||||
color: #7c818c;
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
window.swaybar #workspaces button.persistent {
|
||||
color: #7c818c;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
window.swaybar #workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
color: @bg-color;
|
||||
background: #7c818c;
|
||||
}
|
||||
|
||||
window.swaybar #workspaces button.focused {
|
||||
color: white;
|
||||
}
|
||||
|
||||
window.swaybar #workspaces button.visible {
|
||||
color: white;
|
||||
}
|
||||
|
||||
window.swaybar #window {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-right: 8px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #mode {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #clock {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #network {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #pulseaudio {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
window.swaybar #custom-mem {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #temperature {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
window.swaybar #backlight {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #battery {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
window.swaybar #battery.charging {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
window.swaybar #battery.warning:not(.charging) {
|
||||
background-color: #ffbe61;
|
||||
color: black;
|
||||
}
|
||||
|
||||
window.swaybar #battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
window.swaybar #tray {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #ffffff;
|
||||
background: @bg-color;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
"waybar/hyprbar.json".text = ''
|
||||
[
|
||||
{
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"battery": {
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"format-plugged": "{capacity}% ",
|
||||
"on-update": "${check-battery}",
|
||||
"states": {
|
||||
"critical": 15,
|
||||
"warning": 30
|
||||
}
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a %b %d %H:%M}",
|
||||
"timezones": [
|
||||
"Europe/Berlin"
|
||||
],
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
||||
},
|
||||
"custom/mem": {
|
||||
"exec": "free -h | awk '/Mem:/{printf $3}'",
|
||||
"format": "{} ",
|
||||
"interval": 3,
|
||||
"tooltip": false
|
||||
},
|
||||
"hyprland/window": {
|
||||
"format": "{title}",
|
||||
"separate-outputs": true
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"persistent-workspaces": {
|
||||
"1": [],
|
||||
"10": [],
|
||||
"2": [],
|
||||
"3": [],
|
||||
"4": [],
|
||||
"5": [],
|
||||
"6": [],
|
||||
"7": [],
|
||||
"8": [],
|
||||
"9": []
|
||||
}
|
||||
},
|
||||
"layer": "top",
|
||||
"margin": "5 5 5 5",
|
||||
"modules-center": [],
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"hyprland/window"
|
||||
],
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"network",
|
||||
"pulseaudio",
|
||||
"custom/mem",
|
||||
"temperature",
|
||||
"backlight",
|
||||
"battery",
|
||||
"clock"
|
||||
],
|
||||
"name": "hyprbar",
|
||||
"network": {
|
||||
"format": "{ifname}",
|
||||
"format-disconnected": "",
|
||||
"format-ethernet": "eth ",
|
||||
"format-wifi": "{signalStrength}% ",
|
||||
"interval": 1,
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"tooltip-format-ethernet": "{ifname} ",
|
||||
"tooltip-format-wifi": "{essid} ({signalStrength}%) "
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-icons": {
|
||||
"car": "",
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"hands-free": "",
|
||||
"headphone": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": ""
|
||||
},
|
||||
"format-muted": " {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"min-length": 13,
|
||||
"on-click": "${pkgs.pavucontrol}/bin/pavucontrol",
|
||||
"reverse-scrolling": 1
|
||||
},
|
||||
"temperature": {
|
||||
"critical-threshold": 80,
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"show-passive-items": true,
|
||||
"spacing": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
'';
|
||||
|
||||
"waybar/hyprbar.css".text = ''
|
||||
window.hyprbar,
|
||||
window.hyprbar * {
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
font-family: DejaVuSansM Nerd Font;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
window.hyprbar#waybar {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
window.hyprbar#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
margin-right: 8px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces button {
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces button.empty {
|
||||
color: #7c818c;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces button.persistent {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces button.visible {
|
||||
color: black;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces button.visible.hosting-monitor {
|
||||
background: lightgray;
|
||||
}
|
||||
|
||||
window.hyprbar #workspaces button:hover {
|
||||
color: white;
|
||||
background: black;
|
||||
}
|
||||
|
||||
window.hyprbar #window {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #tray {
|
||||
margin-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: white;
|
||||
background: rgb(66, 118, 185);
|
||||
}
|
||||
|
||||
window.hyprbar #network {
|
||||
/* margin-right: 4px; */
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #pulseaudio {
|
||||
/* margin-right: 4px; */
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #pulseaudio.muted {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
window.hyprbar #custom-mem {
|
||||
/* margin-right: 8px; */
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #temperature {
|
||||
/* margin-right: 8px; */
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
window.hyprbar #backlight {
|
||||
/* margin-right: 8px; */
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #battery {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window.hyprbar #battery.charging {
|
||||
color: #ffffff;
|
||||
background-color: #26a65b;
|
||||
}
|
||||
|
||||
window.hyprbar #battery.warning:not(.charging) {
|
||||
background-color: #ffbe61;
|
||||
color: black;
|
||||
}
|
||||
|
||||
window.hyprbar #battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
window.hyprbar #clock {
|
||||
padding-left: 10px;
|
||||
padding-right: 16px;
|
||||
transition: none;
|
||||
color: black;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
# TODO replace with (un-)stable channel version once available
|
||||
package = waybar.packages.x86_64-linux.default;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue