Implemented custom system for creating and distributing color schemes based on wallpapers, and also cycling through wallpapers.

nixfmt'd the codebase
This commit is contained in:
2026-03-09 22:02:46 -04:00
parent 4308b8eb16
commit 8ee748a997
145 changed files with 2776 additions and 1125 deletions

View File

@@ -1,4 +1,14 @@
{ host, nixvim, self, inputs, username, config, home-manager, ... }: {
{
host,
nixvim,
self,
inputs,
username,
config,
home-manager,
...
}:
{
imports = [
./gtk.nix
./spicetify.nix
@@ -6,10 +16,11 @@
./userservices.nix
./starship.nix
./userpkgs.nix
./zsh
./shed
./swaync.nix
./hyprland.nix
./waybar.nix
./zsh
./shed
./paperd
];
}

View File

@@ -1,16 +1,20 @@
{ lib, config, pkgs, ... }: {
{
lib,
config,
pkgs,
...
}:
{
options = {
movOpts.envConfig.gtkConfig.enable =
lib.mkEnableOption "enable my gtk options";
movOpts.envConfig.gtkConfig.enable = lib.mkEnableOption "enable my gtk options";
};
config = lib.mkIf config.movOpts.envConfig.gtkConfig.enable {
fonts.fontconfig.enable = true;
home.packages = with pkgs;
[
nerd-fonts.jetbrains-mono
nerd-fonts.symbols-only
cascadia-code
];
home.packages = with pkgs; [
nerd-fonts.jetbrains-mono
nerd-fonts.symbols-only
cascadia-code
];
gtk = {
enable = true;

View File

@@ -1,34 +1,46 @@
{ inputs, pkgs, lib, config, self, host, ... }:
{
inputs,
pkgs,
lib,
config,
self,
host,
...
}:
let
desktop = host == "oganesson" || host == "phosphorous";
screenshot_bind = if desktop then
[
"super, print, exec, grimblast copy area"
"super shift, print, exec, grimblast --freeze copy area"
]
else
[
# My laptop does not have a printscreen button
"super, insert, exec, grimblast copy area"
];
screenshot_bind =
if desktop then
[
"super, print, exec, grimblast copy area"
"super shift, print, exec, grimblast --freeze copy area"
]
else
[
# My laptop does not have a printscreen button
"super, insert, exec, grimblast copy area"
];
scheme = config.lib.stylix.colors;
mons = config.movOpts.envConfig.hyprlandConfig.monitorNames;
smartGapsWorkspaces = [
"w[tv1], gapsout:0, gapsin:0"
"f[1], gapsout:0, gapsin:0"
];
smartGapsWindowrules = [
"border_size 0, match:float 0, match:workspace w[tv1]"
"rounding 0, match:float 0, match:workspace w[tv1]"
"border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, match:float 0, match:workspace f[1]"
];
hostWorkspaces = if (host == "phosphorous") then
[
"m[DP-3], layoutopt:orientation:top"
]
else [];
in {
#smartGapsWorkspaces = [
#"w[tv1], gapsout:0, gapsin:0"
#"f[1], gapsout:0, gapsin:0"
#];
#smartGapsWindowrules = [
#"border_size 0, match:float 0, match:workspace w[tv1]"
#"rounding 0, match:float 0, match:workspace w[tv1]"
#"border_size 0, match:float 0, match:workspace f[1]"
#"rounding 0, match:float 0, match:workspace f[1]"
#];
hostWorkspaces =
if (host == "phosphorous") then
[
"m[DP-3], layoutopt:orientation:top"
]
else
[ ];
in
{
options = {
movOpts.envConfig.hyprlandConfig = {
@@ -41,7 +53,10 @@ in {
type = lib.types.listOf lib.types.str;
# The order of the monitor names matters for the purpose of workspace assignment
# For instance, in a dual monitor setup, index 0 gets 4,5 and 6, while index 1 gets 1,2 and 3
default = [ "DP-1" "HDMI-A-1" ];
default = [
"DP-1"
"HDMI-A-1"
];
};
};
};
@@ -58,23 +73,32 @@ in {
wayland
direnv
];
systemd.user.targets.hyprland-session.Unit.Wants =
[ "xdg-desktop-autostart.target" ];
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
wayland.windowManager.hyprland = {
enable = true;
xwayland = { enable = true; };
xwayland = {
enable = true;
};
systemd.enable = true;
extraConfig = ''
source = ~/.local/state/sysflake/hyprland-colors.conf
'';
};
wayland.windowManager.hyprland = {
settings = {
monitor = if (host == "oganesson") then [
"DP-1, 1920x1080@144, 1920x0, 1"
"HDMI-A-1, 1920x1080, 0x0, 1"
] else if (host == "phosphorous") then [
"DP-1, highrr, 0x0, 1"
"DP-3, highrr, -1080x-420, 1, transform, 3"
] else
[ "eDP-1, 1600x900, 0x0, 1" ];
monitor =
if (host == "oganesson") then
[
"DP-1, 1920x1080@144, 1920x0, 1"
"HDMI-A-1, 1920x1080, 0x0, 1"
]
else if (host == "phosphorous") then
[
"DP-1, highrr, 0x0, 1"
"DP-3, highrr, -1080x-420, 1, transform, 3"
]
else
[ "eDP-1, 1600x900, 0x0, 1" ];
exec-once = [
"waybar &"
@@ -87,26 +111,37 @@ in {
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
];
workspace = hostWorkspaces ++ (if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [
"1,persistent=true,monitor:${builtins.elemAt mons 0}"
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
"4,persistent=true,monitor:${builtins.elemAt mons 1}"
"5,persistent=true,monitor:${builtins.elemAt mons 1}"
"6,persistent=true,monitor:${builtins.elemAt mons 1}"
] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then [
"1,persistent=true,monitor:${builtins.elemAt mons 0} "
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
"4,persistent=true,monitor:${builtins.elemAt mons 0}"
] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then [
workspace =
hostWorkspaces
++ (
if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then
[
"1,persistent=true,monitor:${builtins.elemAt mons 0}"
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
"4,persistent=true,monitor:${builtins.elemAt mons 1}"
"5,persistent=true,monitor:${builtins.elemAt mons 1}"
"6,persistent=true,monitor:${builtins.elemAt mons 1}"
]
else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then
[
"1,persistent=true,monitor:${builtins.elemAt mons 0} "
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
"4,persistent=true,monitor:${builtins.elemAt mons 0}"
]
else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then
[
"1,persistent=true,monitor:${builtins.elemAt mons 2}"
"2,persistent=true,monitor:${builtins.elemAt mons 2}"
"3,persistent=true,monitor:${builtins.elemAt mons 1}"
"4,persistent=true,monitor:${builtins.elemAt mons 1}"
"5,persistent=true,monitor:${builtins.elemAt mons 0}"
"6,persistent=true,monitor:${builtins.elemAt mons 0}"
] else [ ]) ++ smartGapsWorkspaces;
]
else
[ ]
);
env = [
"XDG_CONFIG_HOME,$HOME/.config"
@@ -114,38 +149,38 @@ in {
"XDG_CACHE_HOME,$HOME/.cache"
];
layerrule = [
"match:namespace = waybar, blur 1"
"match:namespace = waybar, ignore_alpha 0"
"blur on, ignore_alpha 0, match:namespace waybar"
"match:namespace = launcher, blur 1"
];
windowrule = [
# From old windowrulev2
"float true, match:class ^(thunar)$, match:title ^(.*File Operation Progress.*)$"
"float true, match:class ^(firefox)$, match:title ^(Library)$"
"float true, match:class ^(thunar)$, match:title ^(File Operation Progress)$"
"float true, match:class ^(thunar)$, match:title ^(Confirm to replace files)$"
"float true, match:title ^(bwarn)$"
"no_initial_focus on, match:class ^(steam)$"
"float true, match:class ^(firefox)$, match:title ^( - Google Mozilla Firefox)$"
"float true, match:class ^(firefox)$, match:title ^(Firefox Sharing Indicator)$"
"float true, match:class ^(firefox)$, match:title ^(Firefox )$"
"float true, match:class ^(firefox)$, match:title ^(.*Sign in.*)$"
# From old windowrule
"float true, match:class ^(qt5ct)$"
"float true, match:class ^(zoom)$"
"float true, match:class ^(Steam)$"
"idle_inhibit focus, match:class ^(mpv)$"
"float true, match:title ^(Picture-in-Picture)$"
"float true, match:class ^(nm-connection-editor)$"
"float true, match:class ^(waypaper)$"
"float true, match:title ^(Sign In)(.*)$"
"float true, match:title ^(Firefox )$"
"no_focus on, match:title ^(Firefox )$"
"float true, match:class ^(firefox)$, match:title ^(Sign in - Google Accounts Mozilla Firefox)$"
"size 0 0, match:title ^(Firefox )$"
"move 100%-470 15, match:title ^(Firefox Sharing Indicator)$"
"move 100%-470 15, match:title ^(Firefox )$"
] ++ smartGapsWindowrules;
windowrule = [
# From old windowrulev2
"float true, match:class ^(thunar)$, match:title ^(.*File Operation Progress.*)$"
"float true, match:class ^(firefox)$, match:title ^(Library)$"
"float true, match:class ^(thunar)$, match:title ^(File Operation Progress)$"
"float true, match:class ^(thunar)$, match:title ^(Confirm to replace files)$"
"float true, match:title ^(bwarn)$"
"no_initial_focus on, match:class ^(steam)$"
"float true, match:class ^(firefox)$, match:title ^( - Google Mozilla Firefox)$"
"float true, match:class ^(firefox)$, match:title ^(Firefox Sharing Indicator)$"
"float true, match:class ^(firefox)$, match:title ^(Firefox )$"
"float true, match:class ^(firefox)$, match:title ^(.*Sign in.*)$"
# From old windowrule
"float true, match:class ^(qt5ct)$"
"float true, match:class ^(zoom)$"
"float true, match:class ^(Steam)$"
"idle_inhibit focus, match:class ^(mpv)$"
"float true, match:title ^(Picture-in-Picture)$"
"float true, match:class ^(nm-connection-editor)$"
"float true, match:class ^(waypaper)$"
"float true, match:title ^(Sign In)(.*)$"
"float true, match:title ^(Firefox )$"
"no_focus on, match:title ^(Firefox )$"
"float true, match:class ^(firefox)$, match:title ^(Sign in - Google Accounts Mozilla Firefox)$"
"size 0 0, match:title ^(Firefox )$"
"opacity 0.8, match:title ^(Neovide)$"
"move 100%-470 15, match:title ^(Firefox Sharing Indicator)$"
"move 100%-470 15, match:title ^(Firefox )$"
];
cursor = {
no_hardware_cursors = true;
@@ -154,24 +189,24 @@ in {
input = {
kb_layout = "us";
follow_mouse = 1;
accel_profile = "flat";
follow_mouse_threshold = 5;
force_no_accel = 1;
sensitivity = 0;
};
general = {
gaps_in = 5;
gaps_out = "0, 9, 9, 9"; # top, right, bottom, left
border_size = 3;
"col.active_border" = lib.mkForce "rgba(404042ff)";
"col.inactive_border" = lib.mkForce "rgba(83858a00)";
layout = "master";
resize_on_border = true;
general = {
gaps_in = 5;
gaps_out = "0, 9, 9, 9"; # top, right, bottom, left
border_size = 3;
"col.active_border" = lib.mkForce "rgba(404042ff)";
"col.inactive_border" = lib.mkForce "rgba(83858a00)";
layout = "master";
resize_on_border = true;
snap = {
enabled = true;
window_gap = 5;
};
};
snap = {
enabled = true;
window_gap = 5;
};
};
misc = {
font_family = "EnvyCodeR Nerd Font Mono";
disable_autoreload = true;
@@ -188,7 +223,6 @@ in {
};
dwindle = {
force_split = 2;
pseudotile = "yes";
preserve_split = "yes";
};
@@ -203,83 +237,92 @@ in {
decoration = {
rounding = 4;
blur = {
enabled = true;
size = 8;
passes = 2;
};
shadow = {
enabled = true;
ignore_window = true;
range = 80;
render_power = 50;
};
enabled = true;
ignore_window = true;
range = 20;
render_power = 50;
};
};
cursor = {
hide_on_key_press = true;
};
cursor = {
hide_on_key_press = true;
};
animations = {
enabled = true;
bezier = [
"myBezier, 0.16, 1, 0.3, 1"
"myBezier, 0.16, 1, 0.3, 1"
];
animation = [
"windows, 1, 7, myBezier, popin 80%"
"fade, 1, 7, myBezier"
"workspaces, 1, 6, myBezier, slidefade 80%"
"fade, 1, 7, myBezier"
"workspaces, 1, 6, myBezier, slidefade 80%"
];
};
bind = [
"super, up, exec, pactl set-sink-volume @default_sink@ +10%"
"super, down, exec, pactl set-sink-volume @default_sink@ -10%"
"super, t, exec, swaync-client -t -sw"
"super, a, exec, firefox"
"super, q, exec, kitty"
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty"
"super, c, killactive,"
"super shift, c,exec, hyprctl kill"
"super, e, exec, [float;size 40% 50%;move onscreen cursor -50% -50%] nemo"
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
"super shift, m, exit,"
"super, m, exec, fuzzel"
"super, r, exec, neovide"
"super, b, layoutmsg, togglesplit, # dwindle"
"super, comma, layoutmsg, rollnext" # comma
"super, period, layoutmsg, rollprev"
bind = [
"super, up, exec, pactl set-sink-volume @default_sink@ +10%"
"super, down, exec, pactl set-sink-volume @default_sink@ -10%"
"super, t, exec, swaync-client -t -sw"
"super, a, exec, firefox"
"super, q, exec, kitty"
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty"
"super, c, killactive,"
"super shift, c,exec, hyprctl kill"
"super, e, exec, [float;size 40% 50%;move onscreen cursor -50% -50%] nemo"
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
"super shift, m, exit,"
"super, m, exec, fuzzel"
"super, r, exec, neovide"
"super, b, layoutmsg, togglesplit, # dwindle"
"super, comma, exec, hyprctl dispatch layoutmsg rollnext; hyprctl dispatch layoutmsg focusmaster"
"super, period, exec, hyprctl dispatch layoutmsg rollprev; hyprctl dispatch layoutmsg focusmaster"
"super, n, layoutmsg, swapwithmaster"
"super, f, togglefloating"
"super, g, fullscreen"
"super, h, movefocus, l"
"super, l, movefocus, r"
"super, k, movefocus, u"
"super, j, movefocus, d"
"super, f, togglefloating"
"super, g, fullscreen"
"super, h, movefocus, l"
"super, l, movefocus, r"
"super, k, movefocus, u"
"super, j, movefocus, d"
"super, y, exec, /home/pagedmov/splitman-ipc.sh start"
"super, u, exec, /home/pagedmov/splitman-ipc.sh split"
"super, i, exec, /home/pagedmov/splitman-ipc.sh stop"
"super, o, exec, /home/pagedmov/splitman-ipc.sh pause"
"super shift, h, movewindow, l"
"super shift, l, movewindow, r"
"super shift, k, movewindow, u"
"super shift, j, movewindow, d"
"super, d, exec, switchmon"
"super, 1, exec, hyprctl 'dispatch workspace 1'"
"super, 2, exec, hyprctl 'dispatch workspace 2'"
"super, 3, exec, hyprctl 'dispatch workspace 3'"
"super, 4, exec, hyprctl 'dispatch workspace 4'"
"super, 5, exec, hyprctl 'dispatch workspace 5'"
"super, 6, exec, hyprctl 'dispatch workspace 6'"
"super shift, 1, movetoworkspace, 1"
"super shift, 2, movetoworkspace, 2"
"super shift, 3, movetoworkspace, 3"
"super shift, 4, movetoworkspace, 4"
"super shift, 5, movetoworkspace, 5"
"super shift, 6, movetoworkspace, 6"
"super, s, togglespecialworkspace, magic"
"super shift, s, movetoworkspace, special:magic"
] ++ screenshot_bind;
bindm =
[ "super, mouse:272, movewindow" "super, mouse:273, resizewindow" ];
"super shift, h, movewindow, l"
"super shift, l, movewindow, r"
"super shift, k, movewindow, u"
"super shift, j, movewindow, d"
"super, d, exec, switchmon"
"super, 1, exec, hyprctl 'dispatch workspace 1'"
"super, 2, exec, hyprctl 'dispatch workspace 2'"
"super, 3, exec, hyprctl 'dispatch workspace 3'"
"super, 4, exec, hyprctl 'dispatch workspace 4'"
"super, 5, exec, hyprctl 'dispatch workspace 5'"
"super, 6, exec, hyprctl 'dispatch workspace 6'"
"super shift, 1, movetoworkspace, 1"
"super shift, 2, movetoworkspace, 2"
"super shift, 3, movetoworkspace, 3"
"super shift, 4, movetoworkspace, 4"
"super shift, 5, movetoworkspace, 5"
"super shift, 6, movetoworkspace, 6"
"super, s, togglespecialworkspace, magic"
"super shift, s, movetoworkspace, special:magic"
]
++ screenshot_bind;
bindm = [
"super, mouse:272, movewindow"
"super, mouse:273, resizewindow"
];
};
};
};

View File

@@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./paperd.nix
];
}

View File

@@ -0,0 +1,35 @@
{
self,
pkgs,
lib,
...
}:
let
paperdScript = import ./paperd_script.nix { inherit pkgs; };
in
{
home.file.".config/paperd/config.toml".text = ''
wallpaper_dir = "${self}/assets/wallpapers/selective_color"
interval = 1800
[transition]
type = "fade"
duration = 3
fps = 60
'';
systemd.user.services = {
paperd = {
Unit = {
Description = "Paperd Wallpaper Daemon";
After = [ "swww-daemon.service" ];
Requires = [ "swww-daemon.service" ];
};
Install.WantedBy = [ "hyprland-session.target" ];
Service = {
Environment = "PYTHONUNBUFFERED=1";
ExecStart = "${pkgs.myPython}/bin/python3 ${paperdScript}";
};
};
};
}

View File

@@ -0,0 +1,89 @@
{ pkgs }:
let
themeBuilder = import ./theme_builder.nix { inherit pkgs; };
in
pkgs.writeText "paperd.py" /* python */ ''
import tomllib
import sys
import time
from pathlib import Path
from collections import deque
import subprocess
from pynvim import attach
config = None
with open(Path("~/.config/paperd/config.toml").expanduser(), "rb") as f:
config = tomllib.load(f)
interval = config["interval"]
paper_dir = Path(config["wallpaper_dir"])
transition = config.get("transition", {})
transition_type = transition.get("type")
transition_fps = transition.get("fps")
transition_duration = transition.get("duration")
transition_angle = transition.get("angle")
transition_step = transition.get("step")
exts = {".jpg", ".jpeg", ".png", ".webp"}
images = deque([f for f in Path(paper_dir).iterdir() if f.suffix.lower() in exts])
if len(images) == 0:
print("No images found in the specified directory.")
sys.exit(1)
def get_command():
command = ["${pkgs.swww}/bin/swww", "img"]
if transition_type:
command.append("--transition-type")
command.append(transition_type)
if transition_fps:
command.append("--transition-fps")
command.append(str(transition_fps))
if transition_duration:
command.append("--transition-duration")
command.append(str(transition_duration))
if transition_angle:
command.append("--transition-angle")
command.append(str(transition_angle))
if transition_step:
command.append("--transition-step")
command.append(str(transition_step))
command.append(str(images[0]))
return command
print(f"Found {len(images)} images. Starting wallpaper rotation every {interval} seconds.")
current_time = int(time.time())
initial_idx = (current_time // interval) % len(images)
command = get_command()
subprocess.run(command)
subprocess.run(["${pkgs.myPython}/bin/python3", "${themeBuilder}", str(images[0])])
print(f"Setting wallpaper to {images[0]} with transition {transition_type} (fps: {transition_fps}, duration: {transition_duration}, angle: {transition_angle}, step: {transition_step})")
images.rotate(-1)
last_check = current_time % interval
time.sleep(5)
while True:
current_time = int(time.time())
if (current_time % interval) >= last_check:
last_check = current_time % interval
time.sleep(5)
continue
command = get_command()
print(f"Setting wallpaper to {images[0]} with transition {transition_type} (fps: {transition_fps}, duration: {transition_duration}, angle: {transition_angle}, step: {transition_step})")
subprocess.run(command)
subprocess.run(["${pkgs.myPython}/bin/python3", "${themeBuilder}", str(images[0])])
images.rotate(-1)
last_check = current_time % interval
time.sleep(5)
''

View File

@@ -0,0 +1,474 @@
{ pkgs }:
pkgs.writeText "theme-builder.py" ''
from colorsys import rgb_to_hls, hls_to_rgb
from collections import Counter
from pathlib import Path
from PIL import Image
from pynvim import attach
import subprocess
import math
import os
import sys
STATE_DIR = Path(os.path.expanduser("~/.local/state/sysflake"))
MULT = 2.5
GRAYSCALE = {
"base00": "1a1a1a",
"base01": "2a2a2a",
"base02": "3a3a3a",
"base03": "5a5a5a",
"base04": "8a8a8a",
"base05": "b0b0b0",
"base06": "d0d0d0",
"base07": "e8e8e8",
"base08": "4a4a4a",
"base09": "555555",
"base0A": "606060",
"base0B": "6b6b6b",
"base0C": "767676",
"base0D": "818181",
"base0E": None, # accent slot
"base0F": "8c8c8c",
}
KITTY_MAP = {
"background": "00", "foreground": "05", "cursor": "05",
"selection_background": "02", "selection_foreground": "05",
"color0": "00", "color1": "08", "color2": "0E", "color3": "0A",
"color4": "0D", "color5": "0E", "color6": "0E", "color7": "05",
"color8": "03", "color9": "08", "color10": "0E", "color11": "0A",
"color12": "0D", "color13": "0E", "color14": "0E", "color15": "07",
}
def extract_accent(image_path):
img = Image.open(image_path).resize((200, 200)).quantize(colors=32).convert("RGB")
pixels = list(img.get_flattened_data())
counts = Counter(pixels)
total = len(pixels)
def score(color):
_, l, s = rgb_to_hls(color[0] / 255, color[1] / 255, color[2] / 255)
vibrancy = s * (1 - abs(l - 0.5) * 2)
frequency = counts[color] / total
return vibrancy * frequency
best = max(counts.keys(), key=score)
h, l, s = rgb_to_hls(best[0] / 255, best[1] / 255, best[2] / 255)
new_s = min(max(s * MULT, 0.6), 0.7)
# Blue hues are perceptually darker gradually boost lightness floor
blue_center = 0.63
blue_width = 0.09
blue_factor = max(0, 1 - abs(h - blue_center) / blue_width)
min_l = 0.45 + 0.2 * blue_factor
new_l = max(min_l, min(0.7, l))
r, g, b = hls_to_rgb(h, new_l, new_s)
return f"{int(r * 255):02x}{int(g * 255):02x}{int(b * 255):02x}"
def build_scheme(accent):
scheme = dict(GRAYSCALE)
scheme["base0E"] = accent
return scheme
def write_scheme(scheme):
path = STATE_DIR / "scheme.txt"
with open(path, "w") as f:
for key, val in scheme.items():
f.write(f"{key} {val}\n")
def write_kitty(scheme):
path = STATE_DIR / "kitty-colors.conf"
with open(path, "w") as f:
for name, base in KITTY_MAP.items():
f.write(f"{name} #{scheme['base' + base]}\n")
VESKTOP_DIR = Path(os.path.expanduser("~/.config/vesktop/themes"))
def hex_to_oklch(hex_color):
"""Convert hex color to oklch (lightness, chroma, hue) values."""
r = int(hex_color[0:2], 16) / 255
g = int(hex_color[2:4], 16) / 255
b = int(hex_color[4:6], 16) / 255
# sRGB to linear
def to_linear(c):
return c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4
lr, lg, lb = to_linear(r), to_linear(g), to_linear(b)
# Linear RGB to OKLab
l_ = 0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb
m_ = 0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb
s_ = 0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb
l_ = l_ ** (1/3) if l_ >= 0 else -((-l_) ** (1/3))
m_ = m_ ** (1/3) if m_ >= 0 else -((-m_) ** (1/3))
s_ = s_ ** (1/3) if s_ >= 0 else -((-s_) ** (1/3))
L = 0.2104542553 * l_ + 0.7936177850 * m_ - 0.0040720468 * s_
a = 1.9779984951 * l_ - 2.4285922050 * m_ + 0.4505937099 * s_
bv = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.8086757660 * s_
C = math.sqrt(a ** 2 + bv ** 2)
H = math.degrees(math.atan2(bv, a)) % 360
return L, C, H
def write_vesktop(scheme):
VESKTOP_DIR.mkdir(parents=True, exist_ok=True)
accent = scheme["base0E"]
_, chroma, hue = hex_to_oklch(accent)
path = VESKTOP_DIR / "system24-dynamic.css"
with open(path, "w") as f:
f.write("""\
/**
* system24 dynamic theme generated by theme-engine
*/
@import url('https://refact0r.github.io/system24/build/system24.css');
:root {
--colors: on;
/* override purple (accent) with extracted color */
""")
for i, lightness in enumerate([75, 70, 65, 60, 55], start=1):
f.write(f" --purple-{i}: oklch({lightness}% {chroma:.4f} {hue:.1f});\n")
f.write("}\n")
def write_nvim(scheme):
accent = scheme["base0E"]
path = STATE_DIR / "nvim-colors.lua"
with open(path, "w") as f:
f.write("require('base16-colorscheme').setup({\n")
for key, val in scheme.items():
f.write(f" {key} = '#{val}',\n")
f.write("})\n\n")
f.write(f"local accent = '#{accent}'\n")
f.write(f"local light_gray = '#{scheme['base05']}'\n")
for group in ["Statement", "Conditional", "Repeat", "Macro", "Function", "Exception",
"TSMethod", "@lsp.type.method", "@lsp.type.function", "@lsp.type.macro",
"DiagnosticUnderlineHint", "Boolean"]:
f.write(f"vim.api.nvim_set_hl(0, '{group}', {{ fg = accent }})\n")
for group in ["@lsp.type.variable", "@lsp.type.parameter", "@lsp.type.struct", "@lsp.type.class",
"@lsp.type.selfTypeKeyword", "Identifier"]:
f.write(f"vim.api.nvim_set_hl(0, '{group}', {{ fg = light_gray }})\n")
for group in ["@lsp.type.enumMember", "@lsp.type.enum", "Number", "Integer"]:
f.write(f"vim.api.nvim_set_hl(0, '{group}', {{ fg = '#{scheme['base04']}' }})\n")
def write_swaync(scheme):
accent = scheme["base0E"]
path = STATE_DIR / "swaync-colors.css"
with open(path, "w") as f:
f.write(f"""\
@define-color base #{scheme['base00']};
@define-color mantle #{scheme['base01']};
@define-color crust #{scheme['base00']};
@define-color text #{scheme['base05']};
@define-color subtext0 #{scheme['base04']};
@define-color subtext1 #{scheme['base05']};
@define-color surface0 #{scheme['base01']};
@define-color surface1 #{scheme['base02']};
@define-color surface2 #{scheme['base03']};
@define-color overlay0 #{scheme['base03']};
@define-color overlay1 #{scheme['base04']};
@define-color overlay2 #{scheme['base04']};
@define-color lavender #{accent};
""")
EZA_DIR = Path(os.path.expanduser("~/.config/eza"))
def write_eza(scheme):
EZA_DIR.mkdir(parents=True, exist_ok=True)
accent = f'"#{scheme["base0E"]}"'
file_color = f'"#{scheme["base05"]}"'
dim = f'"#{scheme["base04"]}"'
dimmer = f'"#{scheme["base03"]}"'
dark = f'"#{scheme["base02"]}"'
path = EZA_DIR / "theme.yml"
with open(path, "w") as f:
f.write(f"""\
filekinds:
normal:
foreground: {file_color}
directory:
foreground: {accent}
is_bold: true
is_underline: true
symlink:
foreground: {dim}
pipe:
foreground: {dimmer}
block_device:
foreground: {dim}
char_device:
foreground: {dim}
socket:
foreground: {dimmer}
special:
foreground: {dim}
executable:
foreground: {accent}
is_bold: true
mount_point:
foreground: {accent}
perms:
user_read:
foreground: {file_color}
user_write:
foreground: {dim}
user_execute_file:
foreground: {accent}
user_execute_other:
foreground: {accent}
group_read:
foreground: {dim}
group_write:
foreground: {dimmer}
group_execute:
foreground: {dim}
other_read:
foreground: {dimmer}
other_write:
foreground: {dimmer}
other_execute:
foreground: {dimmer}
special_user_file:
foreground: {accent}
special_other:
foreground: {dimmer}
attribute:
foreground: {dimmer}
size:
number_byte:
foreground: {file_color}
number_kilo:
foreground: {dim}
number_mega:
foreground: {dim}
number_giga:
foreground: {accent}
number_huge:
foreground: {accent}
unit_byte:
foreground: {dimmer}
unit_kilo:
foreground: {dimmer}
unit_mega:
foreground: {dimmer}
unit_giga:
foreground: {dimmer}
unit_huge:
foreground: {dimmer}
users:
user_you:
foreground: {file_color}
user_root:
foreground: {accent}
user_other:
foreground: {dim}
group_yours:
foreground: {dim}
group_other:
foreground: {dimmer}
group_root:
foreground: {accent}
links:
normal:
foreground: {dim}
multi_link_file:
foreground: {accent}
git:
new:
foreground: {accent}
modified:
foreground: {dim}
deleted:
foreground: {dimmer}
renamed:
foreground: {dim}
typechange:
foreground: {dim}
ignored:
foreground: {dark}
conflicted:
foreground: {accent}
git_repo:
branch_main:
foreground: {file_color}
branch_other:
foreground: {dim}
git_clean:
foreground: {accent}
git_dirty:
foreground: {dim}
file_type:
image:
foreground: {dim}
video:
foreground: {dim}
music:
foreground: {dim}
lossless:
foreground: {dim}
crypto:
foreground: {dimmer}
document:
foreground: {file_color}
compressed:
foreground: {dimmer}
temp:
foreground: {dark}
compiled:
foreground: {dimmer}
build:
foreground: {dimmer}
source:
foreground: {file_color}
punctuation:
foreground: {dimmer}
date:
foreground: {dim}
inode:
foreground: {dimmer}
blocks:
foreground: {dimmer}
header:
foreground: {file_color}
octal:
foreground: {dimmer}
flags:
foreground: {dim}
symlink_path:
foreground: {dim}
control_char:
foreground: {dimmer}
broken_symlink:
foreground: {accent}
broken_path_overlay:
foreground: {dark}
""")
def write_waybar(scheme):
accent = scheme["base0E"]
bg = scheme["base00"]
fg = scheme["base05"]
path = STATE_DIR / "waybar-colors.css"
with open(path, "w") as f:
f.write(f"@define-color accent #{accent};\n")
f.write(f"@define-color bg-dark #{bg};\n")
f.write(f"@define-color fg-text #{fg};\n")
def write_hyprland(scheme):
accent = scheme["base0E"]
inactive = scheme["base03"]
path = STATE_DIR / "hyprland-colors.conf"
with open(path, "w") as f:
f.write(f"general:col.active_border = rgba({accent}ff)\n")
f.write(f"general:col.inactive_border = rgba({inactive}ff)\n")
def reload_apps():
print("Reloading applications with new theme...")
subprocess.run(["pkill", "-SIGUSR1", "kitty"], capture_output=True)
print("Sent reload signal to Kitty.")
nvim_colors = STATE_DIR / "nvim-colors.lua"
for sock in Path("/run/user/1000").glob("nvim.*.0"):
try:
nvim = attach('socket', path=str(sock))
nvim.command(f"luafile {nvim_colors}")
print(f"Sent reload command to Neovim instance at {sock}.")
except Exception as e:
print(f"Failed to connect to Neovim instance at {sock}: {e}")
# Live-update hyprland borders
scheme = {}
for line in open(STATE_DIR / "scheme.txt"):
k, v = line.split()
scheme[k] = v
subprocess.run(["hyprctl", "keyword", "general:col.active_border", f"rgba({scheme['base0E']}ff)"], capture_output=True)
subprocess.run(["hyprctl", "keyword", "general:col.inactive_border", f"rgba({scheme['base03']}ff)"], capture_output=True)
print("Updated Hyprland border colors.")
# Reload swaync styles
subprocess.run(["swaync-client", "-rs"], capture_output=True)
print("Sent reload signal to Swaync.")
# Reload waybar
subprocess.run(["pkill", "-SIGUSR2", "waybar"], capture_output=True)
print("Sent reload signal to Waybar.")
def main():
if len(sys.argv) < 2:
print("Usage: theme-engine.py <image-path>", file=sys.stderr)
sys.exit(1)
STATE_DIR.mkdir(parents=True, exist_ok=True)
accent = extract_accent(sys.argv[1])
scheme = build_scheme(accent)
print(f"Extracted accent color: #{accent}")
write_scheme(scheme)
print("Scheme written to state directory.")
write_kitty(scheme)
print("Kitty config written.")
write_vesktop(scheme)
print("Vesktop theme written.")
write_nvim(scheme)
print("Neovim colors written.")
write_hyprland(scheme)
print("Hyprland colors written.")
write_swaync(scheme)
print("Swaync colors written.")
write_eza(scheme)
print("Eza theme written.")
write_waybar(scheme)
print("Waybar colors written.")
reload_apps()
print("Sent reload signals to applications.")
print(f"Accent: #{accent}")
print(f"Scheme written to {STATE_DIR / 'scheme.txt'}")
print(f"Kitty config written to {STATE_DIR / 'kitty-colors.conf'}")
print(f"Vesktop theme written to {VESKTOP_DIR / 'system24-dynamic.css'}")
print(f"Neovim colors written to {STATE_DIR / 'nvim-colors.lua'}")
print(f"Hyprland colors written to {STATE_DIR / 'hyprland-colors.conf'}")
print(f"Swaync colors written to {STATE_DIR / 'swaync-colors.css'}")
print(f"Eza theme written to {EZA_DIR / 'theme.yml'}")
print(f"Waybar colors written to {STATE_DIR / 'waybar-colors.css'}")
if __name__ == "__main__":
main()
''

View File

@@ -1,4 +1,10 @@
{ lib, config, pkgs, self, ... }:
{
lib,
config,
pkgs,
self,
...
}:
{
programs.shed = {
aliases = {
@@ -20,7 +26,7 @@
mkexe = "chmod +x";
shortdate = "date +%m-%d-%y";
suvi = "sudoedit";
suvide = "EDITOR=neovide; suvi";
suvide = "EDITOR=neovide suvi";
rustdev = "nix develop github:km-clay/devshells#rust";
y = "yazi";
@@ -29,6 +35,8 @@
gpush = "gitpush_sfx";
gpull = "gitpull_sfx";
grebase = "gitrebase_sfx";
videconf = "EDITOR=neovide viconf";
nix-shell = "command nix-shell --command 'exec shed'";
};
};
}

View File

@@ -1,4 +1,10 @@
{ lib, config, self, pkgs, ... }:
{
lib,
config,
self,
pkgs,
...
}:
let
shellsound = "${pkgs.myScripts.playshellsound}/bin/playshellsound";
color-commit = "${pkgs.myScripts.color-commit}/bin/color-commit";
@@ -15,6 +21,8 @@ in
if [ "$0" = "-shed" ]; then
${shellsound} $FLAKEPATH/assets/sound/login.wav
fi
if [ -n "$LS_COLORS" ]; then unset LS_COLORS; fi
'';
};
}

View File

@@ -276,7 +276,6 @@ in
ls = /* bash */ ''
eza -1 --group-directories-first --icons "$@"
${shellsound} ${sndpath}/ls.wav
'';
mkcd = /* bash */ ''
@@ -286,7 +285,6 @@ in
cd = /* bash */ ''
eza -1 --group-directories-first --icons "$@" 2> /dev/null
builtin cd "$@"
${shellsound} ${sndpath}/cd.wav
'';
hyprsock = /* bash */ ''

View File

@@ -2,7 +2,7 @@
{
programs.shed = {
functions = {
_read_obj= /* bash */ ''
_read_obj = /* bash */ ''
_obj=""
while read_key -v key; do
if [[ "''${#_obj}" -ge 3 ]]; then return 1; fi

View File

@@ -1,16 +1,21 @@
{ lib, config, pkgs, inputs, ... }:
{
lib,
config,
pkgs,
inputs,
...
}:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
scheme = config.lib.stylix.colors;
in {
in
{
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
options = {
movOpts.envConfig.spicetifyConfig.enable =
lib.mkEnableOption "enable my spicetify options";
movOpts.envConfig.spicetifyConfig.enable = lib.mkEnableOption "enable my spicetify options";
};
config = lib.mkIf config.movOpts.envConfig.spicetifyConfig.enable {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "spotify" ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" ];
programs.spicetify = {
enable = true;

View File

@@ -1,7 +1,12 @@
{ config, lib, inputs, ... }: {
{
config,
lib,
inputs,
...
}:
{
options = {
movOpts.envConfig.starshipConfig.enable =
lib.mkEnableOption "enables my starship configuration";
movOpts.envConfig.starshipConfig.enable = lib.mkEnableOption "enables my starship configuration";
};
config = lib.mkIf config.movOpts.envConfig.starshipConfig.enable {
programs.starship = {

View File

@@ -1,19 +1,24 @@
{ lib, self, config, host, pkgs, ... }:
{
lib,
self,
config,
host,
pkgs,
...
}:
let
scheme = "seti";
wallpaper = "${self}/assets/wallpapers/dark-waves.jpg";
server = (host == "xenon");
in {
in
{
options = {
movOpts.envConfig.stylixHomeConfig.enable =
lib.mkEnableOption "enables my stylix Home-Manager options";
movOpts.envConfig.stylixHomeConfig.enable = lib.mkEnableOption "enables my stylix Home-Manager options";
};
config = lib.mkIf config.movOpts.envConfig.stylixHomeConfig.enable {
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/${scheme}.yaml";
image = wallpaper;
polarity = "dark";
autoEnable = true;
targets = {

View File

@@ -1,7 +1,12 @@
{ lib, config, pkgs, ... }: {
{
lib,
config,
pkgs,
...
}:
{
options = {
movOpts.envConfig.swayncConfig.enable =
lib.mkEnableOption "enables my swaync configuration";
movOpts.envConfig.swayncConfig.enable = lib.mkEnableOption "enables my swaync configuration";
};
config = lib.mkIf config.movOpts.envConfig.swayncConfig.enable {
home.packages = with pkgs; [ swaynotificationcenter ];
@@ -608,6 +613,8 @@
.right.overlay-indicator {
all: unset;
}
@import url("file:///home/pagedmov/.local/state/sysflake/swaync-colors.css");
'';
xdg.configFile."swaync/config.json".text = ''
{

View File

@@ -1,4 +1,11 @@
{ inputs, lib, config, pkgs, self, ... }:
{
inputs,
lib,
config,
pkgs,
self,
...
}:
let
scripts = with pkgs; [
@@ -25,74 +32,76 @@ let
myScripts.color-commit
myScripts.mntstack
];
pythonWithStuff = pkgs.python3.withPackages(ps: with ps; [ requests ]);
in {
in
{
options = {
movOpts.envConfig.userPkgs.enable =
lib.mkEnableOption "enables my default user packages";
movOpts.envConfig.userPkgs.enable = lib.mkEnableOption "enables my default user packages";
};
config = lib.mkIf config.movOpts.envConfig.userPkgs.enable {
home.packages = with pkgs; [
cargo
rustc
clippy
rust-analyzer
nerd-fonts.envy-code-r
clippy
rust-analyzer
nemo
feh
gtk3
vicut
imagemagick
vlc
lolcat
vesktop
zsh
zsh-syntax-highlighting
zsh-history-substring-search
zsh-autosuggestions
#libreoffice
gtrash
ripgrep
wf-recorder
toilet
vkbasalt
firefox
spotify
zathura
tor
tor-browser
chromium
obs-studio
gparted
dust
porsmo
w3m
sox
neovide
claude-code
pythonWithStuff
monero-cli
protonup-qt
piper
libratbag
ghostty
firefox
fd
delta
glfw
mesa-demos
xwayland
discord
cloc
wine
gimp
fira-code
nerd-fonts.fira-code
nodejs_latest
myPkgs.noto-sans-jp
myPkgs.billy-font
] ++ scripts;
home.packages =
with pkgs;
[
cargo
rustc
clippy
rust-analyzer
nerd-fonts.envy-code-r
clippy
rust-analyzer
nemo
feh
gtk3
vicut
imagemagick
vlc
lolcat
vesktop
zsh
zsh-syntax-highlighting
zsh-history-substring-search
zsh-autosuggestions
#libreoffice
gtrash
ripgrep
wf-recorder
toilet
vkbasalt
firefox
spotify
zathura
tor
tor-browser
chromium
obs-studio
gparted
dust
porsmo
w3m
sox
neovide
claude-code
myPython
monero-cli
protonup-qt
piper
libratbag
ghostty
firefox
fd
delta
glfw
mesa-demos
xwayland
discord
cloc
wine
gimp
fira-code
nerd-fonts.fira-code
nodejs_latest
myPkgs.noto-sans-jp
myPkgs.billy-font
]
++ scripts;
};
}

View File

@@ -1,27 +1,37 @@
{ pkgs, self, ... }:
let
pythonWithPkgs = pkgs.python3.withPackages (p: [ p.evdev ]);
keyboardSfxScript = "${self}/assets/scripts/keyboard_sound_thing.py";
in
{
systemd.user = {
timers = {
maintenanceCheck = {
Unit = { Description = "Timer for package maintenance check"; };
Unit = {
Description = "Timer for package maintenance check";
};
Timer = {
OnCalendar = "hourly";
Persistent = true;
};
Install = { WantedBy = [ "timers.target" ]; };
Install = {
WantedBy = [ "timers.target" ];
};
};
};
services = {
swww-daemon = {
Unit.Description = "Daemon for swww (sway wayland wallpaper manager)";
Install.WantedBy = [ "hyprland-session.target" ];
Service = {
ExecStart = "${pkgs.swww}/bin/swww-daemon";
};
};
kitty-keyboard-sounds = {
description = "Keyboard sound effects for kitty";
wantedBy = [ "hyprland-session.target" ];
serviceConfig = {
ExecStart = "${pythonWithPkgs}/bin/python3 ${keyboardSfxScript}";
Unit.Description = "Keyboard sound effects for kitty";
Install.WantedBy = [ "hyprland-session.target" ];
Service = {
ExecStart = "${pkgs.myPython}/bin/python3 ${keyboardSfxScript}";
};
};
};

View File

@@ -1,4 +1,10 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
self,
...
}:
let
layout = config.movOpts.envConfig.hyprlandConfig.workspaceLayout;
@@ -27,226 +33,245 @@ let
"20" = "20";
};
persistent-workspaces =
if (layout == "singlemonitor") then {
"${builtins.elemAt monitors 0}" = [ 1 2 3 4 ];
} else if (layout == "dualmonitor") then {
"${builtins.elemAt monitors 0}" = [ 1 2 3 ];
"${builtins.elemAt monitors 1}" = [ 4 5 6 ];
} else if (layout == "trimonitor") then {
"${builtins.elemAt monitors 2}" = [ 1 2 ];
"${builtins.elemAt monitors 1}" = [ 3 4 ];
"${builtins.elemAt monitors 0}" = [ 5 6 ];
} else
if (layout == "singlemonitor") then
{
"${builtins.elemAt monitors 0}" = [
1
2
3
4
];
}
else if (layout == "dualmonitor") then
{
"${builtins.elemAt monitors 0}" = [
1
2
3
];
"${builtins.elemAt monitors 1}" = [
4
5
6
];
}
else if (layout == "trimonitor") then
{
"${builtins.elemAt monitors 2}" = [
1
2
];
"${builtins.elemAt monitors 1}" = [
3
4
];
"${builtins.elemAt monitors 0}" = [
5
6
];
}
else
{ };
};
scheme = config.lib.stylix.colors;
bg = {
darkester = scheme.base00;
darkest = scheme.base01;
darker = scheme.base02;
dark = scheme.base03;
};
fg = {
lightester = scheme.base07;
lightest = scheme.base06;
lighter = scheme.base05;
light = scheme.base04;
};
monitors = config.movOpts.envConfig.hyprlandConfig.monitorNames;
bar-gauge = [
""
""
""
""
""
""
""
""
""
];
bar-gauge-critical = [
""
""
""
""
""
""
""
"<span color='#F07178'>!!!!!!!!</span>"
"<span color='#F07178'>CRITICAL</span>"
];
in {
in
{
options = {
movOpts.envConfig.waybarConfig.enable =
lib.mkEnableOption "enables my waybar configuration";
movOpts.envConfig.waybarConfig.enable = lib.mkEnableOption "enables my waybar configuration";
};
config = {
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (oa: {
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
});
settings = {
mainBar = {
layer = "top";
output = if layout == "singlemonitor" then builtins.elemAt monitors 0
else builtins.elemAt monitors 1;
output = monitors;
position = "top";
name = "mainBar";
name = "waybar";
margin-left = 0;
margin-top = 0;
margin-right = 0;
mode = "dock";
exclusive = true;
passthrough = false;
exclusive = true;
passthrough = false;
"gtk-layer-shell" = true;
modules-left = [ "clock" "hyprland/workspaces" "tray" ];
modules-center = [];
modules-right = [ "cpu" "memory" "pulseaudio" "network" ];
modules-left = [
"tray"
"hyprland/workspaces"
];
modules-center = [ "hyprland/window" ];
"hyprland/window" = {
format = "<span color='#aaaaaa'>{title}</span>";
};
modules-right = [
"cpu"
"memory"
"pulseaudio"
"network"
"clock"
"image#nixicon"
];
"hyprland/workspaces" = workspaces;
clock = {
format = "[ CLK: {:%H.%M <span size='8pt'> %a %b %d</span>} ]";
tooltip-format = "<tt>{calendar}</tt>";
calendar = {
mode = "month";
weeks-pos = "";
on-scroll = 1;
format = {
months = "<span size='16pt'><b>CAL: {}\n</b></span>";
days = "<span size='16pt'><b>{}</b></span>";
weeks = "<span size='16pt'><b>{}</b></span>";
weekdays = "<span size='16pt'><b>{}</b></span>";
today = "<span color='#E6E1CF'><b>{}</b></span>";
};
};
actions = {
on-scroll-up = "shift_down";
on-scroll-down = "shift_up";
};
format = "󱑍 <span color='#aaaaaa'>{:%H:%M}</span>";
};
pulseaudio = {
format = "VOL: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{volume}%</span>";
tooltip = true;
tooltip-format = "DEVICE: {desc}";
format-muted = "VOL: <span color='#F07178'>[ XXXXXXXX ] <span size='8pt'>{volume}%</span></span>";
on-click = "if [ $(pamixer --get-mute) == true ]; then pamixer --unmute; else pamixer --mute; fi";
on-scroll-up = "pamixer -i 2";
on-scroll-down = "pamixer -d 2";
scroll-step = 2;
reverse-scrolling = true;
format-icons = bar-gauge;
};
pulseaudio = {
format = " <span color='#aaaaaa'>{volume}%</span>";
tooltip = true;
tooltip-format = "{desc}";
format-muted = " <span color='#aaaaaa'>{volume}%</span>";
on-click = "if [ $(pamixer --get-mute) == true ]; then pamixer --unmute; else pamixer --mute; fi";
on-scroll-up = "pamixer -i 2";
on-scroll-down = "pamixer -d 2";
scroll-step = 2;
reverse-scrolling = true;
};
network = {
format-wifi = "[ <span color='#B8CC52'>ONLINE</span> ]";
format-ethernet = "[ <span color='#B8CC52'>ONLINE</span> ]";
tooltip-format-wifi = "ESSID\t: {essid}\nSTRNGTH\t: {signaldBm}\n\nADDRESS\t: {ipaddr}\nGATE\t: {gwaddr}\nMASK\t: {netmask} | {cidr}";
tooltip-format-ethernet = "IFNAME: {ifname}\nADDRESS: {ipaddr}";
format-disconnected = "[ <span color='#F07178'>XXXXXX</span> ]";
on-click = "nm-connection-editor";
};
network = {
format-wifi = "󰖩 <span color='#aaaaaa'>{essid}</span>";
format-ethernet = " <span color='#aaaaaa'>{ifname}</span>";
tooltip-format-wifi = "ESSID\t: {essid}\nSTRNGTH\t: {signaldBm}\n\nADDRESS\t: {ipaddr}\nGATE\t: {gwaddr}\nMASK\t: {netmask} | {cidr}";
tooltip-format-ethernet = "IFNAME: {ifname}\nADDRESS: {ipaddr}";
format-disconnected = "󱚼";
on-click = "nm-connection-editor";
};
memory = {
interval = 20;
format = "MEM: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{percentage}%</span>";
tooltip-format = "MEM_TOT\t: {total}GiB\nSWP_TOT\t: {swapTotal}GiB\n\nMEM_USD\t: {used:0.1f}GiB\nSWP_USD\t: {swapUsed:0.1f}GiB";
format-icons = bar-gauge-critical;
};
"image#nixicon" = {
path = "/home/pagedmov/.sysflake/assets/images/nix-snowflake-colours.svg";
size = 28;
};
cpu = {
memory = {
interval = 20;
format = " <span color='#aaaaaa'>{percentage}%</span>";
tooltip-format = "MEM_TOT\t: {total}GiB\nSWP_TOT\t: {swapTotal}GiB\n\nMEM_USD\t: {used:0.1f}GiB\nSWP_USD\t: {swapUsed:0.1f}GiB";
};
interval = 1;
format = "CPU: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{usage}%</span>";
tooltip = true;
format-icons = bar-gauge-critical;
};
cpu = {
interval = 1;
format = "󰍛 <span color='#aaaaaa'>{usage}%</span>";
tooltip = true;
};
};
};
style = ''
* {
font-size: 16px;
border: none;
font-family: EnvyCodeR Nerd Font Mono;
font-weight: Bold;
min-height: 0;
border-radius: 0px;
padding: 2px;
}
@define-color accent #CF1B30;
@define-color bg-dark #1a1a1a;
@define-color bg-island #2a2a2a;
@define-color fg-dim #aaaaaa;
@define-color fg-text #d0d0d0;
window#waybar {
color: #${fg.lightest};
background: #${bg.darkester};
}
* {
font-size: 20px;
border: none;
font-family: EnvyCodeR Nerd Font Mono;
font-weight: bold;
min-height: 0;
border-radius: 0;
}
tooltip {
background: #${bg.darkester};
}
window#waybar {
background: rgba(0, 0, 0, 0.05);
color: @fg-text;
}
#workspaces button {
color: #${fg.lightest};
background: #${bg.darkester};
}
tooltip {
background: @bg-dark;
border: 2px solid @accent;
border-radius: 8px;
}
#workspaces button.active {
color: #${bg.darker};
background: #${bg.darkester};
}
/* Tray island (far left) */
#tray {
background-color: @bg-dark;
color: @accent;
border: 2px solid @accent;
border-radius: 8px;
padding: 4px 8px;
margin: 6px 4px 6px 10px;
}
#workspaces button.focused {
color: #${bg.dark};
background: #${bg.darkester};
}
/* Workspaces island */
#workspaces {
background-color: @bg-dark;
border: 2px solid @accent;
border-radius: 8px;
margin: 6px 4px;
padding: 0 4px;
}
#workspaces button.urgent {
color: #${fg.lightest};
background: #${bg.darkester};
}
#workspaces button {
color: @fg-dim;
background: transparent;
padding: 4px 8px;
border-radius: 6px;
margin: 2px;
}
#workspaces button:hover {
color: #${fg.lightest};
background: #${bg.darkester};
}
#workspaces button.active {
color: @bg-dark;
background-color: @accent;
}
#window,
#clock,
#pulseaudio,
#network,
#workspaces,
#tray,
#cpu {
padding: 0px 10px;
margin: 0px;
}
#workspaces button:hover {
color: @bg-dark;
background-color: alpha(@accent, 0.5);
}
#tray {
margin-right: 10px;
}
/* Right info modules island */
#cpu,
#memory,
#pulseaudio,
#network,
#window,
#clock {
background-color: @bg-dark;
color: @accent;
border-top: 2px solid @accent;
border-bottom: 2px solid @accent;
padding: 4px 10px;
margin: 6px 0;
}
#workspaces {
color: #${fg.lightest};
}
/* Window title island (center) */
#window {
border-radius: 8px;
border-left: 2px solid @accent;
border-right: 2px solid @accent;
margin: 6px 4px;
}
#window {
color: #${fg.lightest};
}
/* round left edge of first module in the group */
#cpu {
border-radius: 8px 0 0 8px;
border-left: 2px solid @accent;
margin-left: 4px;
}
#clock {
color: #${fg.lightest};
}
/* round right edge of last module before nixicon */
#clock {
border-radius: 0 8px 8px 0;
border-right: 2px solid @accent;
margin-right: 4px;
}
#network {
color: #${fg.lightest};
}
/* NixOS icon island (far right, outlined) */
#image {
background-color: @bg-dark;
color: @accent;
border: 2px solid @accent;
border-radius: 8px;
padding: 4px 10px;
margin: 6px 10px 6px 4px;
}
#pulseaudio {
color: #${fg.lightest};
}
@import url("file:///home/pagedmov/.local/state/sysflake/waybar-colors.css");
'';
};
};

View File

@@ -1,6 +1,12 @@
{ lib, config, self, ... }:
{
options.movOpts.envConfig.zshConfig.shellAliases.enable = lib.mkEnableOption "enables my zsh aliases";
lib,
config,
self,
...
}:
{
options.movOpts.envConfig.zshConfig.shellAliases.enable =
lib.mkEnableOption "enables my zsh aliases";
config = lib.mkIf config.movOpts.envConfig.zshConfig.shellAliases.enable {
programs.zsh = {
shellAliases = {

View File

@@ -1,4 +1,9 @@
{ lib, config, self, ... }:
{
lib,
config,
self,
...
}:
{
imports = [

View File

@@ -2,7 +2,8 @@
{
options = {
movOpts.envConfig.zshConfig.envVariables.enable = lib.mkEnableOption "enables my default session variables";
movOpts.envConfig.zshConfig.envVariables.enable =
lib.mkEnableOption "enables my default session variables";
};
config = lib.mkIf config.movOpts.envConfig.zshConfig.envVariables.enable {
programs.zsh = {

View File

@@ -1,4 +1,10 @@
{ lib, config, self, pkgs, ... }:
{
lib,
config,
self,
pkgs,
...
}:
let
shellsound = "${pkgs.myScripts.playshellsound}/bin/playshellsound";
@@ -8,7 +14,8 @@ let
in
{
options = {
movOpts.envConfig.zshConfig.extraConfig.enable = lib.mkEnableOption "enables my extra shell configurations";
movOpts.envConfig.zshConfig.extraConfig.enable =
lib.mkEnableOption "enables my extra shell configurations";
};
config = lib.mkIf config.movOpts.envConfig.zshConfig.extraConfig.enable {
programs.zsh = {

View File

@@ -2,7 +2,8 @@
{
options = {
movOpts.envConfig.zshConfig.shellOptions.enable = lib.mkEnableOption "enables my default shell settings";
movOpts.envConfig.zshConfig.shellOptions.enable =
lib.mkEnableOption "enables my default shell settings";
};
config = lib.mkIf config.movOpts.envConfig.zshConfig.shellOptions.enable {
programs.zoxide = {