Move to Hyprlock and Hypridle

This commit is contained in:
Michael Bradley 2025-05-05 20:12:32 -04:00
parent 07976eea16
commit dbf5d34ada
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0
7 changed files with 83 additions and 19 deletions

View file

@ -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 }

View file

@ -101,6 +101,10 @@ window, tooltip {
color: #00FF7F;
}
.hibernate {
color: #7FFF00;
}
.reboot {
color: #FF7F00;
}

View file

@ -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)

34
hypr/hypridle.conf Normal file
View file

@ -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
}

View file

@ -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,

37
hypr/hyprlock.conf Normal file
View file

@ -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
}

View file

@ -1,7 +0,0 @@
daemonize
indicator-caps-lock
indicator-idle-visible
screenshots
clock
fade-in=1
effect-blur=10x3