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",
+8
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"))
+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)
+5 -10
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)",
}) })
+4 -4
View File
@@ -1,8 +1,8 @@
--- @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,
@@ -21,7 +21,7 @@ return function(swap_escape)
scroll_factor = 4, scroll_factor = 4,
}, },
focus_on_close = 1, focus_on_close = true,
sensitivity = 0, sensitivity = 0,
}, },
+10 -1
View File
@@ -1,3 +1,6 @@
return function(is_laptop)
hl.env("QT_QPA_PLATFORM", "wayland")
hl.env("QT_QPA_PLATFORM_THEME", "qt6ct")
hl.on("hyprland.start", function() hl.on("hyprland.start", function()
-- hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland") -- hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland")
-- hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY") -- hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY")
@@ -9,5 +12,11 @@ hl.on("hyprland.start", function()
hl.exec_cmd("nm-applet") hl.exec_cmd("nm-applet")
hl.exec_cmd("nextcloud --background") hl.exec_cmd("nextcloud --background")
hl.exec_cmd("dms run") hl.exec_cmd("dms run")
hl.exec_cmd("wl-paste --type text --watch cliphist store") 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)
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
})
+10 -8
View File
@@ -1,7 +1,14 @@
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 = {
colors = {
"rgba({{colors.primary.default.hex_stripped}}cc)",
"rgba({{colors.secondary.default.hex_stripped}}cc)",
"rgba({{colors.tertiary.default.hex_stripped}}cc)",
},
angle = 45,
},
inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)", inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)",
}, },
}, },
@@ -14,11 +21,6 @@ hl.config({
decoration = { decoration = {
shadow = { shadow = {
color = "rgba({{colors.shadow.default.hex_stripped}}20)", color = "rgba({{colors.shadow.default.hex_stripped}}20)",
} },
} },
})
hl.window_rule({
match = { pin = 1 },
border_color = "rgba({{colors.primary.default.hex_stripped}}AA) rgba({{colors.primary.default.hex_stripped}}77)",
}) })
View File