From dbf5d34ada85cc5788cded05d34ed8d75d7eaaac Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Mon, 5 May 2025 20:12:32 -0400 Subject: [PATCH] Move to Hyprlock and Hypridle --- bombadil.toml | 1 - eww/eww.scss | 4 ++++ eww/eww.yuck | 17 +++++++---------- hypr/hypridle.conf | 34 ++++++++++++++++++++++++++++++++++ hypr/hyprland.conf | 2 +- hypr/hyprlock.conf | 37 +++++++++++++++++++++++++++++++++++++ swaylock/config | 7 ------- 7 files changed, 83 insertions(+), 19 deletions(-) create mode 100644 hypr/hypridle.conf create mode 100644 hypr/hyprlock.conf delete mode 100644 swaylock/config diff --git a/bombadil.toml b/bombadil.toml index 114af8b..48a80a6 100644 --- a/bombadil.toml +++ b/bombadil.toml @@ -40,7 +40,6 @@ lsd = { source = "lsd", target = ".config/lsd", direct = true } nvim = { source = "nvim", target = ".config/nvim", direct = true } rofi = { source = "rofi", target = ".config/rofi", direct = true } steam = { source = "steam/steam_dev.cfg", target = ".steam/steam/steam_dev.cfg", direct = true } -swaylock = { source = "swaylock", target = ".config/swaylock", direct = true } uwsm = { source = "uwsm", target = ".config/uwsm" } vim = { source = "vim/vimrc", target = ".config/vim/vimrc", direct = true } yazi = { source = "yazi", target = ".config/yazi", direct = true } diff --git a/eww/eww.scss b/eww/eww.scss index f8edea8..ffaabfa 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -101,6 +101,10 @@ window, tooltip { color: #00FF7F; } + .hibernate { + color: #7FFF00; + } + .reboot { color: #FF7F00; } diff --git a/eww/eww.yuck b/eww/eww.yuck index 1b17fdd..179e1e9 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -90,10 +90,12 @@ (box :space-evenly false :class "power" (revealer :transition "slideleft" :reveal reveal_power (box :space-evenly true :spacing 2 -; (eventbox :onclick "swaylock" :cursor "pointer" -; (label :text "" :class "lock")) + (eventbox :onclick "loginctl lock-session" :cursor "pointer" + (label :text "" :class "lock")) (eventbox :onclick "systemctl suspend" :cursor "pointer" (label :text "鈴" :class "sleep")) +; (eventbox :onclick "systemctl hibernate" :cursor "pointer" +; (label :text "" :class "hibernate")) (eventbox :onclick "reboot" :cursor "pointer" (label :text "ﰇ" :class "reboot")) (eventbox :onclick "shutdown now" :cursor "pointer" @@ -102,11 +104,6 @@ (stack :selected {reveal_power ? 1 : 0} :transition "crossfade" :same-size true (label :text "" :class "control") (label :text "×" :class "control"))))) -; Unused entries from my Polybar version of this that may end up being useful later -;menu-0-2 = %{F#7FFF00} -;menu-0-2-exec = systemctl hibernate -;menu-0-3 = %{F#00A2ED} -;menu-0-3-exec = grub-reboot "$(rg -i windows /boot/grub/grub.cfg|head -n 1|cut -d "'" -f 2)" && reboot (defvar notifications true) @@ -120,8 +117,8 @@ (defwidget clicker [text command] (eventbox :onclick command :cursor "pointer" :timeout "3600s" (label :text text :class "primary"))) -(defwidget colour_selector [] - (clicker :text "" :command "uwsm-app -- hyprpicker -a")) +;(defwidget colour_selector [] +; (clicker :text "" :command "uwsm-app -- hyprpicker -a")) (defwidget wallpaper [] (clicker :text "󰸉" :command "~/scripts/swww_change.py")) @@ -186,7 +183,7 @@ (systray :pack_direction "ltr" :icon-size 20) (box :class "right" :orientation "h" :space-evenly false :halign "end" (weather)(sep) - (colour_selector)(space) +; (colour_selector)(space) (wallpaper)(sep) (ram)(space) (cpu)(sep) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf new file mode 100644 index 0000000..6aac63c --- /dev/null +++ b/hypr/hypridle.conf @@ -0,0 +1,34 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch dmps on + inhibit_sleep = 0 +} + +listener { + timeout = 120 + on-timeout = brightnessctl -sd amdgpu_bl1 set 66- + on-resume = brightnessctl -rd amdgpu_bl1 +} + +listener { + timeout = 240 + on-timeout = brightnessctl -d amdgpu_bl1 set 0 && brightnessctl -sd chromeos::kbd_backlight set 0 + on-resume = brightnessctl -rd chromeos::kbd_backlight +} + +listener { + timeout = 270 + on-timeout = loginctl lock-session +} + +listener { + timeout = 300 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 330 + on-timeout = systemctl suspend +} diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index ac59dee..1b8a943 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -97,7 +97,7 @@ bind = SUPER, RETURN, exec, $terminal bind = SUPER SHIFT, Q, killactive, bind = SUPER SHIFT, S, exec, uwsm-app -- env sh ~/scripts/screenshot.sh bind = SUPER SHIFT, C, exec, uwsm-app -- hyprpicker -a -bind = SUPER SHIFT, L, exec, uwsm-app -- swaylock +bind = SUPER, L, exec, uwsm-app -- hyprlock bind = SUPER, F, togglefloating, diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf new file mode 100644 index 0000000..529ba0f --- /dev/null +++ b/hypr/hyprlock.conf @@ -0,0 +1,37 @@ +general { + hide_cursor = true + ignore_empty_input = true +} + +background { + monitor = + path = screenshot + blur_passes = 3 + blur_size = 5 +} + +input-field { + monitor = + size = 300, 300 + outline_thickness = 30 + outer_color = rgb(0, 205, 0) + inner_color = rgba(0, 0, 0, 0) + fade_on_empty = false + placeholder_text = + hide_input = true + capslock_color = rgb(205, 0, 0) +} + +label { + monitor = + text = cmd[update:1000] date '+%y/%-m/%-d' + font_size = 20 + position = 0, -250 +} + +label { + monitor = + text = cmd[update:1000] date '+%H:%M:%S' + font_size = 40 + position = 0, 250 +} diff --git a/swaylock/config b/swaylock/config deleted file mode 100644 index b795914..0000000 --- a/swaylock/config +++ /dev/null @@ -1,7 +0,0 @@ -daemonize -indicator-caps-lock -indicator-idle-visible -screenshots -clock -fade-in=1 -effect-blur=10x3