wip more font struggles

This commit is contained in:
Remy Moll 2025-03-04 21:07:41 +01:00
parent 6cd35a3fb2
commit 3d32b6a4c5
5 changed files with 293 additions and 64 deletions

View File

@ -49,3 +49,4 @@ This will create an iso image in the result directory.
- https://github.com/Numb-0/nix-0 - https://github.com/Numb-0/nix-0
- https://github.com/Frost-Phoenix/nixos-config - https://github.com/Frost-Phoenix/nixos-config
- https://github.com/elifouts/Dotfiles - https://github.com/elifouts/Dotfiles
- https://github.com/nomadics9/nixcfg

View File

@ -4,6 +4,7 @@
imports = [ imports = [
./configuration.nix ./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/nixos/bluetooth.nix
../../modules/nixos/fonts.nix ../../modules/nixos/fonts.nix
../../modules/nixos/hyprland.nix ../../modules/nixos/hyprland.nix
../../modules/nixos/monitoring.nix ../../modules/nixos/monitoring.nix

View File

@ -4,57 +4,57 @@
... ...
}: }:
with lib; let with lib; let
wallpapers = builtins.path { path = ../../../wallpapers; }; # wallpapers = builtins.path { path = ../../../wallpapers; };
wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: "${wallpaper}") wallpapers))}\")"; # wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: "${wallpaper}") wallpapers))}\")";
wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" '' # wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
wallpapers=${wallpaperBashArray} # wallpapers=${wallpaperBashArray}
rand=$[$RANDOM % ''${#wallpapers[@]}] # rand=$[$RANDOM % ''${#wallpapers[@]}]
wallpaper=''${wallpapers[$rand]} # wallpaper=''${wallpapers[$rand]}
monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`) # monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`)
hyprctl hyprpaper unload all # hyprctl hyprpaper unload all
hyprctl hyprpaper preload $wallpaper # hyprctl hyprpaper preload $wallpaper
for m in ''${monitor[@]}; do # for m in ''${monitor[@]}; do
hyprctl hyprpaper wallpaper "$m,$wallpaper" # hyprctl hyprpaper wallpaper "$m,$wallpaper"
done # done
''; # '';
in { in {
home.packages = [wallpaperRandomizer]; # home.packages = [wallpaperRandomizer];
services.hyprpaper = { # services.hyprpaper = {
enable = true; # enable = true;
# settings = { # # settings = {
# ipc = "on"; # # ipc = "on";
# splash = false; # # splash = false;
# splash_offset = 2.0; # # splash_offset = 2.0;
# # };
# }; # };
};
systemd.user = { # systemd.user = {
services.wallpaperRandomizer = { # services.wallpaperRandomizer = {
Install = {WantedBy = ["graphical-session.target"];}; # Install = {WantedBy = ["graphical-session.target"];};
Unit = { # Unit = {
Description = "Set random desktop background using hyprpaper"; # Description = "Set random desktop background using hyprpaper";
After = ["graphical-session-pre.target"]; # After = ["graphical-session-pre.target"];
PartOf = ["graphical-session.target"]; # PartOf = ["graphical-session.target"];
}; # };
Service = { # Service = {
Type = "oneshot"; # Type = "oneshot";
ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer"; # ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
IOSchedulingClass = "idle"; # IOSchedulingClass = "idle";
}; # };
}; # };
timers.wallpaperRandomizer = { # timers.wallpaperRandomizer = {
Unit = {Description = "Set random desktop background using hyprpaper on an interval";}; # 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

@ -6,7 +6,9 @@
# waybar requires font-awesome # waybar requires font-awesome
home.packages = [ home.packages = [
pkgs.font-awesome pkgs.font-awesome
pkgs.font-awesome_5
pkgs.fira-code pkgs.fira-code
pkgs.pavucontrol
]; ];
# enable waybar # enable waybar
@ -34,17 +36,18 @@
]; ];
modules-center = [ modules-center = [
"clock" "clock"
"custom/notification"
]; ];
modules-right = [ modules-right = [
"tray"
# "temperature" # "temperature"
"group/expand" # "group/expand"
"bluetooth" # "bluetooth"
"pulseaudio"
# "network" # "network"
"mpd" # "mpd"
"battery" "battery"
"backlight" "backlight"
"custom/notification" "tray"
]; ];
# module specific settings # module specific settings
@ -104,37 +107,243 @@
format = "{capacity}% {icon}"; format = "{capacity}% {icon}";
format-charging = "{capacity}% 󰂄"; format-charging = "{capacity}% 󰂄";
format-plugged = "{capacity}% 󰂄 "; format-plugged = "{capacity}% 󰂄 ";
format-alt = "{time} {icon}";
format-icons = [ "󰁻" "󰁼" "󰁾" "󰂀" "󰂂" "󰁹" ]; format-icons = [ "󰁻" "󰁼" "󰁾" "󰂀" "󰂂" "󰁹" ];
}; };
"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 = "pavucontrol";
min-length = 13;
};
"tray" = {
spacing = 5;
};
}; };
}; };
style = '' style = ''
* { * {
border: none; border: none;
border-radius: 5px; border-radius: 0;
padding: 0px 5px 0px 5px; /* `otf-font-awesome` is required to be installed for icons */
margin: 0px 5px 0px 5px; font-family: Liberation Mono;
min-height: 20px;
}
window#waybar {
background: transparent;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces {
margin-right: 8px;
border-radius: 10px;
transition: none;
background: #383c4a;
}
#workspaces button {
transition: none;
color: #7c818c;
background: transparent;
padding: 5px;
font-size: 18px; font-size: 18px;
} }
window#waybar {
background-color: transparent; #workspaces button.persistent {
color: #7c818c;
font-size: 12px;
} }
#workspaces button {
padding-left: 1px; /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
padding-right: 1px; #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;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#clock {
padding-left: 16px;
padding-right: 16px;
border-radius: 10px 0px 0px 10px;
transition: none;
color: #ffffff;
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;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#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: #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;
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#battery {
margin-right: 8px;
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#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 {
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
} }
#workspaces {
padding-left: 1px;
padding-right: 1px;
} }
''; '';
# font-family: ${font};
# font-weight: ${font_weight};
# opacity: ${opacity};
# font-size: ${font_size};
}; };
} }

View File

@ -0,0 +1,18 @@
{
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
settings = {
General = {
Name = "Hello";
ControllerMode = "dual";
FastConnectable = "true";
Experimental = "true";
};
Policy = {
AutoEnable = "true";
};
};
};
services.blueman.enable = true;
}