From 6616d8bc0e11c391f8e6f9dfebe6e3933bf4f81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Wed, 8 Apr 2026 17:50:06 +0200 Subject: [PATCH] Declared hyprland configs --- flake.lock | 12 +- home.nix | 17 +- hyprland/hypr/appearance.nix | 83 +++ hyprland/hypr/autostart.nix | 24 + hyprland/hypr/input.nix | 20 + hyprland/hypr/keybindings.nix | 71 ++ hyprland/hypr/monitors.nix | 5 + hyprland/hypr/performance.nix | 7 + hyprland/hypr/permissions.nix | 7 + hyprland/hypr/plugins.nix | 70 ++ hyprland/hypr/programs.nix | 13 + hyprland/hypr/rules.nix | 147 ++++ hyprland/raw/waybar.nix | 1206 +++++++++++++++++++++++++++++++++ modules/hyprland.nix | 20 +- 14 files changed, 1681 insertions(+), 21 deletions(-) create mode 100644 hyprland/hypr/appearance.nix create mode 100644 hyprland/hypr/autostart.nix create mode 100644 hyprland/hypr/input.nix create mode 100644 hyprland/hypr/keybindings.nix create mode 100644 hyprland/hypr/monitors.nix create mode 100644 hyprland/hypr/performance.nix create mode 100644 hyprland/hypr/permissions.nix create mode 100644 hyprland/hypr/plugins.nix create mode 100644 hyprland/hypr/programs.nix create mode 100644 hyprland/hypr/rules.nix create mode 100644 hyprland/raw/waybar.nix diff --git a/flake.lock b/flake.lock index 981d160..b6b2ba6 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1775598298, - "narHash": "sha256-FZRwskiertE+8wgFKjLoc/41UrVqzR2V3QseMBHuo/g=", + "lastModified": 1775661044, + "narHash": "sha256-HlvLj+wE5ELaU+u2cY2nBFUJHdrob1V7qydk9lBx7oE=", "owner": "nix-community", "repo": "home-manager", - "rev": "98b4d61cfaf825c8b691afae0b6e152f0cc05c86", + "rev": "4ac0a4fd1537325d769377d574dccd10b97c28a2", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1775305101, - "narHash": "sha256-/74n1oQPtKG52Yw41cbToxspxHbYz6O3vi+XEw16Qe8=", + "lastModified": 1775525138, + "narHash": "sha256-BQb70+B378ECLO8iQT3P/b1hCC5/CJVHZdeulY8futc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "36a601196c4ebf49e035270e10b2d103fe39076b", + "rev": "d96b37bbeb9840f1c0ebfe90585ef5067b69bbb3", "type": "github" }, "original": { diff --git a/home.nix b/home.nix index 8acf35d..d003a80 100644 --- a/home.nix +++ b/home.nix @@ -19,7 +19,7 @@ transmission-remote-gtk qbittorrent ranger - htop + htop-vim tuba papirus-icon-theme gnome-tweaks @@ -69,6 +69,12 @@ ]; }; + wayland.windowManager.hyprland = { + enable = true; + package = null; + portalPackage = null; + }; + dconf.settings = { "org/gnome/desktop/background" = { picture-uri = "file:///home/typo/Pictures/Backgrounds/upscalemedia-transformed-light.png"; @@ -207,13 +213,4 @@ ftp://typo@typofelho.ddns.net/ Felhő }; shellInit = "pfetch"; }; - - wayland.windowManager.hyprland.plugins = with pkgs.hyprlandPlugins; [ - hyprexpo - hyprbars - hyprwinwrap - overview - hyprscrolling - imgborders - ]; } diff --git a/hyprland/hypr/appearance.nix b/hyprland/hypr/appearance.nix new file mode 100644 index 0000000..bcd7c7d --- /dev/null +++ b/hyprland/hypr/appearance.nix @@ -0,0 +1,83 @@ +{ + wayland.windowManager.hyprland.settings = { + general = { + gaps_in = 12; + gaps_out = 20; + border_size = 2; + col.active_border = "rgba(ebdbb2ff) rgba(ebdbb2ff)"; + col.inactive_border = "rgba(595959ff)"; + resize_on_border = true; + layout = "dwindle"; + }; + + decoration = { + rounding = 0; + rounding_power = 0; + active_opacity = 1.0; + inactive_opacity = 1.0; + shadow = { + enabled = true; + range = 1; + render_power = 10; + sharp = true; + offset = "20, 20"; + color = "rgba(0, 0, 0, 0.5)"; + }; + + blur = { + enabled = false; + size = 3; + passes = 5; + vibrancy = 0.18; + noise = 0; + special = true; + }; + }; + + animations = { + enabled = "no"; + + bezier = [ + "easeOutQuint,0.23,1,0.32,1" + "easeInOutCubic,0.65,0.05,0.36,1" + "linear,0,0,1,1" + "almostLinear,0.5,0.5,0.75,1.0" + "quick,0.15,0,0.1,1" + ]; + + animation = [ + "global, 1, 10, default" + "border, 1, 5.39, easeOutQuint" + "windows, 1, 4.79, easeOutQuint" + "windowsIn, 1, 4.1, easeOutQuint, popin 87%" + "windowsOut, 1, 1.49, linear, popin 87%" + "fadeIn, 1, 1.73, almostLinear" + "fadeOut, 1, 1.46, almostLinear" + "fade, 1, 3.03, quick" + "layers, 1, 3.81, easeOutQuint" + "layersIn, 1, 4, easeOutQuint, fade" + "layersOut, 1, 1.5, linear, fade" + "fadeLayersIn, 1, 1.79, almostLinear" + "fadeLayersOut, 1, 1.39, almostLinear" + "workspaces, 1, 1.94, almostLinear, fade" + "workspacesIn, 1, 1.71, almostLinear, slide" + "workspacesOut, 1, 1.71, almostLinear, slide" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + split_width_multiplier = 1.2; + }; + + master = { + new_status = "slave"; + }; + + misc = { + force_default_wallpaper = 0; + disable_hyprland_logo = true; + }; + }; +} diff --git a/hyprland/hypr/autostart.nix b/hyprland/hypr/autostart.nix new file mode 100644 index 0000000..35137be --- /dev/null +++ b/hyprland/hypr/autostart.nix @@ -0,0 +1,24 @@ +{ + wayland.windowManager.hyprland.settings = { + exec-once = [ + "hyprpm reload -n" + "awww-daemon && awww restore" + "hypridle" + "systemctl --user start hyprpolkitagent" + "swaync" + "waybar" + "swayosd-server" + "hyprctl setcursor Qogir 24" + "play /usr/share/sounds/freedesktop/stereo/service-login.oga" + "dconf write /org/gnome/desktop/wm/preferences/button-layout \"''\"" + "dconf write /org/gnome/desktop/interface/enable-animations "false"" + "emacs --daemon" + ]; + + exec-shutdown = [ + "play /usr/share/sounds/freedesktop/stereo/service-logout.oga" + "dconf write /org/gnome/desktop/wm/preferences/button-layout \"'appmenu:minimize,maximize,close'\"" + "dconf write /org/gnome/desktop/interface/enable-animations \"true\"" + ]; + }; +} diff --git a/hyprland/hypr/input.nix b/hyprland/hypr/input.nix new file mode 100644 index 0000000..0d44eb0 --- /dev/null +++ b/hyprland/hypr/input.nix @@ -0,0 +1,20 @@ +{ + wayland.windowManager.hyprland.settings = { + input = { + kb_layout = "hu"; + follow_mouse = 1; + sensitivity = 0.1; # -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = true; + clickfinger_behavior = 1; + }; + }; + + gesture = [ + "3, horizontal, workspace" + "3, up, dispatcher, overview:open" + ]; + hyprexpo-gesture = "3, down, expo"; + }; +} diff --git a/hyprland/hypr/keybindings.nix b/hyprland/hypr/keybindings.nix new file mode 100644 index 0000000..fc2569d --- /dev/null +++ b/hyprland/hypr/keybindings.nix @@ -0,0 +1,71 @@ +let + programs = import ./programs.nix; +in +{ + wayland.windowManager.hyprland.settings = { + bind = [ + "SUPER, RETURN, exec, ${programs.terminal}" + "SUPER, Q, killactive," + "SUPER, X, exec, ${programs.powerMenu}" + "SUPER SHIFT, L, exec, ${programs.lockScreen}" + "SUPER, E, exec, ${programs.fileManager}" + "SUPER, D, exec, ${programs.menu}" + "SUPER, Print, exec, ${programs.colorPicker}" + "SUPER, P, exec, ${programs.passwordManager}" + ", Print, exec, ${programs.screenshot}" + "SUPER, h, movefocus, l" + "SUPER, l, movefocus, r" + "SUPER, k, movefocus, u" + "SUPER, j, movefocus, d" + "ALT, Tab, cyclenext" + "ALT, Tab, bringactivetotop" + "SUPER, V, exec, ${programs.floatingModeToggle}" + "SUPER, g, togglegroup" + "SUPER, 1, workspace, 1" + "SUPER, 2, workspace, 2" + "SUPER, 3, workspace, 3" + "SUPER, 4, workspace, 4" + "SUPER, 5, workspace, 5" + "SUPER, 6, workspace, 6" + "SUPER, 7, workspace, 7" + "SUPER, 8, workspace, 8" + "SUPER, 9, workspace, 9" + "SUPER, 0, workspace, 10" + "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 SHIFT, 7, movetoworkspace, 7" + "SUPER SHIFT, 8, movetoworkspace, 8" + "SUPER SHIFT, 9, movetoworkspace, 9" + "SUPER SHIFT, 0, movetoworkspace, 10" + "SUPER, S, togglespecialworkspace, magic" + "SUPER SHIFT, S, movetoworkspace, special:magic" + "SUPER, mouse_down, workspace, e+1" + "SUPER, mouse_up, workspace, e-1" + ]; + + bindm = [ + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + ]; + + bindel = [ + ",XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise" + ",XF86AudioLowerVolume, exec, swayosd-client --output-volume lower" + ",XF86AudioMute, exec, swayosd-client --output-volume mute-toggle" + ",XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle" + ",XF86MonBrightnessUp, exec, swayosd-client --brightness raise" + ",XF86MonBrightnessDown, exec, swayosd-client --brightness lower" + ]; + + bindl = [ + ", XF86AudioNext, exec, playerctl next" + ", XF86AudioPause, exec, playerctl play-pause" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ]; + }; +} diff --git a/hyprland/hypr/monitors.nix b/hyprland/hypr/monitors.nix new file mode 100644 index 0000000..3d04e7a --- /dev/null +++ b/hyprland/hypr/monitors.nix @@ -0,0 +1,5 @@ +{ + wayland.windowManager.hyprland.settings = { + monitor=",preferred,auto,auto"; + }; +} diff --git a/hyprland/hypr/performance.nix b/hyprland/hypr/performance.nix new file mode 100644 index 0000000..175fde6 --- /dev/null +++ b/hyprland/hypr/performance.nix @@ -0,0 +1,7 @@ +{ + wayland.windowManager.hyprland.settings = { + misc = { + vfr = true; + }; + }; +} diff --git a/hyprland/hypr/permissions.nix b/hyprland/hypr/permissions.nix new file mode 100644 index 0000000..0dad34d --- /dev/null +++ b/hyprland/hypr/permissions.nix @@ -0,0 +1,7 @@ +{ + wayland.windowManager.hyprland.settings = { + ecosystem = { + enforce_permissions = true; + }; + }; +} diff --git a/hyprland/hypr/plugins.nix b/hyprland/hypr/plugins.nix new file mode 100644 index 0000000..4f93d6b --- /dev/null +++ b/hyprland/hypr/plugins.nix @@ -0,0 +1,70 @@ +{ pkgs, ... }: + +{ + wayland.windowManager.hyprland = { + plugins = with pkgs.hyprlandPlugins; [ + hyprexpo + hyprbars + hyprwinwrap + hyprscrolling + ]; + + settings = { + plugin = { + hyprexpo = { + columns = 3; + gap_size = 5; + enable_gesture = true; + gesture_fingers = 3; + gesture_positive = false; + gesture_distance = 300; + workspace_method = "first 1"; + }; + + hyprbars = { + bar_buttons_alignment = "right"; + bar_height = 40; + icon_on_hover = true; + bar_color = "rgba(46, 46, 50, 1.0)"; + bar_blur = true; + bar_part_of_window = true; + hyprbars-button = [ + "rgb(424246), 20, 󰖭, hyprctl dispatch killactive" + "rgb(424246), 20, ⤡, hyprctl dispatch fullscreen 0" + "rgb(424246), 20, ⮻, hyprctl dispatch togglefloating" + ]; + }; + + hyprwinwrap = { + class = "cava-bg"; + }; + + overview = { + onBottom = false; + switchOnDrop = false; + exitOnSwitch = false; + showNewWorkspace = true; + showEmptyWorkspace = true; + reverseSwipe = false; + panelHeight = 150; + }; + + hyprscrolling = { + fullscreen_on_one_column = true; + column_width = 0.45; + }; + + imgborders = { + enabled = true; + image = "~/.border.png"; + sizes = "6,6,6,6 # left, right, top, bottom"; + insets = "4,4,4,4 # left, right, top, bottom"; + scale = 3.5; + smooth = false; + blur = false; + }; + }; + + }; + }; +} diff --git a/hyprland/hypr/programs.nix b/hyprland/hypr/programs.nix new file mode 100644 index 0000000..0cc21df --- /dev/null +++ b/hyprland/hypr/programs.nix @@ -0,0 +1,13 @@ +{ + colorPicker = "hyprpicker --autocopy"; + fileManager = "nautilus"; + fileManagerTUI = "kitty -e ranger"; + floatingModeToggle = "htt ~/.cache/htt/rules"; + lockScreen = "hyprlock"; + menu = "fuzzel"; + passwordManager = "pass-autotype"; + powerMenu = "~/.config/hypr/hyprland/scripts/powermenu.sh"; + screenshot = "~/.config/hypr/hyprland/scripts/screenshot.sh"; + terminal = "kitty"; + themeSwitcher = "~/.config/hypr/hyprland/scripts/themeswitch.sh"; +} diff --git a/hyprland/hypr/rules.nix b/hyprland/hypr/rules.nix new file mode 100644 index 0000000..c7a0a88 --- /dev/null +++ b/hyprland/hypr/rules.nix @@ -0,0 +1,147 @@ +{ + wayland.windowManager.hyprland.settings = { + windowrule = [ + { + name = "windowrule-1"; + suppress_event = "maximize"; + "match:class" = ".*"; + } + + { + name = "open_new_floating_with_sensible_size"; + size = "(monitor_w*0.5) (monitor_h*0.5)"; + "match:class" = ".*"; + } + + { + name = "windowrule-2"; + size = "(monitor_w*0.3) (monitor_h*0.1)"; + "match:class" = "org.gnome.FileRoller"; + } + + { + name = "windowrule-3"; + size = "(monitor_w*0.45) (monitor_h*0.65)"; + "match:class" = "waypaper"; + } + + { + name = "windowrule-14"; + size = "(monitor_w*0.7) (monitor_h*0.7)"; + "match:class" = "io.github.nokse22.high-tide"; + } + + { + name = "windowrule-15"; + size = "(monitor_w*0.7) (monitor_h*0.7)"; + "match:class" = "firefox"; + } + + { + name = "windowrule-17"; + no_focus = "on"; + "match:class" = "^$"; + "match:title" = "^$"; + "match:xwayland" = 1; + "match:float" = 1; + "match:fullscreen" = 0; + "match:pin" = 0; + } + + { + name = "windowrule-18"; + idle_inhibit = "fullscreen"; + "match:class" = "^(*)$"; + } + + { + name = "windowrule-19"; + idle_inhibit = "fullscreen"; + "match:title" = "^(*)$"; + } + + { + name = "windowrule-20"; + idle_inhibit = "fullscreen"; + "match:fullscreen" = 1; + } + ]; + + layerrule = [ + { + name = "layerrule-1"; + blur = "on"; + "match:namespace" = "gtk-layer-shell"; + } + + { + name = "layerrule-2"; + ignore_alpha = 0.5; + animation = "slide"; + "match:namespace" = "gtk-layer-shell"; + } + + { + name = "layerrule-3"; + blur = "on"; + "match:namespace" = "waybar"; + } + + { + name = "layerrule-4"; + blur = "on"; + "match:namespace" = "launcher"; + } + + { + name = "layerrule-5"; + ignore_alpha = 0; + "match:namespace" = "launcher"; + } + + { + name = "layerrule-6"; + blur = "on"; + "match:namespace" = "nwg-drawer"; + } + + { + name = "layerrule-7"; + blur = "on"; + ignore_alpha = 0.4; + animation = "slide"; + "match:namespace" = "swaync-control-center"; + } + + { + name = "layerrule-8"; + blur = "on"; + ignore_alpha = 0.5; + animation = "slide"; + "match:namespace" = "swaync-notification-window"; + } + + { + name = "layerrule-9"; + blur = "on"; + ignore_alpha = 0; + "match:namespace" = "nwg-dock"; + } + + { + name = "layerrule-10"; + blur = "on"; + ignore_alpha = 0; + animation = "slide"; + "match:namespace" = "swayosd"; + } + + { + name = "layerrule-11"; + blur = "on"; + ignore_alpha = 0; + "match:namespace" = "rofi"; + } + ]; + }; +} diff --git a/hyprland/raw/waybar.nix b/hyprland/raw/waybar.nix new file mode 100644 index 0000000..34d45ef --- /dev/null +++ b/hyprland/raw/waybar.nix @@ -0,0 +1,1206 @@ +{ lib, config, ... }: + +let + theme = "dark"; +in +{ + home.file.".config/waybar/custom/htt.sh".text = '' +i#!/bin/bash +if htt $HOME/.cache/htt/rules -q | grep float > /dev/null; then + echo '{"text": "", "class": "running", "tooltip": "Floating mode"}' +else + echo '{"text": "", "class": "stopped", "tooltip": "Tiling mode"}' +fi + ''; + + home.file.".config/waybar/custom/hyprsunset.sh".text = '' +#!/bin/bash +if pgrep -x hyprsunset > /dev/null; then + echo '{"text": "", "class": "running", "tooltip": "Night mode on"}' +else + echo '{"text": "", "class": "stopped", "tooltip": "Night mode off"}' +fi + ''; + + home.file.".config/waybar/config.jsonc".text = '' +// -*- mode: jsonc -*- +[{ + "layer": "bottom", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + "height": 40, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 0, // Gaps between modules (4px) + "reload_style_on_change": true, + // Choose the order of the modules + "modules-left": [ + "custom/swaync", + "custom/htt", + "power-profiles-daemon", + "backlight", + "battery", + "gamemode" + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + //"cpu", + //"memory", + //"temperature", + //"keyboard-state", + "custom/wtf", + "tray", + "network", + "bluetooth", + "wireplumber", + "idle_inhibitor", + "custom/hyprsunset", + "privacy" + ], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "warp-on-scroll": false, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "keyboard-state": { + "numlock": false, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "unknown-tag": "N/A", + "interval": 5, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + }, + "tooltip-format-activated": "Idle inhibition active", + "tooltip-format-deactivated": "Idle inhibition inactive" + }, + "tray": { + // "icon-size": 21, + "spacing": 10, + // "icons": { + // "blueman": "bluetooth", + // "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png" + // } + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}{:%Y-%m-%d}\n{calendar}", + "tooltip": false, + "format": "{:%H:%M | %m-%d}", + "on-click": "gnome-calendar" + // "format-alt": "{:%Y-%m-%d}", + }, + "cpu": { + "format": "{usage}% 🔲", + "tooltip": false + }, + "memory": { + "format": "{}% 💾" + }, + "temperature": { + // "thermal-zone": 2, + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 99, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["🥶", "🌡️", "🥵"] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "battery_hid_04o4boedoeco58o7a_battery", + "format": " {capacity}%" + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "network": { + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr} " + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "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" + }, + "wireplumber": { + "on-click": "pwvucontrol" + }, + "custom/media": { + "format": "{icon} {text}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true + // "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + }, + "custom/power": { + "format" : "⏻ ", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "shutdown", + "reboot": "reboot", + "suspend": "systemctl suspend", + "hibernate": "systemctl hibernate" + } + }, + "custom/nwg-menu": { + //"format" : "", + "format" : "", + "tooltip-format": "App Launcher", + "on-click": "/usr/bin/nwg-menu -va top -cmd-lock \"hyprlock\" -cmd-logout \"hyprctl dispatch exit\" -cmd-restart \"reboot\" -cmd-shutdown \"shutdown now\" -ml 10 -mt 10 -term \"kitty\"" + }, + "bluetooth": { + "format-disabled": " Disabled", + "format-off": " Off", + "format-on": " On", + "format-connected": " Connected", + "on-click": "/usr/bin/blueman-manager" + }, + "custom/bluetooth": { + "format" : "", + "on-click": "/usr/bin/blueman-manager" + }, + "custom/separator": { + "format": "|", + "tooltip": false + }, + "custom/firefox": { + "format" : " ", + "on-click": "/usr/bin/firefox" + }, + "custom/filemanager": { + "format" : " ", + "on-click": "/usr/bin/thunar" + }, + "custom/steam": { + "format" : " ", + "on-click": "/usr/bin/steam-native" + }, + "custom/emacs": { + "format" : " ", + "on-click": "/usr/bin/emacs" + }, + "privacy": { + "modules": [ + {"type": "screenshare"}, + {"type": "audio-in"} + ] + }, + "custom/swaync": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + //"notification": "", + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "", + "inhibited-notification": "", + "inhibited-none": "", + "dnd-inhibited-notification": "", + "dnd-inhibited-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-scroll-up": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + "custom/hyprsunset": { + "format": "{}", + "return-type": "json", + "tooltip": true, + "exec": "~/.config/waybar/custom/hyprsunset.sh", + "interval": 1, + "on-click": "if pgrep hyprsunset > /dev/null; then pkill hyprsunset; else hyprsunset -t 4000 -g 70 & fi", + "exec-on-event": true + }, + "custom/htt": { + "format": "{}", + "return-type": "json", + "tooltip": true, + "exec": "~/.config/waybar/custom/htt.sh", + "interval": 1, + "on-click": "htt ~/.cache/htt/rules", + "exec-on-event": true + }, + "custom/options": { + "format": "", + "tooltip": false + }, + "group/tray-stuff": { + "orientation": "inherit", + "modules": [ + "custom/options", + "gamemode", + "tray", + "backlight", + "battery", + "network", + "bluetooth", + "wireplumber", + "idle_inhibitor", + "custom/hyprsunset" + ], + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false + } + }, + "custom/wtf": { + "format": "?", + "tooltip": true, + "tooltip-format": "Windows + D:\t\tAlkalmazások\nWindows + Q:\t\tBezárás\nWindows + E:\t\tFájlkezelő\nWindows + F:\t\tFullscreen\nWindows + katt + egér:\tAblak mozgatása\nWindows + X:\t\tKikapcsolás\nWindows + Enter:\tTerminál" + }, + "Hyprland:/workspaces": { + "format": "{icon}", + "format-icons": { + "active": "●", + "empty": "○", + "persistent": "●", + "default": "●", + "urgent": "!" + }, + "persistent-workspaces": { + "*": 5 + } + } +}, +{ + "layer": "bottom", // Waybar at top layer + "position": "bottom", // Waybar position (top|bottom|left|right) + "height": 40, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 0, // Gaps between modules (4px) + "reload_style_on_change": true, + // Choose the order of the modules + "modules-center": [ + "hyprland/workspaces" + ], + "hyprland/workspaces": { + "format": "{icon}", + "format-icons": { + "active": "●", + "empty": "○", + "persistent": "●", + "default": "●", + "urgent": "!" + }, + "persistent-workspaces": { + "*": 5 + } + } +}] + ''; + + home.file.".config/waybar/style_dark.css".text = '' +/*ACCENT COLOR: rgba(55, 87, 86, 1)*/ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Monocraft, Ubuntu, Roboto, Helvetica, Arial, sans-serif; + font-size: 14px; +} + +window#waybar { + /*background-color: #1D1D20;*/ + /*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/ + background-color: transparent; + color: #EBDBB2; + transition-property: background-color; + transition-duration: .5s; + /*box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;*/ +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; + box-shadow: inset 0 -3px #EADAB0; +} + +/* you can set a style on hover for any module like this */ +#pulseaudio:hover { + background-color: #424246 +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: #999897; +} + +#workspaces button.urgent { + background-color: #CC241D; + color: #E49696; +} + +#mode { + background-color: #64727D; + box-shadow: inset 0 -3px #ffffff; +} + +#pulseaudio, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#wireplumber, +#custom-media, +#custom-wtf, +#gamemode, +#privacy-item.screenshare, +#custom-options, +#privacy-item.audio-in, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#power-profiles-daemon, +#mpd, +#custom-nwg-menu, +#custom-bluetooth, +#bluetooth, +#custom-hyprsunset, +#custom-swaync, +#custom-htt, +#workspaces button, +#keyboard-state { + padding: 0 15px; + border-radius: 0px; + min-width: 15px; +} + +#battery { + background-color: transparent; + box-shadow: inset 0 3px #98971A; + color: #98971A; +} + +#battery:hover { + background-color: #98971A; + color: #CBCB8E; +} + +#backlight { + background-color: transparent; + color: #D79921; + box-shadow: inset 0 3px #D79921; +} + +#backlight:hover { + background-color: #D79921; + color: #ECCE92; +} + +#custom-wtf { + color: #EADAB0; +} + +#custom-wtf:hover { + background-color: rgba(234, 218, 176, 0.1) +} + +#tray { + background-color: transparent; + color: #CC241D; + box-shadow: inset 0 3px #CC241D; +} + +#network { + background-color: transparent; + box-shadow: inset 0 3px #98971A; + color: #98971A; +} + +#network:hover { + background-color: #98971A; + color: #CBCB8E; +} + +#gamemode { + background-color: transparent; + color: #98971A; + box-shadow: inset 0 3px #98971A; +} + +#gamemode:hover { + background-color: #98971A; + color: #CBCB8E; +} + +#bluetooth { + background-color: transparent; + color: #D79921; + box-shadow: inset 0 3px #D79921; +} + +#bluetooth:hover { + background-color: #D79921; + color: #ECCE92; +} + +#wireplumber { + background-color: transparent; + color: #458588; + box-shadow: inset 0 3px #458588; +} + +#wireplumber:hover { + background-color: #458588; + color: #A3C3C4; +} + +#power-profiles-daemon { + background-color: transparent; + color: #458588; + box-shadow: inset 0 3px #458588; +} + +#power-profiles-daemon:hover { + background-color: #458588; + color: #A3C3C4; +} + +#idle_inhibitor { + background-color: transparent; + color: #B16286; + box-shadow: inset 0 3px #B16286; +} + +#idle_inhibitor:hover { + background-color: #B16286; + color: #DAB4C4; +} + +#custom-hyprsunset { + background-color: transparent; + color: #689D6A; + box-shadow: inset 0 3px #689D6A; +} + +#custom-hyprsunset:hover { + background-color: #689D6A; + color: #B6CFB7; +} + +#custom-htt { + background-color: transparent; + color: #B16286; + box-shadow: inset 0 3px #B16286; +} + +#custom-htt:hover { + background-color: #B16286; + color: #DAB4C4; +} + +#custom-swaync { + background-color: transparent; + color: #689D6A; + box-shadow: inset 0 3px #689D6A; +} + +#custom-swaync:hover { + background-color: #689D6A; + color: #B6CFB7; +} + +#clock { + color: #EADAB0; +} + +#workspaces button { + color: #EADAB0; +} + +#workspaces button.active { + background-color: transparent; + color: #EADAB0; + box-shadow: inset 0 -3px #EADAB0; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +label:focus { + background-color: #000000; +} + +#cpu { + background-color: #2E2E32; + color: #FFFFFF; +} + +#memory { + background-color: #2E2E32; +} + +#disk { + background-color: #2E2E32; +} + +#network.disconnected { + background-color: #D62F36; +} + +#pulseaudio.muted { + background-color: #D62F36; + color: #2a5c45; +} + +#wireplumber.muted { + background-color: #f53c3c; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: #2E2E32; +} + +#temperature.critical { + background-color: #D62F36; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state { + /*background: #97e1ad;*/ + background-color: #2E2E32; +} + +/*#keyboard-state > label { + padding: 0 5px; +}*/ + +/*#keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); +}*/ + +#scratchpad { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad.empty { + background-color: transparent; +} + +#privacy-item.screenshare { + color: #689D6A; + background-color: transparent; + box-shadow: inset 0 3px #689D6A; +} + +#privacy-item.audio-in { + color: #689D6A; + background-color: transparent; + box-shadow: inset 0 3px #689D6A; +} + +#privacy-item.audio-out { + color: #689D6A; + background-color: transparent; + box-shadow: inset 0 3px #689D6A; +} + ''; + + home.file.".config/waybar/style_light.css".text = '' +/*ACCENT COLOR: rgba(55, 87, 86, 1)*/ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Monocraft, Ubuntu, Roboto, Helvetica, Arial, sans-serif; + font-size: 14px; +} + +window#waybar { + /*background-color: #1D1D20;*/ + /*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/ + background-color: transparent; + color: #EBDBB2; + transition-property: background-color; + transition-duration: .5s; + /*box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;*/ +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; + box-shadow: inset 0 -3px #282828; +} + +/* you can set a style on hover for any module like this */ +#pulseaudio:hover { + background-color: #424246 +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: #999897; +} + +#workspaces button.urgent { + background-color: #9D0006; + color: #E49696; +} + +#mode { + background-color: #64727D; + box-shadow: inset 0 -3px #ffffff; +} + +#pulseaudio, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#wireplumber, +#custom-media, +#custom-wtf, +#gamemode, +#privacy-item.screenshare, +#custom-options, +#privacy-item.audio-in, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#power-profiles-daemon, +#mpd, +#custom-nwg-menu, +#custom-bluetooth, +#bluetooth, +#custom-hyprsunset, +#custom-swaync, +#custom-htt, +#workspaces button, +#keyboard-state { + padding: 0 15px; + border-radius: 0px; + min-width: 15px; +} + +#battery { + background-color: transparent; + box-shadow: inset 0 3px #79740E; + color: #79740E; +} + +#battery:hover { + background-color: #79740E; + color: #CBCB8E; +} + +#backlight { + background-color: transparent; + color: #B57614; + box-shadow: inset 0 3px #B57614; +} + +#backlight:hover { + background-color: #B57614; + color: #ECCE92; +} + +#custom-wtf { + color: #282828 +} + +#custom-wtf:hover { + background-color: rgba(40, 40, 40, 0.1) +} + +#tray { + background-color: transparent; + color: #9D0006; + box-shadow: inset 0 3px #9D0006; +} + +#network { + background-color: transparent; + box-shadow: inset 0 3px #79740E; + color: #79740E; +} + +#network:hover { + background-color: #79740E; + color: #CBCB8E; +} + +#gamemode { + background-color: transparent; + color: #79740E; + box-shadow: inset 0 3px #79740E; +} + +#gamemode:hover { + background-color: #79740E; + color: #CBCB8E; +} + +#bluetooth { + background-color: transparent; + color: #B57614; + box-shadow: inset 0 3px #B57614; +} + +#bluetooth:hover { + background-color: #B57614; + color: #ECCE92; +} + +#wireplumber { + background-color: transparent; + color: #076678; + box-shadow: inset 0 3px #076678; +} + +#wireplumber:hover { + background-color: #076678; + color: #A3C3C4; +} + +#power-profiles-daemon { + background-color: transparent; + color: #076678; + box-shadow: inset 0 3px #076678; +} + +#power-profiles-daemon:hover { + background-color: #076678; + color: #A3C3C4; +} + +#idle_inhibitor { + background-color: transparent; + color: #8F3F71; + box-shadow: inset 0 3px #8F3F71; +} + +#idle_inhibitor:hover { + background-color: #8F3F71; + color: #DAB4C4; +} + +#custom-hyprsunset { + background-color: transparent; + color: #427B58; + box-shadow: inset 0 3px #427B58; +} + +#custom-hyprsunset:hover { + background-color: #427B58; + color: #B6CFB7; +} + +#custom-htt { + background-color: transparent; + color: #8F3F71; + box-shadow: inset 0 3px #8F3F71; +} + +#custom-htt:hover { + background-color: #8F3F71; + color: #DAB4C4; +} + +#custom-swaync { + background-color: transparent; + color: #427B58; + box-shadow: inset 0 3px #427B58; +} + +#custom-swaync:hover { + background-color: #427B58; + color: #B6CFB7; +} + +#clock { + color: #282828; +} + +#workspaces button { + color: #282828; +} + +#workspaces button.active { + background-color: transparent; + color: #282828; + box-shadow: inset 0 -3px #282828; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +label:focus { + background-color: #000000; +} + +#cpu { + background-color: #2E2E32; + color: #FFFFFF; +} + +#memory { + background-color: #2E2E32; +} + +#disk { + background-color: #2E2E32; +} + +#network.disconnected { + background-color: #D62F36; +} + +#pulseaudio.muted { + background-color: #D62F36; + color: #2a5c45; +} + +#wireplumber.muted { + background-color: #f53c3c; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: #2E2E32; +} + +#temperature.critical { + background-color: #D62F36; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state { + /*background: #97e1ad;*/ + background-color: #2E2E32; +} + +/*#keyboard-state > label { + padding: 0 5px; +}*/ + +/*#keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); +}*/ + +#scratchpad { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad.empty { + background-color: transparent; +} + +#privacy-item.screenshare { + color: #427B58; + background-color: transparent; + box-shadow: inset 0 3px #427B58; +} + +#privacy-item.audio-in { + color: #427B58; + background-color: transparent; + box-shadow: inset 0 3px #427B58; +} + +#privacy-item.audio-out { + color: #427B58; + background-color: transparent; + box-shadow: inset 0 3px #427B58; +} + ''; + + home.file.".config/waybar/style.css".source = config.home.file.".config/waybar/style_${theme}.css".source; +} diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 84ce65b..8d4648e 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -1,11 +1,21 @@ { imports = [ - ../hyprland/hypr/hypridle.nix - ../hyprland/hypr/hyprlock.nix - ../hyprland/raw/fuzzel.nix - ../hyprland/raw/kitty.nix - ../hyprland/scripts/powermenu.nix ../hyprland/scripts/screenshot.nix + ../hyprland/scripts/powermenu.nix ../hyprland/scripts/themeswitch.nix + ../hyprland/hypr/hypridle.nix + ../hyprland/hypr/keybindings.nix + ../hyprland/hypr/hyprlock.nix + ../hyprland/hypr/performance.nix + ../hyprland/hypr/plugins.nix + ../hyprland/hypr/rules.nix + ../hyprland/hypr/autostart.nix + ../hyprland/hypr/input.nix + ../hyprland/hypr/appearance.nix + ../hyprland/hypr/monitors.nix + ../hyprland/hypr/permissions.nix + ../hyprland/raw/kitty.nix + ../hyprland/raw/fuzzel.nix + ../hyprland/raw/waybar.nix ]; }