From 78acefc0fb3abf163e875f19f10016c114e30db7 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 7 Mar 2025 17:38:39 +0200 Subject: [PATCH] smashing panel rework --- hosts/dunamis/stylix.nix | 14 +- modules/home/desktop/hyprland/default.nix | 162 ++++++++++------------ 2 files changed, 77 insertions(+), 99 deletions(-) diff --git a/hosts/dunamis/stylix.nix b/hosts/dunamis/stylix.nix index 26af5d3..3e113c5 100644 --- a/hosts/dunamis/stylix.nix +++ b/hosts/dunamis/stylix.nix @@ -12,17 +12,17 @@ ]; stylix = { enable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml"; - polarity = "dark"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow.yaml"; + polarity = "light"; cursor = { - package = pkgs.google-cursor; - name = "GoogleDot-Blue"; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; size = 24; }; image = builtins.fetchurl { - url = "https://w.wallhaven.cc/full/9m/wallhaven-9mwzwk.jpg"; - name = "wallhaven-9mwzwk"; - sha256 = "0pj2k30mfhqr02dzdj40z62awmy58s5gg5mm4xzxiialclbd5n8d"; + url = "https://w.wallhaven.cc/full/d6/wallhaven-d6163o.jpg"; + name = "wallhaven-d6163o"; + sha256 = "c6d298be1520546c0440d64d1073e33a356043e2481a8a67e940d5262c0c2e28"; }; opacity.terminal = 0.9; fonts = { diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index f30d8b9..2b40f67 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -8,7 +8,7 @@ }: let cfg = config.desktop.hyprland; hostname = osConfig.networking.hostName; - cursor_size = toString config.stylix.cursor.size; + cursor_size = config.stylix.cursor.size; colors = config.lib.stylix.colors; keyboard = if hostname == "eldrid" @@ -24,6 +24,8 @@ in { config = lib.mkIf cfg.enable { stylix.targets.waybar.enable = false; stylix.targets.hyprland.enable = false; + home.pointerCursor.hyprcursor.enable = true; + home.pointerCursor.hyprcursor.size = cursor_size; wayland.windowManager.hyprland = { enable = true; systemd = { @@ -80,7 +82,7 @@ in { "ELECTRON_OZONE_PLATFORM_HINT,auto" "QT_QPA_PLATFORM,wayland" "QT_QPA_PLATFORMTHEME,gtk3" - "XCURSOR_SIZE,${cursor_size}" + "XCURSOR_SIZE,${toString cursor_size}" "GSK_RENDERER,ngl" ]; decoration = { @@ -426,6 +428,12 @@ in { "noblur, title:Картинка в картинці" "float, title:Картинка в картинці" "pin, title:Картинка в картинці" + # and firefox + "noborder, title:Picture-in-Picture" + "keepaspectratio, title:Picture-in-Picture" + "noblur, title:Picture-in-Picture" + "float, title:Picture-in-Picture" + "pin, title:Picture-in-Picture" # screenshot editor "noanim, class:com.gabm.satty" "float, class:com.gabm.satty" @@ -508,7 +516,7 @@ in { gtk = { enable = true; iconTheme = { - name = "Papirus"; + name = "Papirus-Light"; package = pkgs.papirus-icon-theme; }; }; @@ -533,24 +541,30 @@ in { layer = "top"; position = "bottom"; height = 40; - spacing = 6; + spacing = 4; margin-left = 11; margin-right = 11; - margin-bottom = 8; + # margin-bottom = 8; reload_style_on_change = true; modules-left = [ #"custom/notification" - "clock" + "hyprland/language" + "custom/separator" + "hyprland/workspaces" + "custom/separator" "wlr/taskbar" ]; - modules-center = ["group/hypr" "custom/notification"]; + # modules-center = []; modules-right = [ - "privacy" - "tray" "wireplumber" - (lib.mkIf (hostname != "dunamis") - "group/laptop") + (lib.mkIf (hostname != "dunamis") "group/laptop") + "custom/separator" + "tray" + "privacy" "idle_inhibitor" + "custom/notification" + "custom/separator" + "clock" ]; "hyprland/workspaces" = { format = "{icon}"; @@ -582,17 +596,10 @@ in { format-uk = "🇺🇦"; }; "custom/separator" = { - format = "|"; + format = "󰇙"; interval = "once"; tooltip = false; }; - "group/hypr" = { - orientation = "inherit"; - modules = [ - "hyprland/language" - "hyprland/workspaces" - ]; - }; "group/laptop" = { orientation = "inherit"; drawer = { @@ -603,8 +610,8 @@ in { modules = [ "battery" "power-profiles-daemon" - "custom/separator" - "custom/kbd-backlight" + # "custom/separator" + # "custom/kbd-backlight" "custom/separator" "backlight" "custom/separator" @@ -618,35 +625,19 @@ in { "idle_inhibitor" = { format = "{icon}"; format-icons = { - activated = "󰈈"; - deactivated = "󰈉"; + activated = "󰅶"; + deactivated = "󰾪"; }; }; "tray" = { icon-size = 24; - spacing = 3; + spacing = 2; }; "clock" = { interval = 1; format = "{:%H:%M:%S}"; tooltip-format = "{:%d.%m.%Y}"; }; - "custom/backlight" = { - format = "{}% {icon}"; - interval = 1; - format-icons = ["󰃠"]; - exec = "sudo -u user -- ~/.local/bin/brightness.nu get-percentage"; - on-scroll-up = "sudo -u user -- ~/.local/bin/brightness.nu increase 2"; - on-scroll-down = "sudo -u user ~/.local/bin/brightness.nu decrease 2"; - }; - "custom/kbd-backlight" = { - exec = "~/.local/bin/keyboard-brightness.nu get-percentage"; - interval = 1; - format = "{}% {icon}"; - format-icons = ["󰌌"]; - on-scroll-up = "~/.local/bin/keyboard-brightness.nu increase"; - on-scroll-down = "~/.local/bin/keyboard-brightness.nu decrease"; - }; battery = { states = { good = 95; @@ -703,7 +694,7 @@ in { escape = true; }; "privacy" = { - # icon-spacing = 4; + icon-spacing = 2; icon-size = 16; transition-duration = 250; screenshare = { @@ -752,21 +743,28 @@ in { window#waybar { background-color: transparent; - /* border-top: 3px solid @overlay0; */ color: @base05; - /* padding: 0px 2px 0px 0px; */ transition-property: background-color; transition-duration: 0.5s; } .modules-left { - border-radius: 16px; - } - .modules-center { - border-radius: 16px; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + background-color: @base00; + color: @base05; + padding: 0 0.5em; } .modules-right { - border-radius: 16px; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + background-color: @base00; + color: @base05; + padding: 0 0.5em; } tooltip { @@ -776,16 +774,11 @@ in { tooltip label { color: @base05; } - /* .modules-center { - margin: 4px; - margin-top: 6px; - }*/ button { box-shadow: inset 0 -3px transparent; border-radius: 16px; } - /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ button:hover { background: inherit; box-shadow: inset 0 -3px transparent; @@ -825,13 +818,12 @@ in { #upower, #mpris, #mpd { - padding: 0 0.8em; - border-radius: 16px; + padding: 0; color: @base05; - background-color: @base00; + background-color: transparent; } - /* #upower, */ + /* #upower, #battery, #backlight, #custom-kbd-backlight, @@ -842,29 +834,33 @@ in { #network, #wireplumber, #power-profiles-daemon { - padding-right: 0.8em; + padding-right: 0.1em; + } */ + + #custom-separator { + padding: 0 0.3em; } - #language { - padding-right: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } #workspaces { font-weight: bold; - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - #taskbar, - #idle_inhibitor, - #workspaces { - padding: 0 0.5em; + #tray, + #tray button, + #privacy, + #idle_inhibitor { + padding: 0 0.2em; } - #taskbar button, + #workspaces button { padding: 0 0.2em; } + #taskbar button { + padding: 0 0.1em; + } + #taskbar { + padding: 0; + } #workspaces button.active { color: @base0D; } @@ -914,24 +910,6 @@ in { background-color: @base08; } - #idle_inhibitor { - padding: 0 0.9em; - } - - - #idle_inhibitor:hover { - box-shadow: inset 0 -3px @base05; - } - - #idle_inhibitor.activated { - background-color: @base05; - color: @base00; - } - - #idle_inhibitor.activated:hover { - box-shadow: inset 0 -3px @base00; - } - #laptop, #privacy { padding: 0em; @@ -957,14 +935,14 @@ in { settings = { drun-launch = true; anchor = "bottom"; - width = "99%"; - height = 40; + width = "50%"; + height = 38; padding-right = 6; padding-left = 6; padding-bottom = 2; padding-top = 2; - margin-bottom = 8; - border-width = 3; + margin-bottom = 2; + border-width = 0; corner-radius = 16; outline-width = 0; min-input-width = 192;