fix: more keybind cleanup, remove hyprlock

This commit is contained in:
2026-06-15 09:18:17 +02:00
parent bd10041d28
commit e4a6ceaa4d
10 changed files with 152 additions and 116 deletions
+2 -2
View File
@@ -9,9 +9,9 @@
#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██ #██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██
general { general {
lock_cmd = hyprlock lock_cmd = dms ipc call lock lock
unlock_cmd = loginctl unlock-session unlock_cmd = loginctl unlock-session
before_sleep_cmd = hyprlock before_sleep_cmd = dms ipc call lock lock
inhibit_sleep = 3 inhibit_sleep = 3
} }
+3 -7
View File
@@ -1,12 +1,8 @@
-- Determine current platform -- Determine current platform
local is_docked = false local is_docked = false
local laptop_config = false local laptop_config = false
local read_platform = pcall(function() local read_platform = io.popen("cat ~/.config/janishutz/platform-laptop") == "l"
io.popen("cat ~/.config/janishutz/platform-laptop") local read_docked = io.popen("cat ~/.config/janishutz/docked") == "y"
end)
local read_docked = pcall(function()
io.popen("cat ~/.config/janishutz/docked")
end)
if read_platform then if read_platform then
laptop_config = true laptop_config = true
@@ -46,7 +42,7 @@ require("hyprland.workspacerules.main")
require("hyprland.monitors")(laptop_config, is_docked) require("hyprland.monitors")(laptop_config, is_docked)
-- Execs -- Execs
require("hyprland.execs") require("hyprland.execs")(laptop_config)
hl.device({ hl.device({
name = "pnp0c50:00-093a:0255-touchpad", name = "pnp0c50:00-093a:0255-touchpad",
+11 -3
View File
@@ -2,6 +2,14 @@ local function exit_submap()
hl.dispatch(hl.dsp.submap("reset")) hl.dispatch(hl.dsp.submap("reset"))
end end
hl.bind("code:232", hl.dsp.exec_cmd(""))
-- bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
-- bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
hl.bind("code:123", hl.dsp.exec_cmd("pamixer -i 5"))
hl.bind("code:122", hl.dsp.exec_cmd("pamixer -d 5"))
hl.bind("code:121", hl.dsp.exec_cmd("pamixer t"))
hl.define_submap("device", function() hl.define_submap("device", function()
hl.bind("m", function() hl.bind("m", function()
hl.dispatch(hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")) hl.dispatch(hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"))
@@ -25,19 +33,19 @@ hl.define_submap("device", function()
end) end)
-- ── DMS controls ───────────────────────────────────────────────── -- ── DMS controls ─────────────────────────────────────────────────
-- clipboard history -- clipboard history
hl.bind("h", function() hl.bind("h", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call clipboard toggle")) hl.dispatch(hl.dsp.exec_cmd("dms ipc call clipboard toggle"))
exit_submap() exit_submap()
end) end)
-- Dash -- Dash
hl.bind("d", function() hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call dash toggle")) hl.dispatch(hl.dsp.exec_cmd("dms ipc call dash toggle"))
exit_submap() exit_submap()
end) end)
-- Settings -- Settings
hl.bind("s", function() hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call settings toggle")) hl.dispatch(hl.dsp.exec_cmd("dms ipc call settings toggle"))
exit_submap() exit_submap()
+16 -3
View File
@@ -2,38 +2,51 @@ local function exit_submap()
hl.dispatch(hl.dsp.submap("reset")) hl.dispatch(hl.dsp.submap("reset"))
end end
hl.bind("SUPER + mouse:272", hl.dsp.window.move())
hl.bind("SUPER + mouse:273", hl.dsp.window.resize())
hl.define_submap("window", function() hl.define_submap("window", function()
-- Close window
hl.bind("x", function() hl.bind("x", function()
hl.dispatch(hl.dsp.exit()) hl.dispatch(hl.dsp.window.close())
exit_submap() exit_submap()
end) end)
hl.bind("q", function() hl.bind("q", function()
hl.dispatch(hl.dsp.exit()) hl.dispatch(hl.dsp.window.close())
exit_submap() exit_submap()
end) end)
-- Fullscreen
hl.bind("f", function() hl.bind("f", function()
hl.dispatch(hl.dsp.window.fullscreen({ mode = "fullscreen" })) hl.dispatch(hl.dsp.window.fullscreen({ mode = "fullscreen" }))
exit_submap() exit_submap()
end) end)
-- Floating
hl.bind("v", function() hl.bind("v", function()
hl.dispatch(hl.dsp.window.float()) hl.dispatch(hl.dsp.window.float())
exit_submap() exit_submap()
end) end)
-- Center
hl.bind("c", function() hl.bind("c", function()
hl.dispatch(hl.dsp.window.center()) hl.dispatch(hl.dsp.window.center())
exit_submap() exit_submap()
end) end)
-- Kill
hl.bind("SHIFT + K", function() hl.bind("SHIFT + K", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Insta-Kill activated' --app-name='Hyprtclt'")) hl.dispatch(hl.dsp.exec_cmd("notify-send 'Insta-Kill activated' --app-name='Hyprtclt'"))
hl.dispatch(hl.dsp.exec_cmd("hyprctl kill")) hl.dispatch(hl.dsp.exec_cmd("hyprctl kill"))
exit_submap() exit_submap()
end) end)
-- Resize
hl.bind("l", hl.dsp.window.resize({ x = 10, y = 0 }))
hl.bind("h", hl.dsp.window.resize({ x = -10, y = 0 }))
hl.bind("j", hl.dsp.window.resize({ x = 0, y = 10 }))
hl.bind("k", hl.dsp.window.resize({ x = 0, y = -10 }))
hl.bind("Escape", function() hl.bind("Escape", function()
exit_submap() exit_submap()
end) end)
+17 -22
View File
@@ -1,24 +1,19 @@
hl.config({ hl.config({
general = { general = {
col = { col = {
active_border = "rgba(ffaabbcc) rgba(ffaabbcc) rgba(ffaabbcc) 45deg", active_border = { colors = { "rgba(ffaabbcc)", "rgba(ffaabbcc)", "rgba(ffaabbcc)" }, angle = "45deg" },
inactive_border = "rgba(ffaabb33)", inactive_border = "rgba(ffaabb33)",
}, },
}, },
group = { group = {
col = { col = {
active_border = "rgba(ffaabb77)", border_active = "rgba(ffaabb77)",
inactive_border = "rgba(ffaabb33)", border_inactive = "rgba(ffaabb33)",
}, },
}, },
decoration = { decoration = {
shadow = { shadow = {
color = "rgba(ffffff20)", color = "rgba(ffffff20)",
} },
} },
})
hl.window_rule({
match = { pin = 1 },
border_color = "rgba(ffffffaa) rgba(ffffff77)",
}) })
+44 -44
View File
@@ -1,51 +1,51 @@
--- @param swap_escape boolean --- @param laptop_config boolean
return function(swap_escape) return function(laptop_config)
hl.config({ hl.config({
input = { input = {
-- kb_options = swap_escape and "caps:swapescape" or "", kb_options = laptop_config and "caps:swapescape" or "",
kb_layout = "us", kb_layout = "us",
kb_variant = "altgr-intl", kb_variant = "altgr-intl",
natural_scroll = true, natural_scroll = true,
numlock_by_default = true, numlock_by_default = true,
repeat_delay = 400, repeat_delay = 400,
follow_mouse = 2, follow_mouse = 2,
mouse_refocus = true, mouse_refocus = true,
scroll_factor = 2, scroll_factor = 2,
accel_profile = "flat", accel_profile = "flat",
touchpad = { touchpad = {
disable_while_typing = true, disable_while_typing = true,
natural_scroll = true, natural_scroll = true,
scroll_factor = 4, scroll_factor = 4,
}, },
focus_on_close = 1, focus_on_close = true,
sensitivity = 0, sensitivity = 0,
}, },
gestures = { gestures = {
workspace_swipe_distance = 200, workspace_swipe_distance = 200,
workspace_swipe_cancel_ratio = 0.3, workspace_swipe_cancel_ratio = 0.3,
workspace_swipe_forever = true, workspace_swipe_forever = true,
workspace_swipe_direction_lock = false, workspace_swipe_direction_lock = false,
}, },
}) })
hl.gesture({ hl.gesture({
fingers = 3, fingers = 3,
direction = "horizontal", direction = "horizontal",
action = "workspace", action = "workspace",
}) })
hl.gesture({ hl.gesture({
fingers = 3, fingers = 3,
direction = "down", direction = "down",
action = "close", action = "close",
}) })
hl.gesture({ hl.gesture({
fingers = 3, fingers = 3,
direction = "up", direction = "up",
action = "fullscreen", action = "fullscreen",
}) })
end end
+22 -13
View File
@@ -1,13 +1,22 @@
hl.on("hyprland.start", function() return function(is_laptop)
-- hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland") hl.env("QT_QPA_PLATFORM", "wayland")
-- hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY") hl.env("QT_QPA_PLATFORM_THEME", "qt6ct")
-- hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") hl.on("hyprland.start", function()
hl.exec_cmd("systemctl --user start hyprpolkitagent") -- hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland")
hl.exec_cmd("hypridle") -- hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY")
hl.exec_cmd("hyprpaper") -- hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("hyprlauncher -d") hl.exec_cmd("systemctl --user start hyprpolkitagent")
hl.exec_cmd("nm-applet") hl.exec_cmd("hypridle")
hl.exec_cmd("nextcloud --background") hl.exec_cmd("hyprpaper")
hl.exec_cmd("dms run") hl.exec_cmd("hyprlauncher -d")
hl.exec_cmd("wl-paste --type text --watch cliphist store") hl.exec_cmd("nm-applet")
end) hl.exec_cmd("nextcloud --background")
hl.exec_cmd("dms run")
hl.exec_cmd("wl-paste --watch cliphist store")
if is_laptop then
hl.exec_cmd("hyprctl setcursor oreo_spark_blue_cursors 36")
else
hl.exec_cmd("hyprctl setcursor oreo_spark_blue_cursors 24")
end
end)
end
@@ -0,0 +1,13 @@
hl.window_rule({
match = {
title = "Bitwarden|secret",
},
no_screen_share = true
})
hl.window_rule({
match = {
class = "nm-connection-editor|[aA]uthentication",
},
no_screen_share = true
})
+24 -22
View File
@@ -1,24 +1,26 @@
hl.config({ hl.config({
general = { general = {
col = { col = {
active_border = "rgba({{colors.primary.default.hex_stripped}}cc) rgba({{colors.secondary.default.hex_stripped}}cc) rgba({{colors.tertiary.default.hex_stripped}}cc) 45deg", active_border = {
inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)", colors = {
}, "rgba({{colors.primary.default.hex_stripped}}cc)",
}, "rgba({{colors.secondary.default.hex_stripped}}cc)",
group = { "rgba({{colors.tertiary.default.hex_stripped}}cc)",
col = { },
active_border = "rgba({{colors.outline_variant.default.hex_stripped}}77)", angle = 45,
inactive_border = "rgba({{colors.surface_container_high.default.hex_stripped}}33)", },
}, inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)",
}, },
decoration = { },
shadow = { group = {
color = "rgba({{colors.shadow.default.hex_stripped}}20)", col = {
} active_border = "rgba({{colors.outline_variant.default.hex_stripped}}77)",
} inactive_border = "rgba({{colors.surface_container_high.default.hex_stripped}}33)",
}) },
},
hl.window_rule({ decoration = {
match = { pin = 1 }, shadow = {
border_color = "rgba({{colors.primary.default.hex_stripped}}AA) rgba({{colors.primary.default.hex_stripped}}77)", color = "rgba({{colors.shadow.default.hex_stripped}}20)",
},
},
}) })
View File