some waybar adjustments

This commit is contained in:
2025-03-05 19:57:18 +01:00
parent 6b1058f6a4
commit 41b8850196
10 changed files with 242 additions and 291 deletions

View File

@@ -59,9 +59,9 @@
# "${pkgs.hyprpaper}/bin/hyprpaper"
# hyprpaper is handled as its own service
"${pkgs.waybar}/bin/waybar"
# Fixes cursor themes in gnome apps under hyprland
"gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
"gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
# # Fixes cursor themes in gnome apps under hyprland
# "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
# "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
];
general = {

View File

@@ -4,23 +4,23 @@
...
}:
with lib; let
wallpapers = builtins.readDir ../../../wallpapers;
# wallpapers = builtins.readDir ../../../wallpapers;
wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: ../../../wallpapers + "/" + wallpaper) (attrNames wallpapers)))}\")";
wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
wallpapers=${wallpaperBashArray}
rand=$[$RANDOM % ''${#wallpapers[@]}]
wallpaper=''${wallpapers[$rand]}
# wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: ../../../wallpapers + "/" + wallpaper) (attrNames wallpapers)))}\")";
# wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
# wallpapers=${wallpaperBashArray}
# rand=$[$RANDOM % ''${#wallpapers[@]}]
# wallpaper=''${wallpapers[$rand]}
monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`)
hyprctl hyprpaper unload all
hyprctl hyprpaper preload $wallpaper
for m in ''${monitor[@]}; do
hyprctl hyprpaper wallpaper "$m,$wallpaper"
done
'';
# monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`)
# hyprctl hyprpaper unload all
# hyprctl hyprpaper preload $wallpaper
# for m in ''${monitor[@]}; do
# hyprctl hyprpaper wallpaper "$m,$wallpaper"
# done
# '';
in {
home.packages = [wallpaperRandomizer];
# home.packages = [wallpaperRandomizer];
services.hyprpaper = {
enable = true;
@@ -32,29 +32,29 @@ in {
# };
};
systemd.user = {
services.wallpaperRandomizer = {
Install = {WantedBy = ["graphical-session.target"];};
# systemd.user = {
# services.wallpaperRandomizer = {
# Install = {WantedBy = ["graphical-session.target"];};
Unit = {
Description = "Set random desktop background using hyprpaper";
After = ["graphical-session-pre.target"];
PartOf = ["graphical-session.target"];
};
# Unit = {
# Description = "Set random desktop background using hyprpaper";
# After = ["graphical-session-pre.target"];
# PartOf = ["graphical-session.target"];
# };
Service = {
Type = "oneshot";
ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
IOSchedulingClass = "idle";
};
};
# Service = {
# Type = "oneshot";
# ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
# IOSchedulingClass = "idle";
# };
# };
timers.wallpaperRandomizer = {
Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
# timers.wallpaperRandomizer = {
# Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
Timer = {OnUnitActiveSec = "6h";};
# Timer = {OnUnitActiveSec = "6h";};
Install = {WantedBy = ["timers.target"];};
};
};
# Install = {WantedBy = ["timers.target"];};
# };
# };
}

View File

@@ -5,9 +5,13 @@
# waybar requires font-awesome
home.packages = [
# fira code now contains ligatures and font-awesome
nerd-fonts.fira-code
pkgs.pavucontrol
# fira code now contains ligatures and font-awesome
# TODO - this only works after nixpkgs 25.05
# nerd-fonts.fira-code
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
pkgs.fira-code
];
# enable waybar
@@ -47,23 +51,18 @@
"battery"
"backlight"
"tray"
"idle_inhibitor"
];
# module specific settings
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
active = "";
default = "";
empty = "";
active = "";
default = "";
};
};
"custom/notification" = {
tooltip = false;
format = "";
on-click = "swaync-client -t -sw";
escape = true;
};
"clock" = {
format = "{:%H:%M}";
interval = 1;
@@ -74,16 +73,16 @@
};
};
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
tooltip = "true";
};
# "network" = {
# "format-wifi" = "";
# "format-ethernet" ="";
# "format-disconnected" = "";
# "tooltip-format-disconnected" = "Error";
# "tooltip-format-wifi" = "{essid} ({signalStrength}%) ";
# "tooltip-format-ethernet" = "{ifname} 🖧 ";
# "on-click" = "kitty nmtui";
# };
"bluetooth" = {
format-on = "󰂯";
format-off = "BT-off";
@@ -110,28 +109,50 @@
};
"pulseaudio" = {
reverse-scrolling = 1;
format = "{volume}% {icon} {format_source}";
format = "{icon} {volume}% {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = " {volume}%";
format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["" "奔" ""];
default = [
""
""
""
];
};
on-click = "pavucontrol";
min-length = 13;
on-click = "sleep 0.1 && pavucontrol";
};
"tray" = {
spacing = 5;
};
"custom/notification" = {
tooltip = false;
format = "{icon} {}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
inhibited-notification = "<span foreground='red'><sup></sup></span>";
inhibited-none = "";
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
dnd-inhibited-none = "";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "sleep 0.1 && task-waybar";
escape = true;
};
};
};
@@ -151,6 +172,11 @@
window#waybar.hidden {
opacity: 0.2;
}
.module {
color: #ffffff;
border: none;
}
#workspaces {
margin-right: 8px;
@@ -172,56 +198,10 @@
font-size: 12px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
border-radius: inherit;
color: #383c4a;
background: #7c818c;
}
#workspaces button.focused {
color: white;
}
#language {
padding-left: 16px;
padding-right: 8px;
border-radius: 10px 0px 0px 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#keyboard-state {
margin-right: 8px;
padding-right: 16px;
border-radius: 0px 10px 10px 0px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#custom-pacman {
padding-left: 16px;
padding-right: 8px;
border-radius: 10px 0px 0px 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#custom-mail {
margin-right: 8px;
padding-right: 16px;
border-radius: 0px 10px 10px 0px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#mode {
padding-left: 16px;
padding-right: 16px;
@@ -240,14 +220,6 @@
background: #383c4a;
}
#custom-weather {
padding-right: 16px;
border-radius: 0px 10px 10px 0px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#pulseaudio {
margin-right: 8px;
padding-left: 16px;
@@ -263,29 +235,7 @@
color: #2a5c45;
}
#custom-mem {
margin-right: 8px;
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#temperature {
margin-right: 8px;
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#temperature.critical {
background-color: #eb4d4b;
}
#backlight {
margin-right: 8px;