From dc6ac29c30d6a418e0abb83c5ed43a84eb7c8aaf Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Sun, 6 Jul 2025 20:30:38 +0930 Subject: [PATCH] fix: add hyprlock configs --- .config/alacritty/alacritty.toml | 2 +- .config/hypr/hypridle.conf | 20 ++++++ .config/hypr/hyprland.conf | 21 ++++-- .config/hypr/hyprlock.conf | 106 +++++++++++++++++++++++++++++++ .config/hypr/hyprpaper.conf | 11 ++++ .config/wofi/style.css | 39 ++++++++++++ .config/zsh/.zprofile | 6 ++ 7 files changed, 198 insertions(+), 7 deletions(-) create mode 100644 .config/hypr/hypridle.conf create mode 100644 .config/hypr/hyprlock.conf create mode 100644 .config/hypr/hyprpaper.conf create mode 100644 .config/wofi/style.css create mode 100644 .config/zsh/.zprofile diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 852da1f..aa8a315 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -2,4 +2,4 @@ import = ["~/.config/alacritty/cyberdream.toml"] [window] -opacity = 0.9 +opacity = 0.95 diff --git a/.config/hypr/hypridle.conf b/.config/hypr/hypridle.conf new file mode 100644 index 0000000..1fca0ea --- /dev/null +++ b/.config/hypr/hypridle.conf @@ -0,0 +1,20 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances + before_sleep_cmd = loginctl lock-session # lock before suspend + after_sleep_cmd = hyprctl dispatch dpms on # turn on display after resume +} + +listener { + timeout = 300 # 5 minutes (300 seconds) + on-timeout = loginctl lock-session # lock screen when timeout +} + +listener { + timeout = 330 # 5.5 minutes + on-timeout = hyprctl dispatch dpms off # turn off display 30 seconds after lock +} + +listener { + timeout = 1800 # 30 minutes + on-timeout = systemctl suspend # suspend system after 30 minutes +} diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index a4c1394..a474397 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -25,6 +25,8 @@ $menu = wofi --show drun ################# exec-once = waybar +exec-once = hypridle +exec-once = hyprpaper ############################# @@ -77,7 +79,16 @@ general { # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false - layout = dwindle + layout = master +} + +# Master layout specific settings +master { + new_on_top = false + orientation = left + inherit_fullscreen = true + smart_resizing = true + drop_at_cursor = true } # https://wiki.hyprland.org/Configuring/Variables/#decoration @@ -182,11 +193,9 @@ bind = $mainMod, F, togglefloating, bind = $mainMod, P, exec, $menu bind = $mainMod, S, togglesplit, # dwindle -# Move focus with mainMod + arrow keys -bind = $mainMod, h, movefocus, l # left -bind = $mainMod, j, movefocus, d # down -bind = $mainMod, k, movefocus, u # up -bind = $mainMod, l, movefocus, r # right +bind = $mainMod, Return, layoutmsg, swapwithmaster +bind = $mainMod, j, layoutmsg, swapnext +bind = $mainMod, k, layoutmsg, swapprev # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf new file mode 100644 index 0000000..94b887e --- /dev/null +++ b/.config/hypr/hyprlock.conf @@ -0,0 +1,106 @@ +# sample hyprlock.conf +# for more configuration options, refer https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock +# +# rendered text in all widgets supports pango markup (e.g. or tags) +# ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#general-remarks +# +# shortcuts to clear password buffer: ESC, Ctrl+U, Ctrl+Backspace +# +# you can get started by copying this config to ~/.config/hypr/hyprlock.conf +# + +$font = Monospace + +general { + hide_cursor = false +} + +# uncomment to enable fingerprint authentication +# auth { +# fingerprint { +# enabled = true +# ready_message = Scan fingerprint to unlock +# present_message = Scanning... +# retry_delay = 250 # in milliseconds +# } +# } + +animations { + enabled = true + bezier = linear, 1, 1, 0, 0 + animation = fadeIn, 1, 5, linear + animation = fadeOut, 1, 5, linear + animation = inputFieldDots, 1, 2, linear +} + +background { + monitor = + path = screenshot + blur_passes = 3 +} + +input-field { + monitor = + size = 20%, 5% + outline_thickness = 3 + inner_color = rgba(0, 0, 0, 0.0) # no fill + + outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg + check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg + fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg + + font_color = rgb(143, 143, 143) + fade_on_empty = false + rounding = 15 + + font_family = $font + placeholder_text = Input password... + fail_text = $PAMFAIL + + # uncomment to use a letter instead of a dot to indicate the typed password + # dots_text_format = * + # dots_size = 0.4 + dots_spacing = 0.3 + + # uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator) + # hide_input = true + + position = 0, -20 + halign = center + valign = center +} + +# TIME +label { + monitor = + text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90 + font_family = $font + + position = -30, 0 + halign = right + valign = top +} + +# DATE +label { + monitor = + text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds + font_size = 25 + font_family = $font + + position = -30, -150 + halign = right + valign = top +} + +label { + monitor = + text = $LAYOUT[en,ru] + font_size = 24 + onclick = hyprctl switchxkblayout all next + + position = 250, -20 + halign = center + valign = center +} diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..315a985 --- /dev/null +++ b/.config/hypr/hyprpaper.conf @@ -0,0 +1,11 @@ +# Preload wallpapers (loads them into memory) +preload = ~/Pictures/wallpapers/cyber-1.jpg + +# Set wallpaper for specific monitors +wallpaper = ,~/Pictures/wallpapers/cyber-1.jpg + +# Enable splash text rendering over wallpaper +splash = false + +# Enable IPC (allows runtime wallpaper changes) +ipc = on diff --git a/.config/wofi/style.css b/.config/wofi/style.css new file mode 100644 index 0000000..0f1bfb3 --- /dev/null +++ b/.config/wofi/style.css @@ -0,0 +1,39 @@ +window { + margin: 0px; + border: 1px solid #5ea1ff; + background-color: #16181a; +} + +#input { + margin: 5px; + border: none; + color: #fff; + background-color: #16181a; +} + +#inner-box { + margin: 5px; + border: none; + background-color: #16181a; +} + +#outer-box { + margin: 5px; + border: none; + background-color: #16181a; +} + +#scroll { + margin: 0px; + border: none; +} + +#text { + margin: 5px; + border: none; + color: #5ea1ff; +} + +#entry:selected { + background-color: #3c4048; +} diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile new file mode 100644 index 0000000..7591b60 --- /dev/null +++ b/.config/zsh/.zprofile @@ -0,0 +1,6 @@ +#!/bin/zsh +if [[ -z "$WAYLAND_DISPLAY" ]] && [[ -z "$DISPLAY" ]] && [[ "$XDG_VTNR" = 1 ]] && [[ $(tty) = /dev/tty1 ]]; then + if uwsm check may-start; then + exec uwsm start hyprland.desktop + fi +fi