From 74ba9d43a7f2a2bece47579355c5b3934f0cd425 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Mon, 17 Mar 2025 16:36:56 +0100 Subject: [PATCH] changes to hyprland and eww --- modules/wm/hyprland/config/eww/eww.yuck | 45 +++------ modules/wm/hyprland/config/eww/vars.yuck | 12 +++ modules/wm/hyprland/config/hypr/hyprlock.conf | 97 ++++++------------- modules/wm/hyprland/config/hypr/keybinds.conf | 2 +- 4 files changed, 52 insertions(+), 104 deletions(-) create mode 100644 modules/wm/hyprland/config/eww/vars.yuck diff --git a/modules/wm/hyprland/config/eww/eww.yuck b/modules/wm/hyprland/config/eww/eww.yuck index b4857da..7e40a6a 100644 --- a/modules/wm/hyprland/config/eww/eww.yuck +++ b/modules/wm/hyprland/config/eww/eww.yuck @@ -1,35 +1,14 @@ (defwindow main - :monitor 0 - :geometry (geometry :x "0%" - :y "0%" - :width "50%" - :height "50%" - :anchor "center") - :stacking "fg" - :exclusive false - :focusable false - (topbar) -) - -(defwidget topbar [] - (box :class "topbar" - (clock) - (workspaces) - ) -) - -(defwidget clock [] - (box :class "clock" - {formattime(EWW_TIME, "%b %m %H:%M:%S")} - ) -) - -(defwidget workspaces [] - (box :class "workspaces" - (button :class "workspace-button" "◇") - (button :class "workspace-button" "◆") - (button :class "workspace-button" "◇") - (button :class "workspace-button" "◇") - (button :class "workspace-button" "◇") - ) + :monitor 0 + :geometry (geometry + :x "0%" + :y "0%" + :width "50%" + :height "50%" + :anchor "center") + :stacking "fg" + :exclusive false + :focusable false + + (box {workspace}) ) diff --git a/modules/wm/hyprland/config/eww/vars.yuck b/modules/wm/hyprland/config/eww/vars.yuck new file mode 100644 index 0000000..1169564 --- /dev/null +++ b/modules/wm/hyprland/config/eww/vars.yuck @@ -0,0 +1,12 @@ +(defpoll workspace + :interval '0.1s' + :initial-value "" + "hyprctl -j activeworkspace | jq '.id'" +) + +(defpoll time + :interval "1s" + :initial-value "" + "date +'%H:%M:%S'" +) + diff --git a/modules/wm/hyprland/config/hypr/hyprlock.conf b/modules/wm/hyprland/config/hypr/hyprlock.conf index c9eeabe..575cdea 100644 --- a/modules/wm/hyprland/config/hypr/hyprlock.conf +++ b/modules/wm/hyprland/config/hypr/hyprlock.conf @@ -1,88 +1,45 @@ -$accent = $mauve -$accentAlpha = $mauveAlpha -$font = JetBrainsMono Nerd Font -$nix = $HOME/nix-config - # GENERAL general { disable_loading_bar = true hide_cursor = true + ignore_empty_input = true } # BACKGROUND background { - monitor = - path = $nix/misc/lock-screen.png - blur_passes = 0 - color = $base -} - -# LAYOUT -label { - monitor = - text = Layout: $LAYOUT - color = $text - font_size = 25 - font_family = $font - position = 30, -30 - halign = left - valign = top -} - -# TIME -label { - monitor = - text = $TIME - color = $text - font_size = 90 - font_family = $font - position = -30, 0 - halign = right - valign = top -} - -# DATE -label { - monitor = - text = cmd[update:43200000] date +"%A, %d %B %Y" - color = $text - font_size = 25 - font_family = $font - position = -30, -150 - halign = right - valign = top -} - -# USER AVATAR -image { - monitor = - path = $nix/misc/face.png - size = 100 - border_color = $accent - position = 0, 75 - halign = center - valign = center + path = screenshot + blur_size = 1 + blur_passes = 3 } # INPUT FIELD input-field { monitor = - size = 300, 60 - outline_thickness = 4 + outline_thickness = 3 dots_size = 0.2 - dots_spacing = 0.2 + dots_spacing = 0.5 dots_center = true - outer_color = $accent - inner_color = $surface0 - font_color = $text - fade_on_empty = false - placeholder_text = Logged in as $USER + dots_rounding = -1 + outer_color = rgb(151515) + inner_color = rgb(200, 200, 200) + font_color = rgb(10, 10, 10) + fade_on_empty = true + fade_timeout = 1000 + placeholder_text = hide_input = false - check_color = $accent - fail_color = $red + rounding = -1 + check_color = rgb(204, 136, 34) + fail_color = rgb(204, 34, 34) fail_text = $FAIL ($ATTEMPTS) - capslock_color = $yellow - position = 0, -47 - halign = center - valign = center + fail_timeout = 2000 + fail_transition = 300 + capslock_color = -1 + numlock_color = -1 + bothlock_color = -1 + invert_numlock = true + swap_font_color = true + + size = 800, 50 + position = 0, 200 + valign = bottom } diff --git a/modules/wm/hyprland/config/hypr/keybinds.conf b/modules/wm/hyprland/config/hypr/keybinds.conf index f66a9ea..001ce92 100644 --- a/modules/wm/hyprland/config/hypr/keybinds.conf +++ b/modules/wm/hyprland/config/hypr/keybinds.conf @@ -11,7 +11,7 @@ bind = CONTROL, Q, killactive bind = , F11, fullscreen bind = $mainMod, P, exec, hyprlock - +bind = $mainMod, F, togglefloating bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r