Skip to content

Commit

Permalink
feat: update waybar config
Browse files Browse the repository at this point in the history
  • Loading branch information
2giosangmitom committed Aug 7, 2024
1 parent c4ce7b4 commit 665f3a6
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 2 deletions.
2 changes: 1 addition & 1 deletion home/graphical/scripts/autostart.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Terminate already running bar instances
killall -q waybar
pkill waybar

# Wait until the processes have been shut down
while pgrep -u $UID -x waybar >/dev/null; do sleep 1; done
Expand Down
1 change: 0 additions & 1 deletion home/programs/waybar.nix

This file was deleted.

66 changes: 66 additions & 0 deletions home/programs/waybar/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ config, lib, ... }:
let
cfg = config.dotfiles.waybar;
in
{
options.dotfiles.waybar = {
enable = lib.mkEnableOption "Waybar";
};

config = lib.mkIf cfg.enable {
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
mod = "dock";
exclusive = true;
passthrough = false;
gtk-layer-shell = true;
height = 0;
modules-left = [
"sway/workspaces"
"sway/mode"
];
modules-center = [ "clock" ];
modules-right = [
"pulseaudio"
"network"
"tray"
];
clock = {
format = "{:%b %d - %H:%M}";
tooltip = false;
};
"sway/mode" = {
tooltip = false;
};
"sway/workspaces" = {
disable-click = true;
disable-scroll = true;
disable-markup = true;
};
pulseaudio = {
format = "<span color='#cba6f7'>{icon}</span>{volume}%";
tooltip = false;
format-muted = "<span color='#f38ba8'> </span>Muted";
format-icons = {
default = [
" "
" "
" "
];
};
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
scroll-step = 5;
};
network = {
tooltip = false;
};
};
};
style = ./style.css;
};
};
}
47 changes: 47 additions & 0 deletions home/programs/waybar/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
* {
border: none;
border-radius: 0;
font-family: "JetBrainsMono NF";
font-size: 12.5px;
font-weight: bold;
}

window#waybar {
background-color: #222831;
color: #eeeeee;
}

#workspaces button {
padding: 0 4px;
color: #eeeeee;
}

#workspaces button.focused {
color: #5c8374;
}

#workspaces button.urgent {
color: #ce5a67;
}

#workspaces button.persistent {
color: #5272f2;
}

#workspaces button:hover {
background: #222831;
}

#pulseaudio,
#clock,
#workspaces,
#tray,
#mode,
#network,
#cpu {
background: #222831;
color: #eeeeee;
margin: 2px 3px;
padding: 0 10px;
border-radius: 5px;
}
1 change: 1 addition & 0 deletions hosts/nixos/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
lazygit.enable = true;
zellij.enable = true;
yazi.enable = true;
waybar.enable = true;
};
graphical.sway.enable = true;
}

0 comments on commit 665f3a6

Please sign in to comment.