Changed: Waybar

This commit is contained in:
DerGrumpf 2025-04-06 22:12:07 +02:00
parent 22dc7f92a7
commit ea50600722
5 changed files with 101 additions and 3 deletions

View File

@ -5,7 +5,6 @@
./hypridle.nix
./hyprlock.nix
./hyprpaper.nix
./waybar # Status Bar
./rofi # App Launcher
./mako.nix # Notifyer
];

View File

@ -12,8 +12,6 @@ import sys
# - snowfall data
# - weather warnings
### CONSTANTS ###
# api key - get it at https://openweathermap.org/

View File

@ -0,0 +1,46 @@
{
pkgs,
config,
...
}: {
programs.waybar = {
enable = true;
package = pkgs.waybar;
/*settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
output = [
"eDP-1"
"DP-1"
"HDMI-A-1"
"Virtual-1"
];
modules-left = [ "sway/workspaces" "sway/mode" "wlr/taskbar" ];
modules-center = [ "sway/window" "custom/hello-from-waybar" ];
modules-right = [ "mpd" "custom/mymodule#with-css-id" "temperature" ];
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
"custom/hello-from-waybar" = {
format = "hello {}";
max-length = 40;
interval = "once";
exec = pkgs.writeShellScript "hello-from-waybar" ''
echo "from within waybar $USER"
'';
};
};
};*/
};
home.file.".config/waybar" = {
source = ./configs;
# copy the scripts directory recursively
recursive = true;
};
}

View File

@ -0,0 +1,54 @@
{
pkgs,
config,
...
}: {
programs.waybar = {
enable = true;
package = pkgs.waybar;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
output = [
"eDP-1"
"DP-1"
"HDMI-A-1"
"Virtual-1"
];
modules-left = [ ];
modules-center = [ "custom/weather" ];
modules-right = [ "custom/hello-from-waybar" ];
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
"custom/weather": {
exec: "python3 ~/.config/waybar/weather.py waybar";
restart-interval: 900;
return-type: "json";
},
"custom/hello-from-waybar" = {
format = "hello {}";
max-length = 40;
interval = "once";
exec = pkgs.writeShellScript "hello-from-waybar" ''
echo "from within waybar $USER"
'';
};
};
};
};
home.file.".config/waybar" = {
"weather.py".source = ./config/weather.py;
"style.css".source = ./config/style.css
# copy the scripts directory recursively
#recursive = true;
};
}

View File

@ -11,6 +11,7 @@
../../home/hyprland # Window Manager
../../home/themes/dark
../../home/hyprland/waybar/single-monitor.nix
../../home/programs/dev # Dev Tools