From efd43899305e40f7dc8248409cb629009ecaa8ac Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Mon, 2 Feb 2026 19:14:28 +0100 Subject: made hyprland config better hopefully --- modules/home/hyprland/chernobyl/default.nix | 2 + modules/home/hyprland/chernobyl/hyprland.nix | 39 +++++- modules/home/hyprland/chernobyl/rofi.nix | 111 ++++++++++++++++ modules/home/hyprland/chernobyl/waybar.nix | 187 +++++++++++++++++++++++++++ 4 files changed, 333 insertions(+), 6 deletions(-) create mode 100644 modules/home/hyprland/chernobyl/rofi.nix create mode 100644 modules/home/hyprland/chernobyl/waybar.nix (limited to 'modules/home/hyprland') diff --git a/modules/home/hyprland/chernobyl/default.nix b/modules/home/hyprland/chernobyl/default.nix index 68ffecc..eecfa60 100644 --- a/modules/home/hyprland/chernobyl/default.nix +++ b/modules/home/hyprland/chernobyl/default.nix @@ -6,5 +6,7 @@ ./fastfetch.nix ./hyprland.nix ./kitty.nix + ./waybar.nix + ./rofi.nix ]; } \ No newline at end of file diff --git a/modules/home/hyprland/chernobyl/hyprland.nix b/modules/home/hyprland/chernobyl/hyprland.nix index 5e4a8c6..888b41e 100644 --- a/modules/home/hyprland/chernobyl/hyprland.nix +++ b/modules/home/hyprland/chernobyl/hyprland.nix @@ -4,19 +4,35 @@ wayland.windowManager.hyprland = { enable = true; plugins = with pkgs.hyprlandPlugins; [ - #hyprbars - #borders-plus-plus - #hyprexpo - #hyprfocus + hyprbars + borders-plus-plus + hyprexpo + hyprfocus ]; settings = { "$mod" = "SUPER"; + # Monitor configuration + monitor = ",preferred,auto,1.5"; + + # Environment variables for Wayland rendering + env = [ + "LIBVA_DRIVER_NAME,nvidia" + "XDG_SESSION_TYPE,wayland" + "GDK_SCALE,1" + "OZONE_PLATFORM,wayland" + "QT_QPA_PLATFORM,wayland" + "QT_AUTO_SCREEN_SCALE_FACTOR,1" + "SDL_VIDEODRIVER,wayland" + "CLUTTER_BACKEND,wayland" + ]; + # Startup commands exec-once = [ "dunst" "nm-applet" "blueman-applet" + "waybar" ]; # Regular keybindings @@ -49,8 +65,8 @@ # Layout switching "$mod, S, layoutmsg, togglesplit" - "$mod, W, layoutmsg, preselect, l" - "$mod, E, layoutmsg, preselect, r" + "$mod, W, layoutmsg, preselect l" + "$mod, E, layoutmsg, preselect r" # Reload "$mod SHIFT, C, exec, hyprctl reload" @@ -115,6 +131,11 @@ decoration = { rounding = 15; + blur = { + enabled = true; + size = 3; + passes = 1; + }; shadow = { enabled = true; range = 4; @@ -142,6 +163,12 @@ pseudotile = true; preserve_split = true; }; + + # Window rules for VSCode and other apps + windowrulev2 = [ + "suppressevent maximize, class:.*" + "windowrule=tile, class:^(VSCodium|Code)$" + ]; }; }; } \ No newline at end of file diff --git a/modules/home/hyprland/chernobyl/rofi.nix b/modules/home/hyprland/chernobyl/rofi.nix new file mode 100644 index 0000000..477751f --- /dev/null +++ b/modules/home/hyprland/chernobyl/rofi.nix @@ -0,0 +1,111 @@ +{ pkgs, ... }: + +{ + programs.rofi = { + enable = true; + location = "center"; + cycle = true; + terminal = "${pkgs.kitty}/bin/kitty"; + modes = [ "drun" "ssh" "emoji" "calc" ]; + plugins = with pkgs; [ rofi-emoji rofi-calc ]; + extraConfig = { + lines = 20; + columns = 1; + font = "Fira Code 12"; + width = 40; + show-icons = true; + icon-theme = "Papirus"; + matching = "fuzzy"; + sorting-method = "fzf"; + drun-display-format = "{icon} {name}"; + }; + theme = '' + * { + bg0: #1c182d; + bg1: #2b2135; + bg2: #3d3547; + fg0: #d0b6fd; + fg1: #b12cbf; + border-col: #b12cbf; + } + + window { + background-color: @bg0; + border: 3px solid @border-col; + border-radius: 15px; + padding: 20px; + } + + mainbox { + background-color: @bg0; + children: [ inputbar message-box listview ]; + spacing: 15px; + } + + inputbar { + background-color: @bg1; + border: 2px solid @border-col; + border-radius: 10px; + padding: 10px 15px; + children: [ prompt entry ]; + } + + prompt { + text-color: @fg1; + margin-right: 10px; + } + + entry { + background-color: transparent; + text-color: @fg0; + } + + message-box { + background-color: @bg1; + border: 2px solid @border-col; + border-radius: 10px; + padding: 10px; + text-color: @fg0; + } + + listview { + background-color: transparent; + columns: @columns; + spacing: 10px; + } + + element { + background-color: @bg1; + border: 2px solid transparent; + border-radius: 8px; + padding: 10px; + transition: all 150ms ease; + } + + element:hover { + background-color: @bg2; + border: 2px solid @border-col; + } + + element:selected { + background-color: @fg1; + text-color: @bg0; + border: 2px solid @border-col; + } + + element-icon { + size: 24px; + margin-right: 10px; + } + + element-text { + text-color: @fg0; + vertical-align: 0.5; + } + + element:selected element-text { + text-color: @bg0; + } + ''; + }; +} diff --git a/modules/home/hyprland/chernobyl/waybar.nix b/modules/home/hyprland/chernobyl/waybar.nix new file mode 100644 index 0000000..cd3bedd --- /dev/null +++ b/modules/home/hyprland/chernobyl/waybar.nix @@ -0,0 +1,187 @@ +{ pkgs, ... }: + +{ + programs.waybar = { + enable = true; + style = '' + * { + border: none; + border-radius: 0px; + font-family: Fira Code; + font-size: 12pt; + min-height: 0; + } + + window#waybar { + background-color: #1c182d; + color: #d0b6fd; + border-bottom: 3px solid #b12cbf; + } + + window#waybar.hidden { + opacity: 0.2; + } + + #workspaces button { + padding: 0px 8px; + color: #d0b6fd; + background-color: #2b2135; + border: 2px solid transparent; + transition: all 0.3s ease; + } + + #workspaces button:hover { + background-color: #3d3547; + border-bottom: 2px solid #b12cbf; + } + + #workspaces button.active { + background-color: #b12cbf; + color: #1c182d; + border-bottom: 2px solid #d0b6fd; + } + + #workspaces button.urgent { + background-color: #fc4649; + color: #1c182d; + } + + #clock, + #cpu, + #memory, + #battery, + #backlight, + #pulseaudio, + #network { + padding: 0px 10px; + margin: 0px 5px; + color: #d0b6fd; + background-color: #2b2135; + border-left: 2px solid #b12cbf; + } + + #clock { + border-left: none; + } + + #battery.charging { + color: #c4e881; + } + + #battery.warning { + color: #AC82E9; + } + + #battery.critical { + background-color: #fc4649; + color: #1c182d; + } + + #backlight { + color: #f3fc7b; + } + + #pulseaudio { + color: #7b91fc; + } + + #network { + color: #8F56E1; + } + + #cpu { + color: #92fcfa; + } + + #memory { + color: #c4e881; + } + ''; + settings = [ + { + "height" = 30; + "layer" = "top"; + "position" = "top"; + "modules-left" = [ "hyprland/workspaces" ]; + "modules-center" = [ "clock" ]; + "modules-right" = [ "cpu" "memory" "battery" "backlight" "pulseaudio" "network" ]; + + "hyprland/workspaces" = { + "format" = "{name}"; + "on-click" = "activate"; + "all-outputs" = true; + }; + + "clock" = { + "format" = "{:%H:%M}"; + "interval" = 60; + "tooltip-format" = "{:%a, %b %d, %Y}"; + }; + + "cpu" = { + "format" = "󰻠 {usage}%"; + "interval" = 5; + "on-click" = "${pkgs.kitty}/bin/kitty --hold top"; + }; + + "memory" = { + "format" = "󰍛 {percentage}%"; + "interval" = 5; + "on-click" = "${pkgs.kitty}/bin/kitty --hold top"; + }; + + "battery" = { + "format" = "{icon} {capacity}%"; + "format-icons" = [ + "󰂎" + "󰂏" + "󰂐" + "󰂑" + "󰂒" + "󰂓" + "󰂔" + "󰂕" + "󰂖" + "󰗖" + ]; + "interval" = 30; + "states" = { + "warning" = 30; + "critical" = 15; + }; + }; + + "backlight" = { + "format" = "{icon} {percent}%"; + "format-icons" = [ "󰌚" "󰌝" ]; + "on-scroll-down" = "brightnessctl set 5%-"; + "on-scroll-up" = "brightnessctl set 5%+"; + }; + + "pulseaudio" = { + "format" = "{icon} {volume}%"; + "format-muted" = "󰖁 0%"; + "format-icons" = { + "headphone" = "󰋋"; + "hands-free" = "󰋎"; + "headset" = "󰋎"; + "phone" = "󰏲"; + "portable" = "󰏲"; + "car" = "󰄀"; + "default" = [ "󰕿" "󰖀" "󰕾" ]; + }; + "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; + "on-scroll-down" = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"; + "on-scroll-up" = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"; + }; + + "network" = { + "format-wifi" = "󰖩 {signalStrength}%"; + "format-ethernet" = "󰛳"; + "format-disconnected" = "󰌙"; + "on-click" = "${pkgs.networkmanagerapplet}/bin/nm-applet"; + }; + } + ]; + }; +} -- cgit v1.2.3