Add waybar config and some fonts

This commit is contained in:
Torjus Håkestad 2024-02-27 21:13:42 +01:00
parent 6cedc8c144
commit 10765db295
3 changed files with 197 additions and 0 deletions

View File

@ -11,6 +11,7 @@
./programs/tmux
./zsh
./packages
./hyprland/waybar.nix
];
firefox.enable = true;
tmux.enable = true;

190
home/hyprland/waybar.nix Normal file
View File

@ -0,0 +1,190 @@
{ pkgs, ... }: {
programs.waybar = {
enable = true;
systemd = {
enable = false; # disable it,autostart it in hyprland conf
target = "graphical-session.target";
};
style = ''
* {
font-family: "Fira Code";
font-size: 14px;
font-weight: bold;
border-radius: 0px;
transition-property: background-color;
transition-duration: 0.5s;
}
@keyframes blink_red {
to {
background-color: rgb(242, 143, 173);
color: rgb(26, 24, 38);
}
}
.warning,
.critical,
.urgent {
animation-name: blink_red;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
window#waybar {
background-color: transparent;
}
window > box {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
border-bottom: 2px solid @color1;
background-color: @background;
}
#workspaces {
padding-left: 0px;
padding-right: 4px;
}
#workspaces button {
padding-top: 5px;
padding-bottom: 5px;
padding-left: 6px;
padding-right: 6px;
color: @color1;
}
#workspaces button.active {
background-color: @color1;
color: rgb(26, 24, 38);
}
#workspaces button.urgent {
color: rgb(26, 24, 38);
}
#workspaces button:hover {
background-color: #b38dac;
color: rgb(26, 24, 38);
}
tooltip {
background: #3b4253;
}
tooltip label {
color: #e4e8ef;
}
#custom-launcher {
font-size: 20px;
padding-left: 8px;
padding-right: 6px;
color: #7ebae4;
}
#mode,
#clock,
#memory,
#temperature,
#cpu,
#mpd,
#custom-wall,
#temperature,
#backlight,
#pulseaudio,
#network,
#battery,
#custom-powermenu,
#custom-cava-internal {
padding-left: 10px;
padding-right: 10px;
color: @color1;
}
#network.disconnected {
color: #cccccc;
}
#battery.charging,
#battery.full,
#battery.discharging {
color: #cf876f;
}
#battery.critical:not(.charging) {
color: #d6dce7;
}
#custom-powermenu {
color: #bd6069;
}
#tray {
padding-right: 8px;
padding-left: 10px;
}
#tray menu {
background: #3b4252;
color: #dee2ea;
}
#mpd.paused {
color: rgb(192, 202, 245);
font-style: italic;
}
#mpd.stopped {
background: transparent;
}
#mpd {
color: #e4e8ef;
}
#custom-cava-internal {
font-family: "Hack Nerd Font";
}
'';
settings = [{
"layer" = "top";
"position" = "top";
modules-left =
[ "custom/launcher" "hyprland/workspaces" "custom/cava-internal" ];
modules-center = [ "clock" ];
modules-right =
[ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" ];
"custom/launcher" = {
"format" = " ";
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
"tooltip" = false;
};
"custom/cava-internal" = {
"exec" = "sleep 1s && cava-internal";
"tooltip" = false;
};
"hyprland/workspaces" = {
"format" = "{name}";
"on-click" = "activate";
"on-scroll-up" = "hyprctl dispatch workspace e+1";
"on-scroll-down" = "hyprctl dispatch workspace e-1";
};
"pulseaudio" = {
"scroll-step" = 5;
"format" = "{icon} {volume}%";
"format-muted" = "";
"format-icons" = { "default" = [ "" "" "" ]; };
"on-click" = "pamixer -t";
};
"pulseaudio#microphone" = {
"format" = "{format_source}";
"format-source" = " {volume}%";
"format-source-muted" = "";
"on-click" = "pamixer --default-source -t";
"on-scroll-up" = "pamixer --default-source -i 5";
"on-scroll-down" = "pamixer --default-source -d 5";
"scroll-step" = 5;
"on-click-right" = "pavucontrol";
};
"clock" = {
"interval" = 1;
"format" = "{:%I:%M %p %A %b %d}";
"tooltip" = true;
};
"memory" = {
"interval" = 3;
"format" = " {percentage}%";
"states" = { "warning" = 85; };
};
"cpu" = {
"interval" = 3;
"format" = " {usage}%";
};
"tray" = {
"icon-size" = 15;
"spacing" = 6;
};
}];
};
}

View File

@ -1,7 +1,13 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ twemoji-color-font ];
fonts.packages = with pkgs; [
fira-code
fira-code-symbols
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
twemoji-color-font
font-awesome
];
}