From 9602c673e5430567dd4782ebd836cc5bbd302a1f Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Fri, 29 May 2026 17:00:49 +0200 Subject: [PATCH] [Hypr] move lua setup to new folder, add bind to toggle muting of default mic --- config/hypr/hyprland/modal-binds/device.conf | 1 + config/hyprlua/hypridle.conf | 33 +++++++ config/{hypr => hyprlua}/hyprland.lua | 0 config/hyprlua/hyprlock.conf | 96 ++++++++++++++++++++ config/hyprlua/xdg-portal-hyprland | 8 ++ 5 files changed, 138 insertions(+) create mode 100644 config/hyprlua/hypridle.conf rename config/{hypr => hyprlua}/hyprland.lua (100%) create mode 100644 config/hyprlua/hyprlock.conf create mode 100755 config/hyprlua/xdg-portal-hyprland diff --git a/config/hypr/hyprland/modal-binds/device.conf b/config/hypr/hyprland/modal-binds/device.conf index 176d732..48958ed 100644 --- a/config/hypr/hyprland/modal-binds/device.conf +++ b/config/hypr/hyprland/modal-binds/device.conf @@ -52,6 +52,7 @@ bind = , U, exec, hyprctl keyword input:kb_layout us && hyprctl keyword input:kb bind = , U, submap, reset bind = , C, exec, hyprctl keyword input:kb_layout ch && hyprctl keyword input:kb_variant '' && notify-send 'Set to CH keyboard layout' --app-name="Keyboard layout" bind = , C, submap, reset +bind = , M, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle # ── Exit submap ───────────────────────────────────────────────────── diff --git a/config/hyprlua/hypridle.conf b/config/hyprlua/hypridle.conf new file mode 100644 index 0000000..4327dc6 --- /dev/null +++ b/config/hyprlua/hypridle.conf @@ -0,0 +1,33 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ ░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ██ █ ██ ███ █████████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██ + +general { + lock_cmd = hyprlock + unlock_cmd = loginctl unlock-session + before_sleep_cmd = hyprlock + inhibit_sleep = 3 +} + +listener { + timeout = 300 + on-timeout = hyprlock --grace 15 +} + +listener { + timeout = 360 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 600 + on-timeout = systemctl suspend + on-resume = hyprctl dispatch dpms on +} diff --git a/config/hypr/hyprland.lua b/config/hyprlua/hyprland.lua similarity index 100% rename from config/hypr/hyprland.lua rename to config/hyprlua/hyprland.lua diff --git a/config/hyprlua/hyprlock.conf b/config/hyprlua/hyprlock.conf new file mode 100644 index 0000000..7ec4185 --- /dev/null +++ b/config/hyprlua/hyprlock.conf @@ -0,0 +1,96 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒ ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ████ ████████ █ ██ ██████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + +# ┌ ┐ +# │ BACKGROUND │ +# └ ┘ +background { + monitor = + path = /home/janis/NextCloud/Wallpapers/nvim/nvim-simple.png # Or screenshot + + blur_passes = 1 +} + +# ┌ ┐ +# │ PASSWORD INPUT │ +# └ ┘ +input-field { + monitor = + size = 300, 40 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false + outer_color = rgb(92, 155, 63) + inner_color = rgb(200, 200, 200) + font_color = rgb(10, 10, 10) + fade_on_empty = true + placeholder_text = Input Password... # Text rendered in the input box when it's empty. + hide_input = false + + position = 0, -80 + halign = center + valign = center +} + +label { + monitor = + text = $TIME + color = + font_size = 150 + font_family = Comfortaa + + position = 0, 80 + halign = center + valign = center +} + +label { + monitor = + text = $LAYOUT + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Comfortaa + + position = 0, 0 + halign = right + valign = bottom +} + +label { + monitor = + text = $USER + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Comfortaa + + position = 0, 0 + halign = left + valign = bottom + shadow_passes = 3 +} + +label { + monitor = + text = Failed attempts: $ATTEMPTS + color = rgba(200, 0, 0, 1.0) + font_size = 12 + font_family = Adwaita Sans + + position = 0, 20 + halign = center + valign = bottom + shadow_passes = 3 + shadow_size = 5 + shadow_boost = 3 + shadow_color = rgb(255,255,255) +} + diff --git a/config/hyprlua/xdg-portal-hyprland b/config/hyprlua/xdg-portal-hyprland new file mode 100755 index 0000000..61a3648 --- /dev/null +++ b/config/hyprlua/xdg-portal-hyprland @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & \ No newline at end of file