From f0063a04307156b1d05aea17f57c3f1ab1617fe8 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 24 Mar 2024 14:26:18 -0500 Subject: [PATCH] switch to hyprlock and hypridle --- .../hypr/conf/catppuccin-mocha.conf | 61 +++++++++++++++++ home/private_dot_config/hypr/conf/execs.conf | 10 +-- home/private_dot_config/hypr/conf/keys.conf | 2 +- home/private_dot_config/hypr/hypridle.conf | 28 ++++++++ home/private_dot_config/hypr/hyprlock.conf | 68 +++++++++++++++++++ 5 files changed, 163 insertions(+), 6 deletions(-) create mode 100644 home/private_dot_config/hypr/conf/catppuccin-mocha.conf create mode 100644 home/private_dot_config/hypr/hypridle.conf create mode 100644 home/private_dot_config/hypr/hyprlock.conf diff --git a/home/private_dot_config/hypr/conf/catppuccin-mocha.conf b/home/private_dot_config/hypr/conf/catppuccin-mocha.conf new file mode 100644 index 0000000..1463565 --- /dev/null +++ b/home/private_dot_config/hypr/conf/catppuccin-mocha.conf @@ -0,0 +1,61 @@ +$rosewaterAlpha = f5e0dc +$flamingoAlpha = f2cdcd +$pinkAlpha = f5c2e7 +$mauveAlpha = cba6f7 +$redAlpha = f38ba8 +$maroonAlpha = eba0ac +$peachAlpha = fab387 +$yellowAlpha = f9e2af +$greenAlpha = a6e3a1 +$tealAlpha = 94e2d5 +$skyAlpha = 89dceb +$sapphireAlpha = 74c7ec +$blueAlpha = 89b4fa +$lavenderAlpha = b4befe + +$textAlpha = cdd6f4 +$subtext1Alpha = bac2de +$subtext0Alpha = a6adc8 + +$overlay2Alpha = 9399b2 +$overlay1Alpha = 7f849c +$overlay0Alpha = 6c7086 + +$surface2Alpha = 585b70 +$surface1Alpha = 45475a +$surface0Alpha = 313244 + +$baseAlpha = 1e1e2e +$mantleAlpha = 181825 +$crustAlpha = 11111b + +$rosewater = 0xfff5e0dc +$flamingo = 0xfff2cdcd +$pink = 0xfff5c2e7 +$mauve = 0xffcba6f7 +$red = 0xfff38ba8 +$maroon = 0xffeba0ac +$peach = 0xfffab387 +$yellow = 0xfff9e2af +$green = 0xffa6e3a1 +$teal = 0xff94e2d5 +$sky = 0xff89dceb +$sapphire = 0xff74c7ec +$blue = 0xff89b4fa +$lavender = 0xffb4befe + +$text = 0xffcdd6f4 +$subtext1 = 0xffbac2de +$subtext0 = 0xffa6adc8 + +$overlay2 = 0xff9399b2 +$overlay1 = 0xff7f849c +$overlay0 = 0xff6c7086 + +$surface2 = 0xff585b70 +$surface1 = 0xff45475a +$surface0 = 0xff313244 + +$base = 0xff1e1e2e +$mantle = 0xff181825 +$crust = 0xff11111b diff --git a/home/private_dot_config/hypr/conf/execs.conf b/home/private_dot_config/hypr/conf/execs.conf index 98936a8..1453711 100644 --- a/home/private_dot_config/hypr/conf/execs.conf +++ b/home/private_dot_config/hypr/conf/execs.conf @@ -1,14 +1,14 @@ # exec-once = ~/.config/hypr/start_eww.sh & # exec-once = flameshot & -exec = swww init & +exec = swww init -exec-once = dunst -conf ~/.config/hypr/dunstrc & +exec-once = dunst -conf ~/.config/hypr/dunstrc # exec-once = udiskie & exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 -exec = swayidle & -exec = kanshi & +exec = hypridle +exec = kanshi # TODO: make hyprman kill eww if necessary -exec = pkill eww & hyprman monitors & +exec = pkill eww & hyprman monitors diff --git a/home/private_dot_config/hypr/conf/keys.conf b/home/private_dot_config/hypr/conf/keys.conf index 9f76c63..bd47673 100644 --- a/home/private_dot_config/hypr/conf/keys.conf +++ b/home/private_dot_config/hypr/conf/keys.conf @@ -9,7 +9,7 @@ env = GRIMBLAST_EDITOR, ksnip bind = $mainMod SHIFT, RETURN, exec, $term bind = $mainMod, P, exec, ~/.config/rofi/bin/launcher.sh bind = $mainMod, N, exec, $termStart --class "notes-editor" -e notes-commit -bind = $mainMod SHIFT, L, exec, lock +bind = $mainMod SHIFT, L, exec, hyprlock bind = $mainMod, S,exec, grimblast copy area bind = $mainMod SHIFT,S, exec, grimblast edit area diff --git a/home/private_dot_config/hypr/hypridle.conf b/home/private_dot_config/hypr/hypridle.conf new file mode 100644 index 0000000..99d993e --- /dev/null +++ b/home/private_dot_config/hypr/hypridle.conf @@ -0,0 +1,28 @@ +# taken from example at https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/ +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 # to avoid having to press a key twice to turn on the display. +} + +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = brightnessctl -r # monitor backlight restor. +} + +listener { + timeout = 300 # 5min + on-timeout = loginctl lock-session # lock screen when timeout has passed +} + +listener { + timeout = 380 # 5.5min + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. +} + +listener { + timeout = 1800 # 30min + on-timeout = systemctl suspend # suspend pc +} diff --git a/home/private_dot_config/hypr/hyprlock.conf b/home/private_dot_config/hypr/hyprlock.conf new file mode 100644 index 0000000..9ac3855 --- /dev/null +++ b/home/private_dot_config/hypr/hyprlock.conf @@ -0,0 +1,68 @@ +source = $HOME/.config/hypr/conf/catppuccin-mocha.conf + +$accent = $rosewater +# this causes error? hard code instead +# $accentAlpha = $rosewaterAlpha +$accentAlpha = f5e0dc + +$font = FiraCode Nerd Font Mono + +# GENERAL +general { + disable_loading_bar = true + hide_cursor = true +} + +# BACKGROUND +background { + monitor = + blur_passes = 0 + color = $base +} + +# TIME +label { + monitor = + text = cmd[update:30000] echo "$(date +"%R")" + color = $text + font_size = 90 + font_family = $font + position = -30, 0 + halign = right + valign = top +} + +# DATE +label { + monitor = + text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")" + color = $text + font_size = 25 + font_family = $font + position = -30, -150 + halign = right + valign = top +} + +# INPUT FIELD +input-field { + monitor = + size = 300, 60 + outline_thickness = 4 + dots_size = 0.2 + dots_spacing = 0.2 + dots_center = true + outer_color = $accent + inner_color = $surface0 + font_color = $text + fade_on_empty = false + placeholder_text = 󰌾 Logged in as $USER + hide_input = false + check_color = $accent + fail_color = $red + fail_text = $FAIL ($ATTEMPTS) + capslock_color = $yellow + position = 0, -35 + halign = center + valign = center +}